Print this page
Split |
Close |
Expand all |
Collapse all |
--- old/common/autoconf/generated-configure.sh
+++ new/common/autoconf/generated-configure.sh
1 1 #!/bin/bash
2 2 #
3 3 # ##########################################################
4 4 # ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5 5 # ##########################################################
6 6 #
7 7 #! /bin/sh
8 8 # Guess values for system-dependent variables and create Makefiles.
9 9 # Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10 10 #
11 11 # Report bugs to <build-dev@openjdk.java.net>.
12 12 #
13 13 #
14 14 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15 15 #
16 16 #
17 17 # This configure script is free software; the Free Software Foundation
18 18 # gives unlimited permission to copy, distribute and modify it.
19 19 ## -------------------- ##
20 20 ## M4sh Initialization. ##
21 21 ## -------------------- ##
22 22
23 23 # Be more Bourne compatible
24 24 DUALCASE=1; export DUALCASE # for MKS sh
25 25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26 26 emulate sh
27 27 NULLCMD=:
28 28 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29 29 # is contrary to our usage. Disable this feature.
30 30 alias -g '${1+"$@"}'='"$@"'
31 31 setopt NO_GLOB_SUBST
32 32 else
33 33 case `(set -o) 2>/dev/null` in #(
34 34 *posix*) :
35 35 set -o posix ;; #(
36 36 *) :
37 37 ;;
38 38 esac
39 39 fi
40 40
41 41
42 42 as_nl='
43 43 '
44 44 export as_nl
45 45 # Printing a long string crashes Solaris 7 /usr/bin/printf.
46 46 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47 47 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48 48 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49 49 # Prefer a ksh shell builtin over an external printf program on Solaris,
50 50 # but without wasting forks for bash or zsh.
51 51 if test -z "$BASH_VERSION$ZSH_VERSION" \
52 52 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53 53 as_echo='print -r --'
54 54 as_echo_n='print -rn --'
55 55 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56 56 as_echo='printf %s\n'
57 57 as_echo_n='printf %s'
58 58 else
59 59 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60 60 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61 61 as_echo_n='/usr/ucb/echo -n'
62 62 else
63 63 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64 64 as_echo_n_body='eval
65 65 arg=$1;
66 66 case $arg in #(
67 67 *"$as_nl"*)
68 68 expr "X$arg" : "X\\(.*\\)$as_nl";
69 69 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70 70 esac;
71 71 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72 72 '
73 73 export as_echo_n_body
74 74 as_echo_n='sh -c $as_echo_n_body as_echo'
75 75 fi
76 76 export as_echo_body
77 77 as_echo='sh -c $as_echo_body as_echo'
78 78 fi
79 79
80 80 # The user is always right.
81 81 if test "${PATH_SEPARATOR+set}" != set; then
82 82 PATH_SEPARATOR=:
83 83 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84 84 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85 85 PATH_SEPARATOR=';'
86 86 }
87 87 fi
88 88
89 89
90 90 # IFS
91 91 # We need space, tab and new line, in precisely that order. Quoting is
92 92 # there to prevent editors from complaining about space-tab.
93 93 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
94 94 # splitting by setting IFS to empty value.)
95 95 IFS=" "" $as_nl"
96 96
97 97 # Find who we are. Look in the path if we contain no directory separator.
98 98 as_myself=
99 99 case $0 in #((
100 100 *[\\/]* ) as_myself=$0 ;;
101 101 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102 102 for as_dir in $PATH
103 103 do
104 104 IFS=$as_save_IFS
105 105 test -z "$as_dir" && as_dir=.
106 106 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107 107 done
108 108 IFS=$as_save_IFS
109 109
110 110 ;;
111 111 esac
112 112 # We did not find ourselves, most probably we were run as `sh COMMAND'
113 113 # in which case we are not to be found in the path.
114 114 if test "x$as_myself" = x; then
115 115 as_myself=$0
116 116 fi
117 117 if test ! -f "$as_myself"; then
118 118 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119 119 exit 1
120 120 fi
121 121
122 122 # Unset variables that we do not need and which cause bugs (e.g. in
123 123 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
124 124 # suppresses any "Segmentation fault" message there. '((' could
125 125 # trigger a bug in pdksh 5.2.14.
126 126 for as_var in BASH_ENV ENV MAIL MAILPATH
127 127 do eval test x\${$as_var+set} = xset \
128 128 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129 129 done
130 130 PS1='$ '
131 131 PS2='> '
132 132 PS4='+ '
133 133
134 134 # NLS nuisances.
135 135 LC_ALL=C
136 136 export LC_ALL
137 137 LANGUAGE=C
138 138 export LANGUAGE
139 139
140 140 # CDPATH.
141 141 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142 142
143 143 # Use a proper internal environment variable to ensure we don't fall
144 144 # into an infinite loop, continuously re-executing ourselves.
145 145 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146 146 _as_can_reexec=no; export _as_can_reexec;
147 147 # We cannot yet assume a decent shell, so we have to provide a
148 148 # neutralization value for shells without unset; and this also
149 149 # works around shells that cannot unset nonexistent variables.
150 150 # Preserve -v and -x to the replacement shell.
151 151 BASH_ENV=/dev/null
152 152 ENV=/dev/null
153 153 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154 154 case $- in # ((((
155 155 *v*x* | *x*v* ) as_opts=-vx ;;
156 156 *v* ) as_opts=-v ;;
157 157 *x* ) as_opts=-x ;;
158 158 * ) as_opts= ;;
159 159 esac
160 160 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161 161 # Admittedly, this is quite paranoid, since all the known shells bail
162 162 # out after a failed `exec'.
163 163 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164 164 as_fn_exit 255
165 165 fi
166 166 # We don't want this to propagate to other subprocesses.
167 167 { _as_can_reexec=; unset _as_can_reexec;}
168 168 if test "x$CONFIG_SHELL" = x; then
169 169 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170 170 emulate sh
171 171 NULLCMD=:
172 172 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173 173 # is contrary to our usage. Disable this feature.
174 174 alias -g '\${1+\"\$@\"}'='\"\$@\"'
175 175 setopt NO_GLOB_SUBST
176 176 else
177 177 case \`(set -o) 2>/dev/null\` in #(
178 178 *posix*) :
179 179 set -o posix ;; #(
180 180 *) :
181 181 ;;
182 182 esac
183 183 fi
184 184 "
185 185 as_required="as_fn_return () { (exit \$1); }
186 186 as_fn_success () { as_fn_return 0; }
187 187 as_fn_failure () { as_fn_return 1; }
188 188 as_fn_ret_success () { return 0; }
189 189 as_fn_ret_failure () { return 1; }
190 190
191 191 exitcode=0
192 192 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193 193 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194 194 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195 195 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196 196 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197 197
198 198 else
199 199 exitcode=1; echo positional parameters were not saved.
200 200 fi
201 201 test x\$exitcode = x0 || exit 1
202 202 test -x / || exit 1"
203 203 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204 204 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205 205 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206 206 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207 207 test \$(( 1 + 1 )) = 2 || exit 1"
208 208 if (eval "$as_required") 2>/dev/null; then :
209 209 as_have_required=yes
210 210 else
211 211 as_have_required=no
212 212 fi
213 213 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214 214
215 215 else
216 216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217 217 as_found=false
218 218 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219 219 do
220 220 IFS=$as_save_IFS
221 221 test -z "$as_dir" && as_dir=.
222 222 as_found=:
223 223 case $as_dir in #(
224 224 /*)
225 225 for as_base in sh bash ksh sh5; do
226 226 # Try only shells that exist, to save several forks.
227 227 as_shell=$as_dir/$as_base
228 228 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229 229 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230 230 CONFIG_SHELL=$as_shell as_have_required=yes
231 231 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232 232 break 2
233 233 fi
234 234 fi
235 235 done;;
236 236 esac
237 237 as_found=false
238 238 done
239 239 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240 240 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241 241 CONFIG_SHELL=$SHELL as_have_required=yes
242 242 fi; }
243 243 IFS=$as_save_IFS
244 244
245 245
246 246 if test "x$CONFIG_SHELL" != x; then :
247 247 export CONFIG_SHELL
248 248 # We cannot yet assume a decent shell, so we have to provide a
249 249 # neutralization value for shells without unset; and this also
250 250 # works around shells that cannot unset nonexistent variables.
251 251 # Preserve -v and -x to the replacement shell.
252 252 BASH_ENV=/dev/null
253 253 ENV=/dev/null
254 254 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255 255 case $- in # ((((
256 256 *v*x* | *x*v* ) as_opts=-vx ;;
257 257 *v* ) as_opts=-v ;;
258 258 *x* ) as_opts=-x ;;
259 259 * ) as_opts= ;;
260 260 esac
261 261 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262 262 # Admittedly, this is quite paranoid, since all the known shells bail
263 263 # out after a failed `exec'.
264 264 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265 265 exit 255
266 266 fi
267 267
268 268 if test x$as_have_required = xno; then :
269 269 $as_echo "$0: This script requires a shell more modern than all"
270 270 $as_echo "$0: the shells that I found on your system."
271 271 if test x${ZSH_VERSION+set} = xset ; then
272 272 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273 273 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274 274 else
275 275 $as_echo "$0: Please tell bug-autoconf@gnu.org and
276 276 $0: build-dev@openjdk.java.net about your system, including
277 277 $0: any error possibly output before this message. Then
278 278 $0: install a modern shell, or manually run the script
279 279 $0: under such a shell if you do have one."
280 280 fi
281 281 exit 1
282 282 fi
283 283 fi
284 284 fi
285 285 SHELL=${CONFIG_SHELL-/bin/sh}
286 286 export SHELL
287 287 # Unset more variables known to interfere with behavior of common tools.
288 288 CLICOLOR_FORCE= GREP_OPTIONS=
289 289 unset CLICOLOR_FORCE GREP_OPTIONS
290 290
291 291 ## --------------------- ##
292 292 ## M4sh Shell Functions. ##
293 293 ## --------------------- ##
294 294 # as_fn_unset VAR
295 295 # ---------------
296 296 # Portably unset VAR.
297 297 as_fn_unset ()
298 298 {
299 299 { eval $1=; unset $1;}
300 300 }
301 301 as_unset=as_fn_unset
302 302
303 303 # as_fn_set_status STATUS
304 304 # -----------------------
305 305 # Set $? to STATUS, without forking.
306 306 as_fn_set_status ()
307 307 {
308 308 return $1
309 309 } # as_fn_set_status
310 310
311 311 # as_fn_exit STATUS
312 312 # -----------------
313 313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314 314 as_fn_exit ()
315 315 {
316 316 set +e
317 317 as_fn_set_status $1
318 318 exit $1
319 319 } # as_fn_exit
320 320
321 321 # as_fn_mkdir_p
322 322 # -------------
323 323 # Create "$as_dir" as a directory, including parents if necessary.
324 324 as_fn_mkdir_p ()
325 325 {
326 326
327 327 case $as_dir in #(
328 328 -*) as_dir=./$as_dir;;
329 329 esac
330 330 test -d "$as_dir" || eval $as_mkdir_p || {
331 331 as_dirs=
332 332 while :; do
333 333 case $as_dir in #(
334 334 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335 335 *) as_qdir=$as_dir;;
336 336 esac
337 337 as_dirs="'$as_qdir' $as_dirs"
338 338 as_dir=`$as_dirname -- "$as_dir" ||
339 339 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340 340 X"$as_dir" : 'X\(//\)[^/]' \| \
341 341 X"$as_dir" : 'X\(//\)$' \| \
342 342 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343 343 $as_echo X"$as_dir" |
344 344 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345 345 s//\1/
346 346 q
347 347 }
348 348 /^X\(\/\/\)[^/].*/{
349 349 s//\1/
350 350 q
351 351 }
352 352 /^X\(\/\/\)$/{
353 353 s//\1/
354 354 q
355 355 }
356 356 /^X\(\/\).*/{
357 357 s//\1/
358 358 q
359 359 }
360 360 s/.*/./; q'`
361 361 test -d "$as_dir" && break
362 362 done
363 363 test -z "$as_dirs" || eval "mkdir $as_dirs"
364 364 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365 365
366 366
367 367 } # as_fn_mkdir_p
368 368
369 369 # as_fn_executable_p FILE
370 370 # -----------------------
371 371 # Test if FILE is an executable regular file.
372 372 as_fn_executable_p ()
373 373 {
374 374 test -f "$1" && test -x "$1"
375 375 } # as_fn_executable_p
376 376 # as_fn_append VAR VALUE
377 377 # ----------------------
378 378 # Append the text in VALUE to the end of the definition contained in VAR. Take
379 379 # advantage of any shell optimizations that allow amortized linear growth over
380 380 # repeated appends, instead of the typical quadratic growth present in naive
381 381 # implementations.
382 382 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383 383 eval 'as_fn_append ()
384 384 {
385 385 eval $1+=\$2
386 386 }'
387 387 else
388 388 as_fn_append ()
389 389 {
390 390 eval $1=\$$1\$2
391 391 }
392 392 fi # as_fn_append
393 393
394 394 # as_fn_arith ARG...
395 395 # ------------------
396 396 # Perform arithmetic evaluation on the ARGs, and store the result in the
397 397 # global $as_val. Take advantage of shells that can avoid forks. The arguments
398 398 # must be portable across $(()) and expr.
399 399 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400 400 eval 'as_fn_arith ()
401 401 {
402 402 as_val=$(( $* ))
403 403 }'
404 404 else
405 405 as_fn_arith ()
406 406 {
407 407 as_val=`expr "$@" || test $? -eq 1`
408 408 }
409 409 fi # as_fn_arith
410 410
411 411
412 412 # as_fn_error STATUS ERROR [LINENO LOG_FD]
413 413 # ----------------------------------------
414 414 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415 415 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416 416 # script with STATUS, using 1 if that was 0.
417 417 as_fn_error ()
418 418 {
419 419 as_status=$1; test $as_status -eq 0 && as_status=1
420 420 if test "$4"; then
421 421 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422 422 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423 423 fi
424 424 $as_echo "$as_me: error: $2" >&2
425 425 as_fn_exit $as_status
426 426 } # as_fn_error
427 427
428 428 if expr a : '\(a\)' >/dev/null 2>&1 &&
429 429 test "X`expr 00001 : '.*\(...\)'`" = X001; then
430 430 as_expr=expr
431 431 else
432 432 as_expr=false
433 433 fi
434 434
435 435 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436 436 as_basename=basename
437 437 else
438 438 as_basename=false
439 439 fi
440 440
441 441 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442 442 as_dirname=dirname
443 443 else
444 444 as_dirname=false
445 445 fi
446 446
447 447 as_me=`$as_basename -- "$0" ||
448 448 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449 449 X"$0" : 'X\(//\)$' \| \
450 450 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451 451 $as_echo X/"$0" |
452 452 sed '/^.*\/\([^/][^/]*\)\/*$/{
453 453 s//\1/
454 454 q
455 455 }
456 456 /^X\/\(\/\/\)$/{
457 457 s//\1/
458 458 q
459 459 }
460 460 /^X\/\(\/\).*/{
461 461 s//\1/
462 462 q
463 463 }
464 464 s/.*/./; q'`
465 465
466 466 # Avoid depending upon Character Ranges.
467 467 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468 468 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469 469 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470 470 as_cr_digits='0123456789'
471 471 as_cr_alnum=$as_cr_Letters$as_cr_digits
472 472
473 473
474 474 as_lineno_1=$LINENO as_lineno_1a=$LINENO
475 475 as_lineno_2=$LINENO as_lineno_2a=$LINENO
476 476 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477 477 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478 478 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
479 479 sed -n '
480 480 p
481 481 /[$]LINENO/=
482 482 ' <$as_myself |
483 483 sed '
484 484 s/[$]LINENO.*/&-/
485 485 t lineno
486 486 b
487 487 :lineno
488 488 N
489 489 :loop
490 490 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491 491 t loop
492 492 s/-\n.*//
493 493 ' >$as_me.lineno &&
494 494 chmod +x "$as_me.lineno" ||
495 495 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496 496
497 497 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498 498 # already done that, so ensure we don't try to do so again and fall
499 499 # in an infinite loop. This has already happened in practice.
500 500 _as_can_reexec=no; export _as_can_reexec
501 501 # Don't try to exec as it changes $[0], causing all sort of problems
502 502 # (the dirname of $[0] is not the place where we might find the
503 503 # original and so on. Autoconf is especially sensitive to this).
504 504 . "./$as_me.lineno"
505 505 # Exit status is that of the last command.
506 506 exit
507 507 }
508 508
509 509 ECHO_C= ECHO_N= ECHO_T=
510 510 case `echo -n x` in #(((((
511 511 -n*)
512 512 case `echo 'xy\c'` in
513 513 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
514 514 xy) ECHO_C='\c';;
515 515 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
516 516 ECHO_T=' ';;
517 517 esac;;
518 518 *)
519 519 ECHO_N='-n';;
520 520 esac
521 521
522 522 rm -f conf$$ conf$$.exe conf$$.file
523 523 if test -d conf$$.dir; then
524 524 rm -f conf$$.dir/conf$$.file
525 525 else
526 526 rm -f conf$$.dir
527 527 mkdir conf$$.dir 2>/dev/null
528 528 fi
529 529 if (echo >conf$$.file) 2>/dev/null; then
530 530 if ln -s conf$$.file conf$$ 2>/dev/null; then
531 531 as_ln_s='ln -s'
532 532 # ... but there are two gotchas:
533 533 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534 534 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535 535 # In both cases, we have to default to `cp -pR'.
536 536 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537 537 as_ln_s='cp -pR'
538 538 elif ln conf$$.file conf$$ 2>/dev/null; then
539 539 as_ln_s=ln
540 540 else
541 541 as_ln_s='cp -pR'
542 542 fi
543 543 else
544 544 as_ln_s='cp -pR'
545 545 fi
546 546 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547 547 rmdir conf$$.dir 2>/dev/null
548 548
549 549 if mkdir -p . 2>/dev/null; then
550 550 as_mkdir_p='mkdir -p "$as_dir"'
551 551 else
552 552 test -d ./-p && rmdir ./-p
553 553 as_mkdir_p=false
554 554 fi
555 555
556 556 as_test_x='test -x'
557 557 as_executable_p=as_fn_executable_p
558 558
559 559 # Sed expression to map a string onto a valid CPP name.
560 560 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561 561
562 562 # Sed expression to map a string onto a valid variable name.
563 563 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564 564
565 565
566 566 test -n "$DJDIR" || exec 7<&0 </dev/null
567 567 exec 6>&1
568 568
569 569 # Name of the host.
570 570 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571 571 # so uname gets run too.
572 572 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573 573
574 574 #
575 575 # Initializations.
576 576 #
577 577 ac_default_prefix=/usr/local
578 578 ac_clean_files=
579 579 ac_config_libobj_dir=.
580 580 LIBOBJS=
581 581 cross_compiling=no
582 582 subdirs=
583 583 MFLAGS=
584 584 MAKEFLAGS=
585 585
586 586 # Identity of this package.
587 587 PACKAGE_NAME='OpenJDK'
588 588 PACKAGE_TARNAME='openjdk'
589 589 PACKAGE_VERSION='jdk9'
590 590 PACKAGE_STRING='OpenJDK jdk9'
591 591 PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592 592 PACKAGE_URL='http://openjdk.java.net'
593 593
594 594 # Factoring default headers for most tests.
595 595 ac_includes_default="\
596 596 #include <stdio.h>
597 597 #ifdef HAVE_SYS_TYPES_H
598 598 # include <sys/types.h>
599 599 #endif
600 600 #ifdef HAVE_SYS_STAT_H
601 601 # include <sys/stat.h>
602 602 #endif
603 603 #ifdef STDC_HEADERS
604 604 # include <stdlib.h>
605 605 # include <stddef.h>
606 606 #else
607 607 # ifdef HAVE_STDLIB_H
608 608 # include <stdlib.h>
609 609 # endif
610 610 #endif
611 611 #ifdef HAVE_STRING_H
612 612 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613 613 # include <memory.h>
614 614 # endif
615 615 # include <string.h>
616 616 #endif
617 617 #ifdef HAVE_STRINGS_H
618 618 # include <strings.h>
619 619 #endif
620 620 #ifdef HAVE_INTTYPES_H
621 621 # include <inttypes.h>
622 622 #endif
623 623 #ifdef HAVE_STDINT_H
624 624 # include <stdint.h>
625 625 #endif
626 626 #ifdef HAVE_UNISTD_H
627 627 # include <unistd.h>
628 628 #endif"
629 629
630 630 ac_subst_vars='LTLIBOBJS
631 631 LIBOBJS
632 632 CFLAGS_CCACHE
633 633 CCACHE
634 634 USE_PRECOMPILED_HEADER
635 635 BUILD_ICECC
636 636 ICECC
637 637 ICECC_WRAPPER
638 638 ICECC_CREATE_ENV
639 639 ICECC_CMD
640 640 ENABLE_JAVAC_SERVER
641 641 ENABLE_SJAVAC
642 642 SJAVAC_SERVER_JAVA_FLAGS
643 643 SJAVAC_SERVER_JAVA
644 644 JAVA_TOOL_FLAGS_SMALL
645 645 JAVA_FLAGS_SMALL
646 646 JAVA_FLAGS_JAVAC
647 647 BOOTCYCLE_JVM_ARGS_BIG
648 648 JAVA_FLAGS_BIG
649 649 JAVA_FLAGS
650 650 TEST_JOBS
651 651 JOBS
652 652 MEMORY_SIZE
653 653 NUM_CORES
654 654 ENABLE_GENERATE_CLASSLIST
655 655 BUILD_FAILURE_HANDLER
656 656 ENABLE_INTREE_EC
657 657 STLPORT_LIB
658 658 LIBZIP_CAN_USE_MMAP
659 659 LIBDL
660 660 LIBM
661 661 USE_EXTERNAL_LCMS
662 662 LCMS_LIBS
663 663 LCMS_CFLAGS
664 664 USE_EXTERNAL_LIBZ
665 665 USE_EXTERNAL_LIBPNG
666 666 PNG_LIBS
667 667 PNG_CFLAGS
668 668 USE_EXTERNAL_LIBGIF
669 669 USE_EXTERNAL_LIBJPEG
670 670 LLVM_LIBS
671 671 LLVM_LDFLAGS
672 672 LLVM_CFLAGS
673 673 LLVM_CONFIG
674 674 LIBFFI_LIBS
675 675 LIBFFI_CFLAGS
676 676 ALSA_LIBS
677 677 ALSA_CFLAGS
678 678 FREETYPE_BUNDLE_LIB_PATH
679 679 FREETYPE_LIBS
680 680 FREETYPE_CFLAGS
681 681 CUPS_CFLAGS
682 682 X_EXTRA_LIBS
683 683 X_LIBS
684 684 X_PRE_LIBS
685 685 X_CFLAGS
686 686 XMKMF
687 687 MSVCP_DLL
688 688 MSVCR_DLL
689 689 LIBCXX
690 690 STATIC_CXX_SETTING
691 691 FIXPATH_DETACH_FLAG
692 692 FIXPATH
693 693 BUILD_GTEST
694 694 VALID_JVM_FEATURES
695 695 JVM_FEATURES_custom
696 696 JVM_FEATURES_zeroshark
697 697 JVM_FEATURES_zero
698 698 JVM_FEATURES_minimal
699 699 JVM_FEATURES_core
700 700 JVM_FEATURES_client
701 701 JVM_FEATURES_server
702 702 INCLUDE_DTRACE
703 703 GCOV_ENABLED
704 704 STRIP_POLICY
705 705 DEBUG_BINARIES
706 706 ZIP_EXTERNAL_DEBUG_SYMBOLS
707 707 COPY_DEBUG_SYMBOLS
708 708 COMPILE_WITH_DEBUG_SYMBOLS
709 709 CFLAGS_WARNINGS_ARE_ERRORS
710 710 BUILD_CC_DISABLE_WARNING_PREFIX
711 711 DISABLE_WARNING_PREFIX
712 712 HOTSPOT_SET_WARNINGS_AS_ERRORS
713 713 WARNINGS_AS_ERRORS
714 714 COMPILER_SUPPORTS_TARGET_BITS_FLAG
715 715 ZERO_ARCHFLAG
716 716 LDFLAGS_TESTEXE
717 717 LDFLAGS_TESTLIB
718 718 CXXFLAGS_TESTEXE
719 719 CXXFLAGS_TESTLIB
720 720 CFLAGS_TESTEXE
721 721 CFLAGS_TESTLIB
722 722 OPENJDK_BUILD_JVM_LIBS
723 723 OPENJDK_BUILD_JVM_ASFLAGS
724 724 OPENJDK_BUILD_JVM_LDFLAGS
725 725 OPENJDK_BUILD_JVM_CFLAGS
726 726 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727 727 OPENJDK_BUILD_LDFLAGS_CXX_JDK
728 728 OPENJDK_BUILD_JDKEXE_LIBS
729 729 OPENJDK_BUILD_JDKLIB_LIBS
730 730 OPENJDK_BUILD_LDFLAGS_JDKEXE
731 731 OPENJDK_BUILD_LDFLAGS_JDKLIB
732 732 OPENJDK_BUILD_CXXFLAGS_JDKEXE
733 733 OPENJDK_BUILD_CXXFLAGS_JDKLIB
734 734 OPENJDK_BUILD_CFLAGS_JDKEXE
735 735 OPENJDK_BUILD_CFLAGS_JDKLIB
736 736 OPENJDK_BUILD_CXXSTD_CXXFLAG
737 737 JVM_LIBS
738 738 JVM_ASFLAGS
739 739 JVM_LDFLAGS
740 740 JVM_CFLAGS
741 741 LDFLAGS_HASH_STYLE
742 742 LDFLAGS_CXX_JDK
743 743 JDKEXE_LIBS
744 744 JDKLIB_LIBS
745 745 LDFLAGS_JDKEXE
746 746 LDFLAGS_JDKLIB
747 747 CXXFLAGS_JDKEXE
748 748 CXXFLAGS_JDKLIB
749 749 CFLAGS_JDKEXE
750 750 CFLAGS_JDKLIB
751 751 MACOSX_VERSION_MIN
752 752 CXXSTD_CXXFLAG
753 753 CXX_O_FLAG_SIZE
754 754 CXX_O_FLAG_NONE
755 755 CXX_O_FLAG_DEBUG
756 756 CXX_O_FLAG_NORM
757 757 CXX_O_FLAG_HI
758 758 CXX_O_FLAG_HIGHEST
759 759 CXX_O_FLAG_HIGHEST_JVM
760 760 C_O_FLAG_SIZE
761 761 C_O_FLAG_NONE
762 762 C_O_FLAG_DEBUG
763 763 C_O_FLAG_NORM
764 764 C_O_FLAG_HI
765 765 C_O_FLAG_HIGHEST
766 766 C_O_FLAG_HIGHEST_JVM
767 767 JVM_CFLAGS_SYMBOLS
768 768 CXXFLAGS_DEBUG_SYMBOLS
769 769 CFLAGS_DEBUG_SYMBOLS
770 770 CXX_FLAG_DEPS
771 771 C_FLAG_DEPS
772 772 SHARED_LIBRARY_FLAGS
773 773 SET_SHARED_LIBRARY_MAPFILE
774 774 SET_SHARED_LIBRARY_NAME
775 775 SET_SHARED_LIBRARY_ORIGIN
776 776 SET_EXECUTABLE_ORIGIN
777 777 CXX_FLAG_REORDER
778 778 C_FLAG_REORDER
779 779 JVM_RCFLAGS
780 780 RC_FLAGS
781 781 AR_OUT_OPTION
782 782 LD_OUT_OPTION
783 783 EXE_OUT_OPTION
784 784 CC_OUT_OPTION
785 785 STRIPFLAGS
786 786 ARFLAGS
787 787 COMPILER_BINDCMD_FILE_FLAG
788 788 COMPILER_COMMAND_FILE_FLAG
789 789 COMPILER_TARGET_BITS_FLAG
790 790 JT_HOME
791 791 JTREGEXE
792 792 HOTSPOT_TOOLCHAIN_TYPE
793 793 USING_BROKEN_SUSE_LD
794 794 PACKAGE_PATH
795 795 USE_CLANG
796 796 HOTSPOT_LD
797 797 HOTSPOT_CXX
798 798 HOTSPOT_RC
799 799 HOTSPOT_MT
800 800 BUILD_AS
801 801 BUILD_LDCXX
802 802 BUILD_LD
803 803 BUILD_STRIP
804 804 BUILD_OBJCOPY
805 805 BUILD_AR
806 806 BUILD_NM
807 807 BUILD_CXX
808 808 BUILD_CC
809 809 BUILD_SYSROOT_LDFLAGS
810 810 BUILD_SYSROOT_CFLAGS
811 811 ac_ct_OBJDUMP
812 812 OBJDUMP
813 813 ac_ct_OBJCOPY
814 814 OBJCOPY
815 815 ac_ct_NM
816 816 ac_ct_STRIP
817 817 GNM
818 818 NM
819 819 STRIP
820 820 MSBUILD
821 821 DUMPBIN
822 822 RC
823 823 MT
824 824 LIPO
825 825 ac_ct_AR
826 826 AR
827 827 AS
828 828 LDCXX
829 829 LD
830 830 CXXCPP
831 831 CPP
832 832 CXX_VERSION_NUMBER
833 833 CC_VERSION_NUMBER
834 834 ac_ct_CXX
835 835 CXXFLAGS
836 836 CXX
837 837 TOOLCHAIN_PATH_CXX
838 838 POTENTIAL_CXX
839 839 OBJEXT
840 840 EXEEXT
841 841 ac_ct_CC
842 842 CPPFLAGS
843 843 LDFLAGS
844 844 CFLAGS
845 845 CC
846 846 TOOLCHAIN_PATH_CC
847 847 POTENTIAL_CC
848 848 TOOLCHAIN_VERSION
849 849 VS_LIB
850 850 VS_INCLUDE
851 851 VS_PATH
852 852 CYGWIN_LINK
853 853 SYSROOT_LDFLAGS
854 854 SYSROOT_CFLAGS
855 855 EXTRA_LDFLAGS
856 856 EXTRA_CXXFLAGS
857 857 EXTRA_CFLAGS
858 858 LEGACY_EXTRA_LDFLAGS
859 859 LEGACY_EXTRA_CXXFLAGS
860 860 LEGACY_EXTRA_CFLAGS
861 861 EXE_SUFFIX
862 862 OBJ_SUFFIX
863 863 STATIC_LIBRARY
864 864 SHARED_LIBRARY
865 865 STATIC_LIBRARY_SUFFIX
866 866 SHARED_LIBRARY_SUFFIX
867 867 LIBRARY_PREFIX
868 868 TOOLCHAIN_TYPE
869 869 STATIC_BUILD
870 870 IMPORT_MODULES_MAKE
871 871 IMPORT_MODULES_SRC
872 872 IMPORT_MODULES_CONF
873 873 IMPORT_MODULES_LIBS
874 874 IMPORT_MODULES_CMDS
875 875 IMPORT_MODULES_CLASSES
876 876 BUILD_HOTSPOT
877 877 HOTSPOT_DIST
878 878 BUILD_OUTPUT
879 879 JDK_TOPDIR
880 880 NASHORN_TOPDIR
881 881 HOTSPOT_TOPDIR
882 882 JAXWS_TOPDIR
883 883 JAXP_TOPDIR
884 884 CORBA_TOPDIR
885 885 LANGTOOLS_TOPDIR
886 886 EXTERNAL_BUILDJDK
887 887 BUILD_JDK
888 888 CREATE_BUILDJDK
889 889 JLINK
890 890 JMOD
891 891 BOOT_JDK_BITS
892 892 JAVAC_FLAGS
893 893 BOOT_JDK_MODULAR
894 894 BOOT_JDK_SOURCETARGET
895 895 JARSIGNER
896 896 JAR
897 897 JAVAH
898 898 JAVAC
899 899 JAVA
900 900 BOOT_JDK
901 901 JAVA_CHECK
902 902 JAVAC_CHECK
903 903 VERSION_IS_GA
904 904 VERSION_SHORT
905 905 VERSION_STRING
906 906 VERSION_NUMBER_FOUR_POSITIONS
907 907 VERSION_NUMBER
908 908 VERSION_OPT
909 909 VERSION_BUILD
910 910 VERSION_PRE
911 911 VERSION_PATCH
912 912 VERSION_SECURITY
913 913 VERSION_MINOR
914 914 VERSION_MAJOR
915 915 MACOSX_BUNDLE_ID_BASE
916 916 MACOSX_BUNDLE_NAME_BASE
917 917 HOTSPOT_VM_DISTRO
918 918 COMPANY_NAME
919 919 JDK_RC_PLATFORM_NAME
920 920 PRODUCT_SUFFIX
921 921 PRODUCT_NAME
922 922 LAUNCHER_NAME
923 923 JLINK_KEEP_PACKAGED_MODULES
924 924 COPYRIGHT_YEAR
925 925 COMPRESS_JARS
926 926 INCLUDE_SA
927 927 UNLIMITED_CRYPTO
928 928 CACERTS_FILE
929 929 BUILD_HEADLESS
930 930 SUPPORT_HEADFUL
931 931 SUPPORT_HEADLESS
932 932 DEFAULT_MAKE_TARGET
933 933 OS_VERSION_MICRO
934 934 OS_VERSION_MINOR
935 935 OS_VERSION_MAJOR
936 936 PKG_CONFIG
937 937 BASH_ARGS
938 938 SETFILE
939 939 CODESIGN
940 940 XATTR
941 941 DSYMUTIL
942 942 IS_GNU_TIME
943 943 PATCH
944 944 DTRACE
945 945 TIME
946 946 STAT
947 947 HG
948 948 READELF
949 949 OTOOL
950 950 LDD
951 951 ZIP
952 952 UNZIP
953 953 TAR_SUPPORTS_TRANSFORM
954 954 TAR_INCLUDE_PARAM
955 955 TAR_CREATE_EXTRA_PARAM
956 956 TAR_TYPE
957 957 FIND_DELETE
958 958 OUTPUT_SYNC
959 959 OUTPUT_SYNC_SUPPORTED
960 960 CHECK_TOOLSDIR_MAKE
961 961 CHECK_TOOLSDIR_GMAKE
962 962 CHECK_MAKE
963 963 CHECK_GMAKE
964 964 MAKE
965 965 PKGHANDLER
966 966 CONFIGURESUPPORT_OUTPUTDIR
967 967 OUTPUT_ROOT
968 968 CONF_NAME
969 969 SPEC
970 970 SDKROOT
971 971 XCODEBUILD
972 972 VALID_JVM_VARIANTS
973 973 JVM_VARIANTS
974 974 DEBUG_LEVEL
975 975 HOTSPOT_DEBUG_LEVEL
976 976 JDK_VARIANT
977 977 USERNAME
978 978 CANONICAL_TOPDIR
979 979 ORIGINAL_TOPDIR
980 980 TOPDIR
981 981 PATH_SEP
982 982 ZERO_ARCHDEF
983 983 HOTSPOT_BUILD_CPU_DEFINE
984 984 HOTSPOT_BUILD_CPU_ARCH
985 985 HOTSPOT_BUILD_CPU
986 986 HOTSPOT_BUILD_OS_TYPE
987 987 HOTSPOT_BUILD_OS
988 988 OPENJDK_BUILD_BUNDLE_PLATFORM
989 989 OPENJDK_BUILD_CPU_BUNDLE
990 990 OPENJDK_BUILD_OS_BUNDLE
991 991 OPENJDK_BUILD_OS_EXPORT_DIR
992 992 OPENJDK_BUILD_CPU_JLI_CFLAGS
993 993 OPENJDK_BUILD_CPU_OSARCH
994 994 OPENJDK_BUILD_CPU_ISADIR
995 995 OPENJDK_BUILD_CPU_LIBDIR
996 996 OPENJDK_BUILD_CPU_LEGACY_LIB
997 997 OPENJDK_BUILD_CPU_LEGACY
998 998 HOTSPOT_TARGET_CPU_DEFINE
999 999 HOTSPOT_TARGET_CPU_ARCH
1000 1000 HOTSPOT_TARGET_CPU
1001 1001 HOTSPOT_TARGET_OS_TYPE
1002 1002 HOTSPOT_TARGET_OS
1003 1003 DEFINE_CROSS_COMPILE_ARCH
1004 1004 LP64
1005 1005 OPENJDK_TARGET_BUNDLE_PLATFORM
1006 1006 OPENJDK_TARGET_CPU_BUNDLE
1007 1007 OPENJDK_TARGET_OS_BUNDLE
1008 1008 OPENJDK_TARGET_OS_EXPORT_DIR
1009 1009 OPENJDK_TARGET_CPU_JLI_CFLAGS
1010 1010 OPENJDK_TARGET_CPU_OSARCH
1011 1011 OPENJDK_TARGET_CPU_ISADIR
1012 1012 OPENJDK_TARGET_CPU_LIBDIR
1013 1013 OPENJDK_TARGET_CPU_LEGACY_LIB
1014 1014 OPENJDK_TARGET_CPU_LEGACY
1015 1015 REQUIRED_OS_VERSION
1016 1016 REQUIRED_OS_NAME
1017 1017 COMPILE_TYPE
1018 1018 OPENJDK_TARGET_CPU_ENDIAN
1019 1019 OPENJDK_TARGET_CPU_BITS
1020 1020 OPENJDK_TARGET_CPU_ARCH
1021 1021 OPENJDK_TARGET_CPU
1022 1022 OPENJDK_TARGET_OS_ENV
1023 1023 OPENJDK_TARGET_OS_TYPE
1024 1024 OPENJDK_TARGET_OS
1025 1025 OPENJDK_BUILD_CPU_ENDIAN
1026 1026 OPENJDK_BUILD_CPU_BITS
1027 1027 OPENJDK_BUILD_CPU_ARCH
1028 1028 OPENJDK_BUILD_CPU
1029 1029 OPENJDK_BUILD_OS_ENV
1030 1030 OPENJDK_BUILD_OS_TYPE
1031 1031 OPENJDK_BUILD_OS
1032 1032 OPENJDK_BUILD_AUTOCONF_NAME
1033 1033 OPENJDK_TARGET_AUTOCONF_NAME
1034 1034 target_os
1035 1035 target_vendor
1036 1036 target_cpu
1037 1037 target
1038 1038 host_os
1039 1039 host_vendor
1040 1040 host_cpu
1041 1041 host
1042 1042 build_os
1043 1043 build_vendor
1044 1044 build_cpu
1045 1045 build
1046 1046 NICE
1047 1047 CPIO
1048 1048 DF
1049 1049 READLINK
1050 1050 CYGPATH
1051 1051 SED
1052 1052 FGREP
1053 1053 EGREP
1054 1054 GREP
1055 1055 AWK
1056 1056 XARGS
1057 1057 WHICH
1058 1058 WC
1059 1059 UNIQ
1060 1060 UNAME
1061 1061 TR
1062 1062 TOUCH
1063 1063 TEE
1064 1064 TAR
1065 1065 TAIL
1066 1066 SORT
1067 1067 SH
1068 1068 RMDIR
1069 1069 RM
1070 1070 PRINTF
1071 1071 NAWK
1072 1072 MV
1073 1073 MKTEMP
1074 1074 MKDIR
1075 1075 LS
1076 1076 LN
1077 1077 GZIP
1078 1078 GUNZIP
1079 1079 HEAD
1080 1080 FIND
1081 1081 FILE
1082 1082 EXPR
1083 1083 ECHO
1084 1084 DIRNAME
1085 1085 DIFF
1086 1086 DATE
1087 1087 CUT
1088 1088 CP
1089 1089 COMM
1090 1090 CMP
1091 1091 CHMOD
1092 1092 CAT
1093 1093 BASH
1094 1094 BASENAME
1095 1095 DATE_WHEN_CONFIGURED
1096 1096 ORIGINAL_PATH
1097 1097 CONFIGURE_COMMAND_LINE
1098 1098 target_alias
1099 1099 host_alias
1100 1100 build_alias
1101 1101 LIBS
1102 1102 ECHO_T
1103 1103 ECHO_N
1104 1104 ECHO_C
1105 1105 DEFS
1106 1106 mandir
1107 1107 localedir
1108 1108 libdir
1109 1109 psdir
1110 1110 pdfdir
1111 1111 dvidir
1112 1112 htmldir
1113 1113 infodir
1114 1114 docdir
1115 1115 oldincludedir
1116 1116 includedir
1117 1117 localstatedir
1118 1118 sharedstatedir
1119 1119 sysconfdir
1120 1120 datadir
1121 1121 datarootdir
1122 1122 libexecdir
1123 1123 sbindir
1124 1124 bindir
1125 1125 program_transform_name
1126 1126 prefix
1127 1127 exec_prefix
1128 1128 PACKAGE_URL
1129 1129 PACKAGE_BUGREPORT
1130 1130 PACKAGE_STRING
1131 1131 PACKAGE_VERSION
1132 1132 PACKAGE_TARNAME
1133 1133 PACKAGE_NAME
1134 1134 PATH_SEPARATOR
1135 1135 SHELL'
1136 1136 ac_subst_files=''
1137 1137 ac_user_opts='
1138 1138 enable_option_checking
1139 1139 with_target_bits
1140 1140 enable_openjdk_only
1141 1141 with_custom_make_dir
1142 1142 with_jdk_variant
1143 1143 enable_debug
1144 1144 with_debug_level
1145 1145 with_jvm_variants
1146 1146 with_devkit
1147 1147 with_sys_root
1148 1148 with_sysroot
1149 1149 with_tools_dir
1150 1150 with_toolchain_path
1151 1151 with_extra_path
1152 1152 with_sdk_name
1153 1153 with_conf_name
1154 1154 with_output_sync
1155 1155 with_default_make_target
1156 1156 enable_headful
1157 1157 with_cacerts_file
1158 1158 enable_unlimited_crypto
1159 1159 with_copyright_year
1160 1160 enable_keep_packaged_modules
1161 1161 with_milestone
1162 1162 with_update_version
1163 1163 with_user_release_suffix
1164 1164 with_build_number
1165 1165 with_version_string
1166 1166 with_version_pre
1167 1167 with_version_opt
1168 1168 with_version_build
1169 1169 with_version_major
1170 1170 with_version_minor
1171 1171 with_version_security
1172 1172 with_version_patch
1173 1173 with_boot_jdk
1174 1174 with_build_jdk
1175 1175 with_add_source_root
1176 1176 with_override_source_root
1177 1177 with_adds_and_overrides
1178 1178 with_override_langtools
1179 1179 with_override_corba
1180 1180 with_override_jaxp
1181 1181 with_override_jaxws
1182 1182 with_override_hotspot
1183 1183 with_override_nashorn
1184 1184 with_override_jdk
1185 1185 with_import_hotspot
1186 1186 with_import_modules
1187 1187 enable_static_build
1188 1188 with_toolchain_type
1189 1189 with_extra_cflags
1190 1190 with_extra_cxxflags
1191 1191 with_extra_ldflags
1192 1192 with_toolchain_version
1193 1193 with_build_devkit
1194 1194 with_jtreg
1195 1195 enable_warnings_as_errors
1196 1196 with_native_debug_symbols
1197 1197 enable_debug_symbols
1198 1198 enable_zip_debug_info
1199 1199 enable_native_coverage
1200 1200 enable_dtrace
1201 1201 with_jvm_features
1202 1202 with_jvm_interpreter
1203 1203 enable_hotspot_gtest
1204 1204 with_stdc__lib
1205 1205 with_msvcr_dll
1206 1206 with_msvcp_dll
1207 1207 with_x
1208 1208 with_cups
1209 1209 with_cups_include
1210 1210 with_freetype
1211 1211 with_freetype_include
1212 1212 with_freetype_lib
1213 1213 with_freetype_src
1214 1214 enable_freetype_bundling
1215 1215 with_alsa
1216 1216 with_alsa_include
1217 1217 with_alsa_lib
1218 1218 with_libffi
1219 1219 with_libffi_include
1220 1220 with_libffi_lib
1221 1221 with_libjpeg
1222 1222 with_giflib
1223 1223 with_libpng
1224 1224 with_zlib
1225 1225 with_lcms
1226 1226 with_dxsdk
1227 1227 with_dxsdk_lib
1228 1228 with_dxsdk_include
1229 1229 enable_jtreg_failure_handler
1230 1230 enable_generate_classlist
1231 1231 with_num_cores
1232 1232 with_memory_size
1233 1233 with_jobs
1234 1234 with_test_jobs
1235 1235 with_boot_jdk_jvmargs
1236 1236 with_sjavac_server_java
1237 1237 enable_sjavac
1238 1238 enable_javac_server
1239 1239 enable_icecc
1240 1240 enable_precompiled_headers
1241 1241 enable_ccache
1242 1242 with_ccache_dir
1243 1243 '
1244 1244 ac_precious_vars='build_alias
1245 1245 host_alias
1246 1246 target_alias
1247 1247 BASENAME
1248 1248 BASH
1249 1249 CAT
1250 1250 CHMOD
1251 1251 CMP
1252 1252 COMM
1253 1253 CP
1254 1254 CUT
1255 1255 DATE
1256 1256 DIFF
1257 1257 DIRNAME
1258 1258 ECHO
1259 1259 EXPR
1260 1260 FILE
1261 1261 FIND
1262 1262 HEAD
1263 1263 GUNZIP
1264 1264 GZIP
1265 1265 LN
1266 1266 LS
1267 1267 MKDIR
1268 1268 MKTEMP
1269 1269 MV
1270 1270 NAWK
1271 1271 PRINTF
1272 1272 RM
1273 1273 RMDIR
1274 1274 SH
1275 1275 SORT
1276 1276 TAIL
1277 1277 TAR
1278 1278 TEE
1279 1279 TOUCH
1280 1280 TR
1281 1281 UNAME
1282 1282 UNIQ
1283 1283 WC
1284 1284 WHICH
1285 1285 XARGS
1286 1286 AWK
1287 1287 GREP
1288 1288 EGREP
1289 1289 FGREP
1290 1290 SED
1291 1291 CYGPATH
1292 1292 READLINK
1293 1293 DF
1294 1294 CPIO
1295 1295 NICE
1296 1296 MAKE
1297 1297 UNZIP
1298 1298 ZIP
1299 1299 LDD
1300 1300 OTOOL
1301 1301 READELF
1302 1302 HG
1303 1303 STAT
1304 1304 TIME
1305 1305 DTRACE
1306 1306 PATCH
1307 1307 DSYMUTIL
1308 1308 XATTR
1309 1309 CODESIGN
1310 1310 SETFILE
1311 1311 PKG_CONFIG
1312 1312 JAVA
1313 1313 JAVAC
1314 1314 JAVAH
1315 1315 JAR
1316 1316 JARSIGNER
1317 1317 CC
1318 1318 CFLAGS
1319 1319 LDFLAGS
1320 1320 LIBS
1321 1321 CPPFLAGS
1322 1322 CXX
1323 1323 CXXFLAGS
1324 1324 CCC
1325 1325 CPP
1326 1326 CXXCPP
1327 1327 AS
1328 1328 AR
1329 1329 LIPO
1330 1330 STRIP
1331 1331 NM
1332 1332 GNM
1333 1333 OBJCOPY
1334 1334 OBJDUMP
1335 1335 BUILD_CC
1336 1336 BUILD_CXX
1337 1337 BUILD_NM
1338 1338 BUILD_AR
1339 1339 BUILD_OBJCOPY
1340 1340 BUILD_STRIP
1341 1341 JTREGEXE
1342 1342 XMKMF
1343 1343 FREETYPE_CFLAGS
1344 1344 FREETYPE_LIBS
1345 1345 ALSA_CFLAGS
1346 1346 ALSA_LIBS
1347 1347 LIBFFI_CFLAGS
1348 1348 LIBFFI_LIBS
1349 1349 PNG_CFLAGS
1350 1350 PNG_LIBS
1351 1351 LCMS_CFLAGS
1352 1352 LCMS_LIBS
1353 1353 ICECC_CMD
1354 1354 ICECC_CREATE_ENV
1355 1355 ICECC_WRAPPER
1356 1356 CCACHE'
1357 1357
1358 1358
1359 1359 # Initialize some variables set by options.
1360 1360 ac_init_help=
1361 1361 ac_init_version=false
1362 1362 ac_unrecognized_opts=
1363 1363 ac_unrecognized_sep=
1364 1364 # The variables have the same names as the options, with
1365 1365 # dashes changed to underlines.
1366 1366 cache_file=/dev/null
1367 1367 exec_prefix=NONE
1368 1368 no_create=
1369 1369 no_recursion=
1370 1370 prefix=NONE
1371 1371 program_prefix=NONE
1372 1372 program_suffix=NONE
1373 1373 program_transform_name=s,x,x,
1374 1374 silent=
1375 1375 site=
1376 1376 srcdir=
1377 1377 verbose=
1378 1378 x_includes=NONE
1379 1379 x_libraries=NONE
1380 1380
1381 1381 # Installation directory options.
1382 1382 # These are left unexpanded so users can "make install exec_prefix=/foo"
1383 1383 # and all the variables that are supposed to be based on exec_prefix
1384 1384 # by default will actually change.
1385 1385 # Use braces instead of parens because sh, perl, etc. also accept them.
1386 1386 # (The list follows the same order as the GNU Coding Standards.)
1387 1387 bindir='${exec_prefix}/bin'
1388 1388 sbindir='${exec_prefix}/sbin'
1389 1389 libexecdir='${exec_prefix}/libexec'
1390 1390 datarootdir='${prefix}/share'
1391 1391 datadir='${datarootdir}'
1392 1392 sysconfdir='${prefix}/etc'
1393 1393 sharedstatedir='${prefix}/com'
1394 1394 localstatedir='${prefix}/var'
1395 1395 includedir='${prefix}/include'
1396 1396 oldincludedir='/usr/include'
1397 1397 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398 1398 infodir='${datarootdir}/info'
1399 1399 htmldir='${docdir}'
1400 1400 dvidir='${docdir}'
1401 1401 pdfdir='${docdir}'
1402 1402 psdir='${docdir}'
1403 1403 libdir='${exec_prefix}/lib'
1404 1404 localedir='${datarootdir}/locale'
1405 1405 mandir='${datarootdir}/man'
1406 1406
1407 1407 ac_prev=
1408 1408 ac_dashdash=
1409 1409 for ac_option
1410 1410 do
1411 1411 # If the previous option needs an argument, assign it.
1412 1412 if test -n "$ac_prev"; then
1413 1413 eval $ac_prev=\$ac_option
1414 1414 ac_prev=
1415 1415 continue
1416 1416 fi
1417 1417
1418 1418 case $ac_option in
1419 1419 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420 1420 *=) ac_optarg= ;;
1421 1421 *) ac_optarg=yes ;;
1422 1422 esac
1423 1423
1424 1424 # Accept the important Cygnus configure options, so we can diagnose typos.
1425 1425
1426 1426 case $ac_dashdash$ac_option in
1427 1427 --)
1428 1428 ac_dashdash=yes ;;
1429 1429
1430 1430 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431 1431 ac_prev=bindir ;;
1432 1432 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433 1433 bindir=$ac_optarg ;;
1434 1434
1435 1435 -build | --build | --buil | --bui | --bu)
1436 1436 ac_prev=build_alias ;;
1437 1437 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438 1438 build_alias=$ac_optarg ;;
1439 1439
1440 1440 -cache-file | --cache-file | --cache-fil | --cache-fi \
1441 1441 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442 1442 ac_prev=cache_file ;;
1443 1443 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444 1444 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445 1445 cache_file=$ac_optarg ;;
1446 1446
1447 1447 --config-cache | -C)
1448 1448 cache_file=config.cache ;;
1449 1449
1450 1450 -datadir | --datadir | --datadi | --datad)
1451 1451 ac_prev=datadir ;;
1452 1452 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453 1453 datadir=$ac_optarg ;;
1454 1454
1455 1455 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456 1456 | --dataroo | --dataro | --datar)
1457 1457 ac_prev=datarootdir ;;
1458 1458 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459 1459 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460 1460 datarootdir=$ac_optarg ;;
1461 1461
1462 1462 -disable-* | --disable-*)
1463 1463 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464 1464 # Reject names that are not valid shell variable names.
1465 1465 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466 1466 as_fn_error $? "invalid feature name: $ac_useropt"
1467 1467 ac_useropt_orig=$ac_useropt
1468 1468 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469 1469 case $ac_user_opts in
1470 1470 *"
1471 1471 "enable_$ac_useropt"
1472 1472 "*) ;;
1473 1473 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474 1474 ac_unrecognized_sep=', ';;
1475 1475 esac
1476 1476 eval enable_$ac_useropt=no ;;
1477 1477
1478 1478 -docdir | --docdir | --docdi | --doc | --do)
1479 1479 ac_prev=docdir ;;
1480 1480 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481 1481 docdir=$ac_optarg ;;
1482 1482
1483 1483 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484 1484 ac_prev=dvidir ;;
1485 1485 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486 1486 dvidir=$ac_optarg ;;
1487 1487
1488 1488 -enable-* | --enable-*)
1489 1489 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490 1490 # Reject names that are not valid shell variable names.
1491 1491 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492 1492 as_fn_error $? "invalid feature name: $ac_useropt"
1493 1493 ac_useropt_orig=$ac_useropt
1494 1494 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495 1495 case $ac_user_opts in
1496 1496 *"
1497 1497 "enable_$ac_useropt"
1498 1498 "*) ;;
1499 1499 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500 1500 ac_unrecognized_sep=', ';;
1501 1501 esac
1502 1502 eval enable_$ac_useropt=\$ac_optarg ;;
1503 1503
1504 1504 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505 1505 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506 1506 | --exec | --exe | --ex)
1507 1507 ac_prev=exec_prefix ;;
1508 1508 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509 1509 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510 1510 | --exec=* | --exe=* | --ex=*)
1511 1511 exec_prefix=$ac_optarg ;;
1512 1512
1513 1513 -gas | --gas | --ga | --g)
1514 1514 # Obsolete; use --with-gas.
1515 1515 with_gas=yes ;;
1516 1516
1517 1517 -help | --help | --hel | --he | -h)
1518 1518 ac_init_help=long ;;
1519 1519 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520 1520 ac_init_help=recursive ;;
1521 1521 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522 1522 ac_init_help=short ;;
1523 1523
1524 1524 -host | --host | --hos | --ho)
1525 1525 ac_prev=host_alias ;;
1526 1526 -host=* | --host=* | --hos=* | --ho=*)
1527 1527 host_alias=$ac_optarg ;;
1528 1528
1529 1529 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530 1530 ac_prev=htmldir ;;
1531 1531 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532 1532 | --ht=*)
1533 1533 htmldir=$ac_optarg ;;
1534 1534
1535 1535 -includedir | --includedir | --includedi | --included | --include \
1536 1536 | --includ | --inclu | --incl | --inc)
1537 1537 ac_prev=includedir ;;
1538 1538 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539 1539 | --includ=* | --inclu=* | --incl=* | --inc=*)
1540 1540 includedir=$ac_optarg ;;
1541 1541
1542 1542 -infodir | --infodir | --infodi | --infod | --info | --inf)
1543 1543 ac_prev=infodir ;;
1544 1544 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545 1545 infodir=$ac_optarg ;;
1546 1546
1547 1547 -libdir | --libdir | --libdi | --libd)
1548 1548 ac_prev=libdir ;;
1549 1549 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550 1550 libdir=$ac_optarg ;;
1551 1551
1552 1552 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553 1553 | --libexe | --libex | --libe)
1554 1554 ac_prev=libexecdir ;;
1555 1555 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556 1556 | --libexe=* | --libex=* | --libe=*)
1557 1557 libexecdir=$ac_optarg ;;
1558 1558
1559 1559 -localedir | --localedir | --localedi | --localed | --locale)
1560 1560 ac_prev=localedir ;;
1561 1561 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562 1562 localedir=$ac_optarg ;;
1563 1563
1564 1564 -localstatedir | --localstatedir | --localstatedi | --localstated \
1565 1565 | --localstate | --localstat | --localsta | --localst | --locals)
1566 1566 ac_prev=localstatedir ;;
1567 1567 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568 1568 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569 1569 localstatedir=$ac_optarg ;;
1570 1570
1571 1571 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572 1572 ac_prev=mandir ;;
1573 1573 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574 1574 mandir=$ac_optarg ;;
1575 1575
1576 1576 -nfp | --nfp | --nf)
1577 1577 # Obsolete; use --without-fp.
1578 1578 with_fp=no ;;
1579 1579
1580 1580 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581 1581 | --no-cr | --no-c | -n)
1582 1582 no_create=yes ;;
1583 1583
1584 1584 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585 1585 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586 1586 no_recursion=yes ;;
1587 1587
1588 1588 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589 1589 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590 1590 | --oldin | --oldi | --old | --ol | --o)
1591 1591 ac_prev=oldincludedir ;;
1592 1592 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593 1593 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594 1594 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595 1595 oldincludedir=$ac_optarg ;;
1596 1596
1597 1597 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598 1598 ac_prev=prefix ;;
1599 1599 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600 1600 prefix=$ac_optarg ;;
1601 1601
1602 1602 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603 1603 | --program-pre | --program-pr | --program-p)
1604 1604 ac_prev=program_prefix ;;
1605 1605 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606 1606 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607 1607 program_prefix=$ac_optarg ;;
1608 1608
1609 1609 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610 1610 | --program-suf | --program-su | --program-s)
1611 1611 ac_prev=program_suffix ;;
1612 1612 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613 1613 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614 1614 program_suffix=$ac_optarg ;;
1615 1615
1616 1616 -program-transform-name | --program-transform-name \
1617 1617 | --program-transform-nam | --program-transform-na \
1618 1618 | --program-transform-n | --program-transform- \
1619 1619 | --program-transform | --program-transfor \
1620 1620 | --program-transfo | --program-transf \
1621 1621 | --program-trans | --program-tran \
1622 1622 | --progr-tra | --program-tr | --program-t)
1623 1623 ac_prev=program_transform_name ;;
1624 1624 -program-transform-name=* | --program-transform-name=* \
1625 1625 | --program-transform-nam=* | --program-transform-na=* \
1626 1626 | --program-transform-n=* | --program-transform-=* \
1627 1627 | --program-transform=* | --program-transfor=* \
1628 1628 | --program-transfo=* | --program-transf=* \
1629 1629 | --program-trans=* | --program-tran=* \
1630 1630 | --progr-tra=* | --program-tr=* | --program-t=*)
1631 1631 program_transform_name=$ac_optarg ;;
1632 1632
1633 1633 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634 1634 ac_prev=pdfdir ;;
1635 1635 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636 1636 pdfdir=$ac_optarg ;;
1637 1637
1638 1638 -psdir | --psdir | --psdi | --psd | --ps)
1639 1639 ac_prev=psdir ;;
1640 1640 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641 1641 psdir=$ac_optarg ;;
1642 1642
1643 1643 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644 1644 | -silent | --silent | --silen | --sile | --sil)
1645 1645 silent=yes ;;
1646 1646
1647 1647 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648 1648 ac_prev=sbindir ;;
1649 1649 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650 1650 | --sbi=* | --sb=*)
1651 1651 sbindir=$ac_optarg ;;
1652 1652
1653 1653 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654 1654 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655 1655 | --sharedst | --shareds | --shared | --share | --shar \
1656 1656 | --sha | --sh)
1657 1657 ac_prev=sharedstatedir ;;
1658 1658 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659 1659 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660 1660 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661 1661 | --sha=* | --sh=*)
1662 1662 sharedstatedir=$ac_optarg ;;
1663 1663
1664 1664 -site | --site | --sit)
1665 1665 ac_prev=site ;;
1666 1666 -site=* | --site=* | --sit=*)
1667 1667 site=$ac_optarg ;;
1668 1668
1669 1669 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670 1670 ac_prev=srcdir ;;
1671 1671 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672 1672 srcdir=$ac_optarg ;;
1673 1673
1674 1674 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675 1675 | --syscon | --sysco | --sysc | --sys | --sy)
1676 1676 ac_prev=sysconfdir ;;
1677 1677 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678 1678 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679 1679 sysconfdir=$ac_optarg ;;
1680 1680
1681 1681 -target | --target | --targe | --targ | --tar | --ta | --t)
1682 1682 ac_prev=target_alias ;;
1683 1683 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684 1684 target_alias=$ac_optarg ;;
1685 1685
1686 1686 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687 1687 verbose=yes ;;
1688 1688
1689 1689 -version | --version | --versio | --versi | --vers | -V)
1690 1690 ac_init_version=: ;;
1691 1691
1692 1692 -with-* | --with-*)
1693 1693 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694 1694 # Reject names that are not valid shell variable names.
1695 1695 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696 1696 as_fn_error $? "invalid package name: $ac_useropt"
1697 1697 ac_useropt_orig=$ac_useropt
1698 1698 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699 1699 case $ac_user_opts in
1700 1700 *"
1701 1701 "with_$ac_useropt"
1702 1702 "*) ;;
1703 1703 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704 1704 ac_unrecognized_sep=', ';;
1705 1705 esac
1706 1706 eval with_$ac_useropt=\$ac_optarg ;;
1707 1707
1708 1708 -without-* | --without-*)
1709 1709 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710 1710 # Reject names that are not valid shell variable names.
1711 1711 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712 1712 as_fn_error $? "invalid package name: $ac_useropt"
1713 1713 ac_useropt_orig=$ac_useropt
1714 1714 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715 1715 case $ac_user_opts in
1716 1716 *"
1717 1717 "with_$ac_useropt"
1718 1718 "*) ;;
1719 1719 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720 1720 ac_unrecognized_sep=', ';;
1721 1721 esac
1722 1722 eval with_$ac_useropt=no ;;
1723 1723
1724 1724 --x)
1725 1725 # Obsolete; use --with-x.
1726 1726 with_x=yes ;;
1727 1727
1728 1728 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729 1729 | --x-incl | --x-inc | --x-in | --x-i)
1730 1730 ac_prev=x_includes ;;
1731 1731 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732 1732 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733 1733 x_includes=$ac_optarg ;;
1734 1734
1735 1735 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736 1736 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737 1737 ac_prev=x_libraries ;;
1738 1738 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739 1739 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740 1740 x_libraries=$ac_optarg ;;
1741 1741
1742 1742 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743 1743 Try \`$0 --help' for more information"
1744 1744 ;;
1745 1745
1746 1746 *=*)
1747 1747 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748 1748 # Reject names that are not valid shell variable names.
1749 1749 case $ac_envvar in #(
1750 1750 '' | [0-9]* | *[!_$as_cr_alnum]* )
1751 1751 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752 1752 esac
1753 1753 eval $ac_envvar=\$ac_optarg
1754 1754 export $ac_envvar ;;
1755 1755
1756 1756 *)
1757 1757 # FIXME: should be removed in autoconf 3.0.
1758 1758 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759 1759 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760 1760 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761 1761 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762 1762 ;;
1763 1763
1764 1764 esac
1765 1765 done
1766 1766
1767 1767 if test -n "$ac_prev"; then
1768 1768 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769 1769 as_fn_error $? "missing argument to $ac_option"
1770 1770 fi
1771 1771
1772 1772 if test -n "$ac_unrecognized_opts"; then
1773 1773 case $enable_option_checking in
1774 1774 no) ;;
1775 1775 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776 1776 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777 1777 esac
1778 1778 fi
1779 1779
1780 1780 # Check all directory arguments for consistency.
1781 1781 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782 1782 datadir sysconfdir sharedstatedir localstatedir includedir \
1783 1783 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784 1784 libdir localedir mandir
1785 1785 do
1786 1786 eval ac_val=\$$ac_var
1787 1787 # Remove trailing slashes.
1788 1788 case $ac_val in
1789 1789 */ )
1790 1790 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791 1791 eval $ac_var=\$ac_val;;
1792 1792 esac
1793 1793 # Be sure to have absolute directory names.
1794 1794 case $ac_val in
1795 1795 [\\/$]* | ?:[\\/]* ) continue;;
1796 1796 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797 1797 esac
1798 1798 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799 1799 done
1800 1800
1801 1801 # There might be people who depend on the old broken behavior: `$host'
1802 1802 # used to hold the argument of --host etc.
1803 1803 # FIXME: To remove some day.
1804 1804 build=$build_alias
1805 1805 host=$host_alias
1806 1806 target=$target_alias
1807 1807
1808 1808 # FIXME: To remove some day.
1809 1809 if test "x$host_alias" != x; then
1810 1810 if test "x$build_alias" = x; then
1811 1811 cross_compiling=maybe
1812 1812 elif test "x$build_alias" != "x$host_alias"; then
1813 1813 cross_compiling=yes
1814 1814 fi
1815 1815 fi
1816 1816
1817 1817 ac_tool_prefix=
1818 1818 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819 1819
1820 1820 test "$silent" = yes && exec 6>/dev/null
1821 1821
1822 1822
1823 1823 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824 1824 ac_ls_di=`ls -di .` &&
1825 1825 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826 1826 as_fn_error $? "working directory cannot be determined"
1827 1827 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828 1828 as_fn_error $? "pwd does not report name of working directory"
1829 1829
1830 1830
1831 1831 # Find the source files, if location was not specified.
1832 1832 if test -z "$srcdir"; then
1833 1833 ac_srcdir_defaulted=yes
1834 1834 # Try the directory containing this script, then the parent directory.
1835 1835 ac_confdir=`$as_dirname -- "$as_myself" ||
1836 1836 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837 1837 X"$as_myself" : 'X\(//\)[^/]' \| \
1838 1838 X"$as_myself" : 'X\(//\)$' \| \
1839 1839 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840 1840 $as_echo X"$as_myself" |
1841 1841 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842 1842 s//\1/
1843 1843 q
1844 1844 }
1845 1845 /^X\(\/\/\)[^/].*/{
1846 1846 s//\1/
1847 1847 q
1848 1848 }
1849 1849 /^X\(\/\/\)$/{
1850 1850 s//\1/
1851 1851 q
1852 1852 }
1853 1853 /^X\(\/\).*/{
1854 1854 s//\1/
1855 1855 q
1856 1856 }
1857 1857 s/.*/./; q'`
1858 1858 srcdir=$ac_confdir
1859 1859 if test ! -r "$srcdir/$ac_unique_file"; then
1860 1860 srcdir=..
1861 1861 fi
1862 1862 else
1863 1863 ac_srcdir_defaulted=no
1864 1864 fi
1865 1865 if test ! -r "$srcdir/$ac_unique_file"; then
1866 1866 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867 1867 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868 1868 fi
1869 1869 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870 1870 ac_abs_confdir=`(
1871 1871 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872 1872 pwd)`
1873 1873 # When building in place, set srcdir=.
1874 1874 if test "$ac_abs_confdir" = "$ac_pwd"; then
1875 1875 srcdir=.
1876 1876 fi
1877 1877 # Remove unnecessary trailing slashes from srcdir.
1878 1878 # Double slashes in file names in object file debugging info
1879 1879 # mess up M-x gdb in Emacs.
1880 1880 case $srcdir in
1881 1881 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882 1882 esac
1883 1883 for ac_var in $ac_precious_vars; do
1884 1884 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885 1885 eval ac_env_${ac_var}_value=\$${ac_var}
1886 1886 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887 1887 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888 1888 done
1889 1889
1890 1890 #
1891 1891 # Report the --help message.
1892 1892 #
1893 1893 if test "$ac_init_help" = "long"; then
1894 1894 # Omit some internal or obsolete options to make the list less imposing.
1895 1895 # This message is too long to be a string in the A/UX 3.1 sh.
1896 1896 cat <<_ACEOF
1897 1897 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898 1898
1899 1899 Usage: $0 [OPTION]... [VAR=VALUE]...
1900 1900
1901 1901 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902 1902 VAR=VALUE. See below for descriptions of some of the useful variables.
1903 1903
1904 1904 Defaults for the options are specified in brackets.
1905 1905
1906 1906 Configuration:
1907 1907 -h, --help display this help and exit
1908 1908 --help=short display options specific to this package
1909 1909 --help=recursive display the short help of all the included packages
1910 1910 -V, --version display version information and exit
1911 1911 -q, --quiet, --silent do not print \`checking ...' messages
1912 1912 --cache-file=FILE cache test results in FILE [disabled]
1913 1913 -C, --config-cache alias for \`--cache-file=config.cache'
1914 1914 -n, --no-create do not create output files
1915 1915 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1916 1916
1917 1917 Installation directories:
1918 1918 --prefix=PREFIX install architecture-independent files in PREFIX
1919 1919 [$ac_default_prefix]
1920 1920 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1921 1921 [PREFIX]
1922 1922
1923 1923 By default, \`make install' will install all the files in
1924 1924 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1925 1925 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926 1926 for instance \`--prefix=\$HOME'.
1927 1927
1928 1928 For better control, use the options below.
1929 1929
1930 1930 Fine tuning of the installation directories:
1931 1931 --bindir=DIR user executables [EPREFIX/bin]
1932 1932 --sbindir=DIR system admin executables [EPREFIX/sbin]
1933 1933 --libexecdir=DIR program executables [EPREFIX/libexec]
1934 1934 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1935 1935 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1936 1936 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1937 1937 --libdir=DIR object code libraries [EPREFIX/lib]
1938 1938 --includedir=DIR C header files [PREFIX/include]
1939 1939 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1940 1940 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1941 1941 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1942 1942 --infodir=DIR info documentation [DATAROOTDIR/info]
1943 1943 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1944 1944 --mandir=DIR man documentation [DATAROOTDIR/man]
1945 1945 --docdir=DIR documentation root [DATAROOTDIR/doc/openjdk]
1946 1946 --htmldir=DIR html documentation [DOCDIR]
1947 1947 --dvidir=DIR dvi documentation [DOCDIR]
1948 1948 --pdfdir=DIR pdf documentation [DOCDIR]
1949 1949 --psdir=DIR ps documentation [DOCDIR]
1950 1950 _ACEOF
1951 1951
1952 1952 cat <<\_ACEOF
1953 1953
1954 1954 X features:
1955 1955 --x-includes=DIR X include files are in DIR
1956 1956 --x-libraries=DIR X library files are in DIR
1957 1957
1958 1958 System types:
1959 1959 --build=BUILD configure for building on BUILD [guessed]
1960 1960 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1961 1961 --target=TARGET configure for building compilers for TARGET [HOST]
1962 1962 _ACEOF
1963 1963 fi
1964 1964
1965 1965 if test -n "$ac_init_help"; then
1966 1966 case $ac_init_help in
1967 1967 short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968 1968 esac
1969 1969 cat <<\_ACEOF
1970 1970
1971 1971 Optional Features:
1972 1972 --disable-option-checking ignore unrecognized --enable/--with options
1973 1973 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1974 1974 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1975 1975 --enable-openjdk-only suppress building custom source even if present
1976 1976 [disabled]
1977 1977 --enable-debug set the debug level to fastdebug (shorthand for
1978 1978 --with-debug-level=fastdebug) [disabled]
1979 1979 --disable-headful disable building headful support (graphical UI
1980 1980 support) [enabled]
1981 1981 --enable-unlimited-crypto
1982 1982 Enable unlimited crypto policy [disabled]
1983 1983 --disable-keep-packaged-modules
1984 1984 Do not keep packaged modules in jdk image [enable]
1985 1985 --enable-static-build enable static library build [disabled]
1986 1986 --disable-warnings-as-errors
1987 1987 do not consider native warnings to be an error
1988 1988 [enabled]
1989 1989 --enable-debug-symbols Deprecated. Option is kept for backwards
1990 1990 compatibility and is ignored
1991 1991 --enable-zip-debug-info Deprecated. Option is kept for backwards
1992 1992 compatibility and is ignored
1993 1993 --enable-native-coverage
1994 1994 enable native compilation with code coverage
1995 1995 data[disabled]
1996 1996 --enable-dtrace[=yes/no/auto]
1997 1997 enable dtrace. Default is auto, where dtrace is
1998 1998 enabled if all dependencies are present.
1999 1999 --disable-hotspot-gtest Disables building of the Hotspot unit tests
2000 2000 --disable-freetype-bundling
2001 2001 disable bundling of the freetype library with the
2002 2002 build result [enabled on Windows or when using
2003 2003 --with-freetype, disabled otherwise]
2004 2004 --enable-jtreg-failure-handler
2005 2005 forces build of the jtreg failure handler to be
2006 2006 enabled, missing dependencies become fatal errors.
2007 2007 Default is auto, where the failure handler is built
2008 2008 if all dependencies are present and otherwise just
2009 2009 disabled.
2010 2010 --disable-generate-classlist
2011 2011 forces enabling or disabling of the generation of a
2012 2012 CDS classlist at build time. Default is to generate
2013 2013 it when either the server or client JVMs are built.
2014 2014 --enable-sjavac use sjavac to do fast incremental compiles
2015 2015 [disabled]
2016 2016 --disable-javac-server disable javac server [enabled]
2017 2017 --enable-icecc enable distribted compilation of native code using
2018 2018 icecc/icecream [disabled]
2019 2019 --disable-precompiled-headers
2020 2020 disable using precompiled headers when compiling C++
2021 2021 [enabled]
2022 2022 --enable-ccache enable using ccache to speed up recompilations
2023 2023 [disabled]
2024 2024
2025 2025 Optional Packages:
2026 2026 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2027 2027 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2028 2028 --with-target-bits build 32-bit or 64-bit binaries (for platforms that
2029 2029 support it), e.g. --with-target-bits=32 [guessed]
2030 2030 --with-custom-make-dir Deprecated. Option is kept for backwards
2031 2031 compatibility and is ignored
2032 2032 --with-jdk-variant JDK variant to build (normal) [normal]
2033 2033 --with-debug-level set the debug level (release, fastdebug, slowdebug,
2034 2034 optimized) [release]
2035 2035 --with-jvm-variants JVM variants (separated by commas) to build
2036 2036 (server,client,minimal,core,zero,zeroshark,custom)
2037 2037 [server]
2038 2038 --with-devkit use this devkit for compilers, tools and resources
2039 2039 --with-sys-root alias for --with-sysroot for backwards compatability
2040 2040 --with-sysroot use this directory as sysroot
2041 2041 --with-tools-dir alias for --with-toolchain-path for backwards
2042 2042 compatibility
2043 2043 --with-toolchain-path prepend these directories when searching for
2044 2044 toolchain binaries (compilers etc)
2045 2045 --with-extra-path prepend these directories to the default path
2046 2046 --with-sdk-name use the platform SDK of the given name. [macosx]
2047 2047 --with-conf-name use this as the name of the configuration [generated
2048 2048 from important configuration options]
2049 2049 --with-output-sync set make output sync type if supported by make.
2050 2050 [recurse]
2051 2051 --with-default-make-target
2052 2052 set the default make target [exploded-image]
2053 2053 --with-cacerts-file specify alternative cacerts file
2054 2054 --with-copyright-year Set copyright year value for build [current year]
2055 2055 --with-milestone Deprecated. Option is kept for backwards
2056 2056 compatibility and is ignored
2057 2057 --with-update-version Deprecated. Option is kept for backwards
2058 2058 compatibility and is ignored
2059 2059 --with-user-release-suffix
2060 2060 Deprecated. Option is kept for backwards
2061 2061 compatibility and is ignored
2062 2062 --with-build-number Deprecated. Option is kept for backwards
2063 2063 compatibility and is ignored
2064 2064 --with-version-string Set version string [calculated]
2065 2065 --with-version-pre Set the base part of the version 'PRE' field
2066 2066 (pre-release identifier) ['internal']
2067 2067 --with-version-opt Set version 'OPT' field (build metadata)
2068 2068 [<timestamp>.<user>.<dirname>]
2069 2069 --with-version-build Set version 'BUILD' field (build number) [not
2070 2070 specified]
2071 2071 --with-version-major Set version 'MAJOR' field (first number) [current
2072 2072 source value]
2073 2073 --with-version-minor Set version 'MINOR' field (second number) [current
2074 2074 source value]
2075 2075 --with-version-security Set version 'SECURITY' field (third number) [current
2076 2076 source value]
2077 2077 --with-version-patch Set version 'PATCH' field (fourth number) [not
2078 2078 specified]
2079 2079 --with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
2080 2080 --with-build-jdk path to JDK of same version as is being built[the
2081 2081 newly built JDK]
2082 2082 --with-add-source-root Deprecated. Option is kept for backwards
2083 2083 compatibility and is ignored
2084 2084 --with-override-source-root
2085 2085 Deprecated. Option is kept for backwards
2086 2086 compatibility and is ignored
2087 2087 --with-adds-and-overrides
2088 2088 Deprecated. Option is kept for backwards
2089 2089 compatibility and is ignored
2090 2090 --with-override-langtools
2091 2091 Deprecated. Option is kept for backwards
2092 2092 compatibility and is ignored
2093 2093 --with-override-corba Deprecated. Option is kept for backwards
2094 2094 compatibility and is ignored
2095 2095 --with-override-jaxp Deprecated. Option is kept for backwards
2096 2096 compatibility and is ignored
2097 2097 --with-override-jaxws Deprecated. Option is kept for backwards
2098 2098 compatibility and is ignored
2099 2099 --with-override-hotspot Deprecated. Option is kept for backwards
2100 2100 compatibility and is ignored
2101 2101 --with-override-nashorn Deprecated. Option is kept for backwards
2102 2102 compatibility and is ignored
2103 2103 --with-override-jdk Deprecated. Option is kept for backwards
2104 2104 compatibility and is ignored
2105 2105 --with-import-hotspot import hotspot binaries from this jdk image or
2106 2106 hotspot build dist dir instead of building from
2107 2107 source
2108 2108 --with-import-modules import a set of prebuilt modules either as a zip
2109 2109 file or an exploded directory
2110 2110 --with-toolchain-type the toolchain type (or family) to use, use '--help'
2111 2111 to show possible values [platform dependent]
2112 2112 --with-extra-cflags extra flags to be used when compiling jdk c-files
2113 2113 --with-extra-cxxflags extra flags to be used when compiling jdk c++-files
2114 2114 --with-extra-ldflags extra flags to be used when linking jdk
2115 2115 --with-toolchain-version
2116 2116 the version of the toolchain to look for, use
2117 2117 '--help' to show possible values [platform
2118 2118 dependent]
2119 2119 --with-build-devkit Devkit to use for the build platform toolchain
2120 2120 --with-jtreg Regression Test Harness [probed]
2121 2121 --with-native-debug-symbols
2122 2122 set the native debug symbol configuration (none,
2123 2123 internal, external, zipped) [varying]
2124 2124 --with-jvm-features additional JVM features to enable (separated by
2125 2125 comma), use '--help' to show possible values [none]
2126 2126 --with-jvm-interpreter Deprecated. Option is kept for backwards
2127 2127 compatibility and is ignored
2128 2128 --with-stdc++lib=<static>,<dynamic>,<default>
2129 2129 force linking of the C++ runtime on Linux to either
2130 2130 static or dynamic, default is static with dynamic as
2131 2131 fallback
2132 2132 --with-msvcr-dll path to microsoft C runtime dll (msvcr*.dll)
2133 2133 (Windows only) [probed]
2134 2134 --with-msvcp-dll path to microsoft C++ runtime dll (msvcp*.dll)
2135 2135 (Windows only) [probed]
2136 2136 --with-x use the X Window System
2137 2137 --with-cups specify prefix directory for the cups package
2138 2138 (expecting the headers under PATH/include)
2139 2139 --with-cups-include specify directory for the cups include files
2140 2140 --with-freetype specify prefix directory for the freetype package
2141 2141 (expecting the libraries under PATH/lib and the
2142 2142 headers under PATH/include)
2143 2143 --with-freetype-include specify directory for the freetype include files
2144 2144 --with-freetype-lib specify directory for the freetype library
2145 2145 --with-freetype-src specify directory with freetype sources to
2146 2146 automatically build the library (experimental,
2147 2147 Windows-only)
2148 2148 --with-alsa specify prefix directory for the alsa package
2149 2149 (expecting the libraries under PATH/lib and the
2150 2150 headers under PATH/include)
2151 2151 --with-alsa-include specify directory for the alsa include files
2152 2152 --with-alsa-lib specify directory for the alsa library
2153 2153 --with-libffi specify prefix directory for the libffi package
2154 2154 (expecting the libraries under PATH/lib and the
2155 2155 headers under PATH/include)
2156 2156 --with-libffi-include specify directory for the libffi include files
2157 2157 --with-libffi-lib specify directory for the libffi library
2158 2158 --with-libjpeg use libjpeg from build system or OpenJDK source
2159 2159 (system, bundled) [bundled]
2160 2160 --with-giflib use giflib from build system or OpenJDK source
2161 2161 (system, bundled) [bundled]
2162 2162 --with-libpng use libpng from build system or OpenJDK source
2163 2163 (system, bundled) [bundled]
2164 2164 --with-zlib use zlib from build system or OpenJDK source
2165 2165 (system, bundled) [bundled]
2166 2166 --with-lcms use lcms2 from build system or OpenJDK source
2167 2167 (system, bundled) [bundled]
2168 2168 --with-dxsdk Deprecated. Option is kept for backwards
2169 2169 compatibility and is ignored
2170 2170 --with-dxsdk-lib Deprecated. Option is kept for backwards
2171 2171 compatibility and is ignored
2172 2172 --with-dxsdk-include Deprecated. Option is kept for backwards
2173 2173 compatibility and is ignored
2174 2174 --with-num-cores number of cores in the build system, e.g.
2175 2175 --with-num-cores=8 [probed]
2176 2176 --with-memory-size memory (in MB) available in the build system, e.g.
2177 2177 --with-memory-size=1024 [probed]
2178 2178 --with-jobs number of parallel jobs to let make run [calculated
2179 2179 based on cores and memory]
2180 2180 --with-test-jobs number of parallel tests jobs to run [based on build
2181 2181 jobs]
2182 2182 --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2183 2183 invocations of boot JDK, overriding the default
2184 2184 values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2185 2185 -enableassertions"
2186 2186 --with-sjavac-server-java
2187 2187 use this java binary for running the sjavac
2188 2188 background server [Boot JDK java]
2189 2189 --with-ccache-dir where to store ccache files [~/.ccache]
2190 2190
2191 2191 Some influential environment variables:
2192 2192 BASENAME Override default value for BASENAME
2193 2193 BASH Override default value for BASH
2194 2194 CAT Override default value for CAT
2195 2195 CHMOD Override default value for CHMOD
2196 2196 CMP Override default value for CMP
2197 2197 COMM Override default value for COMM
2198 2198 CP Override default value for CP
2199 2199 CUT Override default value for CUT
2200 2200 DATE Override default value for DATE
2201 2201 DIFF Override default value for DIFF
2202 2202 DIRNAME Override default value for DIRNAME
2203 2203 ECHO Override default value for ECHO
2204 2204 EXPR Override default value for EXPR
2205 2205 FILE Override default value for FILE
2206 2206 FIND Override default value for FIND
2207 2207 HEAD Override default value for HEAD
2208 2208 GUNZIP Override default value for GUNZIP
2209 2209 GZIP Override default value for GZIP
2210 2210 LN Override default value for LN
2211 2211 LS Override default value for LS
2212 2212 MKDIR Override default value for MKDIR
2213 2213 MKTEMP Override default value for MKTEMP
2214 2214 MV Override default value for MV
2215 2215 NAWK Override default value for NAWK
2216 2216 PRINTF Override default value for PRINTF
2217 2217 RM Override default value for RM
2218 2218 RMDIR Override default value for RMDIR
2219 2219 SH Override default value for SH
2220 2220 SORT Override default value for SORT
2221 2221 TAIL Override default value for TAIL
2222 2222 TAR Override default value for TAR
2223 2223 TEE Override default value for TEE
2224 2224 TOUCH Override default value for TOUCH
2225 2225 TR Override default value for TR
2226 2226 UNAME Override default value for UNAME
2227 2227 UNIQ Override default value for UNIQ
2228 2228 WC Override default value for WC
2229 2229 WHICH Override default value for WHICH
2230 2230 XARGS Override default value for XARGS
2231 2231 AWK Override default value for AWK
2232 2232 GREP Override default value for GREP
2233 2233 EGREP Override default value for EGREP
2234 2234 FGREP Override default value for FGREP
2235 2235 SED Override default value for SED
2236 2236 CYGPATH Override default value for CYGPATH
2237 2237 READLINK Override default value for READLINK
2238 2238 DF Override default value for DF
2239 2239 CPIO Override default value for CPIO
2240 2240 NICE Override default value for NICE
2241 2241 MAKE Override default value for MAKE
2242 2242 UNZIP Override default value for UNZIP
2243 2243 ZIP Override default value for ZIP
2244 2244 LDD Override default value for LDD
2245 2245 OTOOL Override default value for OTOOL
2246 2246 READELF Override default value for READELF
2247 2247 HG Override default value for HG
2248 2248 STAT Override default value for STAT
2249 2249 TIME Override default value for TIME
2250 2250 DTRACE Override default value for DTRACE
2251 2251 PATCH Override default value for PATCH
2252 2252 DSYMUTIL Override default value for DSYMUTIL
2253 2253 XATTR Override default value for XATTR
2254 2254 CODESIGN Override default value for CODESIGN
2255 2255 SETFILE Override default value for SETFILE
2256 2256 PKG_CONFIG path to pkg-config utility
2257 2257 JAVA Override default value for JAVA
2258 2258 JAVAC Override default value for JAVAC
2259 2259 JAVAH Override default value for JAVAH
2260 2260 JAR Override default value for JAR
2261 2261 JARSIGNER Override default value for JARSIGNER
2262 2262 CC C compiler command
2263 2263 CFLAGS C compiler flags
2264 2264 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2265 2265 nonstandard directory <lib dir>
2266 2266 LIBS libraries to pass to the linker, e.g. -l<library>
2267 2267 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2268 2268 you have headers in a nonstandard directory <include dir>
2269 2269 CXX C++ compiler command
2270 2270 CXXFLAGS C++ compiler flags
2271 2271 CPP C preprocessor
2272 2272 CXXCPP C++ preprocessor
2273 2273 AS Override default value for AS
2274 2274 AR Override default value for AR
2275 2275 LIPO Override default value for LIPO
2276 2276 STRIP Override default value for STRIP
2277 2277 NM Override default value for NM
2278 2278 GNM Override default value for GNM
2279 2279 OBJCOPY Override default value for OBJCOPY
2280 2280 OBJDUMP Override default value for OBJDUMP
2281 2281 BUILD_CC Override default value for BUILD_CC
2282 2282 BUILD_CXX Override default value for BUILD_CXX
2283 2283 BUILD_NM Override default value for BUILD_NM
2284 2284 BUILD_AR Override default value for BUILD_AR
2285 2285 BUILD_OBJCOPY
2286 2286 Override default value for BUILD_OBJCOPY
2287 2287 BUILD_STRIP Override default value for BUILD_STRIP
2288 2288 JTREGEXE Override default value for JTREGEXE
2289 2289 XMKMF Path to xmkmf, Makefile generator for X Window System
2290 2290 FREETYPE_CFLAGS
2291 2291 C compiler flags for FREETYPE, overriding pkg-config
2292 2292 FREETYPE_LIBS
2293 2293 linker flags for FREETYPE, overriding pkg-config
2294 2294 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2295 2295 ALSA_LIBS linker flags for ALSA, overriding pkg-config
2296 2296 LIBFFI_CFLAGS
2297 2297 C compiler flags for LIBFFI, overriding pkg-config
2298 2298 LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2299 2299 PNG_CFLAGS C compiler flags for PNG, overriding pkg-config
2300 2300 PNG_LIBS linker flags for PNG, overriding pkg-config
2301 2301 LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2302 2302 LCMS_LIBS linker flags for LCMS, overriding pkg-config
2303 2303 ICECC_CMD Override default value for ICECC_CMD
2304 2304 ICECC_CREATE_ENV
2305 2305 Override default value for ICECC_CREATE_ENV
2306 2306 ICECC_WRAPPER
2307 2307 Override default value for ICECC_WRAPPER
2308 2308 CCACHE Override default value for CCACHE
2309 2309
2310 2310 Use these variables to override the choices made by `configure' or to help
2311 2311 it to find libraries and programs with nonstandard names/locations.
2312 2312
2313 2313 Report bugs to <build-dev@openjdk.java.net>.
2314 2314 OpenJDK home page: <http://openjdk.java.net>.
2315 2315 _ACEOF
2316 2316 ac_status=$?
2317 2317 fi
2318 2318
2319 2319 if test "$ac_init_help" = "recursive"; then
2320 2320 # If there are subdirs, report their specific --help.
2321 2321 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2322 2322 test -d "$ac_dir" ||
2323 2323 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2324 2324 continue
2325 2325 ac_builddir=.
2326 2326
2327 2327 case "$ac_dir" in
2328 2328 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2329 2329 *)
2330 2330 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2331 2331 # A ".." for each directory in $ac_dir_suffix.
2332 2332 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2333 2333 case $ac_top_builddir_sub in
2334 2334 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2335 2335 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2336 2336 esac ;;
2337 2337 esac
2338 2338 ac_abs_top_builddir=$ac_pwd
2339 2339 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2340 2340 # for backward compatibility:
2341 2341 ac_top_builddir=$ac_top_build_prefix
2342 2342
2343 2343 case $srcdir in
2344 2344 .) # We are building in place.
2345 2345 ac_srcdir=.
2346 2346 ac_top_srcdir=$ac_top_builddir_sub
2347 2347 ac_abs_top_srcdir=$ac_pwd ;;
2348 2348 [\\/]* | ?:[\\/]* ) # Absolute name.
2349 2349 ac_srcdir=$srcdir$ac_dir_suffix;
2350 2350 ac_top_srcdir=$srcdir
2351 2351 ac_abs_top_srcdir=$srcdir ;;
2352 2352 *) # Relative name.
2353 2353 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2354 2354 ac_top_srcdir=$ac_top_build_prefix$srcdir
2355 2355 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2356 2356 esac
2357 2357 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2358 2358
2359 2359 cd "$ac_dir" || { ac_status=$?; continue; }
2360 2360 # Check for guested configure.
2361 2361 if test -f "$ac_srcdir/configure.gnu"; then
2362 2362 echo &&
2363 2363 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2364 2364 elif test -f "$ac_srcdir/configure"; then
2365 2365 echo &&
2366 2366 $SHELL "$ac_srcdir/configure" --help=recursive
2367 2367 else
2368 2368 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2369 2369 fi || ac_status=$?
2370 2370 cd "$ac_pwd" || { ac_status=$?; break; }
2371 2371 done
2372 2372 fi
2373 2373
2374 2374 test -n "$ac_init_help" && exit $ac_status
2375 2375 if $ac_init_version; then
2376 2376 cat <<\_ACEOF
2377 2377 OpenJDK configure jdk9
2378 2378 generated by GNU Autoconf 2.69
2379 2379
2380 2380 Copyright (C) 2012 Free Software Foundation, Inc.
2381 2381 This configure script is free software; the Free Software Foundation
2382 2382 gives unlimited permission to copy, distribute and modify it.
2383 2383 _ACEOF
2384 2384 exit
2385 2385 fi
2386 2386
2387 2387 ## ------------------------ ##
2388 2388 ## Autoconf initialization. ##
2389 2389 ## ------------------------ ##
2390 2390
2391 2391 # ac_fn_c_try_compile LINENO
2392 2392 # --------------------------
2393 2393 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2394 2394 ac_fn_c_try_compile ()
2395 2395 {
2396 2396 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397 2397 rm -f conftest.$ac_objext
2398 2398 if { { ac_try="$ac_compile"
2399 2399 case "(($ac_try" in
2400 2400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2401 2401 *) ac_try_echo=$ac_try;;
2402 2402 esac
2403 2403 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2404 2404 $as_echo "$ac_try_echo"; } >&5
2405 2405 (eval "$ac_compile") 2>conftest.err
2406 2406 ac_status=$?
2407 2407 if test -s conftest.err; then
2408 2408 grep -v '^ *+' conftest.err >conftest.er1
2409 2409 cat conftest.er1 >&5
2410 2410 mv -f conftest.er1 conftest.err
2411 2411 fi
2412 2412 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2413 2413 test $ac_status = 0; } && {
2414 2414 test -z "$ac_c_werror_flag" ||
2415 2415 test ! -s conftest.err
2416 2416 } && test -s conftest.$ac_objext; then :
2417 2417 ac_retval=0
2418 2418 else
2419 2419 $as_echo "$as_me: failed program was:" >&5
2420 2420 sed 's/^/| /' conftest.$ac_ext >&5
2421 2421
2422 2422 ac_retval=1
2423 2423 fi
2424 2424 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2425 2425 as_fn_set_status $ac_retval
2426 2426
2427 2427 } # ac_fn_c_try_compile
2428 2428
2429 2429 # ac_fn_cxx_try_compile LINENO
2430 2430 # ----------------------------
2431 2431 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2432 2432 ac_fn_cxx_try_compile ()
2433 2433 {
2434 2434 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435 2435 rm -f conftest.$ac_objext
2436 2436 if { { ac_try="$ac_compile"
2437 2437 case "(($ac_try" in
2438 2438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2439 2439 *) ac_try_echo=$ac_try;;
2440 2440 esac
2441 2441 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2442 2442 $as_echo "$ac_try_echo"; } >&5
2443 2443 (eval "$ac_compile") 2>conftest.err
2444 2444 ac_status=$?
2445 2445 if test -s conftest.err; then
2446 2446 grep -v '^ *+' conftest.err >conftest.er1
2447 2447 cat conftest.er1 >&5
2448 2448 mv -f conftest.er1 conftest.err
2449 2449 fi
2450 2450 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451 2451 test $ac_status = 0; } && {
2452 2452 test -z "$ac_cxx_werror_flag" ||
2453 2453 test ! -s conftest.err
2454 2454 } && test -s conftest.$ac_objext; then :
2455 2455 ac_retval=0
2456 2456 else
2457 2457 $as_echo "$as_me: failed program was:" >&5
2458 2458 sed 's/^/| /' conftest.$ac_ext >&5
2459 2459
2460 2460 ac_retval=1
2461 2461 fi
2462 2462 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463 2463 as_fn_set_status $ac_retval
2464 2464
2465 2465 } # ac_fn_cxx_try_compile
2466 2466
2467 2467 # ac_fn_c_try_cpp LINENO
2468 2468 # ----------------------
2469 2469 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2470 2470 ac_fn_c_try_cpp ()
2471 2471 {
2472 2472 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473 2473 if { { ac_try="$ac_cpp conftest.$ac_ext"
2474 2474 case "(($ac_try" in
2475 2475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476 2476 *) ac_try_echo=$ac_try;;
2477 2477 esac
2478 2478 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479 2479 $as_echo "$ac_try_echo"; } >&5
2480 2480 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2481 2481 ac_status=$?
2482 2482 if test -s conftest.err; then
2483 2483 grep -v '^ *+' conftest.err >conftest.er1
2484 2484 cat conftest.er1 >&5
2485 2485 mv -f conftest.er1 conftest.err
2486 2486 fi
2487 2487 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2488 2488 test $ac_status = 0; } > conftest.i && {
2489 2489 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2490 2490 test ! -s conftest.err
2491 2491 }; then :
2492 2492 ac_retval=0
2493 2493 else
2494 2494 $as_echo "$as_me: failed program was:" >&5
2495 2495 sed 's/^/| /' conftest.$ac_ext >&5
2496 2496
2497 2497 ac_retval=1
2498 2498 fi
2499 2499 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500 2500 as_fn_set_status $ac_retval
2501 2501
2502 2502 } # ac_fn_c_try_cpp
2503 2503
2504 2504 # ac_fn_cxx_try_cpp LINENO
2505 2505 # ------------------------
2506 2506 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2507 2507 ac_fn_cxx_try_cpp ()
2508 2508 {
2509 2509 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2510 2510 if { { ac_try="$ac_cpp conftest.$ac_ext"
2511 2511 case "(($ac_try" in
2512 2512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513 2513 *) ac_try_echo=$ac_try;;
2514 2514 esac
2515 2515 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516 2516 $as_echo "$ac_try_echo"; } >&5
2517 2517 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2518 2518 ac_status=$?
2519 2519 if test -s conftest.err; then
2520 2520 grep -v '^ *+' conftest.err >conftest.er1
2521 2521 cat conftest.er1 >&5
2522 2522 mv -f conftest.er1 conftest.err
2523 2523 fi
2524 2524 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2525 2525 test $ac_status = 0; } > conftest.i && {
2526 2526 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2527 2527 test ! -s conftest.err
2528 2528 }; then :
2529 2529 ac_retval=0
2530 2530 else
2531 2531 $as_echo "$as_me: failed program was:" >&5
2532 2532 sed 's/^/| /' conftest.$ac_ext >&5
2533 2533
2534 2534 ac_retval=1
2535 2535 fi
2536 2536 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537 2537 as_fn_set_status $ac_retval
2538 2538
2539 2539 } # ac_fn_cxx_try_cpp
2540 2540
2541 2541 # ac_fn_c_try_link LINENO
2542 2542 # -----------------------
2543 2543 # Try to link conftest.$ac_ext, and return whether this succeeded.
2544 2544 ac_fn_c_try_link ()
2545 2545 {
2546 2546 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2547 2547 rm -f conftest.$ac_objext conftest$ac_exeext
2548 2548 if { { ac_try="$ac_link"
2549 2549 case "(($ac_try" in
2550 2550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2551 2551 *) ac_try_echo=$ac_try;;
2552 2552 esac
2553 2553 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2554 2554 $as_echo "$ac_try_echo"; } >&5
2555 2555 (eval "$ac_link") 2>conftest.err
2556 2556 ac_status=$?
2557 2557 if test -s conftest.err; then
2558 2558 grep -v '^ *+' conftest.err >conftest.er1
2559 2559 cat conftest.er1 >&5
2560 2560 mv -f conftest.er1 conftest.err
2561 2561 fi
2562 2562 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2563 2563 test $ac_status = 0; } && {
2564 2564 test -z "$ac_c_werror_flag" ||
2565 2565 test ! -s conftest.err
2566 2566 } && test -s conftest$ac_exeext && {
2567 2567 test "$cross_compiling" = yes ||
2568 2568 test -x conftest$ac_exeext
2569 2569 }; then :
2570 2570 ac_retval=0
2571 2571 else
2572 2572 $as_echo "$as_me: failed program was:" >&5
2573 2573 sed 's/^/| /' conftest.$ac_ext >&5
2574 2574
2575 2575 ac_retval=1
2576 2576 fi
2577 2577 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2578 2578 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2579 2579 # interfere with the next link command; also delete a directory that is
2580 2580 # left behind by Apple's compiler. We do this before executing the actions.
2581 2581 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2582 2582 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583 2583 as_fn_set_status $ac_retval
2584 2584
2585 2585 } # ac_fn_c_try_link
2586 2586
2587 2587 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2588 2588 # ---------------------------------------------------------
2589 2589 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2590 2590 # the include files in INCLUDES and setting the cache variable VAR
2591 2591 # accordingly.
2592 2592 ac_fn_cxx_check_header_mongrel ()
2593 2593 {
2594 2594 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595 2595 if eval \${$3+:} false; then :
2596 2596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597 2597 $as_echo_n "checking for $2... " >&6; }
2598 2598 if eval \${$3+:} false; then :
2599 2599 $as_echo_n "(cached) " >&6
2600 2600 fi
2601 2601 eval ac_res=\$$3
2602 2602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2603 2603 $as_echo "$ac_res" >&6; }
2604 2604 else
2605 2605 # Is the header compilable?
2606 2606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2607 2607 $as_echo_n "checking $2 usability... " >&6; }
2608 2608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609 2609 /* end confdefs.h. */
2610 2610 $4
2611 2611 #include <$2>
2612 2612 _ACEOF
2613 2613 if ac_fn_cxx_try_compile "$LINENO"; then :
2614 2614 ac_header_compiler=yes
2615 2615 else
2616 2616 ac_header_compiler=no
2617 2617 fi
2618 2618 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619 2619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2620 2620 $as_echo "$ac_header_compiler" >&6; }
2621 2621
2622 2622 # Is the header present?
2623 2623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2624 2624 $as_echo_n "checking $2 presence... " >&6; }
2625 2625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626 2626 /* end confdefs.h. */
2627 2627 #include <$2>
2628 2628 _ACEOF
2629 2629 if ac_fn_cxx_try_cpp "$LINENO"; then :
2630 2630 ac_header_preproc=yes
2631 2631 else
2632 2632 ac_header_preproc=no
2633 2633 fi
2634 2634 rm -f conftest.err conftest.i conftest.$ac_ext
2635 2635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2636 2636 $as_echo "$ac_header_preproc" >&6; }
2637 2637
2638 2638 # So? What about this header?
2639 2639 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2640 2640 yes:no: )
2641 2641 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2642 2642 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2643 2643 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2644 2644 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2645 2645 ;;
2646 2646 no:yes:* )
2647 2647 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2648 2648 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2649 2649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2650 2650 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2651 2651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2652 2652 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2653 2653 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2654 2654 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2655 2655 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2656 2656 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2657 2657 ( $as_echo "## ----------------------------------------- ##
2658 2658 ## Report this to build-dev@openjdk.java.net ##
2659 2659 ## ----------------------------------------- ##"
2660 2660 ) | sed "s/^/$as_me: WARNING: /" >&2
2661 2661 ;;
2662 2662 esac
2663 2663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2664 2664 $as_echo_n "checking for $2... " >&6; }
2665 2665 if eval \${$3+:} false; then :
2666 2666 $as_echo_n "(cached) " >&6
2667 2667 else
2668 2668 eval "$3=\$ac_header_compiler"
2669 2669 fi
2670 2670 eval ac_res=\$$3
2671 2671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2672 2672 $as_echo "$ac_res" >&6; }
2673 2673 fi
2674 2674 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2675 2675
2676 2676 } # ac_fn_cxx_check_header_mongrel
2677 2677
2678 2678 # ac_fn_cxx_try_run LINENO
2679 2679 # ------------------------
2680 2680 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2681 2681 # that executables *can* be run.
2682 2682 ac_fn_cxx_try_run ()
2683 2683 {
2684 2684 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2685 2685 if { { ac_try="$ac_link"
2686 2686 case "(($ac_try" in
2687 2687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688 2688 *) ac_try_echo=$ac_try;;
2689 2689 esac
2690 2690 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2691 2691 $as_echo "$ac_try_echo"; } >&5
2692 2692 (eval "$ac_link") 2>&5
2693 2693 ac_status=$?
2694 2694 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2695 2695 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2696 2696 { { case "(($ac_try" in
2697 2697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698 2698 *) ac_try_echo=$ac_try;;
2699 2699 esac
2700 2700 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701 2701 $as_echo "$ac_try_echo"; } >&5
2702 2702 (eval "$ac_try") 2>&5
2703 2703 ac_status=$?
2704 2704 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705 2705 test $ac_status = 0; }; }; then :
2706 2706 ac_retval=0
2707 2707 else
2708 2708 $as_echo "$as_me: program exited with status $ac_status" >&5
2709 2709 $as_echo "$as_me: failed program was:" >&5
2710 2710 sed 's/^/| /' conftest.$ac_ext >&5
2711 2711
2712 2712 ac_retval=$ac_status
2713 2713 fi
2714 2714 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2715 2715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2716 2716 as_fn_set_status $ac_retval
2717 2717
2718 2718 } # ac_fn_cxx_try_run
2719 2719
2720 2720 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2721 2721 # ---------------------------------------------------------
2722 2722 # Tests whether HEADER exists and can be compiled using the include files in
2723 2723 # INCLUDES, setting the cache variable VAR accordingly.
2724 2724 ac_fn_cxx_check_header_compile ()
2725 2725 {
2726 2726 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2727 2727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2728 2728 $as_echo_n "checking for $2... " >&6; }
2729 2729 if eval \${$3+:} false; then :
2730 2730 $as_echo_n "(cached) " >&6
2731 2731 else
2732 2732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2733 2733 /* end confdefs.h. */
2734 2734 $4
2735 2735 #include <$2>
2736 2736 _ACEOF
2737 2737 if ac_fn_cxx_try_compile "$LINENO"; then :
2738 2738 eval "$3=yes"
2739 2739 else
2740 2740 eval "$3=no"
2741 2741 fi
2742 2742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743 2743 fi
2744 2744 eval ac_res=\$$3
2745 2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2746 2746 $as_echo "$ac_res" >&6; }
2747 2747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2748 2748
2749 2749 } # ac_fn_cxx_check_header_compile
2750 2750
2751 2751 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2752 2752 # ----------------------------------------------
2753 2753 # Tries to find the compile-time value of EXPR in a program that includes
2754 2754 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2755 2755 # computed
2756 2756 ac_fn_cxx_compute_int ()
2757 2757 {
2758 2758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2759 2759 if test "$cross_compiling" = yes; then
2760 2760 # Depending upon the size, compute the lo and hi bounds.
2761 2761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762 2762 /* end confdefs.h. */
2763 2763 $4
2764 2764 int
2765 2765 main ()
2766 2766 {
2767 2767 static int test_array [1 - 2 * !(($2) >= 0)];
2768 2768 test_array [0] = 0;
2769 2769 return test_array [0];
2770 2770
2771 2771 ;
2772 2772 return 0;
2773 2773 }
2774 2774 _ACEOF
2775 2775 if ac_fn_cxx_try_compile "$LINENO"; then :
2776 2776 ac_lo=0 ac_mid=0
2777 2777 while :; do
2778 2778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2779 2779 /* end confdefs.h. */
2780 2780 $4
2781 2781 int
2782 2782 main ()
2783 2783 {
2784 2784 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2785 2785 test_array [0] = 0;
2786 2786 return test_array [0];
2787 2787
2788 2788 ;
2789 2789 return 0;
2790 2790 }
2791 2791 _ACEOF
2792 2792 if ac_fn_cxx_try_compile "$LINENO"; then :
2793 2793 ac_hi=$ac_mid; break
2794 2794 else
2795 2795 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2796 2796 if test $ac_lo -le $ac_mid; then
2797 2797 ac_lo= ac_hi=
2798 2798 break
2799 2799 fi
2800 2800 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2801 2801 fi
2802 2802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2803 2803 done
2804 2804 else
2805 2805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806 2806 /* end confdefs.h. */
2807 2807 $4
2808 2808 int
2809 2809 main ()
2810 2810 {
2811 2811 static int test_array [1 - 2 * !(($2) < 0)];
2812 2812 test_array [0] = 0;
2813 2813 return test_array [0];
2814 2814
2815 2815 ;
2816 2816 return 0;
2817 2817 }
2818 2818 _ACEOF
2819 2819 if ac_fn_cxx_try_compile "$LINENO"; then :
2820 2820 ac_hi=-1 ac_mid=-1
2821 2821 while :; do
2822 2822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823 2823 /* end confdefs.h. */
2824 2824 $4
2825 2825 int
2826 2826 main ()
2827 2827 {
2828 2828 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2829 2829 test_array [0] = 0;
2830 2830 return test_array [0];
2831 2831
2832 2832 ;
2833 2833 return 0;
2834 2834 }
2835 2835 _ACEOF
2836 2836 if ac_fn_cxx_try_compile "$LINENO"; then :
2837 2837 ac_lo=$ac_mid; break
2838 2838 else
2839 2839 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2840 2840 if test $ac_mid -le $ac_hi; then
2841 2841 ac_lo= ac_hi=
2842 2842 break
2843 2843 fi
2844 2844 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2845 2845 fi
2846 2846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847 2847 done
2848 2848 else
2849 2849 ac_lo= ac_hi=
2850 2850 fi
2851 2851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852 2852 fi
2853 2853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854 2854 # Binary search between lo and hi bounds.
2855 2855 while test "x$ac_lo" != "x$ac_hi"; do
2856 2856 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2857 2857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858 2858 /* end confdefs.h. */
2859 2859 $4
2860 2860 int
2861 2861 main ()
2862 2862 {
2863 2863 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2864 2864 test_array [0] = 0;
2865 2865 return test_array [0];
2866 2866
2867 2867 ;
2868 2868 return 0;
2869 2869 }
2870 2870 _ACEOF
2871 2871 if ac_fn_cxx_try_compile "$LINENO"; then :
2872 2872 ac_hi=$ac_mid
2873 2873 else
2874 2874 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2875 2875 fi
2876 2876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877 2877 done
2878 2878 case $ac_lo in #((
2879 2879 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2880 2880 '') ac_retval=1 ;;
2881 2881 esac
2882 2882 else
2883 2883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2884 2884 /* end confdefs.h. */
2885 2885 $4
2886 2886 static long int longval () { return $2; }
2887 2887 static unsigned long int ulongval () { return $2; }
2888 2888 #include <stdio.h>
2889 2889 #include <stdlib.h>
2890 2890 int
2891 2891 main ()
2892 2892 {
2893 2893
2894 2894 FILE *f = fopen ("conftest.val", "w");
2895 2895 if (! f)
2896 2896 return 1;
2897 2897 if (($2) < 0)
2898 2898 {
2899 2899 long int i = longval ();
2900 2900 if (i != ($2))
2901 2901 return 1;
2902 2902 fprintf (f, "%ld", i);
2903 2903 }
2904 2904 else
2905 2905 {
2906 2906 unsigned long int i = ulongval ();
2907 2907 if (i != ($2))
2908 2908 return 1;
2909 2909 fprintf (f, "%lu", i);
2910 2910 }
2911 2911 /* Do not output a trailing newline, as this causes \r\n confusion
2912 2912 on some platforms. */
2913 2913 return ferror (f) || fclose (f) != 0;
2914 2914
2915 2915 ;
2916 2916 return 0;
2917 2917 }
2918 2918 _ACEOF
2919 2919 if ac_fn_cxx_try_run "$LINENO"; then :
2920 2920 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2921 2921 else
2922 2922 ac_retval=1
2923 2923 fi
2924 2924 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2925 2925 conftest.$ac_objext conftest.beam conftest.$ac_ext
2926 2926 rm -f conftest.val
2927 2927
2928 2928 fi
2929 2929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2930 2930 as_fn_set_status $ac_retval
2931 2931
2932 2932 } # ac_fn_cxx_compute_int
2933 2933
2934 2934 # ac_fn_cxx_try_link LINENO
2935 2935 # -------------------------
2936 2936 # Try to link conftest.$ac_ext, and return whether this succeeded.
2937 2937 ac_fn_cxx_try_link ()
2938 2938 {
2939 2939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2940 2940 rm -f conftest.$ac_objext conftest$ac_exeext
2941 2941 if { { ac_try="$ac_link"
2942 2942 case "(($ac_try" in
2943 2943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944 2944 *) ac_try_echo=$ac_try;;
2945 2945 esac
2946 2946 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2947 2947 $as_echo "$ac_try_echo"; } >&5
2948 2948 (eval "$ac_link") 2>conftest.err
2949 2949 ac_status=$?
2950 2950 if test -s conftest.err; then
2951 2951 grep -v '^ *+' conftest.err >conftest.er1
2952 2952 cat conftest.er1 >&5
2953 2953 mv -f conftest.er1 conftest.err
2954 2954 fi
2955 2955 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2956 2956 test $ac_status = 0; } && {
2957 2957 test -z "$ac_cxx_werror_flag" ||
2958 2958 test ! -s conftest.err
2959 2959 } && test -s conftest$ac_exeext && {
2960 2960 test "$cross_compiling" = yes ||
2961 2961 test -x conftest$ac_exeext
2962 2962 }; then :
2963 2963 ac_retval=0
2964 2964 else
2965 2965 $as_echo "$as_me: failed program was:" >&5
2966 2966 sed 's/^/| /' conftest.$ac_ext >&5
2967 2967
2968 2968 ac_retval=1
2969 2969 fi
2970 2970 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2971 2971 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2972 2972 # interfere with the next link command; also delete a directory that is
2973 2973 # left behind by Apple's compiler. We do this before executing the actions.
2974 2974 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2975 2975 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2976 2976 as_fn_set_status $ac_retval
2977 2977
2978 2978 } # ac_fn_cxx_try_link
2979 2979
2980 2980 # ac_fn_cxx_check_func LINENO FUNC VAR
2981 2981 # ------------------------------------
2982 2982 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2983 2983 ac_fn_cxx_check_func ()
2984 2984 {
2985 2985 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2986 2986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2987 2987 $as_echo_n "checking for $2... " >&6; }
2988 2988 if eval \${$3+:} false; then :
2989 2989 $as_echo_n "(cached) " >&6
2990 2990 else
2991 2991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992 2992 /* end confdefs.h. */
2993 2993 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2994 2994 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2995 2995 #define $2 innocuous_$2
2996 2996
2997 2997 /* System header to define __stub macros and hopefully few prototypes,
2998 2998 which can conflict with char $2 (); below.
2999 2999 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3000 3000 <limits.h> exists even on freestanding compilers. */
3001 3001
3002 3002 #ifdef __STDC__
3003 3003 # include <limits.h>
3004 3004 #else
3005 3005 # include <assert.h>
3006 3006 #endif
3007 3007
3008 3008 #undef $2
3009 3009
3010 3010 /* Override any GCC internal prototype to avoid an error.
3011 3011 Use char because int might match the return type of a GCC
3012 3012 builtin and then its argument prototype would still apply. */
3013 3013 #ifdef __cplusplus
3014 3014 extern "C"
3015 3015 #endif
3016 3016 char $2 ();
3017 3017 /* The GNU C library defines this for functions which it implements
3018 3018 to always fail with ENOSYS. Some functions are actually named
3019 3019 something starting with __ and the normal name is an alias. */
3020 3020 #if defined __stub_$2 || defined __stub___$2
3021 3021 choke me
3022 3022 #endif
3023 3023
3024 3024 int
3025 3025 main ()
3026 3026 {
3027 3027 return $2 ();
3028 3028 ;
3029 3029 return 0;
3030 3030 }
3031 3031 _ACEOF
3032 3032 if ac_fn_cxx_try_link "$LINENO"; then :
3033 3033 eval "$3=yes"
3034 3034 else
3035 3035 eval "$3=no"
3036 3036 fi
3037 3037 rm -f core conftest.err conftest.$ac_objext \
3038 3038 conftest$ac_exeext conftest.$ac_ext
3039 3039 fi
3040 3040 eval ac_res=\$$3
3041 3041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3042 3042 $as_echo "$ac_res" >&6; }
3043 3043 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3044 3044
3045 3045 } # ac_fn_cxx_check_func
3046 3046
3047 3047 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3048 3048 # -------------------------------------------------------
3049 3049 # Tests whether HEADER exists and can be compiled using the include files in
3050 3050 # INCLUDES, setting the cache variable VAR accordingly.
3051 3051 ac_fn_c_check_header_compile ()
3052 3052 {
3053 3053 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3054 3054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055 3055 $as_echo_n "checking for $2... " >&6; }
3056 3056 if eval \${$3+:} false; then :
3057 3057 $as_echo_n "(cached) " >&6
3058 3058 else
3059 3059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060 3060 /* end confdefs.h. */
3061 3061 $4
3062 3062 #include <$2>
3063 3063 _ACEOF
3064 3064 if ac_fn_c_try_compile "$LINENO"; then :
3065 3065 eval "$3=yes"
3066 3066 else
3067 3067 eval "$3=no"
3068 3068 fi
3069 3069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3070 3070 fi
3071 3071 eval ac_res=\$$3
3072 3072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3073 3073 $as_echo "$ac_res" >&6; }
3074 3074 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3075 3075
3076 3076 } # ac_fn_c_check_header_compile
3077 3077 cat >config.log <<_ACEOF
3078 3078 This file contains any messages produced by compilers while
3079 3079 running configure, to aid debugging if configure makes a mistake.
3080 3080
3081 3081 It was created by OpenJDK $as_me jdk9, which was
3082 3082 generated by GNU Autoconf 2.69. Invocation command line was
3083 3083
3084 3084 $ $0 $@
3085 3085
3086 3086 _ACEOF
3087 3087 exec 5>>config.log
3088 3088 {
3089 3089 cat <<_ASUNAME
3090 3090 ## --------- ##
3091 3091 ## Platform. ##
3092 3092 ## --------- ##
3093 3093
3094 3094 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3095 3095 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3096 3096 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3097 3097 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3098 3098 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3099 3099
3100 3100 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3101 3101 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3102 3102
3103 3103 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3104 3104 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3105 3105 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3106 3106 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3107 3107 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3108 3108 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3109 3109 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3110 3110
3111 3111 _ASUNAME
3112 3112
3113 3113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114 3114 for as_dir in $PATH
3115 3115 do
3116 3116 IFS=$as_save_IFS
3117 3117 test -z "$as_dir" && as_dir=.
3118 3118 $as_echo "PATH: $as_dir"
3119 3119 done
3120 3120 IFS=$as_save_IFS
3121 3121
3122 3122 } >&5
3123 3123
3124 3124 cat >&5 <<_ACEOF
3125 3125
3126 3126
3127 3127 ## ----------- ##
3128 3128 ## Core tests. ##
3129 3129 ## ----------- ##
3130 3130
3131 3131 _ACEOF
3132 3132
3133 3133
3134 3134 # Keep a trace of the command line.
3135 3135 # Strip out --no-create and --no-recursion so they do not pile up.
3136 3136 # Strip out --silent because we don't want to record it for future runs.
3137 3137 # Also quote any args containing shell meta-characters.
3138 3138 # Make two passes to allow for proper duplicate-argument suppression.
3139 3139 ac_configure_args=
3140 3140 ac_configure_args0=
3141 3141 ac_configure_args1=
3142 3142 ac_must_keep_next=false
3143 3143 for ac_pass in 1 2
3144 3144 do
3145 3145 for ac_arg
3146 3146 do
3147 3147 case $ac_arg in
3148 3148 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3149 3149 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3150 3150 | -silent | --silent | --silen | --sile | --sil)
3151 3151 continue ;;
3152 3152 *\'*)
3153 3153 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3154 3154 esac
3155 3155 case $ac_pass in
3156 3156 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3157 3157 2)
3158 3158 as_fn_append ac_configure_args1 " '$ac_arg'"
3159 3159 if test $ac_must_keep_next = true; then
3160 3160 ac_must_keep_next=false # Got value, back to normal.
3161 3161 else
3162 3162 case $ac_arg in
3163 3163 *=* | --config-cache | -C | -disable-* | --disable-* \
3164 3164 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3165 3165 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3166 3166 | -with-* | --with-* | -without-* | --without-* | --x)
3167 3167 case "$ac_configure_args0 " in
3168 3168 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3169 3169 esac
3170 3170 ;;
3171 3171 -* ) ac_must_keep_next=true ;;
3172 3172 esac
3173 3173 fi
3174 3174 as_fn_append ac_configure_args " '$ac_arg'"
3175 3175 ;;
3176 3176 esac
3177 3177 done
3178 3178 done
3179 3179 { ac_configure_args0=; unset ac_configure_args0;}
3180 3180 { ac_configure_args1=; unset ac_configure_args1;}
3181 3181
3182 3182 # When interrupted or exit'd, cleanup temporary files, and complete
3183 3183 # config.log. We remove comments because anyway the quotes in there
3184 3184 # would cause problems or look ugly.
3185 3185 # WARNING: Use '\'' to represent an apostrophe within the trap.
3186 3186 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3187 3187 trap 'exit_status=$?
3188 3188 # Save into config.log some information that might help in debugging.
3189 3189 {
3190 3190 echo
3191 3191
3192 3192 $as_echo "## ---------------- ##
3193 3193 ## Cache variables. ##
3194 3194 ## ---------------- ##"
3195 3195 echo
3196 3196 # The following way of writing the cache mishandles newlines in values,
3197 3197 (
3198 3198 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3199 3199 eval ac_val=\$$ac_var
3200 3200 case $ac_val in #(
3201 3201 *${as_nl}*)
3202 3202 case $ac_var in #(
3203 3203 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3204 3204 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3205 3205 esac
3206 3206 case $ac_var in #(
3207 3207 _ | IFS | as_nl) ;; #(
3208 3208 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3209 3209 *) { eval $ac_var=; unset $ac_var;} ;;
3210 3210 esac ;;
3211 3211 esac
3212 3212 done
3213 3213 (set) 2>&1 |
3214 3214 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3215 3215 *${as_nl}ac_space=\ *)
3216 3216 sed -n \
3217 3217 "s/'\''/'\''\\\\'\'''\''/g;
3218 3218 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3219 3219 ;; #(
3220 3220 *)
3221 3221 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3222 3222 ;;
3223 3223 esac |
3224 3224 sort
3225 3225 )
3226 3226 echo
3227 3227
3228 3228 $as_echo "## ----------------- ##
3229 3229 ## Output variables. ##
3230 3230 ## ----------------- ##"
3231 3231 echo
3232 3232 for ac_var in $ac_subst_vars
3233 3233 do
3234 3234 eval ac_val=\$$ac_var
3235 3235 case $ac_val in
3236 3236 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3237 3237 esac
3238 3238 $as_echo "$ac_var='\''$ac_val'\''"
3239 3239 done | sort
3240 3240 echo
3241 3241
3242 3242 if test -n "$ac_subst_files"; then
3243 3243 $as_echo "## ------------------- ##
3244 3244 ## File substitutions. ##
3245 3245 ## ------------------- ##"
3246 3246 echo
3247 3247 for ac_var in $ac_subst_files
3248 3248 do
3249 3249 eval ac_val=\$$ac_var
3250 3250 case $ac_val in
3251 3251 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3252 3252 esac
3253 3253 $as_echo "$ac_var='\''$ac_val'\''"
3254 3254 done | sort
3255 3255 echo
3256 3256 fi
3257 3257
3258 3258 if test -s confdefs.h; then
3259 3259 $as_echo "## ----------- ##
3260 3260 ## confdefs.h. ##
3261 3261 ## ----------- ##"
3262 3262 echo
3263 3263 cat confdefs.h
3264 3264 echo
3265 3265 fi
3266 3266 test "$ac_signal" != 0 &&
3267 3267 $as_echo "$as_me: caught signal $ac_signal"
3268 3268 $as_echo "$as_me: exit $exit_status"
3269 3269 } >&5
3270 3270 rm -f core *.core core.conftest.* &&
3271 3271 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3272 3272 exit $exit_status
3273 3273 ' 0
3274 3274 for ac_signal in 1 2 13 15; do
3275 3275 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3276 3276 done
3277 3277 ac_signal=0
3278 3278
3279 3279 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3280 3280 rm -f -r conftest* confdefs.h
3281 3281
3282 3282 $as_echo "/* confdefs.h */" > confdefs.h
3283 3283
3284 3284 # Predefined preprocessor variables.
3285 3285
3286 3286 cat >>confdefs.h <<_ACEOF
3287 3287 #define PACKAGE_NAME "$PACKAGE_NAME"
3288 3288 _ACEOF
3289 3289
3290 3290 cat >>confdefs.h <<_ACEOF
3291 3291 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3292 3292 _ACEOF
3293 3293
3294 3294 cat >>confdefs.h <<_ACEOF
3295 3295 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3296 3296 _ACEOF
3297 3297
3298 3298 cat >>confdefs.h <<_ACEOF
3299 3299 #define PACKAGE_STRING "$PACKAGE_STRING"
3300 3300 _ACEOF
3301 3301
3302 3302 cat >>confdefs.h <<_ACEOF
3303 3303 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3304 3304 _ACEOF
3305 3305
3306 3306 cat >>confdefs.h <<_ACEOF
3307 3307 #define PACKAGE_URL "$PACKAGE_URL"
3308 3308 _ACEOF
3309 3309
3310 3310
3311 3311 # Let the site file select an alternate cache file if it wants to.
3312 3312 # Prefer an explicitly selected file to automatically selected ones.
3313 3313 ac_site_file1=NONE
3314 3314 ac_site_file2=NONE
3315 3315 if test -n "$CONFIG_SITE"; then
3316 3316 # We do not want a PATH search for config.site.
3317 3317 case $CONFIG_SITE in #((
3318 3318 -*) ac_site_file1=./$CONFIG_SITE;;
3319 3319 */*) ac_site_file1=$CONFIG_SITE;;
3320 3320 *) ac_site_file1=./$CONFIG_SITE;;
3321 3321 esac
3322 3322 elif test "x$prefix" != xNONE; then
3323 3323 ac_site_file1=$prefix/share/config.site
3324 3324 ac_site_file2=$prefix/etc/config.site
3325 3325 else
3326 3326 ac_site_file1=$ac_default_prefix/share/config.site
3327 3327 ac_site_file2=$ac_default_prefix/etc/config.site
3328 3328 fi
3329 3329 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3330 3330 do
3331 3331 test "x$ac_site_file" = xNONE && continue
3332 3332 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3333 3333 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3334 3334 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3335 3335 sed 's/^/| /' "$ac_site_file" >&5
3336 3336 . "$ac_site_file" \
3337 3337 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3338 3338 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3339 3339 as_fn_error $? "failed to load site script $ac_site_file
3340 3340 See \`config.log' for more details" "$LINENO" 5; }
3341 3341 fi
3342 3342 done
3343 3343
3344 3344 if test -r "$cache_file"; then
3345 3345 # Some versions of bash will fail to source /dev/null (special files
3346 3346 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3347 3347 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3348 3348 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3349 3349 $as_echo "$as_me: loading cache $cache_file" >&6;}
3350 3350 case $cache_file in
3351 3351 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3352 3352 *) . "./$cache_file";;
3353 3353 esac
3354 3354 fi
3355 3355 else
3356 3356 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3357 3357 $as_echo "$as_me: creating cache $cache_file" >&6;}
3358 3358 >$cache_file
3359 3359 fi
3360 3360
3361 3361 # Check that the precious variables saved in the cache have kept the same
3362 3362 # value.
3363 3363 ac_cache_corrupted=false
3364 3364 for ac_var in $ac_precious_vars; do
3365 3365 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3366 3366 eval ac_new_set=\$ac_env_${ac_var}_set
3367 3367 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3368 3368 eval ac_new_val=\$ac_env_${ac_var}_value
3369 3369 case $ac_old_set,$ac_new_set in
3370 3370 set,)
3371 3371 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3372 3372 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3373 3373 ac_cache_corrupted=: ;;
3374 3374 ,set)
3375 3375 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3376 3376 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3377 3377 ac_cache_corrupted=: ;;
3378 3378 ,);;
3379 3379 *)
3380 3380 if test "x$ac_old_val" != "x$ac_new_val"; then
3381 3381 # differences in whitespace do not lead to failure.
3382 3382 ac_old_val_w=`echo x $ac_old_val`
3383 3383 ac_new_val_w=`echo x $ac_new_val`
3384 3384 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3385 3385 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3386 3386 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3387 3387 ac_cache_corrupted=:
3388 3388 else
3389 3389 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3390 3390 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3391 3391 eval $ac_var=\$ac_old_val
3392 3392 fi
3393 3393 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3394 3394 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3395 3395 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3396 3396 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3397 3397 fi;;
3398 3398 esac
3399 3399 # Pass precious variables to config.status.
3400 3400 if test "$ac_new_set" = set; then
3401 3401 case $ac_new_val in
3402 3402 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3403 3403 *) ac_arg=$ac_var=$ac_new_val ;;
3404 3404 esac
3405 3405 case " $ac_configure_args " in
3406 3406 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3407 3407 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3408 3408 esac
3409 3409 fi
3410 3410 done
3411 3411 if $ac_cache_corrupted; then
3412 3412 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3413 3413 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3414 3414 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3415 3415 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3416 3416 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3417 3417 fi
3418 3418 ## -------------------- ##
3419 3419 ## Main body of script. ##
3420 3420 ## -------------------- ##
3421 3421
3422 3422 ac_ext=c
3423 3423 ac_cpp='$CPP $CPPFLAGS'
3424 3424 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3425 3425 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3426 3426 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3427 3427
3428 3428
3429 3429
3430 3430 ac_aux_dir=
3431 3431 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3432 3432 if test -f "$ac_dir/install-sh"; then
3433 3433 ac_aux_dir=$ac_dir
3434 3434 ac_install_sh="$ac_aux_dir/install-sh -c"
3435 3435 break
3436 3436 elif test -f "$ac_dir/install.sh"; then
3437 3437 ac_aux_dir=$ac_dir
3438 3438 ac_install_sh="$ac_aux_dir/install.sh -c"
3439 3439 break
3440 3440 elif test -f "$ac_dir/shtool"; then
3441 3441 ac_aux_dir=$ac_dir
3442 3442 ac_install_sh="$ac_aux_dir/shtool install -c"
3443 3443 break
3444 3444 fi
3445 3445 done
3446 3446 if test -z "$ac_aux_dir"; then
3447 3447 as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3448 3448 fi
3449 3449
3450 3450 # These three variables are undocumented and unsupported,
3451 3451 # and are intended to be withdrawn in a future Autoconf release.
3452 3452 # They can cause serious problems if a builder's source tree is in a directory
3453 3453 # whose full name contains unusual characters.
3454 3454 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3455 3455 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3456 3456 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3457 3457
3458 3458
3459 3459 # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
3460 3460
3461 3461 #
3462 3462 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3463 3463 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3464 3464 #
3465 3465 # This code is free software; you can redistribute it and/or modify it
3466 3466 # under the terms of the GNU General Public License version 2 only, as
3467 3467 # published by the Free Software Foundation. Oracle designates this
3468 3468 # particular file as subject to the "Classpath" exception as provided
3469 3469 # by Oracle in the LICENSE file that accompanied this code.
3470 3470 #
3471 3471 # This code is distributed in the hope that it will be useful, but WITHOUT
3472 3472 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3473 3473 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3474 3474 # version 2 for more details (a copy is included in the LICENSE file that
3475 3475 # accompanied this code).
3476 3476 #
3477 3477 # You should have received a copy of the GNU General Public License version
3478 3478 # 2 along with this work; if not, write to the Free Software Foundation,
3479 3479 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3480 3480 #
3481 3481 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3482 3482 # or visit www.oracle.com if you need additional information or have any
3483 3483 # questions.
3484 3484 #
3485 3485
3486 3486 #
3487 3487 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3488 3488 #
3489 3489 # This program is free software; you can redistribute it and/or modify
3490 3490 # it under the terms of the GNU General Public License as published by
3491 3491 # the Free Software Foundation; either version 2 of the License, or
3492 3492 # (at your option) any later version.
3493 3493 #
3494 3494 # This program is distributed in the hope that it will be useful, but
3495 3495 # WITHOUT ANY WARRANTY; without even the implied warranty of
3496 3496 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3497 3497 # General Public License for more details.
3498 3498 #
3499 3499 # You should have received a copy of the GNU General Public License
3500 3500 # along with this program; if not, write to the Free Software
3501 3501 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3502 3502 #
3503 3503 # As a special exception to the GNU General Public License, if you
3504 3504 # distribute this file as part of a program that contains a
3505 3505 # configuration script generated by Autoconf, you may include it under
3506 3506 # the same distribution terms that you use for the rest of that program.
3507 3507
3508 3508 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3509 3509 # ----------------------------------
3510 3510 # PKG_PROG_PKG_CONFIG
3511 3511
3512 3512 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3513 3513 #
3514 3514 # Check to see whether a particular set of modules exists. Similar
3515 3515 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3516 3516 #
3517 3517 #
3518 3518 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3519 3519 # this or PKG_CHECK_MODULES is called, or make sure to call
3520 3520 # PKG_CHECK_EXISTS manually
3521 3521 # --------------------------------------------------------------
3522 3522
3523 3523
3524 3524
3525 3525 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3526 3526 # ---------------------------------------------
3527 3527 # _PKG_CONFIG
3528 3528
3529 3529 # _PKG_SHORT_ERRORS_SUPPORTED
3530 3530 # -----------------------------
3531 3531 # _PKG_SHORT_ERRORS_SUPPORTED
3532 3532
3533 3533
3534 3534 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3535 3535 # [ACTION-IF-NOT-FOUND])
3536 3536 #
3537 3537 #
3538 3538 # Note that if there is a possibility the first call to
3539 3539 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3540 3540 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3541 3541 #
3542 3542 #
3543 3543 # --------------------------------------------------------------
3544 3544 # PKG_CHECK_MODULES
3545 3545
3546 3546
3547 3547 # Include these first...
3548 3548 #
3549 3549 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3550 3550 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3551 3551 #
3552 3552 # This code is free software; you can redistribute it and/or modify it
3553 3553 # under the terms of the GNU General Public License version 2 only, as
3554 3554 # published by the Free Software Foundation. Oracle designates this
3555 3555 # particular file as subject to the "Classpath" exception as provided
3556 3556 # by Oracle in the LICENSE file that accompanied this code.
3557 3557 #
3558 3558 # This code is distributed in the hope that it will be useful, but WITHOUT
3559 3559 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3560 3560 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3561 3561 # version 2 for more details (a copy is included in the LICENSE file that
3562 3562 # accompanied this code).
3563 3563 #
3564 3564 # You should have received a copy of the GNU General Public License version
3565 3565 # 2 along with this work; if not, write to the Free Software Foundation,
3566 3566 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3567 3567 #
3568 3568 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3569 3569 # or visit www.oracle.com if you need additional information or have any
3570 3570 # questions.
3571 3571 #
3572 3572
3573 3573 # Create a function/macro that takes a series of named arguments. The call is
3574 3574 # similar to AC_DEFUN, but the setup of the function looks like this:
3575 3575 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3576 3576 # ... do something
3577 3577 # AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3578 3578 # ])
3579 3579 # A star (*) in front of a named argument means that it is required and it's
3580 3580 # presence will be verified. To pass e.g. the first value as a normal indexed
3581 3581 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3582 3582 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3583 3583 # "ARG_FOO".
3584 3584 #
3585 3585 # The generated function can be called like this:
3586 3586 # MYFUNC(FOO: [foo-val],
3587 3587 # BAR: [
3588 3588 # $ECHO hello world
3589 3589 # ])
3590 3590 # Note that the argument value must start on the same line as the argument name.
3591 3591 #
3592 3592 # Argument 1: Name of the function to define
3593 3593 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3594 3594 # Argument 3: Argument array to treat as named, typically $@
3595 3595 # Argument 4: The main function body
3596 3596
3597 3597
3598 3598 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3599 3599 # If so, then append $1 to $2 \
3600 3600 # Also set JVM_ARG_OK to true/false depending on outcome.
3601 3601
3602 3602
3603 3603 # Appends a string to a path variable, only adding the : when needed.
3604 3604
3605 3605
3606 3606 # Prepends a string to a path variable, only adding the : when needed.
3607 3607
3608 3608
3609 3609 # This will make sure the given variable points to a full and proper
3610 3610 # path. This means:
3611 3611 # 1) There will be no spaces in the path. On unix platforms,
3612 3612 # spaces in the path will result in an error. On Windows,
3613 3613 # the path will be rewritten using short-style to be space-free.
3614 3614 # 2) The path will be absolute, and it will be in unix-style (on
3615 3615 # cygwin).
3616 3616 # $1: The name of the variable to fix
3617 3617
3618 3618
3619 3619 # This will make sure the given variable points to a executable
3620 3620 # with a full and proper path. This means:
3621 3621 # 1) There will be no spaces in the path. On unix platforms,
3622 3622 # spaces in the path will result in an error. On Windows,
3623 3623 # the path will be rewritten using short-style to be space-free.
3624 3624 # 2) The path will be absolute, and it will be in unix-style (on
3625 3625 # cygwin).
3626 3626 # Any arguments given to the executable is preserved.
3627 3627 # If the input variable does not have a directory specification, then
3628 3628 # it need to be in the PATH.
3629 3629 # $1: The name of the variable to fix
3630 3630
3631 3631
3632 3632
3633 3633
3634 3634 # Register a --with argument but mark it as deprecated
3635 3635 # $1: The name of the with argument to deprecate, not including --with-
3636 3636
3637 3637
3638 3638 # Register a --enable argument but mark it as deprecated
3639 3639 # $1: The name of the with argument to deprecate, not including --enable-
3640 3640 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3641 3641 # $3: Messages to user.
3642 3642
3643 3643
3644 3644
3645 3645
3646 3646 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3647 3647 # $1: variable to check
3648 3648
3649 3649
3650 3650 # Check that there are no unprocessed overridden variables left.
3651 3651 # If so, they are an incorrect argument and we will exit with an error.
3652 3652
3653 3653
3654 3654 # Setup a tool for the given variable. If correctly specified by the user,
3655 3655 # use that value, otherwise search for the tool using the supplied code snippet.
3656 3656 # $1: variable to set
3657 3657 # $2: code snippet to call to look for the tool
3658 3658 # $3: code snippet to call if variable was used to find tool
3659 3659
3660 3660
3661 3661 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3662 3662 # $1: variable to set
3663 3663 # $2: executable name (or list of names) to look for
3664 3664
3665 3665
3666 3666 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3667 3667 # $1: variable to set
3668 3668 # $2: executable name (or list of names) to look for
3669 3669
3670 3670
3671 3671 # Like BASIC_PATH_PROGS but fails if no tool was found.
3672 3672 # $1: variable to set
3673 3673 # $2: executable name (or list of names) to look for
3674 3674
3675 3675
3676 3676 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3677 3677 # $1: variable to set
3678 3678 # $2: autoconf macro to call to look for the special tool
3679 3679
3680 3680
3681 3681 # Setup the most fundamental tools that relies on not much else to set up,
3682 3682 # but is used by much of the early bootstrap code.
3683 3683
3684 3684
3685 3685 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3686 3686
3687 3687
3688 3688 # Evaluates platform specific overrides for devkit variables.
3689 3689 # $1: Name of variable
3690 3690
3691 3691
3692 3692
3693 3693
3694 3694
3695 3695
3696 3696 #%%% Simple tools %%%
3697 3697
3698 3698 # Check if we have found a usable version of make
3699 3699 # $1: the path to a potential make binary (or empty)
3700 3700 # $2: the description on how we found this
3701 3701
3702 3702
3703 3703
3704 3704
3705 3705 # Goes looking for a usable version of GNU make.
3706 3706
3707 3707
3708 3708
3709 3709
3710 3710
3711 3711
3712 3712
3713 3713
3714 3714 # Check if build directory is on local disk. If not possible to determine,
3715 3715 # we prefer to claim it's local.
3716 3716 # Argument 1: directory to test
3717 3717 # Argument 2: what to do if it is on local disk
3718 3718 # Argument 3: what to do otherwise (remote disk or failure)
3719 3719
3720 3720
3721 3721 # Check that source files have basic read permissions set. This might
3722 3722 # not be the case in cygwin in certain conditions.
3723 3723
3724 3724
3725 3725
3726 3726
3727 3727 # Check for support for specific options in bash
3728 3728
3729 3729
3730 3730 ################################################################################
3731 3731 #
3732 3732 # Default make target
3733 3733 #
3734 3734
3735 3735
3736 3736 # Code to run after AC_OUTPUT
3737 3737
3738 3738
3739 3739 #
3740 3740 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3741 3741 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3742 3742 #
3743 3743 # This code is free software; you can redistribute it and/or modify it
3744 3744 # under the terms of the GNU General Public License version 2 only, as
3745 3745 # published by the Free Software Foundation. Oracle designates this
3746 3746 # particular file as subject to the "Classpath" exception as provided
3747 3747 # by Oracle in the LICENSE file that accompanied this code.
3748 3748 #
3749 3749 # This code is distributed in the hope that it will be useful, but WITHOUT
3750 3750 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3751 3751 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3752 3752 # version 2 for more details (a copy is included in the LICENSE file that
3753 3753 # accompanied this code).
3754 3754 #
3755 3755 # You should have received a copy of the GNU General Public License version
3756 3756 # 2 along with this work; if not, write to the Free Software Foundation,
3757 3757 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3758 3758 #
3759 3759 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3760 3760 # or visit www.oracle.com if you need additional information or have any
3761 3761 # questions.
3762 3762 #
3763 3763
3764 3764
3765 3765
3766 3766
3767 3767
3768 3768 # Helper function which possibly converts a path using DOS-style short mode.
3769 3769 # If so, the updated path is stored in $new_path.
3770 3770 # $1: The path to check
3771 3771
3772 3772
3773 3773 # Helper function which possibly converts a path using DOS-style short mode.
3774 3774 # If so, the updated path is stored in $new_path.
3775 3775 # $1: The path to check
3776 3776
3777 3777
3778 3778 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3779 3779 # and could probably be heavily simplified. However, all changes in this
3780 3780 # area tend to need lot of testing in different scenarios, and in lack of
3781 3781 # proper unit testing, cleaning this up has not been deemed worth the effort
3782 3782 # at the moment.
3783 3783
3784 3784
3785 3785
3786 3786
3787 3787
3788 3788
3789 3789
3790 3790
3791 3791
3792 3792 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3793 3793
3794 3794
3795 3795
3796 3796
3797 3797 # ... then the rest
3798 3798 #
3799 3799 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3800 3800 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3801 3801 #
3802 3802 # This code is free software; you can redistribute it and/or modify it
3803 3803 # under the terms of the GNU General Public License version 2 only, as
3804 3804 # published by the Free Software Foundation. Oracle designates this
3805 3805 # particular file as subject to the "Classpath" exception as provided
3806 3806 # by Oracle in the LICENSE file that accompanied this code.
3807 3807 #
3808 3808 # This code is distributed in the hope that it will be useful, but WITHOUT
3809 3809 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3810 3810 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3811 3811 # version 2 for more details (a copy is included in the LICENSE file that
3812 3812 # accompanied this code).
3813 3813 #
3814 3814 # You should have received a copy of the GNU General Public License version
3815 3815 # 2 along with this work; if not, write to the Free Software Foundation,
3816 3816 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3817 3817 #
3818 3818 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3819 3819 # or visit www.oracle.com if you need additional information or have any
3820 3820 # questions.
3821 3821 #
3822 3822
3823 3823 ########################################################################
3824 3824 # This file handles detection of the Boot JDK. The Boot JDK detection
3825 3825 # process has been developed as a response to solve a complex real-world
3826 3826 # problem. Initially, it was simple, but it has grown as platform after
3827 3827 # platform, idiosyncracy after idiosyncracy has been supported.
3828 3828 #
3829 3829 # The basic idea is this:
3830 3830 # 1) You need an acceptable *) JDK to use as a Boot JDK
3831 3831 # 2) There are several ways to locate a JDK, that are mostly platform
3832 3832 # dependent **)
3833 3833 # 3) You can have multiple JDKs installed
3834 3834 # 4) If possible, configure should try to dig out an acceptable JDK
3835 3835 # automatically, without having to resort to command-line options
3836 3836 #
3837 3837 # *) acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3838 3838 # javac) and not a JRE, etc.
3839 3839 #
3840 3840 # **) On Windows we typically use a well-known path.
3841 3841 # On MacOSX we typically use the tool java_home.
3842 3842 # On Linux we typically find javac in the $PATH, and then follow a
3843 3843 # chain of symlinks that often ends up in a real JDK.
3844 3844 #
3845 3845 # This leads to the code where we check in different ways to locate a
3846 3846 # JDK, and if one is found, check if it is acceptable. If not, we print
3847 3847 # our reasons for rejecting it (useful when debugging non-working
3848 3848 # configure situations) and continue checking the next one.
3849 3849 ########################################################################
3850 3850
3851 3851 # Execute the check given as argument, and verify the result
3852 3852 # If the Boot JDK was previously found, do nothing
3853 3853 # $1 A command line (typically autoconf macro) to execute
3854 3854
3855 3855
3856 3856 # Test: Is bootjdk explicitely set by command line arguments?
3857 3857
3858 3858
3859 3859 # Test: Is $JAVA_HOME set?
3860 3860
3861 3861
3862 3862 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3863 3863
3864 3864
3865 3865 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3866 3866 # $1: Argument to the java_home binary (optional)
3867 3867
3868 3868
3869 3869 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3870 3870
3871 3871
3872 3872 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3873 3873 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3874 3874 # $1 = Path to directory containing jdk installations.
3875 3875 # $2 = String to append to the found JDK directory to get the proper JDK home
3876 3876
3877 3877
3878 3878 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3879 3879 # environmental variable as base for where to look.
3880 3880 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3881 3881
3882 3882
3883 3883 # Test: Is there a JDK installed in default, well-known locations?
3884 3884
3885 3885
3886 3886 # Check that a command-line tool in the Boot JDK is correct
3887 3887 # $1 = name of variable to assign
3888 3888 # $2 = name of binary
3889 3889
3890 3890
3891 3891 ###############################################################################
3892 3892 #
3893 3893 # We need a Boot JDK to bootstrap the build.
3894 3894 #
3895 3895
3896 3896
3897 3897
3898 3898
3899 3899
3900 3900 # BUILD_JDK: the location of the latest JDK that can run
3901 3901 # on the host system and supports the target class file version
3902 3902 # generated in this JDK build. This variable should only be
3903 3903 # used after the launchers are built.
3904 3904 #
3905 3905
3906 3906 # Execute the check given as argument, and verify the result.
3907 3907 # If the JDK was previously found, do nothing.
3908 3908 # $1 A command line (typically autoconf macro) to execute
3909 3909
3910 3910
3911 3911 # By default the BUILD_JDK is the JDK_OUTPUTDIR. If the target architecture
3912 3912 # is different than the host system doing the build (e.g. cross-compilation),
3913 3913 # a special BUILD_JDK is built as part of the build process. An external
3914 3914 # prebuilt BUILD_JDK can also be supplied.
3915 3915
3916 3916
3917 3917 #
3918 3918 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3919 3919 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3920 3920 #
3921 3921 # This code is free software; you can redistribute it and/or modify it
3922 3922 # under the terms of the GNU General Public License version 2 only, as
3923 3923 # published by the Free Software Foundation. Oracle designates this
3924 3924 # particular file as subject to the "Classpath" exception as provided
3925 3925 # by Oracle in the LICENSE file that accompanied this code.
3926 3926 #
3927 3927 # This code is distributed in the hope that it will be useful, but WITHOUT
3928 3928 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3929 3929 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3930 3930 # version 2 for more details (a copy is included in the LICENSE file that
3931 3931 # accompanied this code).
3932 3932 #
3933 3933 # You should have received a copy of the GNU General Public License version
3934 3934 # 2 along with this work; if not, write to the Free Software Foundation,
3935 3935 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3936 3936 #
3937 3937 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3938 3938 # or visit www.oracle.com if you need additional information or have any
3939 3939 # questions.
3940 3940 #
3941 3941
3942 3942
3943 3943
3944 3944
3945 3945
3946 3946
3947 3947
3948 3948
3949 3949
3950 3950
3951 3951
3952 3952
3953 3953
3954 3954
3955 3955
3956 3956
3957 3957
3958 3958 ################################################################################
3959 3959 #
3960 3960 # Runs icecc-create-env once and prints the error if it fails
3961 3961 #
3962 3962 # $1: arguments to icecc-create-env
3963 3963 # $2: log file
3964 3964 #
3965 3965
3966 3966
3967 3967 ################################################################################
3968 3968 #
3969 3969 # Optionally enable distributed compilation of native code using icecc/icecream
3970 3970 #
3971 3971
3972 3972
3973 3973
3974 3974
3975 3975
3976 3976
3977 3977
3978 3978 #
3979 3979 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3980 3980 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3981 3981 #
3982 3982 # This code is free software; you can redistribute it and/or modify it
3983 3983 # under the terms of the GNU General Public License version 2 only, as
3984 3984 # published by the Free Software Foundation. Oracle designates this
3985 3985 # particular file as subject to the "Classpath" exception as provided
3986 3986 # by Oracle in the LICENSE file that accompanied this code.
3987 3987 #
3988 3988 # This code is distributed in the hope that it will be useful, but WITHOUT
3989 3989 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3990 3990 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3991 3991 # version 2 for more details (a copy is included in the LICENSE file that
3992 3992 # accompanied this code).
3993 3993 #
3994 3994 # You should have received a copy of the GNU General Public License version
3995 3995 # 2 along with this work; if not, write to the Free Software Foundation,
3996 3996 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3997 3997 #
3998 3998 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3999 3999 # or visit www.oracle.com if you need additional information or have any
4000 4000 # questions.
4001 4001 #
4002 4002
4003 4003 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4004 4004 # corresponding configure arguments instead
4005 4005
4006 4006
4007 4007 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4008 4008 # that configure can use them while detecting compilers.
4009 4009 # TOOLCHAIN_TYPE is available here.
4010 4010 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4011 4011
4012 4012
4013 4013
4014 4014
4015 4015
4016 4016
4017 4017 # Documentation on common flags used for solstudio in HIGHEST.
4018 4018 #
4019 4019 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4020 4020 # done with care, there are some assumptions below that need to
4021 4021 # be understood about the use of pointers, and IEEE behavior.
4022 4022 #
4023 4023 # -fns: Use non-standard floating point mode (not IEEE 754)
4024 4024 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4025 4025 # -fsingle: Use single precision floating point with 'float'
4026 4026 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4027 4027 # (Source with excessing pointer casting and data access with mixed
4028 4028 # pointer types are not recommended)
4029 4029 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4030 4030 # (If you expect perfect errno behavior, do not use this)
4031 4031 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4032 4032 # -xrestrict: Pointer parameters to functions do not overlap
4033 4033 # (Similar to -xalias_level=basic usage, but less obvious sometimes.
4034 4034 # If you pass in multiple pointers to the same data, do not use this)
4035 4035 # -xlibmil: Inline some library routines
4036 4036 # (If you expect perfect errno behavior, do not use this)
4037 4037 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4038 4038 # (If you expect perfect errno behavior, do not use this)
4039 4039 # Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4040 4040
4041 4041 # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4042 4042 # Bug?
4043 4043 #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4044 4044 # CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4045 4045 # CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4046 4046 #fi
4047 4047
4048 4048
4049 4049
4050 4050
4051 4051
4052 4052
4053 4053 ################################################################################
4054 4054 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4055 4055 # conditionals against.
4056 4056 # $2 - Optional prefix for each variable defined.
4057 4057
4058 4058
4059 4059 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4060 4060 # IF_FALSE: [RUN-IF-FALSE])
4061 4061 # ------------------------------------------------------------
4062 4062 # Check that the C compiler supports an argument
4063 4063
4064 4064
4065 4065
4066 4066
4067 4067 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4068 4068 # IF_FALSE: [RUN-IF-FALSE])
4069 4069 # ------------------------------------------------------------
4070 4070 # Check that the C++ compiler supports an argument
4071 4071
4072 4072
4073 4073
4074 4074
4075 4075 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4076 4076 # IF_FALSE: [RUN-IF-FALSE])
4077 4077 # ------------------------------------------------------------
4078 4078 # Check that the C and C++ compilers support an argument
4079 4079
4080 4080
4081 4081
4082 4082
4083 4083 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4084 4084 # IF_FALSE: [RUN-IF-FALSE])
4085 4085 # ------------------------------------------------------------
4086 4086 # Check that the linker support an argument
4087 4087
4088 4088
4089 4089
4090 4090
4091 4091
4092 4092
4093 4093 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4094 4094 # Arguments:
4095 4095 # $1 - Optional prefix for each variable defined.
4096 4096
4097 4097
4098 4098 #
4099 4099 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4100 4100 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4101 4101 #
4102 4102 # This code is free software; you can redistribute it and/or modify it
4103 4103 # under the terms of the GNU General Public License version 2 only, as
4104 4104 # published by the Free Software Foundation. Oracle designates this
4105 4105 # particular file as subject to the "Classpath" exception as provided
4106 4106 # by Oracle in the LICENSE file that accompanied this code.
4107 4107 #
4108 4108 # This code is distributed in the hope that it will be useful, but WITHOUT
4109 4109 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4110 4110 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4111 4111 # version 2 for more details (a copy is included in the LICENSE file that
4112 4112 # accompanied this code).
4113 4113 #
4114 4114 # You should have received a copy of the GNU General Public License version
4115 4115 # 2 along with this work; if not, write to the Free Software Foundation,
4116 4116 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4117 4117 #
4118 4118 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4119 4119 # or visit www.oracle.com if you need additional information or have any
4120 4120 # questions.
4121 4121 #
4122 4122
4123 4123
4124 4124
4125 4125
4126 4126
4127 4127 cygwin_help() {
4128 4128 case $1 in
4129 4129 unzip)
4130 4130 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4131 4131 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4132 4132 ;;
4133 4133 zip)
4134 4134 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4135 4135 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4136 4136 ;;
4137 4137 make)
4138 4138 PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4139 4139 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4140 4140 ;;
4141 4141 freetype)
4142 4142 HELP_MSG="
4143 4143 The freetype library can now be build during the configure process.
4144 4144 Download the freetype sources and unpack them into an arbitrary directory:
4145 4145
4146 4146 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4147 4147 tar -xzf freetype-2.5.3.tar.gz
4148 4148
4149 4149 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4150 4150 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4151 4151 builds or into '<freetype_src>/lib32' for 32-bit builds.
4152 4152 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4153 4153 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4154 4154
4155 4155 Alternatively you can unpack the sources like this to use the default directory:
4156 4156
4157 4157 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4158 4158 ;;
4159 4159 esac
4160 4160 }
4161 4161
4162 4162 msys_help() {
4163 4163 PKGHANDLER_COMMAND=""
4164 4164 }
4165 4165
4166 4166 apt_help() {
4167 4167 case $1 in
4168 4168 reduced)
4169 4169 PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4170 4170 devkit)
4171 4171 PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4172 4172 openjdk)
4173 4173 PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4174 4174 alsa)
4175 4175 PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4176 4176 cups)
4177 4177 PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4178 4178 freetype)
4179 4179 PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4180 4180 ffi)
4181 4181 PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4182 4182 x11)
4183 4183 PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4184 4184 ccache)
4185 4185 PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4186 4186 dtrace)
4187 4187 PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4188 4188 esac
4189 4189 }
4190 4190
4191 4191 yum_help() {
4192 4192 case $1 in
4193 4193 devkit)
4194 4194 PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4195 4195 openjdk)
4196 4196 PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4197 4197 alsa)
4198 4198 PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4199 4199 cups)
4200 4200 PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4201 4201 freetype)
4202 4202 PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4203 4203 x11)
4204 4204 PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4205 4205 ccache)
4206 4206 PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4207 4207 esac
4208 4208 }
4209 4209
4210 4210 port_help() {
4211 4211 PKGHANDLER_COMMAND=""
4212 4212 }
4213 4213
4214 4214 pkgutil_help() {
4215 4215 PKGHANDLER_COMMAND=""
4216 4216 }
4217 4217
4218 4218 pkgadd_help() {
4219 4219 PKGHANDLER_COMMAND=""
4220 4220 }
4221 4221
4222 4222 # This function will check if we're called from the "configure" wrapper while
4223 4223 # printing --help. If so, we will print out additional information that can
4224 4224 # only be extracted within the autoconf script, and then exit. This must be
4225 4225 # called at the very beginning in configure.ac.
4226 4226
4227 4227
4228 4228
4229 4229
4230 4230
4231 4231
4232 4232 #
4233 4233 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4234 4234 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4235 4235 #
4236 4236 # This code is free software; you can redistribute it and/or modify it
4237 4237 # under the terms of the GNU General Public License version 2 only, as
4238 4238 # published by the Free Software Foundation. Oracle designates this
4239 4239 # particular file as subject to the "Classpath" exception as provided
4240 4240 # by Oracle in the LICENSE file that accompanied this code.
4241 4241 #
4242 4242 # This code is distributed in the hope that it will be useful, but WITHOUT
4243 4243 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4244 4244 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4245 4245 # version 2 for more details (a copy is included in the LICENSE file that
4246 4246 # accompanied this code).
4247 4247 #
4248 4248 # You should have received a copy of the GNU General Public License version
4249 4249 # 2 along with this work; if not, write to the Free Software Foundation,
4250 4250 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4251 4251 #
4252 4252 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4253 4253 # or visit www.oracle.com if you need additional information or have any
4254 4254 # questions.
4255 4255 #
4256 4256
4257 4257 # All valid JVM features, regardless of platform
4258 4258 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4259 4259 fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4260 4260
4261 4261 # All valid JVM variants
4262 4262 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4263 4263
4264 4264 ###############################################################################
4265 4265 # Check if the specified JVM variant should be built. To be used in shell if
4266 4266 # constructs, like this:
4267 4267 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4268 4268 #
4269 4269 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4270 4270
4271 4271 # Definition kept in one line to allow inlining in if statements.
4272 4272 # Additional [] needed to keep m4 from mangling shell constructs.
4273 4273
4274 4274
4275 4275 ###############################################################################
4276 4276 # Check if the specified JVM features are explicitly enabled. To be used in
4277 4277 # shell if constructs, like this:
4278 4278 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4279 4279 #
4280 4280 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4281 4281
4282 4282 # Definition kept in one line to allow inlining in if statements.
4283 4283 # Additional [] needed to keep m4 from mangling shell constructs.
4284 4284
4285 4285
4286 4286 ###############################################################################
4287 4287 # Check which variants of the JVM that we want to build. Available variants are:
4288 4288 # server: normal interpreter, and a tiered C1/C2 compiler
4289 4289 # client: normal interpreter, and C1 (no C2 compiler)
4290 4290 # minimal: reduced form of client with optional features stripped out
4291 4291 # core: normal interpreter only, no compiler
4292 4292 # zero: C++ based interpreter only, no compiler
4293 4293 # zeroshark: C++ based interpreter, and a llvm-based compiler
4294 4294 # custom: baseline JVM with no default features
4295 4295 #
4296 4296
4297 4297
4298 4298 ###############################################################################
4299 4299 # Check if dtrace should be enabled and has all prerequisites present.
4300 4300 #
4301 4301
4302 4302
4303 4303 ###############################################################################
4304 4304 # Set up all JVM features for each JVM variant.
4305 4305 #
4306 4306
4307 4307
4308 4308 ###############################################################################
4309 4309 # Validate JVM features once all setup is complete, including custom setup.
4310 4310 #
4311 4311
4312 4312
4313 4313 ################################################################################
4314 4314 # Check if gtest should be built
4315 4315 #
4316 4316
4317 4317
4318 4318 #
4319 4319 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4320 4320 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4321 4321 #
4322 4322 # This code is free software; you can redistribute it and/or modify it
4323 4323 # under the terms of the GNU General Public License version 2 only, as
4324 4324 # published by the Free Software Foundation. Oracle designates this
4325 4325 # particular file as subject to the "Classpath" exception as provided
4326 4326 # by Oracle in the LICENSE file that accompanied this code.
4327 4327 #
4328 4328 # This code is distributed in the hope that it will be useful, but WITHOUT
4329 4329 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4330 4330 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4331 4331 # version 2 for more details (a copy is included in the LICENSE file that
4332 4332 # accompanied this code).
4333 4333 #
4334 4334 # You should have received a copy of the GNU General Public License version
4335 4335 # 2 along with this work; if not, write to the Free Software Foundation,
4336 4336 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4337 4337 #
4338 4338 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4339 4339 # or visit www.oracle.com if you need additional information or have any
4340 4340 # questions.
4341 4341 #
4342 4342
4343 4343 ###############################################################################
4344 4344 # Check which variant of the JDK that we want to build.
4345 4345 # Currently we have:
4346 4346 # normal: standard edition
4347 4347 # but the custom make system may add other variants
4348 4348 #
4349 4349 # Effectively the JDK variant gives a name to a specific set of
4350 4350 # modules to compile into the JDK.
4351 4351
4352 4352
4353 4353 ###############################################################################
4354 4354 # Set the debug level
4355 4355 # release: no debug information, all optimizations, no asserts.
4356 4356 # optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4357 4357 # fastdebug: debug information (-g), all optimizations, all asserts
4358 4358 # slowdebug: debug information (-g), no optimizations, all asserts
4359 4359
4360 4360
4361 4361 ###############################################################################
4362 4362 #
4363 4363 # Should we build only OpenJDK even if closed sources are present?
4364 4364 #
4365 4365
4366 4366
4367 4367
4368 4368
4369 4369 ###############################################################################
4370 4370 #
4371 4371 # Enable or disable the elliptic curve crypto implementation
4372 4372 #
4373 4373
4374 4374
4375 4375
4376 4376
4377 4377 ################################################################################
4378 4378 #
4379 4379 # Gcov coverage data for hotspot
4380 4380 #
4381 4381
4382 4382
4383 4383 ################################################################################
4384 4384 #
4385 4385 # Static build support. When enabled will generate static
4386 4386 # libraries instead of shared libraries for all JDK libs.
4387 4387 #
4388 4388
4389 4389
4390 4390 ################################################################################
4391 4391 #
4392 4392 # jlink options.
4393 4393 # We always keep packaged modules in JDK image.
4394 4394 #
4395 4395
4396 4396
4397 4397 ################################################################################
4398 4398 #
4399 4399 # Check if building of the jtreg failure handler should be enabled.
4400 4400 #
4401 4401
4402 4402
4403 4403 ################################################################################
4404 4404 #
4405 4405 # Enable or disable generation of the classlist at build time
4406 4406 #
4407 4407
4408 4408
4409 4409 #
4410 4410 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4411 4411 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4412 4412 #
4413 4413 # This code is free software; you can redistribute it and/or modify it
4414 4414 # under the terms of the GNU General Public License version 2 only, as
4415 4415 # published by the Free Software Foundation. Oracle designates this
4416 4416 # particular file as subject to the "Classpath" exception as provided
4417 4417 # by Oracle in the LICENSE file that accompanied this code.
4418 4418 #
4419 4419 # This code is distributed in the hope that it will be useful, but WITHOUT
4420 4420 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4421 4421 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4422 4422 # version 2 for more details (a copy is included in the LICENSE file that
4423 4423 # accompanied this code).
4424 4424 #
4425 4425 # You should have received a copy of the GNU General Public License version
4426 4426 # 2 along with this work; if not, write to the Free Software Foundation,
4427 4427 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4428 4428 #
4429 4429 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4430 4430 # or visit www.oracle.com if you need additional information or have any
4431 4431 # questions.
4432 4432 #
4433 4433
4434 4434 ###############################################################################
4435 4435 #
4436 4436 # Setup version numbers
4437 4437 #
4438 4438
4439 4439 # Verify that a given string represents a valid version number, and assign it
4440 4440 # to a variable.
4441 4441
4442 4442 # Argument 1: the variable to assign to
4443 4443 # Argument 2: the value given by the user
4444 4444
4445 4445
4446 4446
4447 4447
4448 4448 #
4449 4449 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4450 4450 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4451 4451 #
4452 4452 # This code is free software; you can redistribute it and/or modify it
4453 4453 # under the terms of the GNU General Public License version 2 only, as
4454 4454 # published by the Free Software Foundation. Oracle designates this
4455 4455 # particular file as subject to the "Classpath" exception as provided
4456 4456 # by Oracle in the LICENSE file that accompanied this code.
4457 4457 #
4458 4458 # This code is distributed in the hope that it will be useful, but WITHOUT
4459 4459 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4460 4460 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4461 4461 # version 2 for more details (a copy is included in the LICENSE file that
4462 4462 # accompanied this code).
4463 4463 #
4464 4464 # You should have received a copy of the GNU General Public License version
4465 4465 # 2 along with this work; if not, write to the Free Software Foundation,
4466 4466 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4467 4467 #
4468 4468 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4469 4469 # or visit www.oracle.com if you need additional information or have any
4470 4470 # questions.
4471 4471 #
4472 4472
4473 4473 # Major library component reside in separate files.
4474 4474 #
4475 4475 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4476 4476 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4477 4477 #
4478 4478 # This code is free software; you can redistribute it and/or modify it
4479 4479 # under the terms of the GNU General Public License version 2 only, as
4480 4480 # published by the Free Software Foundation. Oracle designates this
4481 4481 # particular file as subject to the "Classpath" exception as provided
4482 4482 # by Oracle in the LICENSE file that accompanied this code.
4483 4483 #
4484 4484 # This code is distributed in the hope that it will be useful, but WITHOUT
4485 4485 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4486 4486 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4487 4487 # version 2 for more details (a copy is included in the LICENSE file that
4488 4488 # accompanied this code).
4489 4489 #
4490 4490 # You should have received a copy of the GNU General Public License version
4491 4491 # 2 along with this work; if not, write to the Free Software Foundation,
4492 4492 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4493 4493 #
4494 4494 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4495 4495 # or visit www.oracle.com if you need additional information or have any
4496 4496 # questions.
4497 4497 #
4498 4498
4499 4499 ################################################################################
4500 4500 # Setup alsa (Advanced Linux Sound Architecture)
4501 4501 ################################################################################
4502 4502
4503 4503
4504 4504 #
4505 4505 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4506 4506 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4507 4507 #
4508 4508 # This code is free software; you can redistribute it and/or modify it
4509 4509 # under the terms of the GNU General Public License version 2 only, as
4510 4510 # published by the Free Software Foundation. Oracle designates this
4511 4511 # particular file as subject to the "Classpath" exception as provided
4512 4512 # by Oracle in the LICENSE file that accompanied this code.
4513 4513 #
4514 4514 # This code is distributed in the hope that it will be useful, but WITHOUT
4515 4515 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4516 4516 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4517 4517 # version 2 for more details (a copy is included in the LICENSE file that
4518 4518 # accompanied this code).
4519 4519 #
4520 4520 # You should have received a copy of the GNU General Public License version
4521 4521 # 2 along with this work; if not, write to the Free Software Foundation,
4522 4522 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4523 4523 #
4524 4524 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4525 4525 # or visit www.oracle.com if you need additional information or have any
4526 4526 # questions.
4527 4527 #
4528 4528
4529 4529 ################################################################################
4530 4530 # Setup bundled libraries.
4531 4531 #
4532 4532 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4533 4533 # OpenJDK repository. Default is to use these libraries as bundled, but they
4534 4534 # might be replaced by en external version by the user.
4535 4535 ################################################################################
4536 4536
4537 4537
4538 4538 ################################################################################
4539 4539 # Setup libjpeg
4540 4540 ################################################################################
4541 4541
4542 4542
4543 4543 ################################################################################
4544 4544 # Setup giflib
4545 4545 ################################################################################
4546 4546
4547 4547
4548 4548 ################################################################################
4549 4549 # Setup libpng
4550 4550 ################################################################################
4551 4551
4552 4552
4553 4553 ################################################################################
4554 4554 # Setup zlib
4555 4555 ################################################################################
4556 4556
4557 4557
4558 4558 ################################################################################
4559 4559 # Setup lcms (Little CMS)
4560 4560 ################################################################################
4561 4561
4562 4562
4563 4563 #
4564 4564 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4565 4565 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4566 4566 #
4567 4567 # This code is free software; you can redistribute it and/or modify it
4568 4568 # under the terms of the GNU General Public License version 2 only, as
4569 4569 # published by the Free Software Foundation. Oracle designates this
4570 4570 # particular file as subject to the "Classpath" exception as provided
4571 4571 # by Oracle in the LICENSE file that accompanied this code.
4572 4572 #
4573 4573 # This code is distributed in the hope that it will be useful, but WITHOUT
4574 4574 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4575 4575 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4576 4576 # version 2 for more details (a copy is included in the LICENSE file that
4577 4577 # accompanied this code).
4578 4578 #
4579 4579 # You should have received a copy of the GNU General Public License version
4580 4580 # 2 along with this work; if not, write to the Free Software Foundation,
4581 4581 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4582 4582 #
4583 4583 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4584 4584 # or visit www.oracle.com if you need additional information or have any
4585 4585 # questions.
4586 4586 #
4587 4587
4588 4588 ################################################################################
4589 4589 # Setup cups (Common Unix Printing System)
4590 4590 ################################################################################
4591 4591
4592 4592
4593 4593 #
4594 4594 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4595 4595 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4596 4596 #
4597 4597 # This code is free software; you can redistribute it and/or modify it
4598 4598 # under the terms of the GNU General Public License version 2 only, as
4599 4599 # published by the Free Software Foundation. Oracle designates this
4600 4600 # particular file as subject to the "Classpath" exception as provided
4601 4601 # by Oracle in the LICENSE file that accompanied this code.
4602 4602 #
4603 4603 # This code is distributed in the hope that it will be useful, but WITHOUT
4604 4604 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4605 4605 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4606 4606 # version 2 for more details (a copy is included in the LICENSE file that
4607 4607 # accompanied this code).
4608 4608 #
4609 4609 # You should have received a copy of the GNU General Public License version
4610 4610 # 2 along with this work; if not, write to the Free Software Foundation,
4611 4611 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4612 4612 #
4613 4613 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4614 4614 # or visit www.oracle.com if you need additional information or have any
4615 4615 # questions.
4616 4616 #
4617 4617
4618 4618 ################################################################################
4619 4619 # Setup libffi (Foreign Function Interface)
4620 4620 ################################################################################
4621 4621
4622 4622
4623 4623 #
4624 4624 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4625 4625 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4626 4626 #
4627 4627 # This code is free software; you can redistribute it and/or modify it
4628 4628 # under the terms of the GNU General Public License version 2 only, as
4629 4629 # published by the Free Software Foundation. Oracle designates this
4630 4630 # particular file as subject to the "Classpath" exception as provided
4631 4631 # by Oracle in the LICENSE file that accompanied this code.
4632 4632 #
4633 4633 # This code is distributed in the hope that it will be useful, but WITHOUT
4634 4634 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4635 4635 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4636 4636 # version 2 for more details (a copy is included in the LICENSE file that
4637 4637 # accompanied this code).
4638 4638 #
4639 4639 # You should have received a copy of the GNU General Public License version
4640 4640 # 2 along with this work; if not, write to the Free Software Foundation,
4641 4641 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4642 4642 #
4643 4643 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4644 4644 # or visit www.oracle.com if you need additional information or have any
4645 4645 # questions.
4646 4646 #
4647 4647
4648 4648 ################################################################################
4649 4649 # Build the freetype lib from source
4650 4650 ################################################################################
4651 4651
4652 4652
4653 4653 ################################################################################
4654 4654 # Check if a potential freeype library match is correct and usable
4655 4655 ################################################################################
4656 4656
4657 4657
4658 4658 ################################################################################
4659 4659 # Setup freetype (The FreeType2 font rendering library)
4660 4660 ################################################################################
4661 4661
4662 4662
4663 4663 #
4664 4664 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4665 4665 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4666 4666 #
4667 4667 # This code is free software; you can redistribute it and/or modify it
4668 4668 # under the terms of the GNU General Public License version 2 only, as
4669 4669 # published by the Free Software Foundation. Oracle designates this
4670 4670 # particular file as subject to the "Classpath" exception as provided
4671 4671 # by Oracle in the LICENSE file that accompanied this code.
4672 4672 #
4673 4673 # This code is distributed in the hope that it will be useful, but WITHOUT
4674 4674 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4675 4675 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4676 4676 # version 2 for more details (a copy is included in the LICENSE file that
4677 4677 # accompanied this code).
4678 4678 #
4679 4679 # You should have received a copy of the GNU General Public License version
4680 4680 # 2 along with this work; if not, write to the Free Software Foundation,
4681 4681 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4682 4682 #
4683 4683 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4684 4684 # or visit www.oracle.com if you need additional information or have any
4685 4685 # questions.
4686 4686 #
4687 4687
4688 4688 ################################################################################
4689 4689 # Setup the standard C/C++ runtime libraries.
4690 4690 #
4691 4691 # Most importantly, determine if stdc++ should be linked statically or
4692 4692 # dynamically.
4693 4693 ################################################################################
4694 4694
4695 4695
4696 4696 #
4697 4697 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4698 4698 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4699 4699 #
4700 4700 # This code is free software; you can redistribute it and/or modify it
4701 4701 # under the terms of the GNU General Public License version 2 only, as
4702 4702 # published by the Free Software Foundation. Oracle designates this
4703 4703 # particular file as subject to the "Classpath" exception as provided
4704 4704 # by Oracle in the LICENSE file that accompanied this code.
4705 4705 #
4706 4706 # This code is distributed in the hope that it will be useful, but WITHOUT
4707 4707 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4708 4708 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4709 4709 # version 2 for more details (a copy is included in the LICENSE file that
4710 4710 # accompanied this code).
4711 4711 #
4712 4712 # You should have received a copy of the GNU General Public License version
4713 4713 # 2 along with this work; if not, write to the Free Software Foundation,
4714 4714 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4715 4715 #
4716 4716 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4717 4717 # or visit www.oracle.com if you need additional information or have any
4718 4718 # questions.
4719 4719 #
4720 4720
4721 4721 ################################################################################
4722 4722 # Setup X11 Windows system
4723 4723 ################################################################################
4724 4724
4725 4725
4726 4726
4727 4727 ################################################################################
4728 4728 # Determine which libraries are needed for this configuration
4729 4729 ################################################################################
4730 4730
4731 4731
4732 4732 ################################################################################
4733 4733 # Parse library options, and setup needed libraries
4734 4734 ################################################################################
4735 4735
4736 4736
4737 4737 ################################################################################
4738 4738 # Setup llvm (Low-Level VM)
4739 4739 ################################################################################
4740 4740
4741 4741
4742 4742 ################################################################################
4743 4743 # Setup various libraries, typically small system libraries
4744 4744 ################################################################################
4745 4745
4746 4746
4747 4747 ################################################################################
4748 4748 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4749 4749 # redistribute it in the test image.
4750 4750 ################################################################################
4751 4751
4752 4752
4753 4753
4754 4754 #
4755 4755 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4756 4756 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4757 4757 #
4758 4758 # This code is free software; you can redistribute it and/or modify it
4759 4759 # under the terms of the GNU General Public License version 2 only, as
4760 4760 # published by the Free Software Foundation. Oracle designates this
4761 4761 # particular file as subject to the "Classpath" exception as provided
4762 4762 # by Oracle in the LICENSE file that accompanied this code.
4763 4763 #
4764 4764 # This code is distributed in the hope that it will be useful, but WITHOUT
4765 4765 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4766 4766 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4767 4767 # version 2 for more details (a copy is included in the LICENSE file that
4768 4768 # accompanied this code).
4769 4769 #
4770 4770 # You should have received a copy of the GNU General Public License version
4771 4771 # 2 along with this work; if not, write to the Free Software Foundation,
4772 4772 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4773 4773 #
4774 4774 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4775 4775 # or visit www.oracle.com if you need additional information or have any
4776 4776 # questions.
4777 4777 #
4778 4778
4779 4779 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4780 4780 # Converts autoconf style CPU name to OpenJDK style, into
4781 4781 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4782 4782
4783 4783
4784 4784 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4785 4785 # Converts autoconf style OS name to OpenJDK style, into
4786 4786 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4787 4787
4788 4788
4789 4789 # Expects $host_os $host_cpu $build_os and $build_cpu
4790 4790 # and $with_target_bits to have been setup!
4791 4791 #
4792 4792 # Translate the standard triplet(quadruplet) definition
4793 4793 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4794 4794 # OPENJDK_BUILD_OS, etc.
4795 4795
4796 4796
4797 4797 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4798 4798 # accordingly. Must be done after setting up build and target system, but before
4799 4799 # doing anything else with these values.
4800 4800
4801 4801
4802 4802 # Setup the legacy variables, for controlling the old makefiles.
4803 4803 #
4804 4804
4805 4805
4806 4806 # $1 - Either TARGET or BUILD to setup the variables for.
4807 4807
4808 4808
4809 4809
4810 4810
4811 4811 #%%% Build and target systems %%%
4812 4812
4813 4813
4814 4814
4815 4815
4816 4816 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4817 4817 # Add -mX to various FLAGS variables.
4818 4818
4819 4819
4820 4820
4821 4821
4822 4822
4823 4823
4824 4824 #
4825 4825 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4826 4826 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4827 4827 #
4828 4828 # This code is free software; you can redistribute it and/or modify it
4829 4829 # under the terms of the GNU General Public License version 2 only, as
4830 4830 # published by the Free Software Foundation. Oracle designates this
4831 4831 # particular file as subject to the "Classpath" exception as provided
4832 4832 # by Oracle in the LICENSE file that accompanied this code.
4833 4833 #
4834 4834 # This code is distributed in the hope that it will be useful, but WITHOUT
4835 4835 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4836 4836 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4837 4837 # version 2 for more details (a copy is included in the LICENSE file that
4838 4838 # accompanied this code).
4839 4839 #
4840 4840 # You should have received a copy of the GNU General Public License version
4841 4841 # 2 along with this work; if not, write to the Free Software Foundation,
4842 4842 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4843 4843 #
4844 4844 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4845 4845 # or visit www.oracle.com if you need additional information or have any
4846 4846 # questions.
4847 4847 #
4848 4848
4849 4849
4850 4850
4851 4851
4852 4852
4853 4853
4854 4854
4855 4855 ################################################################################
4856 4856 # Define a mechanism for importing extra prebuilt modules
4857 4857 #
4858 4858
4859 4859
4860 4860
4861 4861 #
4862 4862 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4863 4863 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4864 4864 #
4865 4865 # This code is free software; you can redistribute it and/or modify it
4866 4866 # under the terms of the GNU General Public License version 2 only, as
4867 4867 # published by the Free Software Foundation. Oracle designates this
4868 4868 # particular file as subject to the "Classpath" exception as provided
4869 4869 # by Oracle in the LICENSE file that accompanied this code.
4870 4870 #
4871 4871 # This code is distributed in the hope that it will be useful, but WITHOUT
4872 4872 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4873 4873 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4874 4874 # version 2 for more details (a copy is included in the LICENSE file that
4875 4875 # accompanied this code).
4876 4876 #
4877 4877 # You should have received a copy of the GNU General Public License version
4878 4878 # 2 along with this work; if not, write to the Free Software Foundation,
4879 4879 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4880 4880 #
4881 4881 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4882 4882 # or visit www.oracle.com if you need additional information or have any
4883 4883 # questions.
4884 4884 #
4885 4885
4886 4886 ########################################################################
4887 4887 # This file is responsible for detecting, verifying and setting up the
4888 4888 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4889 4889 # proper paths to the binaries, but it will not setup any flags.
4890 4890 #
4891 4891 # The binaries used is determined by the toolchain type, which is the family of
4892 4892 # compilers and related tools that are used.
4893 4893 ########################################################################
4894 4894
4895 4895
4896 4896 # All valid toolchains, regardless of platform (used by help.m4)
4897 4897 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4898 4898
4899 4899 # These toolchains are valid on different platforms
4900 4900 VALID_TOOLCHAINS_linux="gcc clang"
4901 4901 VALID_TOOLCHAINS_solaris="solstudio"
4902 4902 VALID_TOOLCHAINS_macosx="gcc clang"
4903 4903 VALID_TOOLCHAINS_aix="xlc"
4904 4904 VALID_TOOLCHAINS_windows="microsoft"
4905 4905
4906 4906 # Toolchain descriptions
4907 4907 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4908 4908 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4909 4909 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4910 4910 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4911 4911 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4912 4912
4913 4913 # Minimum supported versions, empty means unspecified
4914 4914 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4915 4915 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4916 4916 TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4917 4917 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4918 4918 TOOLCHAIN_MINIMUM_VERSION_xlc=""
4919 4919
4920 4920 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4921 4921 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4922 4922 # $1 - optional variable prefix for compiler and version variables (BUILD_)
4923 4923 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4924 4924
4925 4925
4926 4926 # Check if the configured compiler (C and C++) is of a specific version or
4927 4927 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4928 4928 #
4929 4929 # Arguments:
4930 4930 # VERSION: The version string to check against the found version
4931 4931 # IF_AT_LEAST: block to run if the compiler is at least this version (>=)
4932 4932 # IF_OLDER_THAN: block to run if the compiler is older than this version (<)
4933 4933 # PREFIX: Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4934 4934
4935 4935
4936 4936
4937 4937
4938 4938 # Setup a number of variables describing how native output files are
4939 4939 # named on this platform/toolchain.
4940 4940
4941 4941
4942 4942 # Determine which toolchain type to use, and make sure it is valid for this
4943 4943 # platform. Setup various information about the selected toolchain.
4944 4944
4945 4945
4946 4946 # Before we start detecting the toolchain executables, we might need some
4947 4947 # special setup, e.g. additional paths etc.
4948 4948
4949 4949
4950 4950 # Restore path, etc
4951 4951
4952 4952
4953 4953 # Check if a compiler is of the toolchain type we expect, and save the version
4954 4954 # information from it. If the compiler does not match the expected type,
4955 4955 # this function will abort using AC_MSG_ERROR. If it matches, the version will
4956 4956 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4957 4957 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4958 4958 #
4959 4959 # $1 = compiler to test (CC or CXX)
4960 4960 # $2 = human readable name of compiler (C or C++)
4961 4961
4962 4962
4963 4963 # Try to locate the given C or C++ compiler in the path, or otherwise.
4964 4964 #
4965 4965 # $1 = compiler to test (CC or CXX)
4966 4966 # $2 = human readable name of compiler (C or C++)
4967 4967 # $3 = list of compiler names to search for
4968 4968
4969 4969
4970 4970 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4971 4971 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4972 4972 # archiver (AR). Verify that the compilers are correct according to the
4973 4973 # toolchain type.
4974 4974
4975 4975
4976 4976 # Setup additional tools that is considered a part of the toolchain, but not the
4977 4977 # core part. Many of these are highly platform-specific and do not exist,
4978 4978 # and/or are not needed on all platforms.
4979 4979
4980 4980
4981 4981 # Setup the build tools (i.e, the compiler and linker used to build programs
4982 4982 # that should be run on the build platform, not the target platform, as a build
4983 4983 # helper). Since the non-cross-compile case uses the normal, target compilers
4984 4984 # for this, we can only do this after these have been setup.
4985 4985
4986 4986
4987 4987 # Setup legacy variables that are still needed as alternative ways to refer to
4988 4988 # parts of the toolchain.
4989 4989
4990 4990
4991 4991 # Do some additional checks on the detected tools.
4992 4992
4993 4993
4994 4994 # Setup the JTReg Regression Test Harness.
4995 4995
4996 4996
4997 4997 #
4998 4998 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4999 4999 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5000 5000 #
5001 5001 # This code is free software; you can redistribute it and/or modify it
5002 5002 # under the terms of the GNU General Public License version 2 only, as
5003 5003 # published by the Free Software Foundation. Oracle designates this
5004 5004 # particular file as subject to the "Classpath" exception as provided
5005 5005 # by Oracle in the LICENSE file that accompanied this code.
5006 5006 #
5007 5007 # This code is distributed in the hope that it will be useful, but WITHOUT
5008 5008 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5009 5009 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5010 5010 # version 2 for more details (a copy is included in the LICENSE file that
5011 5011 # accompanied this code).
5012 5012 #
5013 5013 # You should have received a copy of the GNU General Public License version
5014 5014 # 2 along with this work; if not, write to the Free Software Foundation,
5015 5015 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5016 5016 #
5017 5017 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5018 5018 # or visit www.oracle.com if you need additional information or have any
5019 5019 # questions.
5020 5020 #
5021 5021
5022 5022 ################################################################################
5023 5023 # The order of these defines the priority by which we try to find them.
5024 5024 VALID_VS_VERSIONS="2013 2012 2010"
5025 5025
5026 5026 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5027 5027 VS_VERSION_INTERNAL_2010=100
5028 5028 VS_MSVCR_2010=msvcr100.dll
5029 5029 # We don't use msvcp on Visual Studio 2010
5030 5030 #VS_MSVCP_2010=msvcp100.dll
5031 5031 VS_ENVVAR_2010="VS100COMNTOOLS"
5032 5032 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5033 5033 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5034 5034 VS_VS_PLATFORM_NAME_2010="v100"
5035 5035 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5036 5036
5037 5037 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5038 5038 VS_VERSION_INTERNAL_2012=110
5039 5039 VS_MSVCR_2012=msvcr110.dll
5040 5040 VS_MSVCP_2012=msvcp110.dll
5041 5041 VS_ENVVAR_2012="VS110COMNTOOLS"
5042 5042 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5043 5043 VS_SDK_INSTALLDIR_2012=
5044 5044 VS_VS_PLATFORM_NAME_2012="v110"
5045 5045 VS_SDK_PLATFORM_NAME_2012=
5046 5046
5047 5047 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5048 5048 VS_VERSION_INTERNAL_2013=120
5049 5049 VS_MSVCR_2013=msvcr120.dll
5050 5050 VS_MSVCP_2013=msvcp120.dll
5051 5051 VS_ENVVAR_2013="VS120COMNTOOLS"
5052 5052 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5053 5053 VS_SDK_INSTALLDIR_2013=
5054 5054 VS_VS_PLATFORM_NAME_2013="v120"
5055 5055 VS_SDK_PLATFORM_NAME_2013=
5056 5056
5057 5057 ################################################################################
5058 5058
5059 5059
5060 5060
5061 5061 ################################################################################
5062 5062
5063 5063
5064 5064
5065 5065 ################################################################################
5066 5066 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5067 5067 # build environment and assigns it to VS_ENV_CMD
5068 5068
5069 5069
5070 5070 ################################################################################
5071 5071
5072 5072
5073 5073
5074 5074 ################################################################################
5075 5075 # Check if the VS env variables were setup prior to running configure.
5076 5076 # If not, then find vcvarsall.bat and run it automatically, and integrate
5077 5077 # the set env variables into the spec file.
5078 5078
5079 5079
5080 5080
5081 5081
5082 5082
5083 5083
5084 5084
5085 5085
5086 5086
5087 5087
↓ open down ↓ |
5087 lines elided |
↑ open up ↑ |
5088 5088
5089 5089
5090 5090
5091 5091
5092 5092 # This line needs to be here, verbatim, after all includes and the dummy hook
5093 5093 # definitions. It is replaced with custom functionality when building
5094 5094 # custom sources.
5095 5095 #CUSTOM_AUTOCONF_INCLUDE
5096 5096
5097 5097 # Do not change or remove the following line, it is needed for consistency checks:
5098 -DATE_WHEN_GENERATED=1470863189
5098 +DATE_WHEN_GENERATED=1472744188
5099 5099
5100 5100 ###############################################################################
5101 5101 #
5102 5102 # Initialization / Boot-strapping
5103 5103 #
5104 5104 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5105 5105 # thus it jumps back and forth, each time gaining something needed later on.
5106 5106 #
5107 5107 ###############################################################################
5108 5108
5109 5109 # If we are requested to print additional help, do that and then exit.
5110 5110 # This must be the very first call.
5111 5111
5112 5112 if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5113 5113
5114 5114 # Print available toolchains
5115 5115 $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5116 5116 $PRINTF "Which are valid to use depends on the build platform.\n"
5117 5117 for toolchain in $VALID_TOOLCHAINS_all; do
5118 5118 # Use indirect variable referencing
5119 5119 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5120 5120 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5121 5121 $PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5122 5122 done
5123 5123 $PRINTF "\n"
5124 5124
5125 5125 # Print available jvm features
5126 5126 $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5127 5127 $PRINTF "Which are valid to use depends on the target platform.\n "
5128 5128 $PRINTF "%s " $VALID_JVM_FEATURES
5129 5129 $PRINTF "\n"
5130 5130
5131 5131 # And now exit directly
5132 5132 exit 0
5133 5133 fi
5134 5134
5135 5135
5136 5136 # Basic initialization that must happen first of all in the normal process.
5137 5137
5138 5138 # Save the original command line. This is passed to us by the wrapper configure script.
5139 5139
5140 5140 # Save the path variable before it gets changed
5141 5141 ORIGINAL_PATH="$PATH"
5142 5142
5143 5143 DATE_WHEN_CONFIGURED=`LANG=C date`
5144 5144
5145 5145 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5146 5146 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5147 5147 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5148 5148 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5149 5149
5150 5150
5151 5151 # Start with tools that do not need have cross compilation support
5152 5152 # and can be expected to be found in the default PATH. These tools are
5153 5153 # used by configure.
5154 5154
5155 5155 # First are all the simple required tools.
5156 5156
5157 5157
5158 5158
5159 5159 # Publish this variable in the help.
5160 5160
5161 5161
5162 5162 if [ -z "${BASENAME+x}" ]; then
5163 5163 # The variable is not set by user, try to locate tool using the code snippet
5164 5164 for ac_prog in basename
5165 5165 do
5166 5166 # Extract the first word of "$ac_prog", so it can be a program name with args.
5167 5167 set dummy $ac_prog; ac_word=$2
5168 5168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5169 5169 $as_echo_n "checking for $ac_word... " >&6; }
5170 5170 if ${ac_cv_path_BASENAME+:} false; then :
5171 5171 $as_echo_n "(cached) " >&6
5172 5172 else
5173 5173 case $BASENAME in
5174 5174 [\\/]* | ?:[\\/]*)
5175 5175 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5176 5176 ;;
5177 5177 *)
5178 5178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5179 5179 for as_dir in $PATH
5180 5180 do
5181 5181 IFS=$as_save_IFS
5182 5182 test -z "$as_dir" && as_dir=.
5183 5183 for ac_exec_ext in '' $ac_executable_extensions; do
5184 5184 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5185 5185 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5186 5186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5187 5187 break 2
5188 5188 fi
5189 5189 done
5190 5190 done
5191 5191 IFS=$as_save_IFS
5192 5192
5193 5193 ;;
5194 5194 esac
5195 5195 fi
5196 5196 BASENAME=$ac_cv_path_BASENAME
5197 5197 if test -n "$BASENAME"; then
5198 5198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5199 5199 $as_echo "$BASENAME" >&6; }
5200 5200 else
5201 5201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5202 5202 $as_echo "no" >&6; }
5203 5203 fi
5204 5204
5205 5205
5206 5206 test -n "$BASENAME" && break
5207 5207 done
5208 5208
5209 5209 else
5210 5210 # The variable is set, but is it from the command line or the environment?
5211 5211
5212 5212 # Try to remove the string !BASENAME! from our list.
5213 5213 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5214 5214 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5215 5215 # If it failed, the variable was not from the command line. Ignore it,
5216 5216 # but warn the user (except for BASH, which is always set by the calling BASH).
5217 5217 if test "xBASENAME" != xBASH; then
5218 5218 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5219 5219 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5220 5220 fi
5221 5221 # Try to locate tool using the code snippet
5222 5222 for ac_prog in basename
5223 5223 do
5224 5224 # Extract the first word of "$ac_prog", so it can be a program name with args.
5225 5225 set dummy $ac_prog; ac_word=$2
5226 5226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5227 5227 $as_echo_n "checking for $ac_word... " >&6; }
5228 5228 if ${ac_cv_path_BASENAME+:} false; then :
5229 5229 $as_echo_n "(cached) " >&6
5230 5230 else
5231 5231 case $BASENAME in
5232 5232 [\\/]* | ?:[\\/]*)
5233 5233 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5234 5234 ;;
5235 5235 *)
5236 5236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5237 5237 for as_dir in $PATH
5238 5238 do
5239 5239 IFS=$as_save_IFS
5240 5240 test -z "$as_dir" && as_dir=.
5241 5241 for ac_exec_ext in '' $ac_executable_extensions; do
5242 5242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5243 5243 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5244 5244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5245 5245 break 2
5246 5246 fi
5247 5247 done
5248 5248 done
5249 5249 IFS=$as_save_IFS
5250 5250
5251 5251 ;;
5252 5252 esac
5253 5253 fi
5254 5254 BASENAME=$ac_cv_path_BASENAME
5255 5255 if test -n "$BASENAME"; then
5256 5256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5257 5257 $as_echo "$BASENAME" >&6; }
5258 5258 else
5259 5259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5260 5260 $as_echo "no" >&6; }
5261 5261 fi
5262 5262
5263 5263
5264 5264 test -n "$BASENAME" && break
5265 5265 done
5266 5266
5267 5267 else
5268 5268 # If it succeeded, then it was overridden by the user. We will use it
5269 5269 # for the tool.
5270 5270
5271 5271 # First remove it from the list of overridden variables, so we can test
5272 5272 # for unknown variables in the end.
5273 5273 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5274 5274
5275 5275 # Check if we try to supply an empty value
5276 5276 if test "x$BASENAME" = x; then
5277 5277 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5278 5278 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5279 5279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5280 5280 $as_echo_n "checking for BASENAME... " >&6; }
5281 5281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5282 5282 $as_echo "disabled" >&6; }
5283 5283 else
5284 5284 # Check if the provided tool contains a complete path.
5285 5285 tool_specified="$BASENAME"
5286 5286 tool_basename="${tool_specified##*/}"
5287 5287 if test "x$tool_basename" = "x$tool_specified"; then
5288 5288 # A command without a complete path is provided, search $PATH.
5289 5289 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5290 5290 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5291 5291 # Extract the first word of "$tool_basename", so it can be a program name with args.
5292 5292 set dummy $tool_basename; ac_word=$2
5293 5293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5294 5294 $as_echo_n "checking for $ac_word... " >&6; }
5295 5295 if ${ac_cv_path_BASENAME+:} false; then :
5296 5296 $as_echo_n "(cached) " >&6
5297 5297 else
5298 5298 case $BASENAME in
5299 5299 [\\/]* | ?:[\\/]*)
5300 5300 ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5301 5301 ;;
5302 5302 *)
5303 5303 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5304 5304 for as_dir in $PATH
5305 5305 do
5306 5306 IFS=$as_save_IFS
5307 5307 test -z "$as_dir" && as_dir=.
5308 5308 for ac_exec_ext in '' $ac_executable_extensions; do
5309 5309 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5310 5310 ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5311 5311 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5312 5312 break 2
5313 5313 fi
5314 5314 done
5315 5315 done
5316 5316 IFS=$as_save_IFS
5317 5317
5318 5318 ;;
5319 5319 esac
5320 5320 fi
5321 5321 BASENAME=$ac_cv_path_BASENAME
5322 5322 if test -n "$BASENAME"; then
5323 5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5324 5324 $as_echo "$BASENAME" >&6; }
5325 5325 else
5326 5326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5327 5327 $as_echo "no" >&6; }
5328 5328 fi
5329 5329
5330 5330
5331 5331 if test "x$BASENAME" = x; then
5332 5332 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5333 5333 fi
5334 5334 else
5335 5335 # Otherwise we believe it is a complete path. Use it as it is.
5336 5336 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5337 5337 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5338 5338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5339 5339 $as_echo_n "checking for BASENAME... " >&6; }
5340 5340 if test ! -x "$tool_specified"; then
5341 5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5342 5342 $as_echo "not found" >&6; }
5343 5343 as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5344 5344 fi
5345 5345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5346 5346 $as_echo "$tool_specified" >&6; }
5347 5347 fi
5348 5348 fi
5349 5349 fi
5350 5350
5351 5351 fi
5352 5352
5353 5353
5354 5354
5355 5355 if test "x$BASENAME" = x; then
5356 5356 as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5357 5357 fi
5358 5358
5359 5359
5360 5360
5361 5361
5362 5362
5363 5363 # Publish this variable in the help.
5364 5364
5365 5365
5366 5366 if [ -z "${BASH+x}" ]; then
5367 5367 # The variable is not set by user, try to locate tool using the code snippet
5368 5368 for ac_prog in bash
5369 5369 do
5370 5370 # Extract the first word of "$ac_prog", so it can be a program name with args.
5371 5371 set dummy $ac_prog; ac_word=$2
5372 5372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5373 5373 $as_echo_n "checking for $ac_word... " >&6; }
5374 5374 if ${ac_cv_path_BASH+:} false; then :
5375 5375 $as_echo_n "(cached) " >&6
5376 5376 else
5377 5377 case $BASH in
5378 5378 [\\/]* | ?:[\\/]*)
5379 5379 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5380 5380 ;;
5381 5381 *)
5382 5382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5383 5383 for as_dir in $PATH
5384 5384 do
5385 5385 IFS=$as_save_IFS
5386 5386 test -z "$as_dir" && as_dir=.
5387 5387 for ac_exec_ext in '' $ac_executable_extensions; do
5388 5388 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5389 5389 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5390 5390 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5391 5391 break 2
5392 5392 fi
5393 5393 done
5394 5394 done
5395 5395 IFS=$as_save_IFS
5396 5396
5397 5397 ;;
5398 5398 esac
5399 5399 fi
5400 5400 BASH=$ac_cv_path_BASH
5401 5401 if test -n "$BASH"; then
5402 5402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5403 5403 $as_echo "$BASH" >&6; }
5404 5404 else
5405 5405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5406 5406 $as_echo "no" >&6; }
5407 5407 fi
5408 5408
5409 5409
5410 5410 test -n "$BASH" && break
5411 5411 done
5412 5412
5413 5413 else
5414 5414 # The variable is set, but is it from the command line or the environment?
5415 5415
5416 5416 # Try to remove the string !BASH! from our list.
5417 5417 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5418 5418 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5419 5419 # If it failed, the variable was not from the command line. Ignore it,
5420 5420 # but warn the user (except for BASH, which is always set by the calling BASH).
5421 5421 if test "xBASH" != xBASH; then
5422 5422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5423 5423 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5424 5424 fi
5425 5425 # Try to locate tool using the code snippet
5426 5426 for ac_prog in bash
5427 5427 do
5428 5428 # Extract the first word of "$ac_prog", so it can be a program name with args.
5429 5429 set dummy $ac_prog; ac_word=$2
5430 5430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5431 5431 $as_echo_n "checking for $ac_word... " >&6; }
5432 5432 if ${ac_cv_path_BASH+:} false; then :
5433 5433 $as_echo_n "(cached) " >&6
5434 5434 else
5435 5435 case $BASH in
5436 5436 [\\/]* | ?:[\\/]*)
5437 5437 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5438 5438 ;;
5439 5439 *)
5440 5440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5441 5441 for as_dir in $PATH
5442 5442 do
5443 5443 IFS=$as_save_IFS
5444 5444 test -z "$as_dir" && as_dir=.
5445 5445 for ac_exec_ext in '' $ac_executable_extensions; do
5446 5446 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5447 5447 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5448 5448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5449 5449 break 2
5450 5450 fi
5451 5451 done
5452 5452 done
5453 5453 IFS=$as_save_IFS
5454 5454
5455 5455 ;;
5456 5456 esac
5457 5457 fi
5458 5458 BASH=$ac_cv_path_BASH
5459 5459 if test -n "$BASH"; then
5460 5460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5461 5461 $as_echo "$BASH" >&6; }
5462 5462 else
5463 5463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5464 5464 $as_echo "no" >&6; }
5465 5465 fi
5466 5466
5467 5467
5468 5468 test -n "$BASH" && break
5469 5469 done
5470 5470
5471 5471 else
5472 5472 # If it succeeded, then it was overridden by the user. We will use it
5473 5473 # for the tool.
5474 5474
5475 5475 # First remove it from the list of overridden variables, so we can test
5476 5476 # for unknown variables in the end.
5477 5477 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5478 5478
5479 5479 # Check if we try to supply an empty value
5480 5480 if test "x$BASH" = x; then
5481 5481 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5482 5482 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5483 5483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5484 5484 $as_echo_n "checking for BASH... " >&6; }
5485 5485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5486 5486 $as_echo "disabled" >&6; }
5487 5487 else
5488 5488 # Check if the provided tool contains a complete path.
5489 5489 tool_specified="$BASH"
5490 5490 tool_basename="${tool_specified##*/}"
5491 5491 if test "x$tool_basename" = "x$tool_specified"; then
5492 5492 # A command without a complete path is provided, search $PATH.
5493 5493 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5494 5494 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5495 5495 # Extract the first word of "$tool_basename", so it can be a program name with args.
5496 5496 set dummy $tool_basename; ac_word=$2
5497 5497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5498 5498 $as_echo_n "checking for $ac_word... " >&6; }
5499 5499 if ${ac_cv_path_BASH+:} false; then :
5500 5500 $as_echo_n "(cached) " >&6
5501 5501 else
5502 5502 case $BASH in
5503 5503 [\\/]* | ?:[\\/]*)
5504 5504 ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5505 5505 ;;
5506 5506 *)
5507 5507 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5508 5508 for as_dir in $PATH
5509 5509 do
5510 5510 IFS=$as_save_IFS
5511 5511 test -z "$as_dir" && as_dir=.
5512 5512 for ac_exec_ext in '' $ac_executable_extensions; do
5513 5513 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5514 5514 ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5515 5515 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5516 5516 break 2
5517 5517 fi
5518 5518 done
5519 5519 done
5520 5520 IFS=$as_save_IFS
5521 5521
5522 5522 ;;
5523 5523 esac
5524 5524 fi
5525 5525 BASH=$ac_cv_path_BASH
5526 5526 if test -n "$BASH"; then
5527 5527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5528 5528 $as_echo "$BASH" >&6; }
5529 5529 else
5530 5530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531 5531 $as_echo "no" >&6; }
5532 5532 fi
5533 5533
5534 5534
5535 5535 if test "x$BASH" = x; then
5536 5536 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5537 5537 fi
5538 5538 else
5539 5539 # Otherwise we believe it is a complete path. Use it as it is.
5540 5540 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5541 5541 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5542 5542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5543 5543 $as_echo_n "checking for BASH... " >&6; }
5544 5544 if test ! -x "$tool_specified"; then
5545 5545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5546 5546 $as_echo "not found" >&6; }
5547 5547 as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5548 5548 fi
5549 5549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5550 5550 $as_echo "$tool_specified" >&6; }
5551 5551 fi
5552 5552 fi
5553 5553 fi
5554 5554
5555 5555 fi
5556 5556
5557 5557
5558 5558
5559 5559 if test "x$BASH" = x; then
5560 5560 as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5561 5561 fi
5562 5562
5563 5563
5564 5564
5565 5565
5566 5566
5567 5567 # Publish this variable in the help.
5568 5568
5569 5569
5570 5570 if [ -z "${CAT+x}" ]; then
5571 5571 # The variable is not set by user, try to locate tool using the code snippet
5572 5572 for ac_prog in cat
5573 5573 do
5574 5574 # Extract the first word of "$ac_prog", so it can be a program name with args.
5575 5575 set dummy $ac_prog; ac_word=$2
5576 5576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5577 5577 $as_echo_n "checking for $ac_word... " >&6; }
5578 5578 if ${ac_cv_path_CAT+:} false; then :
5579 5579 $as_echo_n "(cached) " >&6
5580 5580 else
5581 5581 case $CAT in
5582 5582 [\\/]* | ?:[\\/]*)
5583 5583 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5584 5584 ;;
5585 5585 *)
5586 5586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5587 5587 for as_dir in $PATH
5588 5588 do
5589 5589 IFS=$as_save_IFS
5590 5590 test -z "$as_dir" && as_dir=.
5591 5591 for ac_exec_ext in '' $ac_executable_extensions; do
5592 5592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5593 5593 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5594 5594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5595 5595 break 2
5596 5596 fi
5597 5597 done
5598 5598 done
5599 5599 IFS=$as_save_IFS
5600 5600
5601 5601 ;;
5602 5602 esac
5603 5603 fi
5604 5604 CAT=$ac_cv_path_CAT
5605 5605 if test -n "$CAT"; then
5606 5606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5607 5607 $as_echo "$CAT" >&6; }
5608 5608 else
5609 5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5610 5610 $as_echo "no" >&6; }
5611 5611 fi
5612 5612
5613 5613
5614 5614 test -n "$CAT" && break
5615 5615 done
5616 5616
5617 5617 else
5618 5618 # The variable is set, but is it from the command line or the environment?
5619 5619
5620 5620 # Try to remove the string !CAT! from our list.
5621 5621 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5622 5622 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5623 5623 # If it failed, the variable was not from the command line. Ignore it,
5624 5624 # but warn the user (except for BASH, which is always set by the calling BASH).
5625 5625 if test "xCAT" != xBASH; then
5626 5626 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5627 5627 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5628 5628 fi
5629 5629 # Try to locate tool using the code snippet
5630 5630 for ac_prog in cat
5631 5631 do
5632 5632 # Extract the first word of "$ac_prog", so it can be a program name with args.
5633 5633 set dummy $ac_prog; ac_word=$2
5634 5634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5635 5635 $as_echo_n "checking for $ac_word... " >&6; }
5636 5636 if ${ac_cv_path_CAT+:} false; then :
5637 5637 $as_echo_n "(cached) " >&6
5638 5638 else
5639 5639 case $CAT in
5640 5640 [\\/]* | ?:[\\/]*)
5641 5641 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5642 5642 ;;
5643 5643 *)
5644 5644 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645 5645 for as_dir in $PATH
5646 5646 do
5647 5647 IFS=$as_save_IFS
5648 5648 test -z "$as_dir" && as_dir=.
5649 5649 for ac_exec_ext in '' $ac_executable_extensions; do
5650 5650 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5651 5651 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5652 5652 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5653 5653 break 2
5654 5654 fi
5655 5655 done
5656 5656 done
5657 5657 IFS=$as_save_IFS
5658 5658
5659 5659 ;;
5660 5660 esac
5661 5661 fi
5662 5662 CAT=$ac_cv_path_CAT
5663 5663 if test -n "$CAT"; then
5664 5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5665 5665 $as_echo "$CAT" >&6; }
5666 5666 else
5667 5667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668 5668 $as_echo "no" >&6; }
5669 5669 fi
5670 5670
5671 5671
5672 5672 test -n "$CAT" && break
5673 5673 done
5674 5674
5675 5675 else
5676 5676 # If it succeeded, then it was overridden by the user. We will use it
5677 5677 # for the tool.
5678 5678
5679 5679 # First remove it from the list of overridden variables, so we can test
5680 5680 # for unknown variables in the end.
5681 5681 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5682 5682
5683 5683 # Check if we try to supply an empty value
5684 5684 if test "x$CAT" = x; then
5685 5685 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5686 5686 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5687 5687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5688 5688 $as_echo_n "checking for CAT... " >&6; }
5689 5689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5690 5690 $as_echo "disabled" >&6; }
5691 5691 else
5692 5692 # Check if the provided tool contains a complete path.
5693 5693 tool_specified="$CAT"
5694 5694 tool_basename="${tool_specified##*/}"
5695 5695 if test "x$tool_basename" = "x$tool_specified"; then
5696 5696 # A command without a complete path is provided, search $PATH.
5697 5697 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5698 5698 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5699 5699 # Extract the first word of "$tool_basename", so it can be a program name with args.
5700 5700 set dummy $tool_basename; ac_word=$2
5701 5701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702 5702 $as_echo_n "checking for $ac_word... " >&6; }
5703 5703 if ${ac_cv_path_CAT+:} false; then :
5704 5704 $as_echo_n "(cached) " >&6
5705 5705 else
5706 5706 case $CAT in
5707 5707 [\\/]* | ?:[\\/]*)
5708 5708 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5709 5709 ;;
5710 5710 *)
5711 5711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5712 5712 for as_dir in $PATH
5713 5713 do
5714 5714 IFS=$as_save_IFS
5715 5715 test -z "$as_dir" && as_dir=.
5716 5716 for ac_exec_ext in '' $ac_executable_extensions; do
5717 5717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5718 5718 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5719 5719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5720 5720 break 2
5721 5721 fi
5722 5722 done
5723 5723 done
5724 5724 IFS=$as_save_IFS
5725 5725
5726 5726 ;;
5727 5727 esac
5728 5728 fi
5729 5729 CAT=$ac_cv_path_CAT
5730 5730 if test -n "$CAT"; then
5731 5731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5732 5732 $as_echo "$CAT" >&6; }
5733 5733 else
5734 5734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5735 5735 $as_echo "no" >&6; }
5736 5736 fi
5737 5737
5738 5738
5739 5739 if test "x$CAT" = x; then
5740 5740 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5741 5741 fi
5742 5742 else
5743 5743 # Otherwise we believe it is a complete path. Use it as it is.
5744 5744 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5745 5745 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5746 5746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5747 5747 $as_echo_n "checking for CAT... " >&6; }
5748 5748 if test ! -x "$tool_specified"; then
5749 5749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5750 5750 $as_echo "not found" >&6; }
5751 5751 as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5752 5752 fi
5753 5753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5754 5754 $as_echo "$tool_specified" >&6; }
5755 5755 fi
5756 5756 fi
5757 5757 fi
5758 5758
5759 5759 fi
5760 5760
5761 5761
5762 5762
5763 5763 if test "x$CAT" = x; then
5764 5764 as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5765 5765 fi
5766 5766
5767 5767
5768 5768
5769 5769
5770 5770
5771 5771 # Publish this variable in the help.
5772 5772
5773 5773
5774 5774 if [ -z "${CHMOD+x}" ]; then
5775 5775 # The variable is not set by user, try to locate tool using the code snippet
5776 5776 for ac_prog in chmod
5777 5777 do
5778 5778 # Extract the first word of "$ac_prog", so it can be a program name with args.
5779 5779 set dummy $ac_prog; ac_word=$2
5780 5780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781 5781 $as_echo_n "checking for $ac_word... " >&6; }
5782 5782 if ${ac_cv_path_CHMOD+:} false; then :
5783 5783 $as_echo_n "(cached) " >&6
5784 5784 else
5785 5785 case $CHMOD in
5786 5786 [\\/]* | ?:[\\/]*)
5787 5787 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5788 5788 ;;
5789 5789 *)
5790 5790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791 5791 for as_dir in $PATH
5792 5792 do
5793 5793 IFS=$as_save_IFS
5794 5794 test -z "$as_dir" && as_dir=.
5795 5795 for ac_exec_ext in '' $ac_executable_extensions; do
5796 5796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797 5797 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5798 5798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799 5799 break 2
5800 5800 fi
5801 5801 done
5802 5802 done
5803 5803 IFS=$as_save_IFS
5804 5804
5805 5805 ;;
5806 5806 esac
5807 5807 fi
5808 5808 CHMOD=$ac_cv_path_CHMOD
5809 5809 if test -n "$CHMOD"; then
5810 5810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5811 5811 $as_echo "$CHMOD" >&6; }
5812 5812 else
5813 5813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814 5814 $as_echo "no" >&6; }
5815 5815 fi
5816 5816
5817 5817
5818 5818 test -n "$CHMOD" && break
5819 5819 done
5820 5820
5821 5821 else
5822 5822 # The variable is set, but is it from the command line or the environment?
5823 5823
5824 5824 # Try to remove the string !CHMOD! from our list.
5825 5825 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5826 5826 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5827 5827 # If it failed, the variable was not from the command line. Ignore it,
5828 5828 # but warn the user (except for BASH, which is always set by the calling BASH).
5829 5829 if test "xCHMOD" != xBASH; then
5830 5830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5831 5831 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5832 5832 fi
5833 5833 # Try to locate tool using the code snippet
5834 5834 for ac_prog in chmod
5835 5835 do
5836 5836 # Extract the first word of "$ac_prog", so it can be a program name with args.
5837 5837 set dummy $ac_prog; ac_word=$2
5838 5838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839 5839 $as_echo_n "checking for $ac_word... " >&6; }
5840 5840 if ${ac_cv_path_CHMOD+:} false; then :
5841 5841 $as_echo_n "(cached) " >&6
5842 5842 else
5843 5843 case $CHMOD in
5844 5844 [\\/]* | ?:[\\/]*)
5845 5845 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5846 5846 ;;
5847 5847 *)
5848 5848 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849 5849 for as_dir in $PATH
5850 5850 do
5851 5851 IFS=$as_save_IFS
5852 5852 test -z "$as_dir" && as_dir=.
5853 5853 for ac_exec_ext in '' $ac_executable_extensions; do
5854 5854 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855 5855 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5856 5856 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857 5857 break 2
5858 5858 fi
5859 5859 done
5860 5860 done
5861 5861 IFS=$as_save_IFS
5862 5862
5863 5863 ;;
5864 5864 esac
5865 5865 fi
5866 5866 CHMOD=$ac_cv_path_CHMOD
5867 5867 if test -n "$CHMOD"; then
5868 5868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5869 5869 $as_echo "$CHMOD" >&6; }
5870 5870 else
5871 5871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872 5872 $as_echo "no" >&6; }
5873 5873 fi
5874 5874
5875 5875
5876 5876 test -n "$CHMOD" && break
5877 5877 done
5878 5878
5879 5879 else
5880 5880 # If it succeeded, then it was overridden by the user. We will use it
5881 5881 # for the tool.
5882 5882
5883 5883 # First remove it from the list of overridden variables, so we can test
5884 5884 # for unknown variables in the end.
5885 5885 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5886 5886
5887 5887 # Check if we try to supply an empty value
5888 5888 if test "x$CHMOD" = x; then
5889 5889 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5890 5890 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5891 5891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5892 5892 $as_echo_n "checking for CHMOD... " >&6; }
5893 5893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5894 5894 $as_echo "disabled" >&6; }
5895 5895 else
5896 5896 # Check if the provided tool contains a complete path.
5897 5897 tool_specified="$CHMOD"
5898 5898 tool_basename="${tool_specified##*/}"
5899 5899 if test "x$tool_basename" = "x$tool_specified"; then
5900 5900 # A command without a complete path is provided, search $PATH.
5901 5901 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5902 5902 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5903 5903 # Extract the first word of "$tool_basename", so it can be a program name with args.
5904 5904 set dummy $tool_basename; ac_word=$2
5905 5905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5906 5906 $as_echo_n "checking for $ac_word... " >&6; }
5907 5907 if ${ac_cv_path_CHMOD+:} false; then :
5908 5908 $as_echo_n "(cached) " >&6
5909 5909 else
5910 5910 case $CHMOD in
5911 5911 [\\/]* | ?:[\\/]*)
5912 5912 ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5913 5913 ;;
5914 5914 *)
5915 5915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5916 5916 for as_dir in $PATH
5917 5917 do
5918 5918 IFS=$as_save_IFS
5919 5919 test -z "$as_dir" && as_dir=.
5920 5920 for ac_exec_ext in '' $ac_executable_extensions; do
5921 5921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5922 5922 ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5923 5923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5924 5924 break 2
5925 5925 fi
5926 5926 done
5927 5927 done
5928 5928 IFS=$as_save_IFS
5929 5929
5930 5930 ;;
5931 5931 esac
5932 5932 fi
5933 5933 CHMOD=$ac_cv_path_CHMOD
5934 5934 if test -n "$CHMOD"; then
5935 5935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5936 5936 $as_echo "$CHMOD" >&6; }
5937 5937 else
5938 5938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5939 5939 $as_echo "no" >&6; }
5940 5940 fi
5941 5941
5942 5942
5943 5943 if test "x$CHMOD" = x; then
5944 5944 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5945 5945 fi
5946 5946 else
5947 5947 # Otherwise we believe it is a complete path. Use it as it is.
5948 5948 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5949 5949 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5950 5950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5951 5951 $as_echo_n "checking for CHMOD... " >&6; }
5952 5952 if test ! -x "$tool_specified"; then
5953 5953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5954 5954 $as_echo "not found" >&6; }
5955 5955 as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5956 5956 fi
5957 5957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5958 5958 $as_echo "$tool_specified" >&6; }
5959 5959 fi
5960 5960 fi
5961 5961 fi
5962 5962
5963 5963 fi
5964 5964
5965 5965
5966 5966
5967 5967 if test "x$CHMOD" = x; then
5968 5968 as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5969 5969 fi
5970 5970
5971 5971
5972 5972
5973 5973
5974 5974
5975 5975 # Publish this variable in the help.
5976 5976
5977 5977
5978 5978 if [ -z "${CMP+x}" ]; then
5979 5979 # The variable is not set by user, try to locate tool using the code snippet
5980 5980 for ac_prog in cmp
5981 5981 do
5982 5982 # Extract the first word of "$ac_prog", so it can be a program name with args.
5983 5983 set dummy $ac_prog; ac_word=$2
5984 5984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5985 5985 $as_echo_n "checking for $ac_word... " >&6; }
5986 5986 if ${ac_cv_path_CMP+:} false; then :
5987 5987 $as_echo_n "(cached) " >&6
5988 5988 else
5989 5989 case $CMP in
5990 5990 [\\/]* | ?:[\\/]*)
5991 5991 ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5992 5992 ;;
5993 5993 *)
5994 5994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5995 5995 for as_dir in $PATH
5996 5996 do
5997 5997 IFS=$as_save_IFS
5998 5998 test -z "$as_dir" && as_dir=.
5999 5999 for ac_exec_ext in '' $ac_executable_extensions; do
6000 6000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6001 6001 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6002 6002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6003 6003 break 2
6004 6004 fi
6005 6005 done
6006 6006 done
6007 6007 IFS=$as_save_IFS
6008 6008
6009 6009 ;;
6010 6010 esac
6011 6011 fi
6012 6012 CMP=$ac_cv_path_CMP
6013 6013 if test -n "$CMP"; then
6014 6014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6015 6015 $as_echo "$CMP" >&6; }
6016 6016 else
6017 6017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018 6018 $as_echo "no" >&6; }
6019 6019 fi
6020 6020
6021 6021
6022 6022 test -n "$CMP" && break
6023 6023 done
6024 6024
6025 6025 else
6026 6026 # The variable is set, but is it from the command line or the environment?
6027 6027
6028 6028 # Try to remove the string !CMP! from our list.
6029 6029 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6030 6030 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6031 6031 # If it failed, the variable was not from the command line. Ignore it,
6032 6032 # but warn the user (except for BASH, which is always set by the calling BASH).
6033 6033 if test "xCMP" != xBASH; then
6034 6034 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6035 6035 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6036 6036 fi
6037 6037 # Try to locate tool using the code snippet
6038 6038 for ac_prog in cmp
6039 6039 do
6040 6040 # Extract the first word of "$ac_prog", so it can be a program name with args.
6041 6041 set dummy $ac_prog; ac_word=$2
6042 6042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6043 6043 $as_echo_n "checking for $ac_word... " >&6; }
6044 6044 if ${ac_cv_path_CMP+:} false; then :
6045 6045 $as_echo_n "(cached) " >&6
6046 6046 else
6047 6047 case $CMP in
6048 6048 [\\/]* | ?:[\\/]*)
6049 6049 ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6050 6050 ;;
6051 6051 *)
6052 6052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053 6053 for as_dir in $PATH
6054 6054 do
6055 6055 IFS=$as_save_IFS
6056 6056 test -z "$as_dir" && as_dir=.
6057 6057 for ac_exec_ext in '' $ac_executable_extensions; do
6058 6058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6059 6059 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6060 6060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6061 6061 break 2
6062 6062 fi
6063 6063 done
6064 6064 done
6065 6065 IFS=$as_save_IFS
6066 6066
6067 6067 ;;
6068 6068 esac
6069 6069 fi
6070 6070 CMP=$ac_cv_path_CMP
6071 6071 if test -n "$CMP"; then
6072 6072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6073 6073 $as_echo "$CMP" >&6; }
6074 6074 else
6075 6075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6076 6076 $as_echo "no" >&6; }
6077 6077 fi
6078 6078
6079 6079
6080 6080 test -n "$CMP" && break
6081 6081 done
6082 6082
6083 6083 else
6084 6084 # If it succeeded, then it was overridden by the user. We will use it
6085 6085 # for the tool.
6086 6086
6087 6087 # First remove it from the list of overridden variables, so we can test
6088 6088 # for unknown variables in the end.
6089 6089 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6090 6090
6091 6091 # Check if we try to supply an empty value
6092 6092 if test "x$CMP" = x; then
6093 6093 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6094 6094 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6095 6095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6096 6096 $as_echo_n "checking for CMP... " >&6; }
6097 6097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6098 6098 $as_echo "disabled" >&6; }
6099 6099 else
6100 6100 # Check if the provided tool contains a complete path.
6101 6101 tool_specified="$CMP"
6102 6102 tool_basename="${tool_specified##*/}"
6103 6103 if test "x$tool_basename" = "x$tool_specified"; then
6104 6104 # A command without a complete path is provided, search $PATH.
6105 6105 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6106 6106 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6107 6107 # Extract the first word of "$tool_basename", so it can be a program name with args.
6108 6108 set dummy $tool_basename; ac_word=$2
6109 6109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6110 6110 $as_echo_n "checking for $ac_word... " >&6; }
6111 6111 if ${ac_cv_path_CMP+:} false; then :
6112 6112 $as_echo_n "(cached) " >&6
6113 6113 else
6114 6114 case $CMP in
6115 6115 [\\/]* | ?:[\\/]*)
6116 6116 ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6117 6117 ;;
6118 6118 *)
6119 6119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120 6120 for as_dir in $PATH
6121 6121 do
6122 6122 IFS=$as_save_IFS
6123 6123 test -z "$as_dir" && as_dir=.
6124 6124 for ac_exec_ext in '' $ac_executable_extensions; do
6125 6125 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6126 6126 ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6127 6127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6128 6128 break 2
6129 6129 fi
6130 6130 done
6131 6131 done
6132 6132 IFS=$as_save_IFS
6133 6133
6134 6134 ;;
6135 6135 esac
6136 6136 fi
6137 6137 CMP=$ac_cv_path_CMP
6138 6138 if test -n "$CMP"; then
6139 6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6140 6140 $as_echo "$CMP" >&6; }
6141 6141 else
6142 6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6143 6143 $as_echo "no" >&6; }
6144 6144 fi
6145 6145
6146 6146
6147 6147 if test "x$CMP" = x; then
6148 6148 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6149 6149 fi
6150 6150 else
6151 6151 # Otherwise we believe it is a complete path. Use it as it is.
6152 6152 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6153 6153 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6154 6154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6155 6155 $as_echo_n "checking for CMP... " >&6; }
6156 6156 if test ! -x "$tool_specified"; then
6157 6157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6158 6158 $as_echo "not found" >&6; }
6159 6159 as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6160 6160 fi
6161 6161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6162 6162 $as_echo "$tool_specified" >&6; }
6163 6163 fi
6164 6164 fi
6165 6165 fi
6166 6166
6167 6167 fi
6168 6168
6169 6169
6170 6170
6171 6171 if test "x$CMP" = x; then
6172 6172 as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6173 6173 fi
6174 6174
6175 6175
6176 6176
6177 6177
6178 6178
6179 6179 # Publish this variable in the help.
6180 6180
6181 6181
6182 6182 if [ -z "${COMM+x}" ]; then
6183 6183 # The variable is not set by user, try to locate tool using the code snippet
6184 6184 for ac_prog in comm
6185 6185 do
6186 6186 # Extract the first word of "$ac_prog", so it can be a program name with args.
6187 6187 set dummy $ac_prog; ac_word=$2
6188 6188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6189 6189 $as_echo_n "checking for $ac_word... " >&6; }
6190 6190 if ${ac_cv_path_COMM+:} false; then :
6191 6191 $as_echo_n "(cached) " >&6
6192 6192 else
6193 6193 case $COMM in
6194 6194 [\\/]* | ?:[\\/]*)
6195 6195 ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6196 6196 ;;
6197 6197 *)
6198 6198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199 6199 for as_dir in $PATH
6200 6200 do
6201 6201 IFS=$as_save_IFS
6202 6202 test -z "$as_dir" && as_dir=.
6203 6203 for ac_exec_ext in '' $ac_executable_extensions; do
6204 6204 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6205 6205 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6206 6206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207 6207 break 2
6208 6208 fi
6209 6209 done
6210 6210 done
6211 6211 IFS=$as_save_IFS
6212 6212
6213 6213 ;;
6214 6214 esac
6215 6215 fi
6216 6216 COMM=$ac_cv_path_COMM
6217 6217 if test -n "$COMM"; then
6218 6218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6219 6219 $as_echo "$COMM" >&6; }
6220 6220 else
6221 6221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6222 6222 $as_echo "no" >&6; }
6223 6223 fi
6224 6224
6225 6225
6226 6226 test -n "$COMM" && break
6227 6227 done
6228 6228
6229 6229 else
6230 6230 # The variable is set, but is it from the command line or the environment?
6231 6231
6232 6232 # Try to remove the string !COMM! from our list.
6233 6233 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6234 6234 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6235 6235 # If it failed, the variable was not from the command line. Ignore it,
6236 6236 # but warn the user (except for BASH, which is always set by the calling BASH).
6237 6237 if test "xCOMM" != xBASH; then
6238 6238 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6239 6239 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6240 6240 fi
6241 6241 # Try to locate tool using the code snippet
6242 6242 for ac_prog in comm
6243 6243 do
6244 6244 # Extract the first word of "$ac_prog", so it can be a program name with args.
6245 6245 set dummy $ac_prog; ac_word=$2
6246 6246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6247 6247 $as_echo_n "checking for $ac_word... " >&6; }
6248 6248 if ${ac_cv_path_COMM+:} false; then :
6249 6249 $as_echo_n "(cached) " >&6
6250 6250 else
6251 6251 case $COMM in
6252 6252 [\\/]* | ?:[\\/]*)
6253 6253 ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6254 6254 ;;
6255 6255 *)
6256 6256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6257 6257 for as_dir in $PATH
6258 6258 do
6259 6259 IFS=$as_save_IFS
6260 6260 test -z "$as_dir" && as_dir=.
6261 6261 for ac_exec_ext in '' $ac_executable_extensions; do
6262 6262 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6263 6263 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6264 6264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6265 6265 break 2
6266 6266 fi
6267 6267 done
6268 6268 done
6269 6269 IFS=$as_save_IFS
6270 6270
6271 6271 ;;
6272 6272 esac
6273 6273 fi
6274 6274 COMM=$ac_cv_path_COMM
6275 6275 if test -n "$COMM"; then
6276 6276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6277 6277 $as_echo "$COMM" >&6; }
6278 6278 else
6279 6279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6280 6280 $as_echo "no" >&6; }
6281 6281 fi
6282 6282
6283 6283
6284 6284 test -n "$COMM" && break
6285 6285 done
6286 6286
6287 6287 else
6288 6288 # If it succeeded, then it was overridden by the user. We will use it
6289 6289 # for the tool.
6290 6290
6291 6291 # First remove it from the list of overridden variables, so we can test
6292 6292 # for unknown variables in the end.
6293 6293 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6294 6294
6295 6295 # Check if we try to supply an empty value
6296 6296 if test "x$COMM" = x; then
6297 6297 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6298 6298 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6299 6299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6300 6300 $as_echo_n "checking for COMM... " >&6; }
6301 6301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6302 6302 $as_echo "disabled" >&6; }
6303 6303 else
6304 6304 # Check if the provided tool contains a complete path.
6305 6305 tool_specified="$COMM"
6306 6306 tool_basename="${tool_specified##*/}"
6307 6307 if test "x$tool_basename" = "x$tool_specified"; then
6308 6308 # A command without a complete path is provided, search $PATH.
6309 6309 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6310 6310 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6311 6311 # Extract the first word of "$tool_basename", so it can be a program name with args.
6312 6312 set dummy $tool_basename; ac_word=$2
6313 6313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6314 6314 $as_echo_n "checking for $ac_word... " >&6; }
6315 6315 if ${ac_cv_path_COMM+:} false; then :
6316 6316 $as_echo_n "(cached) " >&6
6317 6317 else
6318 6318 case $COMM in
6319 6319 [\\/]* | ?:[\\/]*)
6320 6320 ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6321 6321 ;;
6322 6322 *)
6323 6323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324 6324 for as_dir in $PATH
6325 6325 do
6326 6326 IFS=$as_save_IFS
6327 6327 test -z "$as_dir" && as_dir=.
6328 6328 for ac_exec_ext in '' $ac_executable_extensions; do
6329 6329 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6330 6330 ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6331 6331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6332 6332 break 2
6333 6333 fi
6334 6334 done
6335 6335 done
6336 6336 IFS=$as_save_IFS
6337 6337
6338 6338 ;;
6339 6339 esac
6340 6340 fi
6341 6341 COMM=$ac_cv_path_COMM
6342 6342 if test -n "$COMM"; then
6343 6343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6344 6344 $as_echo "$COMM" >&6; }
6345 6345 else
6346 6346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6347 6347 $as_echo "no" >&6; }
6348 6348 fi
6349 6349
6350 6350
6351 6351 if test "x$COMM" = x; then
6352 6352 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6353 6353 fi
6354 6354 else
6355 6355 # Otherwise we believe it is a complete path. Use it as it is.
6356 6356 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6357 6357 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6358 6358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6359 6359 $as_echo_n "checking for COMM... " >&6; }
6360 6360 if test ! -x "$tool_specified"; then
6361 6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6362 6362 $as_echo "not found" >&6; }
6363 6363 as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6364 6364 fi
6365 6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6366 6366 $as_echo "$tool_specified" >&6; }
6367 6367 fi
6368 6368 fi
6369 6369 fi
6370 6370
6371 6371 fi
6372 6372
6373 6373
6374 6374
6375 6375 if test "x$COMM" = x; then
6376 6376 as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6377 6377 fi
6378 6378
6379 6379
6380 6380
6381 6381
6382 6382
6383 6383 # Publish this variable in the help.
6384 6384
6385 6385
6386 6386 if [ -z "${CP+x}" ]; then
6387 6387 # The variable is not set by user, try to locate tool using the code snippet
6388 6388 for ac_prog in cp
6389 6389 do
6390 6390 # Extract the first word of "$ac_prog", so it can be a program name with args.
6391 6391 set dummy $ac_prog; ac_word=$2
6392 6392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6393 6393 $as_echo_n "checking for $ac_word... " >&6; }
6394 6394 if ${ac_cv_path_CP+:} false; then :
6395 6395 $as_echo_n "(cached) " >&6
6396 6396 else
6397 6397 case $CP in
6398 6398 [\\/]* | ?:[\\/]*)
6399 6399 ac_cv_path_CP="$CP" # Let the user override the test with a path.
6400 6400 ;;
6401 6401 *)
6402 6402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6403 6403 for as_dir in $PATH
6404 6404 do
6405 6405 IFS=$as_save_IFS
6406 6406 test -z "$as_dir" && as_dir=.
6407 6407 for ac_exec_ext in '' $ac_executable_extensions; do
6408 6408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6409 6409 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6410 6410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6411 6411 break 2
6412 6412 fi
6413 6413 done
6414 6414 done
6415 6415 IFS=$as_save_IFS
6416 6416
6417 6417 ;;
6418 6418 esac
6419 6419 fi
6420 6420 CP=$ac_cv_path_CP
6421 6421 if test -n "$CP"; then
6422 6422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6423 6423 $as_echo "$CP" >&6; }
6424 6424 else
6425 6425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6426 6426 $as_echo "no" >&6; }
6427 6427 fi
6428 6428
6429 6429
6430 6430 test -n "$CP" && break
6431 6431 done
6432 6432
6433 6433 else
6434 6434 # The variable is set, but is it from the command line or the environment?
6435 6435
6436 6436 # Try to remove the string !CP! from our list.
6437 6437 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6438 6438 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6439 6439 # If it failed, the variable was not from the command line. Ignore it,
6440 6440 # but warn the user (except for BASH, which is always set by the calling BASH).
6441 6441 if test "xCP" != xBASH; then
6442 6442 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6443 6443 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6444 6444 fi
6445 6445 # Try to locate tool using the code snippet
6446 6446 for ac_prog in cp
6447 6447 do
6448 6448 # Extract the first word of "$ac_prog", so it can be a program name with args.
6449 6449 set dummy $ac_prog; ac_word=$2
6450 6450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6451 6451 $as_echo_n "checking for $ac_word... " >&6; }
6452 6452 if ${ac_cv_path_CP+:} false; then :
6453 6453 $as_echo_n "(cached) " >&6
6454 6454 else
6455 6455 case $CP in
6456 6456 [\\/]* | ?:[\\/]*)
6457 6457 ac_cv_path_CP="$CP" # Let the user override the test with a path.
6458 6458 ;;
6459 6459 *)
6460 6460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6461 6461 for as_dir in $PATH
6462 6462 do
6463 6463 IFS=$as_save_IFS
6464 6464 test -z "$as_dir" && as_dir=.
6465 6465 for ac_exec_ext in '' $ac_executable_extensions; do
6466 6466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6467 6467 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6468 6468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6469 6469 break 2
6470 6470 fi
6471 6471 done
6472 6472 done
6473 6473 IFS=$as_save_IFS
6474 6474
6475 6475 ;;
6476 6476 esac
6477 6477 fi
6478 6478 CP=$ac_cv_path_CP
6479 6479 if test -n "$CP"; then
6480 6480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6481 6481 $as_echo "$CP" >&6; }
6482 6482 else
6483 6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484 6484 $as_echo "no" >&6; }
6485 6485 fi
6486 6486
6487 6487
6488 6488 test -n "$CP" && break
6489 6489 done
6490 6490
6491 6491 else
6492 6492 # If it succeeded, then it was overridden by the user. We will use it
6493 6493 # for the tool.
6494 6494
6495 6495 # First remove it from the list of overridden variables, so we can test
6496 6496 # for unknown variables in the end.
6497 6497 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6498 6498
6499 6499 # Check if we try to supply an empty value
6500 6500 if test "x$CP" = x; then
6501 6501 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6502 6502 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6503 6503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6504 6504 $as_echo_n "checking for CP... " >&6; }
6505 6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6506 6506 $as_echo "disabled" >&6; }
6507 6507 else
6508 6508 # Check if the provided tool contains a complete path.
6509 6509 tool_specified="$CP"
6510 6510 tool_basename="${tool_specified##*/}"
6511 6511 if test "x$tool_basename" = "x$tool_specified"; then
6512 6512 # A command without a complete path is provided, search $PATH.
6513 6513 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6514 6514 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6515 6515 # Extract the first word of "$tool_basename", so it can be a program name with args.
6516 6516 set dummy $tool_basename; ac_word=$2
6517 6517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6518 6518 $as_echo_n "checking for $ac_word... " >&6; }
6519 6519 if ${ac_cv_path_CP+:} false; then :
6520 6520 $as_echo_n "(cached) " >&6
6521 6521 else
6522 6522 case $CP in
6523 6523 [\\/]* | ?:[\\/]*)
6524 6524 ac_cv_path_CP="$CP" # Let the user override the test with a path.
6525 6525 ;;
6526 6526 *)
6527 6527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6528 6528 for as_dir in $PATH
6529 6529 do
6530 6530 IFS=$as_save_IFS
6531 6531 test -z "$as_dir" && as_dir=.
6532 6532 for ac_exec_ext in '' $ac_executable_extensions; do
6533 6533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6534 6534 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6535 6535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6536 6536 break 2
6537 6537 fi
6538 6538 done
6539 6539 done
6540 6540 IFS=$as_save_IFS
6541 6541
6542 6542 ;;
6543 6543 esac
6544 6544 fi
6545 6545 CP=$ac_cv_path_CP
6546 6546 if test -n "$CP"; then
6547 6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6548 6548 $as_echo "$CP" >&6; }
6549 6549 else
6550 6550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6551 6551 $as_echo "no" >&6; }
6552 6552 fi
6553 6553
6554 6554
6555 6555 if test "x$CP" = x; then
6556 6556 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6557 6557 fi
6558 6558 else
6559 6559 # Otherwise we believe it is a complete path. Use it as it is.
6560 6560 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6561 6561 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6562 6562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6563 6563 $as_echo_n "checking for CP... " >&6; }
6564 6564 if test ! -x "$tool_specified"; then
6565 6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6566 6566 $as_echo "not found" >&6; }
6567 6567 as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6568 6568 fi
6569 6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6570 6570 $as_echo "$tool_specified" >&6; }
6571 6571 fi
6572 6572 fi
6573 6573 fi
6574 6574
6575 6575 fi
6576 6576
6577 6577
6578 6578
6579 6579 if test "x$CP" = x; then
6580 6580 as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6581 6581 fi
6582 6582
6583 6583
6584 6584
6585 6585
6586 6586
6587 6587 # Publish this variable in the help.
6588 6588
6589 6589
6590 6590 if [ -z "${CUT+x}" ]; then
6591 6591 # The variable is not set by user, try to locate tool using the code snippet
6592 6592 for ac_prog in cut
6593 6593 do
6594 6594 # Extract the first word of "$ac_prog", so it can be a program name with args.
6595 6595 set dummy $ac_prog; ac_word=$2
6596 6596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6597 6597 $as_echo_n "checking for $ac_word... " >&6; }
6598 6598 if ${ac_cv_path_CUT+:} false; then :
6599 6599 $as_echo_n "(cached) " >&6
6600 6600 else
6601 6601 case $CUT in
6602 6602 [\\/]* | ?:[\\/]*)
6603 6603 ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6604 6604 ;;
6605 6605 *)
6606 6606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6607 6607 for as_dir in $PATH
6608 6608 do
6609 6609 IFS=$as_save_IFS
6610 6610 test -z "$as_dir" && as_dir=.
6611 6611 for ac_exec_ext in '' $ac_executable_extensions; do
6612 6612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6613 6613 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6614 6614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6615 6615 break 2
6616 6616 fi
6617 6617 done
6618 6618 done
6619 6619 IFS=$as_save_IFS
6620 6620
6621 6621 ;;
6622 6622 esac
6623 6623 fi
6624 6624 CUT=$ac_cv_path_CUT
6625 6625 if test -n "$CUT"; then
6626 6626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6627 6627 $as_echo "$CUT" >&6; }
6628 6628 else
6629 6629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6630 6630 $as_echo "no" >&6; }
6631 6631 fi
6632 6632
6633 6633
6634 6634 test -n "$CUT" && break
6635 6635 done
6636 6636
6637 6637 else
6638 6638 # The variable is set, but is it from the command line or the environment?
6639 6639
6640 6640 # Try to remove the string !CUT! from our list.
6641 6641 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6642 6642 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6643 6643 # If it failed, the variable was not from the command line. Ignore it,
6644 6644 # but warn the user (except for BASH, which is always set by the calling BASH).
6645 6645 if test "xCUT" != xBASH; then
6646 6646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6647 6647 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6648 6648 fi
6649 6649 # Try to locate tool using the code snippet
6650 6650 for ac_prog in cut
6651 6651 do
6652 6652 # Extract the first word of "$ac_prog", so it can be a program name with args.
6653 6653 set dummy $ac_prog; ac_word=$2
6654 6654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6655 6655 $as_echo_n "checking for $ac_word... " >&6; }
6656 6656 if ${ac_cv_path_CUT+:} false; then :
6657 6657 $as_echo_n "(cached) " >&6
6658 6658 else
6659 6659 case $CUT in
6660 6660 [\\/]* | ?:[\\/]*)
6661 6661 ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6662 6662 ;;
6663 6663 *)
6664 6664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6665 6665 for as_dir in $PATH
6666 6666 do
6667 6667 IFS=$as_save_IFS
6668 6668 test -z "$as_dir" && as_dir=.
6669 6669 for ac_exec_ext in '' $ac_executable_extensions; do
6670 6670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6671 6671 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6672 6672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6673 6673 break 2
6674 6674 fi
6675 6675 done
6676 6676 done
6677 6677 IFS=$as_save_IFS
6678 6678
6679 6679 ;;
6680 6680 esac
6681 6681 fi
6682 6682 CUT=$ac_cv_path_CUT
6683 6683 if test -n "$CUT"; then
6684 6684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6685 6685 $as_echo "$CUT" >&6; }
6686 6686 else
6687 6687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6688 6688 $as_echo "no" >&6; }
6689 6689 fi
6690 6690
6691 6691
6692 6692 test -n "$CUT" && break
6693 6693 done
6694 6694
6695 6695 else
6696 6696 # If it succeeded, then it was overridden by the user. We will use it
6697 6697 # for the tool.
6698 6698
6699 6699 # First remove it from the list of overridden variables, so we can test
6700 6700 # for unknown variables in the end.
6701 6701 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6702 6702
6703 6703 # Check if we try to supply an empty value
6704 6704 if test "x$CUT" = x; then
6705 6705 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6706 6706 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6707 6707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6708 6708 $as_echo_n "checking for CUT... " >&6; }
6709 6709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6710 6710 $as_echo "disabled" >&6; }
6711 6711 else
6712 6712 # Check if the provided tool contains a complete path.
6713 6713 tool_specified="$CUT"
6714 6714 tool_basename="${tool_specified##*/}"
6715 6715 if test "x$tool_basename" = "x$tool_specified"; then
6716 6716 # A command without a complete path is provided, search $PATH.
6717 6717 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6718 6718 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6719 6719 # Extract the first word of "$tool_basename", so it can be a program name with args.
6720 6720 set dummy $tool_basename; ac_word=$2
6721 6721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6722 6722 $as_echo_n "checking for $ac_word... " >&6; }
6723 6723 if ${ac_cv_path_CUT+:} false; then :
6724 6724 $as_echo_n "(cached) " >&6
6725 6725 else
6726 6726 case $CUT in
6727 6727 [\\/]* | ?:[\\/]*)
6728 6728 ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6729 6729 ;;
6730 6730 *)
6731 6731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6732 6732 for as_dir in $PATH
6733 6733 do
6734 6734 IFS=$as_save_IFS
6735 6735 test -z "$as_dir" && as_dir=.
6736 6736 for ac_exec_ext in '' $ac_executable_extensions; do
6737 6737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6738 6738 ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6739 6739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6740 6740 break 2
6741 6741 fi
6742 6742 done
6743 6743 done
6744 6744 IFS=$as_save_IFS
6745 6745
6746 6746 ;;
6747 6747 esac
6748 6748 fi
6749 6749 CUT=$ac_cv_path_CUT
6750 6750 if test -n "$CUT"; then
6751 6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6752 6752 $as_echo "$CUT" >&6; }
6753 6753 else
6754 6754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6755 6755 $as_echo "no" >&6; }
6756 6756 fi
6757 6757
6758 6758
6759 6759 if test "x$CUT" = x; then
6760 6760 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6761 6761 fi
6762 6762 else
6763 6763 # Otherwise we believe it is a complete path. Use it as it is.
6764 6764 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6765 6765 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6766 6766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6767 6767 $as_echo_n "checking for CUT... " >&6; }
6768 6768 if test ! -x "$tool_specified"; then
6769 6769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6770 6770 $as_echo "not found" >&6; }
6771 6771 as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6772 6772 fi
6773 6773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6774 6774 $as_echo "$tool_specified" >&6; }
6775 6775 fi
6776 6776 fi
6777 6777 fi
6778 6778
6779 6779 fi
6780 6780
6781 6781
6782 6782
6783 6783 if test "x$CUT" = x; then
6784 6784 as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6785 6785 fi
6786 6786
6787 6787
6788 6788
6789 6789
6790 6790
6791 6791 # Publish this variable in the help.
6792 6792
6793 6793
6794 6794 if [ -z "${DATE+x}" ]; then
6795 6795 # The variable is not set by user, try to locate tool using the code snippet
6796 6796 for ac_prog in date
6797 6797 do
6798 6798 # Extract the first word of "$ac_prog", so it can be a program name with args.
6799 6799 set dummy $ac_prog; ac_word=$2
6800 6800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6801 6801 $as_echo_n "checking for $ac_word... " >&6; }
6802 6802 if ${ac_cv_path_DATE+:} false; then :
6803 6803 $as_echo_n "(cached) " >&6
6804 6804 else
6805 6805 case $DATE in
6806 6806 [\\/]* | ?:[\\/]*)
6807 6807 ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6808 6808 ;;
6809 6809 *)
6810 6810 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6811 6811 for as_dir in $PATH
6812 6812 do
6813 6813 IFS=$as_save_IFS
6814 6814 test -z "$as_dir" && as_dir=.
6815 6815 for ac_exec_ext in '' $ac_executable_extensions; do
6816 6816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6817 6817 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6818 6818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6819 6819 break 2
6820 6820 fi
6821 6821 done
6822 6822 done
6823 6823 IFS=$as_save_IFS
6824 6824
6825 6825 ;;
6826 6826 esac
6827 6827 fi
6828 6828 DATE=$ac_cv_path_DATE
6829 6829 if test -n "$DATE"; then
6830 6830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6831 6831 $as_echo "$DATE" >&6; }
6832 6832 else
6833 6833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6834 6834 $as_echo "no" >&6; }
6835 6835 fi
6836 6836
6837 6837
6838 6838 test -n "$DATE" && break
6839 6839 done
6840 6840
6841 6841 else
6842 6842 # The variable is set, but is it from the command line or the environment?
6843 6843
6844 6844 # Try to remove the string !DATE! from our list.
6845 6845 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6846 6846 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6847 6847 # If it failed, the variable was not from the command line. Ignore it,
6848 6848 # but warn the user (except for BASH, which is always set by the calling BASH).
6849 6849 if test "xDATE" != xBASH; then
6850 6850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6851 6851 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6852 6852 fi
6853 6853 # Try to locate tool using the code snippet
6854 6854 for ac_prog in date
6855 6855 do
6856 6856 # Extract the first word of "$ac_prog", so it can be a program name with args.
6857 6857 set dummy $ac_prog; ac_word=$2
6858 6858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6859 6859 $as_echo_n "checking for $ac_word... " >&6; }
6860 6860 if ${ac_cv_path_DATE+:} false; then :
6861 6861 $as_echo_n "(cached) " >&6
6862 6862 else
6863 6863 case $DATE in
6864 6864 [\\/]* | ?:[\\/]*)
6865 6865 ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6866 6866 ;;
6867 6867 *)
6868 6868 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6869 6869 for as_dir in $PATH
6870 6870 do
6871 6871 IFS=$as_save_IFS
6872 6872 test -z "$as_dir" && as_dir=.
6873 6873 for ac_exec_ext in '' $ac_executable_extensions; do
6874 6874 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6875 6875 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6876 6876 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6877 6877 break 2
6878 6878 fi
6879 6879 done
6880 6880 done
6881 6881 IFS=$as_save_IFS
6882 6882
6883 6883 ;;
6884 6884 esac
6885 6885 fi
6886 6886 DATE=$ac_cv_path_DATE
6887 6887 if test -n "$DATE"; then
6888 6888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6889 6889 $as_echo "$DATE" >&6; }
6890 6890 else
6891 6891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6892 6892 $as_echo "no" >&6; }
6893 6893 fi
6894 6894
6895 6895
6896 6896 test -n "$DATE" && break
6897 6897 done
6898 6898
6899 6899 else
6900 6900 # If it succeeded, then it was overridden by the user. We will use it
6901 6901 # for the tool.
6902 6902
6903 6903 # First remove it from the list of overridden variables, so we can test
6904 6904 # for unknown variables in the end.
6905 6905 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6906 6906
6907 6907 # Check if we try to supply an empty value
6908 6908 if test "x$DATE" = x; then
6909 6909 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6910 6910 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6911 6911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6912 6912 $as_echo_n "checking for DATE... " >&6; }
6913 6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6914 6914 $as_echo "disabled" >&6; }
6915 6915 else
6916 6916 # Check if the provided tool contains a complete path.
6917 6917 tool_specified="$DATE"
6918 6918 tool_basename="${tool_specified##*/}"
6919 6919 if test "x$tool_basename" = "x$tool_specified"; then
6920 6920 # A command without a complete path is provided, search $PATH.
6921 6921 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6922 6922 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6923 6923 # Extract the first word of "$tool_basename", so it can be a program name with args.
6924 6924 set dummy $tool_basename; ac_word=$2
6925 6925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6926 6926 $as_echo_n "checking for $ac_word... " >&6; }
6927 6927 if ${ac_cv_path_DATE+:} false; then :
6928 6928 $as_echo_n "(cached) " >&6
6929 6929 else
6930 6930 case $DATE in
6931 6931 [\\/]* | ?:[\\/]*)
6932 6932 ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6933 6933 ;;
6934 6934 *)
6935 6935 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6936 6936 for as_dir in $PATH
6937 6937 do
6938 6938 IFS=$as_save_IFS
6939 6939 test -z "$as_dir" && as_dir=.
6940 6940 for ac_exec_ext in '' $ac_executable_extensions; do
6941 6941 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6942 6942 ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6943 6943 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6944 6944 break 2
6945 6945 fi
6946 6946 done
6947 6947 done
6948 6948 IFS=$as_save_IFS
6949 6949
6950 6950 ;;
6951 6951 esac
6952 6952 fi
6953 6953 DATE=$ac_cv_path_DATE
6954 6954 if test -n "$DATE"; then
6955 6955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6956 6956 $as_echo "$DATE" >&6; }
6957 6957 else
6958 6958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6959 6959 $as_echo "no" >&6; }
6960 6960 fi
6961 6961
6962 6962
6963 6963 if test "x$DATE" = x; then
6964 6964 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6965 6965 fi
6966 6966 else
6967 6967 # Otherwise we believe it is a complete path. Use it as it is.
6968 6968 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6969 6969 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6970 6970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6971 6971 $as_echo_n "checking for DATE... " >&6; }
6972 6972 if test ! -x "$tool_specified"; then
6973 6973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6974 6974 $as_echo "not found" >&6; }
6975 6975 as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6976 6976 fi
6977 6977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6978 6978 $as_echo "$tool_specified" >&6; }
6979 6979 fi
6980 6980 fi
6981 6981 fi
6982 6982
6983 6983 fi
6984 6984
6985 6985
6986 6986
6987 6987 if test "x$DATE" = x; then
6988 6988 as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6989 6989 fi
6990 6990
6991 6991
6992 6992
6993 6993
6994 6994
6995 6995 # Publish this variable in the help.
6996 6996
6997 6997
6998 6998 if [ -z "${DIFF+x}" ]; then
6999 6999 # The variable is not set by user, try to locate tool using the code snippet
7000 7000 for ac_prog in gdiff diff
7001 7001 do
7002 7002 # Extract the first word of "$ac_prog", so it can be a program name with args.
7003 7003 set dummy $ac_prog; ac_word=$2
7004 7004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7005 7005 $as_echo_n "checking for $ac_word... " >&6; }
7006 7006 if ${ac_cv_path_DIFF+:} false; then :
7007 7007 $as_echo_n "(cached) " >&6
7008 7008 else
7009 7009 case $DIFF in
7010 7010 [\\/]* | ?:[\\/]*)
7011 7011 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7012 7012 ;;
7013 7013 *)
7014 7014 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7015 7015 for as_dir in $PATH
7016 7016 do
7017 7017 IFS=$as_save_IFS
7018 7018 test -z "$as_dir" && as_dir=.
7019 7019 for ac_exec_ext in '' $ac_executable_extensions; do
7020 7020 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7021 7021 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7022 7022 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7023 7023 break 2
7024 7024 fi
7025 7025 done
7026 7026 done
7027 7027 IFS=$as_save_IFS
7028 7028
7029 7029 ;;
7030 7030 esac
7031 7031 fi
7032 7032 DIFF=$ac_cv_path_DIFF
7033 7033 if test -n "$DIFF"; then
7034 7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7035 7035 $as_echo "$DIFF" >&6; }
7036 7036 else
7037 7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7038 7038 $as_echo "no" >&6; }
7039 7039 fi
7040 7040
7041 7041
7042 7042 test -n "$DIFF" && break
7043 7043 done
7044 7044
7045 7045 else
7046 7046 # The variable is set, but is it from the command line or the environment?
7047 7047
7048 7048 # Try to remove the string !DIFF! from our list.
7049 7049 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7050 7050 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7051 7051 # If it failed, the variable was not from the command line. Ignore it,
7052 7052 # but warn the user (except for BASH, which is always set by the calling BASH).
7053 7053 if test "xDIFF" != xBASH; then
7054 7054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7055 7055 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7056 7056 fi
7057 7057 # Try to locate tool using the code snippet
7058 7058 for ac_prog in gdiff diff
7059 7059 do
7060 7060 # Extract the first word of "$ac_prog", so it can be a program name with args.
7061 7061 set dummy $ac_prog; ac_word=$2
7062 7062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7063 7063 $as_echo_n "checking for $ac_word... " >&6; }
7064 7064 if ${ac_cv_path_DIFF+:} false; then :
7065 7065 $as_echo_n "(cached) " >&6
7066 7066 else
7067 7067 case $DIFF in
7068 7068 [\\/]* | ?:[\\/]*)
7069 7069 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7070 7070 ;;
7071 7071 *)
7072 7072 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7073 7073 for as_dir in $PATH
7074 7074 do
7075 7075 IFS=$as_save_IFS
7076 7076 test -z "$as_dir" && as_dir=.
7077 7077 for ac_exec_ext in '' $ac_executable_extensions; do
7078 7078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7079 7079 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7080 7080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7081 7081 break 2
7082 7082 fi
7083 7083 done
7084 7084 done
7085 7085 IFS=$as_save_IFS
7086 7086
7087 7087 ;;
7088 7088 esac
7089 7089 fi
7090 7090 DIFF=$ac_cv_path_DIFF
7091 7091 if test -n "$DIFF"; then
7092 7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7093 7093 $as_echo "$DIFF" >&6; }
7094 7094 else
7095 7095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7096 7096 $as_echo "no" >&6; }
7097 7097 fi
7098 7098
7099 7099
7100 7100 test -n "$DIFF" && break
7101 7101 done
7102 7102
7103 7103 else
7104 7104 # If it succeeded, then it was overridden by the user. We will use it
7105 7105 # for the tool.
7106 7106
7107 7107 # First remove it from the list of overridden variables, so we can test
7108 7108 # for unknown variables in the end.
7109 7109 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7110 7110
7111 7111 # Check if we try to supply an empty value
7112 7112 if test "x$DIFF" = x; then
7113 7113 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7114 7114 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7115 7115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7116 7116 $as_echo_n "checking for DIFF... " >&6; }
7117 7117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7118 7118 $as_echo "disabled" >&6; }
7119 7119 else
7120 7120 # Check if the provided tool contains a complete path.
7121 7121 tool_specified="$DIFF"
7122 7122 tool_basename="${tool_specified##*/}"
7123 7123 if test "x$tool_basename" = "x$tool_specified"; then
7124 7124 # A command without a complete path is provided, search $PATH.
7125 7125 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7126 7126 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7127 7127 # Extract the first word of "$tool_basename", so it can be a program name with args.
7128 7128 set dummy $tool_basename; ac_word=$2
7129 7129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7130 7130 $as_echo_n "checking for $ac_word... " >&6; }
7131 7131 if ${ac_cv_path_DIFF+:} false; then :
7132 7132 $as_echo_n "(cached) " >&6
7133 7133 else
7134 7134 case $DIFF in
7135 7135 [\\/]* | ?:[\\/]*)
7136 7136 ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7137 7137 ;;
7138 7138 *)
7139 7139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7140 7140 for as_dir in $PATH
7141 7141 do
7142 7142 IFS=$as_save_IFS
7143 7143 test -z "$as_dir" && as_dir=.
7144 7144 for ac_exec_ext in '' $ac_executable_extensions; do
7145 7145 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7146 7146 ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7147 7147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7148 7148 break 2
7149 7149 fi
7150 7150 done
7151 7151 done
7152 7152 IFS=$as_save_IFS
7153 7153
7154 7154 ;;
7155 7155 esac
7156 7156 fi
7157 7157 DIFF=$ac_cv_path_DIFF
7158 7158 if test -n "$DIFF"; then
7159 7159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7160 7160 $as_echo "$DIFF" >&6; }
7161 7161 else
7162 7162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7163 7163 $as_echo "no" >&6; }
7164 7164 fi
7165 7165
7166 7166
7167 7167 if test "x$DIFF" = x; then
7168 7168 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7169 7169 fi
7170 7170 else
7171 7171 # Otherwise we believe it is a complete path. Use it as it is.
7172 7172 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7173 7173 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7174 7174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7175 7175 $as_echo_n "checking for DIFF... " >&6; }
7176 7176 if test ! -x "$tool_specified"; then
7177 7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7178 7178 $as_echo "not found" >&6; }
7179 7179 as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7180 7180 fi
7181 7181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7182 7182 $as_echo "$tool_specified" >&6; }
7183 7183 fi
7184 7184 fi
7185 7185 fi
7186 7186
7187 7187 fi
7188 7188
7189 7189
7190 7190
7191 7191 if test "x$DIFF" = x; then
7192 7192 as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7193 7193 fi
7194 7194
7195 7195
7196 7196
7197 7197
7198 7198
7199 7199 # Publish this variable in the help.
7200 7200
7201 7201
7202 7202 if [ -z "${DIRNAME+x}" ]; then
7203 7203 # The variable is not set by user, try to locate tool using the code snippet
7204 7204 for ac_prog in dirname
7205 7205 do
7206 7206 # Extract the first word of "$ac_prog", so it can be a program name with args.
7207 7207 set dummy $ac_prog; ac_word=$2
7208 7208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7209 7209 $as_echo_n "checking for $ac_word... " >&6; }
7210 7210 if ${ac_cv_path_DIRNAME+:} false; then :
7211 7211 $as_echo_n "(cached) " >&6
7212 7212 else
7213 7213 case $DIRNAME in
7214 7214 [\\/]* | ?:[\\/]*)
7215 7215 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7216 7216 ;;
7217 7217 *)
7218 7218 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7219 7219 for as_dir in $PATH
7220 7220 do
7221 7221 IFS=$as_save_IFS
7222 7222 test -z "$as_dir" && as_dir=.
7223 7223 for ac_exec_ext in '' $ac_executable_extensions; do
7224 7224 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7225 7225 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7226 7226 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7227 7227 break 2
7228 7228 fi
7229 7229 done
7230 7230 done
7231 7231 IFS=$as_save_IFS
7232 7232
7233 7233 ;;
7234 7234 esac
7235 7235 fi
7236 7236 DIRNAME=$ac_cv_path_DIRNAME
7237 7237 if test -n "$DIRNAME"; then
7238 7238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7239 7239 $as_echo "$DIRNAME" >&6; }
7240 7240 else
7241 7241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7242 7242 $as_echo "no" >&6; }
7243 7243 fi
7244 7244
7245 7245
7246 7246 test -n "$DIRNAME" && break
7247 7247 done
7248 7248
7249 7249 else
7250 7250 # The variable is set, but is it from the command line or the environment?
7251 7251
7252 7252 # Try to remove the string !DIRNAME! from our list.
7253 7253 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7254 7254 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7255 7255 # If it failed, the variable was not from the command line. Ignore it,
7256 7256 # but warn the user (except for BASH, which is always set by the calling BASH).
7257 7257 if test "xDIRNAME" != xBASH; then
7258 7258 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7259 7259 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7260 7260 fi
7261 7261 # Try to locate tool using the code snippet
7262 7262 for ac_prog in dirname
7263 7263 do
7264 7264 # Extract the first word of "$ac_prog", so it can be a program name with args.
7265 7265 set dummy $ac_prog; ac_word=$2
7266 7266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267 7267 $as_echo_n "checking for $ac_word... " >&6; }
7268 7268 if ${ac_cv_path_DIRNAME+:} false; then :
7269 7269 $as_echo_n "(cached) " >&6
7270 7270 else
7271 7271 case $DIRNAME in
7272 7272 [\\/]* | ?:[\\/]*)
7273 7273 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7274 7274 ;;
7275 7275 *)
7276 7276 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277 7277 for as_dir in $PATH
7278 7278 do
7279 7279 IFS=$as_save_IFS
7280 7280 test -z "$as_dir" && as_dir=.
7281 7281 for ac_exec_ext in '' $ac_executable_extensions; do
7282 7282 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7283 7283 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7284 7284 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7285 7285 break 2
7286 7286 fi
7287 7287 done
7288 7288 done
7289 7289 IFS=$as_save_IFS
7290 7290
7291 7291 ;;
7292 7292 esac
7293 7293 fi
7294 7294 DIRNAME=$ac_cv_path_DIRNAME
7295 7295 if test -n "$DIRNAME"; then
7296 7296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7297 7297 $as_echo "$DIRNAME" >&6; }
7298 7298 else
7299 7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7300 7300 $as_echo "no" >&6; }
7301 7301 fi
7302 7302
7303 7303
7304 7304 test -n "$DIRNAME" && break
7305 7305 done
7306 7306
7307 7307 else
7308 7308 # If it succeeded, then it was overridden by the user. We will use it
7309 7309 # for the tool.
7310 7310
7311 7311 # First remove it from the list of overridden variables, so we can test
7312 7312 # for unknown variables in the end.
7313 7313 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7314 7314
7315 7315 # Check if we try to supply an empty value
7316 7316 if test "x$DIRNAME" = x; then
7317 7317 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7318 7318 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7319 7319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7320 7320 $as_echo_n "checking for DIRNAME... " >&6; }
7321 7321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7322 7322 $as_echo "disabled" >&6; }
7323 7323 else
7324 7324 # Check if the provided tool contains a complete path.
7325 7325 tool_specified="$DIRNAME"
7326 7326 tool_basename="${tool_specified##*/}"
7327 7327 if test "x$tool_basename" = "x$tool_specified"; then
7328 7328 # A command without a complete path is provided, search $PATH.
7329 7329 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7330 7330 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7331 7331 # Extract the first word of "$tool_basename", so it can be a program name with args.
7332 7332 set dummy $tool_basename; ac_word=$2
7333 7333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7334 7334 $as_echo_n "checking for $ac_word... " >&6; }
7335 7335 if ${ac_cv_path_DIRNAME+:} false; then :
7336 7336 $as_echo_n "(cached) " >&6
7337 7337 else
7338 7338 case $DIRNAME in
7339 7339 [\\/]* | ?:[\\/]*)
7340 7340 ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7341 7341 ;;
7342 7342 *)
7343 7343 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7344 7344 for as_dir in $PATH
7345 7345 do
7346 7346 IFS=$as_save_IFS
7347 7347 test -z "$as_dir" && as_dir=.
7348 7348 for ac_exec_ext in '' $ac_executable_extensions; do
7349 7349 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7350 7350 ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7351 7351 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7352 7352 break 2
7353 7353 fi
7354 7354 done
7355 7355 done
7356 7356 IFS=$as_save_IFS
7357 7357
7358 7358 ;;
7359 7359 esac
7360 7360 fi
7361 7361 DIRNAME=$ac_cv_path_DIRNAME
7362 7362 if test -n "$DIRNAME"; then
7363 7363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7364 7364 $as_echo "$DIRNAME" >&6; }
7365 7365 else
7366 7366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7367 7367 $as_echo "no" >&6; }
7368 7368 fi
7369 7369
7370 7370
7371 7371 if test "x$DIRNAME" = x; then
7372 7372 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7373 7373 fi
7374 7374 else
7375 7375 # Otherwise we believe it is a complete path. Use it as it is.
7376 7376 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7377 7377 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7378 7378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7379 7379 $as_echo_n "checking for DIRNAME... " >&6; }
7380 7380 if test ! -x "$tool_specified"; then
7381 7381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7382 7382 $as_echo "not found" >&6; }
7383 7383 as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7384 7384 fi
7385 7385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7386 7386 $as_echo "$tool_specified" >&6; }
7387 7387 fi
7388 7388 fi
7389 7389 fi
7390 7390
7391 7391 fi
7392 7392
7393 7393
7394 7394
7395 7395 if test "x$DIRNAME" = x; then
7396 7396 as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7397 7397 fi
7398 7398
7399 7399
7400 7400
7401 7401
7402 7402
7403 7403 # Publish this variable in the help.
7404 7404
7405 7405
7406 7406 if [ -z "${ECHO+x}" ]; then
7407 7407 # The variable is not set by user, try to locate tool using the code snippet
7408 7408 for ac_prog in echo
7409 7409 do
7410 7410 # Extract the first word of "$ac_prog", so it can be a program name with args.
7411 7411 set dummy $ac_prog; ac_word=$2
7412 7412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7413 7413 $as_echo_n "checking for $ac_word... " >&6; }
7414 7414 if ${ac_cv_path_ECHO+:} false; then :
7415 7415 $as_echo_n "(cached) " >&6
7416 7416 else
7417 7417 case $ECHO in
7418 7418 [\\/]* | ?:[\\/]*)
7419 7419 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7420 7420 ;;
7421 7421 *)
7422 7422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7423 7423 for as_dir in $PATH
7424 7424 do
7425 7425 IFS=$as_save_IFS
7426 7426 test -z "$as_dir" && as_dir=.
7427 7427 for ac_exec_ext in '' $ac_executable_extensions; do
7428 7428 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7429 7429 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7430 7430 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7431 7431 break 2
7432 7432 fi
7433 7433 done
7434 7434 done
7435 7435 IFS=$as_save_IFS
7436 7436
7437 7437 ;;
7438 7438 esac
7439 7439 fi
7440 7440 ECHO=$ac_cv_path_ECHO
7441 7441 if test -n "$ECHO"; then
7442 7442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7443 7443 $as_echo "$ECHO" >&6; }
7444 7444 else
7445 7445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446 7446 $as_echo "no" >&6; }
7447 7447 fi
7448 7448
7449 7449
7450 7450 test -n "$ECHO" && break
7451 7451 done
7452 7452
7453 7453 else
7454 7454 # The variable is set, but is it from the command line or the environment?
7455 7455
7456 7456 # Try to remove the string !ECHO! from our list.
7457 7457 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7458 7458 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7459 7459 # If it failed, the variable was not from the command line. Ignore it,
7460 7460 # but warn the user (except for BASH, which is always set by the calling BASH).
7461 7461 if test "xECHO" != xBASH; then
7462 7462 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7463 7463 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7464 7464 fi
7465 7465 # Try to locate tool using the code snippet
7466 7466 for ac_prog in echo
7467 7467 do
7468 7468 # Extract the first word of "$ac_prog", so it can be a program name with args.
7469 7469 set dummy $ac_prog; ac_word=$2
7470 7470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7471 7471 $as_echo_n "checking for $ac_word... " >&6; }
7472 7472 if ${ac_cv_path_ECHO+:} false; then :
7473 7473 $as_echo_n "(cached) " >&6
7474 7474 else
7475 7475 case $ECHO in
7476 7476 [\\/]* | ?:[\\/]*)
7477 7477 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7478 7478 ;;
7479 7479 *)
7480 7480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7481 7481 for as_dir in $PATH
7482 7482 do
7483 7483 IFS=$as_save_IFS
7484 7484 test -z "$as_dir" && as_dir=.
7485 7485 for ac_exec_ext in '' $ac_executable_extensions; do
7486 7486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7487 7487 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7488 7488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7489 7489 break 2
7490 7490 fi
7491 7491 done
7492 7492 done
7493 7493 IFS=$as_save_IFS
7494 7494
7495 7495 ;;
7496 7496 esac
7497 7497 fi
7498 7498 ECHO=$ac_cv_path_ECHO
7499 7499 if test -n "$ECHO"; then
7500 7500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7501 7501 $as_echo "$ECHO" >&6; }
7502 7502 else
7503 7503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7504 7504 $as_echo "no" >&6; }
7505 7505 fi
7506 7506
7507 7507
7508 7508 test -n "$ECHO" && break
7509 7509 done
7510 7510
7511 7511 else
7512 7512 # If it succeeded, then it was overridden by the user. We will use it
7513 7513 # for the tool.
7514 7514
7515 7515 # First remove it from the list of overridden variables, so we can test
7516 7516 # for unknown variables in the end.
7517 7517 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7518 7518
7519 7519 # Check if we try to supply an empty value
7520 7520 if test "x$ECHO" = x; then
7521 7521 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7522 7522 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7523 7523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7524 7524 $as_echo_n "checking for ECHO... " >&6; }
7525 7525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7526 7526 $as_echo "disabled" >&6; }
7527 7527 else
7528 7528 # Check if the provided tool contains a complete path.
7529 7529 tool_specified="$ECHO"
7530 7530 tool_basename="${tool_specified##*/}"
7531 7531 if test "x$tool_basename" = "x$tool_specified"; then
7532 7532 # A command without a complete path is provided, search $PATH.
7533 7533 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7534 7534 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7535 7535 # Extract the first word of "$tool_basename", so it can be a program name with args.
7536 7536 set dummy $tool_basename; ac_word=$2
7537 7537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7538 7538 $as_echo_n "checking for $ac_word... " >&6; }
7539 7539 if ${ac_cv_path_ECHO+:} false; then :
7540 7540 $as_echo_n "(cached) " >&6
7541 7541 else
7542 7542 case $ECHO in
7543 7543 [\\/]* | ?:[\\/]*)
7544 7544 ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7545 7545 ;;
7546 7546 *)
7547 7547 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7548 7548 for as_dir in $PATH
7549 7549 do
7550 7550 IFS=$as_save_IFS
7551 7551 test -z "$as_dir" && as_dir=.
7552 7552 for ac_exec_ext in '' $ac_executable_extensions; do
7553 7553 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7554 7554 ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7555 7555 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7556 7556 break 2
7557 7557 fi
7558 7558 done
7559 7559 done
7560 7560 IFS=$as_save_IFS
7561 7561
7562 7562 ;;
7563 7563 esac
7564 7564 fi
7565 7565 ECHO=$ac_cv_path_ECHO
7566 7566 if test -n "$ECHO"; then
7567 7567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7568 7568 $as_echo "$ECHO" >&6; }
7569 7569 else
7570 7570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7571 7571 $as_echo "no" >&6; }
7572 7572 fi
7573 7573
7574 7574
7575 7575 if test "x$ECHO" = x; then
7576 7576 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7577 7577 fi
7578 7578 else
7579 7579 # Otherwise we believe it is a complete path. Use it as it is.
7580 7580 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7581 7581 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7582 7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7583 7583 $as_echo_n "checking for ECHO... " >&6; }
7584 7584 if test ! -x "$tool_specified"; then
7585 7585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7586 7586 $as_echo "not found" >&6; }
7587 7587 as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7588 7588 fi
7589 7589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7590 7590 $as_echo "$tool_specified" >&6; }
7591 7591 fi
7592 7592 fi
7593 7593 fi
7594 7594
7595 7595 fi
7596 7596
7597 7597
7598 7598
7599 7599 if test "x$ECHO" = x; then
7600 7600 as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7601 7601 fi
7602 7602
7603 7603
7604 7604
7605 7605
7606 7606
7607 7607 # Publish this variable in the help.
7608 7608
7609 7609
7610 7610 if [ -z "${EXPR+x}" ]; then
7611 7611 # The variable is not set by user, try to locate tool using the code snippet
7612 7612 for ac_prog in expr
7613 7613 do
7614 7614 # Extract the first word of "$ac_prog", so it can be a program name with args.
7615 7615 set dummy $ac_prog; ac_word=$2
7616 7616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7617 7617 $as_echo_n "checking for $ac_word... " >&6; }
7618 7618 if ${ac_cv_path_EXPR+:} false; then :
7619 7619 $as_echo_n "(cached) " >&6
7620 7620 else
7621 7621 case $EXPR in
7622 7622 [\\/]* | ?:[\\/]*)
7623 7623 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7624 7624 ;;
7625 7625 *)
7626 7626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7627 7627 for as_dir in $PATH
7628 7628 do
7629 7629 IFS=$as_save_IFS
7630 7630 test -z "$as_dir" && as_dir=.
7631 7631 for ac_exec_ext in '' $ac_executable_extensions; do
7632 7632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7633 7633 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7634 7634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7635 7635 break 2
7636 7636 fi
7637 7637 done
7638 7638 done
7639 7639 IFS=$as_save_IFS
7640 7640
7641 7641 ;;
7642 7642 esac
7643 7643 fi
7644 7644 EXPR=$ac_cv_path_EXPR
7645 7645 if test -n "$EXPR"; then
7646 7646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7647 7647 $as_echo "$EXPR" >&6; }
7648 7648 else
7649 7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7650 7650 $as_echo "no" >&6; }
7651 7651 fi
7652 7652
7653 7653
7654 7654 test -n "$EXPR" && break
7655 7655 done
7656 7656
7657 7657 else
7658 7658 # The variable is set, but is it from the command line or the environment?
7659 7659
7660 7660 # Try to remove the string !EXPR! from our list.
7661 7661 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7662 7662 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7663 7663 # If it failed, the variable was not from the command line. Ignore it,
7664 7664 # but warn the user (except for BASH, which is always set by the calling BASH).
7665 7665 if test "xEXPR" != xBASH; then
7666 7666 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7667 7667 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7668 7668 fi
7669 7669 # Try to locate tool using the code snippet
7670 7670 for ac_prog in expr
7671 7671 do
7672 7672 # Extract the first word of "$ac_prog", so it can be a program name with args.
7673 7673 set dummy $ac_prog; ac_word=$2
7674 7674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7675 7675 $as_echo_n "checking for $ac_word... " >&6; }
7676 7676 if ${ac_cv_path_EXPR+:} false; then :
7677 7677 $as_echo_n "(cached) " >&6
7678 7678 else
7679 7679 case $EXPR in
7680 7680 [\\/]* | ?:[\\/]*)
7681 7681 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7682 7682 ;;
7683 7683 *)
7684 7684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7685 7685 for as_dir in $PATH
7686 7686 do
7687 7687 IFS=$as_save_IFS
7688 7688 test -z "$as_dir" && as_dir=.
7689 7689 for ac_exec_ext in '' $ac_executable_extensions; do
7690 7690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7691 7691 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7692 7692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7693 7693 break 2
7694 7694 fi
7695 7695 done
7696 7696 done
7697 7697 IFS=$as_save_IFS
7698 7698
7699 7699 ;;
7700 7700 esac
7701 7701 fi
7702 7702 EXPR=$ac_cv_path_EXPR
7703 7703 if test -n "$EXPR"; then
7704 7704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7705 7705 $as_echo "$EXPR" >&6; }
7706 7706 else
7707 7707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708 7708 $as_echo "no" >&6; }
7709 7709 fi
7710 7710
7711 7711
7712 7712 test -n "$EXPR" && break
7713 7713 done
7714 7714
7715 7715 else
7716 7716 # If it succeeded, then it was overridden by the user. We will use it
7717 7717 # for the tool.
7718 7718
7719 7719 # First remove it from the list of overridden variables, so we can test
7720 7720 # for unknown variables in the end.
7721 7721 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7722 7722
7723 7723 # Check if we try to supply an empty value
7724 7724 if test "x$EXPR" = x; then
7725 7725 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7726 7726 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7727 7727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7728 7728 $as_echo_n "checking for EXPR... " >&6; }
7729 7729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7730 7730 $as_echo "disabled" >&6; }
7731 7731 else
7732 7732 # Check if the provided tool contains a complete path.
7733 7733 tool_specified="$EXPR"
7734 7734 tool_basename="${tool_specified##*/}"
7735 7735 if test "x$tool_basename" = "x$tool_specified"; then
7736 7736 # A command without a complete path is provided, search $PATH.
7737 7737 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7738 7738 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7739 7739 # Extract the first word of "$tool_basename", so it can be a program name with args.
7740 7740 set dummy $tool_basename; ac_word=$2
7741 7741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7742 7742 $as_echo_n "checking for $ac_word... " >&6; }
7743 7743 if ${ac_cv_path_EXPR+:} false; then :
7744 7744 $as_echo_n "(cached) " >&6
7745 7745 else
7746 7746 case $EXPR in
7747 7747 [\\/]* | ?:[\\/]*)
7748 7748 ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7749 7749 ;;
7750 7750 *)
7751 7751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7752 7752 for as_dir in $PATH
7753 7753 do
7754 7754 IFS=$as_save_IFS
7755 7755 test -z "$as_dir" && as_dir=.
7756 7756 for ac_exec_ext in '' $ac_executable_extensions; do
7757 7757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7758 7758 ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7759 7759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7760 7760 break 2
7761 7761 fi
7762 7762 done
7763 7763 done
7764 7764 IFS=$as_save_IFS
7765 7765
7766 7766 ;;
7767 7767 esac
7768 7768 fi
7769 7769 EXPR=$ac_cv_path_EXPR
7770 7770 if test -n "$EXPR"; then
7771 7771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7772 7772 $as_echo "$EXPR" >&6; }
7773 7773 else
7774 7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775 7775 $as_echo "no" >&6; }
7776 7776 fi
7777 7777
7778 7778
7779 7779 if test "x$EXPR" = x; then
7780 7780 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7781 7781 fi
7782 7782 else
7783 7783 # Otherwise we believe it is a complete path. Use it as it is.
7784 7784 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7785 7785 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7786 7786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7787 7787 $as_echo_n "checking for EXPR... " >&6; }
7788 7788 if test ! -x "$tool_specified"; then
7789 7789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7790 7790 $as_echo "not found" >&6; }
7791 7791 as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7792 7792 fi
7793 7793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7794 7794 $as_echo "$tool_specified" >&6; }
7795 7795 fi
7796 7796 fi
7797 7797 fi
7798 7798
7799 7799 fi
7800 7800
7801 7801
7802 7802
7803 7803 if test "x$EXPR" = x; then
7804 7804 as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7805 7805 fi
7806 7806
7807 7807
7808 7808
7809 7809
7810 7810
7811 7811 # Publish this variable in the help.
7812 7812
7813 7813
7814 7814 if [ -z "${FILE+x}" ]; then
7815 7815 # The variable is not set by user, try to locate tool using the code snippet
7816 7816 for ac_prog in file
7817 7817 do
7818 7818 # Extract the first word of "$ac_prog", so it can be a program name with args.
7819 7819 set dummy $ac_prog; ac_word=$2
7820 7820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7821 7821 $as_echo_n "checking for $ac_word... " >&6; }
7822 7822 if ${ac_cv_path_FILE+:} false; then :
7823 7823 $as_echo_n "(cached) " >&6
7824 7824 else
7825 7825 case $FILE in
7826 7826 [\\/]* | ?:[\\/]*)
7827 7827 ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7828 7828 ;;
7829 7829 *)
7830 7830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7831 7831 for as_dir in $PATH
7832 7832 do
7833 7833 IFS=$as_save_IFS
7834 7834 test -z "$as_dir" && as_dir=.
7835 7835 for ac_exec_ext in '' $ac_executable_extensions; do
7836 7836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7837 7837 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7838 7838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7839 7839 break 2
7840 7840 fi
7841 7841 done
7842 7842 done
7843 7843 IFS=$as_save_IFS
7844 7844
7845 7845 ;;
7846 7846 esac
7847 7847 fi
7848 7848 FILE=$ac_cv_path_FILE
7849 7849 if test -n "$FILE"; then
7850 7850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7851 7851 $as_echo "$FILE" >&6; }
7852 7852 else
7853 7853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7854 7854 $as_echo "no" >&6; }
7855 7855 fi
7856 7856
7857 7857
7858 7858 test -n "$FILE" && break
7859 7859 done
7860 7860
7861 7861 else
7862 7862 # The variable is set, but is it from the command line or the environment?
7863 7863
7864 7864 # Try to remove the string !FILE! from our list.
7865 7865 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7866 7866 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7867 7867 # If it failed, the variable was not from the command line. Ignore it,
7868 7868 # but warn the user (except for BASH, which is always set by the calling BASH).
7869 7869 if test "xFILE" != xBASH; then
7870 7870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7871 7871 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7872 7872 fi
7873 7873 # Try to locate tool using the code snippet
7874 7874 for ac_prog in file
7875 7875 do
7876 7876 # Extract the first word of "$ac_prog", so it can be a program name with args.
7877 7877 set dummy $ac_prog; ac_word=$2
7878 7878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7879 7879 $as_echo_n "checking for $ac_word... " >&6; }
7880 7880 if ${ac_cv_path_FILE+:} false; then :
7881 7881 $as_echo_n "(cached) " >&6
7882 7882 else
7883 7883 case $FILE in
7884 7884 [\\/]* | ?:[\\/]*)
7885 7885 ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7886 7886 ;;
7887 7887 *)
7888 7888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7889 7889 for as_dir in $PATH
7890 7890 do
7891 7891 IFS=$as_save_IFS
7892 7892 test -z "$as_dir" && as_dir=.
7893 7893 for ac_exec_ext in '' $ac_executable_extensions; do
7894 7894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7895 7895 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7896 7896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7897 7897 break 2
7898 7898 fi
7899 7899 done
7900 7900 done
7901 7901 IFS=$as_save_IFS
7902 7902
7903 7903 ;;
7904 7904 esac
7905 7905 fi
7906 7906 FILE=$ac_cv_path_FILE
7907 7907 if test -n "$FILE"; then
7908 7908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7909 7909 $as_echo "$FILE" >&6; }
7910 7910 else
7911 7911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7912 7912 $as_echo "no" >&6; }
7913 7913 fi
7914 7914
7915 7915
7916 7916 test -n "$FILE" && break
7917 7917 done
7918 7918
7919 7919 else
7920 7920 # If it succeeded, then it was overridden by the user. We will use it
7921 7921 # for the tool.
7922 7922
7923 7923 # First remove it from the list of overridden variables, so we can test
7924 7924 # for unknown variables in the end.
7925 7925 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7926 7926
7927 7927 # Check if we try to supply an empty value
7928 7928 if test "x$FILE" = x; then
7929 7929 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7930 7930 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7931 7931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7932 7932 $as_echo_n "checking for FILE... " >&6; }
7933 7933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7934 7934 $as_echo "disabled" >&6; }
7935 7935 else
7936 7936 # Check if the provided tool contains a complete path.
7937 7937 tool_specified="$FILE"
7938 7938 tool_basename="${tool_specified##*/}"
7939 7939 if test "x$tool_basename" = "x$tool_specified"; then
7940 7940 # A command without a complete path is provided, search $PATH.
7941 7941 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7942 7942 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7943 7943 # Extract the first word of "$tool_basename", so it can be a program name with args.
7944 7944 set dummy $tool_basename; ac_word=$2
7945 7945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7946 7946 $as_echo_n "checking for $ac_word... " >&6; }
7947 7947 if ${ac_cv_path_FILE+:} false; then :
7948 7948 $as_echo_n "(cached) " >&6
7949 7949 else
7950 7950 case $FILE in
7951 7951 [\\/]* | ?:[\\/]*)
7952 7952 ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7953 7953 ;;
7954 7954 *)
7955 7955 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7956 7956 for as_dir in $PATH
7957 7957 do
7958 7958 IFS=$as_save_IFS
7959 7959 test -z "$as_dir" && as_dir=.
7960 7960 for ac_exec_ext in '' $ac_executable_extensions; do
7961 7961 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7962 7962 ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7963 7963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7964 7964 break 2
7965 7965 fi
7966 7966 done
7967 7967 done
7968 7968 IFS=$as_save_IFS
7969 7969
7970 7970 ;;
7971 7971 esac
7972 7972 fi
7973 7973 FILE=$ac_cv_path_FILE
7974 7974 if test -n "$FILE"; then
7975 7975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7976 7976 $as_echo "$FILE" >&6; }
7977 7977 else
7978 7978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7979 7979 $as_echo "no" >&6; }
7980 7980 fi
7981 7981
7982 7982
7983 7983 if test "x$FILE" = x; then
7984 7984 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7985 7985 fi
7986 7986 else
7987 7987 # Otherwise we believe it is a complete path. Use it as it is.
7988 7988 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7989 7989 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7990 7990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7991 7991 $as_echo_n "checking for FILE... " >&6; }
7992 7992 if test ! -x "$tool_specified"; then
7993 7993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7994 7994 $as_echo "not found" >&6; }
7995 7995 as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7996 7996 fi
7997 7997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7998 7998 $as_echo "$tool_specified" >&6; }
7999 7999 fi
8000 8000 fi
8001 8001 fi
8002 8002
8003 8003 fi
8004 8004
8005 8005
8006 8006
8007 8007 if test "x$FILE" = x; then
8008 8008 as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8009 8009 fi
8010 8010
8011 8011
8012 8012
8013 8013
8014 8014
8015 8015 # Publish this variable in the help.
8016 8016
8017 8017
8018 8018 if [ -z "${FIND+x}" ]; then
8019 8019 # The variable is not set by user, try to locate tool using the code snippet
8020 8020 for ac_prog in find
8021 8021 do
8022 8022 # Extract the first word of "$ac_prog", so it can be a program name with args.
8023 8023 set dummy $ac_prog; ac_word=$2
8024 8024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025 8025 $as_echo_n "checking for $ac_word... " >&6; }
8026 8026 if ${ac_cv_path_FIND+:} false; then :
8027 8027 $as_echo_n "(cached) " >&6
8028 8028 else
8029 8029 case $FIND in
8030 8030 [\\/]* | ?:[\\/]*)
8031 8031 ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8032 8032 ;;
8033 8033 *)
8034 8034 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8035 8035 for as_dir in $PATH
8036 8036 do
8037 8037 IFS=$as_save_IFS
8038 8038 test -z "$as_dir" && as_dir=.
8039 8039 for ac_exec_ext in '' $ac_executable_extensions; do
8040 8040 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8041 8041 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8042 8042 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8043 8043 break 2
8044 8044 fi
8045 8045 done
8046 8046 done
8047 8047 IFS=$as_save_IFS
8048 8048
8049 8049 ;;
8050 8050 esac
8051 8051 fi
8052 8052 FIND=$ac_cv_path_FIND
8053 8053 if test -n "$FIND"; then
8054 8054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8055 8055 $as_echo "$FIND" >&6; }
8056 8056 else
8057 8057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8058 8058 $as_echo "no" >&6; }
8059 8059 fi
8060 8060
8061 8061
8062 8062 test -n "$FIND" && break
8063 8063 done
8064 8064
8065 8065 else
8066 8066 # The variable is set, but is it from the command line or the environment?
8067 8067
8068 8068 # Try to remove the string !FIND! from our list.
8069 8069 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8070 8070 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8071 8071 # If it failed, the variable was not from the command line. Ignore it,
8072 8072 # but warn the user (except for BASH, which is always set by the calling BASH).
8073 8073 if test "xFIND" != xBASH; then
8074 8074 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8075 8075 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8076 8076 fi
8077 8077 # Try to locate tool using the code snippet
8078 8078 for ac_prog in find
8079 8079 do
8080 8080 # Extract the first word of "$ac_prog", so it can be a program name with args.
8081 8081 set dummy $ac_prog; ac_word=$2
8082 8082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8083 8083 $as_echo_n "checking for $ac_word... " >&6; }
8084 8084 if ${ac_cv_path_FIND+:} false; then :
8085 8085 $as_echo_n "(cached) " >&6
8086 8086 else
8087 8087 case $FIND in
8088 8088 [\\/]* | ?:[\\/]*)
8089 8089 ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8090 8090 ;;
8091 8091 *)
8092 8092 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8093 8093 for as_dir in $PATH
8094 8094 do
8095 8095 IFS=$as_save_IFS
8096 8096 test -z "$as_dir" && as_dir=.
8097 8097 for ac_exec_ext in '' $ac_executable_extensions; do
8098 8098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8099 8099 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8100 8100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8101 8101 break 2
8102 8102 fi
8103 8103 done
8104 8104 done
8105 8105 IFS=$as_save_IFS
8106 8106
8107 8107 ;;
8108 8108 esac
8109 8109 fi
8110 8110 FIND=$ac_cv_path_FIND
8111 8111 if test -n "$FIND"; then
8112 8112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8113 8113 $as_echo "$FIND" >&6; }
8114 8114 else
8115 8115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8116 8116 $as_echo "no" >&6; }
8117 8117 fi
8118 8118
8119 8119
8120 8120 test -n "$FIND" && break
8121 8121 done
8122 8122
8123 8123 else
8124 8124 # If it succeeded, then it was overridden by the user. We will use it
8125 8125 # for the tool.
8126 8126
8127 8127 # First remove it from the list of overridden variables, so we can test
8128 8128 # for unknown variables in the end.
8129 8129 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8130 8130
8131 8131 # Check if we try to supply an empty value
8132 8132 if test "x$FIND" = x; then
8133 8133 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8134 8134 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8135 8135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8136 8136 $as_echo_n "checking for FIND... " >&6; }
8137 8137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8138 8138 $as_echo "disabled" >&6; }
8139 8139 else
8140 8140 # Check if the provided tool contains a complete path.
8141 8141 tool_specified="$FIND"
8142 8142 tool_basename="${tool_specified##*/}"
8143 8143 if test "x$tool_basename" = "x$tool_specified"; then
8144 8144 # A command without a complete path is provided, search $PATH.
8145 8145 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8146 8146 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8147 8147 # Extract the first word of "$tool_basename", so it can be a program name with args.
8148 8148 set dummy $tool_basename; ac_word=$2
8149 8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8150 8150 $as_echo_n "checking for $ac_word... " >&6; }
8151 8151 if ${ac_cv_path_FIND+:} false; then :
8152 8152 $as_echo_n "(cached) " >&6
8153 8153 else
8154 8154 case $FIND in
8155 8155 [\\/]* | ?:[\\/]*)
8156 8156 ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8157 8157 ;;
8158 8158 *)
8159 8159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8160 8160 for as_dir in $PATH
8161 8161 do
8162 8162 IFS=$as_save_IFS
8163 8163 test -z "$as_dir" && as_dir=.
8164 8164 for ac_exec_ext in '' $ac_executable_extensions; do
8165 8165 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8166 8166 ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8167 8167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8168 8168 break 2
8169 8169 fi
8170 8170 done
8171 8171 done
8172 8172 IFS=$as_save_IFS
8173 8173
8174 8174 ;;
8175 8175 esac
8176 8176 fi
8177 8177 FIND=$ac_cv_path_FIND
8178 8178 if test -n "$FIND"; then
8179 8179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8180 8180 $as_echo "$FIND" >&6; }
8181 8181 else
8182 8182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8183 8183 $as_echo "no" >&6; }
8184 8184 fi
8185 8185
8186 8186
8187 8187 if test "x$FIND" = x; then
8188 8188 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8189 8189 fi
8190 8190 else
8191 8191 # Otherwise we believe it is a complete path. Use it as it is.
8192 8192 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8193 8193 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8194 8194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8195 8195 $as_echo_n "checking for FIND... " >&6; }
8196 8196 if test ! -x "$tool_specified"; then
8197 8197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8198 8198 $as_echo "not found" >&6; }
8199 8199 as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8200 8200 fi
8201 8201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8202 8202 $as_echo "$tool_specified" >&6; }
8203 8203 fi
8204 8204 fi
8205 8205 fi
8206 8206
8207 8207 fi
8208 8208
8209 8209
8210 8210
8211 8211 if test "x$FIND" = x; then
8212 8212 as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8213 8213 fi
8214 8214
8215 8215
8216 8216
8217 8217
8218 8218
8219 8219 # Publish this variable in the help.
8220 8220
8221 8221
8222 8222 if [ -z "${HEAD+x}" ]; then
8223 8223 # The variable is not set by user, try to locate tool using the code snippet
8224 8224 for ac_prog in head
8225 8225 do
8226 8226 # Extract the first word of "$ac_prog", so it can be a program name with args.
8227 8227 set dummy $ac_prog; ac_word=$2
8228 8228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8229 8229 $as_echo_n "checking for $ac_word... " >&6; }
8230 8230 if ${ac_cv_path_HEAD+:} false; then :
8231 8231 $as_echo_n "(cached) " >&6
8232 8232 else
8233 8233 case $HEAD in
8234 8234 [\\/]* | ?:[\\/]*)
8235 8235 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8236 8236 ;;
8237 8237 *)
8238 8238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8239 8239 for as_dir in $PATH
8240 8240 do
8241 8241 IFS=$as_save_IFS
8242 8242 test -z "$as_dir" && as_dir=.
8243 8243 for ac_exec_ext in '' $ac_executable_extensions; do
8244 8244 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8245 8245 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8246 8246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8247 8247 break 2
8248 8248 fi
8249 8249 done
8250 8250 done
8251 8251 IFS=$as_save_IFS
8252 8252
8253 8253 ;;
8254 8254 esac
8255 8255 fi
8256 8256 HEAD=$ac_cv_path_HEAD
8257 8257 if test -n "$HEAD"; then
8258 8258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8259 8259 $as_echo "$HEAD" >&6; }
8260 8260 else
8261 8261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8262 8262 $as_echo "no" >&6; }
8263 8263 fi
8264 8264
8265 8265
8266 8266 test -n "$HEAD" && break
8267 8267 done
8268 8268
8269 8269 else
8270 8270 # The variable is set, but is it from the command line or the environment?
8271 8271
8272 8272 # Try to remove the string !HEAD! from our list.
8273 8273 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8274 8274 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8275 8275 # If it failed, the variable was not from the command line. Ignore it,
8276 8276 # but warn the user (except for BASH, which is always set by the calling BASH).
8277 8277 if test "xHEAD" != xBASH; then
8278 8278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8279 8279 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8280 8280 fi
8281 8281 # Try to locate tool using the code snippet
8282 8282 for ac_prog in head
8283 8283 do
8284 8284 # Extract the first word of "$ac_prog", so it can be a program name with args.
8285 8285 set dummy $ac_prog; ac_word=$2
8286 8286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8287 8287 $as_echo_n "checking for $ac_word... " >&6; }
8288 8288 if ${ac_cv_path_HEAD+:} false; then :
8289 8289 $as_echo_n "(cached) " >&6
8290 8290 else
8291 8291 case $HEAD in
8292 8292 [\\/]* | ?:[\\/]*)
8293 8293 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8294 8294 ;;
8295 8295 *)
8296 8296 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8297 8297 for as_dir in $PATH
8298 8298 do
8299 8299 IFS=$as_save_IFS
8300 8300 test -z "$as_dir" && as_dir=.
8301 8301 for ac_exec_ext in '' $ac_executable_extensions; do
8302 8302 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8303 8303 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8304 8304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8305 8305 break 2
8306 8306 fi
8307 8307 done
8308 8308 done
8309 8309 IFS=$as_save_IFS
8310 8310
8311 8311 ;;
8312 8312 esac
8313 8313 fi
8314 8314 HEAD=$ac_cv_path_HEAD
8315 8315 if test -n "$HEAD"; then
8316 8316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8317 8317 $as_echo "$HEAD" >&6; }
8318 8318 else
8319 8319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8320 8320 $as_echo "no" >&6; }
8321 8321 fi
8322 8322
8323 8323
8324 8324 test -n "$HEAD" && break
8325 8325 done
8326 8326
8327 8327 else
8328 8328 # If it succeeded, then it was overridden by the user. We will use it
8329 8329 # for the tool.
8330 8330
8331 8331 # First remove it from the list of overridden variables, so we can test
8332 8332 # for unknown variables in the end.
8333 8333 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8334 8334
8335 8335 # Check if we try to supply an empty value
8336 8336 if test "x$HEAD" = x; then
8337 8337 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8338 8338 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8339 8339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8340 8340 $as_echo_n "checking for HEAD... " >&6; }
8341 8341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8342 8342 $as_echo "disabled" >&6; }
8343 8343 else
8344 8344 # Check if the provided tool contains a complete path.
8345 8345 tool_specified="$HEAD"
8346 8346 tool_basename="${tool_specified##*/}"
8347 8347 if test "x$tool_basename" = "x$tool_specified"; then
8348 8348 # A command without a complete path is provided, search $PATH.
8349 8349 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8350 8350 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8351 8351 # Extract the first word of "$tool_basename", so it can be a program name with args.
8352 8352 set dummy $tool_basename; ac_word=$2
8353 8353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8354 8354 $as_echo_n "checking for $ac_word... " >&6; }
8355 8355 if ${ac_cv_path_HEAD+:} false; then :
8356 8356 $as_echo_n "(cached) " >&6
8357 8357 else
8358 8358 case $HEAD in
8359 8359 [\\/]* | ?:[\\/]*)
8360 8360 ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8361 8361 ;;
8362 8362 *)
8363 8363 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8364 8364 for as_dir in $PATH
8365 8365 do
8366 8366 IFS=$as_save_IFS
8367 8367 test -z "$as_dir" && as_dir=.
8368 8368 for ac_exec_ext in '' $ac_executable_extensions; do
8369 8369 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8370 8370 ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8371 8371 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8372 8372 break 2
8373 8373 fi
8374 8374 done
8375 8375 done
8376 8376 IFS=$as_save_IFS
8377 8377
8378 8378 ;;
8379 8379 esac
8380 8380 fi
8381 8381 HEAD=$ac_cv_path_HEAD
8382 8382 if test -n "$HEAD"; then
8383 8383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8384 8384 $as_echo "$HEAD" >&6; }
8385 8385 else
8386 8386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8387 8387 $as_echo "no" >&6; }
8388 8388 fi
8389 8389
8390 8390
8391 8391 if test "x$HEAD" = x; then
8392 8392 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8393 8393 fi
8394 8394 else
8395 8395 # Otherwise we believe it is a complete path. Use it as it is.
8396 8396 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8397 8397 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8398 8398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8399 8399 $as_echo_n "checking for HEAD... " >&6; }
8400 8400 if test ! -x "$tool_specified"; then
8401 8401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8402 8402 $as_echo "not found" >&6; }
8403 8403 as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8404 8404 fi
8405 8405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8406 8406 $as_echo "$tool_specified" >&6; }
8407 8407 fi
8408 8408 fi
8409 8409 fi
8410 8410
8411 8411 fi
8412 8412
8413 8413
8414 8414
8415 8415 if test "x$HEAD" = x; then
8416 8416 as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8417 8417 fi
8418 8418
8419 8419
8420 8420
8421 8421
8422 8422
8423 8423 # Publish this variable in the help.
8424 8424
8425 8425
8426 8426 if [ -z "${GUNZIP+x}" ]; then
8427 8427 # The variable is not set by user, try to locate tool using the code snippet
8428 8428 for ac_prog in gunzip
8429 8429 do
8430 8430 # Extract the first word of "$ac_prog", so it can be a program name with args.
8431 8431 set dummy $ac_prog; ac_word=$2
8432 8432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8433 8433 $as_echo_n "checking for $ac_word... " >&6; }
8434 8434 if ${ac_cv_path_GUNZIP+:} false; then :
8435 8435 $as_echo_n "(cached) " >&6
8436 8436 else
8437 8437 case $GUNZIP in
8438 8438 [\\/]* | ?:[\\/]*)
8439 8439 ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8440 8440 ;;
8441 8441 *)
8442 8442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8443 8443 for as_dir in $PATH
8444 8444 do
8445 8445 IFS=$as_save_IFS
8446 8446 test -z "$as_dir" && as_dir=.
8447 8447 for ac_exec_ext in '' $ac_executable_extensions; do
8448 8448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8449 8449 ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8450 8450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8451 8451 break 2
8452 8452 fi
8453 8453 done
8454 8454 done
8455 8455 IFS=$as_save_IFS
8456 8456
8457 8457 ;;
8458 8458 esac
8459 8459 fi
8460 8460 GUNZIP=$ac_cv_path_GUNZIP
8461 8461 if test -n "$GUNZIP"; then
8462 8462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8463 8463 $as_echo "$GUNZIP" >&6; }
8464 8464 else
8465 8465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8466 8466 $as_echo "no" >&6; }
8467 8467 fi
8468 8468
8469 8469
8470 8470 test -n "$GUNZIP" && break
8471 8471 done
8472 8472
8473 8473 else
8474 8474 # The variable is set, but is it from the command line or the environment?
8475 8475
8476 8476 # Try to remove the string !GUNZIP! from our list.
8477 8477 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8478 8478 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8479 8479 # If it failed, the variable was not from the command line. Ignore it,
8480 8480 # but warn the user (except for BASH, which is always set by the calling BASH).
8481 8481 if test "xGUNZIP" != xBASH; then
8482 8482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8483 8483 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8484 8484 fi
8485 8485 # Try to locate tool using the code snippet
8486 8486 for ac_prog in gunzip
8487 8487 do
8488 8488 # Extract the first word of "$ac_prog", so it can be a program name with args.
8489 8489 set dummy $ac_prog; ac_word=$2
8490 8490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8491 8491 $as_echo_n "checking for $ac_word... " >&6; }
8492 8492 if ${ac_cv_path_GUNZIP+:} false; then :
8493 8493 $as_echo_n "(cached) " >&6
8494 8494 else
8495 8495 case $GUNZIP in
8496 8496 [\\/]* | ?:[\\/]*)
8497 8497 ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8498 8498 ;;
8499 8499 *)
8500 8500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8501 8501 for as_dir in $PATH
8502 8502 do
8503 8503 IFS=$as_save_IFS
8504 8504 test -z "$as_dir" && as_dir=.
8505 8505 for ac_exec_ext in '' $ac_executable_extensions; do
8506 8506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8507 8507 ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8508 8508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8509 8509 break 2
8510 8510 fi
8511 8511 done
8512 8512 done
8513 8513 IFS=$as_save_IFS
8514 8514
8515 8515 ;;
8516 8516 esac
8517 8517 fi
8518 8518 GUNZIP=$ac_cv_path_GUNZIP
8519 8519 if test -n "$GUNZIP"; then
8520 8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8521 8521 $as_echo "$GUNZIP" >&6; }
8522 8522 else
8523 8523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8524 8524 $as_echo "no" >&6; }
8525 8525 fi
8526 8526
8527 8527
8528 8528 test -n "$GUNZIP" && break
8529 8529 done
8530 8530
8531 8531 else
8532 8532 # If it succeeded, then it was overridden by the user. We will use it
8533 8533 # for the tool.
8534 8534
8535 8535 # First remove it from the list of overridden variables, so we can test
8536 8536 # for unknown variables in the end.
8537 8537 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8538 8538
8539 8539 # Check if we try to supply an empty value
8540 8540 if test "x$GUNZIP" = x; then
8541 8541 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8542 8542 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8543 8543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8544 8544 $as_echo_n "checking for GUNZIP... " >&6; }
8545 8545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8546 8546 $as_echo "disabled" >&6; }
8547 8547 else
8548 8548 # Check if the provided tool contains a complete path.
8549 8549 tool_specified="$GUNZIP"
8550 8550 tool_basename="${tool_specified##*/}"
8551 8551 if test "x$tool_basename" = "x$tool_specified"; then
8552 8552 # A command without a complete path is provided, search $PATH.
8553 8553 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8554 8554 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8555 8555 # Extract the first word of "$tool_basename", so it can be a program name with args.
8556 8556 set dummy $tool_basename; ac_word=$2
8557 8557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8558 8558 $as_echo_n "checking for $ac_word... " >&6; }
8559 8559 if ${ac_cv_path_GUNZIP+:} false; then :
8560 8560 $as_echo_n "(cached) " >&6
8561 8561 else
8562 8562 case $GUNZIP in
8563 8563 [\\/]* | ?:[\\/]*)
8564 8564 ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8565 8565 ;;
8566 8566 *)
8567 8567 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8568 8568 for as_dir in $PATH
8569 8569 do
8570 8570 IFS=$as_save_IFS
8571 8571 test -z "$as_dir" && as_dir=.
8572 8572 for ac_exec_ext in '' $ac_executable_extensions; do
8573 8573 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8574 8574 ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8575 8575 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8576 8576 break 2
8577 8577 fi
8578 8578 done
8579 8579 done
8580 8580 IFS=$as_save_IFS
8581 8581
8582 8582 ;;
8583 8583 esac
8584 8584 fi
8585 8585 GUNZIP=$ac_cv_path_GUNZIP
8586 8586 if test -n "$GUNZIP"; then
8587 8587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8588 8588 $as_echo "$GUNZIP" >&6; }
8589 8589 else
8590 8590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8591 8591 $as_echo "no" >&6; }
8592 8592 fi
8593 8593
8594 8594
8595 8595 if test "x$GUNZIP" = x; then
8596 8596 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8597 8597 fi
8598 8598 else
8599 8599 # Otherwise we believe it is a complete path. Use it as it is.
8600 8600 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8601 8601 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8602 8602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8603 8603 $as_echo_n "checking for GUNZIP... " >&6; }
8604 8604 if test ! -x "$tool_specified"; then
8605 8605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8606 8606 $as_echo "not found" >&6; }
8607 8607 as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8608 8608 fi
8609 8609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8610 8610 $as_echo "$tool_specified" >&6; }
8611 8611 fi
8612 8612 fi
8613 8613 fi
8614 8614
8615 8615 fi
8616 8616
8617 8617
8618 8618
8619 8619 if test "x$GUNZIP" = x; then
8620 8620 as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8621 8621 fi
8622 8622
8623 8623
8624 8624
8625 8625
8626 8626
8627 8627 # Publish this variable in the help.
8628 8628
8629 8629
8630 8630 if [ -z "${GZIP+x}" ]; then
8631 8631 # The variable is not set by user, try to locate tool using the code snippet
8632 8632 for ac_prog in pigz gzip
8633 8633 do
8634 8634 # Extract the first word of "$ac_prog", so it can be a program name with args.
8635 8635 set dummy $ac_prog; ac_word=$2
8636 8636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8637 8637 $as_echo_n "checking for $ac_word... " >&6; }
8638 8638 if ${ac_cv_path_GZIP+:} false; then :
8639 8639 $as_echo_n "(cached) " >&6
8640 8640 else
8641 8641 case $GZIP in
8642 8642 [\\/]* | ?:[\\/]*)
8643 8643 ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8644 8644 ;;
8645 8645 *)
8646 8646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8647 8647 for as_dir in $PATH
8648 8648 do
8649 8649 IFS=$as_save_IFS
8650 8650 test -z "$as_dir" && as_dir=.
8651 8651 for ac_exec_ext in '' $ac_executable_extensions; do
8652 8652 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8653 8653 ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8654 8654 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8655 8655 break 2
8656 8656 fi
8657 8657 done
8658 8658 done
8659 8659 IFS=$as_save_IFS
8660 8660
8661 8661 ;;
8662 8662 esac
8663 8663 fi
8664 8664 GZIP=$ac_cv_path_GZIP
8665 8665 if test -n "$GZIP"; then
8666 8666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8667 8667 $as_echo "$GZIP" >&6; }
8668 8668 else
8669 8669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8670 8670 $as_echo "no" >&6; }
8671 8671 fi
8672 8672
8673 8673
8674 8674 test -n "$GZIP" && break
8675 8675 done
8676 8676
8677 8677 else
8678 8678 # The variable is set, but is it from the command line or the environment?
8679 8679
8680 8680 # Try to remove the string !GZIP! from our list.
8681 8681 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8682 8682 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8683 8683 # If it failed, the variable was not from the command line. Ignore it,
8684 8684 # but warn the user (except for BASH, which is always set by the calling BASH).
8685 8685 if test "xGZIP" != xBASH; then
8686 8686 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8687 8687 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8688 8688 fi
8689 8689 # Try to locate tool using the code snippet
8690 8690 for ac_prog in pigz gzip
8691 8691 do
8692 8692 # Extract the first word of "$ac_prog", so it can be a program name with args.
8693 8693 set dummy $ac_prog; ac_word=$2
8694 8694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8695 8695 $as_echo_n "checking for $ac_word... " >&6; }
8696 8696 if ${ac_cv_path_GZIP+:} false; then :
8697 8697 $as_echo_n "(cached) " >&6
8698 8698 else
8699 8699 case $GZIP in
8700 8700 [\\/]* | ?:[\\/]*)
8701 8701 ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8702 8702 ;;
8703 8703 *)
8704 8704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8705 8705 for as_dir in $PATH
8706 8706 do
8707 8707 IFS=$as_save_IFS
8708 8708 test -z "$as_dir" && as_dir=.
8709 8709 for ac_exec_ext in '' $ac_executable_extensions; do
8710 8710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8711 8711 ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8712 8712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8713 8713 break 2
8714 8714 fi
8715 8715 done
8716 8716 done
8717 8717 IFS=$as_save_IFS
8718 8718
8719 8719 ;;
8720 8720 esac
8721 8721 fi
8722 8722 GZIP=$ac_cv_path_GZIP
8723 8723 if test -n "$GZIP"; then
8724 8724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8725 8725 $as_echo "$GZIP" >&6; }
8726 8726 else
8727 8727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8728 8728 $as_echo "no" >&6; }
8729 8729 fi
8730 8730
8731 8731
8732 8732 test -n "$GZIP" && break
8733 8733 done
8734 8734
8735 8735 else
8736 8736 # If it succeeded, then it was overridden by the user. We will use it
8737 8737 # for the tool.
8738 8738
8739 8739 # First remove it from the list of overridden variables, so we can test
8740 8740 # for unknown variables in the end.
8741 8741 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8742 8742
8743 8743 # Check if we try to supply an empty value
8744 8744 if test "x$GZIP" = x; then
8745 8745 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8746 8746 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8747 8747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8748 8748 $as_echo_n "checking for GZIP... " >&6; }
8749 8749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8750 8750 $as_echo "disabled" >&6; }
8751 8751 else
8752 8752 # Check if the provided tool contains a complete path.
8753 8753 tool_specified="$GZIP"
8754 8754 tool_basename="${tool_specified##*/}"
8755 8755 if test "x$tool_basename" = "x$tool_specified"; then
8756 8756 # A command without a complete path is provided, search $PATH.
8757 8757 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8758 8758 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8759 8759 # Extract the first word of "$tool_basename", so it can be a program name with args.
8760 8760 set dummy $tool_basename; ac_word=$2
8761 8761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8762 8762 $as_echo_n "checking for $ac_word... " >&6; }
8763 8763 if ${ac_cv_path_GZIP+:} false; then :
8764 8764 $as_echo_n "(cached) " >&6
8765 8765 else
8766 8766 case $GZIP in
8767 8767 [\\/]* | ?:[\\/]*)
8768 8768 ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8769 8769 ;;
8770 8770 *)
8771 8771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8772 8772 for as_dir in $PATH
8773 8773 do
8774 8774 IFS=$as_save_IFS
8775 8775 test -z "$as_dir" && as_dir=.
8776 8776 for ac_exec_ext in '' $ac_executable_extensions; do
8777 8777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8778 8778 ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8779 8779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8780 8780 break 2
8781 8781 fi
8782 8782 done
8783 8783 done
8784 8784 IFS=$as_save_IFS
8785 8785
8786 8786 ;;
8787 8787 esac
8788 8788 fi
8789 8789 GZIP=$ac_cv_path_GZIP
8790 8790 if test -n "$GZIP"; then
8791 8791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8792 8792 $as_echo "$GZIP" >&6; }
8793 8793 else
8794 8794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8795 8795 $as_echo "no" >&6; }
8796 8796 fi
8797 8797
8798 8798
8799 8799 if test "x$GZIP" = x; then
8800 8800 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8801 8801 fi
8802 8802 else
8803 8803 # Otherwise we believe it is a complete path. Use it as it is.
8804 8804 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8805 8805 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8806 8806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8807 8807 $as_echo_n "checking for GZIP... " >&6; }
8808 8808 if test ! -x "$tool_specified"; then
8809 8809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8810 8810 $as_echo "not found" >&6; }
8811 8811 as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8812 8812 fi
8813 8813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8814 8814 $as_echo "$tool_specified" >&6; }
8815 8815 fi
8816 8816 fi
8817 8817 fi
8818 8818
8819 8819 fi
8820 8820
8821 8821
8822 8822
8823 8823 if test "x$GZIP" = x; then
8824 8824 as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8825 8825 fi
8826 8826
8827 8827
8828 8828
8829 8829
8830 8830
8831 8831 # Publish this variable in the help.
8832 8832
8833 8833
8834 8834 if [ -z "${LN+x}" ]; then
8835 8835 # The variable is not set by user, try to locate tool using the code snippet
8836 8836 for ac_prog in ln
8837 8837 do
8838 8838 # Extract the first word of "$ac_prog", so it can be a program name with args.
8839 8839 set dummy $ac_prog; ac_word=$2
8840 8840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8841 8841 $as_echo_n "checking for $ac_word... " >&6; }
8842 8842 if ${ac_cv_path_LN+:} false; then :
8843 8843 $as_echo_n "(cached) " >&6
8844 8844 else
8845 8845 case $LN in
8846 8846 [\\/]* | ?:[\\/]*)
8847 8847 ac_cv_path_LN="$LN" # Let the user override the test with a path.
8848 8848 ;;
8849 8849 *)
8850 8850 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8851 8851 for as_dir in $PATH
8852 8852 do
8853 8853 IFS=$as_save_IFS
8854 8854 test -z "$as_dir" && as_dir=.
8855 8855 for ac_exec_ext in '' $ac_executable_extensions; do
8856 8856 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8857 8857 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8858 8858 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8859 8859 break 2
8860 8860 fi
8861 8861 done
8862 8862 done
8863 8863 IFS=$as_save_IFS
8864 8864
8865 8865 ;;
8866 8866 esac
8867 8867 fi
8868 8868 LN=$ac_cv_path_LN
8869 8869 if test -n "$LN"; then
8870 8870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8871 8871 $as_echo "$LN" >&6; }
8872 8872 else
8873 8873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8874 8874 $as_echo "no" >&6; }
8875 8875 fi
8876 8876
8877 8877
8878 8878 test -n "$LN" && break
8879 8879 done
8880 8880
8881 8881 else
8882 8882 # The variable is set, but is it from the command line or the environment?
8883 8883
8884 8884 # Try to remove the string !LN! from our list.
8885 8885 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8886 8886 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8887 8887 # If it failed, the variable was not from the command line. Ignore it,
8888 8888 # but warn the user (except for BASH, which is always set by the calling BASH).
8889 8889 if test "xLN" != xBASH; then
8890 8890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8891 8891 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8892 8892 fi
8893 8893 # Try to locate tool using the code snippet
8894 8894 for ac_prog in ln
8895 8895 do
8896 8896 # Extract the first word of "$ac_prog", so it can be a program name with args.
8897 8897 set dummy $ac_prog; ac_word=$2
8898 8898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8899 8899 $as_echo_n "checking for $ac_word... " >&6; }
8900 8900 if ${ac_cv_path_LN+:} false; then :
8901 8901 $as_echo_n "(cached) " >&6
8902 8902 else
8903 8903 case $LN in
8904 8904 [\\/]* | ?:[\\/]*)
8905 8905 ac_cv_path_LN="$LN" # Let the user override the test with a path.
8906 8906 ;;
8907 8907 *)
8908 8908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8909 8909 for as_dir in $PATH
8910 8910 do
8911 8911 IFS=$as_save_IFS
8912 8912 test -z "$as_dir" && as_dir=.
8913 8913 for ac_exec_ext in '' $ac_executable_extensions; do
8914 8914 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8915 8915 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8916 8916 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8917 8917 break 2
8918 8918 fi
8919 8919 done
8920 8920 done
8921 8921 IFS=$as_save_IFS
8922 8922
8923 8923 ;;
8924 8924 esac
8925 8925 fi
8926 8926 LN=$ac_cv_path_LN
8927 8927 if test -n "$LN"; then
8928 8928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8929 8929 $as_echo "$LN" >&6; }
8930 8930 else
8931 8931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8932 8932 $as_echo "no" >&6; }
8933 8933 fi
8934 8934
8935 8935
8936 8936 test -n "$LN" && break
8937 8937 done
8938 8938
8939 8939 else
8940 8940 # If it succeeded, then it was overridden by the user. We will use it
8941 8941 # for the tool.
8942 8942
8943 8943 # First remove it from the list of overridden variables, so we can test
8944 8944 # for unknown variables in the end.
8945 8945 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8946 8946
8947 8947 # Check if we try to supply an empty value
8948 8948 if test "x$LN" = x; then
8949 8949 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8950 8950 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8951 8951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8952 8952 $as_echo_n "checking for LN... " >&6; }
8953 8953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8954 8954 $as_echo "disabled" >&6; }
8955 8955 else
8956 8956 # Check if the provided tool contains a complete path.
8957 8957 tool_specified="$LN"
8958 8958 tool_basename="${tool_specified##*/}"
8959 8959 if test "x$tool_basename" = "x$tool_specified"; then
8960 8960 # A command without a complete path is provided, search $PATH.
8961 8961 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8962 8962 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8963 8963 # Extract the first word of "$tool_basename", so it can be a program name with args.
8964 8964 set dummy $tool_basename; ac_word=$2
8965 8965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8966 8966 $as_echo_n "checking for $ac_word... " >&6; }
8967 8967 if ${ac_cv_path_LN+:} false; then :
8968 8968 $as_echo_n "(cached) " >&6
8969 8969 else
8970 8970 case $LN in
8971 8971 [\\/]* | ?:[\\/]*)
8972 8972 ac_cv_path_LN="$LN" # Let the user override the test with a path.
8973 8973 ;;
8974 8974 *)
8975 8975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8976 8976 for as_dir in $PATH
8977 8977 do
8978 8978 IFS=$as_save_IFS
8979 8979 test -z "$as_dir" && as_dir=.
8980 8980 for ac_exec_ext in '' $ac_executable_extensions; do
8981 8981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8982 8982 ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8983 8983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8984 8984 break 2
8985 8985 fi
8986 8986 done
8987 8987 done
8988 8988 IFS=$as_save_IFS
8989 8989
8990 8990 ;;
8991 8991 esac
8992 8992 fi
8993 8993 LN=$ac_cv_path_LN
8994 8994 if test -n "$LN"; then
8995 8995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8996 8996 $as_echo "$LN" >&6; }
8997 8997 else
8998 8998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8999 8999 $as_echo "no" >&6; }
9000 9000 fi
9001 9001
9002 9002
9003 9003 if test "x$LN" = x; then
9004 9004 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9005 9005 fi
9006 9006 else
9007 9007 # Otherwise we believe it is a complete path. Use it as it is.
9008 9008 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9009 9009 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9010 9010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9011 9011 $as_echo_n "checking for LN... " >&6; }
9012 9012 if test ! -x "$tool_specified"; then
9013 9013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9014 9014 $as_echo "not found" >&6; }
9015 9015 as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9016 9016 fi
9017 9017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9018 9018 $as_echo "$tool_specified" >&6; }
9019 9019 fi
9020 9020 fi
9021 9021 fi
9022 9022
9023 9023 fi
9024 9024
9025 9025
9026 9026
9027 9027 if test "x$LN" = x; then
9028 9028 as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9029 9029 fi
9030 9030
9031 9031
9032 9032
9033 9033
9034 9034
9035 9035 # Publish this variable in the help.
9036 9036
9037 9037
9038 9038 if [ -z "${LS+x}" ]; then
9039 9039 # The variable is not set by user, try to locate tool using the code snippet
9040 9040 for ac_prog in ls
9041 9041 do
9042 9042 # Extract the first word of "$ac_prog", so it can be a program name with args.
9043 9043 set dummy $ac_prog; ac_word=$2
9044 9044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9045 9045 $as_echo_n "checking for $ac_word... " >&6; }
9046 9046 if ${ac_cv_path_LS+:} false; then :
9047 9047 $as_echo_n "(cached) " >&6
9048 9048 else
9049 9049 case $LS in
9050 9050 [\\/]* | ?:[\\/]*)
9051 9051 ac_cv_path_LS="$LS" # Let the user override the test with a path.
9052 9052 ;;
9053 9053 *)
9054 9054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9055 9055 for as_dir in $PATH
9056 9056 do
9057 9057 IFS=$as_save_IFS
9058 9058 test -z "$as_dir" && as_dir=.
9059 9059 for ac_exec_ext in '' $ac_executable_extensions; do
9060 9060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9061 9061 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9062 9062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9063 9063 break 2
9064 9064 fi
9065 9065 done
9066 9066 done
9067 9067 IFS=$as_save_IFS
9068 9068
9069 9069 ;;
9070 9070 esac
9071 9071 fi
9072 9072 LS=$ac_cv_path_LS
9073 9073 if test -n "$LS"; then
9074 9074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9075 9075 $as_echo "$LS" >&6; }
9076 9076 else
9077 9077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9078 9078 $as_echo "no" >&6; }
9079 9079 fi
9080 9080
9081 9081
9082 9082 test -n "$LS" && break
9083 9083 done
9084 9084
9085 9085 else
9086 9086 # The variable is set, but is it from the command line or the environment?
9087 9087
9088 9088 # Try to remove the string !LS! from our list.
9089 9089 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9090 9090 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9091 9091 # If it failed, the variable was not from the command line. Ignore it,
9092 9092 # but warn the user (except for BASH, which is always set by the calling BASH).
9093 9093 if test "xLS" != xBASH; then
9094 9094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9095 9095 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9096 9096 fi
9097 9097 # Try to locate tool using the code snippet
9098 9098 for ac_prog in ls
9099 9099 do
9100 9100 # Extract the first word of "$ac_prog", so it can be a program name with args.
9101 9101 set dummy $ac_prog; ac_word=$2
9102 9102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9103 9103 $as_echo_n "checking for $ac_word... " >&6; }
9104 9104 if ${ac_cv_path_LS+:} false; then :
9105 9105 $as_echo_n "(cached) " >&6
9106 9106 else
9107 9107 case $LS in
9108 9108 [\\/]* | ?:[\\/]*)
9109 9109 ac_cv_path_LS="$LS" # Let the user override the test with a path.
9110 9110 ;;
9111 9111 *)
9112 9112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9113 9113 for as_dir in $PATH
9114 9114 do
9115 9115 IFS=$as_save_IFS
9116 9116 test -z "$as_dir" && as_dir=.
9117 9117 for ac_exec_ext in '' $ac_executable_extensions; do
9118 9118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9119 9119 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9120 9120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9121 9121 break 2
9122 9122 fi
9123 9123 done
9124 9124 done
9125 9125 IFS=$as_save_IFS
9126 9126
9127 9127 ;;
9128 9128 esac
9129 9129 fi
9130 9130 LS=$ac_cv_path_LS
9131 9131 if test -n "$LS"; then
9132 9132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9133 9133 $as_echo "$LS" >&6; }
9134 9134 else
9135 9135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9136 9136 $as_echo "no" >&6; }
9137 9137 fi
9138 9138
9139 9139
9140 9140 test -n "$LS" && break
9141 9141 done
9142 9142
9143 9143 else
9144 9144 # If it succeeded, then it was overridden by the user. We will use it
9145 9145 # for the tool.
9146 9146
9147 9147 # First remove it from the list of overridden variables, so we can test
9148 9148 # for unknown variables in the end.
9149 9149 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9150 9150
9151 9151 # Check if we try to supply an empty value
9152 9152 if test "x$LS" = x; then
9153 9153 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9154 9154 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9155 9155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9156 9156 $as_echo_n "checking for LS... " >&6; }
9157 9157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9158 9158 $as_echo "disabled" >&6; }
9159 9159 else
9160 9160 # Check if the provided tool contains a complete path.
9161 9161 tool_specified="$LS"
9162 9162 tool_basename="${tool_specified##*/}"
9163 9163 if test "x$tool_basename" = "x$tool_specified"; then
9164 9164 # A command without a complete path is provided, search $PATH.
9165 9165 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9166 9166 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9167 9167 # Extract the first word of "$tool_basename", so it can be a program name with args.
9168 9168 set dummy $tool_basename; ac_word=$2
9169 9169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9170 9170 $as_echo_n "checking for $ac_word... " >&6; }
9171 9171 if ${ac_cv_path_LS+:} false; then :
9172 9172 $as_echo_n "(cached) " >&6
9173 9173 else
9174 9174 case $LS in
9175 9175 [\\/]* | ?:[\\/]*)
9176 9176 ac_cv_path_LS="$LS" # Let the user override the test with a path.
9177 9177 ;;
9178 9178 *)
9179 9179 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9180 9180 for as_dir in $PATH
9181 9181 do
9182 9182 IFS=$as_save_IFS
9183 9183 test -z "$as_dir" && as_dir=.
9184 9184 for ac_exec_ext in '' $ac_executable_extensions; do
9185 9185 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9186 9186 ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9187 9187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9188 9188 break 2
9189 9189 fi
9190 9190 done
9191 9191 done
9192 9192 IFS=$as_save_IFS
9193 9193
9194 9194 ;;
9195 9195 esac
9196 9196 fi
9197 9197 LS=$ac_cv_path_LS
9198 9198 if test -n "$LS"; then
9199 9199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9200 9200 $as_echo "$LS" >&6; }
9201 9201 else
9202 9202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9203 9203 $as_echo "no" >&6; }
9204 9204 fi
9205 9205
9206 9206
9207 9207 if test "x$LS" = x; then
9208 9208 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9209 9209 fi
9210 9210 else
9211 9211 # Otherwise we believe it is a complete path. Use it as it is.
9212 9212 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9213 9213 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9214 9214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9215 9215 $as_echo_n "checking for LS... " >&6; }
9216 9216 if test ! -x "$tool_specified"; then
9217 9217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9218 9218 $as_echo "not found" >&6; }
9219 9219 as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9220 9220 fi
9221 9221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9222 9222 $as_echo "$tool_specified" >&6; }
9223 9223 fi
9224 9224 fi
9225 9225 fi
9226 9226
9227 9227 fi
9228 9228
9229 9229
9230 9230
9231 9231 if test "x$LS" = x; then
9232 9232 as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9233 9233 fi
9234 9234
9235 9235
9236 9236
9237 9237
9238 9238
9239 9239 # Publish this variable in the help.
9240 9240
9241 9241
9242 9242 if [ -z "${MKDIR+x}" ]; then
9243 9243 # The variable is not set by user, try to locate tool using the code snippet
9244 9244 for ac_prog in mkdir
9245 9245 do
9246 9246 # Extract the first word of "$ac_prog", so it can be a program name with args.
9247 9247 set dummy $ac_prog; ac_word=$2
9248 9248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9249 9249 $as_echo_n "checking for $ac_word... " >&6; }
9250 9250 if ${ac_cv_path_MKDIR+:} false; then :
9251 9251 $as_echo_n "(cached) " >&6
9252 9252 else
9253 9253 case $MKDIR in
9254 9254 [\\/]* | ?:[\\/]*)
9255 9255 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9256 9256 ;;
9257 9257 *)
9258 9258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259 9259 for as_dir in $PATH
9260 9260 do
9261 9261 IFS=$as_save_IFS
9262 9262 test -z "$as_dir" && as_dir=.
9263 9263 for ac_exec_ext in '' $ac_executable_extensions; do
9264 9264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9265 9265 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9266 9266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9267 9267 break 2
9268 9268 fi
9269 9269 done
9270 9270 done
9271 9271 IFS=$as_save_IFS
9272 9272
9273 9273 ;;
9274 9274 esac
9275 9275 fi
9276 9276 MKDIR=$ac_cv_path_MKDIR
9277 9277 if test -n "$MKDIR"; then
9278 9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9279 9279 $as_echo "$MKDIR" >&6; }
9280 9280 else
9281 9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9282 9282 $as_echo "no" >&6; }
9283 9283 fi
9284 9284
9285 9285
9286 9286 test -n "$MKDIR" && break
9287 9287 done
9288 9288
9289 9289 else
9290 9290 # The variable is set, but is it from the command line or the environment?
9291 9291
9292 9292 # Try to remove the string !MKDIR! from our list.
9293 9293 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9294 9294 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9295 9295 # If it failed, the variable was not from the command line. Ignore it,
9296 9296 # but warn the user (except for BASH, which is always set by the calling BASH).
9297 9297 if test "xMKDIR" != xBASH; then
9298 9298 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9299 9299 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9300 9300 fi
9301 9301 # Try to locate tool using the code snippet
9302 9302 for ac_prog in mkdir
9303 9303 do
9304 9304 # Extract the first word of "$ac_prog", so it can be a program name with args.
9305 9305 set dummy $ac_prog; ac_word=$2
9306 9306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9307 9307 $as_echo_n "checking for $ac_word... " >&6; }
9308 9308 if ${ac_cv_path_MKDIR+:} false; then :
9309 9309 $as_echo_n "(cached) " >&6
9310 9310 else
9311 9311 case $MKDIR in
9312 9312 [\\/]* | ?:[\\/]*)
9313 9313 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9314 9314 ;;
9315 9315 *)
9316 9316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9317 9317 for as_dir in $PATH
9318 9318 do
9319 9319 IFS=$as_save_IFS
9320 9320 test -z "$as_dir" && as_dir=.
9321 9321 for ac_exec_ext in '' $ac_executable_extensions; do
9322 9322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9323 9323 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9324 9324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9325 9325 break 2
9326 9326 fi
9327 9327 done
9328 9328 done
9329 9329 IFS=$as_save_IFS
9330 9330
9331 9331 ;;
9332 9332 esac
9333 9333 fi
9334 9334 MKDIR=$ac_cv_path_MKDIR
9335 9335 if test -n "$MKDIR"; then
9336 9336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9337 9337 $as_echo "$MKDIR" >&6; }
9338 9338 else
9339 9339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9340 9340 $as_echo "no" >&6; }
9341 9341 fi
9342 9342
9343 9343
9344 9344 test -n "$MKDIR" && break
9345 9345 done
9346 9346
9347 9347 else
9348 9348 # If it succeeded, then it was overridden by the user. We will use it
9349 9349 # for the tool.
9350 9350
9351 9351 # First remove it from the list of overridden variables, so we can test
9352 9352 # for unknown variables in the end.
9353 9353 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9354 9354
9355 9355 # Check if we try to supply an empty value
9356 9356 if test "x$MKDIR" = x; then
9357 9357 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9358 9358 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9359 9359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9360 9360 $as_echo_n "checking for MKDIR... " >&6; }
9361 9361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9362 9362 $as_echo "disabled" >&6; }
9363 9363 else
9364 9364 # Check if the provided tool contains a complete path.
9365 9365 tool_specified="$MKDIR"
9366 9366 tool_basename="${tool_specified##*/}"
9367 9367 if test "x$tool_basename" = "x$tool_specified"; then
9368 9368 # A command without a complete path is provided, search $PATH.
9369 9369 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9370 9370 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9371 9371 # Extract the first word of "$tool_basename", so it can be a program name with args.
9372 9372 set dummy $tool_basename; ac_word=$2
9373 9373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9374 9374 $as_echo_n "checking for $ac_word... " >&6; }
9375 9375 if ${ac_cv_path_MKDIR+:} false; then :
9376 9376 $as_echo_n "(cached) " >&6
9377 9377 else
9378 9378 case $MKDIR in
9379 9379 [\\/]* | ?:[\\/]*)
9380 9380 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9381 9381 ;;
9382 9382 *)
9383 9383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9384 9384 for as_dir in $PATH
9385 9385 do
9386 9386 IFS=$as_save_IFS
9387 9387 test -z "$as_dir" && as_dir=.
9388 9388 for ac_exec_ext in '' $ac_executable_extensions; do
9389 9389 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9390 9390 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9391 9391 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9392 9392 break 2
9393 9393 fi
9394 9394 done
9395 9395 done
9396 9396 IFS=$as_save_IFS
9397 9397
9398 9398 ;;
9399 9399 esac
9400 9400 fi
9401 9401 MKDIR=$ac_cv_path_MKDIR
9402 9402 if test -n "$MKDIR"; then
9403 9403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9404 9404 $as_echo "$MKDIR" >&6; }
9405 9405 else
9406 9406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9407 9407 $as_echo "no" >&6; }
9408 9408 fi
9409 9409
9410 9410
9411 9411 if test "x$MKDIR" = x; then
9412 9412 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9413 9413 fi
9414 9414 else
9415 9415 # Otherwise we believe it is a complete path. Use it as it is.
9416 9416 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9417 9417 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9418 9418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9419 9419 $as_echo_n "checking for MKDIR... " >&6; }
9420 9420 if test ! -x "$tool_specified"; then
9421 9421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9422 9422 $as_echo "not found" >&6; }
9423 9423 as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9424 9424 fi
9425 9425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9426 9426 $as_echo "$tool_specified" >&6; }
9427 9427 fi
9428 9428 fi
9429 9429 fi
9430 9430
9431 9431 fi
9432 9432
9433 9433
9434 9434
9435 9435 if test "x$MKDIR" = x; then
9436 9436 as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9437 9437 fi
9438 9438
9439 9439
9440 9440
9441 9441
9442 9442
9443 9443 # Publish this variable in the help.
9444 9444
9445 9445
9446 9446 if [ -z "${MKTEMP+x}" ]; then
9447 9447 # The variable is not set by user, try to locate tool using the code snippet
9448 9448 for ac_prog in mktemp
9449 9449 do
9450 9450 # Extract the first word of "$ac_prog", so it can be a program name with args.
9451 9451 set dummy $ac_prog; ac_word=$2
9452 9452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453 9453 $as_echo_n "checking for $ac_word... " >&6; }
9454 9454 if ${ac_cv_path_MKTEMP+:} false; then :
9455 9455 $as_echo_n "(cached) " >&6
9456 9456 else
9457 9457 case $MKTEMP in
9458 9458 [\\/]* | ?:[\\/]*)
9459 9459 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9460 9460 ;;
9461 9461 *)
9462 9462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463 9463 for as_dir in $PATH
9464 9464 do
9465 9465 IFS=$as_save_IFS
9466 9466 test -z "$as_dir" && as_dir=.
9467 9467 for ac_exec_ext in '' $ac_executable_extensions; do
9468 9468 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469 9469 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9470 9470 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471 9471 break 2
9472 9472 fi
9473 9473 done
9474 9474 done
9475 9475 IFS=$as_save_IFS
9476 9476
9477 9477 ;;
9478 9478 esac
9479 9479 fi
9480 9480 MKTEMP=$ac_cv_path_MKTEMP
9481 9481 if test -n "$MKTEMP"; then
9482 9482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9483 9483 $as_echo "$MKTEMP" >&6; }
9484 9484 else
9485 9485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486 9486 $as_echo "no" >&6; }
9487 9487 fi
9488 9488
9489 9489
9490 9490 test -n "$MKTEMP" && break
9491 9491 done
9492 9492
9493 9493 else
9494 9494 # The variable is set, but is it from the command line or the environment?
9495 9495
9496 9496 # Try to remove the string !MKTEMP! from our list.
9497 9497 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9498 9498 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9499 9499 # If it failed, the variable was not from the command line. Ignore it,
9500 9500 # but warn the user (except for BASH, which is always set by the calling BASH).
9501 9501 if test "xMKTEMP" != xBASH; then
9502 9502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9503 9503 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9504 9504 fi
9505 9505 # Try to locate tool using the code snippet
9506 9506 for ac_prog in mktemp
9507 9507 do
9508 9508 # Extract the first word of "$ac_prog", so it can be a program name with args.
9509 9509 set dummy $ac_prog; ac_word=$2
9510 9510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9511 9511 $as_echo_n "checking for $ac_word... " >&6; }
9512 9512 if ${ac_cv_path_MKTEMP+:} false; then :
9513 9513 $as_echo_n "(cached) " >&6
9514 9514 else
9515 9515 case $MKTEMP in
9516 9516 [\\/]* | ?:[\\/]*)
9517 9517 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9518 9518 ;;
9519 9519 *)
9520 9520 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9521 9521 for as_dir in $PATH
9522 9522 do
9523 9523 IFS=$as_save_IFS
9524 9524 test -z "$as_dir" && as_dir=.
9525 9525 for ac_exec_ext in '' $ac_executable_extensions; do
9526 9526 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9527 9527 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9528 9528 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9529 9529 break 2
9530 9530 fi
9531 9531 done
9532 9532 done
9533 9533 IFS=$as_save_IFS
9534 9534
9535 9535 ;;
9536 9536 esac
9537 9537 fi
9538 9538 MKTEMP=$ac_cv_path_MKTEMP
9539 9539 if test -n "$MKTEMP"; then
9540 9540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9541 9541 $as_echo "$MKTEMP" >&6; }
9542 9542 else
9543 9543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544 9544 $as_echo "no" >&6; }
9545 9545 fi
9546 9546
9547 9547
9548 9548 test -n "$MKTEMP" && break
9549 9549 done
9550 9550
9551 9551 else
9552 9552 # If it succeeded, then it was overridden by the user. We will use it
9553 9553 # for the tool.
9554 9554
9555 9555 # First remove it from the list of overridden variables, so we can test
9556 9556 # for unknown variables in the end.
9557 9557 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9558 9558
9559 9559 # Check if we try to supply an empty value
9560 9560 if test "x$MKTEMP" = x; then
9561 9561 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9562 9562 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9563 9563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9564 9564 $as_echo_n "checking for MKTEMP... " >&6; }
9565 9565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9566 9566 $as_echo "disabled" >&6; }
9567 9567 else
9568 9568 # Check if the provided tool contains a complete path.
9569 9569 tool_specified="$MKTEMP"
9570 9570 tool_basename="${tool_specified##*/}"
9571 9571 if test "x$tool_basename" = "x$tool_specified"; then
9572 9572 # A command without a complete path is provided, search $PATH.
9573 9573 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9574 9574 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9575 9575 # Extract the first word of "$tool_basename", so it can be a program name with args.
9576 9576 set dummy $tool_basename; ac_word=$2
9577 9577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9578 9578 $as_echo_n "checking for $ac_word... " >&6; }
9579 9579 if ${ac_cv_path_MKTEMP+:} false; then :
9580 9580 $as_echo_n "(cached) " >&6
9581 9581 else
9582 9582 case $MKTEMP in
9583 9583 [\\/]* | ?:[\\/]*)
9584 9584 ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9585 9585 ;;
9586 9586 *)
9587 9587 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9588 9588 for as_dir in $PATH
9589 9589 do
9590 9590 IFS=$as_save_IFS
9591 9591 test -z "$as_dir" && as_dir=.
9592 9592 for ac_exec_ext in '' $ac_executable_extensions; do
9593 9593 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9594 9594 ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9595 9595 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9596 9596 break 2
9597 9597 fi
9598 9598 done
9599 9599 done
9600 9600 IFS=$as_save_IFS
9601 9601
9602 9602 ;;
9603 9603 esac
9604 9604 fi
9605 9605 MKTEMP=$ac_cv_path_MKTEMP
9606 9606 if test -n "$MKTEMP"; then
9607 9607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9608 9608 $as_echo "$MKTEMP" >&6; }
9609 9609 else
9610 9610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9611 9611 $as_echo "no" >&6; }
9612 9612 fi
9613 9613
9614 9614
9615 9615 if test "x$MKTEMP" = x; then
9616 9616 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9617 9617 fi
9618 9618 else
9619 9619 # Otherwise we believe it is a complete path. Use it as it is.
9620 9620 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9621 9621 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9622 9622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9623 9623 $as_echo_n "checking for MKTEMP... " >&6; }
9624 9624 if test ! -x "$tool_specified"; then
9625 9625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9626 9626 $as_echo "not found" >&6; }
9627 9627 as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9628 9628 fi
9629 9629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9630 9630 $as_echo "$tool_specified" >&6; }
9631 9631 fi
9632 9632 fi
9633 9633 fi
9634 9634
9635 9635 fi
9636 9636
9637 9637
9638 9638
9639 9639 if test "x$MKTEMP" = x; then
9640 9640 as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9641 9641 fi
9642 9642
9643 9643
9644 9644
9645 9645
9646 9646
9647 9647 # Publish this variable in the help.
9648 9648
9649 9649
9650 9650 if [ -z "${MV+x}" ]; then
9651 9651 # The variable is not set by user, try to locate tool using the code snippet
9652 9652 for ac_prog in mv
9653 9653 do
9654 9654 # Extract the first word of "$ac_prog", so it can be a program name with args.
9655 9655 set dummy $ac_prog; ac_word=$2
9656 9656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9657 9657 $as_echo_n "checking for $ac_word... " >&6; }
9658 9658 if ${ac_cv_path_MV+:} false; then :
9659 9659 $as_echo_n "(cached) " >&6
9660 9660 else
9661 9661 case $MV in
9662 9662 [\\/]* | ?:[\\/]*)
9663 9663 ac_cv_path_MV="$MV" # Let the user override the test with a path.
9664 9664 ;;
9665 9665 *)
9666 9666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9667 9667 for as_dir in $PATH
9668 9668 do
9669 9669 IFS=$as_save_IFS
9670 9670 test -z "$as_dir" && as_dir=.
9671 9671 for ac_exec_ext in '' $ac_executable_extensions; do
9672 9672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9673 9673 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9674 9674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9675 9675 break 2
9676 9676 fi
9677 9677 done
9678 9678 done
9679 9679 IFS=$as_save_IFS
9680 9680
9681 9681 ;;
9682 9682 esac
9683 9683 fi
9684 9684 MV=$ac_cv_path_MV
9685 9685 if test -n "$MV"; then
9686 9686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9687 9687 $as_echo "$MV" >&6; }
9688 9688 else
9689 9689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9690 9690 $as_echo "no" >&6; }
9691 9691 fi
9692 9692
9693 9693
9694 9694 test -n "$MV" && break
9695 9695 done
9696 9696
9697 9697 else
9698 9698 # The variable is set, but is it from the command line or the environment?
9699 9699
9700 9700 # Try to remove the string !MV! from our list.
9701 9701 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9702 9702 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9703 9703 # If it failed, the variable was not from the command line. Ignore it,
9704 9704 # but warn the user (except for BASH, which is always set by the calling BASH).
9705 9705 if test "xMV" != xBASH; then
9706 9706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9707 9707 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9708 9708 fi
9709 9709 # Try to locate tool using the code snippet
9710 9710 for ac_prog in mv
9711 9711 do
9712 9712 # Extract the first word of "$ac_prog", so it can be a program name with args.
9713 9713 set dummy $ac_prog; ac_word=$2
9714 9714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9715 9715 $as_echo_n "checking for $ac_word... " >&6; }
9716 9716 if ${ac_cv_path_MV+:} false; then :
9717 9717 $as_echo_n "(cached) " >&6
9718 9718 else
9719 9719 case $MV in
9720 9720 [\\/]* | ?:[\\/]*)
9721 9721 ac_cv_path_MV="$MV" # Let the user override the test with a path.
9722 9722 ;;
9723 9723 *)
9724 9724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9725 9725 for as_dir in $PATH
9726 9726 do
9727 9727 IFS=$as_save_IFS
9728 9728 test -z "$as_dir" && as_dir=.
9729 9729 for ac_exec_ext in '' $ac_executable_extensions; do
9730 9730 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9731 9731 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9732 9732 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9733 9733 break 2
9734 9734 fi
9735 9735 done
9736 9736 done
9737 9737 IFS=$as_save_IFS
9738 9738
9739 9739 ;;
9740 9740 esac
9741 9741 fi
9742 9742 MV=$ac_cv_path_MV
9743 9743 if test -n "$MV"; then
9744 9744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9745 9745 $as_echo "$MV" >&6; }
9746 9746 else
9747 9747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9748 9748 $as_echo "no" >&6; }
9749 9749 fi
9750 9750
9751 9751
9752 9752 test -n "$MV" && break
9753 9753 done
9754 9754
9755 9755 else
9756 9756 # If it succeeded, then it was overridden by the user. We will use it
9757 9757 # for the tool.
9758 9758
9759 9759 # First remove it from the list of overridden variables, so we can test
9760 9760 # for unknown variables in the end.
9761 9761 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9762 9762
9763 9763 # Check if we try to supply an empty value
9764 9764 if test "x$MV" = x; then
9765 9765 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9766 9766 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9767 9767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9768 9768 $as_echo_n "checking for MV... " >&6; }
9769 9769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9770 9770 $as_echo "disabled" >&6; }
9771 9771 else
9772 9772 # Check if the provided tool contains a complete path.
9773 9773 tool_specified="$MV"
9774 9774 tool_basename="${tool_specified##*/}"
9775 9775 if test "x$tool_basename" = "x$tool_specified"; then
9776 9776 # A command without a complete path is provided, search $PATH.
9777 9777 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9778 9778 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9779 9779 # Extract the first word of "$tool_basename", so it can be a program name with args.
9780 9780 set dummy $tool_basename; ac_word=$2
9781 9781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9782 9782 $as_echo_n "checking for $ac_word... " >&6; }
9783 9783 if ${ac_cv_path_MV+:} false; then :
9784 9784 $as_echo_n "(cached) " >&6
9785 9785 else
9786 9786 case $MV in
9787 9787 [\\/]* | ?:[\\/]*)
9788 9788 ac_cv_path_MV="$MV" # Let the user override the test with a path.
9789 9789 ;;
9790 9790 *)
9791 9791 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9792 9792 for as_dir in $PATH
9793 9793 do
9794 9794 IFS=$as_save_IFS
9795 9795 test -z "$as_dir" && as_dir=.
9796 9796 for ac_exec_ext in '' $ac_executable_extensions; do
9797 9797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9798 9798 ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9799 9799 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9800 9800 break 2
9801 9801 fi
9802 9802 done
9803 9803 done
9804 9804 IFS=$as_save_IFS
9805 9805
9806 9806 ;;
9807 9807 esac
9808 9808 fi
9809 9809 MV=$ac_cv_path_MV
9810 9810 if test -n "$MV"; then
9811 9811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9812 9812 $as_echo "$MV" >&6; }
9813 9813 else
9814 9814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9815 9815 $as_echo "no" >&6; }
9816 9816 fi
9817 9817
9818 9818
9819 9819 if test "x$MV" = x; then
9820 9820 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9821 9821 fi
9822 9822 else
9823 9823 # Otherwise we believe it is a complete path. Use it as it is.
9824 9824 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9825 9825 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9826 9826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9827 9827 $as_echo_n "checking for MV... " >&6; }
9828 9828 if test ! -x "$tool_specified"; then
9829 9829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9830 9830 $as_echo "not found" >&6; }
9831 9831 as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9832 9832 fi
9833 9833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9834 9834 $as_echo "$tool_specified" >&6; }
9835 9835 fi
9836 9836 fi
9837 9837 fi
9838 9838
9839 9839 fi
9840 9840
9841 9841
9842 9842
9843 9843 if test "x$MV" = x; then
9844 9844 as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9845 9845 fi
9846 9846
9847 9847
9848 9848
9849 9849
9850 9850
9851 9851 # Publish this variable in the help.
9852 9852
9853 9853
9854 9854 if [ -z "${NAWK+x}" ]; then
9855 9855 # The variable is not set by user, try to locate tool using the code snippet
9856 9856 for ac_prog in nawk gawk awk
9857 9857 do
9858 9858 # Extract the first word of "$ac_prog", so it can be a program name with args.
9859 9859 set dummy $ac_prog; ac_word=$2
9860 9860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9861 9861 $as_echo_n "checking for $ac_word... " >&6; }
9862 9862 if ${ac_cv_path_NAWK+:} false; then :
9863 9863 $as_echo_n "(cached) " >&6
9864 9864 else
9865 9865 case $NAWK in
9866 9866 [\\/]* | ?:[\\/]*)
9867 9867 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9868 9868 ;;
9869 9869 *)
9870 9870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9871 9871 for as_dir in $PATH
9872 9872 do
9873 9873 IFS=$as_save_IFS
9874 9874 test -z "$as_dir" && as_dir=.
9875 9875 for ac_exec_ext in '' $ac_executable_extensions; do
9876 9876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9877 9877 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9878 9878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9879 9879 break 2
9880 9880 fi
9881 9881 done
9882 9882 done
9883 9883 IFS=$as_save_IFS
9884 9884
9885 9885 ;;
9886 9886 esac
9887 9887 fi
9888 9888 NAWK=$ac_cv_path_NAWK
9889 9889 if test -n "$NAWK"; then
9890 9890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9891 9891 $as_echo "$NAWK" >&6; }
9892 9892 else
9893 9893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9894 9894 $as_echo "no" >&6; }
9895 9895 fi
9896 9896
9897 9897
9898 9898 test -n "$NAWK" && break
9899 9899 done
9900 9900
9901 9901 else
9902 9902 # The variable is set, but is it from the command line or the environment?
9903 9903
9904 9904 # Try to remove the string !NAWK! from our list.
9905 9905 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9906 9906 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9907 9907 # If it failed, the variable was not from the command line. Ignore it,
9908 9908 # but warn the user (except for BASH, which is always set by the calling BASH).
9909 9909 if test "xNAWK" != xBASH; then
9910 9910 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9911 9911 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9912 9912 fi
9913 9913 # Try to locate tool using the code snippet
9914 9914 for ac_prog in nawk gawk awk
9915 9915 do
9916 9916 # Extract the first word of "$ac_prog", so it can be a program name with args.
9917 9917 set dummy $ac_prog; ac_word=$2
9918 9918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9919 9919 $as_echo_n "checking for $ac_word... " >&6; }
9920 9920 if ${ac_cv_path_NAWK+:} false; then :
9921 9921 $as_echo_n "(cached) " >&6
9922 9922 else
9923 9923 case $NAWK in
9924 9924 [\\/]* | ?:[\\/]*)
9925 9925 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9926 9926 ;;
9927 9927 *)
9928 9928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9929 9929 for as_dir in $PATH
9930 9930 do
9931 9931 IFS=$as_save_IFS
9932 9932 test -z "$as_dir" && as_dir=.
9933 9933 for ac_exec_ext in '' $ac_executable_extensions; do
9934 9934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9935 9935 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9936 9936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9937 9937 break 2
9938 9938 fi
9939 9939 done
9940 9940 done
9941 9941 IFS=$as_save_IFS
9942 9942
9943 9943 ;;
9944 9944 esac
9945 9945 fi
9946 9946 NAWK=$ac_cv_path_NAWK
9947 9947 if test -n "$NAWK"; then
9948 9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9949 9949 $as_echo "$NAWK" >&6; }
9950 9950 else
9951 9951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9952 9952 $as_echo "no" >&6; }
9953 9953 fi
9954 9954
9955 9955
9956 9956 test -n "$NAWK" && break
9957 9957 done
9958 9958
9959 9959 else
9960 9960 # If it succeeded, then it was overridden by the user. We will use it
9961 9961 # for the tool.
9962 9962
9963 9963 # First remove it from the list of overridden variables, so we can test
9964 9964 # for unknown variables in the end.
9965 9965 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9966 9966
9967 9967 # Check if we try to supply an empty value
9968 9968 if test "x$NAWK" = x; then
9969 9969 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9970 9970 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9971 9971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9972 9972 $as_echo_n "checking for NAWK... " >&6; }
9973 9973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9974 9974 $as_echo "disabled" >&6; }
9975 9975 else
9976 9976 # Check if the provided tool contains a complete path.
9977 9977 tool_specified="$NAWK"
9978 9978 tool_basename="${tool_specified##*/}"
9979 9979 if test "x$tool_basename" = "x$tool_specified"; then
9980 9980 # A command without a complete path is provided, search $PATH.
9981 9981 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9982 9982 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9983 9983 # Extract the first word of "$tool_basename", so it can be a program name with args.
9984 9984 set dummy $tool_basename; ac_word=$2
9985 9985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9986 9986 $as_echo_n "checking for $ac_word... " >&6; }
9987 9987 if ${ac_cv_path_NAWK+:} false; then :
9988 9988 $as_echo_n "(cached) " >&6
9989 9989 else
9990 9990 case $NAWK in
9991 9991 [\\/]* | ?:[\\/]*)
9992 9992 ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9993 9993 ;;
9994 9994 *)
9995 9995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9996 9996 for as_dir in $PATH
9997 9997 do
9998 9998 IFS=$as_save_IFS
9999 9999 test -z "$as_dir" && as_dir=.
10000 10000 for ac_exec_ext in '' $ac_executable_extensions; do
10001 10001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10002 10002 ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10003 10003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10004 10004 break 2
10005 10005 fi
10006 10006 done
10007 10007 done
10008 10008 IFS=$as_save_IFS
10009 10009
10010 10010 ;;
10011 10011 esac
10012 10012 fi
10013 10013 NAWK=$ac_cv_path_NAWK
10014 10014 if test -n "$NAWK"; then
10015 10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10016 10016 $as_echo "$NAWK" >&6; }
10017 10017 else
10018 10018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10019 10019 $as_echo "no" >&6; }
10020 10020 fi
10021 10021
10022 10022
10023 10023 if test "x$NAWK" = x; then
10024 10024 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10025 10025 fi
10026 10026 else
10027 10027 # Otherwise we believe it is a complete path. Use it as it is.
10028 10028 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10029 10029 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10030 10030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10031 10031 $as_echo_n "checking for NAWK... " >&6; }
10032 10032 if test ! -x "$tool_specified"; then
10033 10033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10034 10034 $as_echo "not found" >&6; }
10035 10035 as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10036 10036 fi
10037 10037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10038 10038 $as_echo "$tool_specified" >&6; }
10039 10039 fi
10040 10040 fi
10041 10041 fi
10042 10042
10043 10043 fi
10044 10044
10045 10045
10046 10046
10047 10047 if test "x$NAWK" = x; then
10048 10048 as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10049 10049 fi
10050 10050
10051 10051
10052 10052
10053 10053
10054 10054
10055 10055 # Publish this variable in the help.
10056 10056
10057 10057
10058 10058 if [ -z "${PRINTF+x}" ]; then
10059 10059 # The variable is not set by user, try to locate tool using the code snippet
10060 10060 for ac_prog in printf
10061 10061 do
10062 10062 # Extract the first word of "$ac_prog", so it can be a program name with args.
10063 10063 set dummy $ac_prog; ac_word=$2
10064 10064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10065 10065 $as_echo_n "checking for $ac_word... " >&6; }
10066 10066 if ${ac_cv_path_PRINTF+:} false; then :
10067 10067 $as_echo_n "(cached) " >&6
10068 10068 else
10069 10069 case $PRINTF in
10070 10070 [\\/]* | ?:[\\/]*)
10071 10071 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10072 10072 ;;
10073 10073 *)
10074 10074 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10075 10075 for as_dir in $PATH
10076 10076 do
10077 10077 IFS=$as_save_IFS
10078 10078 test -z "$as_dir" && as_dir=.
10079 10079 for ac_exec_ext in '' $ac_executable_extensions; do
10080 10080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10081 10081 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10082 10082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10083 10083 break 2
10084 10084 fi
10085 10085 done
10086 10086 done
10087 10087 IFS=$as_save_IFS
10088 10088
10089 10089 ;;
10090 10090 esac
10091 10091 fi
10092 10092 PRINTF=$ac_cv_path_PRINTF
10093 10093 if test -n "$PRINTF"; then
10094 10094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10095 10095 $as_echo "$PRINTF" >&6; }
10096 10096 else
10097 10097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10098 10098 $as_echo "no" >&6; }
10099 10099 fi
10100 10100
10101 10101
10102 10102 test -n "$PRINTF" && break
10103 10103 done
10104 10104
10105 10105 else
10106 10106 # The variable is set, but is it from the command line or the environment?
10107 10107
10108 10108 # Try to remove the string !PRINTF! from our list.
10109 10109 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10110 10110 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10111 10111 # If it failed, the variable was not from the command line. Ignore it,
10112 10112 # but warn the user (except for BASH, which is always set by the calling BASH).
10113 10113 if test "xPRINTF" != xBASH; then
10114 10114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10115 10115 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10116 10116 fi
10117 10117 # Try to locate tool using the code snippet
10118 10118 for ac_prog in printf
10119 10119 do
10120 10120 # Extract the first word of "$ac_prog", so it can be a program name with args.
10121 10121 set dummy $ac_prog; ac_word=$2
10122 10122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10123 10123 $as_echo_n "checking for $ac_word... " >&6; }
10124 10124 if ${ac_cv_path_PRINTF+:} false; then :
10125 10125 $as_echo_n "(cached) " >&6
10126 10126 else
10127 10127 case $PRINTF in
10128 10128 [\\/]* | ?:[\\/]*)
10129 10129 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10130 10130 ;;
10131 10131 *)
10132 10132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10133 10133 for as_dir in $PATH
10134 10134 do
10135 10135 IFS=$as_save_IFS
10136 10136 test -z "$as_dir" && as_dir=.
10137 10137 for ac_exec_ext in '' $ac_executable_extensions; do
10138 10138 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10139 10139 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10140 10140 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10141 10141 break 2
10142 10142 fi
10143 10143 done
10144 10144 done
10145 10145 IFS=$as_save_IFS
10146 10146
10147 10147 ;;
10148 10148 esac
10149 10149 fi
10150 10150 PRINTF=$ac_cv_path_PRINTF
10151 10151 if test -n "$PRINTF"; then
10152 10152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10153 10153 $as_echo "$PRINTF" >&6; }
10154 10154 else
10155 10155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10156 10156 $as_echo "no" >&6; }
10157 10157 fi
10158 10158
10159 10159
10160 10160 test -n "$PRINTF" && break
10161 10161 done
10162 10162
10163 10163 else
10164 10164 # If it succeeded, then it was overridden by the user. We will use it
10165 10165 # for the tool.
10166 10166
10167 10167 # First remove it from the list of overridden variables, so we can test
10168 10168 # for unknown variables in the end.
10169 10169 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10170 10170
10171 10171 # Check if we try to supply an empty value
10172 10172 if test "x$PRINTF" = x; then
10173 10173 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10174 10174 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10175 10175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10176 10176 $as_echo_n "checking for PRINTF... " >&6; }
10177 10177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10178 10178 $as_echo "disabled" >&6; }
10179 10179 else
10180 10180 # Check if the provided tool contains a complete path.
10181 10181 tool_specified="$PRINTF"
10182 10182 tool_basename="${tool_specified##*/}"
10183 10183 if test "x$tool_basename" = "x$tool_specified"; then
10184 10184 # A command without a complete path is provided, search $PATH.
10185 10185 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10186 10186 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10187 10187 # Extract the first word of "$tool_basename", so it can be a program name with args.
10188 10188 set dummy $tool_basename; ac_word=$2
10189 10189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10190 10190 $as_echo_n "checking for $ac_word... " >&6; }
10191 10191 if ${ac_cv_path_PRINTF+:} false; then :
10192 10192 $as_echo_n "(cached) " >&6
10193 10193 else
10194 10194 case $PRINTF in
10195 10195 [\\/]* | ?:[\\/]*)
10196 10196 ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10197 10197 ;;
10198 10198 *)
10199 10199 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10200 10200 for as_dir in $PATH
10201 10201 do
10202 10202 IFS=$as_save_IFS
10203 10203 test -z "$as_dir" && as_dir=.
10204 10204 for ac_exec_ext in '' $ac_executable_extensions; do
10205 10205 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10206 10206 ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10207 10207 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10208 10208 break 2
10209 10209 fi
10210 10210 done
10211 10211 done
10212 10212 IFS=$as_save_IFS
10213 10213
10214 10214 ;;
10215 10215 esac
10216 10216 fi
10217 10217 PRINTF=$ac_cv_path_PRINTF
10218 10218 if test -n "$PRINTF"; then
10219 10219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10220 10220 $as_echo "$PRINTF" >&6; }
10221 10221 else
10222 10222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223 10223 $as_echo "no" >&6; }
10224 10224 fi
10225 10225
10226 10226
10227 10227 if test "x$PRINTF" = x; then
10228 10228 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10229 10229 fi
10230 10230 else
10231 10231 # Otherwise we believe it is a complete path. Use it as it is.
10232 10232 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10233 10233 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10234 10234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10235 10235 $as_echo_n "checking for PRINTF... " >&6; }
10236 10236 if test ! -x "$tool_specified"; then
10237 10237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10238 10238 $as_echo "not found" >&6; }
10239 10239 as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10240 10240 fi
10241 10241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10242 10242 $as_echo "$tool_specified" >&6; }
10243 10243 fi
10244 10244 fi
10245 10245 fi
10246 10246
10247 10247 fi
10248 10248
10249 10249
10250 10250
10251 10251 if test "x$PRINTF" = x; then
10252 10252 as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10253 10253 fi
10254 10254
10255 10255
10256 10256
10257 10257
10258 10258
10259 10259 # Publish this variable in the help.
10260 10260
10261 10261
10262 10262 if [ -z "${RM+x}" ]; then
10263 10263 # The variable is not set by user, try to locate tool using the code snippet
10264 10264 for ac_prog in rm
10265 10265 do
10266 10266 # Extract the first word of "$ac_prog", so it can be a program name with args.
10267 10267 set dummy $ac_prog; ac_word=$2
10268 10268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10269 10269 $as_echo_n "checking for $ac_word... " >&6; }
10270 10270 if ${ac_cv_path_RM+:} false; then :
10271 10271 $as_echo_n "(cached) " >&6
10272 10272 else
10273 10273 case $RM in
10274 10274 [\\/]* | ?:[\\/]*)
10275 10275 ac_cv_path_RM="$RM" # Let the user override the test with a path.
10276 10276 ;;
10277 10277 *)
10278 10278 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10279 10279 for as_dir in $PATH
10280 10280 do
10281 10281 IFS=$as_save_IFS
10282 10282 test -z "$as_dir" && as_dir=.
10283 10283 for ac_exec_ext in '' $ac_executable_extensions; do
10284 10284 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10285 10285 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10286 10286 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10287 10287 break 2
10288 10288 fi
10289 10289 done
10290 10290 done
10291 10291 IFS=$as_save_IFS
10292 10292
10293 10293 ;;
10294 10294 esac
10295 10295 fi
10296 10296 RM=$ac_cv_path_RM
10297 10297 if test -n "$RM"; then
10298 10298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10299 10299 $as_echo "$RM" >&6; }
10300 10300 else
10301 10301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10302 10302 $as_echo "no" >&6; }
10303 10303 fi
10304 10304
10305 10305
10306 10306 test -n "$RM" && break
10307 10307 done
10308 10308
10309 10309 else
10310 10310 # The variable is set, but is it from the command line or the environment?
10311 10311
10312 10312 # Try to remove the string !RM! from our list.
10313 10313 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10314 10314 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10315 10315 # If it failed, the variable was not from the command line. Ignore it,
10316 10316 # but warn the user (except for BASH, which is always set by the calling BASH).
10317 10317 if test "xRM" != xBASH; then
10318 10318 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10319 10319 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10320 10320 fi
10321 10321 # Try to locate tool using the code snippet
10322 10322 for ac_prog in rm
10323 10323 do
10324 10324 # Extract the first word of "$ac_prog", so it can be a program name with args.
10325 10325 set dummy $ac_prog; ac_word=$2
10326 10326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10327 10327 $as_echo_n "checking for $ac_word... " >&6; }
10328 10328 if ${ac_cv_path_RM+:} false; then :
10329 10329 $as_echo_n "(cached) " >&6
10330 10330 else
10331 10331 case $RM in
10332 10332 [\\/]* | ?:[\\/]*)
10333 10333 ac_cv_path_RM="$RM" # Let the user override the test with a path.
10334 10334 ;;
10335 10335 *)
10336 10336 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10337 10337 for as_dir in $PATH
10338 10338 do
10339 10339 IFS=$as_save_IFS
10340 10340 test -z "$as_dir" && as_dir=.
10341 10341 for ac_exec_ext in '' $ac_executable_extensions; do
10342 10342 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10343 10343 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10344 10344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10345 10345 break 2
10346 10346 fi
10347 10347 done
10348 10348 done
10349 10349 IFS=$as_save_IFS
10350 10350
10351 10351 ;;
10352 10352 esac
10353 10353 fi
10354 10354 RM=$ac_cv_path_RM
10355 10355 if test -n "$RM"; then
10356 10356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10357 10357 $as_echo "$RM" >&6; }
10358 10358 else
10359 10359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10360 10360 $as_echo "no" >&6; }
10361 10361 fi
10362 10362
10363 10363
10364 10364 test -n "$RM" && break
10365 10365 done
10366 10366
10367 10367 else
10368 10368 # If it succeeded, then it was overridden by the user. We will use it
10369 10369 # for the tool.
10370 10370
10371 10371 # First remove it from the list of overridden variables, so we can test
10372 10372 # for unknown variables in the end.
10373 10373 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10374 10374
10375 10375 # Check if we try to supply an empty value
10376 10376 if test "x$RM" = x; then
10377 10377 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10378 10378 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10379 10379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10380 10380 $as_echo_n "checking for RM... " >&6; }
10381 10381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10382 10382 $as_echo "disabled" >&6; }
10383 10383 else
10384 10384 # Check if the provided tool contains a complete path.
10385 10385 tool_specified="$RM"
10386 10386 tool_basename="${tool_specified##*/}"
10387 10387 if test "x$tool_basename" = "x$tool_specified"; then
10388 10388 # A command without a complete path is provided, search $PATH.
10389 10389 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10390 10390 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10391 10391 # Extract the first word of "$tool_basename", so it can be a program name with args.
10392 10392 set dummy $tool_basename; ac_word=$2
10393 10393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10394 10394 $as_echo_n "checking for $ac_word... " >&6; }
10395 10395 if ${ac_cv_path_RM+:} false; then :
10396 10396 $as_echo_n "(cached) " >&6
10397 10397 else
10398 10398 case $RM in
10399 10399 [\\/]* | ?:[\\/]*)
10400 10400 ac_cv_path_RM="$RM" # Let the user override the test with a path.
10401 10401 ;;
10402 10402 *)
10403 10403 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10404 10404 for as_dir in $PATH
10405 10405 do
10406 10406 IFS=$as_save_IFS
10407 10407 test -z "$as_dir" && as_dir=.
10408 10408 for ac_exec_ext in '' $ac_executable_extensions; do
10409 10409 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10410 10410 ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10411 10411 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10412 10412 break 2
10413 10413 fi
10414 10414 done
10415 10415 done
10416 10416 IFS=$as_save_IFS
10417 10417
10418 10418 ;;
10419 10419 esac
10420 10420 fi
10421 10421 RM=$ac_cv_path_RM
10422 10422 if test -n "$RM"; then
10423 10423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10424 10424 $as_echo "$RM" >&6; }
10425 10425 else
10426 10426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427 10427 $as_echo "no" >&6; }
10428 10428 fi
10429 10429
10430 10430
10431 10431 if test "x$RM" = x; then
10432 10432 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10433 10433 fi
10434 10434 else
10435 10435 # Otherwise we believe it is a complete path. Use it as it is.
10436 10436 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10437 10437 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10438 10438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10439 10439 $as_echo_n "checking for RM... " >&6; }
10440 10440 if test ! -x "$tool_specified"; then
10441 10441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10442 10442 $as_echo "not found" >&6; }
10443 10443 as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10444 10444 fi
10445 10445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10446 10446 $as_echo "$tool_specified" >&6; }
10447 10447 fi
10448 10448 fi
10449 10449 fi
10450 10450
10451 10451 fi
10452 10452
10453 10453
10454 10454
10455 10455 if test "x$RM" = x; then
10456 10456 as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10457 10457 fi
10458 10458
10459 10459
10460 10460
10461 10461
10462 10462
10463 10463 # Publish this variable in the help.
10464 10464
10465 10465
10466 10466 if [ -z "${RMDIR+x}" ]; then
10467 10467 # The variable is not set by user, try to locate tool using the code snippet
10468 10468 for ac_prog in rmdir
10469 10469 do
10470 10470 # Extract the first word of "$ac_prog", so it can be a program name with args.
10471 10471 set dummy $ac_prog; ac_word=$2
10472 10472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10473 10473 $as_echo_n "checking for $ac_word... " >&6; }
10474 10474 if ${ac_cv_path_RMDIR+:} false; then :
10475 10475 $as_echo_n "(cached) " >&6
10476 10476 else
10477 10477 case $RMDIR in
10478 10478 [\\/]* | ?:[\\/]*)
10479 10479 ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10480 10480 ;;
10481 10481 *)
10482 10482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10483 10483 for as_dir in $PATH
10484 10484 do
10485 10485 IFS=$as_save_IFS
10486 10486 test -z "$as_dir" && as_dir=.
10487 10487 for ac_exec_ext in '' $ac_executable_extensions; do
10488 10488 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10489 10489 ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10490 10490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10491 10491 break 2
10492 10492 fi
10493 10493 done
10494 10494 done
10495 10495 IFS=$as_save_IFS
10496 10496
10497 10497 ;;
10498 10498 esac
10499 10499 fi
10500 10500 RMDIR=$ac_cv_path_RMDIR
10501 10501 if test -n "$RMDIR"; then
10502 10502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10503 10503 $as_echo "$RMDIR" >&6; }
10504 10504 else
10505 10505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10506 10506 $as_echo "no" >&6; }
10507 10507 fi
10508 10508
10509 10509
10510 10510 test -n "$RMDIR" && break
10511 10511 done
10512 10512
10513 10513 else
10514 10514 # The variable is set, but is it from the command line or the environment?
10515 10515
10516 10516 # Try to remove the string !RMDIR! from our list.
10517 10517 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10518 10518 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10519 10519 # If it failed, the variable was not from the command line. Ignore it,
10520 10520 # but warn the user (except for BASH, which is always set by the calling BASH).
10521 10521 if test "xRMDIR" != xBASH; then
10522 10522 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10523 10523 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10524 10524 fi
10525 10525 # Try to locate tool using the code snippet
10526 10526 for ac_prog in rmdir
10527 10527 do
10528 10528 # Extract the first word of "$ac_prog", so it can be a program name with args.
10529 10529 set dummy $ac_prog; ac_word=$2
10530 10530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10531 10531 $as_echo_n "checking for $ac_word... " >&6; }
10532 10532 if ${ac_cv_path_RMDIR+:} false; then :
10533 10533 $as_echo_n "(cached) " >&6
10534 10534 else
10535 10535 case $RMDIR in
10536 10536 [\\/]* | ?:[\\/]*)
10537 10537 ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10538 10538 ;;
10539 10539 *)
10540 10540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10541 10541 for as_dir in $PATH
10542 10542 do
10543 10543 IFS=$as_save_IFS
10544 10544 test -z "$as_dir" && as_dir=.
10545 10545 for ac_exec_ext in '' $ac_executable_extensions; do
10546 10546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10547 10547 ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10548 10548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10549 10549 break 2
10550 10550 fi
10551 10551 done
10552 10552 done
10553 10553 IFS=$as_save_IFS
10554 10554
10555 10555 ;;
10556 10556 esac
10557 10557 fi
10558 10558 RMDIR=$ac_cv_path_RMDIR
10559 10559 if test -n "$RMDIR"; then
10560 10560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10561 10561 $as_echo "$RMDIR" >&6; }
10562 10562 else
10563 10563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10564 10564 $as_echo "no" >&6; }
10565 10565 fi
10566 10566
10567 10567
10568 10568 test -n "$RMDIR" && break
10569 10569 done
10570 10570
10571 10571 else
10572 10572 # If it succeeded, then it was overridden by the user. We will use it
10573 10573 # for the tool.
10574 10574
10575 10575 # First remove it from the list of overridden variables, so we can test
10576 10576 # for unknown variables in the end.
10577 10577 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10578 10578
10579 10579 # Check if we try to supply an empty value
10580 10580 if test "x$RMDIR" = x; then
10581 10581 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10582 10582 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10583 10583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10584 10584 $as_echo_n "checking for RMDIR... " >&6; }
10585 10585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10586 10586 $as_echo "disabled" >&6; }
10587 10587 else
10588 10588 # Check if the provided tool contains a complete path.
10589 10589 tool_specified="$RMDIR"
10590 10590 tool_basename="${tool_specified##*/}"
10591 10591 if test "x$tool_basename" = "x$tool_specified"; then
10592 10592 # A command without a complete path is provided, search $PATH.
10593 10593 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10594 10594 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10595 10595 # Extract the first word of "$tool_basename", so it can be a program name with args.
10596 10596 set dummy $tool_basename; ac_word=$2
10597 10597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10598 10598 $as_echo_n "checking for $ac_word... " >&6; }
10599 10599 if ${ac_cv_path_RMDIR+:} false; then :
10600 10600 $as_echo_n "(cached) " >&6
10601 10601 else
10602 10602 case $RMDIR in
10603 10603 [\\/]* | ?:[\\/]*)
10604 10604 ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10605 10605 ;;
10606 10606 *)
10607 10607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10608 10608 for as_dir in $PATH
10609 10609 do
10610 10610 IFS=$as_save_IFS
10611 10611 test -z "$as_dir" && as_dir=.
10612 10612 for ac_exec_ext in '' $ac_executable_extensions; do
10613 10613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10614 10614 ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10615 10615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10616 10616 break 2
10617 10617 fi
10618 10618 done
10619 10619 done
10620 10620 IFS=$as_save_IFS
10621 10621
10622 10622 ;;
10623 10623 esac
10624 10624 fi
10625 10625 RMDIR=$ac_cv_path_RMDIR
10626 10626 if test -n "$RMDIR"; then
10627 10627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10628 10628 $as_echo "$RMDIR" >&6; }
10629 10629 else
10630 10630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10631 10631 $as_echo "no" >&6; }
10632 10632 fi
10633 10633
10634 10634
10635 10635 if test "x$RMDIR" = x; then
10636 10636 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10637 10637 fi
10638 10638 else
10639 10639 # Otherwise we believe it is a complete path. Use it as it is.
10640 10640 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10641 10641 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10642 10642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10643 10643 $as_echo_n "checking for RMDIR... " >&6; }
10644 10644 if test ! -x "$tool_specified"; then
10645 10645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10646 10646 $as_echo "not found" >&6; }
10647 10647 as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10648 10648 fi
10649 10649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10650 10650 $as_echo "$tool_specified" >&6; }
10651 10651 fi
10652 10652 fi
10653 10653 fi
10654 10654
10655 10655 fi
10656 10656
10657 10657
10658 10658
10659 10659 if test "x$RMDIR" = x; then
10660 10660 as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10661 10661 fi
10662 10662
10663 10663
10664 10664
10665 10665
10666 10666
10667 10667 # Publish this variable in the help.
10668 10668
10669 10669
10670 10670 if [ -z "${SH+x}" ]; then
10671 10671 # The variable is not set by user, try to locate tool using the code snippet
10672 10672 for ac_prog in sh
10673 10673 do
10674 10674 # Extract the first word of "$ac_prog", so it can be a program name with args.
10675 10675 set dummy $ac_prog; ac_word=$2
10676 10676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10677 10677 $as_echo_n "checking for $ac_word... " >&6; }
10678 10678 if ${ac_cv_path_SH+:} false; then :
10679 10679 $as_echo_n "(cached) " >&6
10680 10680 else
10681 10681 case $SH in
10682 10682 [\\/]* | ?:[\\/]*)
10683 10683 ac_cv_path_SH="$SH" # Let the user override the test with a path.
10684 10684 ;;
10685 10685 *)
10686 10686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10687 10687 for as_dir in $PATH
10688 10688 do
10689 10689 IFS=$as_save_IFS
10690 10690 test -z "$as_dir" && as_dir=.
10691 10691 for ac_exec_ext in '' $ac_executable_extensions; do
10692 10692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10693 10693 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10694 10694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10695 10695 break 2
10696 10696 fi
10697 10697 done
10698 10698 done
10699 10699 IFS=$as_save_IFS
10700 10700
10701 10701 ;;
10702 10702 esac
10703 10703 fi
10704 10704 SH=$ac_cv_path_SH
10705 10705 if test -n "$SH"; then
10706 10706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10707 10707 $as_echo "$SH" >&6; }
10708 10708 else
10709 10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10710 10710 $as_echo "no" >&6; }
10711 10711 fi
10712 10712
10713 10713
10714 10714 test -n "$SH" && break
10715 10715 done
10716 10716
10717 10717 else
10718 10718 # The variable is set, but is it from the command line or the environment?
10719 10719
10720 10720 # Try to remove the string !SH! from our list.
10721 10721 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10722 10722 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10723 10723 # If it failed, the variable was not from the command line. Ignore it,
10724 10724 # but warn the user (except for BASH, which is always set by the calling BASH).
10725 10725 if test "xSH" != xBASH; then
10726 10726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10727 10727 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10728 10728 fi
10729 10729 # Try to locate tool using the code snippet
10730 10730 for ac_prog in sh
10731 10731 do
10732 10732 # Extract the first word of "$ac_prog", so it can be a program name with args.
10733 10733 set dummy $ac_prog; ac_word=$2
10734 10734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10735 10735 $as_echo_n "checking for $ac_word... " >&6; }
10736 10736 if ${ac_cv_path_SH+:} false; then :
10737 10737 $as_echo_n "(cached) " >&6
10738 10738 else
10739 10739 case $SH in
10740 10740 [\\/]* | ?:[\\/]*)
10741 10741 ac_cv_path_SH="$SH" # Let the user override the test with a path.
10742 10742 ;;
10743 10743 *)
10744 10744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10745 10745 for as_dir in $PATH
10746 10746 do
10747 10747 IFS=$as_save_IFS
10748 10748 test -z "$as_dir" && as_dir=.
10749 10749 for ac_exec_ext in '' $ac_executable_extensions; do
10750 10750 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10751 10751 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10752 10752 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10753 10753 break 2
10754 10754 fi
10755 10755 done
10756 10756 done
10757 10757 IFS=$as_save_IFS
10758 10758
10759 10759 ;;
10760 10760 esac
10761 10761 fi
10762 10762 SH=$ac_cv_path_SH
10763 10763 if test -n "$SH"; then
10764 10764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10765 10765 $as_echo "$SH" >&6; }
10766 10766 else
10767 10767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10768 10768 $as_echo "no" >&6; }
10769 10769 fi
10770 10770
10771 10771
10772 10772 test -n "$SH" && break
10773 10773 done
10774 10774
10775 10775 else
10776 10776 # If it succeeded, then it was overridden by the user. We will use it
10777 10777 # for the tool.
10778 10778
10779 10779 # First remove it from the list of overridden variables, so we can test
10780 10780 # for unknown variables in the end.
10781 10781 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10782 10782
10783 10783 # Check if we try to supply an empty value
10784 10784 if test "x$SH" = x; then
10785 10785 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10786 10786 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10787 10787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10788 10788 $as_echo_n "checking for SH... " >&6; }
10789 10789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10790 10790 $as_echo "disabled" >&6; }
10791 10791 else
10792 10792 # Check if the provided tool contains a complete path.
10793 10793 tool_specified="$SH"
10794 10794 tool_basename="${tool_specified##*/}"
10795 10795 if test "x$tool_basename" = "x$tool_specified"; then
10796 10796 # A command without a complete path is provided, search $PATH.
10797 10797 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10798 10798 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10799 10799 # Extract the first word of "$tool_basename", so it can be a program name with args.
10800 10800 set dummy $tool_basename; ac_word=$2
10801 10801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10802 10802 $as_echo_n "checking for $ac_word... " >&6; }
10803 10803 if ${ac_cv_path_SH+:} false; then :
10804 10804 $as_echo_n "(cached) " >&6
10805 10805 else
10806 10806 case $SH in
10807 10807 [\\/]* | ?:[\\/]*)
10808 10808 ac_cv_path_SH="$SH" # Let the user override the test with a path.
10809 10809 ;;
10810 10810 *)
10811 10811 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10812 10812 for as_dir in $PATH
10813 10813 do
10814 10814 IFS=$as_save_IFS
10815 10815 test -z "$as_dir" && as_dir=.
10816 10816 for ac_exec_ext in '' $ac_executable_extensions; do
10817 10817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10818 10818 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10819 10819 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10820 10820 break 2
10821 10821 fi
10822 10822 done
10823 10823 done
10824 10824 IFS=$as_save_IFS
10825 10825
10826 10826 ;;
10827 10827 esac
10828 10828 fi
10829 10829 SH=$ac_cv_path_SH
10830 10830 if test -n "$SH"; then
10831 10831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10832 10832 $as_echo "$SH" >&6; }
10833 10833 else
10834 10834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835 10835 $as_echo "no" >&6; }
10836 10836 fi
10837 10837
10838 10838
10839 10839 if test "x$SH" = x; then
10840 10840 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10841 10841 fi
10842 10842 else
10843 10843 # Otherwise we believe it is a complete path. Use it as it is.
10844 10844 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10845 10845 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10846 10846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10847 10847 $as_echo_n "checking for SH... " >&6; }
10848 10848 if test ! -x "$tool_specified"; then
10849 10849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10850 10850 $as_echo "not found" >&6; }
10851 10851 as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10852 10852 fi
10853 10853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10854 10854 $as_echo "$tool_specified" >&6; }
10855 10855 fi
10856 10856 fi
10857 10857 fi
10858 10858
10859 10859 fi
10860 10860
10861 10861
10862 10862
10863 10863 if test "x$SH" = x; then
10864 10864 as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10865 10865 fi
10866 10866
10867 10867
10868 10868
10869 10869
10870 10870
10871 10871 # Publish this variable in the help.
10872 10872
10873 10873
10874 10874 if [ -z "${SORT+x}" ]; then
10875 10875 # The variable is not set by user, try to locate tool using the code snippet
10876 10876 for ac_prog in sort
10877 10877 do
10878 10878 # Extract the first word of "$ac_prog", so it can be a program name with args.
10879 10879 set dummy $ac_prog; ac_word=$2
10880 10880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10881 10881 $as_echo_n "checking for $ac_word... " >&6; }
10882 10882 if ${ac_cv_path_SORT+:} false; then :
10883 10883 $as_echo_n "(cached) " >&6
10884 10884 else
10885 10885 case $SORT in
10886 10886 [\\/]* | ?:[\\/]*)
10887 10887 ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10888 10888 ;;
10889 10889 *)
10890 10890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10891 10891 for as_dir in $PATH
10892 10892 do
10893 10893 IFS=$as_save_IFS
10894 10894 test -z "$as_dir" && as_dir=.
10895 10895 for ac_exec_ext in '' $ac_executable_extensions; do
10896 10896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10897 10897 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10898 10898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10899 10899 break 2
10900 10900 fi
10901 10901 done
10902 10902 done
10903 10903 IFS=$as_save_IFS
10904 10904
10905 10905 ;;
10906 10906 esac
10907 10907 fi
10908 10908 SORT=$ac_cv_path_SORT
10909 10909 if test -n "$SORT"; then
10910 10910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10911 10911 $as_echo "$SORT" >&6; }
10912 10912 else
10913 10913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10914 10914 $as_echo "no" >&6; }
10915 10915 fi
10916 10916
10917 10917
10918 10918 test -n "$SORT" && break
10919 10919 done
10920 10920
10921 10921 else
10922 10922 # The variable is set, but is it from the command line or the environment?
10923 10923
10924 10924 # Try to remove the string !SORT! from our list.
10925 10925 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10926 10926 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10927 10927 # If it failed, the variable was not from the command line. Ignore it,
10928 10928 # but warn the user (except for BASH, which is always set by the calling BASH).
10929 10929 if test "xSORT" != xBASH; then
10930 10930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10931 10931 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10932 10932 fi
10933 10933 # Try to locate tool using the code snippet
10934 10934 for ac_prog in sort
10935 10935 do
10936 10936 # Extract the first word of "$ac_prog", so it can be a program name with args.
10937 10937 set dummy $ac_prog; ac_word=$2
10938 10938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10939 10939 $as_echo_n "checking for $ac_word... " >&6; }
10940 10940 if ${ac_cv_path_SORT+:} false; then :
10941 10941 $as_echo_n "(cached) " >&6
10942 10942 else
10943 10943 case $SORT in
10944 10944 [\\/]* | ?:[\\/]*)
10945 10945 ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10946 10946 ;;
10947 10947 *)
10948 10948 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10949 10949 for as_dir in $PATH
10950 10950 do
10951 10951 IFS=$as_save_IFS
10952 10952 test -z "$as_dir" && as_dir=.
10953 10953 for ac_exec_ext in '' $ac_executable_extensions; do
10954 10954 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10955 10955 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10956 10956 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10957 10957 break 2
10958 10958 fi
10959 10959 done
10960 10960 done
10961 10961 IFS=$as_save_IFS
10962 10962
10963 10963 ;;
10964 10964 esac
10965 10965 fi
10966 10966 SORT=$ac_cv_path_SORT
10967 10967 if test -n "$SORT"; then
10968 10968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10969 10969 $as_echo "$SORT" >&6; }
10970 10970 else
10971 10971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10972 10972 $as_echo "no" >&6; }
10973 10973 fi
10974 10974
10975 10975
10976 10976 test -n "$SORT" && break
10977 10977 done
10978 10978
10979 10979 else
10980 10980 # If it succeeded, then it was overridden by the user. We will use it
10981 10981 # for the tool.
10982 10982
10983 10983 # First remove it from the list of overridden variables, so we can test
10984 10984 # for unknown variables in the end.
10985 10985 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10986 10986
10987 10987 # Check if we try to supply an empty value
10988 10988 if test "x$SORT" = x; then
10989 10989 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10990 10990 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10991 10991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10992 10992 $as_echo_n "checking for SORT... " >&6; }
10993 10993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10994 10994 $as_echo "disabled" >&6; }
10995 10995 else
10996 10996 # Check if the provided tool contains a complete path.
10997 10997 tool_specified="$SORT"
10998 10998 tool_basename="${tool_specified##*/}"
10999 10999 if test "x$tool_basename" = "x$tool_specified"; then
11000 11000 # A command without a complete path is provided, search $PATH.
11001 11001 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11002 11002 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11003 11003 # Extract the first word of "$tool_basename", so it can be a program name with args.
11004 11004 set dummy $tool_basename; ac_word=$2
11005 11005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11006 11006 $as_echo_n "checking for $ac_word... " >&6; }
11007 11007 if ${ac_cv_path_SORT+:} false; then :
11008 11008 $as_echo_n "(cached) " >&6
11009 11009 else
11010 11010 case $SORT in
11011 11011 [\\/]* | ?:[\\/]*)
11012 11012 ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11013 11013 ;;
11014 11014 *)
11015 11015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11016 11016 for as_dir in $PATH
11017 11017 do
11018 11018 IFS=$as_save_IFS
11019 11019 test -z "$as_dir" && as_dir=.
11020 11020 for ac_exec_ext in '' $ac_executable_extensions; do
11021 11021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11022 11022 ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11023 11023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11024 11024 break 2
11025 11025 fi
11026 11026 done
11027 11027 done
11028 11028 IFS=$as_save_IFS
11029 11029
11030 11030 ;;
11031 11031 esac
11032 11032 fi
11033 11033 SORT=$ac_cv_path_SORT
11034 11034 if test -n "$SORT"; then
11035 11035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11036 11036 $as_echo "$SORT" >&6; }
11037 11037 else
11038 11038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11039 11039 $as_echo "no" >&6; }
11040 11040 fi
11041 11041
11042 11042
11043 11043 if test "x$SORT" = x; then
11044 11044 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11045 11045 fi
11046 11046 else
11047 11047 # Otherwise we believe it is a complete path. Use it as it is.
11048 11048 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11049 11049 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11050 11050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11051 11051 $as_echo_n "checking for SORT... " >&6; }
11052 11052 if test ! -x "$tool_specified"; then
11053 11053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11054 11054 $as_echo "not found" >&6; }
11055 11055 as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11056 11056 fi
11057 11057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11058 11058 $as_echo "$tool_specified" >&6; }
11059 11059 fi
11060 11060 fi
11061 11061 fi
11062 11062
11063 11063 fi
11064 11064
11065 11065
11066 11066
11067 11067 if test "x$SORT" = x; then
11068 11068 as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11069 11069 fi
11070 11070
11071 11071
11072 11072
11073 11073
11074 11074
11075 11075 # Publish this variable in the help.
11076 11076
11077 11077
11078 11078 if [ -z "${TAIL+x}" ]; then
11079 11079 # The variable is not set by user, try to locate tool using the code snippet
11080 11080 for ac_prog in tail
11081 11081 do
11082 11082 # Extract the first word of "$ac_prog", so it can be a program name with args.
11083 11083 set dummy $ac_prog; ac_word=$2
11084 11084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11085 11085 $as_echo_n "checking for $ac_word... " >&6; }
11086 11086 if ${ac_cv_path_TAIL+:} false; then :
11087 11087 $as_echo_n "(cached) " >&6
11088 11088 else
11089 11089 case $TAIL in
11090 11090 [\\/]* | ?:[\\/]*)
11091 11091 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11092 11092 ;;
11093 11093 *)
11094 11094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11095 11095 for as_dir in $PATH
11096 11096 do
11097 11097 IFS=$as_save_IFS
11098 11098 test -z "$as_dir" && as_dir=.
11099 11099 for ac_exec_ext in '' $ac_executable_extensions; do
11100 11100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11101 11101 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11102 11102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11103 11103 break 2
11104 11104 fi
11105 11105 done
11106 11106 done
11107 11107 IFS=$as_save_IFS
11108 11108
11109 11109 ;;
11110 11110 esac
11111 11111 fi
11112 11112 TAIL=$ac_cv_path_TAIL
11113 11113 if test -n "$TAIL"; then
11114 11114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11115 11115 $as_echo "$TAIL" >&6; }
11116 11116 else
11117 11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11118 11118 $as_echo "no" >&6; }
11119 11119 fi
11120 11120
11121 11121
11122 11122 test -n "$TAIL" && break
11123 11123 done
11124 11124
11125 11125 else
11126 11126 # The variable is set, but is it from the command line or the environment?
11127 11127
11128 11128 # Try to remove the string !TAIL! from our list.
11129 11129 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11130 11130 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11131 11131 # If it failed, the variable was not from the command line. Ignore it,
11132 11132 # but warn the user (except for BASH, which is always set by the calling BASH).
11133 11133 if test "xTAIL" != xBASH; then
11134 11134 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11135 11135 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11136 11136 fi
11137 11137 # Try to locate tool using the code snippet
11138 11138 for ac_prog in tail
11139 11139 do
11140 11140 # Extract the first word of "$ac_prog", so it can be a program name with args.
11141 11141 set dummy $ac_prog; ac_word=$2
11142 11142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11143 11143 $as_echo_n "checking for $ac_word... " >&6; }
11144 11144 if ${ac_cv_path_TAIL+:} false; then :
11145 11145 $as_echo_n "(cached) " >&6
11146 11146 else
11147 11147 case $TAIL in
11148 11148 [\\/]* | ?:[\\/]*)
11149 11149 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11150 11150 ;;
11151 11151 *)
11152 11152 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11153 11153 for as_dir in $PATH
11154 11154 do
11155 11155 IFS=$as_save_IFS
11156 11156 test -z "$as_dir" && as_dir=.
11157 11157 for ac_exec_ext in '' $ac_executable_extensions; do
11158 11158 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11159 11159 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11160 11160 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11161 11161 break 2
11162 11162 fi
11163 11163 done
11164 11164 done
11165 11165 IFS=$as_save_IFS
11166 11166
11167 11167 ;;
11168 11168 esac
11169 11169 fi
11170 11170 TAIL=$ac_cv_path_TAIL
11171 11171 if test -n "$TAIL"; then
11172 11172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11173 11173 $as_echo "$TAIL" >&6; }
11174 11174 else
11175 11175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11176 11176 $as_echo "no" >&6; }
11177 11177 fi
11178 11178
11179 11179
11180 11180 test -n "$TAIL" && break
11181 11181 done
11182 11182
11183 11183 else
11184 11184 # If it succeeded, then it was overridden by the user. We will use it
11185 11185 # for the tool.
11186 11186
11187 11187 # First remove it from the list of overridden variables, so we can test
11188 11188 # for unknown variables in the end.
11189 11189 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11190 11190
11191 11191 # Check if we try to supply an empty value
11192 11192 if test "x$TAIL" = x; then
11193 11193 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11194 11194 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11195 11195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11196 11196 $as_echo_n "checking for TAIL... " >&6; }
11197 11197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11198 11198 $as_echo "disabled" >&6; }
11199 11199 else
11200 11200 # Check if the provided tool contains a complete path.
11201 11201 tool_specified="$TAIL"
11202 11202 tool_basename="${tool_specified##*/}"
11203 11203 if test "x$tool_basename" = "x$tool_specified"; then
11204 11204 # A command without a complete path is provided, search $PATH.
11205 11205 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11206 11206 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11207 11207 # Extract the first word of "$tool_basename", so it can be a program name with args.
11208 11208 set dummy $tool_basename; ac_word=$2
11209 11209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11210 11210 $as_echo_n "checking for $ac_word... " >&6; }
11211 11211 if ${ac_cv_path_TAIL+:} false; then :
11212 11212 $as_echo_n "(cached) " >&6
11213 11213 else
11214 11214 case $TAIL in
11215 11215 [\\/]* | ?:[\\/]*)
11216 11216 ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11217 11217 ;;
11218 11218 *)
11219 11219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11220 11220 for as_dir in $PATH
11221 11221 do
11222 11222 IFS=$as_save_IFS
11223 11223 test -z "$as_dir" && as_dir=.
11224 11224 for ac_exec_ext in '' $ac_executable_extensions; do
11225 11225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11226 11226 ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11227 11227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11228 11228 break 2
11229 11229 fi
11230 11230 done
11231 11231 done
11232 11232 IFS=$as_save_IFS
11233 11233
11234 11234 ;;
11235 11235 esac
11236 11236 fi
11237 11237 TAIL=$ac_cv_path_TAIL
11238 11238 if test -n "$TAIL"; then
11239 11239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11240 11240 $as_echo "$TAIL" >&6; }
11241 11241 else
11242 11242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11243 11243 $as_echo "no" >&6; }
11244 11244 fi
11245 11245
11246 11246
11247 11247 if test "x$TAIL" = x; then
11248 11248 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11249 11249 fi
11250 11250 else
11251 11251 # Otherwise we believe it is a complete path. Use it as it is.
11252 11252 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11253 11253 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11254 11254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11255 11255 $as_echo_n "checking for TAIL... " >&6; }
11256 11256 if test ! -x "$tool_specified"; then
11257 11257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11258 11258 $as_echo "not found" >&6; }
11259 11259 as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11260 11260 fi
11261 11261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11262 11262 $as_echo "$tool_specified" >&6; }
11263 11263 fi
11264 11264 fi
11265 11265 fi
11266 11266
11267 11267 fi
11268 11268
11269 11269
11270 11270
11271 11271 if test "x$TAIL" = x; then
11272 11272 as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11273 11273 fi
11274 11274
11275 11275
11276 11276
11277 11277
11278 11278
11279 11279 # Publish this variable in the help.
11280 11280
11281 11281
11282 11282 if [ -z "${TAR+x}" ]; then
11283 11283 # The variable is not set by user, try to locate tool using the code snippet
11284 11284 for ac_prog in gtar tar
11285 11285 do
11286 11286 # Extract the first word of "$ac_prog", so it can be a program name with args.
11287 11287 set dummy $ac_prog; ac_word=$2
11288 11288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11289 11289 $as_echo_n "checking for $ac_word... " >&6; }
11290 11290 if ${ac_cv_path_TAR+:} false; then :
11291 11291 $as_echo_n "(cached) " >&6
11292 11292 else
11293 11293 case $TAR in
11294 11294 [\\/]* | ?:[\\/]*)
11295 11295 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11296 11296 ;;
11297 11297 *)
11298 11298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11299 11299 for as_dir in $PATH
11300 11300 do
11301 11301 IFS=$as_save_IFS
11302 11302 test -z "$as_dir" && as_dir=.
11303 11303 for ac_exec_ext in '' $ac_executable_extensions; do
11304 11304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11305 11305 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11306 11306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11307 11307 break 2
11308 11308 fi
11309 11309 done
11310 11310 done
11311 11311 IFS=$as_save_IFS
11312 11312
11313 11313 ;;
11314 11314 esac
11315 11315 fi
11316 11316 TAR=$ac_cv_path_TAR
11317 11317 if test -n "$TAR"; then
11318 11318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11319 11319 $as_echo "$TAR" >&6; }
11320 11320 else
11321 11321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11322 11322 $as_echo "no" >&6; }
11323 11323 fi
11324 11324
11325 11325
11326 11326 test -n "$TAR" && break
11327 11327 done
11328 11328
11329 11329 else
11330 11330 # The variable is set, but is it from the command line or the environment?
11331 11331
11332 11332 # Try to remove the string !TAR! from our list.
11333 11333 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11334 11334 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11335 11335 # If it failed, the variable was not from the command line. Ignore it,
11336 11336 # but warn the user (except for BASH, which is always set by the calling BASH).
11337 11337 if test "xTAR" != xBASH; then
11338 11338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11339 11339 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11340 11340 fi
11341 11341 # Try to locate tool using the code snippet
11342 11342 for ac_prog in gtar tar
11343 11343 do
11344 11344 # Extract the first word of "$ac_prog", so it can be a program name with args.
11345 11345 set dummy $ac_prog; ac_word=$2
11346 11346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11347 11347 $as_echo_n "checking for $ac_word... " >&6; }
11348 11348 if ${ac_cv_path_TAR+:} false; then :
11349 11349 $as_echo_n "(cached) " >&6
11350 11350 else
11351 11351 case $TAR in
11352 11352 [\\/]* | ?:[\\/]*)
11353 11353 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11354 11354 ;;
11355 11355 *)
11356 11356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11357 11357 for as_dir in $PATH
11358 11358 do
11359 11359 IFS=$as_save_IFS
11360 11360 test -z "$as_dir" && as_dir=.
11361 11361 for ac_exec_ext in '' $ac_executable_extensions; do
11362 11362 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11363 11363 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11364 11364 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11365 11365 break 2
11366 11366 fi
11367 11367 done
11368 11368 done
11369 11369 IFS=$as_save_IFS
11370 11370
11371 11371 ;;
11372 11372 esac
11373 11373 fi
11374 11374 TAR=$ac_cv_path_TAR
11375 11375 if test -n "$TAR"; then
11376 11376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11377 11377 $as_echo "$TAR" >&6; }
11378 11378 else
11379 11379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380 11380 $as_echo "no" >&6; }
11381 11381 fi
11382 11382
11383 11383
11384 11384 test -n "$TAR" && break
11385 11385 done
11386 11386
11387 11387 else
11388 11388 # If it succeeded, then it was overridden by the user. We will use it
11389 11389 # for the tool.
11390 11390
11391 11391 # First remove it from the list of overridden variables, so we can test
11392 11392 # for unknown variables in the end.
11393 11393 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11394 11394
11395 11395 # Check if we try to supply an empty value
11396 11396 if test "x$TAR" = x; then
11397 11397 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11398 11398 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11399 11399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11400 11400 $as_echo_n "checking for TAR... " >&6; }
11401 11401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11402 11402 $as_echo "disabled" >&6; }
11403 11403 else
11404 11404 # Check if the provided tool contains a complete path.
11405 11405 tool_specified="$TAR"
11406 11406 tool_basename="${tool_specified##*/}"
11407 11407 if test "x$tool_basename" = "x$tool_specified"; then
11408 11408 # A command without a complete path is provided, search $PATH.
11409 11409 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11410 11410 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11411 11411 # Extract the first word of "$tool_basename", so it can be a program name with args.
11412 11412 set dummy $tool_basename; ac_word=$2
11413 11413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11414 11414 $as_echo_n "checking for $ac_word... " >&6; }
11415 11415 if ${ac_cv_path_TAR+:} false; then :
11416 11416 $as_echo_n "(cached) " >&6
11417 11417 else
11418 11418 case $TAR in
11419 11419 [\\/]* | ?:[\\/]*)
11420 11420 ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11421 11421 ;;
11422 11422 *)
11423 11423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11424 11424 for as_dir in $PATH
11425 11425 do
11426 11426 IFS=$as_save_IFS
11427 11427 test -z "$as_dir" && as_dir=.
11428 11428 for ac_exec_ext in '' $ac_executable_extensions; do
11429 11429 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11430 11430 ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11431 11431 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11432 11432 break 2
11433 11433 fi
11434 11434 done
11435 11435 done
11436 11436 IFS=$as_save_IFS
11437 11437
11438 11438 ;;
11439 11439 esac
11440 11440 fi
11441 11441 TAR=$ac_cv_path_TAR
11442 11442 if test -n "$TAR"; then
11443 11443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11444 11444 $as_echo "$TAR" >&6; }
11445 11445 else
11446 11446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447 11447 $as_echo "no" >&6; }
11448 11448 fi
11449 11449
11450 11450
11451 11451 if test "x$TAR" = x; then
11452 11452 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11453 11453 fi
11454 11454 else
11455 11455 # Otherwise we believe it is a complete path. Use it as it is.
11456 11456 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11457 11457 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11458 11458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11459 11459 $as_echo_n "checking for TAR... " >&6; }
11460 11460 if test ! -x "$tool_specified"; then
11461 11461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11462 11462 $as_echo "not found" >&6; }
11463 11463 as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11464 11464 fi
11465 11465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11466 11466 $as_echo "$tool_specified" >&6; }
11467 11467 fi
11468 11468 fi
11469 11469 fi
11470 11470
11471 11471 fi
11472 11472
11473 11473
11474 11474
11475 11475 if test "x$TAR" = x; then
11476 11476 as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11477 11477 fi
11478 11478
11479 11479
11480 11480
11481 11481
11482 11482
11483 11483 # Publish this variable in the help.
11484 11484
11485 11485
11486 11486 if [ -z "${TEE+x}" ]; then
11487 11487 # The variable is not set by user, try to locate tool using the code snippet
11488 11488 for ac_prog in tee
11489 11489 do
11490 11490 # Extract the first word of "$ac_prog", so it can be a program name with args.
11491 11491 set dummy $ac_prog; ac_word=$2
11492 11492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11493 11493 $as_echo_n "checking for $ac_word... " >&6; }
11494 11494 if ${ac_cv_path_TEE+:} false; then :
11495 11495 $as_echo_n "(cached) " >&6
11496 11496 else
11497 11497 case $TEE in
11498 11498 [\\/]* | ?:[\\/]*)
11499 11499 ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11500 11500 ;;
11501 11501 *)
11502 11502 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11503 11503 for as_dir in $PATH
11504 11504 do
11505 11505 IFS=$as_save_IFS
11506 11506 test -z "$as_dir" && as_dir=.
11507 11507 for ac_exec_ext in '' $ac_executable_extensions; do
11508 11508 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11509 11509 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11510 11510 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11511 11511 break 2
11512 11512 fi
11513 11513 done
11514 11514 done
11515 11515 IFS=$as_save_IFS
11516 11516
11517 11517 ;;
11518 11518 esac
11519 11519 fi
11520 11520 TEE=$ac_cv_path_TEE
11521 11521 if test -n "$TEE"; then
11522 11522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11523 11523 $as_echo "$TEE" >&6; }
11524 11524 else
11525 11525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11526 11526 $as_echo "no" >&6; }
11527 11527 fi
11528 11528
11529 11529
11530 11530 test -n "$TEE" && break
11531 11531 done
11532 11532
11533 11533 else
11534 11534 # The variable is set, but is it from the command line or the environment?
11535 11535
11536 11536 # Try to remove the string !TEE! from our list.
11537 11537 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11538 11538 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11539 11539 # If it failed, the variable was not from the command line. Ignore it,
11540 11540 # but warn the user (except for BASH, which is always set by the calling BASH).
11541 11541 if test "xTEE" != xBASH; then
11542 11542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11543 11543 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11544 11544 fi
11545 11545 # Try to locate tool using the code snippet
11546 11546 for ac_prog in tee
11547 11547 do
11548 11548 # Extract the first word of "$ac_prog", so it can be a program name with args.
11549 11549 set dummy $ac_prog; ac_word=$2
11550 11550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11551 11551 $as_echo_n "checking for $ac_word... " >&6; }
11552 11552 if ${ac_cv_path_TEE+:} false; then :
11553 11553 $as_echo_n "(cached) " >&6
11554 11554 else
11555 11555 case $TEE in
11556 11556 [\\/]* | ?:[\\/]*)
11557 11557 ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11558 11558 ;;
11559 11559 *)
11560 11560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11561 11561 for as_dir in $PATH
11562 11562 do
11563 11563 IFS=$as_save_IFS
11564 11564 test -z "$as_dir" && as_dir=.
11565 11565 for ac_exec_ext in '' $ac_executable_extensions; do
11566 11566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11567 11567 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11568 11568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11569 11569 break 2
11570 11570 fi
11571 11571 done
11572 11572 done
11573 11573 IFS=$as_save_IFS
11574 11574
11575 11575 ;;
11576 11576 esac
11577 11577 fi
11578 11578 TEE=$ac_cv_path_TEE
11579 11579 if test -n "$TEE"; then
11580 11580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11581 11581 $as_echo "$TEE" >&6; }
11582 11582 else
11583 11583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11584 11584 $as_echo "no" >&6; }
11585 11585 fi
11586 11586
11587 11587
11588 11588 test -n "$TEE" && break
11589 11589 done
11590 11590
11591 11591 else
11592 11592 # If it succeeded, then it was overridden by the user. We will use it
11593 11593 # for the tool.
11594 11594
11595 11595 # First remove it from the list of overridden variables, so we can test
11596 11596 # for unknown variables in the end.
11597 11597 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11598 11598
11599 11599 # Check if we try to supply an empty value
11600 11600 if test "x$TEE" = x; then
11601 11601 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11602 11602 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11603 11603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11604 11604 $as_echo_n "checking for TEE... " >&6; }
11605 11605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11606 11606 $as_echo "disabled" >&6; }
11607 11607 else
11608 11608 # Check if the provided tool contains a complete path.
11609 11609 tool_specified="$TEE"
11610 11610 tool_basename="${tool_specified##*/}"
11611 11611 if test "x$tool_basename" = "x$tool_specified"; then
11612 11612 # A command without a complete path is provided, search $PATH.
11613 11613 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11614 11614 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11615 11615 # Extract the first word of "$tool_basename", so it can be a program name with args.
11616 11616 set dummy $tool_basename; ac_word=$2
11617 11617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11618 11618 $as_echo_n "checking for $ac_word... " >&6; }
11619 11619 if ${ac_cv_path_TEE+:} false; then :
11620 11620 $as_echo_n "(cached) " >&6
11621 11621 else
11622 11622 case $TEE in
11623 11623 [\\/]* | ?:[\\/]*)
11624 11624 ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11625 11625 ;;
11626 11626 *)
11627 11627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11628 11628 for as_dir in $PATH
11629 11629 do
11630 11630 IFS=$as_save_IFS
11631 11631 test -z "$as_dir" && as_dir=.
11632 11632 for ac_exec_ext in '' $ac_executable_extensions; do
11633 11633 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11634 11634 ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11635 11635 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11636 11636 break 2
11637 11637 fi
11638 11638 done
11639 11639 done
11640 11640 IFS=$as_save_IFS
11641 11641
11642 11642 ;;
11643 11643 esac
11644 11644 fi
11645 11645 TEE=$ac_cv_path_TEE
11646 11646 if test -n "$TEE"; then
11647 11647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11648 11648 $as_echo "$TEE" >&6; }
11649 11649 else
11650 11650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11651 11651 $as_echo "no" >&6; }
11652 11652 fi
11653 11653
11654 11654
11655 11655 if test "x$TEE" = x; then
11656 11656 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11657 11657 fi
11658 11658 else
11659 11659 # Otherwise we believe it is a complete path. Use it as it is.
11660 11660 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11661 11661 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11662 11662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11663 11663 $as_echo_n "checking for TEE... " >&6; }
11664 11664 if test ! -x "$tool_specified"; then
11665 11665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11666 11666 $as_echo "not found" >&6; }
11667 11667 as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11668 11668 fi
11669 11669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11670 11670 $as_echo "$tool_specified" >&6; }
11671 11671 fi
11672 11672 fi
11673 11673 fi
11674 11674
11675 11675 fi
11676 11676
11677 11677
11678 11678
11679 11679 if test "x$TEE" = x; then
11680 11680 as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11681 11681 fi
11682 11682
11683 11683
11684 11684
11685 11685
11686 11686
11687 11687 # Publish this variable in the help.
11688 11688
11689 11689
11690 11690 if [ -z "${TOUCH+x}" ]; then
11691 11691 # The variable is not set by user, try to locate tool using the code snippet
11692 11692 for ac_prog in touch
11693 11693 do
11694 11694 # Extract the first word of "$ac_prog", so it can be a program name with args.
11695 11695 set dummy $ac_prog; ac_word=$2
11696 11696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11697 11697 $as_echo_n "checking for $ac_word... " >&6; }
11698 11698 if ${ac_cv_path_TOUCH+:} false; then :
11699 11699 $as_echo_n "(cached) " >&6
11700 11700 else
11701 11701 case $TOUCH in
11702 11702 [\\/]* | ?:[\\/]*)
11703 11703 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11704 11704 ;;
11705 11705 *)
11706 11706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11707 11707 for as_dir in $PATH
11708 11708 do
11709 11709 IFS=$as_save_IFS
11710 11710 test -z "$as_dir" && as_dir=.
11711 11711 for ac_exec_ext in '' $ac_executable_extensions; do
11712 11712 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11713 11713 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11714 11714 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11715 11715 break 2
11716 11716 fi
11717 11717 done
11718 11718 done
11719 11719 IFS=$as_save_IFS
11720 11720
11721 11721 ;;
11722 11722 esac
11723 11723 fi
11724 11724 TOUCH=$ac_cv_path_TOUCH
11725 11725 if test -n "$TOUCH"; then
11726 11726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11727 11727 $as_echo "$TOUCH" >&6; }
11728 11728 else
11729 11729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11730 11730 $as_echo "no" >&6; }
11731 11731 fi
11732 11732
11733 11733
11734 11734 test -n "$TOUCH" && break
11735 11735 done
11736 11736
11737 11737 else
11738 11738 # The variable is set, but is it from the command line or the environment?
11739 11739
11740 11740 # Try to remove the string !TOUCH! from our list.
11741 11741 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11742 11742 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11743 11743 # If it failed, the variable was not from the command line. Ignore it,
11744 11744 # but warn the user (except for BASH, which is always set by the calling BASH).
11745 11745 if test "xTOUCH" != xBASH; then
11746 11746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11747 11747 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11748 11748 fi
11749 11749 # Try to locate tool using the code snippet
11750 11750 for ac_prog in touch
11751 11751 do
11752 11752 # Extract the first word of "$ac_prog", so it can be a program name with args.
11753 11753 set dummy $ac_prog; ac_word=$2
11754 11754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11755 11755 $as_echo_n "checking for $ac_word... " >&6; }
11756 11756 if ${ac_cv_path_TOUCH+:} false; then :
11757 11757 $as_echo_n "(cached) " >&6
11758 11758 else
11759 11759 case $TOUCH in
11760 11760 [\\/]* | ?:[\\/]*)
11761 11761 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11762 11762 ;;
11763 11763 *)
11764 11764 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11765 11765 for as_dir in $PATH
11766 11766 do
11767 11767 IFS=$as_save_IFS
11768 11768 test -z "$as_dir" && as_dir=.
11769 11769 for ac_exec_ext in '' $ac_executable_extensions; do
11770 11770 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11771 11771 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11772 11772 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11773 11773 break 2
11774 11774 fi
11775 11775 done
11776 11776 done
11777 11777 IFS=$as_save_IFS
11778 11778
11779 11779 ;;
11780 11780 esac
11781 11781 fi
11782 11782 TOUCH=$ac_cv_path_TOUCH
11783 11783 if test -n "$TOUCH"; then
11784 11784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11785 11785 $as_echo "$TOUCH" >&6; }
11786 11786 else
11787 11787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11788 11788 $as_echo "no" >&6; }
11789 11789 fi
11790 11790
11791 11791
11792 11792 test -n "$TOUCH" && break
11793 11793 done
11794 11794
11795 11795 else
11796 11796 # If it succeeded, then it was overridden by the user. We will use it
11797 11797 # for the tool.
11798 11798
11799 11799 # First remove it from the list of overridden variables, so we can test
11800 11800 # for unknown variables in the end.
11801 11801 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11802 11802
11803 11803 # Check if we try to supply an empty value
11804 11804 if test "x$TOUCH" = x; then
11805 11805 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11806 11806 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11807 11807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11808 11808 $as_echo_n "checking for TOUCH... " >&6; }
11809 11809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11810 11810 $as_echo "disabled" >&6; }
11811 11811 else
11812 11812 # Check if the provided tool contains a complete path.
11813 11813 tool_specified="$TOUCH"
11814 11814 tool_basename="${tool_specified##*/}"
11815 11815 if test "x$tool_basename" = "x$tool_specified"; then
11816 11816 # A command without a complete path is provided, search $PATH.
11817 11817 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11818 11818 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11819 11819 # Extract the first word of "$tool_basename", so it can be a program name with args.
11820 11820 set dummy $tool_basename; ac_word=$2
11821 11821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11822 11822 $as_echo_n "checking for $ac_word... " >&6; }
11823 11823 if ${ac_cv_path_TOUCH+:} false; then :
11824 11824 $as_echo_n "(cached) " >&6
11825 11825 else
11826 11826 case $TOUCH in
11827 11827 [\\/]* | ?:[\\/]*)
11828 11828 ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11829 11829 ;;
11830 11830 *)
11831 11831 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11832 11832 for as_dir in $PATH
11833 11833 do
11834 11834 IFS=$as_save_IFS
11835 11835 test -z "$as_dir" && as_dir=.
11836 11836 for ac_exec_ext in '' $ac_executable_extensions; do
11837 11837 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11838 11838 ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11839 11839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11840 11840 break 2
11841 11841 fi
11842 11842 done
11843 11843 done
11844 11844 IFS=$as_save_IFS
11845 11845
11846 11846 ;;
11847 11847 esac
11848 11848 fi
11849 11849 TOUCH=$ac_cv_path_TOUCH
11850 11850 if test -n "$TOUCH"; then
11851 11851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11852 11852 $as_echo "$TOUCH" >&6; }
11853 11853 else
11854 11854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11855 11855 $as_echo "no" >&6; }
11856 11856 fi
11857 11857
11858 11858
11859 11859 if test "x$TOUCH" = x; then
11860 11860 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11861 11861 fi
11862 11862 else
11863 11863 # Otherwise we believe it is a complete path. Use it as it is.
11864 11864 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11865 11865 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11866 11866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11867 11867 $as_echo_n "checking for TOUCH... " >&6; }
11868 11868 if test ! -x "$tool_specified"; then
11869 11869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11870 11870 $as_echo "not found" >&6; }
11871 11871 as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11872 11872 fi
11873 11873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11874 11874 $as_echo "$tool_specified" >&6; }
11875 11875 fi
11876 11876 fi
11877 11877 fi
11878 11878
11879 11879 fi
11880 11880
11881 11881
11882 11882
11883 11883 if test "x$TOUCH" = x; then
11884 11884 as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11885 11885 fi
11886 11886
11887 11887
11888 11888
11889 11889
11890 11890
11891 11891 # Publish this variable in the help.
11892 11892
11893 11893
11894 11894 if [ -z "${TR+x}" ]; then
11895 11895 # The variable is not set by user, try to locate tool using the code snippet
11896 11896 for ac_prog in tr
11897 11897 do
11898 11898 # Extract the first word of "$ac_prog", so it can be a program name with args.
11899 11899 set dummy $ac_prog; ac_word=$2
11900 11900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11901 11901 $as_echo_n "checking for $ac_word... " >&6; }
11902 11902 if ${ac_cv_path_TR+:} false; then :
11903 11903 $as_echo_n "(cached) " >&6
11904 11904 else
11905 11905 case $TR in
11906 11906 [\\/]* | ?:[\\/]*)
11907 11907 ac_cv_path_TR="$TR" # Let the user override the test with a path.
11908 11908 ;;
11909 11909 *)
11910 11910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11911 11911 for as_dir in $PATH
11912 11912 do
11913 11913 IFS=$as_save_IFS
11914 11914 test -z "$as_dir" && as_dir=.
11915 11915 for ac_exec_ext in '' $ac_executable_extensions; do
11916 11916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11917 11917 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11918 11918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11919 11919 break 2
11920 11920 fi
11921 11921 done
11922 11922 done
11923 11923 IFS=$as_save_IFS
11924 11924
11925 11925 ;;
11926 11926 esac
11927 11927 fi
11928 11928 TR=$ac_cv_path_TR
11929 11929 if test -n "$TR"; then
11930 11930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11931 11931 $as_echo "$TR" >&6; }
11932 11932 else
11933 11933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11934 11934 $as_echo "no" >&6; }
11935 11935 fi
11936 11936
11937 11937
11938 11938 test -n "$TR" && break
11939 11939 done
11940 11940
11941 11941 else
11942 11942 # The variable is set, but is it from the command line or the environment?
11943 11943
11944 11944 # Try to remove the string !TR! from our list.
11945 11945 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11946 11946 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11947 11947 # If it failed, the variable was not from the command line. Ignore it,
11948 11948 # but warn the user (except for BASH, which is always set by the calling BASH).
11949 11949 if test "xTR" != xBASH; then
11950 11950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11951 11951 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11952 11952 fi
11953 11953 # Try to locate tool using the code snippet
11954 11954 for ac_prog in tr
11955 11955 do
11956 11956 # Extract the first word of "$ac_prog", so it can be a program name with args.
11957 11957 set dummy $ac_prog; ac_word=$2
11958 11958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11959 11959 $as_echo_n "checking for $ac_word... " >&6; }
11960 11960 if ${ac_cv_path_TR+:} false; then :
11961 11961 $as_echo_n "(cached) " >&6
11962 11962 else
11963 11963 case $TR in
11964 11964 [\\/]* | ?:[\\/]*)
11965 11965 ac_cv_path_TR="$TR" # Let the user override the test with a path.
11966 11966 ;;
11967 11967 *)
11968 11968 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11969 11969 for as_dir in $PATH
11970 11970 do
11971 11971 IFS=$as_save_IFS
11972 11972 test -z "$as_dir" && as_dir=.
11973 11973 for ac_exec_ext in '' $ac_executable_extensions; do
11974 11974 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11975 11975 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11976 11976 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11977 11977 break 2
11978 11978 fi
11979 11979 done
11980 11980 done
11981 11981 IFS=$as_save_IFS
11982 11982
11983 11983 ;;
11984 11984 esac
11985 11985 fi
11986 11986 TR=$ac_cv_path_TR
11987 11987 if test -n "$TR"; then
11988 11988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11989 11989 $as_echo "$TR" >&6; }
11990 11990 else
11991 11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11992 11992 $as_echo "no" >&6; }
11993 11993 fi
11994 11994
11995 11995
11996 11996 test -n "$TR" && break
11997 11997 done
11998 11998
11999 11999 else
12000 12000 # If it succeeded, then it was overridden by the user. We will use it
12001 12001 # for the tool.
12002 12002
12003 12003 # First remove it from the list of overridden variables, so we can test
12004 12004 # for unknown variables in the end.
12005 12005 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12006 12006
12007 12007 # Check if we try to supply an empty value
12008 12008 if test "x$TR" = x; then
12009 12009 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12010 12010 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12011 12011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12012 12012 $as_echo_n "checking for TR... " >&6; }
12013 12013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12014 12014 $as_echo "disabled" >&6; }
12015 12015 else
12016 12016 # Check if the provided tool contains a complete path.
12017 12017 tool_specified="$TR"
12018 12018 tool_basename="${tool_specified##*/}"
12019 12019 if test "x$tool_basename" = "x$tool_specified"; then
12020 12020 # A command without a complete path is provided, search $PATH.
12021 12021 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12022 12022 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12023 12023 # Extract the first word of "$tool_basename", so it can be a program name with args.
12024 12024 set dummy $tool_basename; ac_word=$2
12025 12025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12026 12026 $as_echo_n "checking for $ac_word... " >&6; }
12027 12027 if ${ac_cv_path_TR+:} false; then :
12028 12028 $as_echo_n "(cached) " >&6
12029 12029 else
12030 12030 case $TR in
12031 12031 [\\/]* | ?:[\\/]*)
12032 12032 ac_cv_path_TR="$TR" # Let the user override the test with a path.
12033 12033 ;;
12034 12034 *)
12035 12035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12036 12036 for as_dir in $PATH
12037 12037 do
12038 12038 IFS=$as_save_IFS
12039 12039 test -z "$as_dir" && as_dir=.
12040 12040 for ac_exec_ext in '' $ac_executable_extensions; do
12041 12041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12042 12042 ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12043 12043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12044 12044 break 2
12045 12045 fi
12046 12046 done
12047 12047 done
12048 12048 IFS=$as_save_IFS
12049 12049
12050 12050 ;;
12051 12051 esac
12052 12052 fi
12053 12053 TR=$ac_cv_path_TR
12054 12054 if test -n "$TR"; then
12055 12055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12056 12056 $as_echo "$TR" >&6; }
12057 12057 else
12058 12058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12059 12059 $as_echo "no" >&6; }
12060 12060 fi
12061 12061
12062 12062
12063 12063 if test "x$TR" = x; then
12064 12064 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12065 12065 fi
12066 12066 else
12067 12067 # Otherwise we believe it is a complete path. Use it as it is.
12068 12068 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12069 12069 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12070 12070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12071 12071 $as_echo_n "checking for TR... " >&6; }
12072 12072 if test ! -x "$tool_specified"; then
12073 12073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12074 12074 $as_echo "not found" >&6; }
12075 12075 as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12076 12076 fi
12077 12077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12078 12078 $as_echo "$tool_specified" >&6; }
12079 12079 fi
12080 12080 fi
12081 12081 fi
12082 12082
12083 12083 fi
12084 12084
12085 12085
12086 12086
12087 12087 if test "x$TR" = x; then
12088 12088 as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12089 12089 fi
12090 12090
12091 12091
12092 12092
12093 12093
12094 12094
12095 12095 # Publish this variable in the help.
12096 12096
12097 12097
12098 12098 if [ -z "${UNAME+x}" ]; then
12099 12099 # The variable is not set by user, try to locate tool using the code snippet
12100 12100 for ac_prog in uname
12101 12101 do
12102 12102 # Extract the first word of "$ac_prog", so it can be a program name with args.
12103 12103 set dummy $ac_prog; ac_word=$2
12104 12104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12105 12105 $as_echo_n "checking for $ac_word... " >&6; }
12106 12106 if ${ac_cv_path_UNAME+:} false; then :
12107 12107 $as_echo_n "(cached) " >&6
12108 12108 else
12109 12109 case $UNAME in
12110 12110 [\\/]* | ?:[\\/]*)
12111 12111 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12112 12112 ;;
12113 12113 *)
12114 12114 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12115 12115 for as_dir in $PATH
12116 12116 do
12117 12117 IFS=$as_save_IFS
12118 12118 test -z "$as_dir" && as_dir=.
12119 12119 for ac_exec_ext in '' $ac_executable_extensions; do
12120 12120 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12121 12121 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12122 12122 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12123 12123 break 2
12124 12124 fi
12125 12125 done
12126 12126 done
12127 12127 IFS=$as_save_IFS
12128 12128
12129 12129 ;;
12130 12130 esac
12131 12131 fi
12132 12132 UNAME=$ac_cv_path_UNAME
12133 12133 if test -n "$UNAME"; then
12134 12134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12135 12135 $as_echo "$UNAME" >&6; }
12136 12136 else
12137 12137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12138 12138 $as_echo "no" >&6; }
12139 12139 fi
12140 12140
12141 12141
12142 12142 test -n "$UNAME" && break
12143 12143 done
12144 12144
12145 12145 else
12146 12146 # The variable is set, but is it from the command line or the environment?
12147 12147
12148 12148 # Try to remove the string !UNAME! from our list.
12149 12149 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12150 12150 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12151 12151 # If it failed, the variable was not from the command line. Ignore it,
12152 12152 # but warn the user (except for BASH, which is always set by the calling BASH).
12153 12153 if test "xUNAME" != xBASH; then
12154 12154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12155 12155 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12156 12156 fi
12157 12157 # Try to locate tool using the code snippet
12158 12158 for ac_prog in uname
12159 12159 do
12160 12160 # Extract the first word of "$ac_prog", so it can be a program name with args.
12161 12161 set dummy $ac_prog; ac_word=$2
12162 12162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12163 12163 $as_echo_n "checking for $ac_word... " >&6; }
12164 12164 if ${ac_cv_path_UNAME+:} false; then :
12165 12165 $as_echo_n "(cached) " >&6
12166 12166 else
12167 12167 case $UNAME in
12168 12168 [\\/]* | ?:[\\/]*)
12169 12169 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12170 12170 ;;
12171 12171 *)
12172 12172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12173 12173 for as_dir in $PATH
12174 12174 do
12175 12175 IFS=$as_save_IFS
12176 12176 test -z "$as_dir" && as_dir=.
12177 12177 for ac_exec_ext in '' $ac_executable_extensions; do
12178 12178 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12179 12179 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12180 12180 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12181 12181 break 2
12182 12182 fi
12183 12183 done
12184 12184 done
12185 12185 IFS=$as_save_IFS
12186 12186
12187 12187 ;;
12188 12188 esac
12189 12189 fi
12190 12190 UNAME=$ac_cv_path_UNAME
12191 12191 if test -n "$UNAME"; then
12192 12192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12193 12193 $as_echo "$UNAME" >&6; }
12194 12194 else
12195 12195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12196 12196 $as_echo "no" >&6; }
12197 12197 fi
12198 12198
12199 12199
12200 12200 test -n "$UNAME" && break
12201 12201 done
12202 12202
12203 12203 else
12204 12204 # If it succeeded, then it was overridden by the user. We will use it
12205 12205 # for the tool.
12206 12206
12207 12207 # First remove it from the list of overridden variables, so we can test
12208 12208 # for unknown variables in the end.
12209 12209 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12210 12210
12211 12211 # Check if we try to supply an empty value
12212 12212 if test "x$UNAME" = x; then
12213 12213 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12214 12214 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12215 12215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12216 12216 $as_echo_n "checking for UNAME... " >&6; }
12217 12217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12218 12218 $as_echo "disabled" >&6; }
12219 12219 else
12220 12220 # Check if the provided tool contains a complete path.
12221 12221 tool_specified="$UNAME"
12222 12222 tool_basename="${tool_specified##*/}"
12223 12223 if test "x$tool_basename" = "x$tool_specified"; then
12224 12224 # A command without a complete path is provided, search $PATH.
12225 12225 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12226 12226 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12227 12227 # Extract the first word of "$tool_basename", so it can be a program name with args.
12228 12228 set dummy $tool_basename; ac_word=$2
12229 12229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12230 12230 $as_echo_n "checking for $ac_word... " >&6; }
12231 12231 if ${ac_cv_path_UNAME+:} false; then :
12232 12232 $as_echo_n "(cached) " >&6
12233 12233 else
12234 12234 case $UNAME in
12235 12235 [\\/]* | ?:[\\/]*)
12236 12236 ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12237 12237 ;;
12238 12238 *)
12239 12239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12240 12240 for as_dir in $PATH
12241 12241 do
12242 12242 IFS=$as_save_IFS
12243 12243 test -z "$as_dir" && as_dir=.
12244 12244 for ac_exec_ext in '' $ac_executable_extensions; do
12245 12245 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12246 12246 ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12247 12247 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12248 12248 break 2
12249 12249 fi
12250 12250 done
12251 12251 done
12252 12252 IFS=$as_save_IFS
12253 12253
12254 12254 ;;
12255 12255 esac
12256 12256 fi
12257 12257 UNAME=$ac_cv_path_UNAME
12258 12258 if test -n "$UNAME"; then
12259 12259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12260 12260 $as_echo "$UNAME" >&6; }
12261 12261 else
12262 12262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12263 12263 $as_echo "no" >&6; }
12264 12264 fi
12265 12265
12266 12266
12267 12267 if test "x$UNAME" = x; then
12268 12268 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12269 12269 fi
12270 12270 else
12271 12271 # Otherwise we believe it is a complete path. Use it as it is.
12272 12272 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12273 12273 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12274 12274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12275 12275 $as_echo_n "checking for UNAME... " >&6; }
12276 12276 if test ! -x "$tool_specified"; then
12277 12277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12278 12278 $as_echo "not found" >&6; }
12279 12279 as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12280 12280 fi
12281 12281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12282 12282 $as_echo "$tool_specified" >&6; }
12283 12283 fi
12284 12284 fi
12285 12285 fi
12286 12286
12287 12287 fi
12288 12288
12289 12289
12290 12290
12291 12291 if test "x$UNAME" = x; then
12292 12292 as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12293 12293 fi
12294 12294
12295 12295
12296 12296
12297 12297
12298 12298
12299 12299 # Publish this variable in the help.
12300 12300
12301 12301
12302 12302 if [ -z "${UNIQ+x}" ]; then
12303 12303 # The variable is not set by user, try to locate tool using the code snippet
12304 12304 for ac_prog in uniq
12305 12305 do
12306 12306 # Extract the first word of "$ac_prog", so it can be a program name with args.
12307 12307 set dummy $ac_prog; ac_word=$2
12308 12308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12309 12309 $as_echo_n "checking for $ac_word... " >&6; }
12310 12310 if ${ac_cv_path_UNIQ+:} false; then :
12311 12311 $as_echo_n "(cached) " >&6
12312 12312 else
12313 12313 case $UNIQ in
12314 12314 [\\/]* | ?:[\\/]*)
12315 12315 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12316 12316 ;;
12317 12317 *)
12318 12318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12319 12319 for as_dir in $PATH
12320 12320 do
12321 12321 IFS=$as_save_IFS
12322 12322 test -z "$as_dir" && as_dir=.
12323 12323 for ac_exec_ext in '' $ac_executable_extensions; do
12324 12324 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12325 12325 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12326 12326 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12327 12327 break 2
12328 12328 fi
12329 12329 done
12330 12330 done
12331 12331 IFS=$as_save_IFS
12332 12332
12333 12333 ;;
12334 12334 esac
12335 12335 fi
12336 12336 UNIQ=$ac_cv_path_UNIQ
12337 12337 if test -n "$UNIQ"; then
12338 12338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12339 12339 $as_echo "$UNIQ" >&6; }
12340 12340 else
12341 12341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12342 12342 $as_echo "no" >&6; }
12343 12343 fi
12344 12344
12345 12345
12346 12346 test -n "$UNIQ" && break
12347 12347 done
12348 12348
12349 12349 else
12350 12350 # The variable is set, but is it from the command line or the environment?
12351 12351
12352 12352 # Try to remove the string !UNIQ! from our list.
12353 12353 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12354 12354 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12355 12355 # If it failed, the variable was not from the command line. Ignore it,
12356 12356 # but warn the user (except for BASH, which is always set by the calling BASH).
12357 12357 if test "xUNIQ" != xBASH; then
12358 12358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12359 12359 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12360 12360 fi
12361 12361 # Try to locate tool using the code snippet
12362 12362 for ac_prog in uniq
12363 12363 do
12364 12364 # Extract the first word of "$ac_prog", so it can be a program name with args.
12365 12365 set dummy $ac_prog; ac_word=$2
12366 12366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12367 12367 $as_echo_n "checking for $ac_word... " >&6; }
12368 12368 if ${ac_cv_path_UNIQ+:} false; then :
12369 12369 $as_echo_n "(cached) " >&6
12370 12370 else
12371 12371 case $UNIQ in
12372 12372 [\\/]* | ?:[\\/]*)
12373 12373 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12374 12374 ;;
12375 12375 *)
12376 12376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12377 12377 for as_dir in $PATH
12378 12378 do
12379 12379 IFS=$as_save_IFS
12380 12380 test -z "$as_dir" && as_dir=.
12381 12381 for ac_exec_ext in '' $ac_executable_extensions; do
12382 12382 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12383 12383 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12384 12384 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12385 12385 break 2
12386 12386 fi
12387 12387 done
12388 12388 done
12389 12389 IFS=$as_save_IFS
12390 12390
12391 12391 ;;
12392 12392 esac
12393 12393 fi
12394 12394 UNIQ=$ac_cv_path_UNIQ
12395 12395 if test -n "$UNIQ"; then
12396 12396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12397 12397 $as_echo "$UNIQ" >&6; }
12398 12398 else
12399 12399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400 12400 $as_echo "no" >&6; }
12401 12401 fi
12402 12402
12403 12403
12404 12404 test -n "$UNIQ" && break
12405 12405 done
12406 12406
12407 12407 else
12408 12408 # If it succeeded, then it was overridden by the user. We will use it
12409 12409 # for the tool.
12410 12410
12411 12411 # First remove it from the list of overridden variables, so we can test
12412 12412 # for unknown variables in the end.
12413 12413 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12414 12414
12415 12415 # Check if we try to supply an empty value
12416 12416 if test "x$UNIQ" = x; then
12417 12417 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12418 12418 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12419 12419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12420 12420 $as_echo_n "checking for UNIQ... " >&6; }
12421 12421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12422 12422 $as_echo "disabled" >&6; }
12423 12423 else
12424 12424 # Check if the provided tool contains a complete path.
12425 12425 tool_specified="$UNIQ"
12426 12426 tool_basename="${tool_specified##*/}"
12427 12427 if test "x$tool_basename" = "x$tool_specified"; then
12428 12428 # A command without a complete path is provided, search $PATH.
12429 12429 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12430 12430 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12431 12431 # Extract the first word of "$tool_basename", so it can be a program name with args.
12432 12432 set dummy $tool_basename; ac_word=$2
12433 12433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12434 12434 $as_echo_n "checking for $ac_word... " >&6; }
12435 12435 if ${ac_cv_path_UNIQ+:} false; then :
12436 12436 $as_echo_n "(cached) " >&6
12437 12437 else
12438 12438 case $UNIQ in
12439 12439 [\\/]* | ?:[\\/]*)
12440 12440 ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12441 12441 ;;
12442 12442 *)
12443 12443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12444 12444 for as_dir in $PATH
12445 12445 do
12446 12446 IFS=$as_save_IFS
12447 12447 test -z "$as_dir" && as_dir=.
12448 12448 for ac_exec_ext in '' $ac_executable_extensions; do
12449 12449 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12450 12450 ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12451 12451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12452 12452 break 2
12453 12453 fi
12454 12454 done
12455 12455 done
12456 12456 IFS=$as_save_IFS
12457 12457
12458 12458 ;;
12459 12459 esac
12460 12460 fi
12461 12461 UNIQ=$ac_cv_path_UNIQ
12462 12462 if test -n "$UNIQ"; then
12463 12463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12464 12464 $as_echo "$UNIQ" >&6; }
12465 12465 else
12466 12466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12467 12467 $as_echo "no" >&6; }
12468 12468 fi
12469 12469
12470 12470
12471 12471 if test "x$UNIQ" = x; then
12472 12472 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12473 12473 fi
12474 12474 else
12475 12475 # Otherwise we believe it is a complete path. Use it as it is.
12476 12476 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12477 12477 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12478 12478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12479 12479 $as_echo_n "checking for UNIQ... " >&6; }
12480 12480 if test ! -x "$tool_specified"; then
12481 12481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12482 12482 $as_echo "not found" >&6; }
12483 12483 as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12484 12484 fi
12485 12485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12486 12486 $as_echo "$tool_specified" >&6; }
12487 12487 fi
12488 12488 fi
12489 12489 fi
12490 12490
12491 12491 fi
12492 12492
12493 12493
12494 12494
12495 12495 if test "x$UNIQ" = x; then
12496 12496 as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12497 12497 fi
12498 12498
12499 12499
12500 12500
12501 12501
12502 12502
12503 12503 # Publish this variable in the help.
12504 12504
12505 12505
12506 12506 if [ -z "${WC+x}" ]; then
12507 12507 # The variable is not set by user, try to locate tool using the code snippet
12508 12508 for ac_prog in wc
12509 12509 do
12510 12510 # Extract the first word of "$ac_prog", so it can be a program name with args.
12511 12511 set dummy $ac_prog; ac_word=$2
12512 12512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12513 12513 $as_echo_n "checking for $ac_word... " >&6; }
12514 12514 if ${ac_cv_path_WC+:} false; then :
12515 12515 $as_echo_n "(cached) " >&6
12516 12516 else
12517 12517 case $WC in
12518 12518 [\\/]* | ?:[\\/]*)
12519 12519 ac_cv_path_WC="$WC" # Let the user override the test with a path.
12520 12520 ;;
12521 12521 *)
12522 12522 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12523 12523 for as_dir in $PATH
12524 12524 do
12525 12525 IFS=$as_save_IFS
12526 12526 test -z "$as_dir" && as_dir=.
12527 12527 for ac_exec_ext in '' $ac_executable_extensions; do
12528 12528 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12529 12529 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12530 12530 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12531 12531 break 2
12532 12532 fi
12533 12533 done
12534 12534 done
12535 12535 IFS=$as_save_IFS
12536 12536
12537 12537 ;;
12538 12538 esac
12539 12539 fi
12540 12540 WC=$ac_cv_path_WC
12541 12541 if test -n "$WC"; then
12542 12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12543 12543 $as_echo "$WC" >&6; }
12544 12544 else
12545 12545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12546 12546 $as_echo "no" >&6; }
12547 12547 fi
12548 12548
12549 12549
12550 12550 test -n "$WC" && break
12551 12551 done
12552 12552
12553 12553 else
12554 12554 # The variable is set, but is it from the command line or the environment?
12555 12555
12556 12556 # Try to remove the string !WC! from our list.
12557 12557 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12558 12558 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12559 12559 # If it failed, the variable was not from the command line. Ignore it,
12560 12560 # but warn the user (except for BASH, which is always set by the calling BASH).
12561 12561 if test "xWC" != xBASH; then
12562 12562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12563 12563 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12564 12564 fi
12565 12565 # Try to locate tool using the code snippet
12566 12566 for ac_prog in wc
12567 12567 do
12568 12568 # Extract the first word of "$ac_prog", so it can be a program name with args.
12569 12569 set dummy $ac_prog; ac_word=$2
12570 12570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12571 12571 $as_echo_n "checking for $ac_word... " >&6; }
12572 12572 if ${ac_cv_path_WC+:} false; then :
12573 12573 $as_echo_n "(cached) " >&6
12574 12574 else
12575 12575 case $WC in
12576 12576 [\\/]* | ?:[\\/]*)
12577 12577 ac_cv_path_WC="$WC" # Let the user override the test with a path.
12578 12578 ;;
12579 12579 *)
12580 12580 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12581 12581 for as_dir in $PATH
12582 12582 do
12583 12583 IFS=$as_save_IFS
12584 12584 test -z "$as_dir" && as_dir=.
12585 12585 for ac_exec_ext in '' $ac_executable_extensions; do
12586 12586 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12587 12587 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12588 12588 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12589 12589 break 2
12590 12590 fi
12591 12591 done
12592 12592 done
12593 12593 IFS=$as_save_IFS
12594 12594
12595 12595 ;;
12596 12596 esac
12597 12597 fi
12598 12598 WC=$ac_cv_path_WC
12599 12599 if test -n "$WC"; then
12600 12600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12601 12601 $as_echo "$WC" >&6; }
12602 12602 else
12603 12603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12604 12604 $as_echo "no" >&6; }
12605 12605 fi
12606 12606
12607 12607
12608 12608 test -n "$WC" && break
12609 12609 done
12610 12610
12611 12611 else
12612 12612 # If it succeeded, then it was overridden by the user. We will use it
12613 12613 # for the tool.
12614 12614
12615 12615 # First remove it from the list of overridden variables, so we can test
12616 12616 # for unknown variables in the end.
12617 12617 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12618 12618
12619 12619 # Check if we try to supply an empty value
12620 12620 if test "x$WC" = x; then
12621 12621 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12622 12622 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12623 12623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12624 12624 $as_echo_n "checking for WC... " >&6; }
12625 12625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12626 12626 $as_echo "disabled" >&6; }
12627 12627 else
12628 12628 # Check if the provided tool contains a complete path.
12629 12629 tool_specified="$WC"
12630 12630 tool_basename="${tool_specified##*/}"
12631 12631 if test "x$tool_basename" = "x$tool_specified"; then
12632 12632 # A command without a complete path is provided, search $PATH.
12633 12633 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12634 12634 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12635 12635 # Extract the first word of "$tool_basename", so it can be a program name with args.
12636 12636 set dummy $tool_basename; ac_word=$2
12637 12637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12638 12638 $as_echo_n "checking for $ac_word... " >&6; }
12639 12639 if ${ac_cv_path_WC+:} false; then :
12640 12640 $as_echo_n "(cached) " >&6
12641 12641 else
12642 12642 case $WC in
12643 12643 [\\/]* | ?:[\\/]*)
12644 12644 ac_cv_path_WC="$WC" # Let the user override the test with a path.
12645 12645 ;;
12646 12646 *)
12647 12647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12648 12648 for as_dir in $PATH
12649 12649 do
12650 12650 IFS=$as_save_IFS
12651 12651 test -z "$as_dir" && as_dir=.
12652 12652 for ac_exec_ext in '' $ac_executable_extensions; do
12653 12653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12654 12654 ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12655 12655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12656 12656 break 2
12657 12657 fi
12658 12658 done
12659 12659 done
12660 12660 IFS=$as_save_IFS
12661 12661
12662 12662 ;;
12663 12663 esac
12664 12664 fi
12665 12665 WC=$ac_cv_path_WC
12666 12666 if test -n "$WC"; then
12667 12667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12668 12668 $as_echo "$WC" >&6; }
12669 12669 else
12670 12670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12671 12671 $as_echo "no" >&6; }
12672 12672 fi
12673 12673
12674 12674
12675 12675 if test "x$WC" = x; then
12676 12676 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12677 12677 fi
12678 12678 else
12679 12679 # Otherwise we believe it is a complete path. Use it as it is.
12680 12680 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12681 12681 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12682 12682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12683 12683 $as_echo_n "checking for WC... " >&6; }
12684 12684 if test ! -x "$tool_specified"; then
12685 12685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12686 12686 $as_echo "not found" >&6; }
12687 12687 as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12688 12688 fi
12689 12689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12690 12690 $as_echo "$tool_specified" >&6; }
12691 12691 fi
12692 12692 fi
12693 12693 fi
12694 12694
12695 12695 fi
12696 12696
12697 12697
12698 12698
12699 12699 if test "x$WC" = x; then
12700 12700 as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12701 12701 fi
12702 12702
12703 12703
12704 12704
12705 12705
12706 12706
12707 12707 # Publish this variable in the help.
12708 12708
12709 12709
12710 12710 if [ -z "${WHICH+x}" ]; then
12711 12711 # The variable is not set by user, try to locate tool using the code snippet
12712 12712 for ac_prog in which
12713 12713 do
12714 12714 # Extract the first word of "$ac_prog", so it can be a program name with args.
12715 12715 set dummy $ac_prog; ac_word=$2
12716 12716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12717 12717 $as_echo_n "checking for $ac_word... " >&6; }
12718 12718 if ${ac_cv_path_WHICH+:} false; then :
12719 12719 $as_echo_n "(cached) " >&6
12720 12720 else
12721 12721 case $WHICH in
12722 12722 [\\/]* | ?:[\\/]*)
12723 12723 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12724 12724 ;;
12725 12725 *)
12726 12726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12727 12727 for as_dir in $PATH
12728 12728 do
12729 12729 IFS=$as_save_IFS
12730 12730 test -z "$as_dir" && as_dir=.
12731 12731 for ac_exec_ext in '' $ac_executable_extensions; do
12732 12732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12733 12733 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12734 12734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12735 12735 break 2
12736 12736 fi
12737 12737 done
12738 12738 done
12739 12739 IFS=$as_save_IFS
12740 12740
12741 12741 ;;
12742 12742 esac
12743 12743 fi
12744 12744 WHICH=$ac_cv_path_WHICH
12745 12745 if test -n "$WHICH"; then
12746 12746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12747 12747 $as_echo "$WHICH" >&6; }
12748 12748 else
12749 12749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12750 12750 $as_echo "no" >&6; }
12751 12751 fi
12752 12752
12753 12753
12754 12754 test -n "$WHICH" && break
12755 12755 done
12756 12756
12757 12757 else
12758 12758 # The variable is set, but is it from the command line or the environment?
12759 12759
12760 12760 # Try to remove the string !WHICH! from our list.
12761 12761 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12762 12762 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12763 12763 # If it failed, the variable was not from the command line. Ignore it,
12764 12764 # but warn the user (except for BASH, which is always set by the calling BASH).
12765 12765 if test "xWHICH" != xBASH; then
12766 12766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12767 12767 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12768 12768 fi
12769 12769 # Try to locate tool using the code snippet
12770 12770 for ac_prog in which
12771 12771 do
12772 12772 # Extract the first word of "$ac_prog", so it can be a program name with args.
12773 12773 set dummy $ac_prog; ac_word=$2
12774 12774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12775 12775 $as_echo_n "checking for $ac_word... " >&6; }
12776 12776 if ${ac_cv_path_WHICH+:} false; then :
12777 12777 $as_echo_n "(cached) " >&6
12778 12778 else
12779 12779 case $WHICH in
12780 12780 [\\/]* | ?:[\\/]*)
12781 12781 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12782 12782 ;;
12783 12783 *)
12784 12784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12785 12785 for as_dir in $PATH
12786 12786 do
12787 12787 IFS=$as_save_IFS
12788 12788 test -z "$as_dir" && as_dir=.
12789 12789 for ac_exec_ext in '' $ac_executable_extensions; do
12790 12790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12791 12791 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12792 12792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12793 12793 break 2
12794 12794 fi
12795 12795 done
12796 12796 done
12797 12797 IFS=$as_save_IFS
12798 12798
12799 12799 ;;
12800 12800 esac
12801 12801 fi
12802 12802 WHICH=$ac_cv_path_WHICH
12803 12803 if test -n "$WHICH"; then
12804 12804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12805 12805 $as_echo "$WHICH" >&6; }
12806 12806 else
12807 12807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12808 12808 $as_echo "no" >&6; }
12809 12809 fi
12810 12810
12811 12811
12812 12812 test -n "$WHICH" && break
12813 12813 done
12814 12814
12815 12815 else
12816 12816 # If it succeeded, then it was overridden by the user. We will use it
12817 12817 # for the tool.
12818 12818
12819 12819 # First remove it from the list of overridden variables, so we can test
12820 12820 # for unknown variables in the end.
12821 12821 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12822 12822
12823 12823 # Check if we try to supply an empty value
12824 12824 if test "x$WHICH" = x; then
12825 12825 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12826 12826 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12827 12827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12828 12828 $as_echo_n "checking for WHICH... " >&6; }
12829 12829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12830 12830 $as_echo "disabled" >&6; }
12831 12831 else
12832 12832 # Check if the provided tool contains a complete path.
12833 12833 tool_specified="$WHICH"
12834 12834 tool_basename="${tool_specified##*/}"
12835 12835 if test "x$tool_basename" = "x$tool_specified"; then
12836 12836 # A command without a complete path is provided, search $PATH.
12837 12837 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12838 12838 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12839 12839 # Extract the first word of "$tool_basename", so it can be a program name with args.
12840 12840 set dummy $tool_basename; ac_word=$2
12841 12841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12842 12842 $as_echo_n "checking for $ac_word... " >&6; }
12843 12843 if ${ac_cv_path_WHICH+:} false; then :
12844 12844 $as_echo_n "(cached) " >&6
12845 12845 else
12846 12846 case $WHICH in
12847 12847 [\\/]* | ?:[\\/]*)
12848 12848 ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12849 12849 ;;
12850 12850 *)
12851 12851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12852 12852 for as_dir in $PATH
12853 12853 do
12854 12854 IFS=$as_save_IFS
12855 12855 test -z "$as_dir" && as_dir=.
12856 12856 for ac_exec_ext in '' $ac_executable_extensions; do
12857 12857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12858 12858 ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12859 12859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12860 12860 break 2
12861 12861 fi
12862 12862 done
12863 12863 done
12864 12864 IFS=$as_save_IFS
12865 12865
12866 12866 ;;
12867 12867 esac
12868 12868 fi
12869 12869 WHICH=$ac_cv_path_WHICH
12870 12870 if test -n "$WHICH"; then
12871 12871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12872 12872 $as_echo "$WHICH" >&6; }
12873 12873 else
12874 12874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12875 12875 $as_echo "no" >&6; }
12876 12876 fi
12877 12877
12878 12878
12879 12879 if test "x$WHICH" = x; then
12880 12880 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12881 12881 fi
12882 12882 else
12883 12883 # Otherwise we believe it is a complete path. Use it as it is.
12884 12884 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12885 12885 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12886 12886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12887 12887 $as_echo_n "checking for WHICH... " >&6; }
12888 12888 if test ! -x "$tool_specified"; then
12889 12889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12890 12890 $as_echo "not found" >&6; }
12891 12891 as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12892 12892 fi
12893 12893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12894 12894 $as_echo "$tool_specified" >&6; }
12895 12895 fi
12896 12896 fi
12897 12897 fi
12898 12898
12899 12899 fi
12900 12900
12901 12901
12902 12902
12903 12903 if test "x$WHICH" = x; then
12904 12904 as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12905 12905 fi
12906 12906
12907 12907
12908 12908
12909 12909
12910 12910
12911 12911 # Publish this variable in the help.
12912 12912
12913 12913
12914 12914 if [ -z "${XARGS+x}" ]; then
12915 12915 # The variable is not set by user, try to locate tool using the code snippet
12916 12916 for ac_prog in xargs
12917 12917 do
12918 12918 # Extract the first word of "$ac_prog", so it can be a program name with args.
12919 12919 set dummy $ac_prog; ac_word=$2
12920 12920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12921 12921 $as_echo_n "checking for $ac_word... " >&6; }
12922 12922 if ${ac_cv_path_XARGS+:} false; then :
12923 12923 $as_echo_n "(cached) " >&6
12924 12924 else
12925 12925 case $XARGS in
12926 12926 [\\/]* | ?:[\\/]*)
12927 12927 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12928 12928 ;;
12929 12929 *)
12930 12930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12931 12931 for as_dir in $PATH
12932 12932 do
12933 12933 IFS=$as_save_IFS
12934 12934 test -z "$as_dir" && as_dir=.
12935 12935 for ac_exec_ext in '' $ac_executable_extensions; do
12936 12936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12937 12937 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12938 12938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12939 12939 break 2
12940 12940 fi
12941 12941 done
12942 12942 done
12943 12943 IFS=$as_save_IFS
12944 12944
12945 12945 ;;
12946 12946 esac
12947 12947 fi
12948 12948 XARGS=$ac_cv_path_XARGS
12949 12949 if test -n "$XARGS"; then
12950 12950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12951 12951 $as_echo "$XARGS" >&6; }
12952 12952 else
12953 12953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12954 12954 $as_echo "no" >&6; }
12955 12955 fi
12956 12956
12957 12957
12958 12958 test -n "$XARGS" && break
12959 12959 done
12960 12960
12961 12961 else
12962 12962 # The variable is set, but is it from the command line or the environment?
12963 12963
12964 12964 # Try to remove the string !XARGS! from our list.
12965 12965 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12966 12966 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12967 12967 # If it failed, the variable was not from the command line. Ignore it,
12968 12968 # but warn the user (except for BASH, which is always set by the calling BASH).
12969 12969 if test "xXARGS" != xBASH; then
12970 12970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12971 12971 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12972 12972 fi
12973 12973 # Try to locate tool using the code snippet
12974 12974 for ac_prog in xargs
12975 12975 do
12976 12976 # Extract the first word of "$ac_prog", so it can be a program name with args.
12977 12977 set dummy $ac_prog; ac_word=$2
12978 12978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12979 12979 $as_echo_n "checking for $ac_word... " >&6; }
12980 12980 if ${ac_cv_path_XARGS+:} false; then :
12981 12981 $as_echo_n "(cached) " >&6
12982 12982 else
12983 12983 case $XARGS in
12984 12984 [\\/]* | ?:[\\/]*)
12985 12985 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12986 12986 ;;
12987 12987 *)
12988 12988 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12989 12989 for as_dir in $PATH
12990 12990 do
12991 12991 IFS=$as_save_IFS
12992 12992 test -z "$as_dir" && as_dir=.
12993 12993 for ac_exec_ext in '' $ac_executable_extensions; do
12994 12994 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12995 12995 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12996 12996 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12997 12997 break 2
12998 12998 fi
12999 12999 done
13000 13000 done
13001 13001 IFS=$as_save_IFS
13002 13002
13003 13003 ;;
13004 13004 esac
13005 13005 fi
13006 13006 XARGS=$ac_cv_path_XARGS
13007 13007 if test -n "$XARGS"; then
13008 13008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13009 13009 $as_echo "$XARGS" >&6; }
13010 13010 else
13011 13011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13012 13012 $as_echo "no" >&6; }
13013 13013 fi
13014 13014
13015 13015
13016 13016 test -n "$XARGS" && break
13017 13017 done
13018 13018
13019 13019 else
13020 13020 # If it succeeded, then it was overridden by the user. We will use it
13021 13021 # for the tool.
13022 13022
13023 13023 # First remove it from the list of overridden variables, so we can test
13024 13024 # for unknown variables in the end.
13025 13025 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13026 13026
13027 13027 # Check if we try to supply an empty value
13028 13028 if test "x$XARGS" = x; then
13029 13029 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13030 13030 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13031 13031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13032 13032 $as_echo_n "checking for XARGS... " >&6; }
13033 13033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13034 13034 $as_echo "disabled" >&6; }
13035 13035 else
13036 13036 # Check if the provided tool contains a complete path.
13037 13037 tool_specified="$XARGS"
13038 13038 tool_basename="${tool_specified##*/}"
13039 13039 if test "x$tool_basename" = "x$tool_specified"; then
13040 13040 # A command without a complete path is provided, search $PATH.
13041 13041 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13042 13042 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13043 13043 # Extract the first word of "$tool_basename", so it can be a program name with args.
13044 13044 set dummy $tool_basename; ac_word=$2
13045 13045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13046 13046 $as_echo_n "checking for $ac_word... " >&6; }
13047 13047 if ${ac_cv_path_XARGS+:} false; then :
13048 13048 $as_echo_n "(cached) " >&6
13049 13049 else
13050 13050 case $XARGS in
13051 13051 [\\/]* | ?:[\\/]*)
13052 13052 ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13053 13053 ;;
13054 13054 *)
13055 13055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13056 13056 for as_dir in $PATH
13057 13057 do
13058 13058 IFS=$as_save_IFS
13059 13059 test -z "$as_dir" && as_dir=.
13060 13060 for ac_exec_ext in '' $ac_executable_extensions; do
13061 13061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13062 13062 ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13063 13063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13064 13064 break 2
13065 13065 fi
13066 13066 done
13067 13067 done
13068 13068 IFS=$as_save_IFS
13069 13069
13070 13070 ;;
13071 13071 esac
13072 13072 fi
13073 13073 XARGS=$ac_cv_path_XARGS
13074 13074 if test -n "$XARGS"; then
13075 13075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13076 13076 $as_echo "$XARGS" >&6; }
13077 13077 else
13078 13078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13079 13079 $as_echo "no" >&6; }
13080 13080 fi
13081 13081
13082 13082
13083 13083 if test "x$XARGS" = x; then
13084 13084 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13085 13085 fi
13086 13086 else
13087 13087 # Otherwise we believe it is a complete path. Use it as it is.
13088 13088 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13089 13089 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13090 13090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13091 13091 $as_echo_n "checking for XARGS... " >&6; }
13092 13092 if test ! -x "$tool_specified"; then
13093 13093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13094 13094 $as_echo "not found" >&6; }
13095 13095 as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13096 13096 fi
13097 13097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13098 13098 $as_echo "$tool_specified" >&6; }
13099 13099 fi
13100 13100 fi
13101 13101 fi
13102 13102
13103 13103 fi
13104 13104
13105 13105
13106 13106
13107 13107 if test "x$XARGS" = x; then
13108 13108 as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13109 13109 fi
13110 13110
13111 13111
13112 13112
13113 13113 # Then required tools that require some special treatment.
13114 13114
13115 13115
13116 13116 # Publish this variable in the help.
13117 13117
13118 13118
13119 13119 if [ -z "${AWK+x}" ]; then
13120 13120 # The variable is not set by user, try to locate tool using the code snippet
13121 13121 for ac_prog in gawk mawk nawk awk
13122 13122 do
13123 13123 # Extract the first word of "$ac_prog", so it can be a program name with args.
13124 13124 set dummy $ac_prog; ac_word=$2
13125 13125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13126 13126 $as_echo_n "checking for $ac_word... " >&6; }
13127 13127 if ${ac_cv_prog_AWK+:} false; then :
13128 13128 $as_echo_n "(cached) " >&6
13129 13129 else
13130 13130 if test -n "$AWK"; then
13131 13131 ac_cv_prog_AWK="$AWK" # Let the user override the test.
13132 13132 else
13133 13133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134 13134 for as_dir in $PATH
13135 13135 do
13136 13136 IFS=$as_save_IFS
13137 13137 test -z "$as_dir" && as_dir=.
13138 13138 for ac_exec_ext in '' $ac_executable_extensions; do
13139 13139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13140 13140 ac_cv_prog_AWK="$ac_prog"
13141 13141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13142 13142 break 2
13143 13143 fi
13144 13144 done
13145 13145 done
13146 13146 IFS=$as_save_IFS
13147 13147
13148 13148 fi
13149 13149 fi
13150 13150 AWK=$ac_cv_prog_AWK
13151 13151 if test -n "$AWK"; then
13152 13152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13153 13153 $as_echo "$AWK" >&6; }
13154 13154 else
13155 13155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13156 13156 $as_echo "no" >&6; }
13157 13157 fi
13158 13158
13159 13159
13160 13160 test -n "$AWK" && break
13161 13161 done
13162 13162
13163 13163 else
13164 13164 # The variable is set, but is it from the command line or the environment?
13165 13165
13166 13166 # Try to remove the string !AWK! from our list.
13167 13167 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13168 13168 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13169 13169 # If it failed, the variable was not from the command line. Ignore it,
13170 13170 # but warn the user (except for BASH, which is always set by the calling BASH).
13171 13171 if test "xAWK" != xBASH; then
13172 13172 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13173 13173 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13174 13174 fi
13175 13175 # Try to locate tool using the code snippet
13176 13176 for ac_prog in gawk mawk nawk awk
13177 13177 do
13178 13178 # Extract the first word of "$ac_prog", so it can be a program name with args.
13179 13179 set dummy $ac_prog; ac_word=$2
13180 13180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13181 13181 $as_echo_n "checking for $ac_word... " >&6; }
13182 13182 if ${ac_cv_prog_AWK+:} false; then :
13183 13183 $as_echo_n "(cached) " >&6
13184 13184 else
13185 13185 if test -n "$AWK"; then
13186 13186 ac_cv_prog_AWK="$AWK" # Let the user override the test.
13187 13187 else
13188 13188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13189 13189 for as_dir in $PATH
13190 13190 do
13191 13191 IFS=$as_save_IFS
13192 13192 test -z "$as_dir" && as_dir=.
13193 13193 for ac_exec_ext in '' $ac_executable_extensions; do
13194 13194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13195 13195 ac_cv_prog_AWK="$ac_prog"
13196 13196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13197 13197 break 2
13198 13198 fi
13199 13199 done
13200 13200 done
13201 13201 IFS=$as_save_IFS
13202 13202
13203 13203 fi
13204 13204 fi
13205 13205 AWK=$ac_cv_prog_AWK
13206 13206 if test -n "$AWK"; then
13207 13207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13208 13208 $as_echo "$AWK" >&6; }
13209 13209 else
13210 13210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13211 13211 $as_echo "no" >&6; }
13212 13212 fi
13213 13213
13214 13214
13215 13215 test -n "$AWK" && break
13216 13216 done
13217 13217
13218 13218 else
13219 13219 # If it succeeded, then it was overridden by the user. We will use it
13220 13220 # for the tool.
13221 13221
13222 13222 # First remove it from the list of overridden variables, so we can test
13223 13223 # for unknown variables in the end.
13224 13224 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13225 13225
13226 13226 # Check if we try to supply an empty value
13227 13227 if test "x$AWK" = x; then
13228 13228 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13229 13229 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13230 13230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13231 13231 $as_echo_n "checking for AWK... " >&6; }
13232 13232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13233 13233 $as_echo "disabled" >&6; }
13234 13234 else
13235 13235 # Check if the provided tool contains a complete path.
13236 13236 tool_specified="$AWK"
13237 13237 tool_basename="${tool_specified##*/}"
13238 13238 if test "x$tool_basename" = "x$tool_specified"; then
13239 13239 # A command without a complete path is provided, search $PATH.
13240 13240 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13241 13241 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13242 13242 # Extract the first word of "$tool_basename", so it can be a program name with args.
13243 13243 set dummy $tool_basename; ac_word=$2
13244 13244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13245 13245 $as_echo_n "checking for $ac_word... " >&6; }
13246 13246 if ${ac_cv_path_AWK+:} false; then :
13247 13247 $as_echo_n "(cached) " >&6
13248 13248 else
13249 13249 case $AWK in
13250 13250 [\\/]* | ?:[\\/]*)
13251 13251 ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13252 13252 ;;
13253 13253 *)
13254 13254 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13255 13255 for as_dir in $PATH
13256 13256 do
13257 13257 IFS=$as_save_IFS
13258 13258 test -z "$as_dir" && as_dir=.
13259 13259 for ac_exec_ext in '' $ac_executable_extensions; do
13260 13260 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13261 13261 ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13262 13262 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13263 13263 break 2
13264 13264 fi
13265 13265 done
13266 13266 done
13267 13267 IFS=$as_save_IFS
13268 13268
13269 13269 ;;
13270 13270 esac
13271 13271 fi
13272 13272 AWK=$ac_cv_path_AWK
13273 13273 if test -n "$AWK"; then
13274 13274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13275 13275 $as_echo "$AWK" >&6; }
13276 13276 else
13277 13277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13278 13278 $as_echo "no" >&6; }
13279 13279 fi
13280 13280
13281 13281
13282 13282 if test "x$AWK" = x; then
13283 13283 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13284 13284 fi
13285 13285 else
13286 13286 # Otherwise we believe it is a complete path. Use it as it is.
13287 13287 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13288 13288 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13289 13289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13290 13290 $as_echo_n "checking for AWK... " >&6; }
13291 13291 if test ! -x "$tool_specified"; then
13292 13292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13293 13293 $as_echo "not found" >&6; }
13294 13294 as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13295 13295 fi
13296 13296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13297 13297 $as_echo "$tool_specified" >&6; }
13298 13298 fi
13299 13299 fi
13300 13300 fi
13301 13301
13302 13302 fi
13303 13303
13304 13304
13305 13305 if test "x$AWK" = x; then
13306 13306 as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13307 13307 fi
13308 13308
13309 13309
13310 13310
13311 13311
13312 13312 # Publish this variable in the help.
13313 13313
13314 13314
13315 13315 if [ -z "${GREP+x}" ]; then
13316 13316 # The variable is not set by user, try to locate tool using the code snippet
13317 13317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13318 13318 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13319 13319 if ${ac_cv_path_GREP+:} false; then :
13320 13320 $as_echo_n "(cached) " >&6
13321 13321 else
13322 13322 if test -z "$GREP"; then
13323 13323 ac_path_GREP_found=false
13324 13324 # Loop through the user's path and test for each of PROGNAME-LIST
13325 13325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13326 13326 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13327 13327 do
13328 13328 IFS=$as_save_IFS
13329 13329 test -z "$as_dir" && as_dir=.
13330 13330 for ac_prog in grep ggrep; do
13331 13331 for ac_exec_ext in '' $ac_executable_extensions; do
13332 13332 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13333 13333 as_fn_executable_p "$ac_path_GREP" || continue
13334 13334 # Check for GNU ac_path_GREP and select it if it is found.
13335 13335 # Check for GNU $ac_path_GREP
13336 13336 case `"$ac_path_GREP" --version 2>&1` in
13337 13337 *GNU*)
13338 13338 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13339 13339 *)
13340 13340 ac_count=0
13341 13341 $as_echo_n 0123456789 >"conftest.in"
13342 13342 while :
13343 13343 do
13344 13344 cat "conftest.in" "conftest.in" >"conftest.tmp"
13345 13345 mv "conftest.tmp" "conftest.in"
13346 13346 cp "conftest.in" "conftest.nl"
13347 13347 $as_echo 'GREP' >> "conftest.nl"
13348 13348 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13349 13349 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13350 13350 as_fn_arith $ac_count + 1 && ac_count=$as_val
13351 13351 if test $ac_count -gt ${ac_path_GREP_max-0}; then
13352 13352 # Best one so far, save it but keep looking for a better one
13353 13353 ac_cv_path_GREP="$ac_path_GREP"
13354 13354 ac_path_GREP_max=$ac_count
13355 13355 fi
13356 13356 # 10*(2^10) chars as input seems more than enough
13357 13357 test $ac_count -gt 10 && break
13358 13358 done
13359 13359 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13360 13360 esac
13361 13361
13362 13362 $ac_path_GREP_found && break 3
13363 13363 done
13364 13364 done
13365 13365 done
13366 13366 IFS=$as_save_IFS
13367 13367 if test -z "$ac_cv_path_GREP"; then
13368 13368 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13369 13369 fi
13370 13370 else
13371 13371 ac_cv_path_GREP=$GREP
13372 13372 fi
13373 13373
13374 13374 fi
13375 13375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13376 13376 $as_echo "$ac_cv_path_GREP" >&6; }
13377 13377 GREP="$ac_cv_path_GREP"
13378 13378
13379 13379
13380 13380 else
13381 13381 # The variable is set, but is it from the command line or the environment?
13382 13382
13383 13383 # Try to remove the string !GREP! from our list.
13384 13384 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13385 13385 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13386 13386 # If it failed, the variable was not from the command line. Ignore it,
13387 13387 # but warn the user (except for BASH, which is always set by the calling BASH).
13388 13388 if test "xGREP" != xBASH; then
13389 13389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13390 13390 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13391 13391 fi
13392 13392 # Try to locate tool using the code snippet
13393 13393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13394 13394 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13395 13395 if ${ac_cv_path_GREP+:} false; then :
13396 13396 $as_echo_n "(cached) " >&6
13397 13397 else
13398 13398 if test -z "$GREP"; then
13399 13399 ac_path_GREP_found=false
13400 13400 # Loop through the user's path and test for each of PROGNAME-LIST
13401 13401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13402 13402 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13403 13403 do
13404 13404 IFS=$as_save_IFS
13405 13405 test -z "$as_dir" && as_dir=.
13406 13406 for ac_prog in grep ggrep; do
13407 13407 for ac_exec_ext in '' $ac_executable_extensions; do
13408 13408 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13409 13409 as_fn_executable_p "$ac_path_GREP" || continue
13410 13410 # Check for GNU ac_path_GREP and select it if it is found.
13411 13411 # Check for GNU $ac_path_GREP
13412 13412 case `"$ac_path_GREP" --version 2>&1` in
13413 13413 *GNU*)
13414 13414 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13415 13415 *)
13416 13416 ac_count=0
13417 13417 $as_echo_n 0123456789 >"conftest.in"
13418 13418 while :
13419 13419 do
13420 13420 cat "conftest.in" "conftest.in" >"conftest.tmp"
13421 13421 mv "conftest.tmp" "conftest.in"
13422 13422 cp "conftest.in" "conftest.nl"
13423 13423 $as_echo 'GREP' >> "conftest.nl"
13424 13424 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13425 13425 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13426 13426 as_fn_arith $ac_count + 1 && ac_count=$as_val
13427 13427 if test $ac_count -gt ${ac_path_GREP_max-0}; then
13428 13428 # Best one so far, save it but keep looking for a better one
13429 13429 ac_cv_path_GREP="$ac_path_GREP"
13430 13430 ac_path_GREP_max=$ac_count
13431 13431 fi
13432 13432 # 10*(2^10) chars as input seems more than enough
13433 13433 test $ac_count -gt 10 && break
13434 13434 done
13435 13435 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13436 13436 esac
13437 13437
13438 13438 $ac_path_GREP_found && break 3
13439 13439 done
13440 13440 done
13441 13441 done
13442 13442 IFS=$as_save_IFS
13443 13443 if test -z "$ac_cv_path_GREP"; then
13444 13444 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13445 13445 fi
13446 13446 else
13447 13447 ac_cv_path_GREP=$GREP
13448 13448 fi
13449 13449
13450 13450 fi
13451 13451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13452 13452 $as_echo "$ac_cv_path_GREP" >&6; }
13453 13453 GREP="$ac_cv_path_GREP"
13454 13454
13455 13455
13456 13456 else
13457 13457 # If it succeeded, then it was overridden by the user. We will use it
13458 13458 # for the tool.
13459 13459
13460 13460 # First remove it from the list of overridden variables, so we can test
13461 13461 # for unknown variables in the end.
13462 13462 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13463 13463
13464 13464 # Check if we try to supply an empty value
13465 13465 if test "x$GREP" = x; then
13466 13466 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13467 13467 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13468 13468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13469 13469 $as_echo_n "checking for GREP... " >&6; }
13470 13470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13471 13471 $as_echo "disabled" >&6; }
13472 13472 else
13473 13473 # Check if the provided tool contains a complete path.
13474 13474 tool_specified="$GREP"
13475 13475 tool_basename="${tool_specified##*/}"
13476 13476 if test "x$tool_basename" = "x$tool_specified"; then
13477 13477 # A command without a complete path is provided, search $PATH.
13478 13478 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13479 13479 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13480 13480 # Extract the first word of "$tool_basename", so it can be a program name with args.
13481 13481 set dummy $tool_basename; ac_word=$2
13482 13482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13483 13483 $as_echo_n "checking for $ac_word... " >&6; }
13484 13484 if ${ac_cv_path_GREP+:} false; then :
13485 13485 $as_echo_n "(cached) " >&6
13486 13486 else
13487 13487 case $GREP in
13488 13488 [\\/]* | ?:[\\/]*)
13489 13489 ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13490 13490 ;;
13491 13491 *)
13492 13492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13493 13493 for as_dir in $PATH
13494 13494 do
13495 13495 IFS=$as_save_IFS
13496 13496 test -z "$as_dir" && as_dir=.
13497 13497 for ac_exec_ext in '' $ac_executable_extensions; do
13498 13498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13499 13499 ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13500 13500 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13501 13501 break 2
13502 13502 fi
13503 13503 done
13504 13504 done
13505 13505 IFS=$as_save_IFS
13506 13506
13507 13507 ;;
13508 13508 esac
13509 13509 fi
13510 13510 GREP=$ac_cv_path_GREP
13511 13511 if test -n "$GREP"; then
13512 13512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13513 13513 $as_echo "$GREP" >&6; }
13514 13514 else
13515 13515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13516 13516 $as_echo "no" >&6; }
13517 13517 fi
13518 13518
13519 13519
13520 13520 if test "x$GREP" = x; then
13521 13521 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13522 13522 fi
13523 13523 else
13524 13524 # Otherwise we believe it is a complete path. Use it as it is.
13525 13525 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13526 13526 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13527 13527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13528 13528 $as_echo_n "checking for GREP... " >&6; }
13529 13529 if test ! -x "$tool_specified"; then
13530 13530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13531 13531 $as_echo "not found" >&6; }
13532 13532 as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13533 13533 fi
13534 13534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13535 13535 $as_echo "$tool_specified" >&6; }
13536 13536 fi
13537 13537 fi
13538 13538 fi
13539 13539
13540 13540 fi
13541 13541
13542 13542
13543 13543 if test "x$GREP" = x; then
13544 13544 as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13545 13545 fi
13546 13546
13547 13547
13548 13548
13549 13549
13550 13550 # Publish this variable in the help.
13551 13551
13552 13552
13553 13553 if [ -z "${EGREP+x}" ]; then
13554 13554 # The variable is not set by user, try to locate tool using the code snippet
13555 13555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13556 13556 $as_echo_n "checking for egrep... " >&6; }
13557 13557 if ${ac_cv_path_EGREP+:} false; then :
13558 13558 $as_echo_n "(cached) " >&6
13559 13559 else
13560 13560 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13561 13561 then ac_cv_path_EGREP="$GREP -E"
13562 13562 else
13563 13563 if test -z "$EGREP"; then
13564 13564 ac_path_EGREP_found=false
13565 13565 # Loop through the user's path and test for each of PROGNAME-LIST
13566 13566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13567 13567 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13568 13568 do
13569 13569 IFS=$as_save_IFS
13570 13570 test -z "$as_dir" && as_dir=.
13571 13571 for ac_prog in egrep; do
13572 13572 for ac_exec_ext in '' $ac_executable_extensions; do
13573 13573 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13574 13574 as_fn_executable_p "$ac_path_EGREP" || continue
13575 13575 # Check for GNU ac_path_EGREP and select it if it is found.
13576 13576 # Check for GNU $ac_path_EGREP
13577 13577 case `"$ac_path_EGREP" --version 2>&1` in
13578 13578 *GNU*)
13579 13579 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13580 13580 *)
13581 13581 ac_count=0
13582 13582 $as_echo_n 0123456789 >"conftest.in"
13583 13583 while :
13584 13584 do
13585 13585 cat "conftest.in" "conftest.in" >"conftest.tmp"
13586 13586 mv "conftest.tmp" "conftest.in"
13587 13587 cp "conftest.in" "conftest.nl"
13588 13588 $as_echo 'EGREP' >> "conftest.nl"
13589 13589 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13590 13590 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13591 13591 as_fn_arith $ac_count + 1 && ac_count=$as_val
13592 13592 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13593 13593 # Best one so far, save it but keep looking for a better one
13594 13594 ac_cv_path_EGREP="$ac_path_EGREP"
13595 13595 ac_path_EGREP_max=$ac_count
13596 13596 fi
13597 13597 # 10*(2^10) chars as input seems more than enough
13598 13598 test $ac_count -gt 10 && break
13599 13599 done
13600 13600 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13601 13601 esac
13602 13602
13603 13603 $ac_path_EGREP_found && break 3
13604 13604 done
13605 13605 done
13606 13606 done
13607 13607 IFS=$as_save_IFS
13608 13608 if test -z "$ac_cv_path_EGREP"; then
13609 13609 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13610 13610 fi
13611 13611 else
13612 13612 ac_cv_path_EGREP=$EGREP
13613 13613 fi
13614 13614
13615 13615 fi
13616 13616 fi
13617 13617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13618 13618 $as_echo "$ac_cv_path_EGREP" >&6; }
13619 13619 EGREP="$ac_cv_path_EGREP"
13620 13620
13621 13621
13622 13622 else
13623 13623 # The variable is set, but is it from the command line or the environment?
13624 13624
13625 13625 # Try to remove the string !EGREP! from our list.
13626 13626 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13627 13627 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13628 13628 # If it failed, the variable was not from the command line. Ignore it,
13629 13629 # but warn the user (except for BASH, which is always set by the calling BASH).
13630 13630 if test "xEGREP" != xBASH; then
13631 13631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13632 13632 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13633 13633 fi
13634 13634 # Try to locate tool using the code snippet
13635 13635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13636 13636 $as_echo_n "checking for egrep... " >&6; }
13637 13637 if ${ac_cv_path_EGREP+:} false; then :
13638 13638 $as_echo_n "(cached) " >&6
13639 13639 else
13640 13640 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13641 13641 then ac_cv_path_EGREP="$GREP -E"
13642 13642 else
13643 13643 if test -z "$EGREP"; then
13644 13644 ac_path_EGREP_found=false
13645 13645 # Loop through the user's path and test for each of PROGNAME-LIST
13646 13646 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13647 13647 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13648 13648 do
13649 13649 IFS=$as_save_IFS
13650 13650 test -z "$as_dir" && as_dir=.
13651 13651 for ac_prog in egrep; do
13652 13652 for ac_exec_ext in '' $ac_executable_extensions; do
13653 13653 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13654 13654 as_fn_executable_p "$ac_path_EGREP" || continue
13655 13655 # Check for GNU ac_path_EGREP and select it if it is found.
13656 13656 # Check for GNU $ac_path_EGREP
13657 13657 case `"$ac_path_EGREP" --version 2>&1` in
13658 13658 *GNU*)
13659 13659 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13660 13660 *)
13661 13661 ac_count=0
13662 13662 $as_echo_n 0123456789 >"conftest.in"
13663 13663 while :
13664 13664 do
13665 13665 cat "conftest.in" "conftest.in" >"conftest.tmp"
13666 13666 mv "conftest.tmp" "conftest.in"
13667 13667 cp "conftest.in" "conftest.nl"
13668 13668 $as_echo 'EGREP' >> "conftest.nl"
13669 13669 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13670 13670 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13671 13671 as_fn_arith $ac_count + 1 && ac_count=$as_val
13672 13672 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13673 13673 # Best one so far, save it but keep looking for a better one
13674 13674 ac_cv_path_EGREP="$ac_path_EGREP"
13675 13675 ac_path_EGREP_max=$ac_count
13676 13676 fi
13677 13677 # 10*(2^10) chars as input seems more than enough
13678 13678 test $ac_count -gt 10 && break
13679 13679 done
13680 13680 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13681 13681 esac
13682 13682
13683 13683 $ac_path_EGREP_found && break 3
13684 13684 done
13685 13685 done
13686 13686 done
13687 13687 IFS=$as_save_IFS
13688 13688 if test -z "$ac_cv_path_EGREP"; then
13689 13689 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13690 13690 fi
13691 13691 else
13692 13692 ac_cv_path_EGREP=$EGREP
13693 13693 fi
13694 13694
13695 13695 fi
13696 13696 fi
13697 13697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13698 13698 $as_echo "$ac_cv_path_EGREP" >&6; }
13699 13699 EGREP="$ac_cv_path_EGREP"
13700 13700
13701 13701
13702 13702 else
13703 13703 # If it succeeded, then it was overridden by the user. We will use it
13704 13704 # for the tool.
13705 13705
13706 13706 # First remove it from the list of overridden variables, so we can test
13707 13707 # for unknown variables in the end.
13708 13708 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13709 13709
13710 13710 # Check if we try to supply an empty value
13711 13711 if test "x$EGREP" = x; then
13712 13712 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13713 13713 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13714 13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13715 13715 $as_echo_n "checking for EGREP... " >&6; }
13716 13716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13717 13717 $as_echo "disabled" >&6; }
13718 13718 else
13719 13719 # Check if the provided tool contains a complete path.
13720 13720 tool_specified="$EGREP"
13721 13721 tool_basename="${tool_specified##*/}"
13722 13722 if test "x$tool_basename" = "x$tool_specified"; then
13723 13723 # A command without a complete path is provided, search $PATH.
13724 13724 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13725 13725 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13726 13726 # Extract the first word of "$tool_basename", so it can be a program name with args.
13727 13727 set dummy $tool_basename; ac_word=$2
13728 13728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13729 13729 $as_echo_n "checking for $ac_word... " >&6; }
13730 13730 if ${ac_cv_path_EGREP+:} false; then :
13731 13731 $as_echo_n "(cached) " >&6
13732 13732 else
13733 13733 case $EGREP in
13734 13734 [\\/]* | ?:[\\/]*)
13735 13735 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13736 13736 ;;
13737 13737 *)
13738 13738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13739 13739 for as_dir in $PATH
13740 13740 do
13741 13741 IFS=$as_save_IFS
13742 13742 test -z "$as_dir" && as_dir=.
13743 13743 for ac_exec_ext in '' $ac_executable_extensions; do
13744 13744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13745 13745 ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13746 13746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13747 13747 break 2
13748 13748 fi
13749 13749 done
13750 13750 done
13751 13751 IFS=$as_save_IFS
13752 13752
13753 13753 ;;
13754 13754 esac
13755 13755 fi
13756 13756 EGREP=$ac_cv_path_EGREP
13757 13757 if test -n "$EGREP"; then
13758 13758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13759 13759 $as_echo "$EGREP" >&6; }
13760 13760 else
13761 13761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13762 13762 $as_echo "no" >&6; }
13763 13763 fi
13764 13764
13765 13765
13766 13766 if test "x$EGREP" = x; then
13767 13767 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13768 13768 fi
13769 13769 else
13770 13770 # Otherwise we believe it is a complete path. Use it as it is.
13771 13771 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13772 13772 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13773 13773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13774 13774 $as_echo_n "checking for EGREP... " >&6; }
13775 13775 if test ! -x "$tool_specified"; then
13776 13776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13777 13777 $as_echo "not found" >&6; }
13778 13778 as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13779 13779 fi
13780 13780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13781 13781 $as_echo "$tool_specified" >&6; }
13782 13782 fi
13783 13783 fi
13784 13784 fi
13785 13785
13786 13786 fi
13787 13787
13788 13788
13789 13789 if test "x$EGREP" = x; then
13790 13790 as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13791 13791 fi
13792 13792
13793 13793
13794 13794
13795 13795
13796 13796 # Publish this variable in the help.
13797 13797
13798 13798
13799 13799 if [ -z "${FGREP+x}" ]; then
13800 13800 # The variable is not set by user, try to locate tool using the code snippet
13801 13801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13802 13802 $as_echo_n "checking for fgrep... " >&6; }
13803 13803 if ${ac_cv_path_FGREP+:} false; then :
13804 13804 $as_echo_n "(cached) " >&6
13805 13805 else
13806 13806 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13807 13807 then ac_cv_path_FGREP="$GREP -F"
13808 13808 else
13809 13809 if test -z "$FGREP"; then
13810 13810 ac_path_FGREP_found=false
13811 13811 # Loop through the user's path and test for each of PROGNAME-LIST
13812 13812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13813 13813 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13814 13814 do
13815 13815 IFS=$as_save_IFS
13816 13816 test -z "$as_dir" && as_dir=.
13817 13817 for ac_prog in fgrep; do
13818 13818 for ac_exec_ext in '' $ac_executable_extensions; do
13819 13819 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13820 13820 as_fn_executable_p "$ac_path_FGREP" || continue
13821 13821 # Check for GNU ac_path_FGREP and select it if it is found.
13822 13822 # Check for GNU $ac_path_FGREP
13823 13823 case `"$ac_path_FGREP" --version 2>&1` in
13824 13824 *GNU*)
13825 13825 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13826 13826 *)
13827 13827 ac_count=0
13828 13828 $as_echo_n 0123456789 >"conftest.in"
13829 13829 while :
13830 13830 do
13831 13831 cat "conftest.in" "conftest.in" >"conftest.tmp"
13832 13832 mv "conftest.tmp" "conftest.in"
13833 13833 cp "conftest.in" "conftest.nl"
13834 13834 $as_echo 'FGREP' >> "conftest.nl"
13835 13835 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13836 13836 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13837 13837 as_fn_arith $ac_count + 1 && ac_count=$as_val
13838 13838 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13839 13839 # Best one so far, save it but keep looking for a better one
13840 13840 ac_cv_path_FGREP="$ac_path_FGREP"
13841 13841 ac_path_FGREP_max=$ac_count
13842 13842 fi
13843 13843 # 10*(2^10) chars as input seems more than enough
13844 13844 test $ac_count -gt 10 && break
13845 13845 done
13846 13846 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13847 13847 esac
13848 13848
13849 13849 $ac_path_FGREP_found && break 3
13850 13850 done
13851 13851 done
13852 13852 done
13853 13853 IFS=$as_save_IFS
13854 13854 if test -z "$ac_cv_path_FGREP"; then
13855 13855 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13856 13856 fi
13857 13857 else
13858 13858 ac_cv_path_FGREP=$FGREP
13859 13859 fi
13860 13860
13861 13861 fi
13862 13862 fi
13863 13863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13864 13864 $as_echo "$ac_cv_path_FGREP" >&6; }
13865 13865 FGREP="$ac_cv_path_FGREP"
13866 13866
13867 13867
13868 13868 else
13869 13869 # The variable is set, but is it from the command line or the environment?
13870 13870
13871 13871 # Try to remove the string !FGREP! from our list.
13872 13872 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13873 13873 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13874 13874 # If it failed, the variable was not from the command line. Ignore it,
13875 13875 # but warn the user (except for BASH, which is always set by the calling BASH).
13876 13876 if test "xFGREP" != xBASH; then
13877 13877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13878 13878 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13879 13879 fi
13880 13880 # Try to locate tool using the code snippet
13881 13881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13882 13882 $as_echo_n "checking for fgrep... " >&6; }
13883 13883 if ${ac_cv_path_FGREP+:} false; then :
13884 13884 $as_echo_n "(cached) " >&6
13885 13885 else
13886 13886 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13887 13887 then ac_cv_path_FGREP="$GREP -F"
13888 13888 else
13889 13889 if test -z "$FGREP"; then
13890 13890 ac_path_FGREP_found=false
13891 13891 # Loop through the user's path and test for each of PROGNAME-LIST
13892 13892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13893 13893 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13894 13894 do
13895 13895 IFS=$as_save_IFS
13896 13896 test -z "$as_dir" && as_dir=.
13897 13897 for ac_prog in fgrep; do
13898 13898 for ac_exec_ext in '' $ac_executable_extensions; do
13899 13899 ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13900 13900 as_fn_executable_p "$ac_path_FGREP" || continue
13901 13901 # Check for GNU ac_path_FGREP and select it if it is found.
13902 13902 # Check for GNU $ac_path_FGREP
13903 13903 case `"$ac_path_FGREP" --version 2>&1` in
13904 13904 *GNU*)
13905 13905 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13906 13906 *)
13907 13907 ac_count=0
13908 13908 $as_echo_n 0123456789 >"conftest.in"
13909 13909 while :
13910 13910 do
13911 13911 cat "conftest.in" "conftest.in" >"conftest.tmp"
13912 13912 mv "conftest.tmp" "conftest.in"
13913 13913 cp "conftest.in" "conftest.nl"
13914 13914 $as_echo 'FGREP' >> "conftest.nl"
13915 13915 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13916 13916 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13917 13917 as_fn_arith $ac_count + 1 && ac_count=$as_val
13918 13918 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13919 13919 # Best one so far, save it but keep looking for a better one
13920 13920 ac_cv_path_FGREP="$ac_path_FGREP"
13921 13921 ac_path_FGREP_max=$ac_count
13922 13922 fi
13923 13923 # 10*(2^10) chars as input seems more than enough
13924 13924 test $ac_count -gt 10 && break
13925 13925 done
13926 13926 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13927 13927 esac
13928 13928
13929 13929 $ac_path_FGREP_found && break 3
13930 13930 done
13931 13931 done
13932 13932 done
13933 13933 IFS=$as_save_IFS
13934 13934 if test -z "$ac_cv_path_FGREP"; then
13935 13935 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13936 13936 fi
13937 13937 else
13938 13938 ac_cv_path_FGREP=$FGREP
13939 13939 fi
13940 13940
13941 13941 fi
13942 13942 fi
13943 13943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13944 13944 $as_echo "$ac_cv_path_FGREP" >&6; }
13945 13945 FGREP="$ac_cv_path_FGREP"
13946 13946
13947 13947
13948 13948 else
13949 13949 # If it succeeded, then it was overridden by the user. We will use it
13950 13950 # for the tool.
13951 13951
13952 13952 # First remove it from the list of overridden variables, so we can test
13953 13953 # for unknown variables in the end.
13954 13954 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13955 13955
13956 13956 # Check if we try to supply an empty value
13957 13957 if test "x$FGREP" = x; then
13958 13958 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13959 13959 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13960 13960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13961 13961 $as_echo_n "checking for FGREP... " >&6; }
13962 13962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13963 13963 $as_echo "disabled" >&6; }
13964 13964 else
13965 13965 # Check if the provided tool contains a complete path.
13966 13966 tool_specified="$FGREP"
13967 13967 tool_basename="${tool_specified##*/}"
13968 13968 if test "x$tool_basename" = "x$tool_specified"; then
13969 13969 # A command without a complete path is provided, search $PATH.
13970 13970 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13971 13971 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13972 13972 # Extract the first word of "$tool_basename", so it can be a program name with args.
13973 13973 set dummy $tool_basename; ac_word=$2
13974 13974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13975 13975 $as_echo_n "checking for $ac_word... " >&6; }
13976 13976 if ${ac_cv_path_FGREP+:} false; then :
13977 13977 $as_echo_n "(cached) " >&6
13978 13978 else
13979 13979 case $FGREP in
13980 13980 [\\/]* | ?:[\\/]*)
13981 13981 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13982 13982 ;;
13983 13983 *)
13984 13984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13985 13985 for as_dir in $PATH
13986 13986 do
13987 13987 IFS=$as_save_IFS
13988 13988 test -z "$as_dir" && as_dir=.
13989 13989 for ac_exec_ext in '' $ac_executable_extensions; do
13990 13990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13991 13991 ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13992 13992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13993 13993 break 2
13994 13994 fi
13995 13995 done
13996 13996 done
13997 13997 IFS=$as_save_IFS
13998 13998
13999 13999 ;;
14000 14000 esac
14001 14001 fi
14002 14002 FGREP=$ac_cv_path_FGREP
14003 14003 if test -n "$FGREP"; then
14004 14004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14005 14005 $as_echo "$FGREP" >&6; }
14006 14006 else
14007 14007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14008 14008 $as_echo "no" >&6; }
14009 14009 fi
14010 14010
14011 14011
14012 14012 if test "x$FGREP" = x; then
14013 14013 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14014 14014 fi
14015 14015 else
14016 14016 # Otherwise we believe it is a complete path. Use it as it is.
14017 14017 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14018 14018 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14019 14019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14020 14020 $as_echo_n "checking for FGREP... " >&6; }
14021 14021 if test ! -x "$tool_specified"; then
14022 14022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14023 14023 $as_echo "not found" >&6; }
14024 14024 as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14025 14025 fi
14026 14026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14027 14027 $as_echo "$tool_specified" >&6; }
14028 14028 fi
14029 14029 fi
14030 14030 fi
14031 14031
14032 14032 fi
14033 14033
14034 14034
14035 14035 if test "x$FGREP" = x; then
14036 14036 as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14037 14037 fi
14038 14038
14039 14039
14040 14040
14041 14041
14042 14042 # Publish this variable in the help.
14043 14043
14044 14044
14045 14045 if [ -z "${SED+x}" ]; then
14046 14046 # The variable is not set by user, try to locate tool using the code snippet
14047 14047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14048 14048 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14049 14049 if ${ac_cv_path_SED+:} false; then :
14050 14050 $as_echo_n "(cached) " >&6
14051 14051 else
14052 14052 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14053 14053 for ac_i in 1 2 3 4 5 6 7; do
14054 14054 ac_script="$ac_script$as_nl$ac_script"
14055 14055 done
14056 14056 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14057 14057 { ac_script=; unset ac_script;}
14058 14058 if test -z "$SED"; then
14059 14059 ac_path_SED_found=false
14060 14060 # Loop through the user's path and test for each of PROGNAME-LIST
14061 14061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14062 14062 for as_dir in $PATH
14063 14063 do
14064 14064 IFS=$as_save_IFS
14065 14065 test -z "$as_dir" && as_dir=.
14066 14066 for ac_prog in sed gsed; do
14067 14067 for ac_exec_ext in '' $ac_executable_extensions; do
14068 14068 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14069 14069 as_fn_executable_p "$ac_path_SED" || continue
14070 14070 # Check for GNU ac_path_SED and select it if it is found.
14071 14071 # Check for GNU $ac_path_SED
14072 14072 case `"$ac_path_SED" --version 2>&1` in
14073 14073 *GNU*)
14074 14074 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14075 14075 *)
14076 14076 ac_count=0
14077 14077 $as_echo_n 0123456789 >"conftest.in"
14078 14078 while :
14079 14079 do
14080 14080 cat "conftest.in" "conftest.in" >"conftest.tmp"
14081 14081 mv "conftest.tmp" "conftest.in"
14082 14082 cp "conftest.in" "conftest.nl"
14083 14083 $as_echo '' >> "conftest.nl"
14084 14084 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14085 14085 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14086 14086 as_fn_arith $ac_count + 1 && ac_count=$as_val
14087 14087 if test $ac_count -gt ${ac_path_SED_max-0}; then
14088 14088 # Best one so far, save it but keep looking for a better one
14089 14089 ac_cv_path_SED="$ac_path_SED"
14090 14090 ac_path_SED_max=$ac_count
14091 14091 fi
14092 14092 # 10*(2^10) chars as input seems more than enough
14093 14093 test $ac_count -gt 10 && break
14094 14094 done
14095 14095 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14096 14096 esac
14097 14097
14098 14098 $ac_path_SED_found && break 3
14099 14099 done
14100 14100 done
14101 14101 done
14102 14102 IFS=$as_save_IFS
14103 14103 if test -z "$ac_cv_path_SED"; then
14104 14104 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14105 14105 fi
14106 14106 else
14107 14107 ac_cv_path_SED=$SED
14108 14108 fi
14109 14109
14110 14110 fi
14111 14111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14112 14112 $as_echo "$ac_cv_path_SED" >&6; }
14113 14113 SED="$ac_cv_path_SED"
14114 14114 rm -f conftest.sed
14115 14115
14116 14116 else
14117 14117 # The variable is set, but is it from the command line or the environment?
14118 14118
14119 14119 # Try to remove the string !SED! from our list.
14120 14120 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14121 14121 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14122 14122 # If it failed, the variable was not from the command line. Ignore it,
14123 14123 # but warn the user (except for BASH, which is always set by the calling BASH).
14124 14124 if test "xSED" != xBASH; then
14125 14125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14126 14126 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14127 14127 fi
14128 14128 # Try to locate tool using the code snippet
14129 14129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14130 14130 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14131 14131 if ${ac_cv_path_SED+:} false; then :
14132 14132 $as_echo_n "(cached) " >&6
14133 14133 else
14134 14134 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14135 14135 for ac_i in 1 2 3 4 5 6 7; do
14136 14136 ac_script="$ac_script$as_nl$ac_script"
14137 14137 done
14138 14138 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14139 14139 { ac_script=; unset ac_script;}
14140 14140 if test -z "$SED"; then
14141 14141 ac_path_SED_found=false
14142 14142 # Loop through the user's path and test for each of PROGNAME-LIST
14143 14143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14144 14144 for as_dir in $PATH
14145 14145 do
14146 14146 IFS=$as_save_IFS
14147 14147 test -z "$as_dir" && as_dir=.
14148 14148 for ac_prog in sed gsed; do
14149 14149 for ac_exec_ext in '' $ac_executable_extensions; do
14150 14150 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14151 14151 as_fn_executable_p "$ac_path_SED" || continue
14152 14152 # Check for GNU ac_path_SED and select it if it is found.
14153 14153 # Check for GNU $ac_path_SED
14154 14154 case `"$ac_path_SED" --version 2>&1` in
14155 14155 *GNU*)
14156 14156 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14157 14157 *)
14158 14158 ac_count=0
14159 14159 $as_echo_n 0123456789 >"conftest.in"
14160 14160 while :
14161 14161 do
14162 14162 cat "conftest.in" "conftest.in" >"conftest.tmp"
14163 14163 mv "conftest.tmp" "conftest.in"
14164 14164 cp "conftest.in" "conftest.nl"
14165 14165 $as_echo '' >> "conftest.nl"
14166 14166 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14167 14167 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14168 14168 as_fn_arith $ac_count + 1 && ac_count=$as_val
14169 14169 if test $ac_count -gt ${ac_path_SED_max-0}; then
14170 14170 # Best one so far, save it but keep looking for a better one
14171 14171 ac_cv_path_SED="$ac_path_SED"
14172 14172 ac_path_SED_max=$ac_count
14173 14173 fi
14174 14174 # 10*(2^10) chars as input seems more than enough
14175 14175 test $ac_count -gt 10 && break
14176 14176 done
14177 14177 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14178 14178 esac
14179 14179
14180 14180 $ac_path_SED_found && break 3
14181 14181 done
14182 14182 done
14183 14183 done
14184 14184 IFS=$as_save_IFS
14185 14185 if test -z "$ac_cv_path_SED"; then
14186 14186 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14187 14187 fi
14188 14188 else
14189 14189 ac_cv_path_SED=$SED
14190 14190 fi
14191 14191
14192 14192 fi
14193 14193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14194 14194 $as_echo "$ac_cv_path_SED" >&6; }
14195 14195 SED="$ac_cv_path_SED"
14196 14196 rm -f conftest.sed
14197 14197
14198 14198 else
14199 14199 # If it succeeded, then it was overridden by the user. We will use it
14200 14200 # for the tool.
14201 14201
14202 14202 # First remove it from the list of overridden variables, so we can test
14203 14203 # for unknown variables in the end.
14204 14204 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14205 14205
14206 14206 # Check if we try to supply an empty value
14207 14207 if test "x$SED" = x; then
14208 14208 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14209 14209 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14210 14210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14211 14211 $as_echo_n "checking for SED... " >&6; }
14212 14212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14213 14213 $as_echo "disabled" >&6; }
14214 14214 else
14215 14215 # Check if the provided tool contains a complete path.
14216 14216 tool_specified="$SED"
14217 14217 tool_basename="${tool_specified##*/}"
14218 14218 if test "x$tool_basename" = "x$tool_specified"; then
14219 14219 # A command without a complete path is provided, search $PATH.
14220 14220 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14221 14221 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14222 14222 # Extract the first word of "$tool_basename", so it can be a program name with args.
14223 14223 set dummy $tool_basename; ac_word=$2
14224 14224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14225 14225 $as_echo_n "checking for $ac_word... " >&6; }
14226 14226 if ${ac_cv_path_SED+:} false; then :
14227 14227 $as_echo_n "(cached) " >&6
14228 14228 else
14229 14229 case $SED in
14230 14230 [\\/]* | ?:[\\/]*)
14231 14231 ac_cv_path_SED="$SED" # Let the user override the test with a path.
14232 14232 ;;
14233 14233 *)
14234 14234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14235 14235 for as_dir in $PATH
14236 14236 do
14237 14237 IFS=$as_save_IFS
14238 14238 test -z "$as_dir" && as_dir=.
14239 14239 for ac_exec_ext in '' $ac_executable_extensions; do
14240 14240 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14241 14241 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14242 14242 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14243 14243 break 2
14244 14244 fi
14245 14245 done
14246 14246 done
14247 14247 IFS=$as_save_IFS
14248 14248
14249 14249 ;;
14250 14250 esac
14251 14251 fi
14252 14252 SED=$ac_cv_path_SED
14253 14253 if test -n "$SED"; then
14254 14254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14255 14255 $as_echo "$SED" >&6; }
14256 14256 else
14257 14257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14258 14258 $as_echo "no" >&6; }
14259 14259 fi
14260 14260
14261 14261
14262 14262 if test "x$SED" = x; then
14263 14263 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14264 14264 fi
14265 14265 else
14266 14266 # Otherwise we believe it is a complete path. Use it as it is.
14267 14267 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14268 14268 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14269 14269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14270 14270 $as_echo_n "checking for SED... " >&6; }
14271 14271 if test ! -x "$tool_specified"; then
14272 14272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14273 14273 $as_echo "not found" >&6; }
14274 14274 as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14275 14275 fi
14276 14276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14277 14277 $as_echo "$tool_specified" >&6; }
14278 14278 fi
14279 14279 fi
14280 14280 fi
14281 14281
14282 14282 fi
14283 14283
14284 14284
14285 14285 if test "x$SED" = x; then
14286 14286 as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14287 14287 fi
14288 14288
14289 14289
14290 14290
14291 14291 # Always force rm.
14292 14292 RM="$RM -f"
14293 14293
14294 14294 # pwd behaves differently on various platforms and some don't support the -L flag.
14295 14295 # Always use the bash builtin pwd to get uniform behavior.
14296 14296 THEPWDCMD=pwd
14297 14297
14298 14298 # These are not required on all platforms
14299 14299
14300 14300
14301 14301 # Publish this variable in the help.
14302 14302
14303 14303
14304 14304 if [ -z "${CYGPATH+x}" ]; then
14305 14305 # The variable is not set by user, try to locate tool using the code snippet
14306 14306 for ac_prog in cygpath
14307 14307 do
14308 14308 # Extract the first word of "$ac_prog", so it can be a program name with args.
14309 14309 set dummy $ac_prog; ac_word=$2
14310 14310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14311 14311 $as_echo_n "checking for $ac_word... " >&6; }
14312 14312 if ${ac_cv_path_CYGPATH+:} false; then :
14313 14313 $as_echo_n "(cached) " >&6
14314 14314 else
14315 14315 case $CYGPATH in
14316 14316 [\\/]* | ?:[\\/]*)
14317 14317 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14318 14318 ;;
14319 14319 *)
14320 14320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14321 14321 for as_dir in $PATH
14322 14322 do
14323 14323 IFS=$as_save_IFS
14324 14324 test -z "$as_dir" && as_dir=.
14325 14325 for ac_exec_ext in '' $ac_executable_extensions; do
14326 14326 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14327 14327 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14328 14328 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14329 14329 break 2
14330 14330 fi
14331 14331 done
14332 14332 done
14333 14333 IFS=$as_save_IFS
14334 14334
14335 14335 ;;
14336 14336 esac
14337 14337 fi
14338 14338 CYGPATH=$ac_cv_path_CYGPATH
14339 14339 if test -n "$CYGPATH"; then
14340 14340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14341 14341 $as_echo "$CYGPATH" >&6; }
14342 14342 else
14343 14343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14344 14344 $as_echo "no" >&6; }
14345 14345 fi
14346 14346
14347 14347
14348 14348 test -n "$CYGPATH" && break
14349 14349 done
14350 14350
14351 14351 else
14352 14352 # The variable is set, but is it from the command line or the environment?
14353 14353
14354 14354 # Try to remove the string !CYGPATH! from our list.
14355 14355 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14356 14356 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14357 14357 # If it failed, the variable was not from the command line. Ignore it,
14358 14358 # but warn the user (except for BASH, which is always set by the calling BASH).
14359 14359 if test "xCYGPATH" != xBASH; then
14360 14360 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14361 14361 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14362 14362 fi
14363 14363 # Try to locate tool using the code snippet
14364 14364 for ac_prog in cygpath
14365 14365 do
14366 14366 # Extract the first word of "$ac_prog", so it can be a program name with args.
14367 14367 set dummy $ac_prog; ac_word=$2
14368 14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14369 14369 $as_echo_n "checking for $ac_word... " >&6; }
14370 14370 if ${ac_cv_path_CYGPATH+:} false; then :
14371 14371 $as_echo_n "(cached) " >&6
14372 14372 else
14373 14373 case $CYGPATH in
14374 14374 [\\/]* | ?:[\\/]*)
14375 14375 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14376 14376 ;;
14377 14377 *)
14378 14378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14379 14379 for as_dir in $PATH
14380 14380 do
14381 14381 IFS=$as_save_IFS
14382 14382 test -z "$as_dir" && as_dir=.
14383 14383 for ac_exec_ext in '' $ac_executable_extensions; do
14384 14384 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14385 14385 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14386 14386 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14387 14387 break 2
14388 14388 fi
14389 14389 done
14390 14390 done
14391 14391 IFS=$as_save_IFS
14392 14392
14393 14393 ;;
14394 14394 esac
14395 14395 fi
14396 14396 CYGPATH=$ac_cv_path_CYGPATH
14397 14397 if test -n "$CYGPATH"; then
14398 14398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14399 14399 $as_echo "$CYGPATH" >&6; }
14400 14400 else
14401 14401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14402 14402 $as_echo "no" >&6; }
14403 14403 fi
14404 14404
14405 14405
14406 14406 test -n "$CYGPATH" && break
14407 14407 done
14408 14408
14409 14409 else
14410 14410 # If it succeeded, then it was overridden by the user. We will use it
14411 14411 # for the tool.
14412 14412
14413 14413 # First remove it from the list of overridden variables, so we can test
14414 14414 # for unknown variables in the end.
14415 14415 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14416 14416
14417 14417 # Check if we try to supply an empty value
14418 14418 if test "x$CYGPATH" = x; then
14419 14419 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14420 14420 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14421 14421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14422 14422 $as_echo_n "checking for CYGPATH... " >&6; }
14423 14423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14424 14424 $as_echo "disabled" >&6; }
14425 14425 else
14426 14426 # Check if the provided tool contains a complete path.
14427 14427 tool_specified="$CYGPATH"
14428 14428 tool_basename="${tool_specified##*/}"
14429 14429 if test "x$tool_basename" = "x$tool_specified"; then
14430 14430 # A command without a complete path is provided, search $PATH.
14431 14431 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14432 14432 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14433 14433 # Extract the first word of "$tool_basename", so it can be a program name with args.
14434 14434 set dummy $tool_basename; ac_word=$2
14435 14435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14436 14436 $as_echo_n "checking for $ac_word... " >&6; }
14437 14437 if ${ac_cv_path_CYGPATH+:} false; then :
14438 14438 $as_echo_n "(cached) " >&6
14439 14439 else
14440 14440 case $CYGPATH in
14441 14441 [\\/]* | ?:[\\/]*)
14442 14442 ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14443 14443 ;;
14444 14444 *)
14445 14445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14446 14446 for as_dir in $PATH
14447 14447 do
14448 14448 IFS=$as_save_IFS
14449 14449 test -z "$as_dir" && as_dir=.
14450 14450 for ac_exec_ext in '' $ac_executable_extensions; do
14451 14451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14452 14452 ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14453 14453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14454 14454 break 2
14455 14455 fi
14456 14456 done
14457 14457 done
14458 14458 IFS=$as_save_IFS
14459 14459
14460 14460 ;;
14461 14461 esac
14462 14462 fi
14463 14463 CYGPATH=$ac_cv_path_CYGPATH
14464 14464 if test -n "$CYGPATH"; then
14465 14465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14466 14466 $as_echo "$CYGPATH" >&6; }
14467 14467 else
14468 14468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14469 14469 $as_echo "no" >&6; }
14470 14470 fi
14471 14471
14472 14472
14473 14473 if test "x$CYGPATH" = x; then
14474 14474 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14475 14475 fi
14476 14476 else
14477 14477 # Otherwise we believe it is a complete path. Use it as it is.
14478 14478 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14479 14479 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14480 14480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14481 14481 $as_echo_n "checking for CYGPATH... " >&6; }
14482 14482 if test ! -x "$tool_specified"; then
14483 14483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14484 14484 $as_echo "not found" >&6; }
14485 14485 as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14486 14486 fi
14487 14487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14488 14488 $as_echo "$tool_specified" >&6; }
14489 14489 fi
14490 14490 fi
14491 14491 fi
14492 14492
14493 14493 fi
14494 14494
14495 14495
14496 14496
14497 14497
14498 14498 # Publish this variable in the help.
14499 14499
14500 14500
14501 14501 if [ -z "${READLINK+x}" ]; then
14502 14502 # The variable is not set by user, try to locate tool using the code snippet
14503 14503 for ac_prog in greadlink readlink
14504 14504 do
14505 14505 # Extract the first word of "$ac_prog", so it can be a program name with args.
14506 14506 set dummy $ac_prog; ac_word=$2
14507 14507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14508 14508 $as_echo_n "checking for $ac_word... " >&6; }
14509 14509 if ${ac_cv_path_READLINK+:} false; then :
14510 14510 $as_echo_n "(cached) " >&6
14511 14511 else
14512 14512 case $READLINK in
14513 14513 [\\/]* | ?:[\\/]*)
14514 14514 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14515 14515 ;;
14516 14516 *)
14517 14517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14518 14518 for as_dir in $PATH
14519 14519 do
14520 14520 IFS=$as_save_IFS
14521 14521 test -z "$as_dir" && as_dir=.
14522 14522 for ac_exec_ext in '' $ac_executable_extensions; do
14523 14523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14524 14524 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14525 14525 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14526 14526 break 2
14527 14527 fi
14528 14528 done
14529 14529 done
14530 14530 IFS=$as_save_IFS
14531 14531
14532 14532 ;;
14533 14533 esac
14534 14534 fi
14535 14535 READLINK=$ac_cv_path_READLINK
14536 14536 if test -n "$READLINK"; then
14537 14537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14538 14538 $as_echo "$READLINK" >&6; }
14539 14539 else
14540 14540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14541 14541 $as_echo "no" >&6; }
14542 14542 fi
14543 14543
14544 14544
14545 14545 test -n "$READLINK" && break
14546 14546 done
14547 14547
14548 14548 else
14549 14549 # The variable is set, but is it from the command line or the environment?
14550 14550
14551 14551 # Try to remove the string !READLINK! from our list.
14552 14552 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14553 14553 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14554 14554 # If it failed, the variable was not from the command line. Ignore it,
14555 14555 # but warn the user (except for BASH, which is always set by the calling BASH).
14556 14556 if test "xREADLINK" != xBASH; then
14557 14557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14558 14558 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14559 14559 fi
14560 14560 # Try to locate tool using the code snippet
14561 14561 for ac_prog in greadlink readlink
14562 14562 do
14563 14563 # Extract the first word of "$ac_prog", so it can be a program name with args.
14564 14564 set dummy $ac_prog; ac_word=$2
14565 14565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14566 14566 $as_echo_n "checking for $ac_word... " >&6; }
14567 14567 if ${ac_cv_path_READLINK+:} false; then :
14568 14568 $as_echo_n "(cached) " >&6
14569 14569 else
14570 14570 case $READLINK in
14571 14571 [\\/]* | ?:[\\/]*)
14572 14572 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14573 14573 ;;
14574 14574 *)
14575 14575 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14576 14576 for as_dir in $PATH
14577 14577 do
14578 14578 IFS=$as_save_IFS
14579 14579 test -z "$as_dir" && as_dir=.
14580 14580 for ac_exec_ext in '' $ac_executable_extensions; do
14581 14581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14582 14582 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14583 14583 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14584 14584 break 2
14585 14585 fi
14586 14586 done
14587 14587 done
14588 14588 IFS=$as_save_IFS
14589 14589
14590 14590 ;;
14591 14591 esac
14592 14592 fi
14593 14593 READLINK=$ac_cv_path_READLINK
14594 14594 if test -n "$READLINK"; then
14595 14595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14596 14596 $as_echo "$READLINK" >&6; }
14597 14597 else
14598 14598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14599 14599 $as_echo "no" >&6; }
14600 14600 fi
14601 14601
14602 14602
14603 14603 test -n "$READLINK" && break
14604 14604 done
14605 14605
14606 14606 else
14607 14607 # If it succeeded, then it was overridden by the user. We will use it
14608 14608 # for the tool.
14609 14609
14610 14610 # First remove it from the list of overridden variables, so we can test
14611 14611 # for unknown variables in the end.
14612 14612 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14613 14613
14614 14614 # Check if we try to supply an empty value
14615 14615 if test "x$READLINK" = x; then
14616 14616 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14617 14617 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14618 14618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14619 14619 $as_echo_n "checking for READLINK... " >&6; }
14620 14620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14621 14621 $as_echo "disabled" >&6; }
14622 14622 else
14623 14623 # Check if the provided tool contains a complete path.
14624 14624 tool_specified="$READLINK"
14625 14625 tool_basename="${tool_specified##*/}"
14626 14626 if test "x$tool_basename" = "x$tool_specified"; then
14627 14627 # A command without a complete path is provided, search $PATH.
14628 14628 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14629 14629 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14630 14630 # Extract the first word of "$tool_basename", so it can be a program name with args.
14631 14631 set dummy $tool_basename; ac_word=$2
14632 14632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14633 14633 $as_echo_n "checking for $ac_word... " >&6; }
14634 14634 if ${ac_cv_path_READLINK+:} false; then :
14635 14635 $as_echo_n "(cached) " >&6
14636 14636 else
14637 14637 case $READLINK in
14638 14638 [\\/]* | ?:[\\/]*)
14639 14639 ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14640 14640 ;;
14641 14641 *)
14642 14642 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14643 14643 for as_dir in $PATH
14644 14644 do
14645 14645 IFS=$as_save_IFS
14646 14646 test -z "$as_dir" && as_dir=.
14647 14647 for ac_exec_ext in '' $ac_executable_extensions; do
14648 14648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14649 14649 ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14650 14650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14651 14651 break 2
14652 14652 fi
14653 14653 done
14654 14654 done
14655 14655 IFS=$as_save_IFS
14656 14656
14657 14657 ;;
14658 14658 esac
14659 14659 fi
14660 14660 READLINK=$ac_cv_path_READLINK
14661 14661 if test -n "$READLINK"; then
14662 14662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14663 14663 $as_echo "$READLINK" >&6; }
14664 14664 else
14665 14665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14666 14666 $as_echo "no" >&6; }
14667 14667 fi
14668 14668
14669 14669
14670 14670 if test "x$READLINK" = x; then
14671 14671 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14672 14672 fi
14673 14673 else
14674 14674 # Otherwise we believe it is a complete path. Use it as it is.
14675 14675 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14676 14676 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14677 14677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14678 14678 $as_echo_n "checking for READLINK... " >&6; }
14679 14679 if test ! -x "$tool_specified"; then
14680 14680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14681 14681 $as_echo "not found" >&6; }
14682 14682 as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14683 14683 fi
14684 14684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14685 14685 $as_echo "$tool_specified" >&6; }
14686 14686 fi
14687 14687 fi
14688 14688 fi
14689 14689
14690 14690 fi
14691 14691
14692 14692
14693 14693
14694 14694
14695 14695 # Publish this variable in the help.
14696 14696
14697 14697
14698 14698 if [ -z "${DF+x}" ]; then
14699 14699 # The variable is not set by user, try to locate tool using the code snippet
14700 14700 for ac_prog in df
14701 14701 do
14702 14702 # Extract the first word of "$ac_prog", so it can be a program name with args.
14703 14703 set dummy $ac_prog; ac_word=$2
14704 14704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14705 14705 $as_echo_n "checking for $ac_word... " >&6; }
14706 14706 if ${ac_cv_path_DF+:} false; then :
14707 14707 $as_echo_n "(cached) " >&6
14708 14708 else
14709 14709 case $DF in
14710 14710 [\\/]* | ?:[\\/]*)
14711 14711 ac_cv_path_DF="$DF" # Let the user override the test with a path.
14712 14712 ;;
14713 14713 *)
14714 14714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14715 14715 for as_dir in $PATH
14716 14716 do
14717 14717 IFS=$as_save_IFS
14718 14718 test -z "$as_dir" && as_dir=.
14719 14719 for ac_exec_ext in '' $ac_executable_extensions; do
14720 14720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14721 14721 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14722 14722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14723 14723 break 2
14724 14724 fi
14725 14725 done
14726 14726 done
14727 14727 IFS=$as_save_IFS
14728 14728
14729 14729 ;;
14730 14730 esac
14731 14731 fi
14732 14732 DF=$ac_cv_path_DF
14733 14733 if test -n "$DF"; then
14734 14734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14735 14735 $as_echo "$DF" >&6; }
14736 14736 else
14737 14737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14738 14738 $as_echo "no" >&6; }
14739 14739 fi
14740 14740
14741 14741
14742 14742 test -n "$DF" && break
14743 14743 done
14744 14744
14745 14745 else
14746 14746 # The variable is set, but is it from the command line or the environment?
14747 14747
14748 14748 # Try to remove the string !DF! from our list.
14749 14749 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14750 14750 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14751 14751 # If it failed, the variable was not from the command line. Ignore it,
14752 14752 # but warn the user (except for BASH, which is always set by the calling BASH).
14753 14753 if test "xDF" != xBASH; then
14754 14754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14755 14755 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14756 14756 fi
14757 14757 # Try to locate tool using the code snippet
14758 14758 for ac_prog in df
14759 14759 do
14760 14760 # Extract the first word of "$ac_prog", so it can be a program name with args.
14761 14761 set dummy $ac_prog; ac_word=$2
14762 14762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14763 14763 $as_echo_n "checking for $ac_word... " >&6; }
14764 14764 if ${ac_cv_path_DF+:} false; then :
14765 14765 $as_echo_n "(cached) " >&6
14766 14766 else
14767 14767 case $DF in
14768 14768 [\\/]* | ?:[\\/]*)
14769 14769 ac_cv_path_DF="$DF" # Let the user override the test with a path.
14770 14770 ;;
14771 14771 *)
14772 14772 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14773 14773 for as_dir in $PATH
14774 14774 do
14775 14775 IFS=$as_save_IFS
14776 14776 test -z "$as_dir" && as_dir=.
14777 14777 for ac_exec_ext in '' $ac_executable_extensions; do
14778 14778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14779 14779 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14780 14780 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14781 14781 break 2
14782 14782 fi
14783 14783 done
14784 14784 done
14785 14785 IFS=$as_save_IFS
14786 14786
14787 14787 ;;
14788 14788 esac
14789 14789 fi
14790 14790 DF=$ac_cv_path_DF
14791 14791 if test -n "$DF"; then
14792 14792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14793 14793 $as_echo "$DF" >&6; }
14794 14794 else
14795 14795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14796 14796 $as_echo "no" >&6; }
14797 14797 fi
14798 14798
14799 14799
14800 14800 test -n "$DF" && break
14801 14801 done
14802 14802
14803 14803 else
14804 14804 # If it succeeded, then it was overridden by the user. We will use it
14805 14805 # for the tool.
14806 14806
14807 14807 # First remove it from the list of overridden variables, so we can test
14808 14808 # for unknown variables in the end.
14809 14809 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14810 14810
14811 14811 # Check if we try to supply an empty value
14812 14812 if test "x$DF" = x; then
14813 14813 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14814 14814 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14815 14815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14816 14816 $as_echo_n "checking for DF... " >&6; }
14817 14817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14818 14818 $as_echo "disabled" >&6; }
14819 14819 else
14820 14820 # Check if the provided tool contains a complete path.
14821 14821 tool_specified="$DF"
14822 14822 tool_basename="${tool_specified##*/}"
14823 14823 if test "x$tool_basename" = "x$tool_specified"; then
14824 14824 # A command without a complete path is provided, search $PATH.
14825 14825 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14826 14826 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14827 14827 # Extract the first word of "$tool_basename", so it can be a program name with args.
14828 14828 set dummy $tool_basename; ac_word=$2
14829 14829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14830 14830 $as_echo_n "checking for $ac_word... " >&6; }
14831 14831 if ${ac_cv_path_DF+:} false; then :
14832 14832 $as_echo_n "(cached) " >&6
14833 14833 else
14834 14834 case $DF in
14835 14835 [\\/]* | ?:[\\/]*)
14836 14836 ac_cv_path_DF="$DF" # Let the user override the test with a path.
14837 14837 ;;
14838 14838 *)
14839 14839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14840 14840 for as_dir in $PATH
14841 14841 do
14842 14842 IFS=$as_save_IFS
14843 14843 test -z "$as_dir" && as_dir=.
14844 14844 for ac_exec_ext in '' $ac_executable_extensions; do
14845 14845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14846 14846 ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14847 14847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14848 14848 break 2
14849 14849 fi
14850 14850 done
14851 14851 done
14852 14852 IFS=$as_save_IFS
14853 14853
14854 14854 ;;
14855 14855 esac
14856 14856 fi
14857 14857 DF=$ac_cv_path_DF
14858 14858 if test -n "$DF"; then
14859 14859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14860 14860 $as_echo "$DF" >&6; }
14861 14861 else
14862 14862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14863 14863 $as_echo "no" >&6; }
14864 14864 fi
14865 14865
14866 14866
14867 14867 if test "x$DF" = x; then
14868 14868 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14869 14869 fi
14870 14870 else
14871 14871 # Otherwise we believe it is a complete path. Use it as it is.
14872 14872 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14873 14873 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14874 14874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14875 14875 $as_echo_n "checking for DF... " >&6; }
14876 14876 if test ! -x "$tool_specified"; then
14877 14877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14878 14878 $as_echo "not found" >&6; }
14879 14879 as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14880 14880 fi
14881 14881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14882 14882 $as_echo "$tool_specified" >&6; }
14883 14883 fi
14884 14884 fi
14885 14885 fi
14886 14886
14887 14887 fi
14888 14888
14889 14889
14890 14890
14891 14891
14892 14892 # Publish this variable in the help.
14893 14893
14894 14894
14895 14895 if [ -z "${CPIO+x}" ]; then
14896 14896 # The variable is not set by user, try to locate tool using the code snippet
14897 14897 for ac_prog in cpio bsdcpio
14898 14898 do
14899 14899 # Extract the first word of "$ac_prog", so it can be a program name with args.
14900 14900 set dummy $ac_prog; ac_word=$2
14901 14901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14902 14902 $as_echo_n "checking for $ac_word... " >&6; }
14903 14903 if ${ac_cv_path_CPIO+:} false; then :
14904 14904 $as_echo_n "(cached) " >&6
14905 14905 else
14906 14906 case $CPIO in
14907 14907 [\\/]* | ?:[\\/]*)
14908 14908 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14909 14909 ;;
14910 14910 *)
14911 14911 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14912 14912 for as_dir in $PATH
14913 14913 do
14914 14914 IFS=$as_save_IFS
14915 14915 test -z "$as_dir" && as_dir=.
14916 14916 for ac_exec_ext in '' $ac_executable_extensions; do
14917 14917 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14918 14918 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14919 14919 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14920 14920 break 2
14921 14921 fi
14922 14922 done
14923 14923 done
14924 14924 IFS=$as_save_IFS
14925 14925
14926 14926 ;;
14927 14927 esac
14928 14928 fi
14929 14929 CPIO=$ac_cv_path_CPIO
14930 14930 if test -n "$CPIO"; then
14931 14931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14932 14932 $as_echo "$CPIO" >&6; }
14933 14933 else
14934 14934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14935 14935 $as_echo "no" >&6; }
14936 14936 fi
14937 14937
14938 14938
14939 14939 test -n "$CPIO" && break
14940 14940 done
14941 14941
14942 14942 else
14943 14943 # The variable is set, but is it from the command line or the environment?
14944 14944
14945 14945 # Try to remove the string !CPIO! from our list.
14946 14946 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14947 14947 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14948 14948 # If it failed, the variable was not from the command line. Ignore it,
14949 14949 # but warn the user (except for BASH, which is always set by the calling BASH).
14950 14950 if test "xCPIO" != xBASH; then
14951 14951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14952 14952 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14953 14953 fi
14954 14954 # Try to locate tool using the code snippet
14955 14955 for ac_prog in cpio bsdcpio
14956 14956 do
14957 14957 # Extract the first word of "$ac_prog", so it can be a program name with args.
14958 14958 set dummy $ac_prog; ac_word=$2
14959 14959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14960 14960 $as_echo_n "checking for $ac_word... " >&6; }
14961 14961 if ${ac_cv_path_CPIO+:} false; then :
14962 14962 $as_echo_n "(cached) " >&6
14963 14963 else
14964 14964 case $CPIO in
14965 14965 [\\/]* | ?:[\\/]*)
14966 14966 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14967 14967 ;;
14968 14968 *)
14969 14969 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14970 14970 for as_dir in $PATH
14971 14971 do
14972 14972 IFS=$as_save_IFS
14973 14973 test -z "$as_dir" && as_dir=.
14974 14974 for ac_exec_ext in '' $ac_executable_extensions; do
14975 14975 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14976 14976 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14977 14977 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14978 14978 break 2
14979 14979 fi
14980 14980 done
14981 14981 done
14982 14982 IFS=$as_save_IFS
14983 14983
14984 14984 ;;
14985 14985 esac
14986 14986 fi
14987 14987 CPIO=$ac_cv_path_CPIO
14988 14988 if test -n "$CPIO"; then
14989 14989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14990 14990 $as_echo "$CPIO" >&6; }
14991 14991 else
14992 14992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14993 14993 $as_echo "no" >&6; }
14994 14994 fi
14995 14995
14996 14996
14997 14997 test -n "$CPIO" && break
14998 14998 done
14999 14999
15000 15000 else
15001 15001 # If it succeeded, then it was overridden by the user. We will use it
15002 15002 # for the tool.
15003 15003
15004 15004 # First remove it from the list of overridden variables, so we can test
15005 15005 # for unknown variables in the end.
15006 15006 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15007 15007
15008 15008 # Check if we try to supply an empty value
15009 15009 if test "x$CPIO" = x; then
15010 15010 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15011 15011 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15012 15012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15013 15013 $as_echo_n "checking for CPIO... " >&6; }
15014 15014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15015 15015 $as_echo "disabled" >&6; }
15016 15016 else
15017 15017 # Check if the provided tool contains a complete path.
15018 15018 tool_specified="$CPIO"
15019 15019 tool_basename="${tool_specified##*/}"
15020 15020 if test "x$tool_basename" = "x$tool_specified"; then
15021 15021 # A command without a complete path is provided, search $PATH.
15022 15022 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15023 15023 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15024 15024 # Extract the first word of "$tool_basename", so it can be a program name with args.
15025 15025 set dummy $tool_basename; ac_word=$2
15026 15026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15027 15027 $as_echo_n "checking for $ac_word... " >&6; }
15028 15028 if ${ac_cv_path_CPIO+:} false; then :
15029 15029 $as_echo_n "(cached) " >&6
15030 15030 else
15031 15031 case $CPIO in
15032 15032 [\\/]* | ?:[\\/]*)
15033 15033 ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15034 15034 ;;
15035 15035 *)
15036 15036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15037 15037 for as_dir in $PATH
15038 15038 do
15039 15039 IFS=$as_save_IFS
15040 15040 test -z "$as_dir" && as_dir=.
15041 15041 for ac_exec_ext in '' $ac_executable_extensions; do
15042 15042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15043 15043 ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15044 15044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15045 15045 break 2
15046 15046 fi
15047 15047 done
15048 15048 done
15049 15049 IFS=$as_save_IFS
15050 15050
15051 15051 ;;
15052 15052 esac
15053 15053 fi
15054 15054 CPIO=$ac_cv_path_CPIO
15055 15055 if test -n "$CPIO"; then
15056 15056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15057 15057 $as_echo "$CPIO" >&6; }
15058 15058 else
15059 15059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15060 15060 $as_echo "no" >&6; }
15061 15061 fi
15062 15062
15063 15063
15064 15064 if test "x$CPIO" = x; then
15065 15065 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15066 15066 fi
15067 15067 else
15068 15068 # Otherwise we believe it is a complete path. Use it as it is.
15069 15069 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15070 15070 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15071 15071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15072 15072 $as_echo_n "checking for CPIO... " >&6; }
15073 15073 if test ! -x "$tool_specified"; then
15074 15074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15075 15075 $as_echo "not found" >&6; }
15076 15076 as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15077 15077 fi
15078 15078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15079 15079 $as_echo "$tool_specified" >&6; }
15080 15080 fi
15081 15081 fi
15082 15082 fi
15083 15083
15084 15084 fi
15085 15085
15086 15086
15087 15087
15088 15088
15089 15089 # Publish this variable in the help.
15090 15090
15091 15091
15092 15092 if [ -z "${NICE+x}" ]; then
15093 15093 # The variable is not set by user, try to locate tool using the code snippet
15094 15094 for ac_prog in nice
15095 15095 do
15096 15096 # Extract the first word of "$ac_prog", so it can be a program name with args.
15097 15097 set dummy $ac_prog; ac_word=$2
15098 15098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15099 15099 $as_echo_n "checking for $ac_word... " >&6; }
15100 15100 if ${ac_cv_path_NICE+:} false; then :
15101 15101 $as_echo_n "(cached) " >&6
15102 15102 else
15103 15103 case $NICE in
15104 15104 [\\/]* | ?:[\\/]*)
15105 15105 ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15106 15106 ;;
15107 15107 *)
15108 15108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15109 15109 for as_dir in $PATH
15110 15110 do
15111 15111 IFS=$as_save_IFS
15112 15112 test -z "$as_dir" && as_dir=.
15113 15113 for ac_exec_ext in '' $ac_executable_extensions; do
15114 15114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15115 15115 ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15116 15116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15117 15117 break 2
15118 15118 fi
15119 15119 done
15120 15120 done
15121 15121 IFS=$as_save_IFS
15122 15122
15123 15123 ;;
15124 15124 esac
15125 15125 fi
15126 15126 NICE=$ac_cv_path_NICE
15127 15127 if test -n "$NICE"; then
15128 15128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15129 15129 $as_echo "$NICE" >&6; }
15130 15130 else
15131 15131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15132 15132 $as_echo "no" >&6; }
15133 15133 fi
15134 15134
15135 15135
15136 15136 test -n "$NICE" && break
15137 15137 done
15138 15138
15139 15139 else
15140 15140 # The variable is set, but is it from the command line or the environment?
15141 15141
15142 15142 # Try to remove the string !NICE! from our list.
15143 15143 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15144 15144 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15145 15145 # If it failed, the variable was not from the command line. Ignore it,
15146 15146 # but warn the user (except for BASH, which is always set by the calling BASH).
15147 15147 if test "xNICE" != xBASH; then
15148 15148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15149 15149 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15150 15150 fi
15151 15151 # Try to locate tool using the code snippet
15152 15152 for ac_prog in nice
15153 15153 do
15154 15154 # Extract the first word of "$ac_prog", so it can be a program name with args.
15155 15155 set dummy $ac_prog; ac_word=$2
15156 15156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15157 15157 $as_echo_n "checking for $ac_word... " >&6; }
15158 15158 if ${ac_cv_path_NICE+:} false; then :
15159 15159 $as_echo_n "(cached) " >&6
15160 15160 else
15161 15161 case $NICE in
15162 15162 [\\/]* | ?:[\\/]*)
15163 15163 ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15164 15164 ;;
15165 15165 *)
15166 15166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15167 15167 for as_dir in $PATH
15168 15168 do
15169 15169 IFS=$as_save_IFS
15170 15170 test -z "$as_dir" && as_dir=.
15171 15171 for ac_exec_ext in '' $ac_executable_extensions; do
15172 15172 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15173 15173 ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15174 15174 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15175 15175 break 2
15176 15176 fi
15177 15177 done
15178 15178 done
15179 15179 IFS=$as_save_IFS
15180 15180
15181 15181 ;;
15182 15182 esac
15183 15183 fi
15184 15184 NICE=$ac_cv_path_NICE
15185 15185 if test -n "$NICE"; then
15186 15186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15187 15187 $as_echo "$NICE" >&6; }
15188 15188 else
15189 15189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15190 15190 $as_echo "no" >&6; }
15191 15191 fi
15192 15192
15193 15193
15194 15194 test -n "$NICE" && break
15195 15195 done
15196 15196
15197 15197 else
15198 15198 # If it succeeded, then it was overridden by the user. We will use it
15199 15199 # for the tool.
15200 15200
15201 15201 # First remove it from the list of overridden variables, so we can test
15202 15202 # for unknown variables in the end.
15203 15203 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15204 15204
15205 15205 # Check if we try to supply an empty value
15206 15206 if test "x$NICE" = x; then
15207 15207 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15208 15208 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15209 15209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15210 15210 $as_echo_n "checking for NICE... " >&6; }
15211 15211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15212 15212 $as_echo "disabled" >&6; }
15213 15213 else
15214 15214 # Check if the provided tool contains a complete path.
15215 15215 tool_specified="$NICE"
15216 15216 tool_basename="${tool_specified##*/}"
15217 15217 if test "x$tool_basename" = "x$tool_specified"; then
15218 15218 # A command without a complete path is provided, search $PATH.
15219 15219 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15220 15220 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15221 15221 # Extract the first word of "$tool_basename", so it can be a program name with args.
15222 15222 set dummy $tool_basename; ac_word=$2
15223 15223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15224 15224 $as_echo_n "checking for $ac_word... " >&6; }
15225 15225 if ${ac_cv_path_NICE+:} false; then :
15226 15226 $as_echo_n "(cached) " >&6
15227 15227 else
15228 15228 case $NICE in
15229 15229 [\\/]* | ?:[\\/]*)
15230 15230 ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15231 15231 ;;
15232 15232 *)
15233 15233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15234 15234 for as_dir in $PATH
15235 15235 do
15236 15236 IFS=$as_save_IFS
15237 15237 test -z "$as_dir" && as_dir=.
15238 15238 for ac_exec_ext in '' $ac_executable_extensions; do
15239 15239 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15240 15240 ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15241 15241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15242 15242 break 2
15243 15243 fi
15244 15244 done
15245 15245 done
15246 15246 IFS=$as_save_IFS
15247 15247
15248 15248 ;;
15249 15249 esac
15250 15250 fi
15251 15251 NICE=$ac_cv_path_NICE
15252 15252 if test -n "$NICE"; then
15253 15253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15254 15254 $as_echo "$NICE" >&6; }
15255 15255 else
15256 15256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15257 15257 $as_echo "no" >&6; }
15258 15258 fi
15259 15259
15260 15260
15261 15261 if test "x$NICE" = x; then
15262 15262 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15263 15263 fi
15264 15264 else
15265 15265 # Otherwise we believe it is a complete path. Use it as it is.
15266 15266 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15267 15267 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15268 15268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15269 15269 $as_echo_n "checking for NICE... " >&6; }
15270 15270 if test ! -x "$tool_specified"; then
15271 15271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15272 15272 $as_echo "not found" >&6; }
15273 15273 as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15274 15274 fi
15275 15275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15276 15276 $as_echo "$tool_specified" >&6; }
15277 15277 fi
15278 15278 fi
15279 15279 fi
15280 15280
15281 15281 fi
15282 15282
15283 15283
15284 15284
15285 15285
15286 15286 # Now we can determine OpenJDK build and target platforms. This is required to
15287 15287 # have early on.
15288 15288 # Make sure we can run config.sub.
15289 15289 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15290 15290 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15291 15291
15292 15292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15293 15293 $as_echo_n "checking build system type... " >&6; }
15294 15294 if ${ac_cv_build+:} false; then :
15295 15295 $as_echo_n "(cached) " >&6
15296 15296 else
15297 15297 ac_build_alias=$build_alias
15298 15298 test "x$ac_build_alias" = x &&
15299 15299 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15300 15300 test "x$ac_build_alias" = x &&
15301 15301 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15302 15302 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15303 15303 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15304 15304
15305 15305 fi
15306 15306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15307 15307 $as_echo "$ac_cv_build" >&6; }
15308 15308 case $ac_cv_build in
15309 15309 *-*-*) ;;
15310 15310 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15311 15311 esac
15312 15312 build=$ac_cv_build
15313 15313 ac_save_IFS=$IFS; IFS='-'
15314 15314 set x $ac_cv_build
15315 15315 shift
15316 15316 build_cpu=$1
15317 15317 build_vendor=$2
15318 15318 shift; shift
15319 15319 # Remember, the first character of IFS is used to create $*,
15320 15320 # except with old shells:
15321 15321 build_os=$*
15322 15322 IFS=$ac_save_IFS
15323 15323 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15324 15324
15325 15325
15326 15326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15327 15327 $as_echo_n "checking host system type... " >&6; }
15328 15328 if ${ac_cv_host+:} false; then :
15329 15329 $as_echo_n "(cached) " >&6
15330 15330 else
15331 15331 if test "x$host_alias" = x; then
15332 15332 ac_cv_host=$ac_cv_build
15333 15333 else
15334 15334 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15335 15335 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15336 15336 fi
15337 15337
15338 15338 fi
15339 15339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15340 15340 $as_echo "$ac_cv_host" >&6; }
15341 15341 case $ac_cv_host in
15342 15342 *-*-*) ;;
15343 15343 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15344 15344 esac
15345 15345 host=$ac_cv_host
15346 15346 ac_save_IFS=$IFS; IFS='-'
15347 15347 set x $ac_cv_host
15348 15348 shift
15349 15349 host_cpu=$1
15350 15350 host_vendor=$2
15351 15351 shift; shift
15352 15352 # Remember, the first character of IFS is used to create $*,
15353 15353 # except with old shells:
15354 15354 host_os=$*
15355 15355 IFS=$ac_save_IFS
15356 15356 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15357 15357
15358 15358
15359 15359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15360 15360 $as_echo_n "checking target system type... " >&6; }
15361 15361 if ${ac_cv_target+:} false; then :
15362 15362 $as_echo_n "(cached) " >&6
15363 15363 else
15364 15364 if test "x$target_alias" = x; then
15365 15365 ac_cv_target=$ac_cv_host
15366 15366 else
15367 15367 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15368 15368 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15369 15369 fi
15370 15370
15371 15371 fi
15372 15372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15373 15373 $as_echo "$ac_cv_target" >&6; }
15374 15374 case $ac_cv_target in
15375 15375 *-*-*) ;;
15376 15376 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15377 15377 esac
15378 15378 target=$ac_cv_target
15379 15379 ac_save_IFS=$IFS; IFS='-'
15380 15380 set x $ac_cv_target
15381 15381 shift
15382 15382 target_cpu=$1
15383 15383 target_vendor=$2
15384 15384 shift; shift
15385 15385 # Remember, the first character of IFS is used to create $*,
15386 15386 # except with old shells:
15387 15387 target_os=$*
15388 15388 IFS=$ac_save_IFS
15389 15389 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15390 15390
15391 15391
15392 15392 # The aliases save the names the user supplied, while $host etc.
15393 15393 # will get canonicalized.
15394 15394 test -n "$target_alias" &&
15395 15395 test "$program_prefix$program_suffix$program_transform_name" = \
15396 15396 NONENONEs,x,x, &&
15397 15397 program_prefix=${target_alias}-
15398 15398
15399 15399 # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15400 15400 # is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the
15401 15401 # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15402 15402 # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15403 15403 # to use the configure naming style.
15404 15404
15405 15405
15406 15406
15407 15407
15408 15408
15409 15409 # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15410 15410 # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15411 15411 # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15412 15412 # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15413 15413 OPENJDK_TARGET_AUTOCONF_NAME="$host"
15414 15414 OPENJDK_BUILD_AUTOCONF_NAME="$build"
15415 15415
15416 15416
15417 15417
15418 15418 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15419 15419
15420 15420 case "$build_os" in
15421 15421 *linux*)
15422 15422 VAR_OS=linux
15423 15423 VAR_OS_TYPE=unix
15424 15424 ;;
15425 15425 *solaris*)
15426 15426 VAR_OS=solaris
15427 15427 VAR_OS_TYPE=unix
15428 15428 ;;
15429 15429 *darwin*)
15430 15430 VAR_OS=macosx
15431 15431 VAR_OS_TYPE=unix
15432 15432 ;;
15433 15433 *bsd*)
15434 15434 VAR_OS=bsd
15435 15435 VAR_OS_TYPE=unix
15436 15436 ;;
15437 15437 *cygwin*)
15438 15438 VAR_OS=windows
15439 15439 VAR_OS_ENV=windows.cygwin
15440 15440 ;;
15441 15441 *mingw*)
15442 15442 VAR_OS=windows
15443 15443 VAR_OS_ENV=windows.msys
15444 15444 ;;
15445 15445 *aix*)
15446 15446 VAR_OS=aix
15447 15447 VAR_OS_TYPE=unix
15448 15448 ;;
15449 15449 *)
15450 15450 as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15451 15451 ;;
15452 15452 esac
15453 15453
15454 15454
15455 15455 # First argument is the cpu name from the trip/quad
15456 15456 case "$build_cpu" in
15457 15457 x86_64)
15458 15458 VAR_CPU=x86_64
15459 15459 VAR_CPU_ARCH=x86
15460 15460 VAR_CPU_BITS=64
15461 15461 VAR_CPU_ENDIAN=little
15462 15462 ;;
15463 15463 i?86)
15464 15464 VAR_CPU=x86
15465 15465 VAR_CPU_ARCH=x86
15466 15466 VAR_CPU_BITS=32
15467 15467 VAR_CPU_ENDIAN=little
15468 15468 ;;
15469 15469 arm*)
15470 15470 VAR_CPU=arm
15471 15471 VAR_CPU_ARCH=arm
15472 15472 VAR_CPU_BITS=32
15473 15473 VAR_CPU_ENDIAN=little
15474 15474 ;;
15475 15475 aarch64)
15476 15476 VAR_CPU=aarch64
15477 15477 VAR_CPU_ARCH=aarch64
15478 15478 VAR_CPU_BITS=64
15479 15479 VAR_CPU_ENDIAN=little
15480 15480 ;;
15481 15481 powerpc)
15482 15482 VAR_CPU=ppc
15483 15483 VAR_CPU_ARCH=ppc
15484 15484 VAR_CPU_BITS=32
15485 15485 VAR_CPU_ENDIAN=big
15486 15486 ;;
15487 15487 powerpc64)
15488 15488 VAR_CPU=ppc64
15489 15489 VAR_CPU_ARCH=ppc
15490 15490 VAR_CPU_BITS=64
15491 15491 VAR_CPU_ENDIAN=big
15492 15492 ;;
15493 15493 powerpc64le)
15494 15494 VAR_CPU=ppc64le
15495 15495 VAR_CPU_ARCH=ppc
15496 15496 VAR_CPU_BITS=64
15497 15497 VAR_CPU_ENDIAN=little
15498 15498 ;;
15499 15499 s390)
15500 15500 VAR_CPU=s390
15501 15501 VAR_CPU_ARCH=s390
15502 15502 VAR_CPU_BITS=32
15503 15503 VAR_CPU_ENDIAN=big
15504 15504 ;;
15505 15505 s390x)
15506 15506 VAR_CPU=s390x
15507 15507 VAR_CPU_ARCH=s390
15508 15508 VAR_CPU_BITS=64
15509 15509 VAR_CPU_ENDIAN=big
15510 15510 ;;
15511 15511 sparc)
15512 15512 VAR_CPU=sparc
15513 15513 VAR_CPU_ARCH=sparc
15514 15514 VAR_CPU_BITS=32
15515 15515 VAR_CPU_ENDIAN=big
15516 15516 ;;
15517 15517 sparcv9|sparc64)
15518 15518 VAR_CPU=sparcv9
15519 15519 VAR_CPU_ARCH=sparc
15520 15520 VAR_CPU_BITS=64
15521 15521 VAR_CPU_ENDIAN=big
15522 15522 ;;
15523 15523 *)
15524 15524 as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15525 15525 ;;
15526 15526 esac
15527 15527
15528 15528 # ..and setup our own variables. (Do this explicitely to facilitate searching)
15529 15529 OPENJDK_BUILD_OS="$VAR_OS"
15530 15530 if test "x$VAR_OS_TYPE" != x; then
15531 15531 OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15532 15532 else
15533 15533 OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15534 15534 fi
15535 15535 if test "x$VAR_OS_ENV" != x; then
15536 15536 OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15537 15537 else
15538 15538 OPENJDK_BUILD_OS_ENV="$VAR_OS"
15539 15539 fi
15540 15540 OPENJDK_BUILD_CPU="$VAR_CPU"
15541 15541 OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15542 15542 OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15543 15543 OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15544 15544
15545 15545
15546 15546
15547 15547
15548 15548
15549 15549
15550 15550
15551 15551
15552 15552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15553 15553 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15554 15554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15555 15555 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15556 15556
15557 15557 # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15558 15558
15559 15559 case "$host_os" in
15560 15560 *linux*)
15561 15561 VAR_OS=linux
15562 15562 VAR_OS_TYPE=unix
15563 15563 ;;
15564 15564 *solaris*)
15565 15565 VAR_OS=solaris
15566 15566 VAR_OS_TYPE=unix
15567 15567 ;;
15568 15568 *darwin*)
15569 15569 VAR_OS=macosx
15570 15570 VAR_OS_TYPE=unix
15571 15571 ;;
15572 15572 *bsd*)
15573 15573 VAR_OS=bsd
15574 15574 VAR_OS_TYPE=unix
15575 15575 ;;
15576 15576 *cygwin*)
15577 15577 VAR_OS=windows
15578 15578 VAR_OS_ENV=windows.cygwin
15579 15579 ;;
15580 15580 *mingw*)
15581 15581 VAR_OS=windows
15582 15582 VAR_OS_ENV=windows.msys
15583 15583 ;;
15584 15584 *aix*)
15585 15585 VAR_OS=aix
15586 15586 VAR_OS_TYPE=unix
15587 15587 ;;
15588 15588 *)
15589 15589 as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15590 15590 ;;
15591 15591 esac
15592 15592
15593 15593
15594 15594 # First argument is the cpu name from the trip/quad
15595 15595 case "$host_cpu" in
15596 15596 x86_64)
15597 15597 VAR_CPU=x86_64
15598 15598 VAR_CPU_ARCH=x86
15599 15599 VAR_CPU_BITS=64
15600 15600 VAR_CPU_ENDIAN=little
15601 15601 ;;
15602 15602 i?86)
15603 15603 VAR_CPU=x86
15604 15604 VAR_CPU_ARCH=x86
15605 15605 VAR_CPU_BITS=32
15606 15606 VAR_CPU_ENDIAN=little
15607 15607 ;;
15608 15608 arm*)
15609 15609 VAR_CPU=arm
15610 15610 VAR_CPU_ARCH=arm
15611 15611 VAR_CPU_BITS=32
15612 15612 VAR_CPU_ENDIAN=little
15613 15613 ;;
15614 15614 aarch64)
15615 15615 VAR_CPU=aarch64
15616 15616 VAR_CPU_ARCH=aarch64
15617 15617 VAR_CPU_BITS=64
15618 15618 VAR_CPU_ENDIAN=little
15619 15619 ;;
15620 15620 powerpc)
15621 15621 VAR_CPU=ppc
15622 15622 VAR_CPU_ARCH=ppc
15623 15623 VAR_CPU_BITS=32
15624 15624 VAR_CPU_ENDIAN=big
15625 15625 ;;
15626 15626 powerpc64)
15627 15627 VAR_CPU=ppc64
15628 15628 VAR_CPU_ARCH=ppc
15629 15629 VAR_CPU_BITS=64
15630 15630 VAR_CPU_ENDIAN=big
15631 15631 ;;
15632 15632 powerpc64le)
15633 15633 VAR_CPU=ppc64le
15634 15634 VAR_CPU_ARCH=ppc
15635 15635 VAR_CPU_BITS=64
15636 15636 VAR_CPU_ENDIAN=little
15637 15637 ;;
15638 15638 s390)
15639 15639 VAR_CPU=s390
15640 15640 VAR_CPU_ARCH=s390
15641 15641 VAR_CPU_BITS=32
15642 15642 VAR_CPU_ENDIAN=big
15643 15643 ;;
15644 15644 s390x)
15645 15645 VAR_CPU=s390x
15646 15646 VAR_CPU_ARCH=s390
15647 15647 VAR_CPU_BITS=64
15648 15648 VAR_CPU_ENDIAN=big
15649 15649 ;;
15650 15650 sparc)
15651 15651 VAR_CPU=sparc
15652 15652 VAR_CPU_ARCH=sparc
15653 15653 VAR_CPU_BITS=32
15654 15654 VAR_CPU_ENDIAN=big
15655 15655 ;;
15656 15656 sparcv9|sparc64)
15657 15657 VAR_CPU=sparcv9
15658 15658 VAR_CPU_ARCH=sparc
15659 15659 VAR_CPU_BITS=64
15660 15660 VAR_CPU_ENDIAN=big
15661 15661 ;;
15662 15662 *)
15663 15663 as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15664 15664 ;;
15665 15665 esac
15666 15666
15667 15667 # ... and setup our own variables. (Do this explicitely to facilitate searching)
15668 15668 OPENJDK_TARGET_OS="$VAR_OS"
15669 15669 if test "x$VAR_OS_TYPE" != x; then
15670 15670 OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15671 15671 else
15672 15672 OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15673 15673 fi
15674 15674 if test "x$VAR_OS_ENV" != x; then
15675 15675 OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15676 15676 else
15677 15677 OPENJDK_TARGET_OS_ENV="$VAR_OS"
15678 15678 fi
15679 15679 OPENJDK_TARGET_CPU="$VAR_CPU"
15680 15680 OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15681 15681 OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15682 15682 OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15683 15683
15684 15684
15685 15685
15686 15686
15687 15687
15688 15688
15689 15689
15690 15690
15691 15691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15692 15692 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15693 15693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15694 15694 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15695 15695
15696 15696
15697 15697
15698 15698 # Check whether --with-target-bits was given.
15699 15699 if test "${with_target_bits+set}" = set; then :
15700 15700 withval=$with_target_bits;
15701 15701 fi
15702 15702
15703 15703
15704 15704 # We have three types of compiles:
15705 15705 # native == normal compilation, target system == build system
15706 15706 # cross == traditional cross compilation, target system != build system; special toolchain needed
15707 15707 # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15708 15708 #
15709 15709 if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15710 15710 # We're doing a proper cross-compilation
15711 15711 COMPILE_TYPE="cross"
15712 15712 else
15713 15713 COMPILE_TYPE="native"
15714 15714 fi
15715 15715
15716 15716 if test "x$with_target_bits" != x; then
15717 15717 if test "x$COMPILE_TYPE" = "xcross"; then
15718 15718 as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15719 15719 fi
15720 15720
15721 15721 if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15722 15722 # A reduced build is requested
15723 15723 COMPILE_TYPE="reduced"
15724 15724 OPENJDK_TARGET_CPU_BITS=32
15725 15725 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15726 15726 OPENJDK_TARGET_CPU=x86
15727 15727 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15728 15728 OPENJDK_TARGET_CPU=sparc
15729 15729 else
15730 15730 as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15731 15731 fi
15732 15732 elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15733 15733 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
15734 15734 elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15735 15735 { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15736 15736 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15737 15737 else
15738 15738 as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15739 15739 fi
15740 15740 fi
15741 15741
15742 15742
15743 15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15744 15744 $as_echo_n "checking compilation type... " >&6; }
15745 15745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15746 15746 $as_echo "$COMPILE_TYPE" >&6; }
15747 15747
15748 15748
15749 15749 if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15750 15750 REQUIRED_OS_NAME=SunOS
15751 15751 REQUIRED_OS_VERSION=5.10
15752 15752 fi
15753 15753 if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15754 15754 REQUIRED_OS_NAME=Linux
15755 15755 REQUIRED_OS_VERSION=2.6
15756 15756 fi
15757 15757 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15758 15758 REQUIRED_OS_NAME=Windows
15759 15759 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15760 15760 REQUIRED_OS_VERSION=5.2
15761 15761 else
15762 15762 REQUIRED_OS_VERSION=5.1
15763 15763 fi
15764 15764 fi
15765 15765 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15766 15766 REQUIRED_OS_NAME=Darwin
15767 15767 REQUIRED_OS_VERSION=11.2
15768 15768 fi
15769 15769 if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15770 15770 REQUIRED_OS_NAME=AIX
15771 15771 REQUIRED_OS_VERSION=7.1
15772 15772 fi
15773 15773
15774 15774
15775 15775
15776 15776
15777 15777
15778 15778
15779 15779 # Also store the legacy naming of the cpu.
15780 15780 # Ie i586 and amd64 instead of x86 and x86_64
15781 15781 OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15782 15782 if test "x$OPENJDK_TARGET_CPU" = xx86; then
15783 15783 OPENJDK_TARGET_CPU_LEGACY="i586"
15784 15784 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15785 15785 # On all platforms except MacOSX replace x86_64 with amd64.
15786 15786 OPENJDK_TARGET_CPU_LEGACY="amd64"
15787 15787 fi
15788 15788
15789 15789
15790 15790 # And the second legacy naming of the cpu.
15791 15791 # Ie i386 and amd64 instead of x86 and x86_64.
15792 15792 OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15793 15793 if test "x$OPENJDK_TARGET_CPU" = xx86; then
15794 15794 OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15795 15795 elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15796 15796 OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15797 15797 fi
15798 15798
15799 15799
15800 15800 # This is the name of the cpu (but using i386 and amd64 instead of
15801 15801 # x86 and x86_64, respectively), preceeded by a /, to be used when
15802 15802 # locating libraries. On macosx, it's empty, though.
15803 15803 OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15804 15804 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15805 15805 OPENJDK_TARGET_CPU_LIBDIR=""
15806 15806 fi
15807 15807
15808 15808
15809 15809 # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15810 15810 # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15811 15811 # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15812 15812 OPENJDK_TARGET_CPU_ISADIR=""
15813 15813 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15814 15814 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15815 15815 OPENJDK_TARGET_CPU_ISADIR="/amd64"
15816 15816 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15817 15817 OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15818 15818 fi
15819 15819 fi
15820 15820
15821 15821
15822 15822 # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15823 15823 OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15824 15824 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15825 15825 # On linux only, we replace x86 with i386.
15826 15826 OPENJDK_TARGET_CPU_OSARCH="i386"
15827 15827 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15828 15828 # On all platforms except macosx, we replace x86_64 with amd64.
15829 15829 OPENJDK_TARGET_CPU_OSARCH="amd64"
15830 15830 fi
15831 15831
15832 15832
15833 15833 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15834 15834 if test "x$OPENJDK_TARGET_CPU" = xx86; then
15835 15835 OPENJDK_TARGET_CPU_JLI="i386"
15836 15836 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15837 15837 # On all platforms except macosx, we replace x86_64 with amd64.
15838 15838 OPENJDK_TARGET_CPU_JLI="amd64"
15839 15839 fi
15840 15840 # Now setup the -D flags for building libjli.
15841 15841 OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15842 15842 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15843 15843 if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15844 15844 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15845 15845 elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15846 15846 OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15847 15847 fi
15848 15848 fi
15849 15849
15850 15850
15851 15851 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15852 15852 OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15853 15853 else
15854 15854 OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15855 15855 fi
15856 15856
15857 15857
15858 15858 # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15859 15859 # Macosx is osx and x86_64 is x64
15860 15860 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15861 15861 OPENJDK_TARGET_OS_BUNDLE="osx"
15862 15862 else
15863 15863 OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15864 15864 fi
15865 15865 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15866 15866 OPENJDK_TARGET_CPU_BUNDLE="x64"
15867 15867 else
15868 15868 OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15869 15869 fi
15870 15870 OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15871 15871
15872 15872
15873 15873
15874 15874
15875 15875 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15876 15876 A_LP64="LP64:="
15877 15877 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15878 15878 # unpack200.exe
15879 15879 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15880 15880 OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15881 15881 fi
15882 15882 fi
15883 15883 LP64=$A_LP64
15884 15884
15885 15885
15886 15886 if test "x$COMPILE_TYPE" = "xcross"; then
15887 15887 # FIXME: ... or should this include reduced builds..?
15888 15888 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15889 15889 else
15890 15890 DEFINE_CROSS_COMPILE_ARCH=""
15891 15891 fi
15892 15892
15893 15893
15894 15894 # Convert openjdk platform names to hotspot names
15895 15895
15896 15896 HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15897 15897 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15898 15898 HOTSPOT_TARGET_OS=bsd
15899 15899 fi
15900 15900
15901 15901
15902 15902 HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15903 15903 if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15904 15904 HOTSPOT_TARGET_OS_TYPE=posix
15905 15905 fi
15906 15906
15907 15907
15908 15908 HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15909 15909 if test "x$OPENJDK_TARGET_CPU" = xx86; then
15910 15910 HOTSPOT_TARGET_CPU=x86_32
15911 15911 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15912 15912 HOTSPOT_TARGET_CPU=sparc
15913 15913 elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15914 15914 HOTSPOT_TARGET_CPU=ppc_64
15915 15915 elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15916 15916 HOTSPOT_TARGET_CPU=ppc_64
15917 15917 fi
15918 15918
15919 15919
15920 15920 # This is identical with OPENJDK_*, but define anyway for consistency.
15921 15921 HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15922 15922
15923 15923
15924 15924 # Setup HOTSPOT_TARGET_CPU_DEFINE
15925 15925 if test "x$OPENJDK_TARGET_CPU" = xx86; then
15926 15926 HOTSPOT_TARGET_CPU_DEFINE=IA32
15927 15927 elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15928 15928 HOTSPOT_TARGET_CPU_DEFINE=AMD64
15929 15929 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15930 15930 HOTSPOT_TARGET_CPU_DEFINE=SPARC
15931 15931 elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15932 15932 HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15933 15933 elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15934 15934 HOTSPOT_TARGET_CPU_DEFINE=PPC64
15935 15935 elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15936 15936 HOTSPOT_TARGET_CPU_DEFINE=PPC64
15937 15937
15938 15938 # The cpu defines below are for zero, we don't support them directly.
15939 15939 elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15940 15940 HOTSPOT_TARGET_CPU_DEFINE=SPARC
15941 15941 elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15942 15942 HOTSPOT_TARGET_CPU_DEFINE=PPC32
15943 15943 elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15944 15944 HOTSPOT_TARGET_CPU_DEFINE=S390
15945 15945 elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15946 15946 HOTSPOT_TARGET_CPU_DEFINE=S390
15947 15947 fi
15948 15948
15949 15949
15950 15950
15951 15951
15952 15952 # Also store the legacy naming of the cpu.
15953 15953 # Ie i586 and amd64 instead of x86 and x86_64
15954 15954 OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15955 15955 if test "x$OPENJDK_BUILD_CPU" = xx86; then
15956 15956 OPENJDK_BUILD_CPU_LEGACY="i586"
15957 15957 elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15958 15958 # On all platforms except MacOSX replace x86_64 with amd64.
15959 15959 OPENJDK_BUILD_CPU_LEGACY="amd64"
15960 15960 fi
15961 15961
15962 15962
15963 15963 # And the second legacy naming of the cpu.
15964 15964 # Ie i386 and amd64 instead of x86 and x86_64.
15965 15965 OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15966 15966 if test "x$OPENJDK_BUILD_CPU" = xx86; then
15967 15967 OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15968 15968 elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15969 15969 OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15970 15970 fi
15971 15971
15972 15972
15973 15973 # This is the name of the cpu (but using i386 and amd64 instead of
15974 15974 # x86 and x86_64, respectively), preceeded by a /, to be used when
15975 15975 # locating libraries. On macosx, it's empty, though.
15976 15976 OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15977 15977 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15978 15978 OPENJDK_BUILD_CPU_LIBDIR=""
15979 15979 fi
15980 15980
15981 15981
15982 15982 # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15983 15983 # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15984 15984 # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15985 15985 OPENJDK_BUILD_CPU_ISADIR=""
15986 15986 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15987 15987 if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15988 15988 OPENJDK_BUILD_CPU_ISADIR="/amd64"
15989 15989 elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15990 15990 OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15991 15991 fi
15992 15992 fi
15993 15993
15994 15994
15995 15995 # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15996 15996 OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15997 15997 if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15998 15998 # On linux only, we replace x86 with i386.
15999 15999 OPENJDK_BUILD_CPU_OSARCH="i386"
16000 16000 elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16001 16001 # On all platforms except macosx, we replace x86_64 with amd64.
16002 16002 OPENJDK_BUILD_CPU_OSARCH="amd64"
16003 16003 fi
16004 16004
16005 16005
16006 16006 OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16007 16007 if test "x$OPENJDK_BUILD_CPU" = xx86; then
16008 16008 OPENJDK_BUILD_CPU_JLI="i386"
16009 16009 elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16010 16010 # On all platforms except macosx, we replace x86_64 with amd64.
16011 16011 OPENJDK_BUILD_CPU_JLI="amd64"
16012 16012 fi
16013 16013 # Now setup the -D flags for building libjli.
16014 16014 OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16015 16015 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16016 16016 if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16017 16017 OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16018 16018 elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16019 16019 OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16020 16020 fi
16021 16021 fi
16022 16022
16023 16023
16024 16024 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16025 16025 OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16026 16026 else
16027 16027 OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16028 16028 fi
16029 16029
16030 16030
16031 16031 # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16032 16032 # Macosx is osx and x86_64 is x64
16033 16033 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16034 16034 OPENJDK_BUILD_OS_BUNDLE="osx"
16035 16035 else
16036 16036 OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16037 16037 fi
16038 16038 if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16039 16039 OPENJDK_BUILD_CPU_BUNDLE="x64"
16040 16040 else
16041 16041 OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16042 16042 fi
16043 16043 OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16044 16044
16045 16045
16046 16046
16047 16047
16048 16048 if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16049 16049 A_LP64="LP64:="
16050 16050 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16051 16051 # unpack200.exe
16052 16052 if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16053 16053 OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16054 16054 fi
16055 16055 fi
16056 16056 LP64=$A_LP64
16057 16057
16058 16058
16059 16059 if test "x$COMPILE_TYPE" = "xcross"; then
16060 16060 # FIXME: ... or should this include reduced builds..?
16061 16061 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16062 16062 else
16063 16063 DEFINE_CROSS_COMPILE_ARCH=""
16064 16064 fi
16065 16065
16066 16066
16067 16067 # Convert openjdk platform names to hotspot names
16068 16068
16069 16069 HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16070 16070 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16071 16071 HOTSPOT_BUILD_OS=bsd
16072 16072 fi
16073 16073
16074 16074
16075 16075 HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16076 16076 if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16077 16077 HOTSPOT_BUILD_OS_TYPE=posix
16078 16078 fi
16079 16079
16080 16080
16081 16081 HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16082 16082 if test "x$OPENJDK_BUILD_CPU" = xx86; then
16083 16083 HOTSPOT_BUILD_CPU=x86_32
16084 16084 elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16085 16085 HOTSPOT_BUILD_CPU=sparc
16086 16086 elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16087 16087 HOTSPOT_BUILD_CPU=ppc_64
16088 16088 elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16089 16089 HOTSPOT_BUILD_CPU=ppc_64
16090 16090 fi
16091 16091
16092 16092
16093 16093 # This is identical with OPENJDK_*, but define anyway for consistency.
16094 16094 HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16095 16095
16096 16096
16097 16097 # Setup HOTSPOT_BUILD_CPU_DEFINE
16098 16098 if test "x$OPENJDK_BUILD_CPU" = xx86; then
16099 16099 HOTSPOT_BUILD_CPU_DEFINE=IA32
16100 16100 elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16101 16101 HOTSPOT_BUILD_CPU_DEFINE=AMD64
16102 16102 elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16103 16103 HOTSPOT_BUILD_CPU_DEFINE=SPARC
16104 16104 elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16105 16105 HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16106 16106 elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16107 16107 HOTSPOT_BUILD_CPU_DEFINE=PPC64
16108 16108 elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16109 16109 HOTSPOT_BUILD_CPU_DEFINE=PPC64
16110 16110
16111 16111 # The cpu defines below are for zero, we don't support them directly.
16112 16112 elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16113 16113 HOTSPOT_BUILD_CPU_DEFINE=SPARC
16114 16114 elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16115 16115 HOTSPOT_BUILD_CPU_DEFINE=PPC32
16116 16116 elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16117 16117 HOTSPOT_BUILD_CPU_DEFINE=S390
16118 16118 elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16119 16119 HOTSPOT_BUILD_CPU_DEFINE=S390
16120 16120 fi
16121 16121
16122 16122
16123 16123
16124 16124
16125 16125 # ZERO_ARCHDEF is used to enable architecture-specific code.
16126 16126 # This is used in legacy hotspot build.
16127 16127 ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16128 16128
16129 16129
16130 16130
16131 16131
16132 16132
16133 16133 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16134 16134
16135 16135 # Save the current directory this script was started from
16136 16136 CURDIR="$PWD"
16137 16137
16138 16138 # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16139 16139 # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16140 16140 # was not available at that time.
16141 16141 REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16142 16142 if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16143 16143 ORIGINAL_PATH="$REWRITTEN_PATH"
16144 16144 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16145 16145 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16146 16146 fi
16147 16147
16148 16148 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16149 16149 PATH_SEP=";"
16150 16150
16151 16151 SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16152 16152 if test $SRC_ROOT_LENGTH -gt 100; then
16153 16153 as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16154 16154 fi
16155 16155
16156 16156 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16157 16157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16158 16158 $as_echo_n "checking cygwin release... " >&6; }
16159 16159 CYGWIN_VERSION=`$UNAME -r`
16160 16160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16161 16161 $as_echo "$CYGWIN_VERSION" >&6; }
16162 16162 WINDOWS_ENV_VENDOR='cygwin'
16163 16163 WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16164 16164
16165 16165 CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16166 16166 if test "x$CYGWIN_VERSION_OLD" != x; then
16167 16167 { $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
16168 16168 $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;}
16169 16169 as_fn_error $? "Cannot continue" "$LINENO" 5
16170 16170 fi
16171 16171 if test "x$CYGPATH" = x; then
16172 16172 as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16173 16173 fi
16174 16174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16175 16175 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16176 16176 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16177 16177 cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16178 16178 # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16179 16179 CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16180 16180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16181 16181 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16182 16182 WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16183 16183 test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16184 16184 if test "x$test_cygdrive_prefix" = x; then
16185 16185 as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16186 16186 fi
16187 16187 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16188 16188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16189 16189 $as_echo_n "checking msys release... " >&6; }
16190 16190 MSYS_VERSION=`$UNAME -r`
16191 16191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16192 16192 $as_echo "$MSYS_VERSION" >&6; }
16193 16193
16194 16194 WINDOWS_ENV_VENDOR='msys'
16195 16195 WINDOWS_ENV_VERSION="$MSYS_VERSION"
16196 16196
16197 16197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16198 16198 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16199 16199 # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16200 16200 MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16201 16201
16202 16202 windows_path="$MSYS_ROOT_PATH"
16203 16203 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16204 16204 unix_path=`$CYGPATH -u "$windows_path"`
16205 16205 MSYS_ROOT_PATH="$unix_path"
16206 16206 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16207 16207 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16208 16208 MSYS_ROOT_PATH="$unix_path"
16209 16209 fi
16210 16210
16211 16211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16212 16212 $as_echo "$MSYS_ROOT_PATH" >&6; }
16213 16213 WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16214 16214 else
16215 16215 as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16216 16216 fi
16217 16217
16218 16218 # Test if windows or unix (cygwin/msys) find is first in path.
16219 16219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16220 16220 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16221 16221 FIND_BINARY_OUTPUT=`find --version 2>&1`
16222 16222 if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16223 16223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16224 16224 $as_echo "unix style" >&6; }
16225 16225 elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16226 16226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16227 16227 $as_echo "Windows" >&6; }
16228 16228 { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16229 16229 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16230 16230 { $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
16231 16231 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16232 16232 as_fn_error $? "Cannot continue" "$LINENO" 5
16233 16233 else
16234 16234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16235 16235 $as_echo "unknown" >&6; }
16236 16236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16237 16237 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16238 16238 fi
16239 16239
16240 16240 else
16241 16241 PATH_SEP=":"
16242 16242 fi
16243 16243
16244 16244
16245 16245 # We get the top-level directory from the supporting wrappers.
16246 16246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16247 16247 $as_echo_n "checking for top-level directory... " >&6; }
16248 16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16249 16249 $as_echo "$TOPDIR" >&6; }
16250 16250
16251 16251
16252 16252 # Save the original version of TOPDIR for string comparisons
16253 16253 ORIGINAL_TOPDIR="$TOPDIR"
16254 16254
16255 16255
16256 16256 # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16257 16257
16258 16258 # Only process if variable expands to non-empty
16259 16259
16260 16260 if test "x$CURDIR" != x; then
16261 16261 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16262 16262
16263 16263 # Input might be given as Windows format, start by converting to
16264 16264 # unix format.
16265 16265 path="$CURDIR"
16266 16266 new_path=`$CYGPATH -u "$path"`
16267 16267
16268 16268 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16269 16269 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16270 16270 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16271 16271 # "foo.exe" is OK but "foo" is an error.
16272 16272 #
16273 16273 # This test is therefore slightly more accurate than "test -f" to check for file precense.
16274 16274 # It is also a way to make sure we got the proper file name for the real test later on.
16275 16275 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16276 16276 if test "x$test_shortpath" = x; then
16277 16277 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16278 16278 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16279 16279 as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16280 16280 fi
16281 16281
16282 16282 # Call helper function which possibly converts this using DOS-style short mode.
16283 16283 # If so, the updated path is stored in $new_path.
16284 16284
16285 16285 input_path="$new_path"
16286 16286 # Check if we need to convert this using DOS-style short mode. If the path
16287 16287 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16288 16288 # take no chances and rewrite it.
16289 16289 # Note: m4 eats our [], so we need to use [ and ] instead.
16290 16290 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16291 16291 if test "x$has_forbidden_chars" != x; then
16292 16292 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16293 16293 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16294 16294 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16295 16295 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16296 16296 # Going to short mode and back again did indeed matter. Since short mode is
16297 16297 # case insensitive, let's make it lowercase to improve readability.
16298 16298 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16299 16299 # Now convert it back to Unix-style (cygpath)
16300 16300 input_path=`$CYGPATH -u "$shortmode_path"`
16301 16301 new_path="$input_path"
16302 16302 fi
16303 16303 fi
16304 16304
16305 16305 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16306 16306 if test "x$test_cygdrive_prefix" = x; then
16307 16307 # As a simple fix, exclude /usr/bin since it's not a real path.
16308 16308 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16309 16309 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16310 16310 # a path prefixed by /cygdrive for fixpath to work.
16311 16311 new_path="$CYGWIN_ROOT_PATH$input_path"
16312 16312 fi
16313 16313 fi
16314 16314
16315 16315
16316 16316 if test "x$path" != "x$new_path"; then
16317 16317 CURDIR="$new_path"
16318 16318 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16319 16319 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16320 16320 fi
16321 16321
16322 16322 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16323 16323
16324 16324 path="$CURDIR"
16325 16325 has_colon=`$ECHO $path | $GREP ^.:`
16326 16326 new_path="$path"
16327 16327 if test "x$has_colon" = x; then
16328 16328 # Not in mixed or Windows style, start by that.
16329 16329 new_path=`cmd //c echo $path`
16330 16330 fi
16331 16331
16332 16332
16333 16333 input_path="$new_path"
16334 16334 # Check if we need to convert this using DOS-style short mode. If the path
16335 16335 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16336 16336 # take no chances and rewrite it.
16337 16337 # Note: m4 eats our [], so we need to use [ and ] instead.
16338 16338 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16339 16339 if test "x$has_forbidden_chars" != x; then
16340 16340 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16341 16341 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16342 16342 fi
16343 16343
16344 16344
16345 16345 windows_path="$new_path"
16346 16346 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16347 16347 unix_path=`$CYGPATH -u "$windows_path"`
16348 16348 new_path="$unix_path"
16349 16349 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16350 16350 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16351 16351 new_path="$unix_path"
16352 16352 fi
16353 16353
16354 16354 if test "x$path" != "x$new_path"; then
16355 16355 CURDIR="$new_path"
16356 16356 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16357 16357 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16358 16358 fi
16359 16359
16360 16360 # Save the first 10 bytes of this path to the storage, so fixpath can work.
16361 16361 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16362 16362
16363 16363 else
16364 16364 # We're on a unix platform. Hooray! :)
16365 16365 path="$CURDIR"
16366 16366 has_space=`$ECHO "$path" | $GREP " "`
16367 16367 if test "x$has_space" != x; then
16368 16368 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16369 16369 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16370 16370 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16371 16371 fi
16372 16372
16373 16373 # Use eval to expand a potential ~
16374 16374 eval path="$path"
16375 16375 if test ! -f "$path" && test ! -d "$path"; then
16376 16376 as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16377 16377 fi
16378 16378
16379 16379 if test -d "$path"; then
16380 16380 CURDIR="`cd "$path"; $THEPWDCMD -L`"
16381 16381 else
16382 16382 dir="`$DIRNAME "$path"`"
16383 16383 base="`$BASENAME "$path"`"
16384 16384 CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16385 16385 fi
16386 16386 fi
16387 16387 fi
16388 16388
16389 16389
16390 16390 # Only process if variable expands to non-empty
16391 16391
16392 16392 if test "x$TOPDIR" != x; then
16393 16393 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16394 16394
16395 16395 # Input might be given as Windows format, start by converting to
16396 16396 # unix format.
16397 16397 path="$TOPDIR"
16398 16398 new_path=`$CYGPATH -u "$path"`
16399 16399
16400 16400 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16401 16401 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16402 16402 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16403 16403 # "foo.exe" is OK but "foo" is an error.
16404 16404 #
16405 16405 # This test is therefore slightly more accurate than "test -f" to check for file precense.
16406 16406 # It is also a way to make sure we got the proper file name for the real test later on.
16407 16407 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16408 16408 if test "x$test_shortpath" = x; then
16409 16409 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16410 16410 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16411 16411 as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16412 16412 fi
16413 16413
16414 16414 # Call helper function which possibly converts this using DOS-style short mode.
16415 16415 # If so, the updated path is stored in $new_path.
16416 16416
16417 16417 input_path="$new_path"
16418 16418 # Check if we need to convert this using DOS-style short mode. If the path
16419 16419 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16420 16420 # take no chances and rewrite it.
16421 16421 # Note: m4 eats our [], so we need to use [ and ] instead.
16422 16422 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16423 16423 if test "x$has_forbidden_chars" != x; then
16424 16424 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16425 16425 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16426 16426 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16427 16427 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16428 16428 # Going to short mode and back again did indeed matter. Since short mode is
16429 16429 # case insensitive, let's make it lowercase to improve readability.
16430 16430 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16431 16431 # Now convert it back to Unix-style (cygpath)
16432 16432 input_path=`$CYGPATH -u "$shortmode_path"`
16433 16433 new_path="$input_path"
16434 16434 fi
16435 16435 fi
16436 16436
16437 16437 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16438 16438 if test "x$test_cygdrive_prefix" = x; then
16439 16439 # As a simple fix, exclude /usr/bin since it's not a real path.
16440 16440 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16441 16441 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16442 16442 # a path prefixed by /cygdrive for fixpath to work.
16443 16443 new_path="$CYGWIN_ROOT_PATH$input_path"
16444 16444 fi
16445 16445 fi
16446 16446
16447 16447
16448 16448 if test "x$path" != "x$new_path"; then
16449 16449 TOPDIR="$new_path"
16450 16450 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16451 16451 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16452 16452 fi
16453 16453
16454 16454 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16455 16455
16456 16456 path="$TOPDIR"
16457 16457 has_colon=`$ECHO $path | $GREP ^.:`
16458 16458 new_path="$path"
16459 16459 if test "x$has_colon" = x; then
16460 16460 # Not in mixed or Windows style, start by that.
16461 16461 new_path=`cmd //c echo $path`
16462 16462 fi
16463 16463
16464 16464
16465 16465 input_path="$new_path"
16466 16466 # Check if we need to convert this using DOS-style short mode. If the path
16467 16467 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16468 16468 # take no chances and rewrite it.
16469 16469 # Note: m4 eats our [], so we need to use [ and ] instead.
16470 16470 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16471 16471 if test "x$has_forbidden_chars" != x; then
16472 16472 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16473 16473 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16474 16474 fi
16475 16475
16476 16476
16477 16477 windows_path="$new_path"
16478 16478 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16479 16479 unix_path=`$CYGPATH -u "$windows_path"`
16480 16480 new_path="$unix_path"
16481 16481 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16482 16482 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16483 16483 new_path="$unix_path"
16484 16484 fi
16485 16485
16486 16486 if test "x$path" != "x$new_path"; then
16487 16487 TOPDIR="$new_path"
16488 16488 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16489 16489 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16490 16490 fi
16491 16491
16492 16492 # Save the first 10 bytes of this path to the storage, so fixpath can work.
16493 16493 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16494 16494
16495 16495 else
16496 16496 # We're on a unix platform. Hooray! :)
16497 16497 path="$TOPDIR"
16498 16498 has_space=`$ECHO "$path" | $GREP " "`
16499 16499 if test "x$has_space" != x; then
16500 16500 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16501 16501 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16502 16502 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16503 16503 fi
16504 16504
16505 16505 # Use eval to expand a potential ~
16506 16506 eval path="$path"
16507 16507 if test ! -f "$path" && test ! -d "$path"; then
16508 16508 as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16509 16509 fi
16510 16510
16511 16511 if test -d "$path"; then
16512 16512 TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16513 16513 else
16514 16514 dir="`$DIRNAME "$path"`"
16515 16515 base="`$BASENAME "$path"`"
16516 16516 TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16517 16517 fi
16518 16518 fi
16519 16519 fi
16520 16520
16521 16521 # SRC_ROOT is a traditional alias for TOPDIR.
16522 16522 SRC_ROOT=$TOPDIR
16523 16523
16524 16524 # Calculate a canonical version of TOPDIR for string comparisons
16525 16525 CANONICAL_TOPDIR=$TOPDIR
16526 16526
16527 16527 if test "x$OPENJDK_BUILD_OS" != xwindows; then
16528 16528 # Follow a chain of symbolic links. Use readlink
16529 16529 # where it exists, else fall back to horribly
16530 16530 # complicated shell code.
16531 16531 if test "x$READLINK_TESTED" != yes; then
16532 16532 # On MacOSX there is a readlink tool with a different
16533 16533 # purpose than the GNU readlink tool. Check the found readlink.
16534 16534 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16535 16535 if test "x$ISGNU" = x; then
16536 16536 # A readlink that we do not know how to use.
16537 16537 # Are there other non-GNU readlinks out there?
16538 16538 READLINK_TESTED=yes
16539 16539 READLINK=
16540 16540 fi
16541 16541 fi
16542 16542
16543 16543 if test "x$READLINK" != x; then
16544 16544 CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16545 16545 else
16546 16546 # Save the current directory for restoring afterwards
16547 16547 STARTDIR=$PWD
16548 16548 COUNTER=0
16549 16549 sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16550 16550 sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16551 16551 cd $sym_link_dir
16552 16552 # Use -P flag to resolve symlinks in directories.
16553 16553 cd `$THEPWDCMD -P`
16554 16554 sym_link_dir=`$THEPWDCMD -P`
16555 16555 # Resolve file symlinks
16556 16556 while test $COUNTER -lt 20; do
16557 16557 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16558 16558 if test "x$ISLINK" == x; then
16559 16559 # This is not a symbolic link! We are done!
16560 16560 break
16561 16561 fi
16562 16562 # Again resolve directory symlinks since the target of the just found
16563 16563 # link could be in a different directory
16564 16564 cd `$DIRNAME $ISLINK`
16565 16565 sym_link_dir=`$THEPWDCMD -P`
16566 16566 sym_link_file=`$BASENAME $ISLINK`
16567 16567 let COUNTER=COUNTER+1
16568 16568 done
16569 16569 cd $STARTDIR
16570 16570 CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16571 16571 fi
16572 16572 fi
16573 16573
16574 16574
16575 16575
16576 16576 # Locate the directory of this script.
16577 16577 AUTOCONF_DIR=$TOPDIR/common/autoconf
16578 16578
16579 16579 # Setup username (for use in adhoc version strings etc)
16580 16580 # Outer [ ] to quote m4.
16581 16581 USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16582 16582
16583 16583
16584 16584
16585 16585 # Check if it's a pure open build or if custom sources are to be used.
16586 16586
16587 16587 # Check whether --enable-openjdk-only was given.
16588 16588 if test "${enable_openjdk_only+set}" = set; then :
16589 16589 enableval=$enable_openjdk_only;
16590 16590 else
16591 16591 enable_openjdk_only="no"
16592 16592 fi
16593 16593
16594 16594
16595 16595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16596 16596 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16597 16597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16598 16598 $as_echo "$enable_openjdk_only" >&6; }
16599 16599 if test "x$enable_openjdk_only" = "xyes"; then
16600 16600 SUPPRESS_CUSTOM_EXTENSIONS="true"
16601 16601 elif test "x$enable_openjdk_only" = "xno"; then
16602 16602 SUPPRESS_CUSTOM_EXTENSIONS="false"
16603 16603 else
16604 16604 as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16605 16605 fi
16606 16606
16607 16607 # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16608 16608 # the IncludeCustomExtension macro.
16609 16609
16610 16610
16611 16611 # Check whether --with-custom-make-dir was given.
16612 16612 if test "${with_custom_make_dir+set}" = set; then :
16613 16613 withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
16614 16614 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16615 16615 fi
16616 16616
16617 16617
16618 16618
16619 16619
16620 16620 # These are needed to be able to create a configuration name (and thus the output directory)
16621 16621
16622 16622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16623 16623 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16624 16624
16625 16625 # Check whether --with-jdk-variant was given.
16626 16626 if test "${with_jdk_variant+set}" = set; then :
16627 16627 withval=$with_jdk_variant;
16628 16628 fi
16629 16629
16630 16630
16631 16631 if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16632 16632 JDK_VARIANT="normal"
16633 16633 else
16634 16634 as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16635 16635 fi
16636 16636
16637 16637
16638 16638
16639 16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16640 16640 $as_echo "$JDK_VARIANT" >&6; }
16641 16641
16642 16642
16643 16643 DEBUG_LEVEL="release"
16644 16644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16645 16645 $as_echo_n "checking which debug level to use... " >&6; }
16646 16646 # Check whether --enable-debug was given.
16647 16647 if test "${enable_debug+set}" = set; then :
16648 16648 enableval=$enable_debug;
16649 16649 ENABLE_DEBUG="${enableval}"
16650 16650 DEBUG_LEVEL="fastdebug"
16651 16651
16652 16652 else
16653 16653 ENABLE_DEBUG="no"
16654 16654 fi
16655 16655
16656 16656
16657 16657
16658 16658 # Check whether --with-debug-level was given.
16659 16659 if test "${with_debug_level+set}" = set; then :
16660 16660 withval=$with_debug_level;
16661 16661 DEBUG_LEVEL="${withval}"
16662 16662 if test "x$ENABLE_DEBUG" = xyes; then
16663 16663 as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16664 16664 fi
16665 16665
16666 16666 fi
16667 16667
16668 16668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16669 16669 $as_echo "$DEBUG_LEVEL" >&6; }
16670 16670
16671 16671 if test "x$DEBUG_LEVEL" != xrelease && \
16672 16672 test "x$DEBUG_LEVEL" != xoptimized && \
16673 16673 test "x$DEBUG_LEVEL" != xfastdebug && \
16674 16674 test "x$DEBUG_LEVEL" != xslowdebug; then
16675 16675 as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16676 16676 fi
16677 16677
16678 16678 # Translate DEBUG_LEVEL to debug level used by Hotspot
16679 16679 HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16680 16680 if test "x$DEBUG_LEVEL" = xrelease; then
16681 16681 HOTSPOT_DEBUG_LEVEL="product"
16682 16682 elif test "x$DEBUG_LEVEL" = xslowdebug; then
16683 16683 HOTSPOT_DEBUG_LEVEL="debug"
16684 16684 fi
16685 16685
16686 16686 if test "x$DEBUG_LEVEL" = xoptimized; then
16687 16687 # The debug level 'optimized' is a little special because it is currently only
16688 16688 # applicable to the HotSpot build where it means to build a completely
16689 16689 # optimized version of the VM without any debugging code (like for the
16690 16690 # 'release' debug level which is called 'product' in the HotSpot build) but
16691 16691 # with the exception that it can contain additional code which is otherwise
16692 16692 # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16693 16693 # test new and/or experimental features which are not intended for customer
16694 16694 # shipment. Because these new features need to be tested and benchmarked in
16695 16695 # real world scenarios, we want to build the containing JDK at the 'release'
16696 16696 # debug level.
16697 16697 DEBUG_LEVEL="release"
16698 16698 fi
16699 16699
16700 16700
16701 16701
16702 16702
16703 16703
16704 16704
16705 16705 # Check whether --with-jvm-variants was given.
16706 16706 if test "${with_jvm_variants+set}" = set; then :
16707 16707 withval=$with_jvm_variants;
16708 16708 fi
16709 16709
16710 16710
16711 16711 if test "x$with_jvm_variants" = x; then
16712 16712 with_jvm_variants="server"
16713 16713 fi
16714 16714 JVM_VARIANTS_OPT="$with_jvm_variants"
16715 16715
16716 16716 # Has the user listed more than one variant?
16717 16717 # Additional [] needed to keep m4 from mangling shell constructs.
16718 16718 if [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16719 16719 BUILDING_MULTIPLE_JVM_VARIANTS=true
16720 16720 else
16721 16721 BUILDING_MULTIPLE_JVM_VARIANTS=false
16722 16722 fi
16723 16723 # Replace the commas with AND for use in the build directory name.
16724 16724 JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16725 16725
16726 16726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16727 16727 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16728 16728 # JVM_VARIANTS is a space-separated list.
16729 16729 # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16730 16730 JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16731 16731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16732 16732 $as_echo "$JVM_VARIANTS" >&6; }
16733 16733
16734 16734 # Check that the selected variants are valid
16735 16735
16736 16736 # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16737 16737 # Notice that the original variant failes on SLES 10 and 11
16738 16738 NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16739 16739 STACK=${JVM_VARIANTS// /$'\n'}
16740 16740 INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16741 16741 if test "x$INVALID_VARIANTS" != x; then
16742 16742 { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16743 16743 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16744 16744 as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16745 16745 fi
16746 16746
16747 16747 # All "special" variants share the same output directory ("server")
16748 16748 VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16749 16749 NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16750 16750 STACK=${JVM_VARIANTS// /$'\n'}
16751 16751 INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16752 16752 if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16753 16753 as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16754 16754 fi
16755 16755
16756 16756
16757 16757
16758 16758
16759 16759 if [[ " $JVM_VARIANTS " =~ " zero " ]] || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
16760 16760 # zero behaves as a platform and rewrites these values. This is really weird. :(
16761 16761 # We are guaranteed that we do not build any other variants when building zero.
16762 16762 HOTSPOT_TARGET_CPU=zero
16763 16763 HOTSPOT_TARGET_CPU_ARCH=zero
16764 16764 fi
16765 16765
16766 16766
16767 16767 # With basic setup done, call the custom early hook.
16768 16768
16769 16769
16770 16770 # Check if we have devkits, extra paths or sysroot set.
16771 16771
16772 16772
16773 16773 # Check whether --with-devkit was given.
16774 16774 if test "${with_devkit+set}" = set; then :
16775 16775 withval=$with_devkit;
16776 16776
16777 16777 # Only process if variable expands to non-empty
16778 16778
16779 16779 if test "x$with_devkit" != x; then
16780 16780 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16781 16781
16782 16782 # Input might be given as Windows format, start by converting to
16783 16783 # unix format.
16784 16784 path="$with_devkit"
16785 16785 new_path=`$CYGPATH -u "$path"`
16786 16786
16787 16787 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16788 16788 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16789 16789 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16790 16790 # "foo.exe" is OK but "foo" is an error.
16791 16791 #
16792 16792 # This test is therefore slightly more accurate than "test -f" to check for file precense.
16793 16793 # It is also a way to make sure we got the proper file name for the real test later on.
16794 16794 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16795 16795 if test "x$test_shortpath" = x; then
16796 16796 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16797 16797 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16798 16798 as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16799 16799 fi
16800 16800
16801 16801 # Call helper function which possibly converts this using DOS-style short mode.
16802 16802 # If so, the updated path is stored in $new_path.
16803 16803
16804 16804 input_path="$new_path"
16805 16805 # Check if we need to convert this using DOS-style short mode. If the path
16806 16806 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16807 16807 # take no chances and rewrite it.
16808 16808 # Note: m4 eats our [], so we need to use [ and ] instead.
16809 16809 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16810 16810 if test "x$has_forbidden_chars" != x; then
16811 16811 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16812 16812 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16813 16813 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16814 16814 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16815 16815 # Going to short mode and back again did indeed matter. Since short mode is
16816 16816 # case insensitive, let's make it lowercase to improve readability.
16817 16817 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16818 16818 # Now convert it back to Unix-style (cygpath)
16819 16819 input_path=`$CYGPATH -u "$shortmode_path"`
16820 16820 new_path="$input_path"
16821 16821 fi
16822 16822 fi
16823 16823
16824 16824 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16825 16825 if test "x$test_cygdrive_prefix" = x; then
16826 16826 # As a simple fix, exclude /usr/bin since it's not a real path.
16827 16827 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16828 16828 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16829 16829 # a path prefixed by /cygdrive for fixpath to work.
16830 16830 new_path="$CYGWIN_ROOT_PATH$input_path"
16831 16831 fi
16832 16832 fi
16833 16833
16834 16834
16835 16835 if test "x$path" != "x$new_path"; then
16836 16836 with_devkit="$new_path"
16837 16837 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16838 16838 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16839 16839 fi
16840 16840
16841 16841 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16842 16842
16843 16843 path="$with_devkit"
16844 16844 has_colon=`$ECHO $path | $GREP ^.:`
16845 16845 new_path="$path"
16846 16846 if test "x$has_colon" = x; then
16847 16847 # Not in mixed or Windows style, start by that.
16848 16848 new_path=`cmd //c echo $path`
16849 16849 fi
16850 16850
16851 16851
16852 16852 input_path="$new_path"
16853 16853 # Check if we need to convert this using DOS-style short mode. If the path
16854 16854 # contains just simple characters, use it. Otherwise (spaces, weird characters),
16855 16855 # take no chances and rewrite it.
16856 16856 # Note: m4 eats our [], so we need to use [ and ] instead.
16857 16857 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16858 16858 if test "x$has_forbidden_chars" != x; then
16859 16859 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16860 16860 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16861 16861 fi
16862 16862
16863 16863
16864 16864 windows_path="$new_path"
16865 16865 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866 16866 unix_path=`$CYGPATH -u "$windows_path"`
16867 16867 new_path="$unix_path"
16868 16868 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16869 16869 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16870 16870 new_path="$unix_path"
16871 16871 fi
16872 16872
16873 16873 if test "x$path" != "x$new_path"; then
16874 16874 with_devkit="$new_path"
16875 16875 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16876 16876 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16877 16877 fi
16878 16878
16879 16879 # Save the first 10 bytes of this path to the storage, so fixpath can work.
16880 16880 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16881 16881
16882 16882 else
16883 16883 # We're on a unix platform. Hooray! :)
16884 16884 path="$with_devkit"
16885 16885 has_space=`$ECHO "$path" | $GREP " "`
16886 16886 if test "x$has_space" != x; then
16887 16887 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16888 16888 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16889 16889 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16890 16890 fi
16891 16891
16892 16892 # Use eval to expand a potential ~
16893 16893 eval path="$path"
16894 16894 if test ! -f "$path" && test ! -d "$path"; then
16895 16895 as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16896 16896 fi
16897 16897
16898 16898 if test -d "$path"; then
16899 16899 with_devkit="`cd "$path"; $THEPWDCMD -L`"
16900 16900 else
16901 16901 dir="`$DIRNAME "$path"`"
16902 16902 base="`$BASENAME "$path"`"
16903 16903 with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16904 16904 fi
16905 16905 fi
16906 16906 fi
16907 16907
16908 16908 DEVKIT_ROOT="$with_devkit"
16909 16909 # Check for a meta data info file in the root of the devkit
16910 16910 if test -f "$DEVKIT_ROOT/devkit.info"; then
16911 16911 . $DEVKIT_ROOT/devkit.info
16912 16912 # This potentially sets the following:
16913 16913 # A descriptive name of the devkit
16914 16914
16915 16915 if test "x$DEVKIT_NAME" = x; then
16916 16916 eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16917 16917 fi
16918 16918
16919 16919 # Corresponds to --with-extra-path
16920 16920
16921 16921 if test "x$DEVKIT_EXTRA_PATH" = x; then
16922 16922 eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16923 16923 fi
16924 16924
16925 16925 # Corresponds to --with-toolchain-path
16926 16926
16927 16927 if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16928 16928 eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16929 16929 fi
16930 16930
16931 16931 # Corresponds to --with-sysroot
16932 16932
16933 16933 if test "x$DEVKIT_SYSROOT" = x; then
16934 16934 eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16935 16935 fi
16936 16936
16937 16937
16938 16938 # Identifies the Visual Studio version in the devkit
16939 16939
16940 16940 if test "x$DEVKIT_VS_VERSION" = x; then
16941 16941 eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16942 16942 fi
16943 16943
16944 16944 # The Visual Studio include environment variable
16945 16945
16946 16946 if test "x$DEVKIT_VS_INCLUDE" = x; then
16947 16947 eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16948 16948 fi
16949 16949
16950 16950 # The Visual Studio lib environment variable
16951 16951
16952 16952 if test "x$DEVKIT_VS_LIB" = x; then
16953 16953 eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16954 16954 fi
16955 16955
16956 16956 # Corresponds to --with-msvcr-dll
16957 16957
16958 16958 if test "x$DEVKIT_MSVCR_DLL" = x; then
16959 16959 eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16960 16960 fi
16961 16961
16962 16962 # Corresponds to --with-msvcp-dll
16963 16963
16964 16964 if test "x$DEVKIT_MSVCP_DLL" = x; then
16965 16965 eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16966 16966 fi
16967 16967
16968 16968 fi
16969 16969
16970 16970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16971 16971 $as_echo_n "checking for devkit... " >&6; }
16972 16972 if test "x$DEVKIT_NAME" != x; then
16973 16973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16974 16974 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16975 16975 else
16976 16976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16977 16977 $as_echo "$DEVKIT_ROOT" >&6; }
16978 16978 fi
16979 16979
16980 16980
16981 16981 if test "x$DEVKIT_EXTRA_PATH" != x; then
16982 16982 if test "x$EXTRA_PATH" = x; then
16983 16983 EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16984 16984 else
16985 16985 EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16986 16986 fi
16987 16987 fi
16988 16988
16989 16989
16990 16990 # Fallback default of just /bin if DEVKIT_PATH is not defined
16991 16991 if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16992 16992 DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16993 16993 fi
16994 16994
16995 16995 if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16996 16996 if test "x$TOOLCHAIN_PATH" = x; then
16997 16997 TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16998 16998 else
16999 16999 TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17000 17000 fi
17001 17001 fi
17002 17002
17003 17003
17004 17004 # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17005 17005 # places for backwards compatiblity.
17006 17006 if test "x$DEVKIT_SYSROOT" != x; then
17007 17007 SYSROOT="$DEVKIT_SYSROOT"
17008 17008 elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17009 17009 SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17010 17010 elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17011 17011 SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17012 17012 fi
17013 17013
17014 17014
17015 17015 fi
17016 17016
17017 17017
17018 17018 # You can force the sysroot if the sysroot encoded into the compiler tools
17019 17019 # is not correct.
17020 17020
17021 17021 # Check whether --with-sys-root was given.
17022 17022 if test "${with_sys_root+set}" = set; then :
17023 17023 withval=$with_sys_root; SYSROOT=$with_sys_root
17024 17024
17025 17025 fi
17026 17026
17027 17027
17028 17028
17029 17029 # Check whether --with-sysroot was given.
17030 17030 if test "${with_sysroot+set}" = set; then :
17031 17031 withval=$with_sysroot; SYSROOT=$with_sysroot
17032 17032
17033 17033 fi
17034 17034
17035 17035
17036 17036
17037 17037 # Check whether --with-tools-dir was given.
17038 17038 if test "${with_tools_dir+set}" = set; then :
17039 17039 withval=$with_tools_dir;
17040 17040 if test "x$with_tools_dir" != x; then
17041 17041 if test "x$TOOLCHAIN_PATH" = x; then
17042 17042 TOOLCHAIN_PATH="$with_tools_dir"
17043 17043 else
17044 17044 TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17045 17045 fi
17046 17046 fi
17047 17047
17048 17048
17049 17049 fi
17050 17050
17051 17051
17052 17052
17053 17053 # Check whether --with-toolchain-path was given.
17054 17054 if test "${with_toolchain_path+set}" = set; then :
17055 17055 withval=$with_toolchain_path;
17056 17056 if test "x$with_toolchain_path" != x; then
17057 17057 if test "x$TOOLCHAIN_PATH" = x; then
17058 17058 TOOLCHAIN_PATH="$with_toolchain_path"
17059 17059 else
17060 17060 TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17061 17061 fi
17062 17062 fi
17063 17063
17064 17064
17065 17065 fi
17066 17066
17067 17067
17068 17068
17069 17069 # Check whether --with-extra-path was given.
17070 17070 if test "${with_extra_path+set}" = set; then :
17071 17071 withval=$with_extra_path;
17072 17072 if test "x$with_extra_path" != x; then
17073 17073 if test "x$EXTRA_PATH" = x; then
17074 17074 EXTRA_PATH="$with_extra_path"
17075 17075 else
17076 17076 EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17077 17077 fi
17078 17078 fi
17079 17079
17080 17080
17081 17081 fi
17082 17082
17083 17083
17084 17084 if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17085 17085 # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17086 17086 # If not, detect if Xcode is installed by running xcodebuild -version
17087 17087 # if no Xcode installed, xcodebuild exits with 1
17088 17088 # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17089 17089 if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17090 17090 # We need to use xcodebuild in the toolchain dir provided by the user, this will
17091 17091 # fall back on the stub binary in /usr/bin/xcodebuild
17092 17092 # Extract the first word of "xcodebuild", so it can be a program name with args.
17093 17093 set dummy xcodebuild; ac_word=$2
17094 17094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17095 17095 $as_echo_n "checking for $ac_word... " >&6; }
17096 17096 if ${ac_cv_path_XCODEBUILD+:} false; then :
17097 17097 $as_echo_n "(cached) " >&6
17098 17098 else
17099 17099 case $XCODEBUILD in
17100 17100 [\\/]* | ?:[\\/]*)
17101 17101 ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17102 17102 ;;
17103 17103 *)
17104 17104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17105 17105 for as_dir in $TOOLCHAIN_PATH
17106 17106 do
17107 17107 IFS=$as_save_IFS
17108 17108 test -z "$as_dir" && as_dir=.
17109 17109 for ac_exec_ext in '' $ac_executable_extensions; do
17110 17110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17111 17111 ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17112 17112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17113 17113 break 2
17114 17114 fi
17115 17115 done
17116 17116 done
17117 17117 IFS=$as_save_IFS
17118 17118
17119 17119 test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17120 17120 ;;
17121 17121 esac
17122 17122 fi
17123 17123 XCODEBUILD=$ac_cv_path_XCODEBUILD
17124 17124 if test -n "$XCODEBUILD"; then
17125 17125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17126 17126 $as_echo "$XCODEBUILD" >&6; }
17127 17127 else
17128 17128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17129 17129 $as_echo "no" >&6; }
17130 17130 fi
17131 17131
17132 17132
17133 17133 else
17134 17134 # this should result in SYSROOT being empty, unless --with-sysroot is provided
17135 17135 # when only the command line tools are installed there are no SDKs, so headers
17136 17136 # are copied into the system frameworks
17137 17137 XCODEBUILD=
17138 17138
17139 17139 fi
17140 17140
17141 17141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17142 17142 $as_echo_n "checking for sdk name... " >&6; }
17143 17143
17144 17144 # Check whether --with-sdk-name was given.
17145 17145 if test "${with_sdk_name+set}" = set; then :
17146 17146 withval=$with_sdk_name; SDKNAME=$with_sdk_name
17147 17147
17148 17148 fi
17149 17149
17150 17150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17151 17151 $as_echo "$SDKNAME" >&6; }
17152 17152
17153 17153 # if toolchain path is specified then don't rely on system headers, they may not compile
17154 17154 HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17155 17155 test -z "$TOOLCHAIN_PATH" && \
17156 17156 HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17157 17157
17158 17158 if test -z "$SYSROOT"; then
17159 17159 if test -n "$XCODEBUILD"; then
17160 17160 # if we don't have system headers, use default SDK name (last resort)
17161 17161 if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17162 17162 SDKNAME=${SDKNAME:-macosx}
17163 17163 fi
17164 17164
17165 17165 if test -n "$SDKNAME"; then
17166 17166 # Call xcodebuild to determine SYSROOT
17167 17167 SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17168 17168 fi
17169 17169 else
17170 17170 if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17171 17171 as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
17172 17172 fi
17173 17173 fi
17174 17174 else
17175 17175 # warn user if --with-sdk-name was also set
17176 17176 if test -n "$with_sdk_name"; then
17177 17177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17178 17178 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17179 17179 fi
17180 17180 fi
17181 17181
17182 17182 if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17183 17183 # If no system framework headers, then SYSROOT must be set, or we won't build
17184 17184 as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
17185 17185 fi
17186 17186
17187 17187 # Perform a basic sanity test
17188 17188 if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17189 17189 if test -z "$SYSROOT"; then
17190 17190 as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
17191 17191 else
17192 17192 as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17193 17193 fi
17194 17194 fi
17195 17195
17196 17196 # set SDKROOT too, Xcode tools will pick it up
17197 17197 SDKROOT=$SYSROOT
17198 17198
17199 17199 fi
17200 17200
17201 17201 # Prepend the extra path to the global path
↓ open down ↓ |
12093 lines elided |
↑ open up ↑ |
17202 17202
17203 17203 if test "x$EXTRA_PATH" != x; then
17204 17204 if test "x$PATH" = x; then
17205 17205 PATH="$EXTRA_PATH"
17206 17206 else
17207 17207 PATH="$EXTRA_PATH:$PATH"
17208 17208 fi
17209 17209 fi
17210 17210
17211 17211
17212 - if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17213 - # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17214 - PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17215 - fi
17216 -
17217 17212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17218 17213 $as_echo_n "checking for sysroot... " >&6; }
17219 17214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17220 17215 $as_echo "$SYSROOT" >&6; }
17221 17216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17222 17217 $as_echo_n "checking for toolchain path... " >&6; }
17223 17218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17224 17219 $as_echo "$TOOLCHAIN_PATH" >&6; }
17225 17220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17226 17221 $as_echo_n "checking for extra path... " >&6; }
17227 17222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17228 17223 $as_echo "$EXTRA_PATH" >&6; }
17229 17224
17230 17225
17231 17226 # To properly create a configuration name, we need to have the OpenJDK target
17232 17227 # and options (variants and debug level) parsed.
17233 17228
17234 17229
17235 17230
17236 17231 # Check whether --with-conf-name was given.
17237 17232 if test "${with_conf_name+set}" = set; then :
17238 17233 withval=$with_conf_name; CONF_NAME=${with_conf_name}
17239 17234 fi
17240 17235
17241 17236
17242 17237 # Test from where we are running configure, in or outside of src root.
17243 17238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17244 17239 $as_echo_n "checking where to store configuration... " >&6; }
17245 17240 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17246 17241 || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17247 17242 || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17248 17243 # We are running configure from the src root.
17249 17244 # Create a default ./build/target-variant-debuglevel output root.
17250 17245 if test "x${CONF_NAME}" = x; then
17251 17246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17252 17247 $as_echo "in default location" >&6; }
17253 17248 CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17254 17249 else
17255 17250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17256 17251 $as_echo "in build directory with custom name" >&6; }
17257 17252 fi
17258 17253 OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17259 17254 $MKDIR -p "$OUTPUT_ROOT"
17260 17255 if test ! -d "$OUTPUT_ROOT"; then
17261 17256 as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17262 17257 fi
17263 17258 else
17264 17259 # We are running configure from outside of the src dir.
17265 17260 # Then use the current directory as output dir!
17266 17261 # If configuration is situated in normal build directory, just use the build
17267 17262 # directory name as configuration name, otherwise use the complete path.
17268 17263 if test "x${CONF_NAME}" = x; then
17269 17264 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17270 17265 fi
17271 17266 OUTPUT_ROOT="$CURDIR"
17272 17267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17273 17268 $as_echo "in current directory" >&6; }
17274 17269
17275 17270 # WARNING: This might be a bad thing to do. You need to be sure you want to
17276 17271 # have a configuration in this directory. Do some sanity checks!
17277 17272
17278 17273 if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17279 17274 # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17280 17275 # other files
17281 17276 files_present=`$LS $OUTPUT_ROOT`
17282 17277 # Configure has already touched config.log and confdefs.h in the current dir when this check
17283 17278 # is performed.
17284 17279 filtered_files=`$ECHO "$files_present" \
17285 17280 | $SED -e 's/config.log//g' \
17286 17281 -e 's/configure.log//g' \
17287 17282 -e 's/confdefs.h//g' \
17288 17283 -e 's/ //g' \
17289 17284 | $TR -d '\n'`
17290 17285 if test "x$filtered_files" != x; then
17291 17286 { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17292 17287 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17293 17288 { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17294 17289 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17295 17290 { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17296 17291 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17297 17292 { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17298 17293 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17299 17294 { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17300 17295 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17301 17296 { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17302 17297 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17303 17298 { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17304 17299 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17305 17300 as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17306 17301 fi
17307 17302 fi
17308 17303 fi
17309 17304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17310 17305 $as_echo_n "checking what configuration name to use... " >&6; }
17311 17306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17312 17307 $as_echo "$CONF_NAME" >&6; }
17313 17308
17314 17309
17315 17310 # Only process if variable expands to non-empty
17316 17311
17317 17312 if test "x$OUTPUT_ROOT" != x; then
17318 17313 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17319 17314
17320 17315 # Input might be given as Windows format, start by converting to
17321 17316 # unix format.
17322 17317 path="$OUTPUT_ROOT"
17323 17318 new_path=`$CYGPATH -u "$path"`
17324 17319
17325 17320 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17326 17321 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17327 17322 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17328 17323 # "foo.exe" is OK but "foo" is an error.
17329 17324 #
17330 17325 # This test is therefore slightly more accurate than "test -f" to check for file precense.
17331 17326 # It is also a way to make sure we got the proper file name for the real test later on.
17332 17327 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17333 17328 if test "x$test_shortpath" = x; then
17334 17329 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17335 17330 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17336 17331 as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17337 17332 fi
17338 17333
17339 17334 # Call helper function which possibly converts this using DOS-style short mode.
17340 17335 # If so, the updated path is stored in $new_path.
17341 17336
17342 17337 input_path="$new_path"
17343 17338 # Check if we need to convert this using DOS-style short mode. If the path
17344 17339 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17345 17340 # take no chances and rewrite it.
17346 17341 # Note: m4 eats our [], so we need to use [ and ] instead.
17347 17342 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17348 17343 if test "x$has_forbidden_chars" != x; then
17349 17344 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17350 17345 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17351 17346 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17352 17347 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17353 17348 # Going to short mode and back again did indeed matter. Since short mode is
17354 17349 # case insensitive, let's make it lowercase to improve readability.
17355 17350 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17356 17351 # Now convert it back to Unix-style (cygpath)
17357 17352 input_path=`$CYGPATH -u "$shortmode_path"`
17358 17353 new_path="$input_path"
17359 17354 fi
17360 17355 fi
17361 17356
17362 17357 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17363 17358 if test "x$test_cygdrive_prefix" = x; then
17364 17359 # As a simple fix, exclude /usr/bin since it's not a real path.
17365 17360 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17366 17361 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17367 17362 # a path prefixed by /cygdrive for fixpath to work.
17368 17363 new_path="$CYGWIN_ROOT_PATH$input_path"
17369 17364 fi
17370 17365 fi
17371 17366
17372 17367
17373 17368 if test "x$path" != "x$new_path"; then
17374 17369 OUTPUT_ROOT="$new_path"
17375 17370 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17376 17371 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17377 17372 fi
17378 17373
17379 17374 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17380 17375
17381 17376 path="$OUTPUT_ROOT"
17382 17377 has_colon=`$ECHO $path | $GREP ^.:`
17383 17378 new_path="$path"
17384 17379 if test "x$has_colon" = x; then
17385 17380 # Not in mixed or Windows style, start by that.
17386 17381 new_path=`cmd //c echo $path`
17387 17382 fi
17388 17383
17389 17384
17390 17385 input_path="$new_path"
17391 17386 # Check if we need to convert this using DOS-style short mode. If the path
17392 17387 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17393 17388 # take no chances and rewrite it.
17394 17389 # Note: m4 eats our [], so we need to use [ and ] instead.
17395 17390 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17396 17391 if test "x$has_forbidden_chars" != x; then
17397 17392 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17398 17393 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17399 17394 fi
17400 17395
17401 17396
17402 17397 windows_path="$new_path"
17403 17398 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17404 17399 unix_path=`$CYGPATH -u "$windows_path"`
17405 17400 new_path="$unix_path"
17406 17401 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17407 17402 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17408 17403 new_path="$unix_path"
17409 17404 fi
17410 17405
17411 17406 if test "x$path" != "x$new_path"; then
17412 17407 OUTPUT_ROOT="$new_path"
17413 17408 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17414 17409 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17415 17410 fi
17416 17411
17417 17412 # Save the first 10 bytes of this path to the storage, so fixpath can work.
17418 17413 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17419 17414
17420 17415 else
17421 17416 # We're on a unix platform. Hooray! :)
17422 17417 path="$OUTPUT_ROOT"
17423 17418 has_space=`$ECHO "$path" | $GREP " "`
17424 17419 if test "x$has_space" != x; then
17425 17420 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17426 17421 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17427 17422 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17428 17423 fi
17429 17424
17430 17425 # Use eval to expand a potential ~
17431 17426 eval path="$path"
17432 17427 if test ! -f "$path" && test ! -d "$path"; then
17433 17428 as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17434 17429 fi
17435 17430
17436 17431 if test -d "$path"; then
17437 17432 OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17438 17433 else
17439 17434 dir="`$DIRNAME "$path"`"
17440 17435 base="`$BASENAME "$path"`"
17441 17436 OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17442 17437 fi
17443 17438 fi
17444 17439 fi
17445 17440
17446 17441
17447 17442 CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17448 17443 $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17449 17444
17450 17445 SPEC=$OUTPUT_ROOT/spec.gmk
17451 17446
17452 17447 CONF_NAME=$CONF_NAME
17453 17448
17454 17449 OUTPUT_ROOT=$OUTPUT_ROOT
17455 17450
17456 17451
17457 17452
17458 17453 # The spec.gmk file contains all variables for the make system.
17459 17454 ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17460 17455
17461 17456 # The bootcycle-spec.gmk file contains support for boot cycle builds.
17462 17457 ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17463 17458
17464 17459 # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17465 17460 ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17466 17461
17467 17462 # The compare.sh is used to compare the build output to other builds.
17468 17463 ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17469 17464
17470 17465 # The generated Makefile knows where the spec.gmk is and where the source is.
17471 17466 # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17472 17467 # which will look for generated configurations
17473 17468 ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17474 17469
17475 17470
17476 17471
17477 17472 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17478 17473
17479 17474 for ac_prog in apt-get yum port pkgutil pkgadd
17480 17475 do
17481 17476 # Extract the first word of "$ac_prog", so it can be a program name with args.
17482 17477 set dummy $ac_prog; ac_word=$2
17483 17478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17484 17479 $as_echo_n "checking for $ac_word... " >&6; }
17485 17480 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17486 17481 $as_echo_n "(cached) " >&6
17487 17482 else
17488 17483 if test -n "$PKGHANDLER"; then
17489 17484 ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17490 17485 else
17491 17486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17492 17487 for as_dir in $PATH
17493 17488 do
17494 17489 IFS=$as_save_IFS
17495 17490 test -z "$as_dir" && as_dir=.
17496 17491 for ac_exec_ext in '' $ac_executable_extensions; do
17497 17492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17498 17493 ac_cv_prog_PKGHANDLER="$ac_prog"
17499 17494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17500 17495 break 2
17501 17496 fi
17502 17497 done
17503 17498 done
17504 17499 IFS=$as_save_IFS
17505 17500
17506 17501 fi
17507 17502 fi
17508 17503 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17509 17504 if test -n "$PKGHANDLER"; then
17510 17505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17511 17506 $as_echo "$PKGHANDLER" >&6; }
17512 17507 else
17513 17508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17514 17509 $as_echo "no" >&6; }
17515 17510 fi
17516 17511
17517 17512
17518 17513 test -n "$PKGHANDLER" && break
17519 17514 done
17520 17515
17521 17516
17522 17517
17523 17518 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17524 17519
17525 17520
17526 17521
17527 17522 # Publish this variable in the help.
17528 17523
17529 17524
17530 17525 if [ -z "${MAKE+x}" ]; then
17531 17526 # The variable is not set by user, try to locate tool using the code snippet
17532 17527
17533 17528 # Try our hardest to locate a correct version of GNU make
17534 17529 for ac_prog in gmake
17535 17530 do
17536 17531 # Extract the first word of "$ac_prog", so it can be a program name with args.
17537 17532 set dummy $ac_prog; ac_word=$2
17538 17533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17539 17534 $as_echo_n "checking for $ac_word... " >&6; }
17540 17535 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17541 17536 $as_echo_n "(cached) " >&6
17542 17537 else
17543 17538 case $CHECK_GMAKE in
17544 17539 [\\/]* | ?:[\\/]*)
17545 17540 ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17546 17541 ;;
17547 17542 *)
17548 17543 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17549 17544 for as_dir in $PATH
17550 17545 do
17551 17546 IFS=$as_save_IFS
17552 17547 test -z "$as_dir" && as_dir=.
17553 17548 for ac_exec_ext in '' $ac_executable_extensions; do
17554 17549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17555 17550 ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17556 17551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17557 17552 break 2
17558 17553 fi
17559 17554 done
17560 17555 done
17561 17556 IFS=$as_save_IFS
17562 17557
17563 17558 ;;
17564 17559 esac
17565 17560 fi
17566 17561 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17567 17562 if test -n "$CHECK_GMAKE"; then
17568 17563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17569 17564 $as_echo "$CHECK_GMAKE" >&6; }
17570 17565 else
17571 17566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17572 17567 $as_echo "no" >&6; }
17573 17568 fi
17574 17569
17575 17570
17576 17571 test -n "$CHECK_GMAKE" && break
17577 17572 done
17578 17573
17579 17574
17580 17575 MAKE_CANDIDATE=""$CHECK_GMAKE""
17581 17576 DESCRIPTION="gmake in PATH"
17582 17577
17583 17578 # On Cygwin, we require a newer version of make than on other platforms
17584 17579 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17585 17580 MAKE_VERSION_EXPR="-e 4\."
17586 17581 MAKE_REQUIRED_VERSION="4.0"
17587 17582 else
17588 17583 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17589 17584 MAKE_REQUIRED_VERSION="3.81"
17590 17585 fi
17591 17586
17592 17587 if test "x$MAKE_CANDIDATE" != x; then
17593 17588 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17594 17589 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17595 17590 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17596 17591 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17597 17592 if test "x$IS_GNU_MAKE" = x; then
17598 17593 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17599 17594 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17600 17595 else
17601 17596 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17602 17597 if test "x$IS_MODERN_MAKE" = x; then
17603 17598 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17604 17599 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17605 17600 else
17606 17601 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17607 17602 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17608 17603 MAKE_EXPECTED_ENV='cygwin'
17609 17604 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17610 17605 MAKE_EXPECTED_ENV='msys'
17611 17606 else
17612 17607 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17613 17608 fi
17614 17609 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17615 17610 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17616 17611 else
17617 17612 # Not relevant for non-Windows
17618 17613 IS_MAKE_CORRECT_ENV=true
17619 17614 fi
17620 17615 if test "x$IS_MAKE_CORRECT_ENV" = x; then
17621 17616 { $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
17622 17617 $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;}
17623 17618 else
17624 17619 FOUND_MAKE=$MAKE_CANDIDATE
17625 17620
17626 17621 # Only process if variable expands to non-empty
17627 17622
17628 17623 if test "x$FOUND_MAKE" != x; then
17629 17624 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17630 17625
17631 17626 # First separate the path from the arguments. This will split at the first
17632 17627 # space.
17633 17628 complete="$FOUND_MAKE"
17634 17629 path="${complete%% *}"
17635 17630 tmp="$complete EOL"
17636 17631 arguments="${tmp#* }"
17637 17632
17638 17633 # Input might be given as Windows format, start by converting to
17639 17634 # unix format.
17640 17635 new_path=`$CYGPATH -u "$path"`
17641 17636
17642 17637 # Now try to locate executable using which
17643 17638 new_path=`$WHICH "$new_path" 2> /dev/null`
17644 17639 # bat and cmd files are not always considered executable in cygwin causing which
17645 17640 # to not find them
17646 17641 if test "x$new_path" = x \
17647 17642 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17648 17643 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17649 17644 new_path=`$CYGPATH -u "$path"`
17650 17645 fi
17651 17646 if test "x$new_path" = x; then
17652 17647 # Oops. Which didn't find the executable.
17653 17648 # The splitting of arguments from the executable at a space might have been incorrect,
17654 17649 # since paths with space are more likely in Windows. Give it another try with the whole
17655 17650 # argument.
17656 17651 path="$complete"
17657 17652 arguments="EOL"
17658 17653 new_path=`$CYGPATH -u "$path"`
17659 17654 new_path=`$WHICH "$new_path" 2> /dev/null`
17660 17655 # bat and cmd files are not always considered executable in cygwin causing which
17661 17656 # to not find them
17662 17657 if test "x$new_path" = x \
17663 17658 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17664 17659 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17665 17660 new_path=`$CYGPATH -u "$path"`
17666 17661 fi
17667 17662 if test "x$new_path" = x; then
17668 17663 # It's still not found. Now this is an unrecoverable error.
17669 17664 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17670 17665 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17671 17666 has_space=`$ECHO "$complete" | $GREP " "`
17672 17667 if test "x$has_space" != x; then
17673 17668 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17674 17669 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17675 17670 fi
17676 17671 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17677 17672 fi
17678 17673 fi
17679 17674
17680 17675 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17681 17676 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17682 17677 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17683 17678 # "foo.exe" is OK but "foo" is an error.
17684 17679 #
17685 17680 # This test is therefore slightly more accurate than "test -f" to check for file presence.
17686 17681 # It is also a way to make sure we got the proper file name for the real test later on.
17687 17682 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17688 17683 if test "x$test_shortpath" = x; then
17689 17684 # Short path failed, file does not exist as specified.
17690 17685 # Try adding .exe or .cmd
17691 17686 if test -f "${new_path}.exe"; then
17692 17687 input_to_shortpath="${new_path}.exe"
17693 17688 elif test -f "${new_path}.cmd"; then
17694 17689 input_to_shortpath="${new_path}.cmd"
17695 17690 else
17696 17691 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17697 17692 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17698 17693 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17699 17694 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17700 17695 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17701 17696 fi
17702 17697 else
17703 17698 input_to_shortpath="$new_path"
17704 17699 fi
17705 17700
17706 17701 # Call helper function which possibly converts this using DOS-style short mode.
17707 17702 # If so, the updated path is stored in $new_path.
17708 17703 new_path="$input_to_shortpath"
17709 17704
17710 17705 input_path="$input_to_shortpath"
17711 17706 # Check if we need to convert this using DOS-style short mode. If the path
17712 17707 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17713 17708 # take no chances and rewrite it.
17714 17709 # Note: m4 eats our [], so we need to use [ and ] instead.
17715 17710 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17716 17711 if test "x$has_forbidden_chars" != x; then
17717 17712 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17718 17713 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17719 17714 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17720 17715 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17721 17716 # Going to short mode and back again did indeed matter. Since short mode is
17722 17717 # case insensitive, let's make it lowercase to improve readability.
17723 17718 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17724 17719 # Now convert it back to Unix-style (cygpath)
17725 17720 input_path=`$CYGPATH -u "$shortmode_path"`
17726 17721 new_path="$input_path"
17727 17722 fi
17728 17723 fi
17729 17724
17730 17725 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17731 17726 if test "x$test_cygdrive_prefix" = x; then
17732 17727 # As a simple fix, exclude /usr/bin since it's not a real path.
17733 17728 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17734 17729 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17735 17730 # a path prefixed by /cygdrive for fixpath to work.
17736 17731 new_path="$CYGWIN_ROOT_PATH$input_path"
17737 17732 fi
17738 17733 fi
17739 17734
17740 17735 # remove trailing .exe if any
17741 17736 new_path="${new_path/%.exe/}"
17742 17737
17743 17738 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17744 17739
17745 17740 # First separate the path from the arguments. This will split at the first
17746 17741 # space.
17747 17742 complete="$FOUND_MAKE"
17748 17743 path="${complete%% *}"
17749 17744 tmp="$complete EOL"
17750 17745 arguments="${tmp#* }"
17751 17746
17752 17747 # Input might be given as Windows format, start by converting to
17753 17748 # unix format.
17754 17749 new_path="$path"
17755 17750
17756 17751 windows_path="$new_path"
17757 17752 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17758 17753 unix_path=`$CYGPATH -u "$windows_path"`
17759 17754 new_path="$unix_path"
17760 17755 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17761 17756 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17762 17757 new_path="$unix_path"
17763 17758 fi
17764 17759
17765 17760
17766 17761 # Now try to locate executable using which
17767 17762 new_path=`$WHICH "$new_path" 2> /dev/null`
17768 17763
17769 17764 if test "x$new_path" = x; then
17770 17765 # Oops. Which didn't find the executable.
17771 17766 # The splitting of arguments from the executable at a space might have been incorrect,
17772 17767 # since paths with space are more likely in Windows. Give it another try with the whole
17773 17768 # argument.
17774 17769 path="$complete"
17775 17770 arguments="EOL"
17776 17771 new_path="$path"
17777 17772
17778 17773 windows_path="$new_path"
17779 17774 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17780 17775 unix_path=`$CYGPATH -u "$windows_path"`
17781 17776 new_path="$unix_path"
17782 17777 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17783 17778 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17784 17779 new_path="$unix_path"
17785 17780 fi
17786 17781
17787 17782
17788 17783 new_path=`$WHICH "$new_path" 2> /dev/null`
17789 17784 # bat and cmd files are not always considered executable in MSYS causing which
17790 17785 # to not find them
17791 17786 if test "x$new_path" = x \
17792 17787 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17793 17788 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17794 17789 new_path="$path"
17795 17790
17796 17791 windows_path="$new_path"
17797 17792 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17798 17793 unix_path=`$CYGPATH -u "$windows_path"`
17799 17794 new_path="$unix_path"
17800 17795 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17801 17796 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17802 17797 new_path="$unix_path"
17803 17798 fi
17804 17799
17805 17800 fi
17806 17801
17807 17802 if test "x$new_path" = x; then
17808 17803 # It's still not found. Now this is an unrecoverable error.
17809 17804 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17810 17805 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17811 17806 has_space=`$ECHO "$complete" | $GREP " "`
17812 17807 if test "x$has_space" != x; then
17813 17808 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17814 17809 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17815 17810 fi
17816 17811 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17817 17812 fi
17818 17813 fi
17819 17814
17820 17815 # Now new_path has a complete unix path to the binary
17821 17816 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17822 17817 # Keep paths in /bin as-is, but remove trailing .exe if any
17823 17818 new_path="${new_path/%.exe/}"
17824 17819 # Do not save /bin paths to all_fixpath_prefixes!
17825 17820 else
17826 17821 # Not in mixed or Windows style, start by that.
17827 17822 new_path=`cmd //c echo $new_path`
17828 17823
17829 17824 input_path="$new_path"
17830 17825 # Check if we need to convert this using DOS-style short mode. If the path
17831 17826 # contains just simple characters, use it. Otherwise (spaces, weird characters),
17832 17827 # take no chances and rewrite it.
17833 17828 # Note: m4 eats our [], so we need to use [ and ] instead.
17834 17829 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17835 17830 if test "x$has_forbidden_chars" != x; then
17836 17831 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17837 17832 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17838 17833 fi
17839 17834
17840 17835 # Output is in $new_path
17841 17836
17842 17837 windows_path="$new_path"
17843 17838 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17844 17839 unix_path=`$CYGPATH -u "$windows_path"`
17845 17840 new_path="$unix_path"
17846 17841 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17847 17842 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17848 17843 new_path="$unix_path"
17849 17844 fi
17850 17845
17851 17846 # remove trailing .exe if any
17852 17847 new_path="${new_path/%.exe/}"
17853 17848
17854 17849 # Save the first 10 bytes of this path to the storage, so fixpath can work.
17855 17850 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17856 17851 fi
17857 17852
17858 17853 else
17859 17854 # We're on a unix platform. Hooray! :)
17860 17855 # First separate the path from the arguments. This will split at the first
17861 17856 # space.
17862 17857 complete="$FOUND_MAKE"
17863 17858 path="${complete%% *}"
17864 17859 tmp="$complete EOL"
17865 17860 arguments="${tmp#* }"
17866 17861
17867 17862 # Cannot rely on the command "which" here since it doesn't always work.
17868 17863 is_absolute_path=`$ECHO "$path" | $GREP ^/`
17869 17864 if test -z "$is_absolute_path"; then
17870 17865 # Path to executable is not absolute. Find it.
17871 17866 IFS_save="$IFS"
17872 17867 IFS=:
17873 17868 for p in $PATH; do
17874 17869 if test -f "$p/$path" && test -x "$p/$path"; then
17875 17870 new_path="$p/$path"
17876 17871 break
17877 17872 fi
17878 17873 done
17879 17874 IFS="$IFS_save"
17880 17875 else
17881 17876 # This is an absolute path, we can use it without further modifications.
17882 17877 new_path="$path"
17883 17878 fi
17884 17879
17885 17880 if test "x$new_path" = x; then
17886 17881 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17887 17882 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17888 17883 has_space=`$ECHO "$complete" | $GREP " "`
17889 17884 if test "x$has_space" != x; then
17890 17885 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17891 17886 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17892 17887 fi
17893 17888 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17894 17889 fi
17895 17890 fi
17896 17891
17897 17892 # Now join together the path and the arguments once again
17898 17893 if test "x$arguments" != xEOL; then
17899 17894 new_complete="$new_path ${arguments% *}"
17900 17895 else
17901 17896 new_complete="$new_path"
17902 17897 fi
17903 17898
17904 17899 if test "x$complete" != "x$new_complete"; then
17905 17900 FOUND_MAKE="$new_complete"
17906 17901 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17907 17902 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17908 17903 fi
17909 17904 fi
17910 17905
17911 17906 fi
17912 17907 fi
17913 17908 fi
17914 17909 fi
17915 17910
17916 17911
17917 17912 if test "x$FOUND_MAKE" = x; then
17918 17913 for ac_prog in make
17919 17914 do
17920 17915 # Extract the first word of "$ac_prog", so it can be a program name with args.
17921 17916 set dummy $ac_prog; ac_word=$2
17922 17917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17923 17918 $as_echo_n "checking for $ac_word... " >&6; }
17924 17919 if ${ac_cv_path_CHECK_MAKE+:} false; then :
17925 17920 $as_echo_n "(cached) " >&6
17926 17921 else
17927 17922 case $CHECK_MAKE in
17928 17923 [\\/]* | ?:[\\/]*)
17929 17924 ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17930 17925 ;;
17931 17926 *)
17932 17927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17933 17928 for as_dir in $PATH
17934 17929 do
17935 17930 IFS=$as_save_IFS
17936 17931 test -z "$as_dir" && as_dir=.
17937 17932 for ac_exec_ext in '' $ac_executable_extensions; do
17938 17933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17939 17934 ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17940 17935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17941 17936 break 2
17942 17937 fi
17943 17938 done
17944 17939 done
17945 17940 IFS=$as_save_IFS
17946 17941
17947 17942 ;;
17948 17943 esac
17949 17944 fi
17950 17945 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17951 17946 if test -n "$CHECK_MAKE"; then
17952 17947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17953 17948 $as_echo "$CHECK_MAKE" >&6; }
17954 17949 else
17955 17950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17956 17951 $as_echo "no" >&6; }
17957 17952 fi
17958 17953
17959 17954
17960 17955 test -n "$CHECK_MAKE" && break
17961 17956 done
17962 17957
17963 17958
17964 17959 MAKE_CANDIDATE=""$CHECK_MAKE""
17965 17960 DESCRIPTION="make in PATH"
17966 17961
17967 17962 # On Cygwin, we require a newer version of make than on other platforms
17968 17963 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17969 17964 MAKE_VERSION_EXPR="-e 4\."
17970 17965 MAKE_REQUIRED_VERSION="4.0"
17971 17966 else
17972 17967 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17973 17968 MAKE_REQUIRED_VERSION="3.81"
17974 17969 fi
17975 17970
17976 17971 if test "x$MAKE_CANDIDATE" != x; then
17977 17972 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17978 17973 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17979 17974 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17980 17975 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17981 17976 if test "x$IS_GNU_MAKE" = x; then
17982 17977 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17983 17978 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17984 17979 else
17985 17980 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17986 17981 if test "x$IS_MODERN_MAKE" = x; then
17987 17982 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17988 17983 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17989 17984 else
17990 17985 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17991 17986 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17992 17987 MAKE_EXPECTED_ENV='cygwin'
17993 17988 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17994 17989 MAKE_EXPECTED_ENV='msys'
17995 17990 else
17996 17991 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17997 17992 fi
17998 17993 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17999 17994 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18000 17995 else
18001 17996 # Not relevant for non-Windows
18002 17997 IS_MAKE_CORRECT_ENV=true
18003 17998 fi
18004 17999 if test "x$IS_MAKE_CORRECT_ENV" = x; then
18005 18000 { $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
18006 18001 $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;}
18007 18002 else
18008 18003 FOUND_MAKE=$MAKE_CANDIDATE
18009 18004
18010 18005 # Only process if variable expands to non-empty
18011 18006
18012 18007 if test "x$FOUND_MAKE" != x; then
18013 18008 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18014 18009
18015 18010 # First separate the path from the arguments. This will split at the first
18016 18011 # space.
18017 18012 complete="$FOUND_MAKE"
18018 18013 path="${complete%% *}"
18019 18014 tmp="$complete EOL"
18020 18015 arguments="${tmp#* }"
18021 18016
18022 18017 # Input might be given as Windows format, start by converting to
18023 18018 # unix format.
18024 18019 new_path=`$CYGPATH -u "$path"`
18025 18020
18026 18021 # Now try to locate executable using which
18027 18022 new_path=`$WHICH "$new_path" 2> /dev/null`
18028 18023 # bat and cmd files are not always considered executable in cygwin causing which
18029 18024 # to not find them
18030 18025 if test "x$new_path" = x \
18031 18026 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18032 18027 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18033 18028 new_path=`$CYGPATH -u "$path"`
18034 18029 fi
18035 18030 if test "x$new_path" = x; then
18036 18031 # Oops. Which didn't find the executable.
18037 18032 # The splitting of arguments from the executable at a space might have been incorrect,
18038 18033 # since paths with space are more likely in Windows. Give it another try with the whole
18039 18034 # argument.
18040 18035 path="$complete"
18041 18036 arguments="EOL"
18042 18037 new_path=`$CYGPATH -u "$path"`
18043 18038 new_path=`$WHICH "$new_path" 2> /dev/null`
18044 18039 # bat and cmd files are not always considered executable in cygwin causing which
18045 18040 # to not find them
18046 18041 if test "x$new_path" = x \
18047 18042 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18048 18043 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18049 18044 new_path=`$CYGPATH -u "$path"`
18050 18045 fi
18051 18046 if test "x$new_path" = x; then
18052 18047 # It's still not found. Now this is an unrecoverable error.
18053 18048 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18054 18049 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18055 18050 has_space=`$ECHO "$complete" | $GREP " "`
18056 18051 if test "x$has_space" != x; then
18057 18052 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18058 18053 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18059 18054 fi
18060 18055 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18061 18056 fi
18062 18057 fi
18063 18058
18064 18059 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18065 18060 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18066 18061 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18067 18062 # "foo.exe" is OK but "foo" is an error.
18068 18063 #
18069 18064 # This test is therefore slightly more accurate than "test -f" to check for file presence.
18070 18065 # It is also a way to make sure we got the proper file name for the real test later on.
18071 18066 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18072 18067 if test "x$test_shortpath" = x; then
18073 18068 # Short path failed, file does not exist as specified.
18074 18069 # Try adding .exe or .cmd
18075 18070 if test -f "${new_path}.exe"; then
18076 18071 input_to_shortpath="${new_path}.exe"
18077 18072 elif test -f "${new_path}.cmd"; then
18078 18073 input_to_shortpath="${new_path}.cmd"
18079 18074 else
18080 18075 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18081 18076 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18082 18077 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18083 18078 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18084 18079 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18085 18080 fi
18086 18081 else
18087 18082 input_to_shortpath="$new_path"
18088 18083 fi
18089 18084
18090 18085 # Call helper function which possibly converts this using DOS-style short mode.
18091 18086 # If so, the updated path is stored in $new_path.
18092 18087 new_path="$input_to_shortpath"
18093 18088
18094 18089 input_path="$input_to_shortpath"
18095 18090 # Check if we need to convert this using DOS-style short mode. If the path
18096 18091 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18097 18092 # take no chances and rewrite it.
18098 18093 # Note: m4 eats our [], so we need to use [ and ] instead.
18099 18094 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18100 18095 if test "x$has_forbidden_chars" != x; then
18101 18096 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18102 18097 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18103 18098 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18104 18099 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18105 18100 # Going to short mode and back again did indeed matter. Since short mode is
18106 18101 # case insensitive, let's make it lowercase to improve readability.
18107 18102 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18108 18103 # Now convert it back to Unix-style (cygpath)
18109 18104 input_path=`$CYGPATH -u "$shortmode_path"`
18110 18105 new_path="$input_path"
18111 18106 fi
18112 18107 fi
18113 18108
18114 18109 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18115 18110 if test "x$test_cygdrive_prefix" = x; then
18116 18111 # As a simple fix, exclude /usr/bin since it's not a real path.
18117 18112 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18118 18113 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18119 18114 # a path prefixed by /cygdrive for fixpath to work.
18120 18115 new_path="$CYGWIN_ROOT_PATH$input_path"
18121 18116 fi
18122 18117 fi
18123 18118
18124 18119 # remove trailing .exe if any
18125 18120 new_path="${new_path/%.exe/}"
18126 18121
18127 18122 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18128 18123
18129 18124 # First separate the path from the arguments. This will split at the first
18130 18125 # space.
18131 18126 complete="$FOUND_MAKE"
18132 18127 path="${complete%% *}"
18133 18128 tmp="$complete EOL"
18134 18129 arguments="${tmp#* }"
18135 18130
18136 18131 # Input might be given as Windows format, start by converting to
18137 18132 # unix format.
18138 18133 new_path="$path"
18139 18134
18140 18135 windows_path="$new_path"
18141 18136 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18142 18137 unix_path=`$CYGPATH -u "$windows_path"`
18143 18138 new_path="$unix_path"
18144 18139 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18145 18140 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18146 18141 new_path="$unix_path"
18147 18142 fi
18148 18143
18149 18144
18150 18145 # Now try to locate executable using which
18151 18146 new_path=`$WHICH "$new_path" 2> /dev/null`
18152 18147
18153 18148 if test "x$new_path" = x; then
18154 18149 # Oops. Which didn't find the executable.
18155 18150 # The splitting of arguments from the executable at a space might have been incorrect,
18156 18151 # since paths with space are more likely in Windows. Give it another try with the whole
18157 18152 # argument.
18158 18153 path="$complete"
18159 18154 arguments="EOL"
18160 18155 new_path="$path"
18161 18156
18162 18157 windows_path="$new_path"
18163 18158 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18164 18159 unix_path=`$CYGPATH -u "$windows_path"`
18165 18160 new_path="$unix_path"
18166 18161 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18167 18162 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18168 18163 new_path="$unix_path"
18169 18164 fi
18170 18165
18171 18166
18172 18167 new_path=`$WHICH "$new_path" 2> /dev/null`
18173 18168 # bat and cmd files are not always considered executable in MSYS causing which
18174 18169 # to not find them
18175 18170 if test "x$new_path" = x \
18176 18171 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18177 18172 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18178 18173 new_path="$path"
18179 18174
18180 18175 windows_path="$new_path"
18181 18176 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18182 18177 unix_path=`$CYGPATH -u "$windows_path"`
18183 18178 new_path="$unix_path"
18184 18179 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18185 18180 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18186 18181 new_path="$unix_path"
18187 18182 fi
18188 18183
18189 18184 fi
18190 18185
18191 18186 if test "x$new_path" = x; then
18192 18187 # It's still not found. Now this is an unrecoverable error.
18193 18188 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18194 18189 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18195 18190 has_space=`$ECHO "$complete" | $GREP " "`
18196 18191 if test "x$has_space" != x; then
18197 18192 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18198 18193 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18199 18194 fi
18200 18195 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18201 18196 fi
18202 18197 fi
18203 18198
18204 18199 # Now new_path has a complete unix path to the binary
18205 18200 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18206 18201 # Keep paths in /bin as-is, but remove trailing .exe if any
18207 18202 new_path="${new_path/%.exe/}"
18208 18203 # Do not save /bin paths to all_fixpath_prefixes!
18209 18204 else
18210 18205 # Not in mixed or Windows style, start by that.
18211 18206 new_path=`cmd //c echo $new_path`
18212 18207
18213 18208 input_path="$new_path"
18214 18209 # Check if we need to convert this using DOS-style short mode. If the path
18215 18210 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18216 18211 # take no chances and rewrite it.
18217 18212 # Note: m4 eats our [], so we need to use [ and ] instead.
18218 18213 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18219 18214 if test "x$has_forbidden_chars" != x; then
18220 18215 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18221 18216 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18222 18217 fi
18223 18218
18224 18219 # Output is in $new_path
18225 18220
18226 18221 windows_path="$new_path"
18227 18222 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18228 18223 unix_path=`$CYGPATH -u "$windows_path"`
18229 18224 new_path="$unix_path"
18230 18225 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18231 18226 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18232 18227 new_path="$unix_path"
18233 18228 fi
18234 18229
18235 18230 # remove trailing .exe if any
18236 18231 new_path="${new_path/%.exe/}"
18237 18232
18238 18233 # Save the first 10 bytes of this path to the storage, so fixpath can work.
18239 18234 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18240 18235 fi
18241 18236
18242 18237 else
18243 18238 # We're on a unix platform. Hooray! :)
18244 18239 # First separate the path from the arguments. This will split at the first
18245 18240 # space.
18246 18241 complete="$FOUND_MAKE"
18247 18242 path="${complete%% *}"
18248 18243 tmp="$complete EOL"
18249 18244 arguments="${tmp#* }"
18250 18245
18251 18246 # Cannot rely on the command "which" here since it doesn't always work.
18252 18247 is_absolute_path=`$ECHO "$path" | $GREP ^/`
18253 18248 if test -z "$is_absolute_path"; then
18254 18249 # Path to executable is not absolute. Find it.
18255 18250 IFS_save="$IFS"
18256 18251 IFS=:
18257 18252 for p in $PATH; do
18258 18253 if test -f "$p/$path" && test -x "$p/$path"; then
18259 18254 new_path="$p/$path"
18260 18255 break
18261 18256 fi
18262 18257 done
18263 18258 IFS="$IFS_save"
18264 18259 else
18265 18260 # This is an absolute path, we can use it without further modifications.
18266 18261 new_path="$path"
18267 18262 fi
18268 18263
18269 18264 if test "x$new_path" = x; then
18270 18265 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18271 18266 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18272 18267 has_space=`$ECHO "$complete" | $GREP " "`
18273 18268 if test "x$has_space" != x; then
18274 18269 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18275 18270 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18276 18271 fi
18277 18272 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18278 18273 fi
18279 18274 fi
18280 18275
18281 18276 # Now join together the path and the arguments once again
18282 18277 if test "x$arguments" != xEOL; then
18283 18278 new_complete="$new_path ${arguments% *}"
18284 18279 else
18285 18280 new_complete="$new_path"
18286 18281 fi
18287 18282
18288 18283 if test "x$complete" != "x$new_complete"; then
18289 18284 FOUND_MAKE="$new_complete"
18290 18285 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18291 18286 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18292 18287 fi
18293 18288 fi
18294 18289
18295 18290 fi
18296 18291 fi
18297 18292 fi
18298 18293 fi
18299 18294
18300 18295 fi
18301 18296
18302 18297 if test "x$FOUND_MAKE" = x; then
18303 18298 if test "x$TOOLCHAIN_PATH" != x; then
18304 18299 # We have a toolchain path, check that as well before giving up.
18305 18300 OLD_PATH=$PATH
18306 18301 PATH=$TOOLCHAIN_PATH:$PATH
18307 18302 for ac_prog in gmake
18308 18303 do
18309 18304 # Extract the first word of "$ac_prog", so it can be a program name with args.
18310 18305 set dummy $ac_prog; ac_word=$2
18311 18306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18312 18307 $as_echo_n "checking for $ac_word... " >&6; }
18313 18308 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18314 18309 $as_echo_n "(cached) " >&6
18315 18310 else
18316 18311 case $CHECK_TOOLSDIR_GMAKE in
18317 18312 [\\/]* | ?:[\\/]*)
18318 18313 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18319 18314 ;;
18320 18315 *)
18321 18316 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18322 18317 for as_dir in $PATH
18323 18318 do
18324 18319 IFS=$as_save_IFS
18325 18320 test -z "$as_dir" && as_dir=.
18326 18321 for ac_exec_ext in '' $ac_executable_extensions; do
18327 18322 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18328 18323 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18329 18324 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18330 18325 break 2
18331 18326 fi
18332 18327 done
18333 18328 done
18334 18329 IFS=$as_save_IFS
18335 18330
18336 18331 ;;
18337 18332 esac
18338 18333 fi
18339 18334 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18340 18335 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18341 18336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18342 18337 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18343 18338 else
18344 18339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18345 18340 $as_echo "no" >&6; }
18346 18341 fi
18347 18342
18348 18343
18349 18344 test -n "$CHECK_TOOLSDIR_GMAKE" && break
18350 18345 done
18351 18346
18352 18347
18353 18348 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18354 18349 DESCRIPTION="gmake in tools-dir"
18355 18350
18356 18351 # On Cygwin, we require a newer version of make than on other platforms
18357 18352 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18358 18353 MAKE_VERSION_EXPR="-e 4\."
18359 18354 MAKE_REQUIRED_VERSION="4.0"
18360 18355 else
18361 18356 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18362 18357 MAKE_REQUIRED_VERSION="3.81"
18363 18358 fi
18364 18359
18365 18360 if test "x$MAKE_CANDIDATE" != x; then
18366 18361 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18367 18362 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18368 18363 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18369 18364 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18370 18365 if test "x$IS_GNU_MAKE" = x; then
18371 18366 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18372 18367 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18373 18368 else
18374 18369 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18375 18370 if test "x$IS_MODERN_MAKE" = x; then
18376 18371 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18377 18372 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18378 18373 else
18379 18374 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18380 18375 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381 18376 MAKE_EXPECTED_ENV='cygwin'
18382 18377 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18383 18378 MAKE_EXPECTED_ENV='msys'
18384 18379 else
18385 18380 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18386 18381 fi
18387 18382 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18388 18383 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18389 18384 else
18390 18385 # Not relevant for non-Windows
18391 18386 IS_MAKE_CORRECT_ENV=true
18392 18387 fi
18393 18388 if test "x$IS_MAKE_CORRECT_ENV" = x; then
18394 18389 { $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
18395 18390 $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;}
18396 18391 else
18397 18392 FOUND_MAKE=$MAKE_CANDIDATE
18398 18393
18399 18394 # Only process if variable expands to non-empty
18400 18395
18401 18396 if test "x$FOUND_MAKE" != x; then
18402 18397 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18403 18398
18404 18399 # First separate the path from the arguments. This will split at the first
18405 18400 # space.
18406 18401 complete="$FOUND_MAKE"
18407 18402 path="${complete%% *}"
18408 18403 tmp="$complete EOL"
18409 18404 arguments="${tmp#* }"
18410 18405
18411 18406 # Input might be given as Windows format, start by converting to
18412 18407 # unix format.
18413 18408 new_path=`$CYGPATH -u "$path"`
18414 18409
18415 18410 # Now try to locate executable using which
18416 18411 new_path=`$WHICH "$new_path" 2> /dev/null`
18417 18412 # bat and cmd files are not always considered executable in cygwin causing which
18418 18413 # to not find them
18419 18414 if test "x$new_path" = x \
18420 18415 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18421 18416 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18422 18417 new_path=`$CYGPATH -u "$path"`
18423 18418 fi
18424 18419 if test "x$new_path" = x; then
18425 18420 # Oops. Which didn't find the executable.
18426 18421 # The splitting of arguments from the executable at a space might have been incorrect,
18427 18422 # since paths with space are more likely in Windows. Give it another try with the whole
18428 18423 # argument.
18429 18424 path="$complete"
18430 18425 arguments="EOL"
18431 18426 new_path=`$CYGPATH -u "$path"`
18432 18427 new_path=`$WHICH "$new_path" 2> /dev/null`
18433 18428 # bat and cmd files are not always considered executable in cygwin causing which
18434 18429 # to not find them
18435 18430 if test "x$new_path" = x \
18436 18431 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18437 18432 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18438 18433 new_path=`$CYGPATH -u "$path"`
18439 18434 fi
18440 18435 if test "x$new_path" = x; then
18441 18436 # It's still not found. Now this is an unrecoverable error.
18442 18437 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18443 18438 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18444 18439 has_space=`$ECHO "$complete" | $GREP " "`
18445 18440 if test "x$has_space" != x; then
18446 18441 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18447 18442 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18448 18443 fi
18449 18444 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18450 18445 fi
18451 18446 fi
18452 18447
18453 18448 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18454 18449 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18455 18450 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18456 18451 # "foo.exe" is OK but "foo" is an error.
18457 18452 #
18458 18453 # This test is therefore slightly more accurate than "test -f" to check for file presence.
18459 18454 # It is also a way to make sure we got the proper file name for the real test later on.
18460 18455 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18461 18456 if test "x$test_shortpath" = x; then
18462 18457 # Short path failed, file does not exist as specified.
18463 18458 # Try adding .exe or .cmd
18464 18459 if test -f "${new_path}.exe"; then
18465 18460 input_to_shortpath="${new_path}.exe"
18466 18461 elif test -f "${new_path}.cmd"; then
18467 18462 input_to_shortpath="${new_path}.cmd"
18468 18463 else
18469 18464 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18470 18465 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18471 18466 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18472 18467 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18473 18468 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18474 18469 fi
18475 18470 else
18476 18471 input_to_shortpath="$new_path"
18477 18472 fi
18478 18473
18479 18474 # Call helper function which possibly converts this using DOS-style short mode.
18480 18475 # If so, the updated path is stored in $new_path.
18481 18476 new_path="$input_to_shortpath"
18482 18477
18483 18478 input_path="$input_to_shortpath"
18484 18479 # Check if we need to convert this using DOS-style short mode. If the path
18485 18480 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18486 18481 # take no chances and rewrite it.
18487 18482 # Note: m4 eats our [], so we need to use [ and ] instead.
18488 18483 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18489 18484 if test "x$has_forbidden_chars" != x; then
18490 18485 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18491 18486 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18492 18487 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18493 18488 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18494 18489 # Going to short mode and back again did indeed matter. Since short mode is
18495 18490 # case insensitive, let's make it lowercase to improve readability.
18496 18491 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18497 18492 # Now convert it back to Unix-style (cygpath)
18498 18493 input_path=`$CYGPATH -u "$shortmode_path"`
18499 18494 new_path="$input_path"
18500 18495 fi
18501 18496 fi
18502 18497
18503 18498 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18504 18499 if test "x$test_cygdrive_prefix" = x; then
18505 18500 # As a simple fix, exclude /usr/bin since it's not a real path.
18506 18501 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18507 18502 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18508 18503 # a path prefixed by /cygdrive for fixpath to work.
18509 18504 new_path="$CYGWIN_ROOT_PATH$input_path"
18510 18505 fi
18511 18506 fi
18512 18507
18513 18508 # remove trailing .exe if any
18514 18509 new_path="${new_path/%.exe/}"
18515 18510
18516 18511 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18517 18512
18518 18513 # First separate the path from the arguments. This will split at the first
18519 18514 # space.
18520 18515 complete="$FOUND_MAKE"
18521 18516 path="${complete%% *}"
18522 18517 tmp="$complete EOL"
18523 18518 arguments="${tmp#* }"
18524 18519
18525 18520 # Input might be given as Windows format, start by converting to
18526 18521 # unix format.
18527 18522 new_path="$path"
18528 18523
18529 18524 windows_path="$new_path"
18530 18525 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18531 18526 unix_path=`$CYGPATH -u "$windows_path"`
18532 18527 new_path="$unix_path"
18533 18528 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18534 18529 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18535 18530 new_path="$unix_path"
18536 18531 fi
18537 18532
18538 18533
18539 18534 # Now try to locate executable using which
18540 18535 new_path=`$WHICH "$new_path" 2> /dev/null`
18541 18536
18542 18537 if test "x$new_path" = x; then
18543 18538 # Oops. Which didn't find the executable.
18544 18539 # The splitting of arguments from the executable at a space might have been incorrect,
18545 18540 # since paths with space are more likely in Windows. Give it another try with the whole
18546 18541 # argument.
18547 18542 path="$complete"
18548 18543 arguments="EOL"
18549 18544 new_path="$path"
18550 18545
18551 18546 windows_path="$new_path"
18552 18547 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18553 18548 unix_path=`$CYGPATH -u "$windows_path"`
18554 18549 new_path="$unix_path"
18555 18550 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18556 18551 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18557 18552 new_path="$unix_path"
18558 18553 fi
18559 18554
18560 18555
18561 18556 new_path=`$WHICH "$new_path" 2> /dev/null`
18562 18557 # bat and cmd files are not always considered executable in MSYS causing which
18563 18558 # to not find them
18564 18559 if test "x$new_path" = x \
18565 18560 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18566 18561 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18567 18562 new_path="$path"
18568 18563
18569 18564 windows_path="$new_path"
18570 18565 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18571 18566 unix_path=`$CYGPATH -u "$windows_path"`
18572 18567 new_path="$unix_path"
18573 18568 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18574 18569 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18575 18570 new_path="$unix_path"
18576 18571 fi
18577 18572
18578 18573 fi
18579 18574
18580 18575 if test "x$new_path" = x; then
18581 18576 # It's still not found. Now this is an unrecoverable error.
18582 18577 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18583 18578 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18584 18579 has_space=`$ECHO "$complete" | $GREP " "`
18585 18580 if test "x$has_space" != x; then
18586 18581 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18587 18582 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18588 18583 fi
18589 18584 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18590 18585 fi
18591 18586 fi
18592 18587
18593 18588 # Now new_path has a complete unix path to the binary
18594 18589 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18595 18590 # Keep paths in /bin as-is, but remove trailing .exe if any
18596 18591 new_path="${new_path/%.exe/}"
18597 18592 # Do not save /bin paths to all_fixpath_prefixes!
18598 18593 else
18599 18594 # Not in mixed or Windows style, start by that.
18600 18595 new_path=`cmd //c echo $new_path`
18601 18596
18602 18597 input_path="$new_path"
18603 18598 # Check if we need to convert this using DOS-style short mode. If the path
18604 18599 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18605 18600 # take no chances and rewrite it.
18606 18601 # Note: m4 eats our [], so we need to use [ and ] instead.
18607 18602 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18608 18603 if test "x$has_forbidden_chars" != x; then
18609 18604 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18610 18605 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18611 18606 fi
18612 18607
18613 18608 # Output is in $new_path
18614 18609
18615 18610 windows_path="$new_path"
18616 18611 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18617 18612 unix_path=`$CYGPATH -u "$windows_path"`
18618 18613 new_path="$unix_path"
18619 18614 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18620 18615 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18621 18616 new_path="$unix_path"
18622 18617 fi
18623 18618
18624 18619 # remove trailing .exe if any
18625 18620 new_path="${new_path/%.exe/}"
18626 18621
18627 18622 # Save the first 10 bytes of this path to the storage, so fixpath can work.
18628 18623 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18629 18624 fi
18630 18625
18631 18626 else
18632 18627 # We're on a unix platform. Hooray! :)
18633 18628 # First separate the path from the arguments. This will split at the first
18634 18629 # space.
18635 18630 complete="$FOUND_MAKE"
18636 18631 path="${complete%% *}"
18637 18632 tmp="$complete EOL"
18638 18633 arguments="${tmp#* }"
18639 18634
18640 18635 # Cannot rely on the command "which" here since it doesn't always work.
18641 18636 is_absolute_path=`$ECHO "$path" | $GREP ^/`
18642 18637 if test -z "$is_absolute_path"; then
18643 18638 # Path to executable is not absolute. Find it.
18644 18639 IFS_save="$IFS"
18645 18640 IFS=:
18646 18641 for p in $PATH; do
18647 18642 if test -f "$p/$path" && test -x "$p/$path"; then
18648 18643 new_path="$p/$path"
18649 18644 break
18650 18645 fi
18651 18646 done
18652 18647 IFS="$IFS_save"
18653 18648 else
18654 18649 # This is an absolute path, we can use it without further modifications.
18655 18650 new_path="$path"
18656 18651 fi
18657 18652
18658 18653 if test "x$new_path" = x; then
18659 18654 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18660 18655 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18661 18656 has_space=`$ECHO "$complete" | $GREP " "`
18662 18657 if test "x$has_space" != x; then
18663 18658 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18664 18659 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18665 18660 fi
18666 18661 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18667 18662 fi
18668 18663 fi
18669 18664
18670 18665 # Now join together the path and the arguments once again
18671 18666 if test "x$arguments" != xEOL; then
18672 18667 new_complete="$new_path ${arguments% *}"
18673 18668 else
18674 18669 new_complete="$new_path"
18675 18670 fi
18676 18671
18677 18672 if test "x$complete" != "x$new_complete"; then
18678 18673 FOUND_MAKE="$new_complete"
18679 18674 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18680 18675 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18681 18676 fi
18682 18677 fi
18683 18678
18684 18679 fi
18685 18680 fi
18686 18681 fi
18687 18682 fi
18688 18683
18689 18684 if test "x$FOUND_MAKE" = x; then
18690 18685 for ac_prog in make
18691 18686 do
18692 18687 # Extract the first word of "$ac_prog", so it can be a program name with args.
18693 18688 set dummy $ac_prog; ac_word=$2
18694 18689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18695 18690 $as_echo_n "checking for $ac_word... " >&6; }
18696 18691 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18697 18692 $as_echo_n "(cached) " >&6
18698 18693 else
18699 18694 case $CHECK_TOOLSDIR_MAKE in
18700 18695 [\\/]* | ?:[\\/]*)
18701 18696 ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18702 18697 ;;
18703 18698 *)
18704 18699 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18705 18700 for as_dir in $PATH
18706 18701 do
18707 18702 IFS=$as_save_IFS
18708 18703 test -z "$as_dir" && as_dir=.
18709 18704 for ac_exec_ext in '' $ac_executable_extensions; do
18710 18705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18711 18706 ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18712 18707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18713 18708 break 2
18714 18709 fi
18715 18710 done
18716 18711 done
18717 18712 IFS=$as_save_IFS
18718 18713
18719 18714 ;;
18720 18715 esac
18721 18716 fi
18722 18717 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18723 18718 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18724 18719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18725 18720 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18726 18721 else
18727 18722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18728 18723 $as_echo "no" >&6; }
18729 18724 fi
18730 18725
18731 18726
18732 18727 test -n "$CHECK_TOOLSDIR_MAKE" && break
18733 18728 done
18734 18729
18735 18730
18736 18731 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18737 18732 DESCRIPTION="make in tools-dir"
18738 18733
18739 18734 # On Cygwin, we require a newer version of make than on other platforms
18740 18735 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18741 18736 MAKE_VERSION_EXPR="-e 4\."
18742 18737 MAKE_REQUIRED_VERSION="4.0"
18743 18738 else
18744 18739 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18745 18740 MAKE_REQUIRED_VERSION="3.81"
18746 18741 fi
18747 18742
18748 18743 if test "x$MAKE_CANDIDATE" != x; then
18749 18744 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18750 18745 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18751 18746 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18752 18747 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18753 18748 if test "x$IS_GNU_MAKE" = x; then
18754 18749 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18755 18750 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18756 18751 else
18757 18752 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18758 18753 if test "x$IS_MODERN_MAKE" = x; then
18759 18754 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18760 18755 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18761 18756 else
18762 18757 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18763 18758 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18764 18759 MAKE_EXPECTED_ENV='cygwin'
18765 18760 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18766 18761 MAKE_EXPECTED_ENV='msys'
18767 18762 else
18768 18763 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18769 18764 fi
18770 18765 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18771 18766 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18772 18767 else
18773 18768 # Not relevant for non-Windows
18774 18769 IS_MAKE_CORRECT_ENV=true
18775 18770 fi
18776 18771 if test "x$IS_MAKE_CORRECT_ENV" = x; then
18777 18772 { $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
18778 18773 $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;}
18779 18774 else
18780 18775 FOUND_MAKE=$MAKE_CANDIDATE
18781 18776
18782 18777 # Only process if variable expands to non-empty
18783 18778
18784 18779 if test "x$FOUND_MAKE" != x; then
18785 18780 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18786 18781
18787 18782 # First separate the path from the arguments. This will split at the first
18788 18783 # space.
18789 18784 complete="$FOUND_MAKE"
18790 18785 path="${complete%% *}"
18791 18786 tmp="$complete EOL"
18792 18787 arguments="${tmp#* }"
18793 18788
18794 18789 # Input might be given as Windows format, start by converting to
18795 18790 # unix format.
18796 18791 new_path=`$CYGPATH -u "$path"`
18797 18792
18798 18793 # Now try to locate executable using which
18799 18794 new_path=`$WHICH "$new_path" 2> /dev/null`
18800 18795 # bat and cmd files are not always considered executable in cygwin causing which
18801 18796 # to not find them
18802 18797 if test "x$new_path" = x \
18803 18798 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18804 18799 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18805 18800 new_path=`$CYGPATH -u "$path"`
18806 18801 fi
18807 18802 if test "x$new_path" = x; then
18808 18803 # Oops. Which didn't find the executable.
18809 18804 # The splitting of arguments from the executable at a space might have been incorrect,
18810 18805 # since paths with space are more likely in Windows. Give it another try with the whole
18811 18806 # argument.
18812 18807 path="$complete"
18813 18808 arguments="EOL"
18814 18809 new_path=`$CYGPATH -u "$path"`
18815 18810 new_path=`$WHICH "$new_path" 2> /dev/null`
18816 18811 # bat and cmd files are not always considered executable in cygwin causing which
18817 18812 # to not find them
18818 18813 if test "x$new_path" = x \
18819 18814 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18820 18815 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18821 18816 new_path=`$CYGPATH -u "$path"`
18822 18817 fi
18823 18818 if test "x$new_path" = x; then
18824 18819 # It's still not found. Now this is an unrecoverable error.
18825 18820 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18826 18821 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18827 18822 has_space=`$ECHO "$complete" | $GREP " "`
18828 18823 if test "x$has_space" != x; then
18829 18824 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18830 18825 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18831 18826 fi
18832 18827 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18833 18828 fi
18834 18829 fi
18835 18830
18836 18831 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18837 18832 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18838 18833 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18839 18834 # "foo.exe" is OK but "foo" is an error.
18840 18835 #
18841 18836 # This test is therefore slightly more accurate than "test -f" to check for file presence.
18842 18837 # It is also a way to make sure we got the proper file name for the real test later on.
18843 18838 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18844 18839 if test "x$test_shortpath" = x; then
18845 18840 # Short path failed, file does not exist as specified.
18846 18841 # Try adding .exe or .cmd
18847 18842 if test -f "${new_path}.exe"; then
18848 18843 input_to_shortpath="${new_path}.exe"
18849 18844 elif test -f "${new_path}.cmd"; then
18850 18845 input_to_shortpath="${new_path}.cmd"
18851 18846 else
18852 18847 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18853 18848 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18854 18849 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18855 18850 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18856 18851 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18857 18852 fi
18858 18853 else
18859 18854 input_to_shortpath="$new_path"
18860 18855 fi
18861 18856
18862 18857 # Call helper function which possibly converts this using DOS-style short mode.
18863 18858 # If so, the updated path is stored in $new_path.
18864 18859 new_path="$input_to_shortpath"
18865 18860
18866 18861 input_path="$input_to_shortpath"
18867 18862 # Check if we need to convert this using DOS-style short mode. If the path
18868 18863 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18869 18864 # take no chances and rewrite it.
18870 18865 # Note: m4 eats our [], so we need to use [ and ] instead.
18871 18866 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18872 18867 if test "x$has_forbidden_chars" != x; then
18873 18868 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18874 18869 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18875 18870 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18876 18871 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18877 18872 # Going to short mode and back again did indeed matter. Since short mode is
18878 18873 # case insensitive, let's make it lowercase to improve readability.
18879 18874 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18880 18875 # Now convert it back to Unix-style (cygpath)
18881 18876 input_path=`$CYGPATH -u "$shortmode_path"`
18882 18877 new_path="$input_path"
18883 18878 fi
18884 18879 fi
18885 18880
18886 18881 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18887 18882 if test "x$test_cygdrive_prefix" = x; then
18888 18883 # As a simple fix, exclude /usr/bin since it's not a real path.
18889 18884 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18890 18885 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18891 18886 # a path prefixed by /cygdrive for fixpath to work.
18892 18887 new_path="$CYGWIN_ROOT_PATH$input_path"
18893 18888 fi
18894 18889 fi
18895 18890
18896 18891 # remove trailing .exe if any
18897 18892 new_path="${new_path/%.exe/}"
18898 18893
18899 18894 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18900 18895
18901 18896 # First separate the path from the arguments. This will split at the first
18902 18897 # space.
18903 18898 complete="$FOUND_MAKE"
18904 18899 path="${complete%% *}"
18905 18900 tmp="$complete EOL"
18906 18901 arguments="${tmp#* }"
18907 18902
18908 18903 # Input might be given as Windows format, start by converting to
18909 18904 # unix format.
18910 18905 new_path="$path"
18911 18906
18912 18907 windows_path="$new_path"
18913 18908 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18914 18909 unix_path=`$CYGPATH -u "$windows_path"`
18915 18910 new_path="$unix_path"
18916 18911 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18917 18912 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18918 18913 new_path="$unix_path"
18919 18914 fi
18920 18915
18921 18916
18922 18917 # Now try to locate executable using which
18923 18918 new_path=`$WHICH "$new_path" 2> /dev/null`
18924 18919
18925 18920 if test "x$new_path" = x; then
18926 18921 # Oops. Which didn't find the executable.
18927 18922 # The splitting of arguments from the executable at a space might have been incorrect,
18928 18923 # since paths with space are more likely in Windows. Give it another try with the whole
18929 18924 # argument.
18930 18925 path="$complete"
18931 18926 arguments="EOL"
18932 18927 new_path="$path"
18933 18928
18934 18929 windows_path="$new_path"
18935 18930 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18936 18931 unix_path=`$CYGPATH -u "$windows_path"`
18937 18932 new_path="$unix_path"
18938 18933 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18939 18934 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18940 18935 new_path="$unix_path"
18941 18936 fi
18942 18937
18943 18938
18944 18939 new_path=`$WHICH "$new_path" 2> /dev/null`
18945 18940 # bat and cmd files are not always considered executable in MSYS causing which
18946 18941 # to not find them
18947 18942 if test "x$new_path" = x \
18948 18943 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18949 18944 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18950 18945 new_path="$path"
18951 18946
18952 18947 windows_path="$new_path"
18953 18948 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18954 18949 unix_path=`$CYGPATH -u "$windows_path"`
18955 18950 new_path="$unix_path"
18956 18951 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18957 18952 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18958 18953 new_path="$unix_path"
18959 18954 fi
18960 18955
18961 18956 fi
18962 18957
18963 18958 if test "x$new_path" = x; then
18964 18959 # It's still not found. Now this is an unrecoverable error.
18965 18960 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18966 18961 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18967 18962 has_space=`$ECHO "$complete" | $GREP " "`
18968 18963 if test "x$has_space" != x; then
18969 18964 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18970 18965 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18971 18966 fi
18972 18967 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18973 18968 fi
18974 18969 fi
18975 18970
18976 18971 # Now new_path has a complete unix path to the binary
18977 18972 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18978 18973 # Keep paths in /bin as-is, but remove trailing .exe if any
18979 18974 new_path="${new_path/%.exe/}"
18980 18975 # Do not save /bin paths to all_fixpath_prefixes!
18981 18976 else
18982 18977 # Not in mixed or Windows style, start by that.
18983 18978 new_path=`cmd //c echo $new_path`
18984 18979
18985 18980 input_path="$new_path"
18986 18981 # Check if we need to convert this using DOS-style short mode. If the path
18987 18982 # contains just simple characters, use it. Otherwise (spaces, weird characters),
18988 18983 # take no chances and rewrite it.
18989 18984 # Note: m4 eats our [], so we need to use [ and ] instead.
18990 18985 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18991 18986 if test "x$has_forbidden_chars" != x; then
18992 18987 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18993 18988 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18994 18989 fi
18995 18990
18996 18991 # Output is in $new_path
18997 18992
18998 18993 windows_path="$new_path"
18999 18994 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19000 18995 unix_path=`$CYGPATH -u "$windows_path"`
19001 18996 new_path="$unix_path"
19002 18997 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19003 18998 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19004 18999 new_path="$unix_path"
19005 19000 fi
19006 19001
19007 19002 # remove trailing .exe if any
19008 19003 new_path="${new_path/%.exe/}"
19009 19004
19010 19005 # Save the first 10 bytes of this path to the storage, so fixpath can work.
19011 19006 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19012 19007 fi
19013 19008
19014 19009 else
19015 19010 # We're on a unix platform. Hooray! :)
19016 19011 # First separate the path from the arguments. This will split at the first
19017 19012 # space.
19018 19013 complete="$FOUND_MAKE"
19019 19014 path="${complete%% *}"
19020 19015 tmp="$complete EOL"
19021 19016 arguments="${tmp#* }"
19022 19017
19023 19018 # Cannot rely on the command "which" here since it doesn't always work.
19024 19019 is_absolute_path=`$ECHO "$path" | $GREP ^/`
19025 19020 if test -z "$is_absolute_path"; then
19026 19021 # Path to executable is not absolute. Find it.
19027 19022 IFS_save="$IFS"
19028 19023 IFS=:
19029 19024 for p in $PATH; do
19030 19025 if test -f "$p/$path" && test -x "$p/$path"; then
19031 19026 new_path="$p/$path"
19032 19027 break
19033 19028 fi
19034 19029 done
19035 19030 IFS="$IFS_save"
19036 19031 else
19037 19032 # This is an absolute path, we can use it without further modifications.
19038 19033 new_path="$path"
19039 19034 fi
19040 19035
19041 19036 if test "x$new_path" = x; then
19042 19037 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19043 19038 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19044 19039 has_space=`$ECHO "$complete" | $GREP " "`
19045 19040 if test "x$has_space" != x; then
19046 19041 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19047 19042 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19048 19043 fi
19049 19044 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19050 19045 fi
19051 19046 fi
19052 19047
19053 19048 # Now join together the path and the arguments once again
19054 19049 if test "x$arguments" != xEOL; then
19055 19050 new_complete="$new_path ${arguments% *}"
19056 19051 else
19057 19052 new_complete="$new_path"
19058 19053 fi
19059 19054
19060 19055 if test "x$complete" != "x$new_complete"; then
19061 19056 FOUND_MAKE="$new_complete"
19062 19057 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19063 19058 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19064 19059 fi
19065 19060 fi
19066 19061
19067 19062 fi
19068 19063 fi
19069 19064 fi
19070 19065 fi
19071 19066
19072 19067 fi
19073 19068 PATH=$OLD_PATH
19074 19069 fi
19075 19070 fi
19076 19071
19077 19072 if test "x$FOUND_MAKE" = x; then
19078 19073 as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
19079 19074 fi
19080 19075
19081 19076 else
19082 19077 # The variable is set, but is it from the command line or the environment?
19083 19078
19084 19079 # Try to remove the string !MAKE! from our list.
19085 19080 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19086 19081 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19087 19082 # If it failed, the variable was not from the command line. Ignore it,
19088 19083 # but warn the user (except for BASH, which is always set by the calling BASH).
19089 19084 if test "xMAKE" != xBASH; then
19090 19085 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19091 19086 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19092 19087 fi
19093 19088 # Try to locate tool using the code snippet
19094 19089
19095 19090 # Try our hardest to locate a correct version of GNU make
19096 19091 for ac_prog in gmake
19097 19092 do
19098 19093 # Extract the first word of "$ac_prog", so it can be a program name with args.
19099 19094 set dummy $ac_prog; ac_word=$2
19100 19095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19101 19096 $as_echo_n "checking for $ac_word... " >&6; }
19102 19097 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19103 19098 $as_echo_n "(cached) " >&6
19104 19099 else
19105 19100 case $CHECK_GMAKE in
19106 19101 [\\/]* | ?:[\\/]*)
19107 19102 ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19108 19103 ;;
19109 19104 *)
19110 19105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19111 19106 for as_dir in $PATH
19112 19107 do
19113 19108 IFS=$as_save_IFS
19114 19109 test -z "$as_dir" && as_dir=.
19115 19110 for ac_exec_ext in '' $ac_executable_extensions; do
19116 19111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19117 19112 ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19118 19113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19119 19114 break 2
19120 19115 fi
19121 19116 done
19122 19117 done
19123 19118 IFS=$as_save_IFS
19124 19119
19125 19120 ;;
19126 19121 esac
19127 19122 fi
19128 19123 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19129 19124 if test -n "$CHECK_GMAKE"; then
19130 19125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19131 19126 $as_echo "$CHECK_GMAKE" >&6; }
19132 19127 else
19133 19128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19134 19129 $as_echo "no" >&6; }
19135 19130 fi
19136 19131
19137 19132
19138 19133 test -n "$CHECK_GMAKE" && break
19139 19134 done
19140 19135
19141 19136
19142 19137 MAKE_CANDIDATE=""$CHECK_GMAKE""
19143 19138 DESCRIPTION="gmake in PATH"
19144 19139
19145 19140 # On Cygwin, we require a newer version of make than on other platforms
19146 19141 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19147 19142 MAKE_VERSION_EXPR="-e 4\."
19148 19143 MAKE_REQUIRED_VERSION="4.0"
19149 19144 else
19150 19145 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19151 19146 MAKE_REQUIRED_VERSION="3.81"
19152 19147 fi
19153 19148
19154 19149 if test "x$MAKE_CANDIDATE" != x; then
19155 19150 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19156 19151 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19157 19152 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19158 19153 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19159 19154 if test "x$IS_GNU_MAKE" = x; then
19160 19155 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19161 19156 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19162 19157 else
19163 19158 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19164 19159 if test "x$IS_MODERN_MAKE" = x; then
19165 19160 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19166 19161 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19167 19162 else
19168 19163 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19169 19164 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19170 19165 MAKE_EXPECTED_ENV='cygwin'
19171 19166 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19172 19167 MAKE_EXPECTED_ENV='msys'
19173 19168 else
19174 19169 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19175 19170 fi
19176 19171 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19177 19172 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19178 19173 else
19179 19174 # Not relevant for non-Windows
19180 19175 IS_MAKE_CORRECT_ENV=true
19181 19176 fi
19182 19177 if test "x$IS_MAKE_CORRECT_ENV" = x; then
19183 19178 { $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
19184 19179 $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;}
19185 19180 else
19186 19181 FOUND_MAKE=$MAKE_CANDIDATE
19187 19182
19188 19183 # Only process if variable expands to non-empty
19189 19184
19190 19185 if test "x$FOUND_MAKE" != x; then
19191 19186 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19192 19187
19193 19188 # First separate the path from the arguments. This will split at the first
19194 19189 # space.
19195 19190 complete="$FOUND_MAKE"
19196 19191 path="${complete%% *}"
19197 19192 tmp="$complete EOL"
19198 19193 arguments="${tmp#* }"
19199 19194
19200 19195 # Input might be given as Windows format, start by converting to
19201 19196 # unix format.
19202 19197 new_path=`$CYGPATH -u "$path"`
19203 19198
19204 19199 # Now try to locate executable using which
19205 19200 new_path=`$WHICH "$new_path" 2> /dev/null`
19206 19201 # bat and cmd files are not always considered executable in cygwin causing which
19207 19202 # to not find them
19208 19203 if test "x$new_path" = x \
19209 19204 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19210 19205 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19211 19206 new_path=`$CYGPATH -u "$path"`
19212 19207 fi
19213 19208 if test "x$new_path" = x; then
19214 19209 # Oops. Which didn't find the executable.
19215 19210 # The splitting of arguments from the executable at a space might have been incorrect,
19216 19211 # since paths with space are more likely in Windows. Give it another try with the whole
19217 19212 # argument.
19218 19213 path="$complete"
19219 19214 arguments="EOL"
19220 19215 new_path=`$CYGPATH -u "$path"`
19221 19216 new_path=`$WHICH "$new_path" 2> /dev/null`
19222 19217 # bat and cmd files are not always considered executable in cygwin causing which
19223 19218 # to not find them
19224 19219 if test "x$new_path" = x \
19225 19220 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19226 19221 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19227 19222 new_path=`$CYGPATH -u "$path"`
19228 19223 fi
19229 19224 if test "x$new_path" = x; then
19230 19225 # It's still not found. Now this is an unrecoverable error.
19231 19226 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19232 19227 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19233 19228 has_space=`$ECHO "$complete" | $GREP " "`
19234 19229 if test "x$has_space" != x; then
19235 19230 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19236 19231 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19237 19232 fi
19238 19233 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19239 19234 fi
19240 19235 fi
19241 19236
19242 19237 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19243 19238 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19244 19239 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19245 19240 # "foo.exe" is OK but "foo" is an error.
19246 19241 #
19247 19242 # This test is therefore slightly more accurate than "test -f" to check for file presence.
19248 19243 # It is also a way to make sure we got the proper file name for the real test later on.
19249 19244 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19250 19245 if test "x$test_shortpath" = x; then
19251 19246 # Short path failed, file does not exist as specified.
19252 19247 # Try adding .exe or .cmd
19253 19248 if test -f "${new_path}.exe"; then
19254 19249 input_to_shortpath="${new_path}.exe"
19255 19250 elif test -f "${new_path}.cmd"; then
19256 19251 input_to_shortpath="${new_path}.cmd"
19257 19252 else
19258 19253 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19259 19254 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19260 19255 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19261 19256 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19262 19257 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19263 19258 fi
19264 19259 else
19265 19260 input_to_shortpath="$new_path"
19266 19261 fi
19267 19262
19268 19263 # Call helper function which possibly converts this using DOS-style short mode.
19269 19264 # If so, the updated path is stored in $new_path.
19270 19265 new_path="$input_to_shortpath"
19271 19266
19272 19267 input_path="$input_to_shortpath"
19273 19268 # Check if we need to convert this using DOS-style short mode. If the path
19274 19269 # contains just simple characters, use it. Otherwise (spaces, weird characters),
19275 19270 # take no chances and rewrite it.
19276 19271 # Note: m4 eats our [], so we need to use [ and ] instead.
19277 19272 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19278 19273 if test "x$has_forbidden_chars" != x; then
19279 19274 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19280 19275 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19281 19276 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19282 19277 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19283 19278 # Going to short mode and back again did indeed matter. Since short mode is
19284 19279 # case insensitive, let's make it lowercase to improve readability.
19285 19280 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19286 19281 # Now convert it back to Unix-style (cygpath)
19287 19282 input_path=`$CYGPATH -u "$shortmode_path"`
19288 19283 new_path="$input_path"
19289 19284 fi
19290 19285 fi
19291 19286
19292 19287 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19293 19288 if test "x$test_cygdrive_prefix" = x; then
19294 19289 # As a simple fix, exclude /usr/bin since it's not a real path.
19295 19290 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19296 19291 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19297 19292 # a path prefixed by /cygdrive for fixpath to work.
19298 19293 new_path="$CYGWIN_ROOT_PATH$input_path"
19299 19294 fi
19300 19295 fi
19301 19296
19302 19297 # remove trailing .exe if any
19303 19298 new_path="${new_path/%.exe/}"
19304 19299
19305 19300 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19306 19301
19307 19302 # First separate the path from the arguments. This will split at the first
19308 19303 # space.
19309 19304 complete="$FOUND_MAKE"
19310 19305 path="${complete%% *}"
19311 19306 tmp="$complete EOL"
19312 19307 arguments="${tmp#* }"
19313 19308
19314 19309 # Input might be given as Windows format, start by converting to
19315 19310 # unix format.
19316 19311 new_path="$path"
19317 19312
19318 19313 windows_path="$new_path"
19319 19314 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19320 19315 unix_path=`$CYGPATH -u "$windows_path"`
19321 19316 new_path="$unix_path"
19322 19317 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19323 19318 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19324 19319 new_path="$unix_path"
19325 19320 fi
19326 19321
19327 19322
19328 19323 # Now try to locate executable using which
19329 19324 new_path=`$WHICH "$new_path" 2> /dev/null`
19330 19325
19331 19326 if test "x$new_path" = x; then
19332 19327 # Oops. Which didn't find the executable.
19333 19328 # The splitting of arguments from the executable at a space might have been incorrect,
19334 19329 # since paths with space are more likely in Windows. Give it another try with the whole
19335 19330 # argument.
19336 19331 path="$complete"
19337 19332 arguments="EOL"
19338 19333 new_path="$path"
19339 19334
19340 19335 windows_path="$new_path"
19341 19336 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19342 19337 unix_path=`$CYGPATH -u "$windows_path"`
19343 19338 new_path="$unix_path"
19344 19339 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19345 19340 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19346 19341 new_path="$unix_path"
19347 19342 fi
19348 19343
19349 19344
19350 19345 new_path=`$WHICH "$new_path" 2> /dev/null`
19351 19346 # bat and cmd files are not always considered executable in MSYS causing which
19352 19347 # to not find them
19353 19348 if test "x$new_path" = x \
19354 19349 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19355 19350 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19356 19351 new_path="$path"
19357 19352
19358 19353 windows_path="$new_path"
19359 19354 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19360 19355 unix_path=`$CYGPATH -u "$windows_path"`
19361 19356 new_path="$unix_path"
19362 19357 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19363 19358 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19364 19359 new_path="$unix_path"
19365 19360 fi
19366 19361
19367 19362 fi
19368 19363
19369 19364 if test "x$new_path" = x; then
19370 19365 # It's still not found. Now this is an unrecoverable error.
19371 19366 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19372 19367 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19373 19368 has_space=`$ECHO "$complete" | $GREP " "`
19374 19369 if test "x$has_space" != x; then
19375 19370 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19376 19371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19377 19372 fi
19378 19373 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19379 19374 fi
19380 19375 fi
19381 19376
19382 19377 # Now new_path has a complete unix path to the binary
19383 19378 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19384 19379 # Keep paths in /bin as-is, but remove trailing .exe if any
19385 19380 new_path="${new_path/%.exe/}"
19386 19381 # Do not save /bin paths to all_fixpath_prefixes!
19387 19382 else
19388 19383 # Not in mixed or Windows style, start by that.
19389 19384 new_path=`cmd //c echo $new_path`
19390 19385
19391 19386 input_path="$new_path"
19392 19387 # Check if we need to convert this using DOS-style short mode. If the path
19393 19388 # contains just simple characters, use it. Otherwise (spaces, weird characters),
19394 19389 # take no chances and rewrite it.
19395 19390 # Note: m4 eats our [], so we need to use [ and ] instead.
19396 19391 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19397 19392 if test "x$has_forbidden_chars" != x; then
19398 19393 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19399 19394 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19400 19395 fi
19401 19396
19402 19397 # Output is in $new_path
19403 19398
19404 19399 windows_path="$new_path"
19405 19400 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19406 19401 unix_path=`$CYGPATH -u "$windows_path"`
19407 19402 new_path="$unix_path"
19408 19403 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19409 19404 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19410 19405 new_path="$unix_path"
19411 19406 fi
19412 19407
19413 19408 # remove trailing .exe if any
19414 19409 new_path="${new_path/%.exe/}"
19415 19410
19416 19411 # Save the first 10 bytes of this path to the storage, so fixpath can work.
19417 19412 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19418 19413 fi
19419 19414
19420 19415 else
19421 19416 # We're on a unix platform. Hooray! :)
19422 19417 # First separate the path from the arguments. This will split at the first
19423 19418 # space.
19424 19419 complete="$FOUND_MAKE"
19425 19420 path="${complete%% *}"
19426 19421 tmp="$complete EOL"
19427 19422 arguments="${tmp#* }"
19428 19423
19429 19424 # Cannot rely on the command "which" here since it doesn't always work.
19430 19425 is_absolute_path=`$ECHO "$path" | $GREP ^/`
19431 19426 if test -z "$is_absolute_path"; then
19432 19427 # Path to executable is not absolute. Find it.
19433 19428 IFS_save="$IFS"
19434 19429 IFS=:
19435 19430 for p in $PATH; do
19436 19431 if test -f "$p/$path" && test -x "$p/$path"; then
19437 19432 new_path="$p/$path"
19438 19433 break
19439 19434 fi
19440 19435 done
19441 19436 IFS="$IFS_save"
19442 19437 else
19443 19438 # This is an absolute path, we can use it without further modifications.
19444 19439 new_path="$path"
19445 19440 fi
19446 19441
19447 19442 if test "x$new_path" = x; then
19448 19443 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19449 19444 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19450 19445 has_space=`$ECHO "$complete" | $GREP " "`
19451 19446 if test "x$has_space" != x; then
19452 19447 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19453 19448 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19454 19449 fi
19455 19450 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19456 19451 fi
19457 19452 fi
19458 19453
19459 19454 # Now join together the path and the arguments once again
19460 19455 if test "x$arguments" != xEOL; then
19461 19456 new_complete="$new_path ${arguments% *}"
19462 19457 else
19463 19458 new_complete="$new_path"
19464 19459 fi
19465 19460
19466 19461 if test "x$complete" != "x$new_complete"; then
19467 19462 FOUND_MAKE="$new_complete"
19468 19463 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19469 19464 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19470 19465 fi
19471 19466 fi
19472 19467
19473 19468 fi
19474 19469 fi
19475 19470 fi
19476 19471 fi
19477 19472
19478 19473
19479 19474 if test "x$FOUND_MAKE" = x; then
19480 19475 for ac_prog in make
19481 19476 do
19482 19477 # Extract the first word of "$ac_prog", so it can be a program name with args.
19483 19478 set dummy $ac_prog; ac_word=$2
19484 19479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19485 19480 $as_echo_n "checking for $ac_word... " >&6; }
19486 19481 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19487 19482 $as_echo_n "(cached) " >&6
19488 19483 else
19489 19484 case $CHECK_MAKE in
19490 19485 [\\/]* | ?:[\\/]*)
19491 19486 ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19492 19487 ;;
19493 19488 *)
19494 19489 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19495 19490 for as_dir in $PATH
19496 19491 do
19497 19492 IFS=$as_save_IFS
19498 19493 test -z "$as_dir" && as_dir=.
19499 19494 for ac_exec_ext in '' $ac_executable_extensions; do
19500 19495 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19501 19496 ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19502 19497 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19503 19498 break 2
19504 19499 fi
19505 19500 done
19506 19501 done
19507 19502 IFS=$as_save_IFS
19508 19503
19509 19504 ;;
19510 19505 esac
19511 19506 fi
19512 19507 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19513 19508 if test -n "$CHECK_MAKE"; then
19514 19509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19515 19510 $as_echo "$CHECK_MAKE" >&6; }
19516 19511 else
19517 19512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19518 19513 $as_echo "no" >&6; }
19519 19514 fi
19520 19515
19521 19516
19522 19517 test -n "$CHECK_MAKE" && break
19523 19518 done
19524 19519
19525 19520
19526 19521 MAKE_CANDIDATE=""$CHECK_MAKE""
19527 19522 DESCRIPTION="make in PATH"
19528 19523
19529 19524 # On Cygwin, we require a newer version of make than on other platforms
19530 19525 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19531 19526 MAKE_VERSION_EXPR="-e 4\."
19532 19527 MAKE_REQUIRED_VERSION="4.0"
19533 19528 else
19534 19529 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19535 19530 MAKE_REQUIRED_VERSION="3.81"
19536 19531 fi
19537 19532
19538 19533 if test "x$MAKE_CANDIDATE" != x; then
19539 19534 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19540 19535 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19541 19536 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19542 19537 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19543 19538 if test "x$IS_GNU_MAKE" = x; then
19544 19539 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19545 19540 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19546 19541 else
19547 19542 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19548 19543 if test "x$IS_MODERN_MAKE" = x; then
19549 19544 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19550 19545 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19551 19546 else
19552 19547 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19553 19548 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19554 19549 MAKE_EXPECTED_ENV='cygwin'
19555 19550 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19556 19551 MAKE_EXPECTED_ENV='msys'
19557 19552 else
19558 19553 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19559 19554 fi
19560 19555 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19561 19556 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19562 19557 else
19563 19558 # Not relevant for non-Windows
19564 19559 IS_MAKE_CORRECT_ENV=true
19565 19560 fi
19566 19561 if test "x$IS_MAKE_CORRECT_ENV" = x; then
19567 19562 { $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
19568 19563 $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;}
19569 19564 else
19570 19565 FOUND_MAKE=$MAKE_CANDIDATE
19571 19566
19572 19567 # Only process if variable expands to non-empty
19573 19568
19574 19569 if test "x$FOUND_MAKE" != x; then
19575 19570 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19576 19571
19577 19572 # First separate the path from the arguments. This will split at the first
19578 19573 # space.
19579 19574 complete="$FOUND_MAKE"
19580 19575 path="${complete%% *}"
19581 19576 tmp="$complete EOL"
19582 19577 arguments="${tmp#* }"
19583 19578
19584 19579 # Input might be given as Windows format, start by converting to
19585 19580 # unix format.
19586 19581 new_path=`$CYGPATH -u "$path"`
19587 19582
19588 19583 # Now try to locate executable using which
19589 19584 new_path=`$WHICH "$new_path" 2> /dev/null`
19590 19585 # bat and cmd files are not always considered executable in cygwin causing which
19591 19586 # to not find them
19592 19587 if test "x$new_path" = x \
19593 19588 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19594 19589 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19595 19590 new_path=`$CYGPATH -u "$path"`
19596 19591 fi
19597 19592 if test "x$new_path" = x; then
19598 19593 # Oops. Which didn't find the executable.
19599 19594 # The splitting of arguments from the executable at a space might have been incorrect,
19600 19595 # since paths with space are more likely in Windows. Give it another try with the whole
19601 19596 # argument.
19602 19597 path="$complete"
19603 19598 arguments="EOL"
19604 19599 new_path=`$CYGPATH -u "$path"`
19605 19600 new_path=`$WHICH "$new_path" 2> /dev/null`
19606 19601 # bat and cmd files are not always considered executable in cygwin causing which
19607 19602 # to not find them
19608 19603 if test "x$new_path" = x \
19609 19604 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19610 19605 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19611 19606 new_path=`$CYGPATH -u "$path"`
19612 19607 fi
19613 19608 if test "x$new_path" = x; then
19614 19609 # It's still not found. Now this is an unrecoverable error.
19615 19610 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19616 19611 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19617 19612 has_space=`$ECHO "$complete" | $GREP " "`
19618 19613 if test "x$has_space" != x; then
19619 19614 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19620 19615 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19621 19616 fi
19622 19617 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19623 19618 fi
19624 19619 fi
19625 19620
19626 19621 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19627 19622 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19628 19623 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19629 19624 # "foo.exe" is OK but "foo" is an error.
19630 19625 #
19631 19626 # This test is therefore slightly more accurate than "test -f" to check for file presence.
19632 19627 # It is also a way to make sure we got the proper file name for the real test later on.
19633 19628 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19634 19629 if test "x$test_shortpath" = x; then
19635 19630 # Short path failed, file does not exist as specified.
19636 19631 # Try adding .exe or .cmd
19637 19632 if test -f "${new_path}.exe"; then
19638 19633 input_to_shortpath="${new_path}.exe"
19639 19634 elif test -f "${new_path}.cmd"; then
19640 19635 input_to_shortpath="${new_path}.cmd"
19641 19636 else
19642 19637 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19643 19638 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19644 19639 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19645 19640 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19646 19641 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19647 19642 fi
19648 19643 else
19649 19644 input_to_shortpath="$new_path"
19650 19645 fi
19651 19646
19652 19647 # Call helper function which possibly converts this using DOS-style short mode.
19653 19648 # If so, the updated path is stored in $new_path.
19654 19649 new_path="$input_to_shortpath"
19655 19650
19656 19651 input_path="$input_to_shortpath"
19657 19652 # Check if we need to convert this using DOS-style short mode. If the path
19658 19653 # contains just simple characters, use it. Otherwise (spaces, weird characters),
19659 19654 # take no chances and rewrite it.
19660 19655 # Note: m4 eats our [], so we need to use [ and ] instead.
19661 19656 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19662 19657 if test "x$has_forbidden_chars" != x; then
19663 19658 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19664 19659 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19665 19660 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19666 19661 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19667 19662 # Going to short mode and back again did indeed matter. Since short mode is
19668 19663 # case insensitive, let's make it lowercase to improve readability.
19669 19664 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19670 19665 # Now convert it back to Unix-style (cygpath)
19671 19666 input_path=`$CYGPATH -u "$shortmode_path"`
19672 19667 new_path="$input_path"
19673 19668 fi
19674 19669 fi
19675 19670
19676 19671 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19677 19672 if test "x$test_cygdrive_prefix" = x; then
19678 19673 # As a simple fix, exclude /usr/bin since it's not a real path.
19679 19674 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19680 19675 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19681 19676 # a path prefixed by /cygdrive for fixpath to work.
19682 19677 new_path="$CYGWIN_ROOT_PATH$input_path"
19683 19678 fi
19684 19679 fi
19685 19680
19686 19681 # remove trailing .exe if any
19687 19682 new_path="${new_path/%.exe/}"
19688 19683
19689 19684 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19690 19685
19691 19686 # First separate the path from the arguments. This will split at the first
19692 19687 # space.
19693 19688 complete="$FOUND_MAKE"
19694 19689 path="${complete%% *}"
19695 19690 tmp="$complete EOL"
19696 19691 arguments="${tmp#* }"
19697 19692
19698 19693 # Input might be given as Windows format, start by converting to
19699 19694 # unix format.
19700 19695 new_path="$path"
19701 19696
19702 19697 windows_path="$new_path"
19703 19698 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19704 19699 unix_path=`$CYGPATH -u "$windows_path"`
19705 19700 new_path="$unix_path"
19706 19701 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19707 19702 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19708 19703 new_path="$unix_path"
19709 19704 fi
19710 19705
19711 19706
19712 19707 # Now try to locate executable using which
19713 19708 new_path=`$WHICH "$new_path" 2> /dev/null`
19714 19709
19715 19710 if test "x$new_path" = x; then
19716 19711 # Oops. Which didn't find the executable.
19717 19712 # The splitting of arguments from the executable at a space might have been incorrect,
19718 19713 # since paths with space are more likely in Windows. Give it another try with the whole
19719 19714 # argument.
19720 19715 path="$complete"
19721 19716 arguments="EOL"
19722 19717 new_path="$path"
19723 19718
19724 19719 windows_path="$new_path"
19725 19720 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19726 19721 unix_path=`$CYGPATH -u "$windows_path"`
19727 19722 new_path="$unix_path"
19728 19723 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19729 19724 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19730 19725 new_path="$unix_path"
19731 19726 fi
19732 19727
19733 19728
19734 19729 new_path=`$WHICH "$new_path" 2> /dev/null`
19735 19730 # bat and cmd files are not always considered executable in MSYS causing which
19736 19731 # to not find them
19737 19732 if test "x$new_path" = x \
19738 19733 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19739 19734 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19740 19735 new_path="$path"
19741 19736
19742 19737 windows_path="$new_path"
19743 19738 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19744 19739 unix_path=`$CYGPATH -u "$windows_path"`
19745 19740 new_path="$unix_path"
19746 19741 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19747 19742 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19748 19743 new_path="$unix_path"
19749 19744 fi
19750 19745
19751 19746 fi
19752 19747
19753 19748 if test "x$new_path" = x; then
19754 19749 # It's still not found. Now this is an unrecoverable error.
19755 19750 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19756 19751 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19757 19752 has_space=`$ECHO "$complete" | $GREP " "`
19758 19753 if test "x$has_space" != x; then
19759 19754 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19760 19755 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19761 19756 fi
19762 19757 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19763 19758 fi
19764 19759 fi
19765 19760
19766 19761 # Now new_path has a complete unix path to the binary
19767 19762 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19768 19763 # Keep paths in /bin as-is, but remove trailing .exe if any
19769 19764 new_path="${new_path/%.exe/}"
19770 19765 # Do not save /bin paths to all_fixpath_prefixes!
19771 19766 else
19772 19767 # Not in mixed or Windows style, start by that.
19773 19768 new_path=`cmd //c echo $new_path`
19774 19769
19775 19770 input_path="$new_path"
19776 19771 # Check if we need to convert this using DOS-style short mode. If the path
19777 19772 # contains just simple characters, use it. Otherwise (spaces, weird characters),
19778 19773 # take no chances and rewrite it.
19779 19774 # Note: m4 eats our [], so we need to use [ and ] instead.
19780 19775 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19781 19776 if test "x$has_forbidden_chars" != x; then
19782 19777 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19783 19778 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19784 19779 fi
19785 19780
19786 19781 # Output is in $new_path
19787 19782
19788 19783 windows_path="$new_path"
19789 19784 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19790 19785 unix_path=`$CYGPATH -u "$windows_path"`
19791 19786 new_path="$unix_path"
19792 19787 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19793 19788 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19794 19789 new_path="$unix_path"
19795 19790 fi
19796 19791
19797 19792 # remove trailing .exe if any
19798 19793 new_path="${new_path/%.exe/}"
19799 19794
19800 19795 # Save the first 10 bytes of this path to the storage, so fixpath can work.
19801 19796 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19802 19797 fi
19803 19798
19804 19799 else
19805 19800 # We're on a unix platform. Hooray! :)
19806 19801 # First separate the path from the arguments. This will split at the first
19807 19802 # space.
19808 19803 complete="$FOUND_MAKE"
19809 19804 path="${complete%% *}"
19810 19805 tmp="$complete EOL"
19811 19806 arguments="${tmp#* }"
19812 19807
19813 19808 # Cannot rely on the command "which" here since it doesn't always work.
19814 19809 is_absolute_path=`$ECHO "$path" | $GREP ^/`
19815 19810 if test -z "$is_absolute_path"; then
19816 19811 # Path to executable is not absolute. Find it.
19817 19812 IFS_save="$IFS"
19818 19813 IFS=:
19819 19814 for p in $PATH; do
19820 19815 if test -f "$p/$path" && test -x "$p/$path"; then
19821 19816 new_path="$p/$path"
19822 19817 break
19823 19818 fi
19824 19819 done
19825 19820 IFS="$IFS_save"
19826 19821 else
19827 19822 # This is an absolute path, we can use it without further modifications.
19828 19823 new_path="$path"
19829 19824 fi
19830 19825
19831 19826 if test "x$new_path" = x; then
19832 19827 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19833 19828 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19834 19829 has_space=`$ECHO "$complete" | $GREP " "`
19835 19830 if test "x$has_space" != x; then
19836 19831 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19837 19832 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19838 19833 fi
19839 19834 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19840 19835 fi
19841 19836 fi
19842 19837
19843 19838 # Now join together the path and the arguments once again
19844 19839 if test "x$arguments" != xEOL; then
19845 19840 new_complete="$new_path ${arguments% *}"
19846 19841 else
19847 19842 new_complete="$new_path"
19848 19843 fi
19849 19844
19850 19845 if test "x$complete" != "x$new_complete"; then
19851 19846 FOUND_MAKE="$new_complete"
19852 19847 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19853 19848 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19854 19849 fi
19855 19850 fi
19856 19851
19857 19852 fi
19858 19853 fi
19859 19854 fi
19860 19855 fi
19861 19856
19862 19857 fi
19863 19858
19864 19859 if test "x$FOUND_MAKE" = x; then
19865 19860 if test "x$TOOLCHAIN_PATH" != x; then
19866 19861 # We have a toolchain path, check that as well before giving up.
19867 19862 OLD_PATH=$PATH
19868 19863 PATH=$TOOLCHAIN_PATH:$PATH
19869 19864 for ac_prog in gmake
19870 19865 do
19871 19866 # Extract the first word of "$ac_prog", so it can be a program name with args.
19872 19867 set dummy $ac_prog; ac_word=$2
19873 19868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19874 19869 $as_echo_n "checking for $ac_word... " >&6; }
19875 19870 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19876 19871 $as_echo_n "(cached) " >&6
19877 19872 else
19878 19873 case $CHECK_TOOLSDIR_GMAKE in
19879 19874 [\\/]* | ?:[\\/]*)
19880 19875 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19881 19876 ;;
19882 19877 *)
19883 19878 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19884 19879 for as_dir in $PATH
19885 19880 do
19886 19881 IFS=$as_save_IFS
19887 19882 test -z "$as_dir" && as_dir=.
19888 19883 for ac_exec_ext in '' $ac_executable_extensions; do
19889 19884 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19890 19885 ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19891 19886 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19892 19887 break 2
19893 19888 fi
19894 19889 done
19895 19890 done
19896 19891 IFS=$as_save_IFS
19897 19892
19898 19893 ;;
19899 19894 esac
19900 19895 fi
19901 19896 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19902 19897 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19903 19898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19904 19899 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19905 19900 else
19906 19901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19907 19902 $as_echo "no" >&6; }
19908 19903 fi
19909 19904
19910 19905
19911 19906 test -n "$CHECK_TOOLSDIR_GMAKE" && break
19912 19907 done
19913 19908
19914 19909
19915 19910 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19916 19911 DESCRIPTION="gmake in tools-dir"
19917 19912
19918 19913 # On Cygwin, we require a newer version of make than on other platforms
19919 19914 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19920 19915 MAKE_VERSION_EXPR="-e 4\."
19921 19916 MAKE_REQUIRED_VERSION="4.0"
19922 19917 else
19923 19918 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19924 19919 MAKE_REQUIRED_VERSION="3.81"
19925 19920 fi
19926 19921
19927 19922 if test "x$MAKE_CANDIDATE" != x; then
19928 19923 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19929 19924 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19930 19925 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19931 19926 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19932 19927 if test "x$IS_GNU_MAKE" = x; then
19933 19928 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19934 19929 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19935 19930 else
19936 19931 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19937 19932 if test "x$IS_MODERN_MAKE" = x; then
19938 19933 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19939 19934 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19940 19935 else
19941 19936 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19942 19937 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19943 19938 MAKE_EXPECTED_ENV='cygwin'
19944 19939 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19945 19940 MAKE_EXPECTED_ENV='msys'
19946 19941 else
19947 19942 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19948 19943 fi
19949 19944 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19950 19945 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19951 19946 else
19952 19947 # Not relevant for non-Windows
19953 19948 IS_MAKE_CORRECT_ENV=true
19954 19949 fi
19955 19950 if test "x$IS_MAKE_CORRECT_ENV" = x; then
19956 19951 { $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
19957 19952 $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;}
19958 19953 else
19959 19954 FOUND_MAKE=$MAKE_CANDIDATE
19960 19955
19961 19956 # Only process if variable expands to non-empty
19962 19957
19963 19958 if test "x$FOUND_MAKE" != x; then
19964 19959 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19965 19960
19966 19961 # First separate the path from the arguments. This will split at the first
19967 19962 # space.
19968 19963 complete="$FOUND_MAKE"
19969 19964 path="${complete%% *}"
19970 19965 tmp="$complete EOL"
19971 19966 arguments="${tmp#* }"
19972 19967
19973 19968 # Input might be given as Windows format, start by converting to
19974 19969 # unix format.
19975 19970 new_path=`$CYGPATH -u "$path"`
19976 19971
19977 19972 # Now try to locate executable using which
19978 19973 new_path=`$WHICH "$new_path" 2> /dev/null`
19979 19974 # bat and cmd files are not always considered executable in cygwin causing which
19980 19975 # to not find them
19981 19976 if test "x$new_path" = x \
19982 19977 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19983 19978 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19984 19979 new_path=`$CYGPATH -u "$path"`
19985 19980 fi
19986 19981 if test "x$new_path" = x; then
19987 19982 # Oops. Which didn't find the executable.
19988 19983 # The splitting of arguments from the executable at a space might have been incorrect,
19989 19984 # since paths with space are more likely in Windows. Give it another try with the whole
19990 19985 # argument.
19991 19986 path="$complete"
19992 19987 arguments="EOL"
19993 19988 new_path=`$CYGPATH -u "$path"`
19994 19989 new_path=`$WHICH "$new_path" 2> /dev/null`
19995 19990 # bat and cmd files are not always considered executable in cygwin causing which
19996 19991 # to not find them
19997 19992 if test "x$new_path" = x \
19998 19993 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19999 19994 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20000 19995 new_path=`$CYGPATH -u "$path"`
20001 19996 fi
20002 19997 if test "x$new_path" = x; then
20003 19998 # It's still not found. Now this is an unrecoverable error.
20004 19999 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20005 20000 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20006 20001 has_space=`$ECHO "$complete" | $GREP " "`
20007 20002 if test "x$has_space" != x; then
20008 20003 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20009 20004 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20010 20005 fi
20011 20006 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20012 20007 fi
20013 20008 fi
20014 20009
20015 20010 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20016 20011 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20017 20012 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20018 20013 # "foo.exe" is OK but "foo" is an error.
20019 20014 #
20020 20015 # This test is therefore slightly more accurate than "test -f" to check for file presence.
20021 20016 # It is also a way to make sure we got the proper file name for the real test later on.
20022 20017 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20023 20018 if test "x$test_shortpath" = x; then
20024 20019 # Short path failed, file does not exist as specified.
20025 20020 # Try adding .exe or .cmd
20026 20021 if test -f "${new_path}.exe"; then
20027 20022 input_to_shortpath="${new_path}.exe"
20028 20023 elif test -f "${new_path}.cmd"; then
20029 20024 input_to_shortpath="${new_path}.cmd"
20030 20025 else
20031 20026 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20032 20027 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20033 20028 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20034 20029 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20035 20030 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20036 20031 fi
20037 20032 else
20038 20033 input_to_shortpath="$new_path"
20039 20034 fi
20040 20035
20041 20036 # Call helper function which possibly converts this using DOS-style short mode.
20042 20037 # If so, the updated path is stored in $new_path.
20043 20038 new_path="$input_to_shortpath"
20044 20039
20045 20040 input_path="$input_to_shortpath"
20046 20041 # Check if we need to convert this using DOS-style short mode. If the path
20047 20042 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20048 20043 # take no chances and rewrite it.
20049 20044 # Note: m4 eats our [], so we need to use [ and ] instead.
20050 20045 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20051 20046 if test "x$has_forbidden_chars" != x; then
20052 20047 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20053 20048 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20054 20049 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20055 20050 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20056 20051 # Going to short mode and back again did indeed matter. Since short mode is
20057 20052 # case insensitive, let's make it lowercase to improve readability.
20058 20053 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20059 20054 # Now convert it back to Unix-style (cygpath)
20060 20055 input_path=`$CYGPATH -u "$shortmode_path"`
20061 20056 new_path="$input_path"
20062 20057 fi
20063 20058 fi
20064 20059
20065 20060 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20066 20061 if test "x$test_cygdrive_prefix" = x; then
20067 20062 # As a simple fix, exclude /usr/bin since it's not a real path.
20068 20063 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20069 20064 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20070 20065 # a path prefixed by /cygdrive for fixpath to work.
20071 20066 new_path="$CYGWIN_ROOT_PATH$input_path"
20072 20067 fi
20073 20068 fi
20074 20069
20075 20070 # remove trailing .exe if any
20076 20071 new_path="${new_path/%.exe/}"
20077 20072
20078 20073 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20079 20074
20080 20075 # First separate the path from the arguments. This will split at the first
20081 20076 # space.
20082 20077 complete="$FOUND_MAKE"
20083 20078 path="${complete%% *}"
20084 20079 tmp="$complete EOL"
20085 20080 arguments="${tmp#* }"
20086 20081
20087 20082 # Input might be given as Windows format, start by converting to
20088 20083 # unix format.
20089 20084 new_path="$path"
20090 20085
20091 20086 windows_path="$new_path"
20092 20087 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20093 20088 unix_path=`$CYGPATH -u "$windows_path"`
20094 20089 new_path="$unix_path"
20095 20090 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20096 20091 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20097 20092 new_path="$unix_path"
20098 20093 fi
20099 20094
20100 20095
20101 20096 # Now try to locate executable using which
20102 20097 new_path=`$WHICH "$new_path" 2> /dev/null`
20103 20098
20104 20099 if test "x$new_path" = x; then
20105 20100 # Oops. Which didn't find the executable.
20106 20101 # The splitting of arguments from the executable at a space might have been incorrect,
20107 20102 # since paths with space are more likely in Windows. Give it another try with the whole
20108 20103 # argument.
20109 20104 path="$complete"
20110 20105 arguments="EOL"
20111 20106 new_path="$path"
20112 20107
20113 20108 windows_path="$new_path"
20114 20109 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20115 20110 unix_path=`$CYGPATH -u "$windows_path"`
20116 20111 new_path="$unix_path"
20117 20112 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20118 20113 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20119 20114 new_path="$unix_path"
20120 20115 fi
20121 20116
20122 20117
20123 20118 new_path=`$WHICH "$new_path" 2> /dev/null`
20124 20119 # bat and cmd files are not always considered executable in MSYS causing which
20125 20120 # to not find them
20126 20121 if test "x$new_path" = x \
20127 20122 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20128 20123 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20129 20124 new_path="$path"
20130 20125
20131 20126 windows_path="$new_path"
20132 20127 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20133 20128 unix_path=`$CYGPATH -u "$windows_path"`
20134 20129 new_path="$unix_path"
20135 20130 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20136 20131 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20137 20132 new_path="$unix_path"
20138 20133 fi
20139 20134
20140 20135 fi
20141 20136
20142 20137 if test "x$new_path" = x; then
20143 20138 # It's still not found. Now this is an unrecoverable error.
20144 20139 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20145 20140 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20146 20141 has_space=`$ECHO "$complete" | $GREP " "`
20147 20142 if test "x$has_space" != x; then
20148 20143 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20149 20144 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20150 20145 fi
20151 20146 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20152 20147 fi
20153 20148 fi
20154 20149
20155 20150 # Now new_path has a complete unix path to the binary
20156 20151 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20157 20152 # Keep paths in /bin as-is, but remove trailing .exe if any
20158 20153 new_path="${new_path/%.exe/}"
20159 20154 # Do not save /bin paths to all_fixpath_prefixes!
20160 20155 else
20161 20156 # Not in mixed or Windows style, start by that.
20162 20157 new_path=`cmd //c echo $new_path`
20163 20158
20164 20159 input_path="$new_path"
20165 20160 # Check if we need to convert this using DOS-style short mode. If the path
20166 20161 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20167 20162 # take no chances and rewrite it.
20168 20163 # Note: m4 eats our [], so we need to use [ and ] instead.
20169 20164 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20170 20165 if test "x$has_forbidden_chars" != x; then
20171 20166 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20172 20167 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20173 20168 fi
20174 20169
20175 20170 # Output is in $new_path
20176 20171
20177 20172 windows_path="$new_path"
20178 20173 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20179 20174 unix_path=`$CYGPATH -u "$windows_path"`
20180 20175 new_path="$unix_path"
20181 20176 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20182 20177 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20183 20178 new_path="$unix_path"
20184 20179 fi
20185 20180
20186 20181 # remove trailing .exe if any
20187 20182 new_path="${new_path/%.exe/}"
20188 20183
20189 20184 # Save the first 10 bytes of this path to the storage, so fixpath can work.
20190 20185 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20191 20186 fi
20192 20187
20193 20188 else
20194 20189 # We're on a unix platform. Hooray! :)
20195 20190 # First separate the path from the arguments. This will split at the first
20196 20191 # space.
20197 20192 complete="$FOUND_MAKE"
20198 20193 path="${complete%% *}"
20199 20194 tmp="$complete EOL"
20200 20195 arguments="${tmp#* }"
20201 20196
20202 20197 # Cannot rely on the command "which" here since it doesn't always work.
20203 20198 is_absolute_path=`$ECHO "$path" | $GREP ^/`
20204 20199 if test -z "$is_absolute_path"; then
20205 20200 # Path to executable is not absolute. Find it.
20206 20201 IFS_save="$IFS"
20207 20202 IFS=:
20208 20203 for p in $PATH; do
20209 20204 if test -f "$p/$path" && test -x "$p/$path"; then
20210 20205 new_path="$p/$path"
20211 20206 break
20212 20207 fi
20213 20208 done
20214 20209 IFS="$IFS_save"
20215 20210 else
20216 20211 # This is an absolute path, we can use it without further modifications.
20217 20212 new_path="$path"
20218 20213 fi
20219 20214
20220 20215 if test "x$new_path" = x; then
20221 20216 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20222 20217 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20223 20218 has_space=`$ECHO "$complete" | $GREP " "`
20224 20219 if test "x$has_space" != x; then
20225 20220 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20226 20221 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20227 20222 fi
20228 20223 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20229 20224 fi
20230 20225 fi
20231 20226
20232 20227 # Now join together the path and the arguments once again
20233 20228 if test "x$arguments" != xEOL; then
20234 20229 new_complete="$new_path ${arguments% *}"
20235 20230 else
20236 20231 new_complete="$new_path"
20237 20232 fi
20238 20233
20239 20234 if test "x$complete" != "x$new_complete"; then
20240 20235 FOUND_MAKE="$new_complete"
20241 20236 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20242 20237 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20243 20238 fi
20244 20239 fi
20245 20240
20246 20241 fi
20247 20242 fi
20248 20243 fi
20249 20244 fi
20250 20245
20251 20246 if test "x$FOUND_MAKE" = x; then
20252 20247 for ac_prog in make
20253 20248 do
20254 20249 # Extract the first word of "$ac_prog", so it can be a program name with args.
20255 20250 set dummy $ac_prog; ac_word=$2
20256 20251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20257 20252 $as_echo_n "checking for $ac_word... " >&6; }
20258 20253 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20259 20254 $as_echo_n "(cached) " >&6
20260 20255 else
20261 20256 case $CHECK_TOOLSDIR_MAKE in
20262 20257 [\\/]* | ?:[\\/]*)
20263 20258 ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20264 20259 ;;
20265 20260 *)
20266 20261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20267 20262 for as_dir in $PATH
20268 20263 do
20269 20264 IFS=$as_save_IFS
20270 20265 test -z "$as_dir" && as_dir=.
20271 20266 for ac_exec_ext in '' $ac_executable_extensions; do
20272 20267 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20273 20268 ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20274 20269 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20275 20270 break 2
20276 20271 fi
20277 20272 done
20278 20273 done
20279 20274 IFS=$as_save_IFS
20280 20275
20281 20276 ;;
20282 20277 esac
20283 20278 fi
20284 20279 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20285 20280 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20286 20281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20287 20282 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20288 20283 else
20289 20284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20290 20285 $as_echo "no" >&6; }
20291 20286 fi
20292 20287
20293 20288
20294 20289 test -n "$CHECK_TOOLSDIR_MAKE" && break
20295 20290 done
20296 20291
20297 20292
20298 20293 MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20299 20294 DESCRIPTION="make in tools-dir"
20300 20295
20301 20296 # On Cygwin, we require a newer version of make than on other platforms
20302 20297 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20303 20298 MAKE_VERSION_EXPR="-e 4\."
20304 20299 MAKE_REQUIRED_VERSION="4.0"
20305 20300 else
20306 20301 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20307 20302 MAKE_REQUIRED_VERSION="3.81"
20308 20303 fi
20309 20304
20310 20305 if test "x$MAKE_CANDIDATE" != x; then
20311 20306 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20312 20307 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20313 20308 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20314 20309 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20315 20310 if test "x$IS_GNU_MAKE" = x; then
20316 20311 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20317 20312 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20318 20313 else
20319 20314 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20320 20315 if test "x$IS_MODERN_MAKE" = x; then
20321 20316 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20322 20317 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20323 20318 else
20324 20319 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20325 20320 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20326 20321 MAKE_EXPECTED_ENV='cygwin'
20327 20322 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20328 20323 MAKE_EXPECTED_ENV='msys'
20329 20324 else
20330 20325 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20331 20326 fi
20332 20327 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20333 20328 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20334 20329 else
20335 20330 # Not relevant for non-Windows
20336 20331 IS_MAKE_CORRECT_ENV=true
20337 20332 fi
20338 20333 if test "x$IS_MAKE_CORRECT_ENV" = x; then
20339 20334 { $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
20340 20335 $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;}
20341 20336 else
20342 20337 FOUND_MAKE=$MAKE_CANDIDATE
20343 20338
20344 20339 # Only process if variable expands to non-empty
20345 20340
20346 20341 if test "x$FOUND_MAKE" != x; then
20347 20342 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20348 20343
20349 20344 # First separate the path from the arguments. This will split at the first
20350 20345 # space.
20351 20346 complete="$FOUND_MAKE"
20352 20347 path="${complete%% *}"
20353 20348 tmp="$complete EOL"
20354 20349 arguments="${tmp#* }"
20355 20350
20356 20351 # Input might be given as Windows format, start by converting to
20357 20352 # unix format.
20358 20353 new_path=`$CYGPATH -u "$path"`
20359 20354
20360 20355 # Now try to locate executable using which
20361 20356 new_path=`$WHICH "$new_path" 2> /dev/null`
20362 20357 # bat and cmd files are not always considered executable in cygwin causing which
20363 20358 # to not find them
20364 20359 if test "x$new_path" = x \
20365 20360 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20366 20361 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20367 20362 new_path=`$CYGPATH -u "$path"`
20368 20363 fi
20369 20364 if test "x$new_path" = x; then
20370 20365 # Oops. Which didn't find the executable.
20371 20366 # The splitting of arguments from the executable at a space might have been incorrect,
20372 20367 # since paths with space are more likely in Windows. Give it another try with the whole
20373 20368 # argument.
20374 20369 path="$complete"
20375 20370 arguments="EOL"
20376 20371 new_path=`$CYGPATH -u "$path"`
20377 20372 new_path=`$WHICH "$new_path" 2> /dev/null`
20378 20373 # bat and cmd files are not always considered executable in cygwin causing which
20379 20374 # to not find them
20380 20375 if test "x$new_path" = x \
20381 20376 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20382 20377 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20383 20378 new_path=`$CYGPATH -u "$path"`
20384 20379 fi
20385 20380 if test "x$new_path" = x; then
20386 20381 # It's still not found. Now this is an unrecoverable error.
20387 20382 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20388 20383 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20389 20384 has_space=`$ECHO "$complete" | $GREP " "`
20390 20385 if test "x$has_space" != x; then
20391 20386 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20392 20387 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20393 20388 fi
20394 20389 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20395 20390 fi
20396 20391 fi
20397 20392
20398 20393 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20399 20394 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20400 20395 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20401 20396 # "foo.exe" is OK but "foo" is an error.
20402 20397 #
20403 20398 # This test is therefore slightly more accurate than "test -f" to check for file presence.
20404 20399 # It is also a way to make sure we got the proper file name for the real test later on.
20405 20400 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20406 20401 if test "x$test_shortpath" = x; then
20407 20402 # Short path failed, file does not exist as specified.
20408 20403 # Try adding .exe or .cmd
20409 20404 if test -f "${new_path}.exe"; then
20410 20405 input_to_shortpath="${new_path}.exe"
20411 20406 elif test -f "${new_path}.cmd"; then
20412 20407 input_to_shortpath="${new_path}.cmd"
20413 20408 else
20414 20409 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20415 20410 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20416 20411 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20417 20412 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20418 20413 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20419 20414 fi
20420 20415 else
20421 20416 input_to_shortpath="$new_path"
20422 20417 fi
20423 20418
20424 20419 # Call helper function which possibly converts this using DOS-style short mode.
20425 20420 # If so, the updated path is stored in $new_path.
20426 20421 new_path="$input_to_shortpath"
20427 20422
20428 20423 input_path="$input_to_shortpath"
20429 20424 # Check if we need to convert this using DOS-style short mode. If the path
20430 20425 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20431 20426 # take no chances and rewrite it.
20432 20427 # Note: m4 eats our [], so we need to use [ and ] instead.
20433 20428 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20434 20429 if test "x$has_forbidden_chars" != x; then
20435 20430 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20436 20431 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20437 20432 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20438 20433 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20439 20434 # Going to short mode and back again did indeed matter. Since short mode is
20440 20435 # case insensitive, let's make it lowercase to improve readability.
20441 20436 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20442 20437 # Now convert it back to Unix-style (cygpath)
20443 20438 input_path=`$CYGPATH -u "$shortmode_path"`
20444 20439 new_path="$input_path"
20445 20440 fi
20446 20441 fi
20447 20442
20448 20443 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20449 20444 if test "x$test_cygdrive_prefix" = x; then
20450 20445 # As a simple fix, exclude /usr/bin since it's not a real path.
20451 20446 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20452 20447 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20453 20448 # a path prefixed by /cygdrive for fixpath to work.
20454 20449 new_path="$CYGWIN_ROOT_PATH$input_path"
20455 20450 fi
20456 20451 fi
20457 20452
20458 20453 # remove trailing .exe if any
20459 20454 new_path="${new_path/%.exe/}"
20460 20455
20461 20456 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20462 20457
20463 20458 # First separate the path from the arguments. This will split at the first
20464 20459 # space.
20465 20460 complete="$FOUND_MAKE"
20466 20461 path="${complete%% *}"
20467 20462 tmp="$complete EOL"
20468 20463 arguments="${tmp#* }"
20469 20464
20470 20465 # Input might be given as Windows format, start by converting to
20471 20466 # unix format.
20472 20467 new_path="$path"
20473 20468
20474 20469 windows_path="$new_path"
20475 20470 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20476 20471 unix_path=`$CYGPATH -u "$windows_path"`
20477 20472 new_path="$unix_path"
20478 20473 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20479 20474 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20480 20475 new_path="$unix_path"
20481 20476 fi
20482 20477
20483 20478
20484 20479 # Now try to locate executable using which
20485 20480 new_path=`$WHICH "$new_path" 2> /dev/null`
20486 20481
20487 20482 if test "x$new_path" = x; then
20488 20483 # Oops. Which didn't find the executable.
20489 20484 # The splitting of arguments from the executable at a space might have been incorrect,
20490 20485 # since paths with space are more likely in Windows. Give it another try with the whole
20491 20486 # argument.
20492 20487 path="$complete"
20493 20488 arguments="EOL"
20494 20489 new_path="$path"
20495 20490
20496 20491 windows_path="$new_path"
20497 20492 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20498 20493 unix_path=`$CYGPATH -u "$windows_path"`
20499 20494 new_path="$unix_path"
20500 20495 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20501 20496 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20502 20497 new_path="$unix_path"
20503 20498 fi
20504 20499
20505 20500
20506 20501 new_path=`$WHICH "$new_path" 2> /dev/null`
20507 20502 # bat and cmd files are not always considered executable in MSYS causing which
20508 20503 # to not find them
20509 20504 if test "x$new_path" = x \
20510 20505 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20511 20506 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20512 20507 new_path="$path"
20513 20508
20514 20509 windows_path="$new_path"
20515 20510 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20516 20511 unix_path=`$CYGPATH -u "$windows_path"`
20517 20512 new_path="$unix_path"
20518 20513 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20519 20514 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20520 20515 new_path="$unix_path"
20521 20516 fi
20522 20517
20523 20518 fi
20524 20519
20525 20520 if test "x$new_path" = x; then
20526 20521 # It's still not found. Now this is an unrecoverable error.
20527 20522 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20528 20523 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20529 20524 has_space=`$ECHO "$complete" | $GREP " "`
20530 20525 if test "x$has_space" != x; then
20531 20526 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20532 20527 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20533 20528 fi
20534 20529 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20535 20530 fi
20536 20531 fi
20537 20532
20538 20533 # Now new_path has a complete unix path to the binary
20539 20534 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20540 20535 # Keep paths in /bin as-is, but remove trailing .exe if any
20541 20536 new_path="${new_path/%.exe/}"
20542 20537 # Do not save /bin paths to all_fixpath_prefixes!
20543 20538 else
20544 20539 # Not in mixed or Windows style, start by that.
20545 20540 new_path=`cmd //c echo $new_path`
20546 20541
20547 20542 input_path="$new_path"
20548 20543 # Check if we need to convert this using DOS-style short mode. If the path
20549 20544 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20550 20545 # take no chances and rewrite it.
20551 20546 # Note: m4 eats our [], so we need to use [ and ] instead.
20552 20547 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20553 20548 if test "x$has_forbidden_chars" != x; then
20554 20549 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20555 20550 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20556 20551 fi
20557 20552
20558 20553 # Output is in $new_path
20559 20554
20560 20555 windows_path="$new_path"
20561 20556 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20562 20557 unix_path=`$CYGPATH -u "$windows_path"`
20563 20558 new_path="$unix_path"
20564 20559 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20565 20560 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20566 20561 new_path="$unix_path"
20567 20562 fi
20568 20563
20569 20564 # remove trailing .exe if any
20570 20565 new_path="${new_path/%.exe/}"
20571 20566
20572 20567 # Save the first 10 bytes of this path to the storage, so fixpath can work.
20573 20568 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20574 20569 fi
20575 20570
20576 20571 else
20577 20572 # We're on a unix platform. Hooray! :)
20578 20573 # First separate the path from the arguments. This will split at the first
20579 20574 # space.
20580 20575 complete="$FOUND_MAKE"
20581 20576 path="${complete%% *}"
20582 20577 tmp="$complete EOL"
20583 20578 arguments="${tmp#* }"
20584 20579
20585 20580 # Cannot rely on the command "which" here since it doesn't always work.
20586 20581 is_absolute_path=`$ECHO "$path" | $GREP ^/`
20587 20582 if test -z "$is_absolute_path"; then
20588 20583 # Path to executable is not absolute. Find it.
20589 20584 IFS_save="$IFS"
20590 20585 IFS=:
20591 20586 for p in $PATH; do
20592 20587 if test -f "$p/$path" && test -x "$p/$path"; then
20593 20588 new_path="$p/$path"
20594 20589 break
20595 20590 fi
20596 20591 done
20597 20592 IFS="$IFS_save"
20598 20593 else
20599 20594 # This is an absolute path, we can use it without further modifications.
20600 20595 new_path="$path"
20601 20596 fi
20602 20597
20603 20598 if test "x$new_path" = x; then
20604 20599 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20605 20600 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20606 20601 has_space=`$ECHO "$complete" | $GREP " "`
20607 20602 if test "x$has_space" != x; then
20608 20603 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20609 20604 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20610 20605 fi
20611 20606 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20612 20607 fi
20613 20608 fi
20614 20609
20615 20610 # Now join together the path and the arguments once again
20616 20611 if test "x$arguments" != xEOL; then
20617 20612 new_complete="$new_path ${arguments% *}"
20618 20613 else
20619 20614 new_complete="$new_path"
20620 20615 fi
20621 20616
20622 20617 if test "x$complete" != "x$new_complete"; then
20623 20618 FOUND_MAKE="$new_complete"
20624 20619 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20625 20620 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20626 20621 fi
20627 20622 fi
20628 20623
20629 20624 fi
20630 20625 fi
20631 20626 fi
20632 20627 fi
20633 20628
20634 20629 fi
20635 20630 PATH=$OLD_PATH
20636 20631 fi
20637 20632 fi
20638 20633
20639 20634 if test "x$FOUND_MAKE" = x; then
20640 20635 as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
20641 20636 fi
20642 20637
20643 20638 else
20644 20639 # If it succeeded, then it was overridden by the user. We will use it
20645 20640 # for the tool.
20646 20641
20647 20642 # First remove it from the list of overridden variables, so we can test
20648 20643 # for unknown variables in the end.
20649 20644 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20650 20645
20651 20646 # Check if we try to supply an empty value
20652 20647 if test "x$MAKE" = x; then
20653 20648 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20654 20649 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20655 20650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20656 20651 $as_echo_n "checking for MAKE... " >&6; }
20657 20652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20658 20653 $as_echo "disabled" >&6; }
20659 20654 else
20660 20655 # Check if the provided tool contains a complete path.
20661 20656 tool_specified="$MAKE"
20662 20657 tool_basename="${tool_specified##*/}"
20663 20658 if test "x$tool_basename" = "x$tool_specified"; then
20664 20659 # A command without a complete path is provided, search $PATH.
20665 20660 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20666 20661 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20667 20662 # Extract the first word of "$tool_basename", so it can be a program name with args.
20668 20663 set dummy $tool_basename; ac_word=$2
20669 20664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20670 20665 $as_echo_n "checking for $ac_word... " >&6; }
20671 20666 if ${ac_cv_path_MAKE+:} false; then :
20672 20667 $as_echo_n "(cached) " >&6
20673 20668 else
20674 20669 case $MAKE in
20675 20670 [\\/]* | ?:[\\/]*)
20676 20671 ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20677 20672 ;;
20678 20673 *)
20679 20674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20680 20675 for as_dir in $PATH
20681 20676 do
20682 20677 IFS=$as_save_IFS
20683 20678 test -z "$as_dir" && as_dir=.
20684 20679 for ac_exec_ext in '' $ac_executable_extensions; do
20685 20680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20686 20681 ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20687 20682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20688 20683 break 2
20689 20684 fi
20690 20685 done
20691 20686 done
20692 20687 IFS=$as_save_IFS
20693 20688
20694 20689 ;;
20695 20690 esac
20696 20691 fi
20697 20692 MAKE=$ac_cv_path_MAKE
20698 20693 if test -n "$MAKE"; then
20699 20694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20700 20695 $as_echo "$MAKE" >&6; }
20701 20696 else
20702 20697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20703 20698 $as_echo "no" >&6; }
20704 20699 fi
20705 20700
20706 20701
20707 20702 if test "x$MAKE" = x; then
20708 20703 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20709 20704 fi
20710 20705 else
20711 20706 # Otherwise we believe it is a complete path. Use it as it is.
20712 20707 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20713 20708 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20714 20709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20715 20710 $as_echo_n "checking for MAKE... " >&6; }
20716 20711 if test ! -x "$tool_specified"; then
20717 20712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20718 20713 $as_echo "not found" >&6; }
20719 20714 as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20720 20715 fi
20721 20716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20722 20717 $as_echo "$tool_specified" >&6; }
20723 20718 fi
20724 20719 fi
20725 20720 fi
20726 20721
20727 20722 # If MAKE was set by user, verify the version
20728 20723
20729 20724 MAKE_CANDIDATE=""$MAKE""
20730 20725 DESCRIPTION="user supplied MAKE=$MAKE"
20731 20726
20732 20727 # On Cygwin, we require a newer version of make than on other platforms
20733 20728 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20734 20729 MAKE_VERSION_EXPR="-e 4\."
20735 20730 MAKE_REQUIRED_VERSION="4.0"
20736 20731 else
20737 20732 MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20738 20733 MAKE_REQUIRED_VERSION="3.81"
20739 20734 fi
20740 20735
20741 20736 if test "x$MAKE_CANDIDATE" != x; then
20742 20737 { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20743 20738 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20744 20739 MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20745 20740 IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20746 20741 if test "x$IS_GNU_MAKE" = x; then
20747 20742 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20748 20743 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20749 20744 else
20750 20745 IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20751 20746 if test "x$IS_MODERN_MAKE" = x; then
20752 20747 { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20753 20748 $as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20754 20749 else
20755 20750 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20756 20751 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20757 20752 MAKE_EXPECTED_ENV='cygwin'
20758 20753 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20759 20754 MAKE_EXPECTED_ENV='msys'
20760 20755 else
20761 20756 as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20762 20757 fi
20763 20758 MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20764 20759 IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20765 20760 else
20766 20761 # Not relevant for non-Windows
20767 20762 IS_MAKE_CORRECT_ENV=true
20768 20763 fi
20769 20764 if test "x$IS_MAKE_CORRECT_ENV" = x; then
20770 20765 { $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
20771 20766 $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;}
20772 20767 else
20773 20768 FOUND_MAKE=$MAKE_CANDIDATE
20774 20769
20775 20770 # Only process if variable expands to non-empty
20776 20771
20777 20772 if test "x$FOUND_MAKE" != x; then
20778 20773 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20779 20774
20780 20775 # First separate the path from the arguments. This will split at the first
20781 20776 # space.
20782 20777 complete="$FOUND_MAKE"
20783 20778 path="${complete%% *}"
20784 20779 tmp="$complete EOL"
20785 20780 arguments="${tmp#* }"
20786 20781
20787 20782 # Input might be given as Windows format, start by converting to
20788 20783 # unix format.
20789 20784 new_path=`$CYGPATH -u "$path"`
20790 20785
20791 20786 # Now try to locate executable using which
20792 20787 new_path=`$WHICH "$new_path" 2> /dev/null`
20793 20788 # bat and cmd files are not always considered executable in cygwin causing which
20794 20789 # to not find them
20795 20790 if test "x$new_path" = x \
20796 20791 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20797 20792 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20798 20793 new_path=`$CYGPATH -u "$path"`
20799 20794 fi
20800 20795 if test "x$new_path" = x; then
20801 20796 # Oops. Which didn't find the executable.
20802 20797 # The splitting of arguments from the executable at a space might have been incorrect,
20803 20798 # since paths with space are more likely in Windows. Give it another try with the whole
20804 20799 # argument.
20805 20800 path="$complete"
20806 20801 arguments="EOL"
20807 20802 new_path=`$CYGPATH -u "$path"`
20808 20803 new_path=`$WHICH "$new_path" 2> /dev/null`
20809 20804 # bat and cmd files are not always considered executable in cygwin causing which
20810 20805 # to not find them
20811 20806 if test "x$new_path" = x \
20812 20807 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20813 20808 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20814 20809 new_path=`$CYGPATH -u "$path"`
20815 20810 fi
20816 20811 if test "x$new_path" = x; then
20817 20812 # It's still not found. Now this is an unrecoverable error.
20818 20813 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20819 20814 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20820 20815 has_space=`$ECHO "$complete" | $GREP " "`
20821 20816 if test "x$has_space" != x; then
20822 20817 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20823 20818 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20824 20819 fi
20825 20820 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20826 20821 fi
20827 20822 fi
20828 20823
20829 20824 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20830 20825 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20831 20826 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20832 20827 # "foo.exe" is OK but "foo" is an error.
20833 20828 #
20834 20829 # This test is therefore slightly more accurate than "test -f" to check for file presence.
20835 20830 # It is also a way to make sure we got the proper file name for the real test later on.
20836 20831 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20837 20832 if test "x$test_shortpath" = x; then
20838 20833 # Short path failed, file does not exist as specified.
20839 20834 # Try adding .exe or .cmd
20840 20835 if test -f "${new_path}.exe"; then
20841 20836 input_to_shortpath="${new_path}.exe"
20842 20837 elif test -f "${new_path}.cmd"; then
20843 20838 input_to_shortpath="${new_path}.cmd"
20844 20839 else
20845 20840 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20846 20841 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20847 20842 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20848 20843 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20849 20844 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20850 20845 fi
20851 20846 else
20852 20847 input_to_shortpath="$new_path"
20853 20848 fi
20854 20849
20855 20850 # Call helper function which possibly converts this using DOS-style short mode.
20856 20851 # If so, the updated path is stored in $new_path.
20857 20852 new_path="$input_to_shortpath"
20858 20853
20859 20854 input_path="$input_to_shortpath"
20860 20855 # Check if we need to convert this using DOS-style short mode. If the path
20861 20856 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20862 20857 # take no chances and rewrite it.
20863 20858 # Note: m4 eats our [], so we need to use [ and ] instead.
20864 20859 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20865 20860 if test "x$has_forbidden_chars" != x; then
20866 20861 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20867 20862 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20868 20863 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20869 20864 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20870 20865 # Going to short mode and back again did indeed matter. Since short mode is
20871 20866 # case insensitive, let's make it lowercase to improve readability.
20872 20867 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20873 20868 # Now convert it back to Unix-style (cygpath)
20874 20869 input_path=`$CYGPATH -u "$shortmode_path"`
20875 20870 new_path="$input_path"
20876 20871 fi
20877 20872 fi
20878 20873
20879 20874 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20880 20875 if test "x$test_cygdrive_prefix" = x; then
20881 20876 # As a simple fix, exclude /usr/bin since it's not a real path.
20882 20877 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20883 20878 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20884 20879 # a path prefixed by /cygdrive for fixpath to work.
20885 20880 new_path="$CYGWIN_ROOT_PATH$input_path"
20886 20881 fi
20887 20882 fi
20888 20883
20889 20884 # remove trailing .exe if any
20890 20885 new_path="${new_path/%.exe/}"
20891 20886
20892 20887 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20893 20888
20894 20889 # First separate the path from the arguments. This will split at the first
20895 20890 # space.
20896 20891 complete="$FOUND_MAKE"
20897 20892 path="${complete%% *}"
20898 20893 tmp="$complete EOL"
20899 20894 arguments="${tmp#* }"
20900 20895
20901 20896 # Input might be given as Windows format, start by converting to
20902 20897 # unix format.
20903 20898 new_path="$path"
20904 20899
20905 20900 windows_path="$new_path"
20906 20901 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20907 20902 unix_path=`$CYGPATH -u "$windows_path"`
20908 20903 new_path="$unix_path"
20909 20904 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20910 20905 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20911 20906 new_path="$unix_path"
20912 20907 fi
20913 20908
20914 20909
20915 20910 # Now try to locate executable using which
20916 20911 new_path=`$WHICH "$new_path" 2> /dev/null`
20917 20912
20918 20913 if test "x$new_path" = x; then
20919 20914 # Oops. Which didn't find the executable.
20920 20915 # The splitting of arguments from the executable at a space might have been incorrect,
20921 20916 # since paths with space are more likely in Windows. Give it another try with the whole
20922 20917 # argument.
20923 20918 path="$complete"
20924 20919 arguments="EOL"
20925 20920 new_path="$path"
20926 20921
20927 20922 windows_path="$new_path"
20928 20923 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20929 20924 unix_path=`$CYGPATH -u "$windows_path"`
20930 20925 new_path="$unix_path"
20931 20926 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20932 20927 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20933 20928 new_path="$unix_path"
20934 20929 fi
20935 20930
20936 20931
20937 20932 new_path=`$WHICH "$new_path" 2> /dev/null`
20938 20933 # bat and cmd files are not always considered executable in MSYS causing which
20939 20934 # to not find them
20940 20935 if test "x$new_path" = x \
20941 20936 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20942 20937 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20943 20938 new_path="$path"
20944 20939
20945 20940 windows_path="$new_path"
20946 20941 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20947 20942 unix_path=`$CYGPATH -u "$windows_path"`
20948 20943 new_path="$unix_path"
20949 20944 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20950 20945 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20951 20946 new_path="$unix_path"
20952 20947 fi
20953 20948
20954 20949 fi
20955 20950
20956 20951 if test "x$new_path" = x; then
20957 20952 # It's still not found. Now this is an unrecoverable error.
20958 20953 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20959 20954 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20960 20955 has_space=`$ECHO "$complete" | $GREP " "`
20961 20956 if test "x$has_space" != x; then
20962 20957 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20963 20958 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20964 20959 fi
20965 20960 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20966 20961 fi
20967 20962 fi
20968 20963
20969 20964 # Now new_path has a complete unix path to the binary
20970 20965 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20971 20966 # Keep paths in /bin as-is, but remove trailing .exe if any
20972 20967 new_path="${new_path/%.exe/}"
20973 20968 # Do not save /bin paths to all_fixpath_prefixes!
20974 20969 else
20975 20970 # Not in mixed or Windows style, start by that.
20976 20971 new_path=`cmd //c echo $new_path`
20977 20972
20978 20973 input_path="$new_path"
20979 20974 # Check if we need to convert this using DOS-style short mode. If the path
20980 20975 # contains just simple characters, use it. Otherwise (spaces, weird characters),
20981 20976 # take no chances and rewrite it.
20982 20977 # Note: m4 eats our [], so we need to use [ and ] instead.
20983 20978 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20984 20979 if test "x$has_forbidden_chars" != x; then
20985 20980 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20986 20981 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20987 20982 fi
20988 20983
20989 20984 # Output is in $new_path
20990 20985
20991 20986 windows_path="$new_path"
20992 20987 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20993 20988 unix_path=`$CYGPATH -u "$windows_path"`
20994 20989 new_path="$unix_path"
20995 20990 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20996 20991 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20997 20992 new_path="$unix_path"
20998 20993 fi
20999 20994
21000 20995 # remove trailing .exe if any
21001 20996 new_path="${new_path/%.exe/}"
21002 20997
21003 20998 # Save the first 10 bytes of this path to the storage, so fixpath can work.
21004 20999 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21005 21000 fi
21006 21001
21007 21002 else
21008 21003 # We're on a unix platform. Hooray! :)
21009 21004 # First separate the path from the arguments. This will split at the first
21010 21005 # space.
21011 21006 complete="$FOUND_MAKE"
21012 21007 path="${complete%% *}"
21013 21008 tmp="$complete EOL"
21014 21009 arguments="${tmp#* }"
21015 21010
21016 21011 # Cannot rely on the command "which" here since it doesn't always work.
21017 21012 is_absolute_path=`$ECHO "$path" | $GREP ^/`
21018 21013 if test -z "$is_absolute_path"; then
21019 21014 # Path to executable is not absolute. Find it.
21020 21015 IFS_save="$IFS"
21021 21016 IFS=:
21022 21017 for p in $PATH; do
21023 21018 if test -f "$p/$path" && test -x "$p/$path"; then
21024 21019 new_path="$p/$path"
21025 21020 break
21026 21021 fi
21027 21022 done
21028 21023 IFS="$IFS_save"
21029 21024 else
21030 21025 # This is an absolute path, we can use it without further modifications.
21031 21026 new_path="$path"
21032 21027 fi
21033 21028
21034 21029 if test "x$new_path" = x; then
21035 21030 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21036 21031 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21037 21032 has_space=`$ECHO "$complete" | $GREP " "`
21038 21033 if test "x$has_space" != x; then
21039 21034 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21040 21035 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21041 21036 fi
21042 21037 as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21043 21038 fi
21044 21039 fi
21045 21040
21046 21041 # Now join together the path and the arguments once again
21047 21042 if test "x$arguments" != xEOL; then
21048 21043 new_complete="$new_path ${arguments% *}"
21049 21044 else
21050 21045 new_complete="$new_path"
21051 21046 fi
21052 21047
21053 21048 if test "x$complete" != "x$new_complete"; then
21054 21049 FOUND_MAKE="$new_complete"
21055 21050 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21056 21051 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21057 21052 fi
21058 21053 fi
21059 21054
21060 21055 fi
21061 21056 fi
21062 21057 fi
21063 21058 fi
21064 21059
21065 21060 if test "x$FOUND_MAKE" = x; then
21066 21061 as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21067 21062 fi
21068 21063
21069 21064 fi
21070 21065
21071 21066
21072 21067 MAKE=$FOUND_MAKE
21073 21068
21074 21069 { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21075 21070 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21076 21071
21077 21072
21078 21073 # Check if make supports the output sync option and if so, setup using it.
21079 21074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21080 21075 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21081 21076 if $MAKE --version -O > /dev/null 2>&1; then
21082 21077 OUTPUT_SYNC_SUPPORTED=true
21083 21078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21084 21079 $as_echo "yes" >&6; }
21085 21080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21086 21081 $as_echo_n "checking for output-sync value... " >&6; }
21087 21082
21088 21083 # Check whether --with-output-sync was given.
21089 21084 if test "${with_output_sync+set}" = set; then :
21090 21085 withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21091 21086 fi
21092 21087
21093 21088 if test "x$OUTPUT_SYNC" = "x"; then
21094 21089 OUTPUT_SYNC=none
21095 21090 fi
21096 21091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21097 21092 $as_echo "$OUTPUT_SYNC" >&6; }
21098 21093 if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21099 21094 as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21100 21095 fi
21101 21096 else
21102 21097 OUTPUT_SYNC_SUPPORTED=false
21103 21098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21104 21099 $as_echo "no" >&6; }
21105 21100 fi
21106 21101
21107 21102
21108 21103
21109 21104
21110 21105
21111 21106
21112 21107 # Test if find supports -delete
21113 21108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21114 21109 $as_echo_n "checking if find supports -delete... " >&6; }
21115 21110 FIND_DELETE="-delete"
21116 21111
21117 21112 DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21118 21113
21119 21114 echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21120 21115
21121 21116 TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21122 21117 if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21123 21118 # No, it does not.
21124 21119 $RM $DELETEDIR/TestIfFindSupportsDelete
21125 21120 if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21126 21121 # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21127 21122 FIND_DELETE="-print | $XARGS $RM"
21128 21123 else
21129 21124 FIND_DELETE="-exec $RM \{\} \+"
21130 21125 fi
21131 21126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21132 21127 $as_echo "no" >&6; }
21133 21128 else
21134 21129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21135 21130 $as_echo "yes" >&6; }
21136 21131 fi
21137 21132 $RMDIR $DELETEDIR
21138 21133
21139 21134
21140 21135
21141 21136 # Test which kind of tar was found
21142 21137 if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21143 21138 TAR_TYPE="gnu"
21144 21139 elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21145 21140 TAR_TYPE="bsd"
21146 21141 elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21147 21142 TAR_TYPE="solaris"
21148 21143 fi
21149 21144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21150 21145 $as_echo_n "checking what type of tar was found... " >&6; }
21151 21146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21152 21147 $as_echo "$TAR_TYPE" >&6; }
21153 21148
21154 21149 TAR_CREATE_FILE_PARAM=""
21155 21150
21156 21151 if test "x$TAR_TYPE" = "xgnu"; then
21157 21152 TAR_INCLUDE_PARAM="T"
21158 21153 TAR_SUPPORTS_TRANSFORM="true"
21159 21154 if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21160 21155 # When using gnu tar for Solaris targets, need to use compatibility mode
21161 21156 TAR_CREATE_EXTRA_PARAM="--format=ustar"
21162 21157 fi
21163 21158 else
21164 21159 TAR_INCLUDE_PARAM="I"
21165 21160 TAR_SUPPORTS_TRANSFORM="false"
21166 21161 fi
21167 21162
21168 21163
21169 21164
21170 21165
21171 21166
21172 21167
21173 21168 # These tools might not be installed by default,
21174 21169 # need hint on how to install them.
21175 21170
21176 21171
21177 21172
21178 21173 # Publish this variable in the help.
21179 21174
21180 21175
21181 21176 if [ -z "${UNZIP+x}" ]; then
21182 21177 # The variable is not set by user, try to locate tool using the code snippet
21183 21178 for ac_prog in unzip
21184 21179 do
21185 21180 # Extract the first word of "$ac_prog", so it can be a program name with args.
21186 21181 set dummy $ac_prog; ac_word=$2
21187 21182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21188 21183 $as_echo_n "checking for $ac_word... " >&6; }
21189 21184 if ${ac_cv_path_UNZIP+:} false; then :
21190 21185 $as_echo_n "(cached) " >&6
21191 21186 else
21192 21187 case $UNZIP in
21193 21188 [\\/]* | ?:[\\/]*)
21194 21189 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21195 21190 ;;
21196 21191 *)
21197 21192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21198 21193 for as_dir in $PATH
21199 21194 do
21200 21195 IFS=$as_save_IFS
21201 21196 test -z "$as_dir" && as_dir=.
21202 21197 for ac_exec_ext in '' $ac_executable_extensions; do
21203 21198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21204 21199 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21205 21200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21206 21201 break 2
21207 21202 fi
21208 21203 done
21209 21204 done
21210 21205 IFS=$as_save_IFS
21211 21206
21212 21207 ;;
21213 21208 esac
21214 21209 fi
21215 21210 UNZIP=$ac_cv_path_UNZIP
21216 21211 if test -n "$UNZIP"; then
21217 21212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21218 21213 $as_echo "$UNZIP" >&6; }
21219 21214 else
21220 21215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21221 21216 $as_echo "no" >&6; }
21222 21217 fi
21223 21218
21224 21219
21225 21220 test -n "$UNZIP" && break
21226 21221 done
21227 21222
21228 21223 else
21229 21224 # The variable is set, but is it from the command line or the environment?
21230 21225
21231 21226 # Try to remove the string !UNZIP! from our list.
21232 21227 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21233 21228 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21234 21229 # If it failed, the variable was not from the command line. Ignore it,
21235 21230 # but warn the user (except for BASH, which is always set by the calling BASH).
21236 21231 if test "xUNZIP" != xBASH; then
21237 21232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21238 21233 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21239 21234 fi
21240 21235 # Try to locate tool using the code snippet
21241 21236 for ac_prog in unzip
21242 21237 do
21243 21238 # Extract the first word of "$ac_prog", so it can be a program name with args.
21244 21239 set dummy $ac_prog; ac_word=$2
21245 21240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21246 21241 $as_echo_n "checking for $ac_word... " >&6; }
21247 21242 if ${ac_cv_path_UNZIP+:} false; then :
21248 21243 $as_echo_n "(cached) " >&6
21249 21244 else
21250 21245 case $UNZIP in
21251 21246 [\\/]* | ?:[\\/]*)
21252 21247 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21253 21248 ;;
21254 21249 *)
21255 21250 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21256 21251 for as_dir in $PATH
21257 21252 do
21258 21253 IFS=$as_save_IFS
21259 21254 test -z "$as_dir" && as_dir=.
21260 21255 for ac_exec_ext in '' $ac_executable_extensions; do
21261 21256 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21262 21257 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21263 21258 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21264 21259 break 2
21265 21260 fi
21266 21261 done
21267 21262 done
21268 21263 IFS=$as_save_IFS
21269 21264
21270 21265 ;;
21271 21266 esac
21272 21267 fi
21273 21268 UNZIP=$ac_cv_path_UNZIP
21274 21269 if test -n "$UNZIP"; then
21275 21270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21276 21271 $as_echo "$UNZIP" >&6; }
21277 21272 else
21278 21273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21279 21274 $as_echo "no" >&6; }
21280 21275 fi
21281 21276
21282 21277
21283 21278 test -n "$UNZIP" && break
21284 21279 done
21285 21280
21286 21281 else
21287 21282 # If it succeeded, then it was overridden by the user. We will use it
21288 21283 # for the tool.
21289 21284
21290 21285 # First remove it from the list of overridden variables, so we can test
21291 21286 # for unknown variables in the end.
21292 21287 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21293 21288
21294 21289 # Check if we try to supply an empty value
21295 21290 if test "x$UNZIP" = x; then
21296 21291 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21297 21292 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21298 21293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21299 21294 $as_echo_n "checking for UNZIP... " >&6; }
21300 21295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21301 21296 $as_echo "disabled" >&6; }
21302 21297 else
21303 21298 # Check if the provided tool contains a complete path.
21304 21299 tool_specified="$UNZIP"
21305 21300 tool_basename="${tool_specified##*/}"
21306 21301 if test "x$tool_basename" = "x$tool_specified"; then
21307 21302 # A command without a complete path is provided, search $PATH.
21308 21303 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21309 21304 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21310 21305 # Extract the first word of "$tool_basename", so it can be a program name with args.
21311 21306 set dummy $tool_basename; ac_word=$2
21312 21307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21313 21308 $as_echo_n "checking for $ac_word... " >&6; }
21314 21309 if ${ac_cv_path_UNZIP+:} false; then :
21315 21310 $as_echo_n "(cached) " >&6
21316 21311 else
21317 21312 case $UNZIP in
21318 21313 [\\/]* | ?:[\\/]*)
21319 21314 ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21320 21315 ;;
21321 21316 *)
21322 21317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21323 21318 for as_dir in $PATH
21324 21319 do
21325 21320 IFS=$as_save_IFS
21326 21321 test -z "$as_dir" && as_dir=.
21327 21322 for ac_exec_ext in '' $ac_executable_extensions; do
21328 21323 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21329 21324 ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21330 21325 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21331 21326 break 2
21332 21327 fi
21333 21328 done
21334 21329 done
21335 21330 IFS=$as_save_IFS
21336 21331
21337 21332 ;;
21338 21333 esac
21339 21334 fi
21340 21335 UNZIP=$ac_cv_path_UNZIP
21341 21336 if test -n "$UNZIP"; then
21342 21337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21343 21338 $as_echo "$UNZIP" >&6; }
21344 21339 else
21345 21340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21346 21341 $as_echo "no" >&6; }
21347 21342 fi
21348 21343
21349 21344
21350 21345 if test "x$UNZIP" = x; then
21351 21346 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21352 21347 fi
21353 21348 else
21354 21349 # Otherwise we believe it is a complete path. Use it as it is.
21355 21350 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21356 21351 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21357 21352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21358 21353 $as_echo_n "checking for UNZIP... " >&6; }
21359 21354 if test ! -x "$tool_specified"; then
21360 21355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21361 21356 $as_echo "not found" >&6; }
21362 21357 as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21363 21358 fi
21364 21359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21365 21360 $as_echo "$tool_specified" >&6; }
21366 21361 fi
21367 21362 fi
21368 21363 fi
21369 21364
21370 21365 fi
21371 21366
21372 21367
21373 21368
21374 21369 if test "x$UNZIP" = x; then
21375 21370 as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21376 21371 fi
21377 21372
21378 21373
21379 21374
21380 21375
21381 21376
21382 21377 # Publish this variable in the help.
21383 21378
21384 21379
21385 21380 if [ -z "${ZIP+x}" ]; then
21386 21381 # The variable is not set by user, try to locate tool using the code snippet
21387 21382 for ac_prog in zip
21388 21383 do
21389 21384 # Extract the first word of "$ac_prog", so it can be a program name with args.
21390 21385 set dummy $ac_prog; ac_word=$2
21391 21386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21392 21387 $as_echo_n "checking for $ac_word... " >&6; }
21393 21388 if ${ac_cv_path_ZIP+:} false; then :
21394 21389 $as_echo_n "(cached) " >&6
21395 21390 else
21396 21391 case $ZIP in
21397 21392 [\\/]* | ?:[\\/]*)
21398 21393 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21399 21394 ;;
21400 21395 *)
21401 21396 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21402 21397 for as_dir in $PATH
21403 21398 do
21404 21399 IFS=$as_save_IFS
21405 21400 test -z "$as_dir" && as_dir=.
21406 21401 for ac_exec_ext in '' $ac_executable_extensions; do
21407 21402 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21408 21403 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21409 21404 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21410 21405 break 2
21411 21406 fi
21412 21407 done
21413 21408 done
21414 21409 IFS=$as_save_IFS
21415 21410
21416 21411 ;;
21417 21412 esac
21418 21413 fi
21419 21414 ZIP=$ac_cv_path_ZIP
21420 21415 if test -n "$ZIP"; then
21421 21416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21422 21417 $as_echo "$ZIP" >&6; }
21423 21418 else
21424 21419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21425 21420 $as_echo "no" >&6; }
21426 21421 fi
21427 21422
21428 21423
21429 21424 test -n "$ZIP" && break
21430 21425 done
21431 21426
21432 21427 else
21433 21428 # The variable is set, but is it from the command line or the environment?
21434 21429
21435 21430 # Try to remove the string !ZIP! from our list.
21436 21431 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21437 21432 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21438 21433 # If it failed, the variable was not from the command line. Ignore it,
21439 21434 # but warn the user (except for BASH, which is always set by the calling BASH).
21440 21435 if test "xZIP" != xBASH; then
21441 21436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21442 21437 $as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21443 21438 fi
21444 21439 # Try to locate tool using the code snippet
21445 21440 for ac_prog in zip
21446 21441 do
21447 21442 # Extract the first word of "$ac_prog", so it can be a program name with args.
21448 21443 set dummy $ac_prog; ac_word=$2
21449 21444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21450 21445 $as_echo_n "checking for $ac_word... " >&6; }
21451 21446 if ${ac_cv_path_ZIP+:} false; then :
21452 21447 $as_echo_n "(cached) " >&6
21453 21448 else
21454 21449 case $ZIP in
21455 21450 [\\/]* | ?:[\\/]*)
21456 21451 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21457 21452 ;;
21458 21453 *)
21459 21454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21460 21455 for as_dir in $PATH
21461 21456 do
21462 21457 IFS=$as_save_IFS
21463 21458 test -z "$as_dir" && as_dir=.
21464 21459 for ac_exec_ext in '' $ac_executable_extensions; do
21465 21460 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21466 21461 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21467 21462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21468 21463 break 2
21469 21464 fi
21470 21465 done
21471 21466 done
21472 21467 IFS=$as_save_IFS
21473 21468
21474 21469 ;;
21475 21470 esac
21476 21471 fi
21477 21472 ZIP=$ac_cv_path_ZIP
21478 21473 if test -n "$ZIP"; then
21479 21474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21480 21475 $as_echo "$ZIP" >&6; }
21481 21476 else
21482 21477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21483 21478 $as_echo "no" >&6; }
21484 21479 fi
21485 21480
21486 21481
21487 21482 test -n "$ZIP" && break
21488 21483 done
21489 21484
21490 21485 else
21491 21486 # If it succeeded, then it was overridden by the user. We will use it
21492 21487 # for the tool.
21493 21488
21494 21489 # First remove it from the list of overridden variables, so we can test
21495 21490 # for unknown variables in the end.
21496 21491 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21497 21492
21498 21493 # Check if we try to supply an empty value
21499 21494 if test "x$ZIP" = x; then
21500 21495 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21501 21496 $as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21502 21497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21503 21498 $as_echo_n "checking for ZIP... " >&6; }
21504 21499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21505 21500 $as_echo "disabled" >&6; }
21506 21501 else
21507 21502 # Check if the provided tool contains a complete path.
21508 21503 tool_specified="$ZIP"
21509 21504 tool_basename="${tool_specified##*/}"
21510 21505 if test "x$tool_basename" = "x$tool_specified"; then
21511 21506 # A command without a complete path is provided, search $PATH.
21512 21507 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21513 21508 $as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21514 21509 # Extract the first word of "$tool_basename", so it can be a program name with args.
21515 21510 set dummy $tool_basename; ac_word=$2
21516 21511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21517 21512 $as_echo_n "checking for $ac_word... " >&6; }
21518 21513 if ${ac_cv_path_ZIP+:} false; then :
21519 21514 $as_echo_n "(cached) " >&6
21520 21515 else
21521 21516 case $ZIP in
21522 21517 [\\/]* | ?:[\\/]*)
21523 21518 ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21524 21519 ;;
21525 21520 *)
21526 21521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21527 21522 for as_dir in $PATH
21528 21523 do
21529 21524 IFS=$as_save_IFS
21530 21525 test -z "$as_dir" && as_dir=.
21531 21526 for ac_exec_ext in '' $ac_executable_extensions; do
21532 21527 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21533 21528 ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21534 21529 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21535 21530 break 2
21536 21531 fi
21537 21532 done
21538 21533 done
21539 21534 IFS=$as_save_IFS
21540 21535
21541 21536 ;;
21542 21537 esac
21543 21538 fi
21544 21539 ZIP=$ac_cv_path_ZIP
21545 21540 if test -n "$ZIP"; then
21546 21541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21547 21542 $as_echo "$ZIP" >&6; }
21548 21543 else
21549 21544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21550 21545 $as_echo "no" >&6; }
21551 21546 fi
21552 21547
21553 21548
21554 21549 if test "x$ZIP" = x; then
21555 21550 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21556 21551 fi
21557 21552 else
21558 21553 # Otherwise we believe it is a complete path. Use it as it is.
21559 21554 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21560 21555 $as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21561 21556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21562 21557 $as_echo_n "checking for ZIP... " >&6; }
21563 21558 if test ! -x "$tool_specified"; then
21564 21559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21565 21560 $as_echo "not found" >&6; }
21566 21561 as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21567 21562 fi
21568 21563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21569 21564 $as_echo "$tool_specified" >&6; }
21570 21565 fi
21571 21566 fi
21572 21567 fi
21573 21568
21574 21569 fi
21575 21570
21576 21571
21577 21572
21578 21573 if test "x$ZIP" = x; then
21579 21574 as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21580 21575 fi
21581 21576
21582 21577
21583 21578
21584 21579 # Non-required basic tools
21585 21580
21586 21581
21587 21582
21588 21583 # Publish this variable in the help.
21589 21584
21590 21585
21591 21586 if [ -z "${LDD+x}" ]; then
21592 21587 # The variable is not set by user, try to locate tool using the code snippet
21593 21588 for ac_prog in ldd
21594 21589 do
21595 21590 # Extract the first word of "$ac_prog", so it can be a program name with args.
21596 21591 set dummy $ac_prog; ac_word=$2
21597 21592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21598 21593 $as_echo_n "checking for $ac_word... " >&6; }
21599 21594 if ${ac_cv_path_LDD+:} false; then :
21600 21595 $as_echo_n "(cached) " >&6
21601 21596 else
21602 21597 case $LDD in
21603 21598 [\\/]* | ?:[\\/]*)
21604 21599 ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21605 21600 ;;
21606 21601 *)
21607 21602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21608 21603 for as_dir in $PATH
21609 21604 do
21610 21605 IFS=$as_save_IFS
21611 21606 test -z "$as_dir" && as_dir=.
21612 21607 for ac_exec_ext in '' $ac_executable_extensions; do
21613 21608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21614 21609 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21615 21610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21616 21611 break 2
21617 21612 fi
21618 21613 done
21619 21614 done
21620 21615 IFS=$as_save_IFS
21621 21616
21622 21617 ;;
21623 21618 esac
21624 21619 fi
21625 21620 LDD=$ac_cv_path_LDD
21626 21621 if test -n "$LDD"; then
21627 21622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21628 21623 $as_echo "$LDD" >&6; }
21629 21624 else
21630 21625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21631 21626 $as_echo "no" >&6; }
21632 21627 fi
21633 21628
21634 21629
21635 21630 test -n "$LDD" && break
21636 21631 done
21637 21632
21638 21633 else
21639 21634 # The variable is set, but is it from the command line or the environment?
21640 21635
21641 21636 # Try to remove the string !LDD! from our list.
21642 21637 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21643 21638 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21644 21639 # If it failed, the variable was not from the command line. Ignore it,
21645 21640 # but warn the user (except for BASH, which is always set by the calling BASH).
21646 21641 if test "xLDD" != xBASH; then
21647 21642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21648 21643 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21649 21644 fi
21650 21645 # Try to locate tool using the code snippet
21651 21646 for ac_prog in ldd
21652 21647 do
21653 21648 # Extract the first word of "$ac_prog", so it can be a program name with args.
21654 21649 set dummy $ac_prog; ac_word=$2
21655 21650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21656 21651 $as_echo_n "checking for $ac_word... " >&6; }
21657 21652 if ${ac_cv_path_LDD+:} false; then :
21658 21653 $as_echo_n "(cached) " >&6
21659 21654 else
21660 21655 case $LDD in
21661 21656 [\\/]* | ?:[\\/]*)
21662 21657 ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21663 21658 ;;
21664 21659 *)
21665 21660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21666 21661 for as_dir in $PATH
21667 21662 do
21668 21663 IFS=$as_save_IFS
21669 21664 test -z "$as_dir" && as_dir=.
21670 21665 for ac_exec_ext in '' $ac_executable_extensions; do
21671 21666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21672 21667 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21673 21668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21674 21669 break 2
21675 21670 fi
21676 21671 done
21677 21672 done
21678 21673 IFS=$as_save_IFS
21679 21674
21680 21675 ;;
21681 21676 esac
21682 21677 fi
21683 21678 LDD=$ac_cv_path_LDD
21684 21679 if test -n "$LDD"; then
21685 21680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21686 21681 $as_echo "$LDD" >&6; }
21687 21682 else
21688 21683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21689 21684 $as_echo "no" >&6; }
21690 21685 fi
21691 21686
21692 21687
21693 21688 test -n "$LDD" && break
21694 21689 done
21695 21690
21696 21691 else
21697 21692 # If it succeeded, then it was overridden by the user. We will use it
21698 21693 # for the tool.
21699 21694
21700 21695 # First remove it from the list of overridden variables, so we can test
21701 21696 # for unknown variables in the end.
21702 21697 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21703 21698
21704 21699 # Check if we try to supply an empty value
21705 21700 if test "x$LDD" = x; then
21706 21701 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21707 21702 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21708 21703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21709 21704 $as_echo_n "checking for LDD... " >&6; }
21710 21705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21711 21706 $as_echo "disabled" >&6; }
21712 21707 else
21713 21708 # Check if the provided tool contains a complete path.
21714 21709 tool_specified="$LDD"
21715 21710 tool_basename="${tool_specified##*/}"
21716 21711 if test "x$tool_basename" = "x$tool_specified"; then
21717 21712 # A command without a complete path is provided, search $PATH.
21718 21713 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21719 21714 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21720 21715 # Extract the first word of "$tool_basename", so it can be a program name with args.
21721 21716 set dummy $tool_basename; ac_word=$2
21722 21717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21723 21718 $as_echo_n "checking for $ac_word... " >&6; }
21724 21719 if ${ac_cv_path_LDD+:} false; then :
21725 21720 $as_echo_n "(cached) " >&6
21726 21721 else
21727 21722 case $LDD in
21728 21723 [\\/]* | ?:[\\/]*)
21729 21724 ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21730 21725 ;;
21731 21726 *)
21732 21727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21733 21728 for as_dir in $PATH
21734 21729 do
21735 21730 IFS=$as_save_IFS
21736 21731 test -z "$as_dir" && as_dir=.
21737 21732 for ac_exec_ext in '' $ac_executable_extensions; do
21738 21733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21739 21734 ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21740 21735 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21741 21736 break 2
21742 21737 fi
21743 21738 done
21744 21739 done
21745 21740 IFS=$as_save_IFS
21746 21741
21747 21742 ;;
21748 21743 esac
21749 21744 fi
21750 21745 LDD=$ac_cv_path_LDD
21751 21746 if test -n "$LDD"; then
21752 21747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21753 21748 $as_echo "$LDD" >&6; }
21754 21749 else
21755 21750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21756 21751 $as_echo "no" >&6; }
21757 21752 fi
21758 21753
21759 21754
21760 21755 if test "x$LDD" = x; then
21761 21756 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21762 21757 fi
21763 21758 else
21764 21759 # Otherwise we believe it is a complete path. Use it as it is.
21765 21760 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21766 21761 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21767 21762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21768 21763 $as_echo_n "checking for LDD... " >&6; }
21769 21764 if test ! -x "$tool_specified"; then
21770 21765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21771 21766 $as_echo "not found" >&6; }
21772 21767 as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21773 21768 fi
21774 21769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21775 21770 $as_echo "$tool_specified" >&6; }
21776 21771 fi
21777 21772 fi
21778 21773 fi
21779 21774
21780 21775 fi
21781 21776
21782 21777
21783 21778 if test "x$LDD" = "x"; then
21784 21779 # List shared lib dependencies is used for
21785 21780 # debug output and checking for forbidden dependencies.
21786 21781 # We can build without it.
21787 21782 LDD="true"
21788 21783 fi
21789 21784
21790 21785
21791 21786 # Publish this variable in the help.
21792 21787
21793 21788
21794 21789 if [ -z "${OTOOL+x}" ]; then
21795 21790 # The variable is not set by user, try to locate tool using the code snippet
21796 21791 for ac_prog in otool
21797 21792 do
21798 21793 # Extract the first word of "$ac_prog", so it can be a program name with args.
21799 21794 set dummy $ac_prog; ac_word=$2
21800 21795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21801 21796 $as_echo_n "checking for $ac_word... " >&6; }
21802 21797 if ${ac_cv_path_OTOOL+:} false; then :
21803 21798 $as_echo_n "(cached) " >&6
21804 21799 else
21805 21800 case $OTOOL in
21806 21801 [\\/]* | ?:[\\/]*)
21807 21802 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21808 21803 ;;
21809 21804 *)
21810 21805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21811 21806 for as_dir in $PATH
21812 21807 do
21813 21808 IFS=$as_save_IFS
21814 21809 test -z "$as_dir" && as_dir=.
21815 21810 for ac_exec_ext in '' $ac_executable_extensions; do
21816 21811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21817 21812 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21818 21813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21819 21814 break 2
21820 21815 fi
21821 21816 done
21822 21817 done
21823 21818 IFS=$as_save_IFS
21824 21819
21825 21820 ;;
21826 21821 esac
21827 21822 fi
21828 21823 OTOOL=$ac_cv_path_OTOOL
21829 21824 if test -n "$OTOOL"; then
21830 21825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21831 21826 $as_echo "$OTOOL" >&6; }
21832 21827 else
21833 21828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21834 21829 $as_echo "no" >&6; }
21835 21830 fi
21836 21831
21837 21832
21838 21833 test -n "$OTOOL" && break
21839 21834 done
21840 21835
21841 21836 else
21842 21837 # The variable is set, but is it from the command line or the environment?
21843 21838
21844 21839 # Try to remove the string !OTOOL! from our list.
21845 21840 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21846 21841 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21847 21842 # If it failed, the variable was not from the command line. Ignore it,
21848 21843 # but warn the user (except for BASH, which is always set by the calling BASH).
21849 21844 if test "xOTOOL" != xBASH; then
21850 21845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21851 21846 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21852 21847 fi
21853 21848 # Try to locate tool using the code snippet
21854 21849 for ac_prog in otool
21855 21850 do
21856 21851 # Extract the first word of "$ac_prog", so it can be a program name with args.
21857 21852 set dummy $ac_prog; ac_word=$2
21858 21853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21859 21854 $as_echo_n "checking for $ac_word... " >&6; }
21860 21855 if ${ac_cv_path_OTOOL+:} false; then :
21861 21856 $as_echo_n "(cached) " >&6
21862 21857 else
21863 21858 case $OTOOL in
21864 21859 [\\/]* | ?:[\\/]*)
21865 21860 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21866 21861 ;;
21867 21862 *)
21868 21863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21869 21864 for as_dir in $PATH
21870 21865 do
21871 21866 IFS=$as_save_IFS
21872 21867 test -z "$as_dir" && as_dir=.
21873 21868 for ac_exec_ext in '' $ac_executable_extensions; do
21874 21869 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21875 21870 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21876 21871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21877 21872 break 2
21878 21873 fi
21879 21874 done
21880 21875 done
21881 21876 IFS=$as_save_IFS
21882 21877
21883 21878 ;;
21884 21879 esac
21885 21880 fi
21886 21881 OTOOL=$ac_cv_path_OTOOL
21887 21882 if test -n "$OTOOL"; then
21888 21883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21889 21884 $as_echo "$OTOOL" >&6; }
21890 21885 else
21891 21886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21892 21887 $as_echo "no" >&6; }
21893 21888 fi
21894 21889
21895 21890
21896 21891 test -n "$OTOOL" && break
21897 21892 done
21898 21893
21899 21894 else
21900 21895 # If it succeeded, then it was overridden by the user. We will use it
21901 21896 # for the tool.
21902 21897
21903 21898 # First remove it from the list of overridden variables, so we can test
21904 21899 # for unknown variables in the end.
21905 21900 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21906 21901
21907 21902 # Check if we try to supply an empty value
21908 21903 if test "x$OTOOL" = x; then
21909 21904 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21910 21905 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21911 21906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21912 21907 $as_echo_n "checking for OTOOL... " >&6; }
21913 21908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21914 21909 $as_echo "disabled" >&6; }
21915 21910 else
21916 21911 # Check if the provided tool contains a complete path.
21917 21912 tool_specified="$OTOOL"
21918 21913 tool_basename="${tool_specified##*/}"
21919 21914 if test "x$tool_basename" = "x$tool_specified"; then
21920 21915 # A command without a complete path is provided, search $PATH.
21921 21916 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21922 21917 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21923 21918 # Extract the first word of "$tool_basename", so it can be a program name with args.
21924 21919 set dummy $tool_basename; ac_word=$2
21925 21920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21926 21921 $as_echo_n "checking for $ac_word... " >&6; }
21927 21922 if ${ac_cv_path_OTOOL+:} false; then :
21928 21923 $as_echo_n "(cached) " >&6
21929 21924 else
21930 21925 case $OTOOL in
21931 21926 [\\/]* | ?:[\\/]*)
21932 21927 ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21933 21928 ;;
21934 21929 *)
21935 21930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21936 21931 for as_dir in $PATH
21937 21932 do
21938 21933 IFS=$as_save_IFS
21939 21934 test -z "$as_dir" && as_dir=.
21940 21935 for ac_exec_ext in '' $ac_executable_extensions; do
21941 21936 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21942 21937 ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21943 21938 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21944 21939 break 2
21945 21940 fi
21946 21941 done
21947 21942 done
21948 21943 IFS=$as_save_IFS
21949 21944
21950 21945 ;;
21951 21946 esac
21952 21947 fi
21953 21948 OTOOL=$ac_cv_path_OTOOL
21954 21949 if test -n "$OTOOL"; then
21955 21950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21956 21951 $as_echo "$OTOOL" >&6; }
21957 21952 else
21958 21953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21959 21954 $as_echo "no" >&6; }
21960 21955 fi
21961 21956
21962 21957
21963 21958 if test "x$OTOOL" = x; then
21964 21959 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21965 21960 fi
21966 21961 else
21967 21962 # Otherwise we believe it is a complete path. Use it as it is.
21968 21963 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21969 21964 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21970 21965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21971 21966 $as_echo_n "checking for OTOOL... " >&6; }
21972 21967 if test ! -x "$tool_specified"; then
21973 21968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21974 21969 $as_echo "not found" >&6; }
21975 21970 as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21976 21971 fi
21977 21972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21978 21973 $as_echo "$tool_specified" >&6; }
21979 21974 fi
21980 21975 fi
21981 21976 fi
21982 21977
21983 21978 fi
21984 21979
21985 21980
21986 21981 if test "x$OTOOL" = "x"; then
21987 21982 OTOOL="true"
21988 21983 fi
21989 21984
21990 21985
21991 21986 # Publish this variable in the help.
21992 21987
21993 21988
21994 21989 if [ -z "${READELF+x}" ]; then
21995 21990 # The variable is not set by user, try to locate tool using the code snippet
21996 21991 for ac_prog in greadelf readelf
21997 21992 do
21998 21993 # Extract the first word of "$ac_prog", so it can be a program name with args.
21999 21994 set dummy $ac_prog; ac_word=$2
22000 21995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22001 21996 $as_echo_n "checking for $ac_word... " >&6; }
22002 21997 if ${ac_cv_path_READELF+:} false; then :
22003 21998 $as_echo_n "(cached) " >&6
22004 21999 else
22005 22000 case $READELF in
22006 22001 [\\/]* | ?:[\\/]*)
22007 22002 ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22008 22003 ;;
22009 22004 *)
22010 22005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22011 22006 for as_dir in $PATH
22012 22007 do
22013 22008 IFS=$as_save_IFS
22014 22009 test -z "$as_dir" && as_dir=.
22015 22010 for ac_exec_ext in '' $ac_executable_extensions; do
22016 22011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22017 22012 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22018 22013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22019 22014 break 2
22020 22015 fi
22021 22016 done
22022 22017 done
22023 22018 IFS=$as_save_IFS
22024 22019
22025 22020 ;;
22026 22021 esac
22027 22022 fi
22028 22023 READELF=$ac_cv_path_READELF
22029 22024 if test -n "$READELF"; then
22030 22025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22031 22026 $as_echo "$READELF" >&6; }
22032 22027 else
22033 22028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22034 22029 $as_echo "no" >&6; }
22035 22030 fi
22036 22031
22037 22032
22038 22033 test -n "$READELF" && break
22039 22034 done
22040 22035
22041 22036 else
22042 22037 # The variable is set, but is it from the command line or the environment?
22043 22038
22044 22039 # Try to remove the string !READELF! from our list.
22045 22040 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22046 22041 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22047 22042 # If it failed, the variable was not from the command line. Ignore it,
22048 22043 # but warn the user (except for BASH, which is always set by the calling BASH).
22049 22044 if test "xREADELF" != xBASH; then
22050 22045 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22051 22046 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22052 22047 fi
22053 22048 # Try to locate tool using the code snippet
22054 22049 for ac_prog in greadelf readelf
22055 22050 do
22056 22051 # Extract the first word of "$ac_prog", so it can be a program name with args.
22057 22052 set dummy $ac_prog; ac_word=$2
22058 22053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22059 22054 $as_echo_n "checking for $ac_word... " >&6; }
22060 22055 if ${ac_cv_path_READELF+:} false; then :
22061 22056 $as_echo_n "(cached) " >&6
22062 22057 else
22063 22058 case $READELF in
22064 22059 [\\/]* | ?:[\\/]*)
22065 22060 ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22066 22061 ;;
22067 22062 *)
22068 22063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22069 22064 for as_dir in $PATH
22070 22065 do
22071 22066 IFS=$as_save_IFS
22072 22067 test -z "$as_dir" && as_dir=.
22073 22068 for ac_exec_ext in '' $ac_executable_extensions; do
22074 22069 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22075 22070 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22076 22071 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22077 22072 break 2
22078 22073 fi
22079 22074 done
22080 22075 done
22081 22076 IFS=$as_save_IFS
22082 22077
22083 22078 ;;
22084 22079 esac
22085 22080 fi
22086 22081 READELF=$ac_cv_path_READELF
22087 22082 if test -n "$READELF"; then
22088 22083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22089 22084 $as_echo "$READELF" >&6; }
22090 22085 else
22091 22086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22092 22087 $as_echo "no" >&6; }
22093 22088 fi
22094 22089
22095 22090
22096 22091 test -n "$READELF" && break
22097 22092 done
22098 22093
22099 22094 else
22100 22095 # If it succeeded, then it was overridden by the user. We will use it
22101 22096 # for the tool.
22102 22097
22103 22098 # First remove it from the list of overridden variables, so we can test
22104 22099 # for unknown variables in the end.
22105 22100 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22106 22101
22107 22102 # Check if we try to supply an empty value
22108 22103 if test "x$READELF" = x; then
22109 22104 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22110 22105 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22111 22106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22112 22107 $as_echo_n "checking for READELF... " >&6; }
22113 22108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22114 22109 $as_echo "disabled" >&6; }
22115 22110 else
22116 22111 # Check if the provided tool contains a complete path.
22117 22112 tool_specified="$READELF"
22118 22113 tool_basename="${tool_specified##*/}"
22119 22114 if test "x$tool_basename" = "x$tool_specified"; then
22120 22115 # A command without a complete path is provided, search $PATH.
22121 22116 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22122 22117 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22123 22118 # Extract the first word of "$tool_basename", so it can be a program name with args.
22124 22119 set dummy $tool_basename; ac_word=$2
22125 22120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22126 22121 $as_echo_n "checking for $ac_word... " >&6; }
22127 22122 if ${ac_cv_path_READELF+:} false; then :
22128 22123 $as_echo_n "(cached) " >&6
22129 22124 else
22130 22125 case $READELF in
22131 22126 [\\/]* | ?:[\\/]*)
22132 22127 ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22133 22128 ;;
22134 22129 *)
22135 22130 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22136 22131 for as_dir in $PATH
22137 22132 do
22138 22133 IFS=$as_save_IFS
22139 22134 test -z "$as_dir" && as_dir=.
22140 22135 for ac_exec_ext in '' $ac_executable_extensions; do
22141 22136 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22142 22137 ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22143 22138 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22144 22139 break 2
22145 22140 fi
22146 22141 done
22147 22142 done
22148 22143 IFS=$as_save_IFS
22149 22144
22150 22145 ;;
22151 22146 esac
22152 22147 fi
22153 22148 READELF=$ac_cv_path_READELF
22154 22149 if test -n "$READELF"; then
22155 22150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22156 22151 $as_echo "$READELF" >&6; }
22157 22152 else
22158 22153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22159 22154 $as_echo "no" >&6; }
22160 22155 fi
22161 22156
22162 22157
22163 22158 if test "x$READELF" = x; then
22164 22159 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22165 22160 fi
22166 22161 else
22167 22162 # Otherwise we believe it is a complete path. Use it as it is.
22168 22163 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22169 22164 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22170 22165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22171 22166 $as_echo_n "checking for READELF... " >&6; }
22172 22167 if test ! -x "$tool_specified"; then
22173 22168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22174 22169 $as_echo "not found" >&6; }
22175 22170 as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22176 22171 fi
22177 22172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22178 22173 $as_echo "$tool_specified" >&6; }
22179 22174 fi
22180 22175 fi
22181 22176 fi
22182 22177
22183 22178 fi
22184 22179
22185 22180
22186 22181
22187 22182
22188 22183 # Publish this variable in the help.
22189 22184
22190 22185
22191 22186 if [ -z "${HG+x}" ]; then
22192 22187 # The variable is not set by user, try to locate tool using the code snippet
22193 22188 for ac_prog in hg
22194 22189 do
22195 22190 # Extract the first word of "$ac_prog", so it can be a program name with args.
22196 22191 set dummy $ac_prog; ac_word=$2
22197 22192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22198 22193 $as_echo_n "checking for $ac_word... " >&6; }
22199 22194 if ${ac_cv_path_HG+:} false; then :
22200 22195 $as_echo_n "(cached) " >&6
22201 22196 else
22202 22197 case $HG in
22203 22198 [\\/]* | ?:[\\/]*)
22204 22199 ac_cv_path_HG="$HG" # Let the user override the test with a path.
22205 22200 ;;
22206 22201 *)
22207 22202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22208 22203 for as_dir in $PATH
22209 22204 do
22210 22205 IFS=$as_save_IFS
22211 22206 test -z "$as_dir" && as_dir=.
22212 22207 for ac_exec_ext in '' $ac_executable_extensions; do
22213 22208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22214 22209 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22215 22210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22216 22211 break 2
22217 22212 fi
22218 22213 done
22219 22214 done
22220 22215 IFS=$as_save_IFS
22221 22216
22222 22217 ;;
22223 22218 esac
22224 22219 fi
22225 22220 HG=$ac_cv_path_HG
22226 22221 if test -n "$HG"; then
22227 22222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22228 22223 $as_echo "$HG" >&6; }
22229 22224 else
22230 22225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22231 22226 $as_echo "no" >&6; }
22232 22227 fi
22233 22228
22234 22229
22235 22230 test -n "$HG" && break
22236 22231 done
22237 22232
22238 22233 else
22239 22234 # The variable is set, but is it from the command line or the environment?
22240 22235
22241 22236 # Try to remove the string !HG! from our list.
22242 22237 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22243 22238 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22244 22239 # If it failed, the variable was not from the command line. Ignore it,
22245 22240 # but warn the user (except for BASH, which is always set by the calling BASH).
22246 22241 if test "xHG" != xBASH; then
22247 22242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22248 22243 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22249 22244 fi
22250 22245 # Try to locate tool using the code snippet
22251 22246 for ac_prog in hg
22252 22247 do
22253 22248 # Extract the first word of "$ac_prog", so it can be a program name with args.
22254 22249 set dummy $ac_prog; ac_word=$2
22255 22250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22256 22251 $as_echo_n "checking for $ac_word... " >&6; }
22257 22252 if ${ac_cv_path_HG+:} false; then :
22258 22253 $as_echo_n "(cached) " >&6
22259 22254 else
22260 22255 case $HG in
22261 22256 [\\/]* | ?:[\\/]*)
22262 22257 ac_cv_path_HG="$HG" # Let the user override the test with a path.
22263 22258 ;;
22264 22259 *)
22265 22260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22266 22261 for as_dir in $PATH
22267 22262 do
22268 22263 IFS=$as_save_IFS
22269 22264 test -z "$as_dir" && as_dir=.
22270 22265 for ac_exec_ext in '' $ac_executable_extensions; do
22271 22266 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22272 22267 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22273 22268 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22274 22269 break 2
22275 22270 fi
22276 22271 done
22277 22272 done
22278 22273 IFS=$as_save_IFS
22279 22274
22280 22275 ;;
22281 22276 esac
22282 22277 fi
22283 22278 HG=$ac_cv_path_HG
22284 22279 if test -n "$HG"; then
22285 22280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22286 22281 $as_echo "$HG" >&6; }
22287 22282 else
22288 22283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22289 22284 $as_echo "no" >&6; }
22290 22285 fi
22291 22286
22292 22287
22293 22288 test -n "$HG" && break
22294 22289 done
22295 22290
22296 22291 else
22297 22292 # If it succeeded, then it was overridden by the user. We will use it
22298 22293 # for the tool.
22299 22294
22300 22295 # First remove it from the list of overridden variables, so we can test
22301 22296 # for unknown variables in the end.
22302 22297 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22303 22298
22304 22299 # Check if we try to supply an empty value
22305 22300 if test "x$HG" = x; then
22306 22301 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22307 22302 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22308 22303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22309 22304 $as_echo_n "checking for HG... " >&6; }
22310 22305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22311 22306 $as_echo "disabled" >&6; }
22312 22307 else
22313 22308 # Check if the provided tool contains a complete path.
22314 22309 tool_specified="$HG"
22315 22310 tool_basename="${tool_specified##*/}"
22316 22311 if test "x$tool_basename" = "x$tool_specified"; then
22317 22312 # A command without a complete path is provided, search $PATH.
22318 22313 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22319 22314 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22320 22315 # Extract the first word of "$tool_basename", so it can be a program name with args.
22321 22316 set dummy $tool_basename; ac_word=$2
22322 22317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22323 22318 $as_echo_n "checking for $ac_word... " >&6; }
22324 22319 if ${ac_cv_path_HG+:} false; then :
22325 22320 $as_echo_n "(cached) " >&6
22326 22321 else
22327 22322 case $HG in
22328 22323 [\\/]* | ?:[\\/]*)
22329 22324 ac_cv_path_HG="$HG" # Let the user override the test with a path.
22330 22325 ;;
22331 22326 *)
22332 22327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22333 22328 for as_dir in $PATH
22334 22329 do
22335 22330 IFS=$as_save_IFS
22336 22331 test -z "$as_dir" && as_dir=.
22337 22332 for ac_exec_ext in '' $ac_executable_extensions; do
22338 22333 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22339 22334 ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22340 22335 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22341 22336 break 2
22342 22337 fi
22343 22338 done
22344 22339 done
22345 22340 IFS=$as_save_IFS
22346 22341
22347 22342 ;;
22348 22343 esac
22349 22344 fi
22350 22345 HG=$ac_cv_path_HG
22351 22346 if test -n "$HG"; then
22352 22347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22353 22348 $as_echo "$HG" >&6; }
22354 22349 else
22355 22350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22356 22351 $as_echo "no" >&6; }
22357 22352 fi
22358 22353
22359 22354
22360 22355 if test "x$HG" = x; then
22361 22356 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22362 22357 fi
22363 22358 else
22364 22359 # Otherwise we believe it is a complete path. Use it as it is.
22365 22360 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22366 22361 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22367 22362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22368 22363 $as_echo_n "checking for HG... " >&6; }
22369 22364 if test ! -x "$tool_specified"; then
22370 22365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22371 22366 $as_echo "not found" >&6; }
22372 22367 as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22373 22368 fi
22374 22369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22375 22370 $as_echo "$tool_specified" >&6; }
22376 22371 fi
22377 22372 fi
22378 22373 fi
22379 22374
22380 22375 fi
22381 22376
22382 22377
22383 22378
22384 22379
22385 22380 # Publish this variable in the help.
22386 22381
22387 22382
22388 22383 if [ -z "${STAT+x}" ]; then
22389 22384 # The variable is not set by user, try to locate tool using the code snippet
22390 22385 for ac_prog in stat
22391 22386 do
22392 22387 # Extract the first word of "$ac_prog", so it can be a program name with args.
22393 22388 set dummy $ac_prog; ac_word=$2
22394 22389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22395 22390 $as_echo_n "checking for $ac_word... " >&6; }
22396 22391 if ${ac_cv_path_STAT+:} false; then :
22397 22392 $as_echo_n "(cached) " >&6
22398 22393 else
22399 22394 case $STAT in
22400 22395 [\\/]* | ?:[\\/]*)
22401 22396 ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22402 22397 ;;
22403 22398 *)
22404 22399 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22405 22400 for as_dir in $PATH
22406 22401 do
22407 22402 IFS=$as_save_IFS
22408 22403 test -z "$as_dir" && as_dir=.
22409 22404 for ac_exec_ext in '' $ac_executable_extensions; do
22410 22405 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22411 22406 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22412 22407 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22413 22408 break 2
22414 22409 fi
22415 22410 done
22416 22411 done
22417 22412 IFS=$as_save_IFS
22418 22413
22419 22414 ;;
22420 22415 esac
22421 22416 fi
22422 22417 STAT=$ac_cv_path_STAT
22423 22418 if test -n "$STAT"; then
22424 22419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22425 22420 $as_echo "$STAT" >&6; }
22426 22421 else
22427 22422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22428 22423 $as_echo "no" >&6; }
22429 22424 fi
22430 22425
22431 22426
22432 22427 test -n "$STAT" && break
22433 22428 done
22434 22429
22435 22430 else
22436 22431 # The variable is set, but is it from the command line or the environment?
22437 22432
22438 22433 # Try to remove the string !STAT! from our list.
22439 22434 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22440 22435 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22441 22436 # If it failed, the variable was not from the command line. Ignore it,
22442 22437 # but warn the user (except for BASH, which is always set by the calling BASH).
22443 22438 if test "xSTAT" != xBASH; then
22444 22439 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22445 22440 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22446 22441 fi
22447 22442 # Try to locate tool using the code snippet
22448 22443 for ac_prog in stat
22449 22444 do
22450 22445 # Extract the first word of "$ac_prog", so it can be a program name with args.
22451 22446 set dummy $ac_prog; ac_word=$2
22452 22447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22453 22448 $as_echo_n "checking for $ac_word... " >&6; }
22454 22449 if ${ac_cv_path_STAT+:} false; then :
22455 22450 $as_echo_n "(cached) " >&6
22456 22451 else
22457 22452 case $STAT in
22458 22453 [\\/]* | ?:[\\/]*)
22459 22454 ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22460 22455 ;;
22461 22456 *)
22462 22457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22463 22458 for as_dir in $PATH
22464 22459 do
22465 22460 IFS=$as_save_IFS
22466 22461 test -z "$as_dir" && as_dir=.
22467 22462 for ac_exec_ext in '' $ac_executable_extensions; do
22468 22463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22469 22464 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22470 22465 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22471 22466 break 2
22472 22467 fi
22473 22468 done
22474 22469 done
22475 22470 IFS=$as_save_IFS
22476 22471
22477 22472 ;;
22478 22473 esac
22479 22474 fi
22480 22475 STAT=$ac_cv_path_STAT
22481 22476 if test -n "$STAT"; then
22482 22477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22483 22478 $as_echo "$STAT" >&6; }
22484 22479 else
22485 22480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22486 22481 $as_echo "no" >&6; }
22487 22482 fi
22488 22483
22489 22484
22490 22485 test -n "$STAT" && break
22491 22486 done
22492 22487
22493 22488 else
22494 22489 # If it succeeded, then it was overridden by the user. We will use it
22495 22490 # for the tool.
22496 22491
22497 22492 # First remove it from the list of overridden variables, so we can test
22498 22493 # for unknown variables in the end.
22499 22494 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22500 22495
22501 22496 # Check if we try to supply an empty value
22502 22497 if test "x$STAT" = x; then
22503 22498 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22504 22499 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22505 22500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22506 22501 $as_echo_n "checking for STAT... " >&6; }
22507 22502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22508 22503 $as_echo "disabled" >&6; }
22509 22504 else
22510 22505 # Check if the provided tool contains a complete path.
22511 22506 tool_specified="$STAT"
22512 22507 tool_basename="${tool_specified##*/}"
22513 22508 if test "x$tool_basename" = "x$tool_specified"; then
22514 22509 # A command without a complete path is provided, search $PATH.
22515 22510 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22516 22511 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22517 22512 # Extract the first word of "$tool_basename", so it can be a program name with args.
22518 22513 set dummy $tool_basename; ac_word=$2
22519 22514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22520 22515 $as_echo_n "checking for $ac_word... " >&6; }
22521 22516 if ${ac_cv_path_STAT+:} false; then :
22522 22517 $as_echo_n "(cached) " >&6
22523 22518 else
22524 22519 case $STAT in
22525 22520 [\\/]* | ?:[\\/]*)
22526 22521 ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22527 22522 ;;
22528 22523 *)
22529 22524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22530 22525 for as_dir in $PATH
22531 22526 do
22532 22527 IFS=$as_save_IFS
22533 22528 test -z "$as_dir" && as_dir=.
22534 22529 for ac_exec_ext in '' $ac_executable_extensions; do
22535 22530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22536 22531 ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22537 22532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22538 22533 break 2
22539 22534 fi
22540 22535 done
22541 22536 done
22542 22537 IFS=$as_save_IFS
22543 22538
22544 22539 ;;
22545 22540 esac
22546 22541 fi
22547 22542 STAT=$ac_cv_path_STAT
22548 22543 if test -n "$STAT"; then
22549 22544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22550 22545 $as_echo "$STAT" >&6; }
22551 22546 else
22552 22547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22553 22548 $as_echo "no" >&6; }
22554 22549 fi
22555 22550
22556 22551
22557 22552 if test "x$STAT" = x; then
22558 22553 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22559 22554 fi
22560 22555 else
22561 22556 # Otherwise we believe it is a complete path. Use it as it is.
22562 22557 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22563 22558 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22564 22559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22565 22560 $as_echo_n "checking for STAT... " >&6; }
22566 22561 if test ! -x "$tool_specified"; then
22567 22562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22568 22563 $as_echo "not found" >&6; }
22569 22564 as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22570 22565 fi
22571 22566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22572 22567 $as_echo "$tool_specified" >&6; }
22573 22568 fi
22574 22569 fi
22575 22570 fi
22576 22571
22577 22572 fi
22578 22573
22579 22574
22580 22575
22581 22576
22582 22577 # Publish this variable in the help.
22583 22578
22584 22579
22585 22580 if [ -z "${TIME+x}" ]; then
22586 22581 # The variable is not set by user, try to locate tool using the code snippet
22587 22582 for ac_prog in time
22588 22583 do
22589 22584 # Extract the first word of "$ac_prog", so it can be a program name with args.
22590 22585 set dummy $ac_prog; ac_word=$2
22591 22586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22592 22587 $as_echo_n "checking for $ac_word... " >&6; }
22593 22588 if ${ac_cv_path_TIME+:} false; then :
22594 22589 $as_echo_n "(cached) " >&6
22595 22590 else
22596 22591 case $TIME in
22597 22592 [\\/]* | ?:[\\/]*)
22598 22593 ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22599 22594 ;;
22600 22595 *)
22601 22596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22602 22597 for as_dir in $PATH
22603 22598 do
22604 22599 IFS=$as_save_IFS
22605 22600 test -z "$as_dir" && as_dir=.
22606 22601 for ac_exec_ext in '' $ac_executable_extensions; do
22607 22602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22608 22603 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22609 22604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22610 22605 break 2
22611 22606 fi
22612 22607 done
22613 22608 done
22614 22609 IFS=$as_save_IFS
22615 22610
22616 22611 ;;
22617 22612 esac
22618 22613 fi
22619 22614 TIME=$ac_cv_path_TIME
22620 22615 if test -n "$TIME"; then
22621 22616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22622 22617 $as_echo "$TIME" >&6; }
22623 22618 else
22624 22619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22625 22620 $as_echo "no" >&6; }
22626 22621 fi
22627 22622
22628 22623
22629 22624 test -n "$TIME" && break
22630 22625 done
22631 22626
22632 22627 else
22633 22628 # The variable is set, but is it from the command line or the environment?
22634 22629
22635 22630 # Try to remove the string !TIME! from our list.
22636 22631 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22637 22632 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22638 22633 # If it failed, the variable was not from the command line. Ignore it,
22639 22634 # but warn the user (except for BASH, which is always set by the calling BASH).
22640 22635 if test "xTIME" != xBASH; then
22641 22636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22642 22637 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22643 22638 fi
22644 22639 # Try to locate tool using the code snippet
22645 22640 for ac_prog in time
22646 22641 do
22647 22642 # Extract the first word of "$ac_prog", so it can be a program name with args.
22648 22643 set dummy $ac_prog; ac_word=$2
22649 22644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22650 22645 $as_echo_n "checking for $ac_word... " >&6; }
22651 22646 if ${ac_cv_path_TIME+:} false; then :
22652 22647 $as_echo_n "(cached) " >&6
22653 22648 else
22654 22649 case $TIME in
22655 22650 [\\/]* | ?:[\\/]*)
22656 22651 ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22657 22652 ;;
22658 22653 *)
22659 22654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22660 22655 for as_dir in $PATH
22661 22656 do
22662 22657 IFS=$as_save_IFS
22663 22658 test -z "$as_dir" && as_dir=.
22664 22659 for ac_exec_ext in '' $ac_executable_extensions; do
22665 22660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22666 22661 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22667 22662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22668 22663 break 2
22669 22664 fi
22670 22665 done
22671 22666 done
22672 22667 IFS=$as_save_IFS
22673 22668
22674 22669 ;;
22675 22670 esac
22676 22671 fi
22677 22672 TIME=$ac_cv_path_TIME
22678 22673 if test -n "$TIME"; then
22679 22674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22680 22675 $as_echo "$TIME" >&6; }
22681 22676 else
22682 22677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22683 22678 $as_echo "no" >&6; }
22684 22679 fi
22685 22680
22686 22681
22687 22682 test -n "$TIME" && break
22688 22683 done
22689 22684
22690 22685 else
22691 22686 # If it succeeded, then it was overridden by the user. We will use it
22692 22687 # for the tool.
22693 22688
22694 22689 # First remove it from the list of overridden variables, so we can test
22695 22690 # for unknown variables in the end.
22696 22691 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22697 22692
22698 22693 # Check if we try to supply an empty value
22699 22694 if test "x$TIME" = x; then
22700 22695 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22701 22696 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22702 22697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22703 22698 $as_echo_n "checking for TIME... " >&6; }
22704 22699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22705 22700 $as_echo "disabled" >&6; }
22706 22701 else
22707 22702 # Check if the provided tool contains a complete path.
22708 22703 tool_specified="$TIME"
22709 22704 tool_basename="${tool_specified##*/}"
22710 22705 if test "x$tool_basename" = "x$tool_specified"; then
22711 22706 # A command without a complete path is provided, search $PATH.
22712 22707 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22713 22708 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22714 22709 # Extract the first word of "$tool_basename", so it can be a program name with args.
22715 22710 set dummy $tool_basename; ac_word=$2
22716 22711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22717 22712 $as_echo_n "checking for $ac_word... " >&6; }
22718 22713 if ${ac_cv_path_TIME+:} false; then :
22719 22714 $as_echo_n "(cached) " >&6
22720 22715 else
22721 22716 case $TIME in
22722 22717 [\\/]* | ?:[\\/]*)
22723 22718 ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22724 22719 ;;
22725 22720 *)
22726 22721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22727 22722 for as_dir in $PATH
22728 22723 do
22729 22724 IFS=$as_save_IFS
22730 22725 test -z "$as_dir" && as_dir=.
22731 22726 for ac_exec_ext in '' $ac_executable_extensions; do
22732 22727 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22733 22728 ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22734 22729 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22735 22730 break 2
22736 22731 fi
22737 22732 done
22738 22733 done
22739 22734 IFS=$as_save_IFS
22740 22735
22741 22736 ;;
22742 22737 esac
22743 22738 fi
22744 22739 TIME=$ac_cv_path_TIME
22745 22740 if test -n "$TIME"; then
22746 22741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22747 22742 $as_echo "$TIME" >&6; }
22748 22743 else
22749 22744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22750 22745 $as_echo "no" >&6; }
22751 22746 fi
22752 22747
22753 22748
22754 22749 if test "x$TIME" = x; then
22755 22750 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22756 22751 fi
22757 22752 else
22758 22753 # Otherwise we believe it is a complete path. Use it as it is.
22759 22754 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22760 22755 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22761 22756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22762 22757 $as_echo_n "checking for TIME... " >&6; }
22763 22758 if test ! -x "$tool_specified"; then
22764 22759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22765 22760 $as_echo "not found" >&6; }
22766 22761 as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22767 22762 fi
22768 22763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22769 22764 $as_echo "$tool_specified" >&6; }
22770 22765 fi
22771 22766 fi
22772 22767 fi
22773 22768
22774 22769 fi
22775 22770
22776 22771
22777 22772
22778 22773
22779 22774 # Publish this variable in the help.
22780 22775
22781 22776
22782 22777 if [ -z "${DTRACE+x}" ]; then
22783 22778 # The variable is not set by user, try to locate tool using the code snippet
22784 22779 for ac_prog in dtrace
22785 22780 do
22786 22781 # Extract the first word of "$ac_prog", so it can be a program name with args.
22787 22782 set dummy $ac_prog; ac_word=$2
22788 22783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22789 22784 $as_echo_n "checking for $ac_word... " >&6; }
22790 22785 if ${ac_cv_path_DTRACE+:} false; then :
22791 22786 $as_echo_n "(cached) " >&6
22792 22787 else
22793 22788 case $DTRACE in
22794 22789 [\\/]* | ?:[\\/]*)
22795 22790 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22796 22791 ;;
22797 22792 *)
22798 22793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22799 22794 for as_dir in $PATH
22800 22795 do
22801 22796 IFS=$as_save_IFS
22802 22797 test -z "$as_dir" && as_dir=.
22803 22798 for ac_exec_ext in '' $ac_executable_extensions; do
22804 22799 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22805 22800 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22806 22801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22807 22802 break 2
22808 22803 fi
22809 22804 done
22810 22805 done
22811 22806 IFS=$as_save_IFS
22812 22807
22813 22808 ;;
22814 22809 esac
22815 22810 fi
22816 22811 DTRACE=$ac_cv_path_DTRACE
22817 22812 if test -n "$DTRACE"; then
22818 22813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22819 22814 $as_echo "$DTRACE" >&6; }
22820 22815 else
22821 22816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22822 22817 $as_echo "no" >&6; }
22823 22818 fi
22824 22819
22825 22820
22826 22821 test -n "$DTRACE" && break
22827 22822 done
22828 22823
22829 22824 else
22830 22825 # The variable is set, but is it from the command line or the environment?
22831 22826
22832 22827 # Try to remove the string !DTRACE! from our list.
22833 22828 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22834 22829 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22835 22830 # If it failed, the variable was not from the command line. Ignore it,
22836 22831 # but warn the user (except for BASH, which is always set by the calling BASH).
22837 22832 if test "xDTRACE" != xBASH; then
22838 22833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22839 22834 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22840 22835 fi
22841 22836 # Try to locate tool using the code snippet
22842 22837 for ac_prog in dtrace
22843 22838 do
22844 22839 # Extract the first word of "$ac_prog", so it can be a program name with args.
22845 22840 set dummy $ac_prog; ac_word=$2
22846 22841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22847 22842 $as_echo_n "checking for $ac_word... " >&6; }
22848 22843 if ${ac_cv_path_DTRACE+:} false; then :
22849 22844 $as_echo_n "(cached) " >&6
22850 22845 else
22851 22846 case $DTRACE in
22852 22847 [\\/]* | ?:[\\/]*)
22853 22848 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22854 22849 ;;
22855 22850 *)
22856 22851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22857 22852 for as_dir in $PATH
22858 22853 do
22859 22854 IFS=$as_save_IFS
22860 22855 test -z "$as_dir" && as_dir=.
22861 22856 for ac_exec_ext in '' $ac_executable_extensions; do
22862 22857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22863 22858 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22864 22859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22865 22860 break 2
22866 22861 fi
22867 22862 done
22868 22863 done
22869 22864 IFS=$as_save_IFS
22870 22865
22871 22866 ;;
22872 22867 esac
22873 22868 fi
22874 22869 DTRACE=$ac_cv_path_DTRACE
22875 22870 if test -n "$DTRACE"; then
22876 22871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22877 22872 $as_echo "$DTRACE" >&6; }
22878 22873 else
22879 22874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22880 22875 $as_echo "no" >&6; }
22881 22876 fi
22882 22877
22883 22878
22884 22879 test -n "$DTRACE" && break
22885 22880 done
22886 22881
22887 22882 else
22888 22883 # If it succeeded, then it was overridden by the user. We will use it
22889 22884 # for the tool.
22890 22885
22891 22886 # First remove it from the list of overridden variables, so we can test
22892 22887 # for unknown variables in the end.
22893 22888 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22894 22889
22895 22890 # Check if we try to supply an empty value
22896 22891 if test "x$DTRACE" = x; then
22897 22892 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22898 22893 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22899 22894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22900 22895 $as_echo_n "checking for DTRACE... " >&6; }
22901 22896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22902 22897 $as_echo "disabled" >&6; }
22903 22898 else
22904 22899 # Check if the provided tool contains a complete path.
22905 22900 tool_specified="$DTRACE"
22906 22901 tool_basename="${tool_specified##*/}"
22907 22902 if test "x$tool_basename" = "x$tool_specified"; then
22908 22903 # A command without a complete path is provided, search $PATH.
22909 22904 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22910 22905 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22911 22906 # Extract the first word of "$tool_basename", so it can be a program name with args.
22912 22907 set dummy $tool_basename; ac_word=$2
22913 22908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22914 22909 $as_echo_n "checking for $ac_word... " >&6; }
22915 22910 if ${ac_cv_path_DTRACE+:} false; then :
22916 22911 $as_echo_n "(cached) " >&6
22917 22912 else
22918 22913 case $DTRACE in
22919 22914 [\\/]* | ?:[\\/]*)
22920 22915 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22921 22916 ;;
22922 22917 *)
22923 22918 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22924 22919 for as_dir in $PATH
22925 22920 do
22926 22921 IFS=$as_save_IFS
22927 22922 test -z "$as_dir" && as_dir=.
22928 22923 for ac_exec_ext in '' $ac_executable_extensions; do
22929 22924 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22930 22925 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22931 22926 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22932 22927 break 2
22933 22928 fi
22934 22929 done
22935 22930 done
22936 22931 IFS=$as_save_IFS
22937 22932
22938 22933 ;;
22939 22934 esac
22940 22935 fi
22941 22936 DTRACE=$ac_cv_path_DTRACE
22942 22937 if test -n "$DTRACE"; then
22943 22938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22944 22939 $as_echo "$DTRACE" >&6; }
22945 22940 else
22946 22941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22947 22942 $as_echo "no" >&6; }
22948 22943 fi
22949 22944
22950 22945
22951 22946 if test "x$DTRACE" = x; then
22952 22947 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22953 22948 fi
22954 22949 else
22955 22950 # Otherwise we believe it is a complete path. Use it as it is.
22956 22951 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22957 22952 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22958 22953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22959 22954 $as_echo_n "checking for DTRACE... " >&6; }
22960 22955 if test ! -x "$tool_specified"; then
22961 22956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22962 22957 $as_echo "not found" >&6; }
22963 22958 as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22964 22959 fi
22965 22960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22966 22961 $as_echo "$tool_specified" >&6; }
22967 22962 fi
22968 22963 fi
22969 22964 fi
22970 22965
22971 22966 fi
22972 22967
22973 22968
22974 22969
22975 22970
22976 22971 # Publish this variable in the help.
22977 22972
22978 22973
22979 22974 if [ -z "${PATCH+x}" ]; then
22980 22975 # The variable is not set by user, try to locate tool using the code snippet
22981 22976 for ac_prog in gpatch patch
22982 22977 do
22983 22978 # Extract the first word of "$ac_prog", so it can be a program name with args.
22984 22979 set dummy $ac_prog; ac_word=$2
22985 22980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22986 22981 $as_echo_n "checking for $ac_word... " >&6; }
22987 22982 if ${ac_cv_path_PATCH+:} false; then :
22988 22983 $as_echo_n "(cached) " >&6
22989 22984 else
22990 22985 case $PATCH in
22991 22986 [\\/]* | ?:[\\/]*)
22992 22987 ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22993 22988 ;;
22994 22989 *)
22995 22990 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22996 22991 for as_dir in $PATH
22997 22992 do
22998 22993 IFS=$as_save_IFS
22999 22994 test -z "$as_dir" && as_dir=.
23000 22995 for ac_exec_ext in '' $ac_executable_extensions; do
23001 22996 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23002 22997 ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23003 22998 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23004 22999 break 2
23005 23000 fi
23006 23001 done
23007 23002 done
23008 23003 IFS=$as_save_IFS
23009 23004
23010 23005 ;;
23011 23006 esac
23012 23007 fi
23013 23008 PATCH=$ac_cv_path_PATCH
23014 23009 if test -n "$PATCH"; then
23015 23010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23016 23011 $as_echo "$PATCH" >&6; }
23017 23012 else
23018 23013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23019 23014 $as_echo "no" >&6; }
23020 23015 fi
23021 23016
23022 23017
23023 23018 test -n "$PATCH" && break
23024 23019 done
23025 23020
23026 23021 else
23027 23022 # The variable is set, but is it from the command line or the environment?
23028 23023
23029 23024 # Try to remove the string !PATCH! from our list.
23030 23025 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23031 23026 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23032 23027 # If it failed, the variable was not from the command line. Ignore it,
23033 23028 # but warn the user (except for BASH, which is always set by the calling BASH).
23034 23029 if test "xPATCH" != xBASH; then
23035 23030 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23036 23031 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23037 23032 fi
23038 23033 # Try to locate tool using the code snippet
23039 23034 for ac_prog in gpatch patch
23040 23035 do
23041 23036 # Extract the first word of "$ac_prog", so it can be a program name with args.
23042 23037 set dummy $ac_prog; ac_word=$2
23043 23038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23044 23039 $as_echo_n "checking for $ac_word... " >&6; }
23045 23040 if ${ac_cv_path_PATCH+:} false; then :
23046 23041 $as_echo_n "(cached) " >&6
23047 23042 else
23048 23043 case $PATCH in
23049 23044 [\\/]* | ?:[\\/]*)
23050 23045 ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23051 23046 ;;
23052 23047 *)
23053 23048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23054 23049 for as_dir in $PATH
23055 23050 do
23056 23051 IFS=$as_save_IFS
23057 23052 test -z "$as_dir" && as_dir=.
23058 23053 for ac_exec_ext in '' $ac_executable_extensions; do
23059 23054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23060 23055 ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23061 23056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23062 23057 break 2
23063 23058 fi
23064 23059 done
23065 23060 done
23066 23061 IFS=$as_save_IFS
23067 23062
23068 23063 ;;
23069 23064 esac
23070 23065 fi
23071 23066 PATCH=$ac_cv_path_PATCH
23072 23067 if test -n "$PATCH"; then
23073 23068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23074 23069 $as_echo "$PATCH" >&6; }
23075 23070 else
23076 23071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23077 23072 $as_echo "no" >&6; }
23078 23073 fi
23079 23074
23080 23075
23081 23076 test -n "$PATCH" && break
23082 23077 done
23083 23078
23084 23079 else
23085 23080 # If it succeeded, then it was overridden by the user. We will use it
23086 23081 # for the tool.
23087 23082
23088 23083 # First remove it from the list of overridden variables, so we can test
23089 23084 # for unknown variables in the end.
23090 23085 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23091 23086
23092 23087 # Check if we try to supply an empty value
23093 23088 if test "x$PATCH" = x; then
23094 23089 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23095 23090 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23096 23091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23097 23092 $as_echo_n "checking for PATCH... " >&6; }
23098 23093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23099 23094 $as_echo "disabled" >&6; }
23100 23095 else
23101 23096 # Check if the provided tool contains a complete path.
23102 23097 tool_specified="$PATCH"
23103 23098 tool_basename="${tool_specified##*/}"
23104 23099 if test "x$tool_basename" = "x$tool_specified"; then
23105 23100 # A command without a complete path is provided, search $PATH.
23106 23101 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23107 23102 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23108 23103 # Extract the first word of "$tool_basename", so it can be a program name with args.
23109 23104 set dummy $tool_basename; ac_word=$2
23110 23105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23111 23106 $as_echo_n "checking for $ac_word... " >&6; }
23112 23107 if ${ac_cv_path_PATCH+:} false; then :
23113 23108 $as_echo_n "(cached) " >&6
23114 23109 else
23115 23110 case $PATCH in
23116 23111 [\\/]* | ?:[\\/]*)
23117 23112 ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23118 23113 ;;
23119 23114 *)
23120 23115 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23121 23116 for as_dir in $PATH
23122 23117 do
23123 23118 IFS=$as_save_IFS
23124 23119 test -z "$as_dir" && as_dir=.
23125 23120 for ac_exec_ext in '' $ac_executable_extensions; do
23126 23121 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23127 23122 ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23128 23123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23129 23124 break 2
23130 23125 fi
23131 23126 done
23132 23127 done
23133 23128 IFS=$as_save_IFS
23134 23129
23135 23130 ;;
23136 23131 esac
23137 23132 fi
23138 23133 PATCH=$ac_cv_path_PATCH
23139 23134 if test -n "$PATCH"; then
23140 23135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23141 23136 $as_echo "$PATCH" >&6; }
23142 23137 else
23143 23138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23144 23139 $as_echo "no" >&6; }
23145 23140 fi
23146 23141
23147 23142
23148 23143 if test "x$PATCH" = x; then
23149 23144 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23150 23145 fi
23151 23146 else
23152 23147 # Otherwise we believe it is a complete path. Use it as it is.
23153 23148 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23154 23149 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23155 23150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23156 23151 $as_echo_n "checking for PATCH... " >&6; }
23157 23152 if test ! -x "$tool_specified"; then
23158 23153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23159 23154 $as_echo "not found" >&6; }
23160 23155 as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23161 23156 fi
23162 23157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23163 23158 $as_echo "$tool_specified" >&6; }
23164 23159 fi
23165 23160 fi
23166 23161 fi
23167 23162
23168 23163 fi
23169 23164
23170 23165
23171 23166 # Check if it's GNU time
23172 23167 IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23173 23168 if test "x$IS_GNU_TIME" != x; then
23174 23169 IS_GNU_TIME=yes
23175 23170 else
23176 23171 IS_GNU_TIME=no
23177 23172 fi
23178 23173
23179 23174
23180 23175 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23181 23176
23182 23177
23183 23178
23184 23179 # Publish this variable in the help.
23185 23180
23186 23181
23187 23182 if [ -z "${DSYMUTIL+x}" ]; then
23188 23183 # The variable is not set by user, try to locate tool using the code snippet
23189 23184 for ac_prog in dsymutil
23190 23185 do
23191 23186 # Extract the first word of "$ac_prog", so it can be a program name with args.
23192 23187 set dummy $ac_prog; ac_word=$2
23193 23188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23194 23189 $as_echo_n "checking for $ac_word... " >&6; }
23195 23190 if ${ac_cv_path_DSYMUTIL+:} false; then :
23196 23191 $as_echo_n "(cached) " >&6
23197 23192 else
23198 23193 case $DSYMUTIL in
23199 23194 [\\/]* | ?:[\\/]*)
23200 23195 ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23201 23196 ;;
23202 23197 *)
23203 23198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23204 23199 for as_dir in $PATH
23205 23200 do
23206 23201 IFS=$as_save_IFS
23207 23202 test -z "$as_dir" && as_dir=.
23208 23203 for ac_exec_ext in '' $ac_executable_extensions; do
23209 23204 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23210 23205 ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23211 23206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23212 23207 break 2
23213 23208 fi
23214 23209 done
23215 23210 done
23216 23211 IFS=$as_save_IFS
23217 23212
23218 23213 ;;
23219 23214 esac
23220 23215 fi
23221 23216 DSYMUTIL=$ac_cv_path_DSYMUTIL
23222 23217 if test -n "$DSYMUTIL"; then
23223 23218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23224 23219 $as_echo "$DSYMUTIL" >&6; }
23225 23220 else
23226 23221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23227 23222 $as_echo "no" >&6; }
23228 23223 fi
23229 23224
23230 23225
23231 23226 test -n "$DSYMUTIL" && break
23232 23227 done
23233 23228
23234 23229 else
23235 23230 # The variable is set, but is it from the command line or the environment?
23236 23231
23237 23232 # Try to remove the string !DSYMUTIL! from our list.
23238 23233 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23239 23234 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23240 23235 # If it failed, the variable was not from the command line. Ignore it,
23241 23236 # but warn the user (except for BASH, which is always set by the calling BASH).
23242 23237 if test "xDSYMUTIL" != xBASH; then
23243 23238 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23244 23239 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23245 23240 fi
23246 23241 # Try to locate tool using the code snippet
23247 23242 for ac_prog in dsymutil
23248 23243 do
23249 23244 # Extract the first word of "$ac_prog", so it can be a program name with args.
23250 23245 set dummy $ac_prog; ac_word=$2
23251 23246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23252 23247 $as_echo_n "checking for $ac_word... " >&6; }
23253 23248 if ${ac_cv_path_DSYMUTIL+:} false; then :
23254 23249 $as_echo_n "(cached) " >&6
23255 23250 else
23256 23251 case $DSYMUTIL in
23257 23252 [\\/]* | ?:[\\/]*)
23258 23253 ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23259 23254 ;;
23260 23255 *)
23261 23256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23262 23257 for as_dir in $PATH
23263 23258 do
23264 23259 IFS=$as_save_IFS
23265 23260 test -z "$as_dir" && as_dir=.
23266 23261 for ac_exec_ext in '' $ac_executable_extensions; do
23267 23262 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23268 23263 ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23269 23264 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23270 23265 break 2
23271 23266 fi
23272 23267 done
23273 23268 done
23274 23269 IFS=$as_save_IFS
23275 23270
23276 23271 ;;
23277 23272 esac
23278 23273 fi
23279 23274 DSYMUTIL=$ac_cv_path_DSYMUTIL
23280 23275 if test -n "$DSYMUTIL"; then
23281 23276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23282 23277 $as_echo "$DSYMUTIL" >&6; }
23283 23278 else
23284 23279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23285 23280 $as_echo "no" >&6; }
23286 23281 fi
23287 23282
23288 23283
23289 23284 test -n "$DSYMUTIL" && break
23290 23285 done
23291 23286
23292 23287 else
23293 23288 # If it succeeded, then it was overridden by the user. We will use it
23294 23289 # for the tool.
23295 23290
23296 23291 # First remove it from the list of overridden variables, so we can test
23297 23292 # for unknown variables in the end.
23298 23293 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23299 23294
23300 23295 # Check if we try to supply an empty value
23301 23296 if test "x$DSYMUTIL" = x; then
23302 23297 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23303 23298 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23304 23299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23305 23300 $as_echo_n "checking for DSYMUTIL... " >&6; }
23306 23301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23307 23302 $as_echo "disabled" >&6; }
23308 23303 else
23309 23304 # Check if the provided tool contains a complete path.
23310 23305 tool_specified="$DSYMUTIL"
23311 23306 tool_basename="${tool_specified##*/}"
23312 23307 if test "x$tool_basename" = "x$tool_specified"; then
23313 23308 # A command without a complete path is provided, search $PATH.
23314 23309 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23315 23310 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23316 23311 # Extract the first word of "$tool_basename", so it can be a program name with args.
23317 23312 set dummy $tool_basename; ac_word=$2
23318 23313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23319 23314 $as_echo_n "checking for $ac_word... " >&6; }
23320 23315 if ${ac_cv_path_DSYMUTIL+:} false; then :
23321 23316 $as_echo_n "(cached) " >&6
23322 23317 else
23323 23318 case $DSYMUTIL in
23324 23319 [\\/]* | ?:[\\/]*)
23325 23320 ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23326 23321 ;;
23327 23322 *)
23328 23323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23329 23324 for as_dir in $PATH
23330 23325 do
23331 23326 IFS=$as_save_IFS
23332 23327 test -z "$as_dir" && as_dir=.
23333 23328 for ac_exec_ext in '' $ac_executable_extensions; do
23334 23329 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23335 23330 ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23336 23331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23337 23332 break 2
23338 23333 fi
23339 23334 done
23340 23335 done
23341 23336 IFS=$as_save_IFS
23342 23337
23343 23338 ;;
23344 23339 esac
23345 23340 fi
23346 23341 DSYMUTIL=$ac_cv_path_DSYMUTIL
23347 23342 if test -n "$DSYMUTIL"; then
23348 23343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23349 23344 $as_echo "$DSYMUTIL" >&6; }
23350 23345 else
23351 23346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23352 23347 $as_echo "no" >&6; }
23353 23348 fi
23354 23349
23355 23350
23356 23351 if test "x$DSYMUTIL" = x; then
23357 23352 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23358 23353 fi
23359 23354 else
23360 23355 # Otherwise we believe it is a complete path. Use it as it is.
23361 23356 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23362 23357 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23363 23358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23364 23359 $as_echo_n "checking for DSYMUTIL... " >&6; }
23365 23360 if test ! -x "$tool_specified"; then
23366 23361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23367 23362 $as_echo "not found" >&6; }
23368 23363 as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23369 23364 fi
23370 23365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23371 23366 $as_echo "$tool_specified" >&6; }
23372 23367 fi
23373 23368 fi
23374 23369 fi
23375 23370
23376 23371 fi
23377 23372
23378 23373
23379 23374
23380 23375 if test "x$DSYMUTIL" = x; then
23381 23376 as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23382 23377 fi
23383 23378
23384 23379
23385 23380
23386 23381
23387 23382
23388 23383 # Publish this variable in the help.
23389 23384
23390 23385
23391 23386 if [ -z "${XATTR+x}" ]; then
23392 23387 # The variable is not set by user, try to locate tool using the code snippet
23393 23388 for ac_prog in xattr
23394 23389 do
23395 23390 # Extract the first word of "$ac_prog", so it can be a program name with args.
23396 23391 set dummy $ac_prog; ac_word=$2
23397 23392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23398 23393 $as_echo_n "checking for $ac_word... " >&6; }
23399 23394 if ${ac_cv_path_XATTR+:} false; then :
23400 23395 $as_echo_n "(cached) " >&6
23401 23396 else
23402 23397 case $XATTR in
23403 23398 [\\/]* | ?:[\\/]*)
23404 23399 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23405 23400 ;;
23406 23401 *)
23407 23402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23408 23403 for as_dir in $PATH
23409 23404 do
23410 23405 IFS=$as_save_IFS
23411 23406 test -z "$as_dir" && as_dir=.
23412 23407 for ac_exec_ext in '' $ac_executable_extensions; do
23413 23408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23414 23409 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23415 23410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23416 23411 break 2
23417 23412 fi
23418 23413 done
23419 23414 done
23420 23415 IFS=$as_save_IFS
23421 23416
23422 23417 ;;
23423 23418 esac
23424 23419 fi
23425 23420 XATTR=$ac_cv_path_XATTR
23426 23421 if test -n "$XATTR"; then
23427 23422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23428 23423 $as_echo "$XATTR" >&6; }
23429 23424 else
23430 23425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23431 23426 $as_echo "no" >&6; }
23432 23427 fi
23433 23428
23434 23429
23435 23430 test -n "$XATTR" && break
23436 23431 done
23437 23432
23438 23433 else
23439 23434 # The variable is set, but is it from the command line or the environment?
23440 23435
23441 23436 # Try to remove the string !XATTR! from our list.
23442 23437 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23443 23438 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23444 23439 # If it failed, the variable was not from the command line. Ignore it,
23445 23440 # but warn the user (except for BASH, which is always set by the calling BASH).
23446 23441 if test "xXATTR" != xBASH; then
23447 23442 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23448 23443 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23449 23444 fi
23450 23445 # Try to locate tool using the code snippet
23451 23446 for ac_prog in xattr
23452 23447 do
23453 23448 # Extract the first word of "$ac_prog", so it can be a program name with args.
23454 23449 set dummy $ac_prog; ac_word=$2
23455 23450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23456 23451 $as_echo_n "checking for $ac_word... " >&6; }
23457 23452 if ${ac_cv_path_XATTR+:} false; then :
23458 23453 $as_echo_n "(cached) " >&6
23459 23454 else
23460 23455 case $XATTR in
23461 23456 [\\/]* | ?:[\\/]*)
23462 23457 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23463 23458 ;;
23464 23459 *)
23465 23460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23466 23461 for as_dir in $PATH
23467 23462 do
23468 23463 IFS=$as_save_IFS
23469 23464 test -z "$as_dir" && as_dir=.
23470 23465 for ac_exec_ext in '' $ac_executable_extensions; do
23471 23466 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23472 23467 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23473 23468 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23474 23469 break 2
23475 23470 fi
23476 23471 done
23477 23472 done
23478 23473 IFS=$as_save_IFS
23479 23474
23480 23475 ;;
23481 23476 esac
23482 23477 fi
23483 23478 XATTR=$ac_cv_path_XATTR
23484 23479 if test -n "$XATTR"; then
23485 23480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23486 23481 $as_echo "$XATTR" >&6; }
23487 23482 else
23488 23483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23489 23484 $as_echo "no" >&6; }
23490 23485 fi
23491 23486
23492 23487
23493 23488 test -n "$XATTR" && break
23494 23489 done
23495 23490
23496 23491 else
23497 23492 # If it succeeded, then it was overridden by the user. We will use it
23498 23493 # for the tool.
23499 23494
23500 23495 # First remove it from the list of overridden variables, so we can test
23501 23496 # for unknown variables in the end.
23502 23497 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23503 23498
23504 23499 # Check if we try to supply an empty value
23505 23500 if test "x$XATTR" = x; then
23506 23501 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23507 23502 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23508 23503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23509 23504 $as_echo_n "checking for XATTR... " >&6; }
23510 23505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23511 23506 $as_echo "disabled" >&6; }
23512 23507 else
23513 23508 # Check if the provided tool contains a complete path.
23514 23509 tool_specified="$XATTR"
23515 23510 tool_basename="${tool_specified##*/}"
23516 23511 if test "x$tool_basename" = "x$tool_specified"; then
23517 23512 # A command without a complete path is provided, search $PATH.
23518 23513 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23519 23514 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23520 23515 # Extract the first word of "$tool_basename", so it can be a program name with args.
23521 23516 set dummy $tool_basename; ac_word=$2
23522 23517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23523 23518 $as_echo_n "checking for $ac_word... " >&6; }
23524 23519 if ${ac_cv_path_XATTR+:} false; then :
23525 23520 $as_echo_n "(cached) " >&6
23526 23521 else
23527 23522 case $XATTR in
23528 23523 [\\/]* | ?:[\\/]*)
23529 23524 ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23530 23525 ;;
23531 23526 *)
23532 23527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23533 23528 for as_dir in $PATH
23534 23529 do
23535 23530 IFS=$as_save_IFS
23536 23531 test -z "$as_dir" && as_dir=.
23537 23532 for ac_exec_ext in '' $ac_executable_extensions; do
23538 23533 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23539 23534 ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23540 23535 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23541 23536 break 2
23542 23537 fi
23543 23538 done
23544 23539 done
23545 23540 IFS=$as_save_IFS
23546 23541
23547 23542 ;;
23548 23543 esac
23549 23544 fi
23550 23545 XATTR=$ac_cv_path_XATTR
23551 23546 if test -n "$XATTR"; then
23552 23547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23553 23548 $as_echo "$XATTR" >&6; }
23554 23549 else
23555 23550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23556 23551 $as_echo "no" >&6; }
23557 23552 fi
23558 23553
23559 23554
23560 23555 if test "x$XATTR" = x; then
23561 23556 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23562 23557 fi
23563 23558 else
23564 23559 # Otherwise we believe it is a complete path. Use it as it is.
23565 23560 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23566 23561 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23567 23562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23568 23563 $as_echo_n "checking for XATTR... " >&6; }
23569 23564 if test ! -x "$tool_specified"; then
23570 23565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23571 23566 $as_echo "not found" >&6; }
23572 23567 as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23573 23568 fi
23574 23569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23575 23570 $as_echo "$tool_specified" >&6; }
23576 23571 fi
23577 23572 fi
23578 23573 fi
23579 23574
23580 23575 fi
23581 23576
23582 23577
23583 23578
23584 23579 if test "x$XATTR" = x; then
23585 23580 as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23586 23581 fi
23587 23582
23588 23583
23589 23584
23590 23585
23591 23586 # Publish this variable in the help.
23592 23587
23593 23588
23594 23589 if [ -z "${CODESIGN+x}" ]; then
23595 23590 # The variable is not set by user, try to locate tool using the code snippet
23596 23591 for ac_prog in codesign
23597 23592 do
23598 23593 # Extract the first word of "$ac_prog", so it can be a program name with args.
23599 23594 set dummy $ac_prog; ac_word=$2
23600 23595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23601 23596 $as_echo_n "checking for $ac_word... " >&6; }
23602 23597 if ${ac_cv_path_CODESIGN+:} false; then :
23603 23598 $as_echo_n "(cached) " >&6
23604 23599 else
23605 23600 case $CODESIGN in
23606 23601 [\\/]* | ?:[\\/]*)
23607 23602 ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23608 23603 ;;
23609 23604 *)
23610 23605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23611 23606 for as_dir in $PATH
23612 23607 do
23613 23608 IFS=$as_save_IFS
23614 23609 test -z "$as_dir" && as_dir=.
23615 23610 for ac_exec_ext in '' $ac_executable_extensions; do
23616 23611 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23617 23612 ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23618 23613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23619 23614 break 2
23620 23615 fi
23621 23616 done
23622 23617 done
23623 23618 IFS=$as_save_IFS
23624 23619
23625 23620 ;;
23626 23621 esac
23627 23622 fi
23628 23623 CODESIGN=$ac_cv_path_CODESIGN
23629 23624 if test -n "$CODESIGN"; then
23630 23625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23631 23626 $as_echo "$CODESIGN" >&6; }
23632 23627 else
23633 23628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23634 23629 $as_echo "no" >&6; }
23635 23630 fi
23636 23631
23637 23632
23638 23633 test -n "$CODESIGN" && break
23639 23634 done
23640 23635
23641 23636 else
23642 23637 # The variable is set, but is it from the command line or the environment?
23643 23638
23644 23639 # Try to remove the string !CODESIGN! from our list.
23645 23640 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23646 23641 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23647 23642 # If it failed, the variable was not from the command line. Ignore it,
23648 23643 # but warn the user (except for BASH, which is always set by the calling BASH).
23649 23644 if test "xCODESIGN" != xBASH; then
23650 23645 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23651 23646 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23652 23647 fi
23653 23648 # Try to locate tool using the code snippet
23654 23649 for ac_prog in codesign
23655 23650 do
23656 23651 # Extract the first word of "$ac_prog", so it can be a program name with args.
23657 23652 set dummy $ac_prog; ac_word=$2
23658 23653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23659 23654 $as_echo_n "checking for $ac_word... " >&6; }
23660 23655 if ${ac_cv_path_CODESIGN+:} false; then :
23661 23656 $as_echo_n "(cached) " >&6
23662 23657 else
23663 23658 case $CODESIGN in
23664 23659 [\\/]* | ?:[\\/]*)
23665 23660 ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23666 23661 ;;
23667 23662 *)
23668 23663 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23669 23664 for as_dir in $PATH
23670 23665 do
23671 23666 IFS=$as_save_IFS
23672 23667 test -z "$as_dir" && as_dir=.
23673 23668 for ac_exec_ext in '' $ac_executable_extensions; do
23674 23669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23675 23670 ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23676 23671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23677 23672 break 2
23678 23673 fi
23679 23674 done
23680 23675 done
23681 23676 IFS=$as_save_IFS
23682 23677
23683 23678 ;;
23684 23679 esac
23685 23680 fi
23686 23681 CODESIGN=$ac_cv_path_CODESIGN
23687 23682 if test -n "$CODESIGN"; then
23688 23683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23689 23684 $as_echo "$CODESIGN" >&6; }
23690 23685 else
23691 23686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23692 23687 $as_echo "no" >&6; }
23693 23688 fi
23694 23689
23695 23690
23696 23691 test -n "$CODESIGN" && break
23697 23692 done
23698 23693
23699 23694 else
23700 23695 # If it succeeded, then it was overridden by the user. We will use it
23701 23696 # for the tool.
23702 23697
23703 23698 # First remove it from the list of overridden variables, so we can test
23704 23699 # for unknown variables in the end.
23705 23700 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23706 23701
23707 23702 # Check if we try to supply an empty value
23708 23703 if test "x$CODESIGN" = x; then
23709 23704 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23710 23705 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23711 23706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23712 23707 $as_echo_n "checking for CODESIGN... " >&6; }
23713 23708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23714 23709 $as_echo "disabled" >&6; }
23715 23710 else
23716 23711 # Check if the provided tool contains a complete path.
23717 23712 tool_specified="$CODESIGN"
23718 23713 tool_basename="${tool_specified##*/}"
23719 23714 if test "x$tool_basename" = "x$tool_specified"; then
23720 23715 # A command without a complete path is provided, search $PATH.
23721 23716 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23722 23717 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23723 23718 # Extract the first word of "$tool_basename", so it can be a program name with args.
23724 23719 set dummy $tool_basename; ac_word=$2
23725 23720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23726 23721 $as_echo_n "checking for $ac_word... " >&6; }
23727 23722 if ${ac_cv_path_CODESIGN+:} false; then :
23728 23723 $as_echo_n "(cached) " >&6
23729 23724 else
23730 23725 case $CODESIGN in
23731 23726 [\\/]* | ?:[\\/]*)
23732 23727 ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23733 23728 ;;
23734 23729 *)
23735 23730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23736 23731 for as_dir in $PATH
23737 23732 do
23738 23733 IFS=$as_save_IFS
23739 23734 test -z "$as_dir" && as_dir=.
23740 23735 for ac_exec_ext in '' $ac_executable_extensions; do
23741 23736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23742 23737 ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23743 23738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23744 23739 break 2
23745 23740 fi
23746 23741 done
23747 23742 done
23748 23743 IFS=$as_save_IFS
23749 23744
23750 23745 ;;
23751 23746 esac
23752 23747 fi
23753 23748 CODESIGN=$ac_cv_path_CODESIGN
23754 23749 if test -n "$CODESIGN"; then
23755 23750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23756 23751 $as_echo "$CODESIGN" >&6; }
23757 23752 else
23758 23753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23759 23754 $as_echo "no" >&6; }
23760 23755 fi
23761 23756
23762 23757
23763 23758 if test "x$CODESIGN" = x; then
23764 23759 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23765 23760 fi
23766 23761 else
23767 23762 # Otherwise we believe it is a complete path. Use it as it is.
23768 23763 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23769 23764 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23770 23765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23771 23766 $as_echo_n "checking for CODESIGN... " >&6; }
23772 23767 if test ! -x "$tool_specified"; then
23773 23768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23774 23769 $as_echo "not found" >&6; }
23775 23770 as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23776 23771 fi
23777 23772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23778 23773 $as_echo "$tool_specified" >&6; }
23779 23774 fi
23780 23775 fi
23781 23776 fi
23782 23777
23783 23778 fi
23784 23779
23785 23780
23786 23781 if test "x$CODESIGN" != "x"; then
23787 23782 # Verify that the openjdk_codesign certificate is present
23788 23783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23789 23784 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23790 23785 $RM codesign-testfile
23791 23786 $TOUCH codesign-testfile
23792 23787 $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23793 23788 $RM codesign-testfile
23794 23789 if test "x$CODESIGN" = x; then
23795 23790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23796 23791 $as_echo "no" >&6; }
23797 23792 else
23798 23793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23799 23794 $as_echo "yes" >&6; }
23800 23795 fi
23801 23796 fi
23802 23797
23803 23798
23804 23799
23805 23800 # Publish this variable in the help.
23806 23801
23807 23802
23808 23803 if [ -z "${SETFILE+x}" ]; then
23809 23804 # The variable is not set by user, try to locate tool using the code snippet
23810 23805 for ac_prog in SetFile
23811 23806 do
23812 23807 # Extract the first word of "$ac_prog", so it can be a program name with args.
23813 23808 set dummy $ac_prog; ac_word=$2
23814 23809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23815 23810 $as_echo_n "checking for $ac_word... " >&6; }
23816 23811 if ${ac_cv_path_SETFILE+:} false; then :
23817 23812 $as_echo_n "(cached) " >&6
23818 23813 else
23819 23814 case $SETFILE in
23820 23815 [\\/]* | ?:[\\/]*)
23821 23816 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23822 23817 ;;
23823 23818 *)
23824 23819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23825 23820 for as_dir in $PATH
23826 23821 do
23827 23822 IFS=$as_save_IFS
23828 23823 test -z "$as_dir" && as_dir=.
23829 23824 for ac_exec_ext in '' $ac_executable_extensions; do
23830 23825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23831 23826 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23832 23827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23833 23828 break 2
23834 23829 fi
23835 23830 done
23836 23831 done
23837 23832 IFS=$as_save_IFS
23838 23833
23839 23834 ;;
23840 23835 esac
23841 23836 fi
23842 23837 SETFILE=$ac_cv_path_SETFILE
23843 23838 if test -n "$SETFILE"; then
23844 23839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23845 23840 $as_echo "$SETFILE" >&6; }
23846 23841 else
23847 23842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23848 23843 $as_echo "no" >&6; }
23849 23844 fi
23850 23845
23851 23846
23852 23847 test -n "$SETFILE" && break
23853 23848 done
23854 23849
23855 23850 else
23856 23851 # The variable is set, but is it from the command line or the environment?
23857 23852
23858 23853 # Try to remove the string !SETFILE! from our list.
23859 23854 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23860 23855 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23861 23856 # If it failed, the variable was not from the command line. Ignore it,
23862 23857 # but warn the user (except for BASH, which is always set by the calling BASH).
23863 23858 if test "xSETFILE" != xBASH; then
23864 23859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23865 23860 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23866 23861 fi
23867 23862 # Try to locate tool using the code snippet
23868 23863 for ac_prog in SetFile
23869 23864 do
23870 23865 # Extract the first word of "$ac_prog", so it can be a program name with args.
23871 23866 set dummy $ac_prog; ac_word=$2
23872 23867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23873 23868 $as_echo_n "checking for $ac_word... " >&6; }
23874 23869 if ${ac_cv_path_SETFILE+:} false; then :
23875 23870 $as_echo_n "(cached) " >&6
23876 23871 else
23877 23872 case $SETFILE in
23878 23873 [\\/]* | ?:[\\/]*)
23879 23874 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23880 23875 ;;
23881 23876 *)
23882 23877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23883 23878 for as_dir in $PATH
23884 23879 do
23885 23880 IFS=$as_save_IFS
23886 23881 test -z "$as_dir" && as_dir=.
23887 23882 for ac_exec_ext in '' $ac_executable_extensions; do
23888 23883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23889 23884 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23890 23885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23891 23886 break 2
23892 23887 fi
23893 23888 done
23894 23889 done
23895 23890 IFS=$as_save_IFS
23896 23891
23897 23892 ;;
23898 23893 esac
23899 23894 fi
23900 23895 SETFILE=$ac_cv_path_SETFILE
23901 23896 if test -n "$SETFILE"; then
23902 23897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23903 23898 $as_echo "$SETFILE" >&6; }
23904 23899 else
23905 23900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23906 23901 $as_echo "no" >&6; }
23907 23902 fi
23908 23903
23909 23904
23910 23905 test -n "$SETFILE" && break
23911 23906 done
23912 23907
23913 23908 else
23914 23909 # If it succeeded, then it was overridden by the user. We will use it
23915 23910 # for the tool.
23916 23911
23917 23912 # First remove it from the list of overridden variables, so we can test
23918 23913 # for unknown variables in the end.
23919 23914 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23920 23915
23921 23916 # Check if we try to supply an empty value
23922 23917 if test "x$SETFILE" = x; then
23923 23918 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23924 23919 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23925 23920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23926 23921 $as_echo_n "checking for SETFILE... " >&6; }
23927 23922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23928 23923 $as_echo "disabled" >&6; }
23929 23924 else
23930 23925 # Check if the provided tool contains a complete path.
23931 23926 tool_specified="$SETFILE"
23932 23927 tool_basename="${tool_specified##*/}"
23933 23928 if test "x$tool_basename" = "x$tool_specified"; then
23934 23929 # A command without a complete path is provided, search $PATH.
23935 23930 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23936 23931 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23937 23932 # Extract the first word of "$tool_basename", so it can be a program name with args.
23938 23933 set dummy $tool_basename; ac_word=$2
23939 23934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23940 23935 $as_echo_n "checking for $ac_word... " >&6; }
23941 23936 if ${ac_cv_path_SETFILE+:} false; then :
23942 23937 $as_echo_n "(cached) " >&6
23943 23938 else
23944 23939 case $SETFILE in
23945 23940 [\\/]* | ?:[\\/]*)
23946 23941 ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23947 23942 ;;
23948 23943 *)
23949 23944 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23950 23945 for as_dir in $PATH
23951 23946 do
23952 23947 IFS=$as_save_IFS
23953 23948 test -z "$as_dir" && as_dir=.
23954 23949 for ac_exec_ext in '' $ac_executable_extensions; do
23955 23950 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23956 23951 ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23957 23952 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23958 23953 break 2
23959 23954 fi
23960 23955 done
23961 23956 done
23962 23957 IFS=$as_save_IFS
23963 23958
23964 23959 ;;
23965 23960 esac
23966 23961 fi
23967 23962 SETFILE=$ac_cv_path_SETFILE
23968 23963 if test -n "$SETFILE"; then
23969 23964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23970 23965 $as_echo "$SETFILE" >&6; }
23971 23966 else
23972 23967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23973 23968 $as_echo "no" >&6; }
23974 23969 fi
23975 23970
23976 23971
23977 23972 if test "x$SETFILE" = x; then
23978 23973 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23979 23974 fi
23980 23975 else
23981 23976 # Otherwise we believe it is a complete path. Use it as it is.
23982 23977 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23983 23978 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23984 23979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23985 23980 $as_echo_n "checking for SETFILE... " >&6; }
23986 23981 if test ! -x "$tool_specified"; then
23987 23982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23988 23983 $as_echo "not found" >&6; }
23989 23984 as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23990 23985 fi
23991 23986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23992 23987 $as_echo "$tool_specified" >&6; }
23993 23988 fi
23994 23989 fi
23995 23990 fi
23996 23991
23997 23992 fi
23998 23993
23999 23994
24000 23995
24001 23996 if test "x$SETFILE" = x; then
24002 23997 as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24003 23998 fi
24004 23999
24005 24000
24006 24001 fi
24007 24002
24008 24003
24009 24004 # Test if bash supports pipefail.
24010 24005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24011 24006 $as_echo_n "checking if bash supports pipefail... " >&6; }
24012 24007 if ${BASH} -c 'set -o pipefail'; then
24013 24008 BASH_ARGS="$BASH_ARGS -o pipefail"
24014 24009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24015 24010 $as_echo "yes" >&6; }
24016 24011 else
24017 24012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24018 24013 $as_echo "no" >&6; }
24019 24014 fi
24020 24015
24021 24016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24022 24017 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24023 24018 if ${BASH} -e -c 'true'; then
24024 24019 BASH_ARGS="$BASH_ARGS -e"
24025 24020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24026 24021 $as_echo "yes" >&6; }
24027 24022 else
24028 24023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24029 24024 $as_echo "no" >&6; }
24030 24025 fi
24031 24026
24032 24027
24033 24028
24034 24029
24035 24030 # Check if pkg-config is available.
24036 24031
24037 24032
24038 24033 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24039 24034 if test -n "$ac_tool_prefix"; then
24040 24035 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24041 24036 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24042 24037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24043 24038 $as_echo_n "checking for $ac_word... " >&6; }
24044 24039 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24045 24040 $as_echo_n "(cached) " >&6
24046 24041 else
24047 24042 case $PKG_CONFIG in
24048 24043 [\\/]* | ?:[\\/]*)
24049 24044 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24050 24045 ;;
24051 24046 *)
24052 24047 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24053 24048 for as_dir in $PATH
24054 24049 do
24055 24050 IFS=$as_save_IFS
24056 24051 test -z "$as_dir" && as_dir=.
24057 24052 for ac_exec_ext in '' $ac_executable_extensions; do
24058 24053 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24059 24054 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24060 24055 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24061 24056 break 2
24062 24057 fi
24063 24058 done
24064 24059 done
24065 24060 IFS=$as_save_IFS
24066 24061
24067 24062 ;;
24068 24063 esac
24069 24064 fi
24070 24065 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24071 24066 if test -n "$PKG_CONFIG"; then
24072 24067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24073 24068 $as_echo "$PKG_CONFIG" >&6; }
24074 24069 else
24075 24070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24076 24071 $as_echo "no" >&6; }
24077 24072 fi
24078 24073
24079 24074
24080 24075 fi
24081 24076 if test -z "$ac_cv_path_PKG_CONFIG"; then
24082 24077 ac_pt_PKG_CONFIG=$PKG_CONFIG
24083 24078 # Extract the first word of "pkg-config", so it can be a program name with args.
24084 24079 set dummy pkg-config; ac_word=$2
24085 24080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24086 24081 $as_echo_n "checking for $ac_word... " >&6; }
24087 24082 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24088 24083 $as_echo_n "(cached) " >&6
24089 24084 else
24090 24085 case $ac_pt_PKG_CONFIG in
24091 24086 [\\/]* | ?:[\\/]*)
24092 24087 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24093 24088 ;;
24094 24089 *)
24095 24090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24096 24091 for as_dir in $PATH
24097 24092 do
24098 24093 IFS=$as_save_IFS
24099 24094 test -z "$as_dir" && as_dir=.
24100 24095 for ac_exec_ext in '' $ac_executable_extensions; do
24101 24096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24102 24097 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24103 24098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24104 24099 break 2
24105 24100 fi
24106 24101 done
24107 24102 done
24108 24103 IFS=$as_save_IFS
24109 24104
24110 24105 ;;
24111 24106 esac
24112 24107 fi
24113 24108 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24114 24109 if test -n "$ac_pt_PKG_CONFIG"; then
24115 24110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24116 24111 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24117 24112 else
24118 24113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24119 24114 $as_echo "no" >&6; }
24120 24115 fi
24121 24116
24122 24117 if test "x$ac_pt_PKG_CONFIG" = x; then
24123 24118 PKG_CONFIG=""
24124 24119 else
24125 24120 case $cross_compiling:$ac_tool_warned in
24126 24121 yes:)
24127 24122 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24128 24123 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24129 24124 ac_tool_warned=yes ;;
24130 24125 esac
24131 24126 PKG_CONFIG=$ac_pt_PKG_CONFIG
24132 24127 fi
24133 24128 else
24134 24129 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24135 24130 fi
24136 24131
24137 24132 fi
24138 24133 if test -n "$PKG_CONFIG"; then
24139 24134 _pkg_min_version=0.9.0
24140 24135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24141 24136 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24142 24137 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24143 24138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24144 24139 $as_echo "yes" >&6; }
24145 24140 else
24146 24141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24147 24142 $as_echo "no" >&6; }
24148 24143 PKG_CONFIG=""
24149 24144 fi
24150 24145
24151 24146 fi
24152 24147
24153 24148 # After basic tools have been setup, we can check build os specific details.
24154 24149
24155 24150 ###############################################################################
24156 24151
24157 24152 # Note that this is the build platform OS version!
24158 24153
24159 24154 OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24160 24155 OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24161 24156 OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24162 24157 OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24163 24158
24164 24159
24165 24160
24166 24161
24167 24162
24168 24163 # Misc basic settings
24169 24164
24170 24165
24171 24166 # Check whether --with-default-make-target was given.
24172 24167 if test "${with_default_make_target+set}" = set; then :
24173 24168 withval=$with_default_make_target;
24174 24169 fi
24175 24170
24176 24171 if test "x$with_default_make_target" = "x" \
24177 24172 || test "x$with_default_make_target" = "xyes"; then
24178 24173 DEFAULT_MAKE_TARGET="exploded-image"
24179 24174 elif test "x$with_default_make_target" = "xno"; then
24180 24175 as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24181 24176 else
24182 24177 DEFAULT_MAKE_TARGET="$with_default_make_target"
24183 24178 fi
24184 24179
24185 24180
24186 24181
24187 24182
24188 24183 ###############################################################################
24189 24184 #
24190 24185 # Determine OpenJDK variants, options and version numbers.
24191 24186 #
24192 24187 ###############################################################################
24193 24188
24194 24189 # We need build & target for this.
24195 24190
24196 24191 # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24197 24192 # We always build headless support.
24198 24193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24199 24194 $as_echo_n "checking headful support... " >&6; }
24200 24195 # Check whether --enable-headful was given.
24201 24196 if test "${enable_headful+set}" = set; then :
24202 24197 enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24203 24198 else
24204 24199 SUPPORT_HEADFUL=yes
24205 24200 fi
24206 24201
24207 24202
24208 24203 SUPPORT_HEADLESS=yes
24209 24204 BUILD_HEADLESS="BUILD_HEADLESS:=true"
24210 24205
24211 24206 if test "x$SUPPORT_HEADFUL" = xyes; then
24212 24207 # We are building both headful and headless.
24213 24208 headful_msg="include support for both headful and headless"
24214 24209 fi
24215 24210
24216 24211 if test "x$SUPPORT_HEADFUL" = xno; then
24217 24212 # Thus we are building headless only.
24218 24213 BUILD_HEADLESS="BUILD_HEADLESS:=true"
24219 24214 headful_msg="headless only"
24220 24215 fi
24221 24216
24222 24217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24223 24218 $as_echo "$headful_msg" >&6; }
24224 24219
24225 24220
24226 24221
24227 24222
24228 24223
24229 24224 # Choose cacerts source file
24230 24225
24231 24226 # Check whether --with-cacerts-file was given.
24232 24227 if test "${with_cacerts_file+set}" = set; then :
24233 24228 withval=$with_cacerts_file;
24234 24229 fi
24235 24230
24236 24231 if test "x$with_cacerts_file" != x; then
24237 24232 CACERTS_FILE=$with_cacerts_file
24238 24233 fi
24239 24234
24240 24235
24241 24236 # Enable or disable unlimited crypto
24242 24237 # Check whether --enable-unlimited-crypto was given.
24243 24238 if test "${enable_unlimited_crypto+set}" = set; then :
24244 24239 enableval=$enable_unlimited_crypto;
24245 24240 else
24246 24241 enable_unlimited_crypto=no
24247 24242 fi
24248 24243
24249 24244 if test "x$enable_unlimited_crypto" = "xyes"; then
24250 24245 UNLIMITED_CRYPTO=true
24251 24246 else
24252 24247 UNLIMITED_CRYPTO=false
24253 24248 fi
24254 24249
24255 24250
24256 24251 # Should we build the serviceability agent (SA)?
24257 24252 INCLUDE_SA=true
24258 24253 if [[ " $JVM_VARIANTS " =~ " zero " ]] || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
24259 24254 INCLUDE_SA=false
24260 24255 fi
24261 24256 if test "x$OPENJDK_TARGET_OS" = xaix ; then
24262 24257 INCLUDE_SA=false
24263 24258 fi
24264 24259
24265 24260
24266 24261 # Compress jars
24267 24262 COMPRESS_JARS=false
24268 24263
24269 24264
24270 24265
24271 24266 # Setup default copyright year. Mostly overridden when building close to a new year.
24272 24267
24273 24268 # Check whether --with-copyright-year was given.
24274 24269 if test "${with_copyright_year+set}" = set; then :
24275 24270 withval=$with_copyright_year;
24276 24271 fi
24277 24272
24278 24273 if test "x$with_copyright_year" = xyes; then
24279 24274 as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24280 24275 elif test "x$with_copyright_year" != x; then
24281 24276 COPYRIGHT_YEAR="$with_copyright_year"
24282 24277 else
24283 24278 COPYRIGHT_YEAR=`$DATE +'%Y'`
24284 24279 fi
24285 24280
24286 24281
24287 24282
24288 24283 # Check whether --enable-keep-packaged-modules was given.
24289 24284 if test "${enable_keep_packaged_modules+set}" = set; then :
24290 24285 enableval=$enable_keep_packaged_modules;
24291 24286 fi
24292 24287
24293 24288
24294 24289 if test "x$enable_keep_packaged_modules" = "xyes"; then
24295 24290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24296 24291 $as_echo_n "checking if packaged modules are kept... " >&6; }
24297 24292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24298 24293 $as_echo "yes" >&6; }
24299 24294 JLINK_KEEP_PACKAGED_MODULES=true
24300 24295 elif test "x$enable_keep_packaged_modules" = "xno"; then
24301 24296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24302 24297 $as_echo_n "checking if packaged modules are kept... " >&6; }
24303 24298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24304 24299 $as_echo "no" >&6; }
24305 24300 JLINK_KEEP_PACKAGED_MODULES=false
24306 24301 elif test "x$enable_keep_packaged_modules" = "x"; then
24307 24302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24308 24303 $as_echo "yes (default)" >&6; }
24309 24304 JLINK_KEEP_PACKAGED_MODULES=true
24310 24305 else
24311 24306 as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24312 24307 fi
24313 24308
24314 24309
24315 24310
24316 24311
24317 24312 # Warn user that old version arguments are deprecated.
24318 24313
24319 24314
24320 24315 # Check whether --with-milestone was given.
24321 24316 if test "${with_milestone+set}" = set; then :
24322 24317 withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24323 24318 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24324 24319 fi
24325 24320
24326 24321
24327 24322
24328 24323
24329 24324 # Check whether --with-update-version was given.
24330 24325 if test "${with_update_version+set}" = set; then :
24331 24326 withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24332 24327 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24333 24328 fi
24334 24329
24335 24330
24336 24331
24337 24332
24338 24333 # Check whether --with-user-release-suffix was given.
24339 24334 if test "${with_user_release_suffix+set}" = set; then :
24340 24335 withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
24341 24336 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24342 24337 fi
24343 24338
24344 24339
24345 24340
24346 24341
24347 24342 # Check whether --with-build-number was given.
24348 24343 if test "${with_build_number+set}" = set; then :
24349 24344 withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24350 24345 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24351 24346 fi
24352 24347
24353 24348
24354 24349
24355 24350 # Source the version numbers file
24356 24351 . $AUTOCONF_DIR/version-numbers
24357 24352
24358 24353 # Some non-version number information is set in that file
24359 24354
24360 24355
24361 24356
24362 24357
24363 24358
24364 24359
24365 24360
24366 24361
24367 24362
24368 24363 # Override version from arguments
24369 24364
24370 24365 # If --with-version-string is set, process it first. It is possible to
24371 24366 # override parts with more specific flags, since these are processed later.
24372 24367
24373 24368 # Check whether --with-version-string was given.
24374 24369 if test "${with_version_string+set}" = set; then :
24375 24370 withval=$with_version_string;
24376 24371 fi
24377 24372
24378 24373 if test "x$with_version_string" = xyes; then
24379 24374 as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24380 24375 elif test "x$with_version_string" != x; then
24381 24376 # Additional [] needed to keep m4 from mangling shell constructs.
24382 24377 if [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24383 24378 VERSION_MAJOR=${BASH_REMATCH[1]}
24384 24379 VERSION_MINOR=${BASH_REMATCH[3]}
24385 24380 VERSION_SECURITY=${BASH_REMATCH[5]}
24386 24381 VERSION_PATCH=${BASH_REMATCH[7]}
24387 24382 VERSION_PRE=${BASH_REMATCH[9]}
24388 24383 version_plus_separator=${BASH_REMATCH[11]}
24389 24384 VERSION_BUILD=${BASH_REMATCH[12]}
24390 24385 VERSION_OPT=${BASH_REMATCH[14]}
24391 24386 # Unspecified numerical fields are interpreted as 0.
24392 24387 if test "x$VERSION_MINOR" = x; then
24393 24388 VERSION_MINOR=0
24394 24389 fi
24395 24390 if test "x$VERSION_SECURITY" = x; then
24396 24391 VERSION_SECURITY=0
24397 24392 fi
24398 24393 if test "x$VERSION_PATCH" = x; then
24399 24394 VERSION_PATCH=0
24400 24395 fi
24401 24396 if test "x$version_plus_separator" != x \
24402 24397 && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24403 24398 as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24404 24399 fi
24405 24400 # Stop the version part process from setting default values.
24406 24401 # We still allow them to explicitely override though.
24407 24402 NO_DEFAULT_VERSION_PARTS=true
24408 24403 else
24409 24404 as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24410 24405 fi
24411 24406 fi
24412 24407
24413 24408
24414 24409 # Check whether --with-version-pre was given.
24415 24410 if test "${with_version_pre+set}" = set; then :
24416 24411 withval=$with_version_pre; with_version_pre_present=true
24417 24412 else
24418 24413 with_version_pre_present=false
24419 24414 fi
24420 24415
24421 24416
24422 24417 if test "x$with_version_pre_present" = xtrue; then
24423 24418 if test "x$with_version_pre" = xyes; then
24424 24419 as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24425 24420 elif test "x$with_version_pre" = xno; then
24426 24421 # Interpret --without-* as empty string instead of the literal "no"
24427 24422 VERSION_PRE=
24428 24423 else
24429 24424 # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24430 24425 VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24431 24426 if test "x$VERSION_PRE" != "x$with_version_pre"; then
24432 24427 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24433 24428 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24434 24429 fi
24435 24430 fi
24436 24431 else
24437 24432 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24438 24433 # Default is to use "internal" as pre
24439 24434 VERSION_PRE="internal"
24440 24435 fi
24441 24436 fi
24442 24437
24443 24438
24444 24439 # Check whether --with-version-opt was given.
24445 24440 if test "${with_version_opt+set}" = set; then :
24446 24441 withval=$with_version_opt; with_version_opt_present=true
24447 24442 else
24448 24443 with_version_opt_present=false
24449 24444 fi
24450 24445
24451 24446
24452 24447 if test "x$with_version_opt_present" = xtrue; then
24453 24448 if test "x$with_version_opt" = xyes; then
24454 24449 as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24455 24450 elif test "x$with_version_opt" = xno; then
24456 24451 # Interpret --without-* as empty string instead of the literal "no"
24457 24452 VERSION_OPT=
24458 24453 else
24459 24454 # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24460 24455 VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24461 24456 if test "x$VERSION_OPT" != "x$with_version_opt"; then
24462 24457 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24463 24458 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24464 24459 fi
24465 24460 fi
24466 24461 else
24467 24462 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24468 24463 # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24469 24464 timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24470 24465 # Outer [ ] to quote m4.
24471 24466 basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24472 24467 VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24473 24468 fi
24474 24469 fi
24475 24470
24476 24471
24477 24472 # Check whether --with-version-build was given.
24478 24473 if test "${with_version_build+set}" = set; then :
24479 24474 withval=$with_version_build; with_version_build_present=true
24480 24475 else
24481 24476 with_version_build_present=false
24482 24477 fi
24483 24478
24484 24479
24485 24480 if test "x$with_version_build_present" = xtrue; then
24486 24481 if test "x$with_version_build" = xyes; then
24487 24482 as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24488 24483 elif test "x$with_version_build" = xno; then
24489 24484 # Interpret --without-* as empty string instead of the literal "no"
24490 24485 VERSION_BUILD=
24491 24486 elif test "x$with_version_build" = x; then
24492 24487 VERSION_BUILD=
24493 24488 else
24494 24489
24495 24490 # Additional [] needed to keep m4 from mangling shell constructs.
24496 24491 if ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
24497 24492 as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24498 24493 fi
24499 24494 # Extract the version number without leading zeros.
24500 24495 cleaned_value=${BASH_REMATCH[1]}
24501 24496 if test "x$cleaned_value" = x; then
24502 24497 # Special case for zero
24503 24498 cleaned_value=${BASH_REMATCH[2]}
24504 24499 fi
24505 24500
24506 24501 if test $cleaned_value -gt 255; then
24507 24502 as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24508 24503 fi
24509 24504 if test "x$cleaned_value" != "x$with_version_build"; then
24510 24505 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24511 24506 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24512 24507 fi
24513 24508 VERSION_BUILD=$cleaned_value
24514 24509
24515 24510 fi
24516 24511 else
24517 24512 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24518 24513 # Default is to not have a build number.
24519 24514 VERSION_BUILD=""
24520 24515 # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24521 24516 VERSION_BUILD=0
24522 24517 fi
24523 24518 fi
24524 24519
24525 24520
24526 24521 # Check whether --with-version-major was given.
24527 24522 if test "${with_version_major+set}" = set; then :
24528 24523 withval=$with_version_major; with_version_major_present=true
24529 24524 else
24530 24525 with_version_major_present=false
24531 24526 fi
24532 24527
24533 24528
24534 24529 if test "x$with_version_major_present" = xtrue; then
24535 24530 if test "x$with_version_major" = xyes; then
24536 24531 as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24537 24532 else
24538 24533
24539 24534 # Additional [] needed to keep m4 from mangling shell constructs.
24540 24535 if ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
24541 24536 as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24542 24537 fi
24543 24538 # Extract the version number without leading zeros.
24544 24539 cleaned_value=${BASH_REMATCH[1]}
24545 24540 if test "x$cleaned_value" = x; then
24546 24541 # Special case for zero
24547 24542 cleaned_value=${BASH_REMATCH[2]}
24548 24543 fi
24549 24544
24550 24545 if test $cleaned_value -gt 255; then
24551 24546 as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24552 24547 fi
24553 24548 if test "x$cleaned_value" != "x$with_version_major"; then
24554 24549 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24555 24550 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24556 24551 fi
24557 24552 VERSION_MAJOR=$cleaned_value
24558 24553
24559 24554 fi
24560 24555 else
24561 24556 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24562 24557 # Default is to get value from version-numbers
24563 24558 VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24564 24559 fi
24565 24560 fi
24566 24561
24567 24562
24568 24563 # Check whether --with-version-minor was given.
24569 24564 if test "${with_version_minor+set}" = set; then :
24570 24565 withval=$with_version_minor; with_version_minor_present=true
24571 24566 else
24572 24567 with_version_minor_present=false
24573 24568 fi
24574 24569
24575 24570
24576 24571 if test "x$with_version_minor_present" = xtrue; then
24577 24572 if test "x$with_version_minor" = xyes; then
24578 24573 as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24579 24574 elif test "x$with_version_minor" = xno; then
24580 24575 # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24581 24576 VERSION_MINOR=0
24582 24577 elif test "x$with_version_minor" = x; then
24583 24578 VERSION_MINOR=0
24584 24579 else
24585 24580
24586 24581 # Additional [] needed to keep m4 from mangling shell constructs.
24587 24582 if ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
24588 24583 as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24589 24584 fi
24590 24585 # Extract the version number without leading zeros.
24591 24586 cleaned_value=${BASH_REMATCH[1]}
24592 24587 if test "x$cleaned_value" = x; then
24593 24588 # Special case for zero
24594 24589 cleaned_value=${BASH_REMATCH[2]}
24595 24590 fi
24596 24591
24597 24592 if test $cleaned_value -gt 255; then
24598 24593 as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24599 24594 fi
24600 24595 if test "x$cleaned_value" != "x$with_version_minor"; then
24601 24596 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24602 24597 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24603 24598 fi
24604 24599 VERSION_MINOR=$cleaned_value
24605 24600
24606 24601 fi
24607 24602 else
24608 24603 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24609 24604 # Default is 0, if unspecified
24610 24605 VERSION_MINOR=0
24611 24606 fi
24612 24607 fi
24613 24608
24614 24609
24615 24610 # Check whether --with-version-security was given.
24616 24611 if test "${with_version_security+set}" = set; then :
24617 24612 withval=$with_version_security; with_version_security_present=true
24618 24613 else
24619 24614 with_version_security_present=false
24620 24615 fi
24621 24616
24622 24617
24623 24618 if test "x$with_version_security_present" = xtrue; then
24624 24619 if test "x$with_version_security" = xyes; then
24625 24620 as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24626 24621 elif test "x$with_version_security" = xno; then
24627 24622 # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24628 24623 VERSION_SECURITY=0
24629 24624 elif test "x$with_version_security" = x; then
24630 24625 VERSION_SECURITY=0
24631 24626 else
24632 24627
24633 24628 # Additional [] needed to keep m4 from mangling shell constructs.
24634 24629 if ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
24635 24630 as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24636 24631 fi
24637 24632 # Extract the version number without leading zeros.
24638 24633 cleaned_value=${BASH_REMATCH[1]}
24639 24634 if test "x$cleaned_value" = x; then
24640 24635 # Special case for zero
24641 24636 cleaned_value=${BASH_REMATCH[2]}
24642 24637 fi
24643 24638
24644 24639 if test $cleaned_value -gt 255; then
24645 24640 as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24646 24641 fi
24647 24642 if test "x$cleaned_value" != "x$with_version_security"; then
24648 24643 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24649 24644 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24650 24645 fi
24651 24646 VERSION_SECURITY=$cleaned_value
24652 24647
24653 24648 fi
24654 24649 else
24655 24650 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24656 24651 # Default is 0, if unspecified
24657 24652 VERSION_SECURITY=0
24658 24653 fi
24659 24654 fi
24660 24655
24661 24656
24662 24657 # Check whether --with-version-patch was given.
24663 24658 if test "${with_version_patch+set}" = set; then :
24664 24659 withval=$with_version_patch; with_version_patch_present=true
24665 24660 else
24666 24661 with_version_patch_present=false
24667 24662 fi
24668 24663
24669 24664
24670 24665 if test "x$with_version_patch_present" = xtrue; then
24671 24666 if test "x$with_version_patch" = xyes; then
24672 24667 as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24673 24668 elif test "x$with_version_patch" = xno; then
24674 24669 # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24675 24670 VERSION_PATCH=0
24676 24671 elif test "x$with_version_patch" = x; then
24677 24672 VERSION_PATCH=0
24678 24673 else
24679 24674
24680 24675 # Additional [] needed to keep m4 from mangling shell constructs.
24681 24676 if ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]] ; then
24682 24677 as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24683 24678 fi
24684 24679 # Extract the version number without leading zeros.
24685 24680 cleaned_value=${BASH_REMATCH[1]}
24686 24681 if test "x$cleaned_value" = x; then
24687 24682 # Special case for zero
24688 24683 cleaned_value=${BASH_REMATCH[2]}
24689 24684 fi
24690 24685
24691 24686 if test $cleaned_value -gt 255; then
24692 24687 as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24693 24688 fi
24694 24689 if test "x$cleaned_value" != "x$with_version_patch"; then
24695 24690 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24696 24691 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24697 24692 fi
24698 24693 VERSION_PATCH=$cleaned_value
24699 24694
24700 24695 fi
24701 24696 else
24702 24697 if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24703 24698 # Default is 0, if unspecified
24704 24699 VERSION_PATCH=0
24705 24700 fi
24706 24701 fi
24707 24702
24708 24703 # Calculate derived version properties
24709 24704
24710 24705 # Set VERSION_IS_GA based on if VERSION_PRE has a value
24711 24706 if test "x$VERSION_PRE" = x; then
24712 24707 VERSION_IS_GA=true
24713 24708 else
24714 24709 VERSION_IS_GA=false
24715 24710 fi
24716 24711
24717 24712 # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24718 24713 VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24719 24714
24720 24715 stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24721 24716 # Strip trailing zeroes from stripped_version_number
24722 24717 for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24723 24718 VERSION_NUMBER=$stripped_version_number
24724 24719
24725 24720 # The complete version string, with additional build information
24726 24721 if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24727 24722 VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24728 24723 else
24729 24724 # If either build or opt is set, we need a + separator
24730 24725 VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24731 24726 fi
24732 24727
24733 24728 # The short version string, just VERSION_NUMBER and PRE, if present.
24734 24729 VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24735 24730
24736 24731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24737 24732 $as_echo_n "checking for version string... " >&6; }
24738 24733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24739 24734 $as_echo "$VERSION_STRING" >&6; }
24740 24735
24741 24736
24742 24737
24743 24738
24744 24739
24745 24740
24746 24741
24747 24742
24748 24743
24749 24744
24750 24745
24751 24746
24752 24747
24753 24748
24754 24749
24755 24750 ###############################################################################
24756 24751 #
24757 24752 # Setup BootJDK, used to bootstrap the build.
24758 24753 #
24759 24754 ###############################################################################
24760 24755
24761 24756
24762 24757 BOOT_JDK_FOUND=no
24763 24758
24764 24759 # Check whether --with-boot-jdk was given.
24765 24760 if test "${with_boot_jdk+set}" = set; then :
24766 24761 withval=$with_boot_jdk;
24767 24762 fi
24768 24763
24769 24764
24770 24765 # We look for the Boot JDK through various means, going from more certain to
24771 24766 # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24772 24767 # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24773 24768 # must check if this is indeed valid; otherwise we'll continue looking.
24774 24769
24775 24770 # Test: Is bootjdk explicitely set by command line arguments?
24776 24771
24777 24772 if test "x$BOOT_JDK_FOUND" = xno; then
24778 24773 # Now execute the test
24779 24774
24780 24775 if test "x$with_boot_jdk" != x; then
24781 24776 BOOT_JDK=$with_boot_jdk
24782 24777 BOOT_JDK_FOUND=maybe
24783 24778 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24784 24779 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24785 24780 fi
24786 24781
24787 24782
24788 24783 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24789 24784 if test "x$BOOT_JDK_FOUND" = xmaybe; then
24790 24785 # Do we have a bin/java?
24791 24786 if test ! -x "$BOOT_JDK/bin/java"; then
24792 24787 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24793 24788 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24794 24789 BOOT_JDK_FOUND=no
24795 24790 else
24796 24791 # Do we have a bin/javac?
24797 24792 if test ! -x "$BOOT_JDK/bin/javac"; then
24798 24793 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24799 24794 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24800 24795 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24801 24796 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24802 24797 BOOT_JDK_FOUND=no
24803 24798 else
24804 24799 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24805 24800 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24806 24801
24807 24802 # Extra M4 quote needed to protect [] in grep expression.
24808 24803 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24809 24804 if test "x$FOUND_CORRECT_VERSION" = x; then
24810 24805 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24811 24806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24812 24807 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24813 24808 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24814 24809 BOOT_JDK_FOUND=no
24815 24810 else
24816 24811 # We're done! :-)
24817 24812 BOOT_JDK_FOUND=yes
24818 24813
24819 24814 # Only process if variable expands to non-empty
24820 24815
24821 24816 if test "x$BOOT_JDK" != x; then
24822 24817 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24823 24818
24824 24819 # Input might be given as Windows format, start by converting to
24825 24820 # unix format.
24826 24821 path="$BOOT_JDK"
24827 24822 new_path=`$CYGPATH -u "$path"`
24828 24823
24829 24824 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24830 24825 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24831 24826 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24832 24827 # "foo.exe" is OK but "foo" is an error.
24833 24828 #
24834 24829 # This test is therefore slightly more accurate than "test -f" to check for file precense.
24835 24830 # It is also a way to make sure we got the proper file name for the real test later on.
24836 24831 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24837 24832 if test "x$test_shortpath" = x; then
24838 24833 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24839 24834 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24840 24835 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24841 24836 fi
24842 24837
24843 24838 # Call helper function which possibly converts this using DOS-style short mode.
24844 24839 # If so, the updated path is stored in $new_path.
24845 24840
24846 24841 input_path="$new_path"
24847 24842 # Check if we need to convert this using DOS-style short mode. If the path
24848 24843 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24849 24844 # take no chances and rewrite it.
24850 24845 # Note: m4 eats our [], so we need to use [ and ] instead.
24851 24846 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24852 24847 if test "x$has_forbidden_chars" != x; then
24853 24848 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24854 24849 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24855 24850 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24856 24851 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24857 24852 # Going to short mode and back again did indeed matter. Since short mode is
24858 24853 # case insensitive, let's make it lowercase to improve readability.
24859 24854 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24860 24855 # Now convert it back to Unix-style (cygpath)
24861 24856 input_path=`$CYGPATH -u "$shortmode_path"`
24862 24857 new_path="$input_path"
24863 24858 fi
24864 24859 fi
24865 24860
24866 24861 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24867 24862 if test "x$test_cygdrive_prefix" = x; then
24868 24863 # As a simple fix, exclude /usr/bin since it's not a real path.
24869 24864 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24870 24865 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24871 24866 # a path prefixed by /cygdrive for fixpath to work.
24872 24867 new_path="$CYGWIN_ROOT_PATH$input_path"
24873 24868 fi
24874 24869 fi
24875 24870
24876 24871
24877 24872 if test "x$path" != "x$new_path"; then
24878 24873 BOOT_JDK="$new_path"
24879 24874 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24880 24875 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24881 24876 fi
24882 24877
24883 24878 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24884 24879
24885 24880 path="$BOOT_JDK"
24886 24881 has_colon=`$ECHO $path | $GREP ^.:`
24887 24882 new_path="$path"
24888 24883 if test "x$has_colon" = x; then
24889 24884 # Not in mixed or Windows style, start by that.
24890 24885 new_path=`cmd //c echo $path`
24891 24886 fi
24892 24887
24893 24888
24894 24889 input_path="$new_path"
24895 24890 # Check if we need to convert this using DOS-style short mode. If the path
24896 24891 # contains just simple characters, use it. Otherwise (spaces, weird characters),
24897 24892 # take no chances and rewrite it.
24898 24893 # Note: m4 eats our [], so we need to use [ and ] instead.
24899 24894 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24900 24895 if test "x$has_forbidden_chars" != x; then
24901 24896 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24902 24897 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24903 24898 fi
24904 24899
24905 24900
24906 24901 windows_path="$new_path"
24907 24902 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24908 24903 unix_path=`$CYGPATH -u "$windows_path"`
24909 24904 new_path="$unix_path"
24910 24905 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24911 24906 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24912 24907 new_path="$unix_path"
24913 24908 fi
24914 24909
24915 24910 if test "x$path" != "x$new_path"; then
24916 24911 BOOT_JDK="$new_path"
24917 24912 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24918 24913 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24919 24914 fi
24920 24915
24921 24916 # Save the first 10 bytes of this path to the storage, so fixpath can work.
24922 24917 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24923 24918
24924 24919 else
24925 24920 # We're on a unix platform. Hooray! :)
24926 24921 path="$BOOT_JDK"
24927 24922 has_space=`$ECHO "$path" | $GREP " "`
24928 24923 if test "x$has_space" != x; then
24929 24924 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24930 24925 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24931 24926 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24932 24927 fi
24933 24928
24934 24929 # Use eval to expand a potential ~
24935 24930 eval path="$path"
24936 24931 if test ! -f "$path" && test ! -d "$path"; then
24937 24932 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24938 24933 fi
24939 24934
24940 24935 if test -d "$path"; then
24941 24936 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24942 24937 else
24943 24938 dir="`$DIRNAME "$path"`"
24944 24939 base="`$BASENAME "$path"`"
24945 24940 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24946 24941 fi
24947 24942 fi
24948 24943 fi
24949 24944
24950 24945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24951 24946 $as_echo_n "checking for Boot JDK... " >&6; }
24952 24947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24953 24948 $as_echo "$BOOT_JDK" >&6; }
24954 24949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24955 24950 $as_echo_n "checking Boot JDK version... " >&6; }
24956 24951 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
24957 24952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24958 24953 $as_echo "$BOOT_JDK_VERSION" >&6; }
24959 24954 fi # end check jdk version
24960 24955 fi # end check javac
24961 24956 fi # end check java
24962 24957 fi # end check boot jdk found
24963 24958 fi
24964 24959
24965 24960 if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24966 24961 # Having specified an argument which is incorrect will produce an instant failure;
24967 24962 # we should not go on looking
24968 24963 as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24969 24964 fi
24970 24965
24971 24966 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24972 24967
24973 24968 if test "x$BOOT_JDK_FOUND" = xno; then
24974 24969 # Now execute the test
24975 24970
24976 24971 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24977 24972 # First check at user selected default
24978 24973
24979 24974 if test "x$BOOT_JDK_FOUND" = xno; then
24980 24975 # Now execute the test
24981 24976
24982 24977 if test -x /usr/libexec/java_home; then
24983 24978 BOOT_JDK=`/usr/libexec/java_home `
24984 24979 BOOT_JDK_FOUND=maybe
24985 24980 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24986 24981 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24987 24982 fi
24988 24983
24989 24984
24990 24985 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24991 24986 if test "x$BOOT_JDK_FOUND" = xmaybe; then
24992 24987 # Do we have a bin/java?
24993 24988 if test ! -x "$BOOT_JDK/bin/java"; then
24994 24989 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24995 24990 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24996 24991 BOOT_JDK_FOUND=no
24997 24992 else
24998 24993 # Do we have a bin/javac?
24999 24994 if test ! -x "$BOOT_JDK/bin/javac"; then
25000 24995 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25001 24996 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25002 24997 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25003 24998 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25004 24999 BOOT_JDK_FOUND=no
25005 25000 else
25006 25001 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25007 25002 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25008 25003
25009 25004 # Extra M4 quote needed to protect [] in grep expression.
25010 25005 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25011 25006 if test "x$FOUND_CORRECT_VERSION" = x; then
25012 25007 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25013 25008 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25014 25009 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25015 25010 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25016 25011 BOOT_JDK_FOUND=no
25017 25012 else
25018 25013 # We're done! :-)
25019 25014 BOOT_JDK_FOUND=yes
25020 25015
25021 25016 # Only process if variable expands to non-empty
25022 25017
25023 25018 if test "x$BOOT_JDK" != x; then
25024 25019 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25025 25020
25026 25021 # Input might be given as Windows format, start by converting to
25027 25022 # unix format.
25028 25023 path="$BOOT_JDK"
25029 25024 new_path=`$CYGPATH -u "$path"`
25030 25025
25031 25026 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25032 25027 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25033 25028 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25034 25029 # "foo.exe" is OK but "foo" is an error.
25035 25030 #
25036 25031 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25037 25032 # It is also a way to make sure we got the proper file name for the real test later on.
25038 25033 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25039 25034 if test "x$test_shortpath" = x; then
25040 25035 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25041 25036 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25042 25037 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25043 25038 fi
25044 25039
25045 25040 # Call helper function which possibly converts this using DOS-style short mode.
25046 25041 # If so, the updated path is stored in $new_path.
25047 25042
25048 25043 input_path="$new_path"
25049 25044 # Check if we need to convert this using DOS-style short mode. If the path
25050 25045 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25051 25046 # take no chances and rewrite it.
25052 25047 # Note: m4 eats our [], so we need to use [ and ] instead.
25053 25048 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25054 25049 if test "x$has_forbidden_chars" != x; then
25055 25050 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25056 25051 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25057 25052 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25058 25053 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25059 25054 # Going to short mode and back again did indeed matter. Since short mode is
25060 25055 # case insensitive, let's make it lowercase to improve readability.
25061 25056 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25062 25057 # Now convert it back to Unix-style (cygpath)
25063 25058 input_path=`$CYGPATH -u "$shortmode_path"`
25064 25059 new_path="$input_path"
25065 25060 fi
25066 25061 fi
25067 25062
25068 25063 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25069 25064 if test "x$test_cygdrive_prefix" = x; then
25070 25065 # As a simple fix, exclude /usr/bin since it's not a real path.
25071 25066 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25072 25067 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25073 25068 # a path prefixed by /cygdrive for fixpath to work.
25074 25069 new_path="$CYGWIN_ROOT_PATH$input_path"
25075 25070 fi
25076 25071 fi
25077 25072
25078 25073
25079 25074 if test "x$path" != "x$new_path"; then
25080 25075 BOOT_JDK="$new_path"
25081 25076 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25082 25077 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25083 25078 fi
25084 25079
25085 25080 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25086 25081
25087 25082 path="$BOOT_JDK"
25088 25083 has_colon=`$ECHO $path | $GREP ^.:`
25089 25084 new_path="$path"
25090 25085 if test "x$has_colon" = x; then
25091 25086 # Not in mixed or Windows style, start by that.
25092 25087 new_path=`cmd //c echo $path`
25093 25088 fi
25094 25089
25095 25090
25096 25091 input_path="$new_path"
25097 25092 # Check if we need to convert this using DOS-style short mode. If the path
25098 25093 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25099 25094 # take no chances and rewrite it.
25100 25095 # Note: m4 eats our [], so we need to use [ and ] instead.
25101 25096 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25102 25097 if test "x$has_forbidden_chars" != x; then
25103 25098 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25104 25099 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25105 25100 fi
25106 25101
25107 25102
25108 25103 windows_path="$new_path"
25109 25104 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25110 25105 unix_path=`$CYGPATH -u "$windows_path"`
25111 25106 new_path="$unix_path"
25112 25107 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25113 25108 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25114 25109 new_path="$unix_path"
25115 25110 fi
25116 25111
25117 25112 if test "x$path" != "x$new_path"; then
25118 25113 BOOT_JDK="$new_path"
25119 25114 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25120 25115 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25121 25116 fi
25122 25117
25123 25118 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25124 25119 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25125 25120
25126 25121 else
25127 25122 # We're on a unix platform. Hooray! :)
25128 25123 path="$BOOT_JDK"
25129 25124 has_space=`$ECHO "$path" | $GREP " "`
25130 25125 if test "x$has_space" != x; then
25131 25126 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25132 25127 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25133 25128 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25134 25129 fi
25135 25130
25136 25131 # Use eval to expand a potential ~
25137 25132 eval path="$path"
25138 25133 if test ! -f "$path" && test ! -d "$path"; then
25139 25134 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25140 25135 fi
25141 25136
25142 25137 if test -d "$path"; then
25143 25138 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25144 25139 else
25145 25140 dir="`$DIRNAME "$path"`"
25146 25141 base="`$BASENAME "$path"`"
25147 25142 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25148 25143 fi
25149 25144 fi
25150 25145 fi
25151 25146
25152 25147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25153 25148 $as_echo_n "checking for Boot JDK... " >&6; }
25154 25149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25155 25150 $as_echo "$BOOT_JDK" >&6; }
25156 25151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25157 25152 $as_echo_n "checking Boot JDK version... " >&6; }
25158 25153 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25159 25154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25160 25155 $as_echo "$BOOT_JDK_VERSION" >&6; }
25161 25156 fi # end check jdk version
25162 25157 fi # end check javac
25163 25158 fi # end check java
25164 25159 fi # end check boot jdk found
25165 25160 fi
25166 25161
25167 25162 # If that did not work out (e.g. too old), try explicit versions instead
25168 25163
25169 25164 if test "x$BOOT_JDK_FOUND" = xno; then
25170 25165 # Now execute the test
25171 25166
25172 25167 if test -x /usr/libexec/java_home; then
25173 25168 BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25174 25169 BOOT_JDK_FOUND=maybe
25175 25170 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25176 25171 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25177 25172 fi
25178 25173
25179 25174
25180 25175 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25181 25176 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25182 25177 # Do we have a bin/java?
25183 25178 if test ! -x "$BOOT_JDK/bin/java"; then
25184 25179 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25185 25180 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25186 25181 BOOT_JDK_FOUND=no
25187 25182 else
25188 25183 # Do we have a bin/javac?
25189 25184 if test ! -x "$BOOT_JDK/bin/javac"; then
25190 25185 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25191 25186 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25192 25187 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25193 25188 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25194 25189 BOOT_JDK_FOUND=no
25195 25190 else
25196 25191 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25197 25192 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25198 25193
25199 25194 # Extra M4 quote needed to protect [] in grep expression.
25200 25195 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25201 25196 if test "x$FOUND_CORRECT_VERSION" = x; then
25202 25197 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25203 25198 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25204 25199 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25205 25200 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25206 25201 BOOT_JDK_FOUND=no
25207 25202 else
25208 25203 # We're done! :-)
25209 25204 BOOT_JDK_FOUND=yes
25210 25205
25211 25206 # Only process if variable expands to non-empty
25212 25207
25213 25208 if test "x$BOOT_JDK" != x; then
25214 25209 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25215 25210
25216 25211 # Input might be given as Windows format, start by converting to
25217 25212 # unix format.
25218 25213 path="$BOOT_JDK"
25219 25214 new_path=`$CYGPATH -u "$path"`
25220 25215
25221 25216 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25222 25217 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25223 25218 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25224 25219 # "foo.exe" is OK but "foo" is an error.
25225 25220 #
25226 25221 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25227 25222 # It is also a way to make sure we got the proper file name for the real test later on.
25228 25223 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25229 25224 if test "x$test_shortpath" = x; then
25230 25225 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25231 25226 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25232 25227 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25233 25228 fi
25234 25229
25235 25230 # Call helper function which possibly converts this using DOS-style short mode.
25236 25231 # If so, the updated path is stored in $new_path.
25237 25232
25238 25233 input_path="$new_path"
25239 25234 # Check if we need to convert this using DOS-style short mode. If the path
25240 25235 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25241 25236 # take no chances and rewrite it.
25242 25237 # Note: m4 eats our [], so we need to use [ and ] instead.
25243 25238 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25244 25239 if test "x$has_forbidden_chars" != x; then
25245 25240 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25246 25241 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25247 25242 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25248 25243 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25249 25244 # Going to short mode and back again did indeed matter. Since short mode is
25250 25245 # case insensitive, let's make it lowercase to improve readability.
25251 25246 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25252 25247 # Now convert it back to Unix-style (cygpath)
25253 25248 input_path=`$CYGPATH -u "$shortmode_path"`
25254 25249 new_path="$input_path"
25255 25250 fi
25256 25251 fi
25257 25252
25258 25253 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25259 25254 if test "x$test_cygdrive_prefix" = x; then
25260 25255 # As a simple fix, exclude /usr/bin since it's not a real path.
25261 25256 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25262 25257 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25263 25258 # a path prefixed by /cygdrive for fixpath to work.
25264 25259 new_path="$CYGWIN_ROOT_PATH$input_path"
25265 25260 fi
25266 25261 fi
25267 25262
25268 25263
25269 25264 if test "x$path" != "x$new_path"; then
25270 25265 BOOT_JDK="$new_path"
25271 25266 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25272 25267 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25273 25268 fi
25274 25269
25275 25270 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25276 25271
25277 25272 path="$BOOT_JDK"
25278 25273 has_colon=`$ECHO $path | $GREP ^.:`
25279 25274 new_path="$path"
25280 25275 if test "x$has_colon" = x; then
25281 25276 # Not in mixed or Windows style, start by that.
25282 25277 new_path=`cmd //c echo $path`
25283 25278 fi
25284 25279
25285 25280
25286 25281 input_path="$new_path"
25287 25282 # Check if we need to convert this using DOS-style short mode. If the path
25288 25283 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25289 25284 # take no chances and rewrite it.
25290 25285 # Note: m4 eats our [], so we need to use [ and ] instead.
25291 25286 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25292 25287 if test "x$has_forbidden_chars" != x; then
25293 25288 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25294 25289 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25295 25290 fi
25296 25291
25297 25292
25298 25293 windows_path="$new_path"
25299 25294 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25300 25295 unix_path=`$CYGPATH -u "$windows_path"`
25301 25296 new_path="$unix_path"
25302 25297 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25303 25298 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25304 25299 new_path="$unix_path"
25305 25300 fi
25306 25301
25307 25302 if test "x$path" != "x$new_path"; then
25308 25303 BOOT_JDK="$new_path"
25309 25304 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25310 25305 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25311 25306 fi
25312 25307
25313 25308 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25314 25309 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25315 25310
25316 25311 else
25317 25312 # We're on a unix platform. Hooray! :)
25318 25313 path="$BOOT_JDK"
25319 25314 has_space=`$ECHO "$path" | $GREP " "`
25320 25315 if test "x$has_space" != x; then
25321 25316 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25322 25317 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25323 25318 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25324 25319 fi
25325 25320
25326 25321 # Use eval to expand a potential ~
25327 25322 eval path="$path"
25328 25323 if test ! -f "$path" && test ! -d "$path"; then
25329 25324 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25330 25325 fi
25331 25326
25332 25327 if test -d "$path"; then
25333 25328 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25334 25329 else
25335 25330 dir="`$DIRNAME "$path"`"
25336 25331 base="`$BASENAME "$path"`"
25337 25332 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25338 25333 fi
25339 25334 fi
25340 25335 fi
25341 25336
25342 25337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25343 25338 $as_echo_n "checking for Boot JDK... " >&6; }
25344 25339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25345 25340 $as_echo "$BOOT_JDK" >&6; }
25346 25341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25347 25342 $as_echo_n "checking Boot JDK version... " >&6; }
25348 25343 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25349 25344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25350 25345 $as_echo "$BOOT_JDK_VERSION" >&6; }
25351 25346 fi # end check jdk version
25352 25347 fi # end check javac
25353 25348 fi # end check java
25354 25349 fi # end check boot jdk found
25355 25350 fi
25356 25351
25357 25352
25358 25353 if test "x$BOOT_JDK_FOUND" = xno; then
25359 25354 # Now execute the test
25360 25355
25361 25356 if test -x /usr/libexec/java_home; then
25362 25357 BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25363 25358 BOOT_JDK_FOUND=maybe
25364 25359 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25365 25360 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25366 25361 fi
25367 25362
25368 25363
25369 25364 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25370 25365 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25371 25366 # Do we have a bin/java?
25372 25367 if test ! -x "$BOOT_JDK/bin/java"; then
25373 25368 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25374 25369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25375 25370 BOOT_JDK_FOUND=no
25376 25371 else
25377 25372 # Do we have a bin/javac?
25378 25373 if test ! -x "$BOOT_JDK/bin/javac"; then
25379 25374 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25380 25375 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25381 25376 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25382 25377 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25383 25378 BOOT_JDK_FOUND=no
25384 25379 else
25385 25380 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25386 25381 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25387 25382
25388 25383 # Extra M4 quote needed to protect [] in grep expression.
25389 25384 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25390 25385 if test "x$FOUND_CORRECT_VERSION" = x; then
25391 25386 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25392 25387 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25393 25388 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25394 25389 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25395 25390 BOOT_JDK_FOUND=no
25396 25391 else
25397 25392 # We're done! :-)
25398 25393 BOOT_JDK_FOUND=yes
25399 25394
25400 25395 # Only process if variable expands to non-empty
25401 25396
25402 25397 if test "x$BOOT_JDK" != x; then
25403 25398 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25404 25399
25405 25400 # Input might be given as Windows format, start by converting to
25406 25401 # unix format.
25407 25402 path="$BOOT_JDK"
25408 25403 new_path=`$CYGPATH -u "$path"`
25409 25404
25410 25405 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25411 25406 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25412 25407 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25413 25408 # "foo.exe" is OK but "foo" is an error.
25414 25409 #
25415 25410 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25416 25411 # It is also a way to make sure we got the proper file name for the real test later on.
25417 25412 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25418 25413 if test "x$test_shortpath" = x; then
25419 25414 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25420 25415 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25421 25416 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25422 25417 fi
25423 25418
25424 25419 # Call helper function which possibly converts this using DOS-style short mode.
25425 25420 # If so, the updated path is stored in $new_path.
25426 25421
25427 25422 input_path="$new_path"
25428 25423 # Check if we need to convert this using DOS-style short mode. If the path
25429 25424 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25430 25425 # take no chances and rewrite it.
25431 25426 # Note: m4 eats our [], so we need to use [ and ] instead.
25432 25427 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25433 25428 if test "x$has_forbidden_chars" != x; then
25434 25429 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25435 25430 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25436 25431 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25437 25432 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25438 25433 # Going to short mode and back again did indeed matter. Since short mode is
25439 25434 # case insensitive, let's make it lowercase to improve readability.
25440 25435 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25441 25436 # Now convert it back to Unix-style (cygpath)
25442 25437 input_path=`$CYGPATH -u "$shortmode_path"`
25443 25438 new_path="$input_path"
25444 25439 fi
25445 25440 fi
25446 25441
25447 25442 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25448 25443 if test "x$test_cygdrive_prefix" = x; then
25449 25444 # As a simple fix, exclude /usr/bin since it's not a real path.
25450 25445 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25451 25446 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25452 25447 # a path prefixed by /cygdrive for fixpath to work.
25453 25448 new_path="$CYGWIN_ROOT_PATH$input_path"
25454 25449 fi
25455 25450 fi
25456 25451
25457 25452
25458 25453 if test "x$path" != "x$new_path"; then
25459 25454 BOOT_JDK="$new_path"
25460 25455 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25461 25456 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25462 25457 fi
25463 25458
25464 25459 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25465 25460
25466 25461 path="$BOOT_JDK"
25467 25462 has_colon=`$ECHO $path | $GREP ^.:`
25468 25463 new_path="$path"
25469 25464 if test "x$has_colon" = x; then
25470 25465 # Not in mixed or Windows style, start by that.
25471 25466 new_path=`cmd //c echo $path`
25472 25467 fi
25473 25468
25474 25469
25475 25470 input_path="$new_path"
25476 25471 # Check if we need to convert this using DOS-style short mode. If the path
25477 25472 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25478 25473 # take no chances and rewrite it.
25479 25474 # Note: m4 eats our [], so we need to use [ and ] instead.
25480 25475 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25481 25476 if test "x$has_forbidden_chars" != x; then
25482 25477 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25483 25478 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25484 25479 fi
25485 25480
25486 25481
25487 25482 windows_path="$new_path"
25488 25483 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25489 25484 unix_path=`$CYGPATH -u "$windows_path"`
25490 25485 new_path="$unix_path"
25491 25486 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25492 25487 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25493 25488 new_path="$unix_path"
25494 25489 fi
25495 25490
25496 25491 if test "x$path" != "x$new_path"; then
25497 25492 BOOT_JDK="$new_path"
25498 25493 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25499 25494 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25500 25495 fi
25501 25496
25502 25497 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25503 25498 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25504 25499
25505 25500 else
25506 25501 # We're on a unix platform. Hooray! :)
25507 25502 path="$BOOT_JDK"
25508 25503 has_space=`$ECHO "$path" | $GREP " "`
25509 25504 if test "x$has_space" != x; then
25510 25505 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25511 25506 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25512 25507 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25513 25508 fi
25514 25509
25515 25510 # Use eval to expand a potential ~
25516 25511 eval path="$path"
25517 25512 if test ! -f "$path" && test ! -d "$path"; then
25518 25513 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25519 25514 fi
25520 25515
25521 25516 if test -d "$path"; then
25522 25517 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25523 25518 else
25524 25519 dir="`$DIRNAME "$path"`"
25525 25520 base="`$BASENAME "$path"`"
25526 25521 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25527 25522 fi
25528 25523 fi
25529 25524 fi
25530 25525
25531 25526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25532 25527 $as_echo_n "checking for Boot JDK... " >&6; }
25533 25528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25534 25529 $as_echo "$BOOT_JDK" >&6; }
25535 25530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25536 25531 $as_echo_n "checking Boot JDK version... " >&6; }
25537 25532 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25538 25533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25539 25534 $as_echo "$BOOT_JDK_VERSION" >&6; }
25540 25535 fi # end check jdk version
25541 25536 fi # end check javac
25542 25537 fi # end check java
25543 25538 fi # end check boot jdk found
25544 25539 fi
25545 25540
25546 25541
25547 25542 if test "x$BOOT_JDK_FOUND" = xno; then
25548 25543 # Now execute the test
25549 25544
25550 25545 if test -x /usr/libexec/java_home; then
25551 25546 BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25552 25547 BOOT_JDK_FOUND=maybe
25553 25548 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25554 25549 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25555 25550 fi
25556 25551
25557 25552
25558 25553 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25559 25554 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25560 25555 # Do we have a bin/java?
25561 25556 if test ! -x "$BOOT_JDK/bin/java"; then
25562 25557 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25563 25558 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25564 25559 BOOT_JDK_FOUND=no
25565 25560 else
25566 25561 # Do we have a bin/javac?
25567 25562 if test ! -x "$BOOT_JDK/bin/javac"; then
25568 25563 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25569 25564 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25570 25565 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25571 25566 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25572 25567 BOOT_JDK_FOUND=no
25573 25568 else
25574 25569 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25575 25570 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25576 25571
25577 25572 # Extra M4 quote needed to protect [] in grep expression.
25578 25573 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25579 25574 if test "x$FOUND_CORRECT_VERSION" = x; then
25580 25575 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25581 25576 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25582 25577 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25583 25578 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25584 25579 BOOT_JDK_FOUND=no
25585 25580 else
25586 25581 # We're done! :-)
25587 25582 BOOT_JDK_FOUND=yes
25588 25583
25589 25584 # Only process if variable expands to non-empty
25590 25585
25591 25586 if test "x$BOOT_JDK" != x; then
25592 25587 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25593 25588
25594 25589 # Input might be given as Windows format, start by converting to
25595 25590 # unix format.
25596 25591 path="$BOOT_JDK"
25597 25592 new_path=`$CYGPATH -u "$path"`
25598 25593
25599 25594 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25600 25595 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25601 25596 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25602 25597 # "foo.exe" is OK but "foo" is an error.
25603 25598 #
25604 25599 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25605 25600 # It is also a way to make sure we got the proper file name for the real test later on.
25606 25601 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25607 25602 if test "x$test_shortpath" = x; then
25608 25603 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25609 25604 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25610 25605 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25611 25606 fi
25612 25607
25613 25608 # Call helper function which possibly converts this using DOS-style short mode.
25614 25609 # If so, the updated path is stored in $new_path.
25615 25610
25616 25611 input_path="$new_path"
25617 25612 # Check if we need to convert this using DOS-style short mode. If the path
25618 25613 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25619 25614 # take no chances and rewrite it.
25620 25615 # Note: m4 eats our [], so we need to use [ and ] instead.
25621 25616 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25622 25617 if test "x$has_forbidden_chars" != x; then
25623 25618 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25624 25619 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25625 25620 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25626 25621 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25627 25622 # Going to short mode and back again did indeed matter. Since short mode is
25628 25623 # case insensitive, let's make it lowercase to improve readability.
25629 25624 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25630 25625 # Now convert it back to Unix-style (cygpath)
25631 25626 input_path=`$CYGPATH -u "$shortmode_path"`
25632 25627 new_path="$input_path"
25633 25628 fi
25634 25629 fi
25635 25630
25636 25631 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25637 25632 if test "x$test_cygdrive_prefix" = x; then
25638 25633 # As a simple fix, exclude /usr/bin since it's not a real path.
25639 25634 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25640 25635 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25641 25636 # a path prefixed by /cygdrive for fixpath to work.
25642 25637 new_path="$CYGWIN_ROOT_PATH$input_path"
25643 25638 fi
25644 25639 fi
25645 25640
25646 25641
25647 25642 if test "x$path" != "x$new_path"; then
25648 25643 BOOT_JDK="$new_path"
25649 25644 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25650 25645 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25651 25646 fi
25652 25647
25653 25648 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25654 25649
25655 25650 path="$BOOT_JDK"
25656 25651 has_colon=`$ECHO $path | $GREP ^.:`
25657 25652 new_path="$path"
25658 25653 if test "x$has_colon" = x; then
25659 25654 # Not in mixed or Windows style, start by that.
25660 25655 new_path=`cmd //c echo $path`
25661 25656 fi
25662 25657
25663 25658
25664 25659 input_path="$new_path"
25665 25660 # Check if we need to convert this using DOS-style short mode. If the path
25666 25661 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25667 25662 # take no chances and rewrite it.
25668 25663 # Note: m4 eats our [], so we need to use [ and ] instead.
25669 25664 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25670 25665 if test "x$has_forbidden_chars" != x; then
25671 25666 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25672 25667 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25673 25668 fi
25674 25669
25675 25670
25676 25671 windows_path="$new_path"
25677 25672 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25678 25673 unix_path=`$CYGPATH -u "$windows_path"`
25679 25674 new_path="$unix_path"
25680 25675 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25681 25676 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25682 25677 new_path="$unix_path"
25683 25678 fi
25684 25679
25685 25680 if test "x$path" != "x$new_path"; then
25686 25681 BOOT_JDK="$new_path"
25687 25682 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25688 25683 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25689 25684 fi
25690 25685
25691 25686 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25692 25687 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25693 25688
25694 25689 else
25695 25690 # We're on a unix platform. Hooray! :)
25696 25691 path="$BOOT_JDK"
25697 25692 has_space=`$ECHO "$path" | $GREP " "`
25698 25693 if test "x$has_space" != x; then
25699 25694 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25700 25695 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25701 25696 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25702 25697 fi
25703 25698
25704 25699 # Use eval to expand a potential ~
25705 25700 eval path="$path"
25706 25701 if test ! -f "$path" && test ! -d "$path"; then
25707 25702 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25708 25703 fi
25709 25704
25710 25705 if test -d "$path"; then
25711 25706 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25712 25707 else
25713 25708 dir="`$DIRNAME "$path"`"
25714 25709 base="`$BASENAME "$path"`"
25715 25710 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25716 25711 fi
25717 25712 fi
25718 25713 fi
25719 25714
25720 25715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25721 25716 $as_echo_n "checking for Boot JDK... " >&6; }
25722 25717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25723 25718 $as_echo "$BOOT_JDK" >&6; }
25724 25719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25725 25720 $as_echo_n "checking Boot JDK version... " >&6; }
25726 25721 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25727 25722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25728 25723 $as_echo "$BOOT_JDK_VERSION" >&6; }
25729 25724 fi # end check jdk version
25730 25725 fi # end check javac
25731 25726 fi # end check java
25732 25727 fi # end check boot jdk found
25733 25728 fi
25734 25729
25735 25730 fi
25736 25731
25737 25732
25738 25733 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25739 25734 if test "x$BOOT_JDK_FOUND" = xmaybe; then
25740 25735 # Do we have a bin/java?
25741 25736 if test ! -x "$BOOT_JDK/bin/java"; then
25742 25737 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25743 25738 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25744 25739 BOOT_JDK_FOUND=no
25745 25740 else
25746 25741 # Do we have a bin/javac?
25747 25742 if test ! -x "$BOOT_JDK/bin/javac"; then
25748 25743 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25749 25744 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25750 25745 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25751 25746 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25752 25747 BOOT_JDK_FOUND=no
25753 25748 else
25754 25749 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25755 25750 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25756 25751
25757 25752 # Extra M4 quote needed to protect [] in grep expression.
25758 25753 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25759 25754 if test "x$FOUND_CORRECT_VERSION" = x; then
25760 25755 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25761 25756 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25762 25757 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25763 25758 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25764 25759 BOOT_JDK_FOUND=no
25765 25760 else
25766 25761 # We're done! :-)
25767 25762 BOOT_JDK_FOUND=yes
25768 25763
25769 25764 # Only process if variable expands to non-empty
25770 25765
25771 25766 if test "x$BOOT_JDK" != x; then
25772 25767 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25773 25768
25774 25769 # Input might be given as Windows format, start by converting to
25775 25770 # unix format.
25776 25771 path="$BOOT_JDK"
25777 25772 new_path=`$CYGPATH -u "$path"`
25778 25773
25779 25774 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25780 25775 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25781 25776 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25782 25777 # "foo.exe" is OK but "foo" is an error.
25783 25778 #
25784 25779 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25785 25780 # It is also a way to make sure we got the proper file name for the real test later on.
25786 25781 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25787 25782 if test "x$test_shortpath" = x; then
25788 25783 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25789 25784 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25790 25785 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25791 25786 fi
25792 25787
25793 25788 # Call helper function which possibly converts this using DOS-style short mode.
25794 25789 # If so, the updated path is stored in $new_path.
25795 25790
25796 25791 input_path="$new_path"
25797 25792 # Check if we need to convert this using DOS-style short mode. If the path
25798 25793 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25799 25794 # take no chances and rewrite it.
25800 25795 # Note: m4 eats our [], so we need to use [ and ] instead.
25801 25796 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25802 25797 if test "x$has_forbidden_chars" != x; then
25803 25798 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25804 25799 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25805 25800 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25806 25801 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25807 25802 # Going to short mode and back again did indeed matter. Since short mode is
25808 25803 # case insensitive, let's make it lowercase to improve readability.
25809 25804 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25810 25805 # Now convert it back to Unix-style (cygpath)
25811 25806 input_path=`$CYGPATH -u "$shortmode_path"`
25812 25807 new_path="$input_path"
25813 25808 fi
25814 25809 fi
25815 25810
25816 25811 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25817 25812 if test "x$test_cygdrive_prefix" = x; then
25818 25813 # As a simple fix, exclude /usr/bin since it's not a real path.
25819 25814 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25820 25815 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25821 25816 # a path prefixed by /cygdrive for fixpath to work.
25822 25817 new_path="$CYGWIN_ROOT_PATH$input_path"
25823 25818 fi
25824 25819 fi
25825 25820
25826 25821
25827 25822 if test "x$path" != "x$new_path"; then
25828 25823 BOOT_JDK="$new_path"
25829 25824 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25830 25825 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25831 25826 fi
25832 25827
25833 25828 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25834 25829
25835 25830 path="$BOOT_JDK"
25836 25831 has_colon=`$ECHO $path | $GREP ^.:`
25837 25832 new_path="$path"
25838 25833 if test "x$has_colon" = x; then
25839 25834 # Not in mixed or Windows style, start by that.
25840 25835 new_path=`cmd //c echo $path`
25841 25836 fi
25842 25837
25843 25838
25844 25839 input_path="$new_path"
25845 25840 # Check if we need to convert this using DOS-style short mode. If the path
25846 25841 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25847 25842 # take no chances and rewrite it.
25848 25843 # Note: m4 eats our [], so we need to use [ and ] instead.
25849 25844 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25850 25845 if test "x$has_forbidden_chars" != x; then
25851 25846 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25852 25847 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25853 25848 fi
25854 25849
25855 25850
25856 25851 windows_path="$new_path"
25857 25852 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25858 25853 unix_path=`$CYGPATH -u "$windows_path"`
25859 25854 new_path="$unix_path"
25860 25855 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25861 25856 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25862 25857 new_path="$unix_path"
25863 25858 fi
25864 25859
25865 25860 if test "x$path" != "x$new_path"; then
25866 25861 BOOT_JDK="$new_path"
25867 25862 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25868 25863 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25869 25864 fi
25870 25865
25871 25866 # Save the first 10 bytes of this path to the storage, so fixpath can work.
25872 25867 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25873 25868
25874 25869 else
25875 25870 # We're on a unix platform. Hooray! :)
25876 25871 path="$BOOT_JDK"
25877 25872 has_space=`$ECHO "$path" | $GREP " "`
25878 25873 if test "x$has_space" != x; then
25879 25874 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25880 25875 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25881 25876 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25882 25877 fi
25883 25878
25884 25879 # Use eval to expand a potential ~
25885 25880 eval path="$path"
25886 25881 if test ! -f "$path" && test ! -d "$path"; then
25887 25882 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25888 25883 fi
25889 25884
25890 25885 if test -d "$path"; then
25891 25886 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25892 25887 else
25893 25888 dir="`$DIRNAME "$path"`"
25894 25889 base="`$BASENAME "$path"`"
25895 25890 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25896 25891 fi
25897 25892 fi
25898 25893 fi
25899 25894
25900 25895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25901 25896 $as_echo_n "checking for Boot JDK... " >&6; }
25902 25897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25903 25898 $as_echo "$BOOT_JDK" >&6; }
25904 25899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25905 25900 $as_echo_n "checking Boot JDK version... " >&6; }
25906 25901 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
25907 25902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25908 25903 $as_echo "$BOOT_JDK_VERSION" >&6; }
25909 25904 fi # end check jdk version
25910 25905 fi # end check javac
25911 25906 fi # end check java
25912 25907 fi # end check boot jdk found
25913 25908 fi
25914 25909
25915 25910
25916 25911 # Test: Is $JAVA_HOME set?
25917 25912
25918 25913 if test "x$BOOT_JDK_FOUND" = xno; then
25919 25914 # Now execute the test
25920 25915
25921 25916 if test "x$JAVA_HOME" != x; then
25922 25917 JAVA_HOME_PROCESSED="$JAVA_HOME"
25923 25918
25924 25919 # Only process if variable expands to non-empty
25925 25920
25926 25921 if test "x$JAVA_HOME_PROCESSED" != x; then
25927 25922 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25928 25923
25929 25924 # Input might be given as Windows format, start by converting to
25930 25925 # unix format.
25931 25926 path="$JAVA_HOME_PROCESSED"
25932 25927 new_path=`$CYGPATH -u "$path"`
25933 25928
25934 25929 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25935 25930 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25936 25931 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25937 25932 # "foo.exe" is OK but "foo" is an error.
25938 25933 #
25939 25934 # This test is therefore slightly more accurate than "test -f" to check for file precense.
25940 25935 # It is also a way to make sure we got the proper file name for the real test later on.
25941 25936 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25942 25937 if test "x$test_shortpath" = x; then
25943 25938 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25944 25939 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25945 25940 as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25946 25941 fi
25947 25942
25948 25943 # Call helper function which possibly converts this using DOS-style short mode.
25949 25944 # If so, the updated path is stored in $new_path.
25950 25945
25951 25946 input_path="$new_path"
25952 25947 # Check if we need to convert this using DOS-style short mode. If the path
25953 25948 # contains just simple characters, use it. Otherwise (spaces, weird characters),
25954 25949 # take no chances and rewrite it.
25955 25950 # Note: m4 eats our [], so we need to use [ and ] instead.
25956 25951 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25957 25952 if test "x$has_forbidden_chars" != x; then
25958 25953 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25959 25954 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25960 25955 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25961 25956 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25962 25957 # Going to short mode and back again did indeed matter. Since short mode is
25963 25958 # case insensitive, let's make it lowercase to improve readability.
25964 25959 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25965 25960 # Now convert it back to Unix-style (cygpath)
25966 25961 input_path=`$CYGPATH -u "$shortmode_path"`
25967 25962 new_path="$input_path"
25968 25963 fi
25969 25964 fi
25970 25965
25971 25966 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25972 25967 if test "x$test_cygdrive_prefix" = x; then
25973 25968 # As a simple fix, exclude /usr/bin since it's not a real path.
25974 25969 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25975 25970 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25976 25971 # a path prefixed by /cygdrive for fixpath to work.
25977 25972 new_path="$CYGWIN_ROOT_PATH$input_path"
25978 25973 fi
25979 25974 fi
25980 25975
25981 25976
25982 25977 if test "x$path" != "x$new_path"; then
25983 25978 JAVA_HOME_PROCESSED="$new_path"
25984 25979 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25985 25980 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25986 25981 fi
25987 25982
25988 25983 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25989 25984
25990 25985 path="$JAVA_HOME_PROCESSED"
25991 25986 has_colon=`$ECHO $path | $GREP ^.:`
25992 25987 new_path="$path"
25993 25988 if test "x$has_colon" = x; then
25994 25989 # Not in mixed or Windows style, start by that.
25995 25990 new_path=`cmd //c echo $path`
25996 25991 fi
25997 25992
25998 25993
25999 25994 input_path="$new_path"
26000 25995 # Check if we need to convert this using DOS-style short mode. If the path
26001 25996 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26002 25997 # take no chances and rewrite it.
26003 25998 # Note: m4 eats our [], so we need to use [ and ] instead.
26004 25999 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26005 26000 if test "x$has_forbidden_chars" != x; then
26006 26001 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26007 26002 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26008 26003 fi
26009 26004
26010 26005
26011 26006 windows_path="$new_path"
26012 26007 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26013 26008 unix_path=`$CYGPATH -u "$windows_path"`
26014 26009 new_path="$unix_path"
26015 26010 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26016 26011 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26017 26012 new_path="$unix_path"
26018 26013 fi
26019 26014
26020 26015 if test "x$path" != "x$new_path"; then
26021 26016 JAVA_HOME_PROCESSED="$new_path"
26022 26017 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26023 26018 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26024 26019 fi
26025 26020
26026 26021 # Save the first 10 bytes of this path to the storage, so fixpath can work.
26027 26022 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26028 26023
26029 26024 else
26030 26025 # We're on a unix platform. Hooray! :)
26031 26026 path="$JAVA_HOME_PROCESSED"
26032 26027 has_space=`$ECHO "$path" | $GREP " "`
26033 26028 if test "x$has_space" != x; then
26034 26029 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26035 26030 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26036 26031 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26037 26032 fi
26038 26033
26039 26034 # Use eval to expand a potential ~
26040 26035 eval path="$path"
26041 26036 if test ! -f "$path" && test ! -d "$path"; then
26042 26037 as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26043 26038 fi
26044 26039
26045 26040 if test -d "$path"; then
26046 26041 JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26047 26042 else
26048 26043 dir="`$DIRNAME "$path"`"
26049 26044 base="`$BASENAME "$path"`"
26050 26045 JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26051 26046 fi
26052 26047 fi
26053 26048 fi
26054 26049
26055 26050 if test ! -d "$JAVA_HOME_PROCESSED"; then
26056 26051 { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26057 26052 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26058 26053 else
26059 26054 # Aha, the user has set a JAVA_HOME
26060 26055 # let us use that as the Boot JDK.
26061 26056 BOOT_JDK="$JAVA_HOME_PROCESSED"
26062 26057 BOOT_JDK_FOUND=maybe
26063 26058 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26064 26059 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26065 26060 fi
26066 26061 fi
26067 26062
26068 26063
26069 26064 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26070 26065 if test "x$BOOT_JDK_FOUND" = xmaybe; then
26071 26066 # Do we have a bin/java?
26072 26067 if test ! -x "$BOOT_JDK/bin/java"; then
26073 26068 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26074 26069 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26075 26070 BOOT_JDK_FOUND=no
26076 26071 else
26077 26072 # Do we have a bin/javac?
26078 26073 if test ! -x "$BOOT_JDK/bin/javac"; then
26079 26074 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26080 26075 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26081 26076 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26082 26077 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26083 26078 BOOT_JDK_FOUND=no
26084 26079 else
26085 26080 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26086 26081 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26087 26082
26088 26083 # Extra M4 quote needed to protect [] in grep expression.
26089 26084 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26090 26085 if test "x$FOUND_CORRECT_VERSION" = x; then
26091 26086 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26092 26087 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26093 26088 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26094 26089 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26095 26090 BOOT_JDK_FOUND=no
26096 26091 else
26097 26092 # We're done! :-)
26098 26093 BOOT_JDK_FOUND=yes
26099 26094
26100 26095 # Only process if variable expands to non-empty
26101 26096
26102 26097 if test "x$BOOT_JDK" != x; then
26103 26098 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26104 26099
26105 26100 # Input might be given as Windows format, start by converting to
26106 26101 # unix format.
26107 26102 path="$BOOT_JDK"
26108 26103 new_path=`$CYGPATH -u "$path"`
26109 26104
26110 26105 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26111 26106 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26112 26107 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26113 26108 # "foo.exe" is OK but "foo" is an error.
26114 26109 #
26115 26110 # This test is therefore slightly more accurate than "test -f" to check for file precense.
26116 26111 # It is also a way to make sure we got the proper file name for the real test later on.
26117 26112 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26118 26113 if test "x$test_shortpath" = x; then
26119 26114 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26120 26115 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26121 26116 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26122 26117 fi
26123 26118
26124 26119 # Call helper function which possibly converts this using DOS-style short mode.
26125 26120 # If so, the updated path is stored in $new_path.
26126 26121
26127 26122 input_path="$new_path"
26128 26123 # Check if we need to convert this using DOS-style short mode. If the path
26129 26124 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26130 26125 # take no chances and rewrite it.
26131 26126 # Note: m4 eats our [], so we need to use [ and ] instead.
26132 26127 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26133 26128 if test "x$has_forbidden_chars" != x; then
26134 26129 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26135 26130 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26136 26131 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26137 26132 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26138 26133 # Going to short mode and back again did indeed matter. Since short mode is
26139 26134 # case insensitive, let's make it lowercase to improve readability.
26140 26135 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26141 26136 # Now convert it back to Unix-style (cygpath)
26142 26137 input_path=`$CYGPATH -u "$shortmode_path"`
26143 26138 new_path="$input_path"
26144 26139 fi
26145 26140 fi
26146 26141
26147 26142 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26148 26143 if test "x$test_cygdrive_prefix" = x; then
26149 26144 # As a simple fix, exclude /usr/bin since it's not a real path.
26150 26145 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26151 26146 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26152 26147 # a path prefixed by /cygdrive for fixpath to work.
26153 26148 new_path="$CYGWIN_ROOT_PATH$input_path"
26154 26149 fi
26155 26150 fi
26156 26151
26157 26152
26158 26153 if test "x$path" != "x$new_path"; then
26159 26154 BOOT_JDK="$new_path"
26160 26155 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26161 26156 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26162 26157 fi
26163 26158
26164 26159 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26165 26160
26166 26161 path="$BOOT_JDK"
26167 26162 has_colon=`$ECHO $path | $GREP ^.:`
26168 26163 new_path="$path"
26169 26164 if test "x$has_colon" = x; then
26170 26165 # Not in mixed or Windows style, start by that.
26171 26166 new_path=`cmd //c echo $path`
26172 26167 fi
26173 26168
26174 26169
26175 26170 input_path="$new_path"
26176 26171 # Check if we need to convert this using DOS-style short mode. If the path
26177 26172 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26178 26173 # take no chances and rewrite it.
26179 26174 # Note: m4 eats our [], so we need to use [ and ] instead.
26180 26175 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26181 26176 if test "x$has_forbidden_chars" != x; then
26182 26177 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26183 26178 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26184 26179 fi
26185 26180
26186 26181
26187 26182 windows_path="$new_path"
26188 26183 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26189 26184 unix_path=`$CYGPATH -u "$windows_path"`
26190 26185 new_path="$unix_path"
26191 26186 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26192 26187 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26193 26188 new_path="$unix_path"
26194 26189 fi
26195 26190
26196 26191 if test "x$path" != "x$new_path"; then
26197 26192 BOOT_JDK="$new_path"
26198 26193 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26199 26194 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26200 26195 fi
26201 26196
26202 26197 # Save the first 10 bytes of this path to the storage, so fixpath can work.
26203 26198 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26204 26199
26205 26200 else
26206 26201 # We're on a unix platform. Hooray! :)
26207 26202 path="$BOOT_JDK"
26208 26203 has_space=`$ECHO "$path" | $GREP " "`
26209 26204 if test "x$has_space" != x; then
26210 26205 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26211 26206 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26212 26207 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26213 26208 fi
26214 26209
26215 26210 # Use eval to expand a potential ~
26216 26211 eval path="$path"
26217 26212 if test ! -f "$path" && test ! -d "$path"; then
26218 26213 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26219 26214 fi
26220 26215
26221 26216 if test -d "$path"; then
26222 26217 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26223 26218 else
26224 26219 dir="`$DIRNAME "$path"`"
26225 26220 base="`$BASENAME "$path"`"
26226 26221 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26227 26222 fi
26228 26223 fi
26229 26224 fi
26230 26225
26231 26226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26232 26227 $as_echo_n "checking for Boot JDK... " >&6; }
26233 26228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26234 26229 $as_echo "$BOOT_JDK" >&6; }
26235 26230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26236 26231 $as_echo_n "checking Boot JDK version... " >&6; }
26237 26232 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
26238 26233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26239 26234 $as_echo "$BOOT_JDK_VERSION" >&6; }
26240 26235 fi # end check jdk version
26241 26236 fi # end check javac
26242 26237 fi # end check java
26243 26238 fi # end check boot jdk found
26244 26239 fi
26245 26240
26246 26241
26247 26242 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26248 26243
26249 26244 if test "x$BOOT_JDK_FOUND" = xno; then
26250 26245 # Now execute the test
26251 26246
26252 26247 # Extract the first word of "javac", so it can be a program name with args.
26253 26248 set dummy javac; ac_word=$2
26254 26249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26255 26250 $as_echo_n "checking for $ac_word... " >&6; }
26256 26251 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26257 26252 $as_echo_n "(cached) " >&6
26258 26253 else
26259 26254 case $JAVAC_CHECK in
26260 26255 [\\/]* | ?:[\\/]*)
26261 26256 ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26262 26257 ;;
26263 26258 *)
26264 26259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26265 26260 for as_dir in $PATH
26266 26261 do
26267 26262 IFS=$as_save_IFS
26268 26263 test -z "$as_dir" && as_dir=.
26269 26264 for ac_exec_ext in '' $ac_executable_extensions; do
26270 26265 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26271 26266 ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26272 26267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26273 26268 break 2
26274 26269 fi
26275 26270 done
26276 26271 done
26277 26272 IFS=$as_save_IFS
26278 26273
26279 26274 ;;
26280 26275 esac
26281 26276 fi
26282 26277 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26283 26278 if test -n "$JAVAC_CHECK"; then
26284 26279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26285 26280 $as_echo "$JAVAC_CHECK" >&6; }
26286 26281 else
26287 26282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26288 26283 $as_echo "no" >&6; }
26289 26284 fi
26290 26285
26291 26286
26292 26287 # Extract the first word of "java", so it can be a program name with args.
26293 26288 set dummy java; ac_word=$2
26294 26289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26295 26290 $as_echo_n "checking for $ac_word... " >&6; }
26296 26291 if ${ac_cv_path_JAVA_CHECK+:} false; then :
26297 26292 $as_echo_n "(cached) " >&6
26298 26293 else
26299 26294 case $JAVA_CHECK in
26300 26295 [\\/]* | ?:[\\/]*)
26301 26296 ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26302 26297 ;;
26303 26298 *)
26304 26299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26305 26300 for as_dir in $PATH
26306 26301 do
26307 26302 IFS=$as_save_IFS
26308 26303 test -z "$as_dir" && as_dir=.
26309 26304 for ac_exec_ext in '' $ac_executable_extensions; do
26310 26305 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26311 26306 ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26312 26307 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26313 26308 break 2
26314 26309 fi
26315 26310 done
26316 26311 done
26317 26312 IFS=$as_save_IFS
26318 26313
26319 26314 ;;
26320 26315 esac
26321 26316 fi
26322 26317 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26323 26318 if test -n "$JAVA_CHECK"; then
26324 26319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26325 26320 $as_echo "$JAVA_CHECK" >&6; }
26326 26321 else
26327 26322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26328 26323 $as_echo "no" >&6; }
26329 26324 fi
26330 26325
26331 26326
26332 26327 BINARY="$JAVAC_CHECK"
26333 26328 if test "x$JAVAC_CHECK" = x; then
26334 26329 BINARY="$JAVA_CHECK"
26335 26330 fi
26336 26331 if test "x$BINARY" != x; then
26337 26332 # So there is a java(c) binary, it might be part of a JDK.
26338 26333 # Lets find the JDK/JRE directory by following symbolic links.
26339 26334 # Linux/GNU systems often have links from /usr/bin/java to
26340 26335 # /etc/alternatives/java to the real JDK binary.
26341 26336
26342 26337 if test "x$OPENJDK_BUILD_OS" != xwindows; then
26343 26338 # Follow a chain of symbolic links. Use readlink
26344 26339 # where it exists, else fall back to horribly
26345 26340 # complicated shell code.
26346 26341 if test "x$READLINK_TESTED" != yes; then
26347 26342 # On MacOSX there is a readlink tool with a different
26348 26343 # purpose than the GNU readlink tool. Check the found readlink.
26349 26344 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26350 26345 if test "x$ISGNU" = x; then
26351 26346 # A readlink that we do not know how to use.
26352 26347 # Are there other non-GNU readlinks out there?
26353 26348 READLINK_TESTED=yes
26354 26349 READLINK=
26355 26350 fi
26356 26351 fi
26357 26352
26358 26353 if test "x$READLINK" != x; then
26359 26354 BINARY=`$READLINK -f $BINARY`
26360 26355 else
26361 26356 # Save the current directory for restoring afterwards
26362 26357 STARTDIR=$PWD
26363 26358 COUNTER=0
26364 26359 sym_link_dir=`$DIRNAME $BINARY`
26365 26360 sym_link_file=`$BASENAME $BINARY`
26366 26361 cd $sym_link_dir
26367 26362 # Use -P flag to resolve symlinks in directories.
26368 26363 cd `$THEPWDCMD -P`
26369 26364 sym_link_dir=`$THEPWDCMD -P`
26370 26365 # Resolve file symlinks
26371 26366 while test $COUNTER -lt 20; do
26372 26367 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26373 26368 if test "x$ISLINK" == x; then
26374 26369 # This is not a symbolic link! We are done!
26375 26370 break
26376 26371 fi
26377 26372 # Again resolve directory symlinks since the target of the just found
26378 26373 # link could be in a different directory
26379 26374 cd `$DIRNAME $ISLINK`
26380 26375 sym_link_dir=`$THEPWDCMD -P`
26381 26376 sym_link_file=`$BASENAME $ISLINK`
26382 26377 let COUNTER=COUNTER+1
26383 26378 done
26384 26379 cd $STARTDIR
26385 26380 BINARY=$sym_link_dir/$sym_link_file
26386 26381 fi
26387 26382 fi
26388 26383
26389 26384 BOOT_JDK=`dirname "$BINARY"`
26390 26385 BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26391 26386 if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26392 26387 # Looks like we found ourselves an JDK
26393 26388 BOOT_JDK_FOUND=maybe
26394 26389 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26395 26390 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26396 26391 fi
26397 26392 fi
26398 26393
26399 26394
26400 26395 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26401 26396 if test "x$BOOT_JDK_FOUND" = xmaybe; then
26402 26397 # Do we have a bin/java?
26403 26398 if test ! -x "$BOOT_JDK/bin/java"; then
26404 26399 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26405 26400 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26406 26401 BOOT_JDK_FOUND=no
26407 26402 else
26408 26403 # Do we have a bin/javac?
26409 26404 if test ! -x "$BOOT_JDK/bin/javac"; then
26410 26405 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26411 26406 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26412 26407 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26413 26408 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26414 26409 BOOT_JDK_FOUND=no
26415 26410 else
26416 26411 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26417 26412 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26418 26413
26419 26414 # Extra M4 quote needed to protect [] in grep expression.
26420 26415 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26421 26416 if test "x$FOUND_CORRECT_VERSION" = x; then
26422 26417 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26423 26418 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26424 26419 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26425 26420 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26426 26421 BOOT_JDK_FOUND=no
26427 26422 else
26428 26423 # We're done! :-)
26429 26424 BOOT_JDK_FOUND=yes
26430 26425
26431 26426 # Only process if variable expands to non-empty
26432 26427
26433 26428 if test "x$BOOT_JDK" != x; then
26434 26429 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26435 26430
26436 26431 # Input might be given as Windows format, start by converting to
26437 26432 # unix format.
26438 26433 path="$BOOT_JDK"
26439 26434 new_path=`$CYGPATH -u "$path"`
26440 26435
26441 26436 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26442 26437 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26443 26438 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26444 26439 # "foo.exe" is OK but "foo" is an error.
26445 26440 #
26446 26441 # This test is therefore slightly more accurate than "test -f" to check for file precense.
26447 26442 # It is also a way to make sure we got the proper file name for the real test later on.
26448 26443 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26449 26444 if test "x$test_shortpath" = x; then
26450 26445 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26451 26446 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26452 26447 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26453 26448 fi
26454 26449
26455 26450 # Call helper function which possibly converts this using DOS-style short mode.
26456 26451 # If so, the updated path is stored in $new_path.
26457 26452
26458 26453 input_path="$new_path"
26459 26454 # Check if we need to convert this using DOS-style short mode. If the path
26460 26455 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26461 26456 # take no chances and rewrite it.
26462 26457 # Note: m4 eats our [], so we need to use [ and ] instead.
26463 26458 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26464 26459 if test "x$has_forbidden_chars" != x; then
26465 26460 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26466 26461 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26467 26462 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26468 26463 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26469 26464 # Going to short mode and back again did indeed matter. Since short mode is
26470 26465 # case insensitive, let's make it lowercase to improve readability.
26471 26466 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26472 26467 # Now convert it back to Unix-style (cygpath)
26473 26468 input_path=`$CYGPATH -u "$shortmode_path"`
26474 26469 new_path="$input_path"
26475 26470 fi
26476 26471 fi
26477 26472
26478 26473 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26479 26474 if test "x$test_cygdrive_prefix" = x; then
26480 26475 # As a simple fix, exclude /usr/bin since it's not a real path.
26481 26476 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26482 26477 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26483 26478 # a path prefixed by /cygdrive for fixpath to work.
26484 26479 new_path="$CYGWIN_ROOT_PATH$input_path"
26485 26480 fi
26486 26481 fi
26487 26482
26488 26483
26489 26484 if test "x$path" != "x$new_path"; then
26490 26485 BOOT_JDK="$new_path"
26491 26486 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26492 26487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26493 26488 fi
26494 26489
26495 26490 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26496 26491
26497 26492 path="$BOOT_JDK"
26498 26493 has_colon=`$ECHO $path | $GREP ^.:`
26499 26494 new_path="$path"
26500 26495 if test "x$has_colon" = x; then
26501 26496 # Not in mixed or Windows style, start by that.
26502 26497 new_path=`cmd //c echo $path`
26503 26498 fi
26504 26499
26505 26500
26506 26501 input_path="$new_path"
26507 26502 # Check if we need to convert this using DOS-style short mode. If the path
26508 26503 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26509 26504 # take no chances and rewrite it.
26510 26505 # Note: m4 eats our [], so we need to use [ and ] instead.
26511 26506 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26512 26507 if test "x$has_forbidden_chars" != x; then
26513 26508 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26514 26509 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26515 26510 fi
26516 26511
26517 26512
26518 26513 windows_path="$new_path"
26519 26514 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26520 26515 unix_path=`$CYGPATH -u "$windows_path"`
26521 26516 new_path="$unix_path"
26522 26517 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26523 26518 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26524 26519 new_path="$unix_path"
26525 26520 fi
26526 26521
26527 26522 if test "x$path" != "x$new_path"; then
26528 26523 BOOT_JDK="$new_path"
26529 26524 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26530 26525 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26531 26526 fi
26532 26527
26533 26528 # Save the first 10 bytes of this path to the storage, so fixpath can work.
26534 26529 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26535 26530
26536 26531 else
26537 26532 # We're on a unix platform. Hooray! :)
26538 26533 path="$BOOT_JDK"
26539 26534 has_space=`$ECHO "$path" | $GREP " "`
26540 26535 if test "x$has_space" != x; then
26541 26536 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26542 26537 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26543 26538 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26544 26539 fi
26545 26540
26546 26541 # Use eval to expand a potential ~
26547 26542 eval path="$path"
26548 26543 if test ! -f "$path" && test ! -d "$path"; then
26549 26544 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26550 26545 fi
26551 26546
26552 26547 if test -d "$path"; then
26553 26548 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26554 26549 else
26555 26550 dir="`$DIRNAME "$path"`"
26556 26551 base="`$BASENAME "$path"`"
26557 26552 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26558 26553 fi
26559 26554 fi
26560 26555 fi
26561 26556
26562 26557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26563 26558 $as_echo_n "checking for Boot JDK... " >&6; }
26564 26559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26565 26560 $as_echo "$BOOT_JDK" >&6; }
26566 26561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26567 26562 $as_echo_n "checking Boot JDK version... " >&6; }
26568 26563 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
26569 26564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26570 26565 $as_echo "$BOOT_JDK_VERSION" >&6; }
26571 26566 fi # end check jdk version
26572 26567 fi # end check javac
26573 26568 fi # end check java
26574 26569 fi # end check boot jdk found
26575 26570 fi
26576 26571
26577 26572
26578 26573 # Test: Is there a JDK installed in default, well-known locations?
26579 26574
26580 26575 if test "x$BOOT_JDK_FOUND" = xno; then
26581 26576 # Now execute the test
26582 26577
26583 26578 if test "x$OPENJDK_TARGET_OS" = xwindows; then
26584 26579
26585 26580 if test "x$BOOT_JDK_FOUND" = xno; then
26586 26581 # Now execute the test
26587 26582
26588 26583 if test "x$ProgramW6432" != x; then
26589 26584 VIRTUAL_DIR="$ProgramW6432/Java"
26590 26585
26591 26586 windows_path="$VIRTUAL_DIR"
26592 26587 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26593 26588 unix_path=`$CYGPATH -u "$windows_path"`
26594 26589 VIRTUAL_DIR="$unix_path"
26595 26590 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26596 26591 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26597 26592 VIRTUAL_DIR="$unix_path"
26598 26593 fi
26599 26594
26600 26595
26601 26596 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26602 26597 BOOT_JDK_SUFFIX=""
26603 26598 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26604 26599 if test "x$ALL_JDKS_FOUND" != x; then
26605 26600 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26606 26601
26607 26602 if test "x$BOOT_JDK_FOUND" = xno; then
26608 26603 # Now execute the test
26609 26604
26610 26605 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26611 26606 if test -d "$BOOT_JDK"; then
26612 26607 BOOT_JDK_FOUND=maybe
26613 26608 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26614 26609 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26615 26610 fi
26616 26611
26617 26612
26618 26613 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26619 26614 if test "x$BOOT_JDK_FOUND" = xmaybe; then
26620 26615 # Do we have a bin/java?
26621 26616 if test ! -x "$BOOT_JDK/bin/java"; then
26622 26617 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26623 26618 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26624 26619 BOOT_JDK_FOUND=no
26625 26620 else
26626 26621 # Do we have a bin/javac?
26627 26622 if test ! -x "$BOOT_JDK/bin/javac"; then
26628 26623 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26629 26624 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26630 26625 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26631 26626 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26632 26627 BOOT_JDK_FOUND=no
26633 26628 else
26634 26629 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26635 26630 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26636 26631
26637 26632 # Extra M4 quote needed to protect [] in grep expression.
26638 26633 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26639 26634 if test "x$FOUND_CORRECT_VERSION" = x; then
26640 26635 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26641 26636 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26642 26637 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26643 26638 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26644 26639 BOOT_JDK_FOUND=no
26645 26640 else
26646 26641 # We're done! :-)
26647 26642 BOOT_JDK_FOUND=yes
26648 26643
26649 26644 # Only process if variable expands to non-empty
26650 26645
26651 26646 if test "x$BOOT_JDK" != x; then
26652 26647 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26653 26648
26654 26649 # Input might be given as Windows format, start by converting to
26655 26650 # unix format.
26656 26651 path="$BOOT_JDK"
26657 26652 new_path=`$CYGPATH -u "$path"`
26658 26653
26659 26654 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26660 26655 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26661 26656 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26662 26657 # "foo.exe" is OK but "foo" is an error.
26663 26658 #
26664 26659 # This test is therefore slightly more accurate than "test -f" to check for file precense.
26665 26660 # It is also a way to make sure we got the proper file name for the real test later on.
26666 26661 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26667 26662 if test "x$test_shortpath" = x; then
26668 26663 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26669 26664 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26670 26665 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26671 26666 fi
26672 26667
26673 26668 # Call helper function which possibly converts this using DOS-style short mode.
26674 26669 # If so, the updated path is stored in $new_path.
26675 26670
26676 26671 input_path="$new_path"
26677 26672 # Check if we need to convert this using DOS-style short mode. If the path
26678 26673 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26679 26674 # take no chances and rewrite it.
26680 26675 # Note: m4 eats our [], so we need to use [ and ] instead.
26681 26676 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26682 26677 if test "x$has_forbidden_chars" != x; then
26683 26678 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26684 26679 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26685 26680 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26686 26681 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26687 26682 # Going to short mode and back again did indeed matter. Since short mode is
26688 26683 # case insensitive, let's make it lowercase to improve readability.
26689 26684 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26690 26685 # Now convert it back to Unix-style (cygpath)
26691 26686 input_path=`$CYGPATH -u "$shortmode_path"`
26692 26687 new_path="$input_path"
26693 26688 fi
26694 26689 fi
26695 26690
26696 26691 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26697 26692 if test "x$test_cygdrive_prefix" = x; then
26698 26693 # As a simple fix, exclude /usr/bin since it's not a real path.
26699 26694 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26700 26695 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26701 26696 # a path prefixed by /cygdrive for fixpath to work.
26702 26697 new_path="$CYGWIN_ROOT_PATH$input_path"
26703 26698 fi
26704 26699 fi
26705 26700
26706 26701
26707 26702 if test "x$path" != "x$new_path"; then
26708 26703 BOOT_JDK="$new_path"
26709 26704 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26710 26705 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26711 26706 fi
26712 26707
26713 26708 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26714 26709
26715 26710 path="$BOOT_JDK"
26716 26711 has_colon=`$ECHO $path | $GREP ^.:`
26717 26712 new_path="$path"
26718 26713 if test "x$has_colon" = x; then
26719 26714 # Not in mixed or Windows style, start by that.
26720 26715 new_path=`cmd //c echo $path`
26721 26716 fi
26722 26717
26723 26718
26724 26719 input_path="$new_path"
26725 26720 # Check if we need to convert this using DOS-style short mode. If the path
26726 26721 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26727 26722 # take no chances and rewrite it.
26728 26723 # Note: m4 eats our [], so we need to use [ and ] instead.
26729 26724 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26730 26725 if test "x$has_forbidden_chars" != x; then
26731 26726 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26732 26727 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26733 26728 fi
26734 26729
26735 26730
26736 26731 windows_path="$new_path"
26737 26732 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26738 26733 unix_path=`$CYGPATH -u "$windows_path"`
26739 26734 new_path="$unix_path"
26740 26735 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26741 26736 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26742 26737 new_path="$unix_path"
26743 26738 fi
26744 26739
26745 26740 if test "x$path" != "x$new_path"; then
26746 26741 BOOT_JDK="$new_path"
26747 26742 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26748 26743 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26749 26744 fi
26750 26745
26751 26746 # Save the first 10 bytes of this path to the storage, so fixpath can work.
26752 26747 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26753 26748
26754 26749 else
26755 26750 # We're on a unix platform. Hooray! :)
26756 26751 path="$BOOT_JDK"
26757 26752 has_space=`$ECHO "$path" | $GREP " "`
26758 26753 if test "x$has_space" != x; then
26759 26754 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26760 26755 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26761 26756 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26762 26757 fi
26763 26758
26764 26759 # Use eval to expand a potential ~
26765 26760 eval path="$path"
26766 26761 if test ! -f "$path" && test ! -d "$path"; then
26767 26762 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26768 26763 fi
26769 26764
26770 26765 if test -d "$path"; then
26771 26766 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26772 26767 else
26773 26768 dir="`$DIRNAME "$path"`"
26774 26769 base="`$BASENAME "$path"`"
26775 26770 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26776 26771 fi
26777 26772 fi
26778 26773 fi
26779 26774
26780 26775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26781 26776 $as_echo_n "checking for Boot JDK... " >&6; }
26782 26777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26783 26778 $as_echo "$BOOT_JDK" >&6; }
26784 26779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26785 26780 $as_echo_n "checking Boot JDK version... " >&6; }
26786 26781 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
26787 26782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26788 26783 $as_echo "$BOOT_JDK_VERSION" >&6; }
26789 26784 fi # end check jdk version
26790 26785 fi # end check javac
26791 26786 fi # end check java
26792 26787 fi # end check boot jdk found
26793 26788 fi
26794 26789
26795 26790 done
26796 26791 fi
26797 26792
26798 26793 fi
26799 26794
26800 26795
26801 26796 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26802 26797 if test "x$BOOT_JDK_FOUND" = xmaybe; then
26803 26798 # Do we have a bin/java?
26804 26799 if test ! -x "$BOOT_JDK/bin/java"; then
26805 26800 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26806 26801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26807 26802 BOOT_JDK_FOUND=no
26808 26803 else
26809 26804 # Do we have a bin/javac?
26810 26805 if test ! -x "$BOOT_JDK/bin/javac"; then
26811 26806 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26812 26807 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26813 26808 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26814 26809 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26815 26810 BOOT_JDK_FOUND=no
26816 26811 else
26817 26812 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26818 26813 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26819 26814
26820 26815 # Extra M4 quote needed to protect [] in grep expression.
26821 26816 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26822 26817 if test "x$FOUND_CORRECT_VERSION" = x; then
26823 26818 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26824 26819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26825 26820 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26826 26821 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26827 26822 BOOT_JDK_FOUND=no
26828 26823 else
26829 26824 # We're done! :-)
26830 26825 BOOT_JDK_FOUND=yes
26831 26826
26832 26827 # Only process if variable expands to non-empty
26833 26828
26834 26829 if test "x$BOOT_JDK" != x; then
26835 26830 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26836 26831
26837 26832 # Input might be given as Windows format, start by converting to
26838 26833 # unix format.
26839 26834 path="$BOOT_JDK"
26840 26835 new_path=`$CYGPATH -u "$path"`
26841 26836
26842 26837 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26843 26838 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26844 26839 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26845 26840 # "foo.exe" is OK but "foo" is an error.
26846 26841 #
26847 26842 # This test is therefore slightly more accurate than "test -f" to check for file precense.
26848 26843 # It is also a way to make sure we got the proper file name for the real test later on.
26849 26844 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26850 26845 if test "x$test_shortpath" = x; then
26851 26846 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26852 26847 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26853 26848 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26854 26849 fi
26855 26850
26856 26851 # Call helper function which possibly converts this using DOS-style short mode.
26857 26852 # If so, the updated path is stored in $new_path.
26858 26853
26859 26854 input_path="$new_path"
26860 26855 # Check if we need to convert this using DOS-style short mode. If the path
26861 26856 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26862 26857 # take no chances and rewrite it.
26863 26858 # Note: m4 eats our [], so we need to use [ and ] instead.
26864 26859 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26865 26860 if test "x$has_forbidden_chars" != x; then
26866 26861 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26867 26862 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26868 26863 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26869 26864 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26870 26865 # Going to short mode and back again did indeed matter. Since short mode is
26871 26866 # case insensitive, let's make it lowercase to improve readability.
26872 26867 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26873 26868 # Now convert it back to Unix-style (cygpath)
26874 26869 input_path=`$CYGPATH -u "$shortmode_path"`
26875 26870 new_path="$input_path"
26876 26871 fi
26877 26872 fi
26878 26873
26879 26874 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26880 26875 if test "x$test_cygdrive_prefix" = x; then
26881 26876 # As a simple fix, exclude /usr/bin since it's not a real path.
26882 26877 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26883 26878 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26884 26879 # a path prefixed by /cygdrive for fixpath to work.
26885 26880 new_path="$CYGWIN_ROOT_PATH$input_path"
26886 26881 fi
26887 26882 fi
26888 26883
26889 26884
26890 26885 if test "x$path" != "x$new_path"; then
26891 26886 BOOT_JDK="$new_path"
26892 26887 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26893 26888 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26894 26889 fi
26895 26890
26896 26891 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26897 26892
26898 26893 path="$BOOT_JDK"
26899 26894 has_colon=`$ECHO $path | $GREP ^.:`
26900 26895 new_path="$path"
26901 26896 if test "x$has_colon" = x; then
26902 26897 # Not in mixed or Windows style, start by that.
26903 26898 new_path=`cmd //c echo $path`
26904 26899 fi
26905 26900
26906 26901
26907 26902 input_path="$new_path"
26908 26903 # Check if we need to convert this using DOS-style short mode. If the path
26909 26904 # contains just simple characters, use it. Otherwise (spaces, weird characters),
26910 26905 # take no chances and rewrite it.
26911 26906 # Note: m4 eats our [], so we need to use [ and ] instead.
26912 26907 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26913 26908 if test "x$has_forbidden_chars" != x; then
26914 26909 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26915 26910 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26916 26911 fi
26917 26912
26918 26913
26919 26914 windows_path="$new_path"
26920 26915 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26921 26916 unix_path=`$CYGPATH -u "$windows_path"`
26922 26917 new_path="$unix_path"
26923 26918 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26924 26919 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26925 26920 new_path="$unix_path"
26926 26921 fi
26927 26922
26928 26923 if test "x$path" != "x$new_path"; then
26929 26924 BOOT_JDK="$new_path"
26930 26925 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26931 26926 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26932 26927 fi
26933 26928
26934 26929 # Save the first 10 bytes of this path to the storage, so fixpath can work.
26935 26930 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26936 26931
26937 26932 else
26938 26933 # We're on a unix platform. Hooray! :)
26939 26934 path="$BOOT_JDK"
26940 26935 has_space=`$ECHO "$path" | $GREP " "`
26941 26936 if test "x$has_space" != x; then
26942 26937 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26943 26938 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26944 26939 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26945 26940 fi
26946 26941
26947 26942 # Use eval to expand a potential ~
26948 26943 eval path="$path"
26949 26944 if test ! -f "$path" && test ! -d "$path"; then
26950 26945 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26951 26946 fi
26952 26947
26953 26948 if test -d "$path"; then
26954 26949 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26955 26950 else
26956 26951 dir="`$DIRNAME "$path"`"
26957 26952 base="`$BASENAME "$path"`"
26958 26953 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26959 26954 fi
26960 26955 fi
26961 26956 fi
26962 26957
26963 26958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26964 26959 $as_echo_n "checking for Boot JDK... " >&6; }
26965 26960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26966 26961 $as_echo "$BOOT_JDK" >&6; }
26967 26962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26968 26963 $as_echo_n "checking Boot JDK version... " >&6; }
26969 26964 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
26970 26965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26971 26966 $as_echo "$BOOT_JDK_VERSION" >&6; }
26972 26967 fi # end check jdk version
26973 26968 fi # end check javac
26974 26969 fi # end check java
26975 26970 fi # end check boot jdk found
26976 26971 fi
26977 26972
26978 26973
26979 26974 if test "x$BOOT_JDK_FOUND" = xno; then
26980 26975 # Now execute the test
26981 26976
26982 26977 if test "x$PROGRAMW6432" != x; then
26983 26978 VIRTUAL_DIR="$PROGRAMW6432/Java"
26984 26979
26985 26980 windows_path="$VIRTUAL_DIR"
26986 26981 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26987 26982 unix_path=`$CYGPATH -u "$windows_path"`
26988 26983 VIRTUAL_DIR="$unix_path"
26989 26984 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26990 26985 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26991 26986 VIRTUAL_DIR="$unix_path"
26992 26987 fi
26993 26988
26994 26989
26995 26990 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26996 26991 BOOT_JDK_SUFFIX=""
26997 26992 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26998 26993 if test "x$ALL_JDKS_FOUND" != x; then
26999 26994 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27000 26995
27001 26996 if test "x$BOOT_JDK_FOUND" = xno; then
27002 26997 # Now execute the test
27003 26998
27004 26999 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27005 27000 if test -d "$BOOT_JDK"; then
27006 27001 BOOT_JDK_FOUND=maybe
27007 27002 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27008 27003 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27009 27004 fi
27010 27005
27011 27006
27012 27007 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27013 27008 if test "x$BOOT_JDK_FOUND" = xmaybe; then
27014 27009 # Do we have a bin/java?
27015 27010 if test ! -x "$BOOT_JDK/bin/java"; then
27016 27011 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27017 27012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27018 27013 BOOT_JDK_FOUND=no
27019 27014 else
27020 27015 # Do we have a bin/javac?
27021 27016 if test ! -x "$BOOT_JDK/bin/javac"; then
27022 27017 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27023 27018 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27024 27019 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27025 27020 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27026 27021 BOOT_JDK_FOUND=no
27027 27022 else
27028 27023 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27029 27024 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27030 27025
27031 27026 # Extra M4 quote needed to protect [] in grep expression.
27032 27027 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27033 27028 if test "x$FOUND_CORRECT_VERSION" = x; then
27034 27029 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27035 27030 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27036 27031 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27037 27032 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27038 27033 BOOT_JDK_FOUND=no
27039 27034 else
27040 27035 # We're done! :-)
27041 27036 BOOT_JDK_FOUND=yes
27042 27037
27043 27038 # Only process if variable expands to non-empty
27044 27039
27045 27040 if test "x$BOOT_JDK" != x; then
27046 27041 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27047 27042
27048 27043 # Input might be given as Windows format, start by converting to
27049 27044 # unix format.
27050 27045 path="$BOOT_JDK"
27051 27046 new_path=`$CYGPATH -u "$path"`
27052 27047
27053 27048 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27054 27049 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27055 27050 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27056 27051 # "foo.exe" is OK but "foo" is an error.
27057 27052 #
27058 27053 # This test is therefore slightly more accurate than "test -f" to check for file precense.
27059 27054 # It is also a way to make sure we got the proper file name for the real test later on.
27060 27055 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27061 27056 if test "x$test_shortpath" = x; then
27062 27057 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27063 27058 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27064 27059 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27065 27060 fi
27066 27061
27067 27062 # Call helper function which possibly converts this using DOS-style short mode.
27068 27063 # If so, the updated path is stored in $new_path.
27069 27064
27070 27065 input_path="$new_path"
27071 27066 # Check if we need to convert this using DOS-style short mode. If the path
27072 27067 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27073 27068 # take no chances and rewrite it.
27074 27069 # Note: m4 eats our [], so we need to use [ and ] instead.
27075 27070 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27076 27071 if test "x$has_forbidden_chars" != x; then
27077 27072 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27078 27073 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27079 27074 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27080 27075 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27081 27076 # Going to short mode and back again did indeed matter. Since short mode is
27082 27077 # case insensitive, let's make it lowercase to improve readability.
27083 27078 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27084 27079 # Now convert it back to Unix-style (cygpath)
27085 27080 input_path=`$CYGPATH -u "$shortmode_path"`
27086 27081 new_path="$input_path"
27087 27082 fi
27088 27083 fi
27089 27084
27090 27085 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27091 27086 if test "x$test_cygdrive_prefix" = x; then
27092 27087 # As a simple fix, exclude /usr/bin since it's not a real path.
27093 27088 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27094 27089 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27095 27090 # a path prefixed by /cygdrive for fixpath to work.
27096 27091 new_path="$CYGWIN_ROOT_PATH$input_path"
27097 27092 fi
27098 27093 fi
27099 27094
27100 27095
27101 27096 if test "x$path" != "x$new_path"; then
27102 27097 BOOT_JDK="$new_path"
27103 27098 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27104 27099 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27105 27100 fi
27106 27101
27107 27102 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27108 27103
27109 27104 path="$BOOT_JDK"
27110 27105 has_colon=`$ECHO $path | $GREP ^.:`
27111 27106 new_path="$path"
27112 27107 if test "x$has_colon" = x; then
27113 27108 # Not in mixed or Windows style, start by that.
27114 27109 new_path=`cmd //c echo $path`
27115 27110 fi
27116 27111
27117 27112
27118 27113 input_path="$new_path"
27119 27114 # Check if we need to convert this using DOS-style short mode. If the path
27120 27115 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27121 27116 # take no chances and rewrite it.
27122 27117 # Note: m4 eats our [], so we need to use [ and ] instead.
27123 27118 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27124 27119 if test "x$has_forbidden_chars" != x; then
27125 27120 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27126 27121 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27127 27122 fi
27128 27123
27129 27124
27130 27125 windows_path="$new_path"
27131 27126 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27132 27127 unix_path=`$CYGPATH -u "$windows_path"`
27133 27128 new_path="$unix_path"
27134 27129 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27135 27130 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27136 27131 new_path="$unix_path"
27137 27132 fi
27138 27133
27139 27134 if test "x$path" != "x$new_path"; then
27140 27135 BOOT_JDK="$new_path"
27141 27136 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27142 27137 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27143 27138 fi
27144 27139
27145 27140 # Save the first 10 bytes of this path to the storage, so fixpath can work.
27146 27141 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27147 27142
27148 27143 else
27149 27144 # We're on a unix platform. Hooray! :)
27150 27145 path="$BOOT_JDK"
27151 27146 has_space=`$ECHO "$path" | $GREP " "`
27152 27147 if test "x$has_space" != x; then
27153 27148 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27154 27149 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27155 27150 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27156 27151 fi
27157 27152
27158 27153 # Use eval to expand a potential ~
27159 27154 eval path="$path"
27160 27155 if test ! -f "$path" && test ! -d "$path"; then
27161 27156 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27162 27157 fi
27163 27158
27164 27159 if test -d "$path"; then
27165 27160 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27166 27161 else
27167 27162 dir="`$DIRNAME "$path"`"
27168 27163 base="`$BASENAME "$path"`"
27169 27164 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27170 27165 fi
27171 27166 fi
27172 27167 fi
27173 27168
27174 27169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27175 27170 $as_echo_n "checking for Boot JDK... " >&6; }
27176 27171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27177 27172 $as_echo "$BOOT_JDK" >&6; }
27178 27173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27179 27174 $as_echo_n "checking Boot JDK version... " >&6; }
27180 27175 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
27181 27176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27182 27177 $as_echo "$BOOT_JDK_VERSION" >&6; }
27183 27178 fi # end check jdk version
27184 27179 fi # end check javac
27185 27180 fi # end check java
27186 27181 fi # end check boot jdk found
27187 27182 fi
27188 27183
27189 27184 done
27190 27185 fi
27191 27186
27192 27187 fi
27193 27188
27194 27189
27195 27190 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27196 27191 if test "x$BOOT_JDK_FOUND" = xmaybe; then
27197 27192 # Do we have a bin/java?
27198 27193 if test ! -x "$BOOT_JDK/bin/java"; then
27199 27194 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27200 27195 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27201 27196 BOOT_JDK_FOUND=no
27202 27197 else
27203 27198 # Do we have a bin/javac?
27204 27199 if test ! -x "$BOOT_JDK/bin/javac"; then
27205 27200 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27206 27201 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27207 27202 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27208 27203 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27209 27204 BOOT_JDK_FOUND=no
27210 27205 else
27211 27206 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27212 27207 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27213 27208
27214 27209 # Extra M4 quote needed to protect [] in grep expression.
27215 27210 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27216 27211 if test "x$FOUND_CORRECT_VERSION" = x; then
27217 27212 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27218 27213 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27219 27214 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27220 27215 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27221 27216 BOOT_JDK_FOUND=no
27222 27217 else
27223 27218 # We're done! :-)
27224 27219 BOOT_JDK_FOUND=yes
27225 27220
27226 27221 # Only process if variable expands to non-empty
27227 27222
27228 27223 if test "x$BOOT_JDK" != x; then
27229 27224 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27230 27225
27231 27226 # Input might be given as Windows format, start by converting to
27232 27227 # unix format.
27233 27228 path="$BOOT_JDK"
27234 27229 new_path=`$CYGPATH -u "$path"`
27235 27230
27236 27231 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27237 27232 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27238 27233 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27239 27234 # "foo.exe" is OK but "foo" is an error.
27240 27235 #
27241 27236 # This test is therefore slightly more accurate than "test -f" to check for file precense.
27242 27237 # It is also a way to make sure we got the proper file name for the real test later on.
27243 27238 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27244 27239 if test "x$test_shortpath" = x; then
27245 27240 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27246 27241 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27247 27242 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27248 27243 fi
27249 27244
27250 27245 # Call helper function which possibly converts this using DOS-style short mode.
27251 27246 # If so, the updated path is stored in $new_path.
27252 27247
27253 27248 input_path="$new_path"
27254 27249 # Check if we need to convert this using DOS-style short mode. If the path
27255 27250 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27256 27251 # take no chances and rewrite it.
27257 27252 # Note: m4 eats our [], so we need to use [ and ] instead.
27258 27253 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27259 27254 if test "x$has_forbidden_chars" != x; then
27260 27255 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27261 27256 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27262 27257 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27263 27258 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27264 27259 # Going to short mode and back again did indeed matter. Since short mode is
27265 27260 # case insensitive, let's make it lowercase to improve readability.
27266 27261 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27267 27262 # Now convert it back to Unix-style (cygpath)
27268 27263 input_path=`$CYGPATH -u "$shortmode_path"`
27269 27264 new_path="$input_path"
27270 27265 fi
27271 27266 fi
27272 27267
27273 27268 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27274 27269 if test "x$test_cygdrive_prefix" = x; then
27275 27270 # As a simple fix, exclude /usr/bin since it's not a real path.
27276 27271 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27277 27272 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27278 27273 # a path prefixed by /cygdrive for fixpath to work.
27279 27274 new_path="$CYGWIN_ROOT_PATH$input_path"
27280 27275 fi
27281 27276 fi
27282 27277
27283 27278
27284 27279 if test "x$path" != "x$new_path"; then
27285 27280 BOOT_JDK="$new_path"
27286 27281 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27287 27282 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27288 27283 fi
27289 27284
27290 27285 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27291 27286
27292 27287 path="$BOOT_JDK"
27293 27288 has_colon=`$ECHO $path | $GREP ^.:`
27294 27289 new_path="$path"
27295 27290 if test "x$has_colon" = x; then
27296 27291 # Not in mixed or Windows style, start by that.
27297 27292 new_path=`cmd //c echo $path`
27298 27293 fi
27299 27294
27300 27295
27301 27296 input_path="$new_path"
27302 27297 # Check if we need to convert this using DOS-style short mode. If the path
27303 27298 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27304 27299 # take no chances and rewrite it.
27305 27300 # Note: m4 eats our [], so we need to use [ and ] instead.
27306 27301 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27307 27302 if test "x$has_forbidden_chars" != x; then
27308 27303 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27309 27304 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27310 27305 fi
27311 27306
27312 27307
27313 27308 windows_path="$new_path"
27314 27309 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27315 27310 unix_path=`$CYGPATH -u "$windows_path"`
27316 27311 new_path="$unix_path"
27317 27312 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27318 27313 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27319 27314 new_path="$unix_path"
27320 27315 fi
27321 27316
27322 27317 if test "x$path" != "x$new_path"; then
27323 27318 BOOT_JDK="$new_path"
27324 27319 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27325 27320 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27326 27321 fi
27327 27322
27328 27323 # Save the first 10 bytes of this path to the storage, so fixpath can work.
27329 27324 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27330 27325
27331 27326 else
27332 27327 # We're on a unix platform. Hooray! :)
27333 27328 path="$BOOT_JDK"
27334 27329 has_space=`$ECHO "$path" | $GREP " "`
27335 27330 if test "x$has_space" != x; then
27336 27331 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27337 27332 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27338 27333 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27339 27334 fi
27340 27335
27341 27336 # Use eval to expand a potential ~
27342 27337 eval path="$path"
27343 27338 if test ! -f "$path" && test ! -d "$path"; then
27344 27339 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27345 27340 fi
27346 27341
27347 27342 if test -d "$path"; then
27348 27343 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27349 27344 else
27350 27345 dir="`$DIRNAME "$path"`"
27351 27346 base="`$BASENAME "$path"`"
27352 27347 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27353 27348 fi
27354 27349 fi
27355 27350 fi
27356 27351
27357 27352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27358 27353 $as_echo_n "checking for Boot JDK... " >&6; }
27359 27354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27360 27355 $as_echo "$BOOT_JDK" >&6; }
27361 27356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27362 27357 $as_echo_n "checking Boot JDK version... " >&6; }
27363 27358 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
27364 27359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27365 27360 $as_echo "$BOOT_JDK_VERSION" >&6; }
27366 27361 fi # end check jdk version
27367 27362 fi # end check javac
27368 27363 fi # end check java
27369 27364 fi # end check boot jdk found
27370 27365 fi
27371 27366
27372 27367
27373 27368 if test "x$BOOT_JDK_FOUND" = xno; then
27374 27369 # Now execute the test
27375 27370
27376 27371 if test "x$PROGRAMFILES" != x; then
27377 27372 VIRTUAL_DIR="$PROGRAMFILES/Java"
27378 27373
27379 27374 windows_path="$VIRTUAL_DIR"
27380 27375 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27381 27376 unix_path=`$CYGPATH -u "$windows_path"`
27382 27377 VIRTUAL_DIR="$unix_path"
27383 27378 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27384 27379 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27385 27380 VIRTUAL_DIR="$unix_path"
27386 27381 fi
27387 27382
27388 27383
27389 27384 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27390 27385 BOOT_JDK_SUFFIX=""
27391 27386 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27392 27387 if test "x$ALL_JDKS_FOUND" != x; then
27393 27388 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27394 27389
27395 27390 if test "x$BOOT_JDK_FOUND" = xno; then
27396 27391 # Now execute the test
27397 27392
27398 27393 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27399 27394 if test -d "$BOOT_JDK"; then
27400 27395 BOOT_JDK_FOUND=maybe
27401 27396 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27402 27397 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27403 27398 fi
27404 27399
27405 27400
27406 27401 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27407 27402 if test "x$BOOT_JDK_FOUND" = xmaybe; then
27408 27403 # Do we have a bin/java?
27409 27404 if test ! -x "$BOOT_JDK/bin/java"; then
27410 27405 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27411 27406 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27412 27407 BOOT_JDK_FOUND=no
27413 27408 else
27414 27409 # Do we have a bin/javac?
27415 27410 if test ! -x "$BOOT_JDK/bin/javac"; then
27416 27411 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27417 27412 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27418 27413 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27419 27414 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27420 27415 BOOT_JDK_FOUND=no
27421 27416 else
27422 27417 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27423 27418 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27424 27419
27425 27420 # Extra M4 quote needed to protect [] in grep expression.
27426 27421 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27427 27422 if test "x$FOUND_CORRECT_VERSION" = x; then
27428 27423 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27429 27424 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27430 27425 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27431 27426 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27432 27427 BOOT_JDK_FOUND=no
27433 27428 else
27434 27429 # We're done! :-)
27435 27430 BOOT_JDK_FOUND=yes
27436 27431
27437 27432 # Only process if variable expands to non-empty
27438 27433
27439 27434 if test "x$BOOT_JDK" != x; then
27440 27435 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27441 27436
27442 27437 # Input might be given as Windows format, start by converting to
27443 27438 # unix format.
27444 27439 path="$BOOT_JDK"
27445 27440 new_path=`$CYGPATH -u "$path"`
27446 27441
27447 27442 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27448 27443 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27449 27444 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27450 27445 # "foo.exe" is OK but "foo" is an error.
27451 27446 #
27452 27447 # This test is therefore slightly more accurate than "test -f" to check for file precense.
27453 27448 # It is also a way to make sure we got the proper file name for the real test later on.
27454 27449 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27455 27450 if test "x$test_shortpath" = x; then
27456 27451 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27457 27452 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27458 27453 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27459 27454 fi
27460 27455
27461 27456 # Call helper function which possibly converts this using DOS-style short mode.
27462 27457 # If so, the updated path is stored in $new_path.
27463 27458
27464 27459 input_path="$new_path"
27465 27460 # Check if we need to convert this using DOS-style short mode. If the path
27466 27461 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27467 27462 # take no chances and rewrite it.
27468 27463 # Note: m4 eats our [], so we need to use [ and ] instead.
27469 27464 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27470 27465 if test "x$has_forbidden_chars" != x; then
27471 27466 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27472 27467 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27473 27468 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27474 27469 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27475 27470 # Going to short mode and back again did indeed matter. Since short mode is
27476 27471 # case insensitive, let's make it lowercase to improve readability.
27477 27472 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27478 27473 # Now convert it back to Unix-style (cygpath)
27479 27474 input_path=`$CYGPATH -u "$shortmode_path"`
27480 27475 new_path="$input_path"
27481 27476 fi
27482 27477 fi
27483 27478
27484 27479 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27485 27480 if test "x$test_cygdrive_prefix" = x; then
27486 27481 # As a simple fix, exclude /usr/bin since it's not a real path.
27487 27482 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27488 27483 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27489 27484 # a path prefixed by /cygdrive for fixpath to work.
27490 27485 new_path="$CYGWIN_ROOT_PATH$input_path"
27491 27486 fi
27492 27487 fi
27493 27488
27494 27489
27495 27490 if test "x$path" != "x$new_path"; then
27496 27491 BOOT_JDK="$new_path"
27497 27492 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27498 27493 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27499 27494 fi
27500 27495
27501 27496 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27502 27497
27503 27498 path="$BOOT_JDK"
27504 27499 has_colon=`$ECHO $path | $GREP ^.:`
27505 27500 new_path="$path"
27506 27501 if test "x$has_colon" = x; then
27507 27502 # Not in mixed or Windows style, start by that.
27508 27503 new_path=`cmd //c echo $path`
27509 27504 fi
27510 27505
27511 27506
27512 27507 input_path="$new_path"
27513 27508 # Check if we need to convert this using DOS-style short mode. If the path
27514 27509 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27515 27510 # take no chances and rewrite it.
27516 27511 # Note: m4 eats our [], so we need to use [ and ] instead.
27517 27512 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27518 27513 if test "x$has_forbidden_chars" != x; then
27519 27514 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27520 27515 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27521 27516 fi
27522 27517
27523 27518
27524 27519 windows_path="$new_path"
27525 27520 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27526 27521 unix_path=`$CYGPATH -u "$windows_path"`
27527 27522 new_path="$unix_path"
27528 27523 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27529 27524 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27530 27525 new_path="$unix_path"
27531 27526 fi
27532 27527
27533 27528 if test "x$path" != "x$new_path"; then
27534 27529 BOOT_JDK="$new_path"
27535 27530 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27536 27531 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27537 27532 fi
27538 27533
27539 27534 # Save the first 10 bytes of this path to the storage, so fixpath can work.
27540 27535 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27541 27536
27542 27537 else
27543 27538 # We're on a unix platform. Hooray! :)
27544 27539 path="$BOOT_JDK"
27545 27540 has_space=`$ECHO "$path" | $GREP " "`
27546 27541 if test "x$has_space" != x; then
27547 27542 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27548 27543 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27549 27544 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27550 27545 fi
27551 27546
27552 27547 # Use eval to expand a potential ~
27553 27548 eval path="$path"
27554 27549 if test ! -f "$path" && test ! -d "$path"; then
27555 27550 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27556 27551 fi
27557 27552
27558 27553 if test -d "$path"; then
27559 27554 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27560 27555 else
27561 27556 dir="`$DIRNAME "$path"`"
27562 27557 base="`$BASENAME "$path"`"
27563 27558 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27564 27559 fi
27565 27560 fi
27566 27561 fi
27567 27562
27568 27563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27569 27564 $as_echo_n "checking for Boot JDK... " >&6; }
27570 27565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27571 27566 $as_echo "$BOOT_JDK" >&6; }
27572 27567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27573 27568 $as_echo_n "checking Boot JDK version... " >&6; }
27574 27569 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
27575 27570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27576 27571 $as_echo "$BOOT_JDK_VERSION" >&6; }
27577 27572 fi # end check jdk version
27578 27573 fi # end check javac
27579 27574 fi # end check java
27580 27575 fi # end check boot jdk found
27581 27576 fi
27582 27577
27583 27578 done
27584 27579 fi
27585 27580
27586 27581 fi
27587 27582
27588 27583
27589 27584 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27590 27585 if test "x$BOOT_JDK_FOUND" = xmaybe; then
27591 27586 # Do we have a bin/java?
27592 27587 if test ! -x "$BOOT_JDK/bin/java"; then
27593 27588 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27594 27589 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27595 27590 BOOT_JDK_FOUND=no
27596 27591 else
27597 27592 # Do we have a bin/javac?
27598 27593 if test ! -x "$BOOT_JDK/bin/javac"; then
27599 27594 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27600 27595 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27601 27596 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27602 27597 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27603 27598 BOOT_JDK_FOUND=no
27604 27599 else
27605 27600 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27606 27601 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27607 27602
27608 27603 # Extra M4 quote needed to protect [] in grep expression.
27609 27604 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27610 27605 if test "x$FOUND_CORRECT_VERSION" = x; then
27611 27606 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27612 27607 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27613 27608 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27614 27609 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27615 27610 BOOT_JDK_FOUND=no
27616 27611 else
27617 27612 # We're done! :-)
27618 27613 BOOT_JDK_FOUND=yes
27619 27614
27620 27615 # Only process if variable expands to non-empty
27621 27616
27622 27617 if test "x$BOOT_JDK" != x; then
27623 27618 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27624 27619
27625 27620 # Input might be given as Windows format, start by converting to
27626 27621 # unix format.
27627 27622 path="$BOOT_JDK"
27628 27623 new_path=`$CYGPATH -u "$path"`
27629 27624
27630 27625 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27631 27626 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27632 27627 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27633 27628 # "foo.exe" is OK but "foo" is an error.
27634 27629 #
27635 27630 # This test is therefore slightly more accurate than "test -f" to check for file precense.
27636 27631 # It is also a way to make sure we got the proper file name for the real test later on.
27637 27632 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27638 27633 if test "x$test_shortpath" = x; then
27639 27634 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27640 27635 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27641 27636 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27642 27637 fi
27643 27638
27644 27639 # Call helper function which possibly converts this using DOS-style short mode.
27645 27640 # If so, the updated path is stored in $new_path.
27646 27641
27647 27642 input_path="$new_path"
27648 27643 # Check if we need to convert this using DOS-style short mode. If the path
27649 27644 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27650 27645 # take no chances and rewrite it.
27651 27646 # Note: m4 eats our [], so we need to use [ and ] instead.
27652 27647 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27653 27648 if test "x$has_forbidden_chars" != x; then
27654 27649 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27655 27650 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27656 27651 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27657 27652 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27658 27653 # Going to short mode and back again did indeed matter. Since short mode is
27659 27654 # case insensitive, let's make it lowercase to improve readability.
27660 27655 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27661 27656 # Now convert it back to Unix-style (cygpath)
27662 27657 input_path=`$CYGPATH -u "$shortmode_path"`
27663 27658 new_path="$input_path"
27664 27659 fi
27665 27660 fi
27666 27661
27667 27662 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27668 27663 if test "x$test_cygdrive_prefix" = x; then
27669 27664 # As a simple fix, exclude /usr/bin since it's not a real path.
27670 27665 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27671 27666 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27672 27667 # a path prefixed by /cygdrive for fixpath to work.
27673 27668 new_path="$CYGWIN_ROOT_PATH$input_path"
27674 27669 fi
27675 27670 fi
27676 27671
27677 27672
27678 27673 if test "x$path" != "x$new_path"; then
27679 27674 BOOT_JDK="$new_path"
27680 27675 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27681 27676 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27682 27677 fi
27683 27678
27684 27679 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27685 27680
27686 27681 path="$BOOT_JDK"
27687 27682 has_colon=`$ECHO $path | $GREP ^.:`
27688 27683 new_path="$path"
27689 27684 if test "x$has_colon" = x; then
27690 27685 # Not in mixed or Windows style, start by that.
27691 27686 new_path=`cmd //c echo $path`
27692 27687 fi
27693 27688
27694 27689
27695 27690 input_path="$new_path"
27696 27691 # Check if we need to convert this using DOS-style short mode. If the path
27697 27692 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27698 27693 # take no chances and rewrite it.
27699 27694 # Note: m4 eats our [], so we need to use [ and ] instead.
27700 27695 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27701 27696 if test "x$has_forbidden_chars" != x; then
27702 27697 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27703 27698 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27704 27699 fi
27705 27700
27706 27701
27707 27702 windows_path="$new_path"
27708 27703 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27709 27704 unix_path=`$CYGPATH -u "$windows_path"`
27710 27705 new_path="$unix_path"
27711 27706 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27712 27707 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27713 27708 new_path="$unix_path"
27714 27709 fi
27715 27710
27716 27711 if test "x$path" != "x$new_path"; then
27717 27712 BOOT_JDK="$new_path"
27718 27713 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27719 27714 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27720 27715 fi
27721 27716
27722 27717 # Save the first 10 bytes of this path to the storage, so fixpath can work.
27723 27718 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27724 27719
27725 27720 else
27726 27721 # We're on a unix platform. Hooray! :)
27727 27722 path="$BOOT_JDK"
27728 27723 has_space=`$ECHO "$path" | $GREP " "`
27729 27724 if test "x$has_space" != x; then
27730 27725 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27731 27726 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27732 27727 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27733 27728 fi
27734 27729
27735 27730 # Use eval to expand a potential ~
27736 27731 eval path="$path"
27737 27732 if test ! -f "$path" && test ! -d "$path"; then
27738 27733 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27739 27734 fi
27740 27735
27741 27736 if test -d "$path"; then
27742 27737 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27743 27738 else
27744 27739 dir="`$DIRNAME "$path"`"
27745 27740 base="`$BASENAME "$path"`"
27746 27741 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27747 27742 fi
27748 27743 fi
27749 27744 fi
27750 27745
27751 27746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27752 27747 $as_echo_n "checking for Boot JDK... " >&6; }
27753 27748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27754 27749 $as_echo "$BOOT_JDK" >&6; }
27755 27750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27756 27751 $as_echo_n "checking Boot JDK version... " >&6; }
27757 27752 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
27758 27753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27759 27754 $as_echo "$BOOT_JDK_VERSION" >&6; }
27760 27755 fi # end check jdk version
27761 27756 fi # end check javac
27762 27757 fi # end check java
27763 27758 fi # end check boot jdk found
27764 27759 fi
27765 27760
27766 27761
27767 27762 if test "x$BOOT_JDK_FOUND" = xno; then
27768 27763 # Now execute the test
27769 27764
27770 27765 if test "x$ProgramFiles" != x; then
27771 27766 VIRTUAL_DIR="$ProgramFiles/Java"
27772 27767
27773 27768 windows_path="$VIRTUAL_DIR"
27774 27769 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27775 27770 unix_path=`$CYGPATH -u "$windows_path"`
27776 27771 VIRTUAL_DIR="$unix_path"
27777 27772 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27778 27773 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27779 27774 VIRTUAL_DIR="$unix_path"
27780 27775 fi
27781 27776
27782 27777
27783 27778 BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27784 27779 BOOT_JDK_SUFFIX=""
27785 27780 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27786 27781 if test "x$ALL_JDKS_FOUND" != x; then
27787 27782 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27788 27783
27789 27784 if test "x$BOOT_JDK_FOUND" = xno; then
27790 27785 # Now execute the test
27791 27786
27792 27787 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27793 27788 if test -d "$BOOT_JDK"; then
27794 27789 BOOT_JDK_FOUND=maybe
27795 27790 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27796 27791 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27797 27792 fi
27798 27793
27799 27794
27800 27795 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27801 27796 if test "x$BOOT_JDK_FOUND" = xmaybe; then
27802 27797 # Do we have a bin/java?
27803 27798 if test ! -x "$BOOT_JDK/bin/java"; then
27804 27799 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27805 27800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27806 27801 BOOT_JDK_FOUND=no
27807 27802 else
27808 27803 # Do we have a bin/javac?
27809 27804 if test ! -x "$BOOT_JDK/bin/javac"; then
27810 27805 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27811 27806 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27812 27807 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27813 27808 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27814 27809 BOOT_JDK_FOUND=no
27815 27810 else
27816 27811 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27817 27812 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27818 27813
27819 27814 # Extra M4 quote needed to protect [] in grep expression.
27820 27815 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27821 27816 if test "x$FOUND_CORRECT_VERSION" = x; then
27822 27817 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27823 27818 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27824 27819 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27825 27820 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27826 27821 BOOT_JDK_FOUND=no
27827 27822 else
27828 27823 # We're done! :-)
27829 27824 BOOT_JDK_FOUND=yes
27830 27825
27831 27826 # Only process if variable expands to non-empty
27832 27827
27833 27828 if test "x$BOOT_JDK" != x; then
27834 27829 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27835 27830
27836 27831 # Input might be given as Windows format, start by converting to
27837 27832 # unix format.
27838 27833 path="$BOOT_JDK"
27839 27834 new_path=`$CYGPATH -u "$path"`
27840 27835
27841 27836 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27842 27837 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27843 27838 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27844 27839 # "foo.exe" is OK but "foo" is an error.
27845 27840 #
27846 27841 # This test is therefore slightly more accurate than "test -f" to check for file precense.
27847 27842 # It is also a way to make sure we got the proper file name for the real test later on.
27848 27843 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27849 27844 if test "x$test_shortpath" = x; then
27850 27845 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27851 27846 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27852 27847 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27853 27848 fi
27854 27849
27855 27850 # Call helper function which possibly converts this using DOS-style short mode.
27856 27851 # If so, the updated path is stored in $new_path.
27857 27852
27858 27853 input_path="$new_path"
27859 27854 # Check if we need to convert this using DOS-style short mode. If the path
27860 27855 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27861 27856 # take no chances and rewrite it.
27862 27857 # Note: m4 eats our [], so we need to use [ and ] instead.
27863 27858 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27864 27859 if test "x$has_forbidden_chars" != x; then
27865 27860 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27866 27861 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27867 27862 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27868 27863 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27869 27864 # Going to short mode and back again did indeed matter. Since short mode is
27870 27865 # case insensitive, let's make it lowercase to improve readability.
27871 27866 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27872 27867 # Now convert it back to Unix-style (cygpath)
27873 27868 input_path=`$CYGPATH -u "$shortmode_path"`
27874 27869 new_path="$input_path"
27875 27870 fi
27876 27871 fi
27877 27872
27878 27873 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27879 27874 if test "x$test_cygdrive_prefix" = x; then
27880 27875 # As a simple fix, exclude /usr/bin since it's not a real path.
27881 27876 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27882 27877 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27883 27878 # a path prefixed by /cygdrive for fixpath to work.
27884 27879 new_path="$CYGWIN_ROOT_PATH$input_path"
27885 27880 fi
27886 27881 fi
27887 27882
27888 27883
27889 27884 if test "x$path" != "x$new_path"; then
27890 27885 BOOT_JDK="$new_path"
27891 27886 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27892 27887 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27893 27888 fi
27894 27889
27895 27890 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27896 27891
27897 27892 path="$BOOT_JDK"
27898 27893 has_colon=`$ECHO $path | $GREP ^.:`
27899 27894 new_path="$path"
27900 27895 if test "x$has_colon" = x; then
27901 27896 # Not in mixed or Windows style, start by that.
27902 27897 new_path=`cmd //c echo $path`
27903 27898 fi
27904 27899
27905 27900
27906 27901 input_path="$new_path"
27907 27902 # Check if we need to convert this using DOS-style short mode. If the path
27908 27903 # contains just simple characters, use it. Otherwise (spaces, weird characters),
27909 27904 # take no chances and rewrite it.
27910 27905 # Note: m4 eats our [], so we need to use [ and ] instead.
27911 27906 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27912 27907 if test "x$has_forbidden_chars" != x; then
27913 27908 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27914 27909 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27915 27910 fi
27916 27911
27917 27912
27918 27913 windows_path="$new_path"
27919 27914 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27920 27915 unix_path=`$CYGPATH -u "$windows_path"`
27921 27916 new_path="$unix_path"
27922 27917 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27923 27918 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27924 27919 new_path="$unix_path"
27925 27920 fi
27926 27921
27927 27922 if test "x$path" != "x$new_path"; then
27928 27923 BOOT_JDK="$new_path"
27929 27924 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27930 27925 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27931 27926 fi
27932 27927
27933 27928 # Save the first 10 bytes of this path to the storage, so fixpath can work.
27934 27929 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27935 27930
27936 27931 else
27937 27932 # We're on a unix platform. Hooray! :)
27938 27933 path="$BOOT_JDK"
27939 27934 has_space=`$ECHO "$path" | $GREP " "`
27940 27935 if test "x$has_space" != x; then
27941 27936 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27942 27937 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27943 27938 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27944 27939 fi
27945 27940
27946 27941 # Use eval to expand a potential ~
27947 27942 eval path="$path"
27948 27943 if test ! -f "$path" && test ! -d "$path"; then
27949 27944 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27950 27945 fi
27951 27946
27952 27947 if test -d "$path"; then
27953 27948 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27954 27949 else
27955 27950 dir="`$DIRNAME "$path"`"
27956 27951 base="`$BASENAME "$path"`"
27957 27952 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27958 27953 fi
27959 27954 fi
27960 27955 fi
27961 27956
27962 27957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27963 27958 $as_echo_n "checking for Boot JDK... " >&6; }
27964 27959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27965 27960 $as_echo "$BOOT_JDK" >&6; }
27966 27961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27967 27962 $as_echo_n "checking Boot JDK version... " >&6; }
27968 27963 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
27969 27964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27970 27965 $as_echo "$BOOT_JDK_VERSION" >&6; }
27971 27966 fi # end check jdk version
27972 27967 fi # end check javac
27973 27968 fi # end check java
27974 27969 fi # end check boot jdk found
27975 27970 fi
27976 27971
27977 27972 done
27978 27973 fi
27979 27974
27980 27975 fi
27981 27976
27982 27977
27983 27978 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27984 27979 if test "x$BOOT_JDK_FOUND" = xmaybe; then
27985 27980 # Do we have a bin/java?
27986 27981 if test ! -x "$BOOT_JDK/bin/java"; then
27987 27982 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27988 27983 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27989 27984 BOOT_JDK_FOUND=no
27990 27985 else
27991 27986 # Do we have a bin/javac?
27992 27987 if test ! -x "$BOOT_JDK/bin/javac"; then
27993 27988 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27994 27989 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27995 27990 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27996 27991 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27997 27992 BOOT_JDK_FOUND=no
27998 27993 else
27999 27994 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28000 27995 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28001 27996
28002 27997 # Extra M4 quote needed to protect [] in grep expression.
28003 27998 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28004 27999 if test "x$FOUND_CORRECT_VERSION" = x; then
28005 28000 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28006 28001 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28007 28002 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28008 28003 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28009 28004 BOOT_JDK_FOUND=no
28010 28005 else
28011 28006 # We're done! :-)
28012 28007 BOOT_JDK_FOUND=yes
28013 28008
28014 28009 # Only process if variable expands to non-empty
28015 28010
28016 28011 if test "x$BOOT_JDK" != x; then
28017 28012 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28018 28013
28019 28014 # Input might be given as Windows format, start by converting to
28020 28015 # unix format.
28021 28016 path="$BOOT_JDK"
28022 28017 new_path=`$CYGPATH -u "$path"`
28023 28018
28024 28019 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28025 28020 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28026 28021 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28027 28022 # "foo.exe" is OK but "foo" is an error.
28028 28023 #
28029 28024 # This test is therefore slightly more accurate than "test -f" to check for file precense.
28030 28025 # It is also a way to make sure we got the proper file name for the real test later on.
28031 28026 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28032 28027 if test "x$test_shortpath" = x; then
28033 28028 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28034 28029 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28035 28030 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28036 28031 fi
28037 28032
28038 28033 # Call helper function which possibly converts this using DOS-style short mode.
28039 28034 # If so, the updated path is stored in $new_path.
28040 28035
28041 28036 input_path="$new_path"
28042 28037 # Check if we need to convert this using DOS-style short mode. If the path
28043 28038 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28044 28039 # take no chances and rewrite it.
28045 28040 # Note: m4 eats our [], so we need to use [ and ] instead.
28046 28041 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28047 28042 if test "x$has_forbidden_chars" != x; then
28048 28043 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28049 28044 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28050 28045 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28051 28046 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28052 28047 # Going to short mode and back again did indeed matter. Since short mode is
28053 28048 # case insensitive, let's make it lowercase to improve readability.
28054 28049 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28055 28050 # Now convert it back to Unix-style (cygpath)
28056 28051 input_path=`$CYGPATH -u "$shortmode_path"`
28057 28052 new_path="$input_path"
28058 28053 fi
28059 28054 fi
28060 28055
28061 28056 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28062 28057 if test "x$test_cygdrive_prefix" = x; then
28063 28058 # As a simple fix, exclude /usr/bin since it's not a real path.
28064 28059 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28065 28060 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28066 28061 # a path prefixed by /cygdrive for fixpath to work.
28067 28062 new_path="$CYGWIN_ROOT_PATH$input_path"
28068 28063 fi
28069 28064 fi
28070 28065
28071 28066
28072 28067 if test "x$path" != "x$new_path"; then
28073 28068 BOOT_JDK="$new_path"
28074 28069 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28075 28070 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28076 28071 fi
28077 28072
28078 28073 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28079 28074
28080 28075 path="$BOOT_JDK"
28081 28076 has_colon=`$ECHO $path | $GREP ^.:`
28082 28077 new_path="$path"
28083 28078 if test "x$has_colon" = x; then
28084 28079 # Not in mixed or Windows style, start by that.
28085 28080 new_path=`cmd //c echo $path`
28086 28081 fi
28087 28082
28088 28083
28089 28084 input_path="$new_path"
28090 28085 # Check if we need to convert this using DOS-style short mode. If the path
28091 28086 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28092 28087 # take no chances and rewrite it.
28093 28088 # Note: m4 eats our [], so we need to use [ and ] instead.
28094 28089 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28095 28090 if test "x$has_forbidden_chars" != x; then
28096 28091 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28097 28092 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28098 28093 fi
28099 28094
28100 28095
28101 28096 windows_path="$new_path"
28102 28097 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28103 28098 unix_path=`$CYGPATH -u "$windows_path"`
28104 28099 new_path="$unix_path"
28105 28100 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28106 28101 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28107 28102 new_path="$unix_path"
28108 28103 fi
28109 28104
28110 28105 if test "x$path" != "x$new_path"; then
28111 28106 BOOT_JDK="$new_path"
28112 28107 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28113 28108 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28114 28109 fi
28115 28110
28116 28111 # Save the first 10 bytes of this path to the storage, so fixpath can work.
28117 28112 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28118 28113
28119 28114 else
28120 28115 # We're on a unix platform. Hooray! :)
28121 28116 path="$BOOT_JDK"
28122 28117 has_space=`$ECHO "$path" | $GREP " "`
28123 28118 if test "x$has_space" != x; then
28124 28119 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28125 28120 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28126 28121 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28127 28122 fi
28128 28123
28129 28124 # Use eval to expand a potential ~
28130 28125 eval path="$path"
28131 28126 if test ! -f "$path" && test ! -d "$path"; then
28132 28127 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28133 28128 fi
28134 28129
28135 28130 if test -d "$path"; then
28136 28131 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28137 28132 else
28138 28133 dir="`$DIRNAME "$path"`"
28139 28134 base="`$BASENAME "$path"`"
28140 28135 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28141 28136 fi
28142 28137 fi
28143 28138 fi
28144 28139
28145 28140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28146 28141 $as_echo_n "checking for Boot JDK... " >&6; }
28147 28142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28148 28143 $as_echo "$BOOT_JDK" >&6; }
28149 28144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28150 28145 $as_echo_n "checking Boot JDK version... " >&6; }
28151 28146 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
28152 28147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28153 28148 $as_echo "$BOOT_JDK_VERSION" >&6; }
28154 28149 fi # end check jdk version
28155 28150 fi # end check javac
28156 28151 fi # end check java
28157 28152 fi # end check boot jdk found
28158 28153 fi
28159 28154
28160 28155
28161 28156 if test "x$BOOT_JDK_FOUND" = xno; then
28162 28157 # Now execute the test
28163 28158
28164 28159 BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28165 28160 BOOT_JDK_SUFFIX=""
28166 28161 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28167 28162 if test "x$ALL_JDKS_FOUND" != x; then
28168 28163 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28169 28164
28170 28165 if test "x$BOOT_JDK_FOUND" = xno; then
28171 28166 # Now execute the test
28172 28167
28173 28168 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28174 28169 if test -d "$BOOT_JDK"; then
28175 28170 BOOT_JDK_FOUND=maybe
28176 28171 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28177 28172 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28178 28173 fi
28179 28174
28180 28175
28181 28176 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28182 28177 if test "x$BOOT_JDK_FOUND" = xmaybe; then
28183 28178 # Do we have a bin/java?
28184 28179 if test ! -x "$BOOT_JDK/bin/java"; then
28185 28180 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28186 28181 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28187 28182 BOOT_JDK_FOUND=no
28188 28183 else
28189 28184 # Do we have a bin/javac?
28190 28185 if test ! -x "$BOOT_JDK/bin/javac"; then
28191 28186 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28192 28187 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28193 28188 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28194 28189 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28195 28190 BOOT_JDK_FOUND=no
28196 28191 else
28197 28192 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28198 28193 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28199 28194
28200 28195 # Extra M4 quote needed to protect [] in grep expression.
28201 28196 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28202 28197 if test "x$FOUND_CORRECT_VERSION" = x; then
28203 28198 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28204 28199 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28205 28200 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28206 28201 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28207 28202 BOOT_JDK_FOUND=no
28208 28203 else
28209 28204 # We're done! :-)
28210 28205 BOOT_JDK_FOUND=yes
28211 28206
28212 28207 # Only process if variable expands to non-empty
28213 28208
28214 28209 if test "x$BOOT_JDK" != x; then
28215 28210 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28216 28211
28217 28212 # Input might be given as Windows format, start by converting to
28218 28213 # unix format.
28219 28214 path="$BOOT_JDK"
28220 28215 new_path=`$CYGPATH -u "$path"`
28221 28216
28222 28217 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28223 28218 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28224 28219 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28225 28220 # "foo.exe" is OK but "foo" is an error.
28226 28221 #
28227 28222 # This test is therefore slightly more accurate than "test -f" to check for file precense.
28228 28223 # It is also a way to make sure we got the proper file name for the real test later on.
28229 28224 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28230 28225 if test "x$test_shortpath" = x; then
28231 28226 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28232 28227 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28233 28228 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28234 28229 fi
28235 28230
28236 28231 # Call helper function which possibly converts this using DOS-style short mode.
28237 28232 # If so, the updated path is stored in $new_path.
28238 28233
28239 28234 input_path="$new_path"
28240 28235 # Check if we need to convert this using DOS-style short mode. If the path
28241 28236 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28242 28237 # take no chances and rewrite it.
28243 28238 # Note: m4 eats our [], so we need to use [ and ] instead.
28244 28239 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28245 28240 if test "x$has_forbidden_chars" != x; then
28246 28241 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28247 28242 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28248 28243 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28249 28244 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28250 28245 # Going to short mode and back again did indeed matter. Since short mode is
28251 28246 # case insensitive, let's make it lowercase to improve readability.
28252 28247 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28253 28248 # Now convert it back to Unix-style (cygpath)
28254 28249 input_path=`$CYGPATH -u "$shortmode_path"`
28255 28250 new_path="$input_path"
28256 28251 fi
28257 28252 fi
28258 28253
28259 28254 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28260 28255 if test "x$test_cygdrive_prefix" = x; then
28261 28256 # As a simple fix, exclude /usr/bin since it's not a real path.
28262 28257 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28263 28258 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28264 28259 # a path prefixed by /cygdrive for fixpath to work.
28265 28260 new_path="$CYGWIN_ROOT_PATH$input_path"
28266 28261 fi
28267 28262 fi
28268 28263
28269 28264
28270 28265 if test "x$path" != "x$new_path"; then
28271 28266 BOOT_JDK="$new_path"
28272 28267 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28273 28268 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28274 28269 fi
28275 28270
28276 28271 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28277 28272
28278 28273 path="$BOOT_JDK"
28279 28274 has_colon=`$ECHO $path | $GREP ^.:`
28280 28275 new_path="$path"
28281 28276 if test "x$has_colon" = x; then
28282 28277 # Not in mixed or Windows style, start by that.
28283 28278 new_path=`cmd //c echo $path`
28284 28279 fi
28285 28280
28286 28281
28287 28282 input_path="$new_path"
28288 28283 # Check if we need to convert this using DOS-style short mode. If the path
28289 28284 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28290 28285 # take no chances and rewrite it.
28291 28286 # Note: m4 eats our [], so we need to use [ and ] instead.
28292 28287 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28293 28288 if test "x$has_forbidden_chars" != x; then
28294 28289 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28295 28290 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28296 28291 fi
28297 28292
28298 28293
28299 28294 windows_path="$new_path"
28300 28295 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28301 28296 unix_path=`$CYGPATH -u "$windows_path"`
28302 28297 new_path="$unix_path"
28303 28298 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28304 28299 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28305 28300 new_path="$unix_path"
28306 28301 fi
28307 28302
28308 28303 if test "x$path" != "x$new_path"; then
28309 28304 BOOT_JDK="$new_path"
28310 28305 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28311 28306 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28312 28307 fi
28313 28308
28314 28309 # Save the first 10 bytes of this path to the storage, so fixpath can work.
28315 28310 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28316 28311
28317 28312 else
28318 28313 # We're on a unix platform. Hooray! :)
28319 28314 path="$BOOT_JDK"
28320 28315 has_space=`$ECHO "$path" | $GREP " "`
28321 28316 if test "x$has_space" != x; then
28322 28317 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28323 28318 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28324 28319 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28325 28320 fi
28326 28321
28327 28322 # Use eval to expand a potential ~
28328 28323 eval path="$path"
28329 28324 if test ! -f "$path" && test ! -d "$path"; then
28330 28325 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28331 28326 fi
28332 28327
28333 28328 if test -d "$path"; then
28334 28329 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28335 28330 else
28336 28331 dir="`$DIRNAME "$path"`"
28337 28332 base="`$BASENAME "$path"`"
28338 28333 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28339 28334 fi
28340 28335 fi
28341 28336 fi
28342 28337
28343 28338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28344 28339 $as_echo_n "checking for Boot JDK... " >&6; }
28345 28340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28346 28341 $as_echo "$BOOT_JDK" >&6; }
28347 28342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28348 28343 $as_echo_n "checking Boot JDK version... " >&6; }
28349 28344 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
28350 28345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28351 28346 $as_echo "$BOOT_JDK_VERSION" >&6; }
28352 28347 fi # end check jdk version
28353 28348 fi # end check javac
28354 28349 fi # end check java
28355 28350 fi # end check boot jdk found
28356 28351 fi
28357 28352
28358 28353 done
28359 28354 fi
28360 28355
28361 28356
28362 28357 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28363 28358 if test "x$BOOT_JDK_FOUND" = xmaybe; then
28364 28359 # Do we have a bin/java?
28365 28360 if test ! -x "$BOOT_JDK/bin/java"; then
28366 28361 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28367 28362 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28368 28363 BOOT_JDK_FOUND=no
28369 28364 else
28370 28365 # Do we have a bin/javac?
28371 28366 if test ! -x "$BOOT_JDK/bin/javac"; then
28372 28367 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28373 28368 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28374 28369 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28375 28370 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28376 28371 BOOT_JDK_FOUND=no
28377 28372 else
28378 28373 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28379 28374 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28380 28375
28381 28376 # Extra M4 quote needed to protect [] in grep expression.
28382 28377 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28383 28378 if test "x$FOUND_CORRECT_VERSION" = x; then
28384 28379 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28385 28380 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28386 28381 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28387 28382 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28388 28383 BOOT_JDK_FOUND=no
28389 28384 else
28390 28385 # We're done! :-)
28391 28386 BOOT_JDK_FOUND=yes
28392 28387
28393 28388 # Only process if variable expands to non-empty
28394 28389
28395 28390 if test "x$BOOT_JDK" != x; then
28396 28391 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28397 28392
28398 28393 # Input might be given as Windows format, start by converting to
28399 28394 # unix format.
28400 28395 path="$BOOT_JDK"
28401 28396 new_path=`$CYGPATH -u "$path"`
28402 28397
28403 28398 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28404 28399 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28405 28400 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28406 28401 # "foo.exe" is OK but "foo" is an error.
28407 28402 #
28408 28403 # This test is therefore slightly more accurate than "test -f" to check for file precense.
28409 28404 # It is also a way to make sure we got the proper file name for the real test later on.
28410 28405 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28411 28406 if test "x$test_shortpath" = x; then
28412 28407 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28413 28408 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28414 28409 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28415 28410 fi
28416 28411
28417 28412 # Call helper function which possibly converts this using DOS-style short mode.
28418 28413 # If so, the updated path is stored in $new_path.
28419 28414
28420 28415 input_path="$new_path"
28421 28416 # Check if we need to convert this using DOS-style short mode. If the path
28422 28417 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28423 28418 # take no chances and rewrite it.
28424 28419 # Note: m4 eats our [], so we need to use [ and ] instead.
28425 28420 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28426 28421 if test "x$has_forbidden_chars" != x; then
28427 28422 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28428 28423 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28429 28424 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28430 28425 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28431 28426 # Going to short mode and back again did indeed matter. Since short mode is
28432 28427 # case insensitive, let's make it lowercase to improve readability.
28433 28428 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28434 28429 # Now convert it back to Unix-style (cygpath)
28435 28430 input_path=`$CYGPATH -u "$shortmode_path"`
28436 28431 new_path="$input_path"
28437 28432 fi
28438 28433 fi
28439 28434
28440 28435 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28441 28436 if test "x$test_cygdrive_prefix" = x; then
28442 28437 # As a simple fix, exclude /usr/bin since it's not a real path.
28443 28438 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28444 28439 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28445 28440 # a path prefixed by /cygdrive for fixpath to work.
28446 28441 new_path="$CYGWIN_ROOT_PATH$input_path"
28447 28442 fi
28448 28443 fi
28449 28444
28450 28445
28451 28446 if test "x$path" != "x$new_path"; then
28452 28447 BOOT_JDK="$new_path"
28453 28448 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28454 28449 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28455 28450 fi
28456 28451
28457 28452 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28458 28453
28459 28454 path="$BOOT_JDK"
28460 28455 has_colon=`$ECHO $path | $GREP ^.:`
28461 28456 new_path="$path"
28462 28457 if test "x$has_colon" = x; then
28463 28458 # Not in mixed or Windows style, start by that.
28464 28459 new_path=`cmd //c echo $path`
28465 28460 fi
28466 28461
28467 28462
28468 28463 input_path="$new_path"
28469 28464 # Check if we need to convert this using DOS-style short mode. If the path
28470 28465 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28471 28466 # take no chances and rewrite it.
28472 28467 # Note: m4 eats our [], so we need to use [ and ] instead.
28473 28468 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28474 28469 if test "x$has_forbidden_chars" != x; then
28475 28470 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28476 28471 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28477 28472 fi
28478 28473
28479 28474
28480 28475 windows_path="$new_path"
28481 28476 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28482 28477 unix_path=`$CYGPATH -u "$windows_path"`
28483 28478 new_path="$unix_path"
28484 28479 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28485 28480 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28486 28481 new_path="$unix_path"
28487 28482 fi
28488 28483
28489 28484 if test "x$path" != "x$new_path"; then
28490 28485 BOOT_JDK="$new_path"
28491 28486 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28492 28487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28493 28488 fi
28494 28489
28495 28490 # Save the first 10 bytes of this path to the storage, so fixpath can work.
28496 28491 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28497 28492
28498 28493 else
28499 28494 # We're on a unix platform. Hooray! :)
28500 28495 path="$BOOT_JDK"
28501 28496 has_space=`$ECHO "$path" | $GREP " "`
28502 28497 if test "x$has_space" != x; then
28503 28498 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28504 28499 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28505 28500 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28506 28501 fi
28507 28502
28508 28503 # Use eval to expand a potential ~
28509 28504 eval path="$path"
28510 28505 if test ! -f "$path" && test ! -d "$path"; then
28511 28506 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28512 28507 fi
28513 28508
28514 28509 if test -d "$path"; then
28515 28510 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28516 28511 else
28517 28512 dir="`$DIRNAME "$path"`"
28518 28513 base="`$BASENAME "$path"`"
28519 28514 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28520 28515 fi
28521 28516 fi
28522 28517 fi
28523 28518
28524 28519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28525 28520 $as_echo_n "checking for Boot JDK... " >&6; }
28526 28521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28527 28522 $as_echo "$BOOT_JDK" >&6; }
28528 28523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28529 28524 $as_echo_n "checking Boot JDK version... " >&6; }
28530 28525 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
28531 28526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28532 28527 $as_echo "$BOOT_JDK_VERSION" >&6; }
28533 28528 fi # end check jdk version
28534 28529 fi # end check javac
28535 28530 fi # end check java
28536 28531 fi # end check boot jdk found
28537 28532 fi
28538 28533
28539 28534 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28540 28535
28541 28536 if test "x$BOOT_JDK_FOUND" = xno; then
28542 28537 # Now execute the test
28543 28538
28544 28539 BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28545 28540 BOOT_JDK_SUFFIX="/Contents/Home"
28546 28541 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28547 28542 if test "x$ALL_JDKS_FOUND" != x; then
28548 28543 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28549 28544
28550 28545 if test "x$BOOT_JDK_FOUND" = xno; then
28551 28546 # Now execute the test
28552 28547
28553 28548 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28554 28549 if test -d "$BOOT_JDK"; then
28555 28550 BOOT_JDK_FOUND=maybe
28556 28551 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28557 28552 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28558 28553 fi
28559 28554
28560 28555
28561 28556 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28562 28557 if test "x$BOOT_JDK_FOUND" = xmaybe; then
28563 28558 # Do we have a bin/java?
28564 28559 if test ! -x "$BOOT_JDK/bin/java"; then
28565 28560 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28566 28561 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28567 28562 BOOT_JDK_FOUND=no
28568 28563 else
28569 28564 # Do we have a bin/javac?
28570 28565 if test ! -x "$BOOT_JDK/bin/javac"; then
28571 28566 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28572 28567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28573 28568 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28574 28569 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28575 28570 BOOT_JDK_FOUND=no
28576 28571 else
28577 28572 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28578 28573 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28579 28574
28580 28575 # Extra M4 quote needed to protect [] in grep expression.
28581 28576 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28582 28577 if test "x$FOUND_CORRECT_VERSION" = x; then
28583 28578 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28584 28579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28585 28580 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28586 28581 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28587 28582 BOOT_JDK_FOUND=no
28588 28583 else
28589 28584 # We're done! :-)
28590 28585 BOOT_JDK_FOUND=yes
28591 28586
28592 28587 # Only process if variable expands to non-empty
28593 28588
28594 28589 if test "x$BOOT_JDK" != x; then
28595 28590 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28596 28591
28597 28592 # Input might be given as Windows format, start by converting to
28598 28593 # unix format.
28599 28594 path="$BOOT_JDK"
28600 28595 new_path=`$CYGPATH -u "$path"`
28601 28596
28602 28597 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28603 28598 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28604 28599 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28605 28600 # "foo.exe" is OK but "foo" is an error.
28606 28601 #
28607 28602 # This test is therefore slightly more accurate than "test -f" to check for file precense.
28608 28603 # It is also a way to make sure we got the proper file name for the real test later on.
28609 28604 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28610 28605 if test "x$test_shortpath" = x; then
28611 28606 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28612 28607 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28613 28608 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28614 28609 fi
28615 28610
28616 28611 # Call helper function which possibly converts this using DOS-style short mode.
28617 28612 # If so, the updated path is stored in $new_path.
28618 28613
28619 28614 input_path="$new_path"
28620 28615 # Check if we need to convert this using DOS-style short mode. If the path
28621 28616 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28622 28617 # take no chances and rewrite it.
28623 28618 # Note: m4 eats our [], so we need to use [ and ] instead.
28624 28619 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28625 28620 if test "x$has_forbidden_chars" != x; then
28626 28621 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28627 28622 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28628 28623 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28629 28624 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28630 28625 # Going to short mode and back again did indeed matter. Since short mode is
28631 28626 # case insensitive, let's make it lowercase to improve readability.
28632 28627 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28633 28628 # Now convert it back to Unix-style (cygpath)
28634 28629 input_path=`$CYGPATH -u "$shortmode_path"`
28635 28630 new_path="$input_path"
28636 28631 fi
28637 28632 fi
28638 28633
28639 28634 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28640 28635 if test "x$test_cygdrive_prefix" = x; then
28641 28636 # As a simple fix, exclude /usr/bin since it's not a real path.
28642 28637 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28643 28638 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28644 28639 # a path prefixed by /cygdrive for fixpath to work.
28645 28640 new_path="$CYGWIN_ROOT_PATH$input_path"
28646 28641 fi
28647 28642 fi
28648 28643
28649 28644
28650 28645 if test "x$path" != "x$new_path"; then
28651 28646 BOOT_JDK="$new_path"
28652 28647 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28653 28648 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28654 28649 fi
28655 28650
28656 28651 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28657 28652
28658 28653 path="$BOOT_JDK"
28659 28654 has_colon=`$ECHO $path | $GREP ^.:`
28660 28655 new_path="$path"
28661 28656 if test "x$has_colon" = x; then
28662 28657 # Not in mixed or Windows style, start by that.
28663 28658 new_path=`cmd //c echo $path`
28664 28659 fi
28665 28660
28666 28661
28667 28662 input_path="$new_path"
28668 28663 # Check if we need to convert this using DOS-style short mode. If the path
28669 28664 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28670 28665 # take no chances and rewrite it.
28671 28666 # Note: m4 eats our [], so we need to use [ and ] instead.
28672 28667 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28673 28668 if test "x$has_forbidden_chars" != x; then
28674 28669 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28675 28670 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28676 28671 fi
28677 28672
28678 28673
28679 28674 windows_path="$new_path"
28680 28675 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28681 28676 unix_path=`$CYGPATH -u "$windows_path"`
28682 28677 new_path="$unix_path"
28683 28678 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28684 28679 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28685 28680 new_path="$unix_path"
28686 28681 fi
28687 28682
28688 28683 if test "x$path" != "x$new_path"; then
28689 28684 BOOT_JDK="$new_path"
28690 28685 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28691 28686 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28692 28687 fi
28693 28688
28694 28689 # Save the first 10 bytes of this path to the storage, so fixpath can work.
28695 28690 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28696 28691
28697 28692 else
28698 28693 # We're on a unix platform. Hooray! :)
28699 28694 path="$BOOT_JDK"
28700 28695 has_space=`$ECHO "$path" | $GREP " "`
28701 28696 if test "x$has_space" != x; then
28702 28697 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28703 28698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28704 28699 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28705 28700 fi
28706 28701
28707 28702 # Use eval to expand a potential ~
28708 28703 eval path="$path"
28709 28704 if test ! -f "$path" && test ! -d "$path"; then
28710 28705 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28711 28706 fi
28712 28707
28713 28708 if test -d "$path"; then
28714 28709 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28715 28710 else
28716 28711 dir="`$DIRNAME "$path"`"
28717 28712 base="`$BASENAME "$path"`"
28718 28713 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28719 28714 fi
28720 28715 fi
28721 28716 fi
28722 28717
28723 28718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28724 28719 $as_echo_n "checking for Boot JDK... " >&6; }
28725 28720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28726 28721 $as_echo "$BOOT_JDK" >&6; }
28727 28722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28728 28723 $as_echo_n "checking Boot JDK version... " >&6; }
28729 28724 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
28730 28725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28731 28726 $as_echo "$BOOT_JDK_VERSION" >&6; }
28732 28727 fi # end check jdk version
28733 28728 fi # end check javac
28734 28729 fi # end check java
28735 28730 fi # end check boot jdk found
28736 28731 fi
28737 28732
28738 28733 done
28739 28734 fi
28740 28735
28741 28736
28742 28737 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28743 28738 if test "x$BOOT_JDK_FOUND" = xmaybe; then
28744 28739 # Do we have a bin/java?
28745 28740 if test ! -x "$BOOT_JDK/bin/java"; then
28746 28741 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28747 28742 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28748 28743 BOOT_JDK_FOUND=no
28749 28744 else
28750 28745 # Do we have a bin/javac?
28751 28746 if test ! -x "$BOOT_JDK/bin/javac"; then
28752 28747 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28753 28748 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28754 28749 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28755 28750 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28756 28751 BOOT_JDK_FOUND=no
28757 28752 else
28758 28753 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28759 28754 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28760 28755
28761 28756 # Extra M4 quote needed to protect [] in grep expression.
28762 28757 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28763 28758 if test "x$FOUND_CORRECT_VERSION" = x; then
28764 28759 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28765 28760 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28766 28761 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28767 28762 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28768 28763 BOOT_JDK_FOUND=no
28769 28764 else
28770 28765 # We're done! :-)
28771 28766 BOOT_JDK_FOUND=yes
28772 28767
28773 28768 # Only process if variable expands to non-empty
28774 28769
28775 28770 if test "x$BOOT_JDK" != x; then
28776 28771 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28777 28772
28778 28773 # Input might be given as Windows format, start by converting to
28779 28774 # unix format.
28780 28775 path="$BOOT_JDK"
28781 28776 new_path=`$CYGPATH -u "$path"`
28782 28777
28783 28778 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28784 28779 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28785 28780 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28786 28781 # "foo.exe" is OK but "foo" is an error.
28787 28782 #
28788 28783 # This test is therefore slightly more accurate than "test -f" to check for file precense.
28789 28784 # It is also a way to make sure we got the proper file name for the real test later on.
28790 28785 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28791 28786 if test "x$test_shortpath" = x; then
28792 28787 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28793 28788 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28794 28789 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28795 28790 fi
28796 28791
28797 28792 # Call helper function which possibly converts this using DOS-style short mode.
28798 28793 # If so, the updated path is stored in $new_path.
28799 28794
28800 28795 input_path="$new_path"
28801 28796 # Check if we need to convert this using DOS-style short mode. If the path
28802 28797 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28803 28798 # take no chances and rewrite it.
28804 28799 # Note: m4 eats our [], so we need to use [ and ] instead.
28805 28800 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28806 28801 if test "x$has_forbidden_chars" != x; then
28807 28802 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28808 28803 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28809 28804 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28810 28805 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28811 28806 # Going to short mode and back again did indeed matter. Since short mode is
28812 28807 # case insensitive, let's make it lowercase to improve readability.
28813 28808 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28814 28809 # Now convert it back to Unix-style (cygpath)
28815 28810 input_path=`$CYGPATH -u "$shortmode_path"`
28816 28811 new_path="$input_path"
28817 28812 fi
28818 28813 fi
28819 28814
28820 28815 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28821 28816 if test "x$test_cygdrive_prefix" = x; then
28822 28817 # As a simple fix, exclude /usr/bin since it's not a real path.
28823 28818 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28824 28819 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28825 28820 # a path prefixed by /cygdrive for fixpath to work.
28826 28821 new_path="$CYGWIN_ROOT_PATH$input_path"
28827 28822 fi
28828 28823 fi
28829 28824
28830 28825
28831 28826 if test "x$path" != "x$new_path"; then
28832 28827 BOOT_JDK="$new_path"
28833 28828 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28834 28829 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28835 28830 fi
28836 28831
28837 28832 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28838 28833
28839 28834 path="$BOOT_JDK"
28840 28835 has_colon=`$ECHO $path | $GREP ^.:`
28841 28836 new_path="$path"
28842 28837 if test "x$has_colon" = x; then
28843 28838 # Not in mixed or Windows style, start by that.
28844 28839 new_path=`cmd //c echo $path`
28845 28840 fi
28846 28841
28847 28842
28848 28843 input_path="$new_path"
28849 28844 # Check if we need to convert this using DOS-style short mode. If the path
28850 28845 # contains just simple characters, use it. Otherwise (spaces, weird characters),
28851 28846 # take no chances and rewrite it.
28852 28847 # Note: m4 eats our [], so we need to use [ and ] instead.
28853 28848 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28854 28849 if test "x$has_forbidden_chars" != x; then
28855 28850 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28856 28851 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28857 28852 fi
28858 28853
28859 28854
28860 28855 windows_path="$new_path"
28861 28856 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28862 28857 unix_path=`$CYGPATH -u "$windows_path"`
28863 28858 new_path="$unix_path"
28864 28859 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28865 28860 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28866 28861 new_path="$unix_path"
28867 28862 fi
28868 28863
28869 28864 if test "x$path" != "x$new_path"; then
28870 28865 BOOT_JDK="$new_path"
28871 28866 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28872 28867 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28873 28868 fi
28874 28869
28875 28870 # Save the first 10 bytes of this path to the storage, so fixpath can work.
28876 28871 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28877 28872
28878 28873 else
28879 28874 # We're on a unix platform. Hooray! :)
28880 28875 path="$BOOT_JDK"
28881 28876 has_space=`$ECHO "$path" | $GREP " "`
28882 28877 if test "x$has_space" != x; then
28883 28878 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28884 28879 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28885 28880 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28886 28881 fi
28887 28882
28888 28883 # Use eval to expand a potential ~
28889 28884 eval path="$path"
28890 28885 if test ! -f "$path" && test ! -d "$path"; then
28891 28886 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28892 28887 fi
28893 28888
28894 28889 if test -d "$path"; then
28895 28890 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28896 28891 else
28897 28892 dir="`$DIRNAME "$path"`"
28898 28893 base="`$BASENAME "$path"`"
28899 28894 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28900 28895 fi
28901 28896 fi
28902 28897 fi
28903 28898
28904 28899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28905 28900 $as_echo_n "checking for Boot JDK... " >&6; }
28906 28901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28907 28902 $as_echo "$BOOT_JDK" >&6; }
28908 28903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28909 28904 $as_echo_n "checking Boot JDK version... " >&6; }
28910 28905 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
28911 28906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28912 28907 $as_echo "$BOOT_JDK_VERSION" >&6; }
28913 28908 fi # end check jdk version
28914 28909 fi # end check javac
28915 28910 fi # end check java
28916 28911 fi # end check boot jdk found
28917 28912 fi
28918 28913
28919 28914
28920 28915 if test "x$BOOT_JDK_FOUND" = xno; then
28921 28916 # Now execute the test
28922 28917
28923 28918 BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28924 28919 BOOT_JDK_SUFFIX="/Contents/Home"
28925 28920 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28926 28921 if test "x$ALL_JDKS_FOUND" != x; then
28927 28922 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28928 28923
28929 28924 if test "x$BOOT_JDK_FOUND" = xno; then
28930 28925 # Now execute the test
28931 28926
28932 28927 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28933 28928 if test -d "$BOOT_JDK"; then
28934 28929 BOOT_JDK_FOUND=maybe
28935 28930 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28936 28931 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28937 28932 fi
28938 28933
28939 28934
28940 28935 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28941 28936 if test "x$BOOT_JDK_FOUND" = xmaybe; then
28942 28937 # Do we have a bin/java?
28943 28938 if test ! -x "$BOOT_JDK/bin/java"; then
28944 28939 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28945 28940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28946 28941 BOOT_JDK_FOUND=no
28947 28942 else
28948 28943 # Do we have a bin/javac?
28949 28944 if test ! -x "$BOOT_JDK/bin/javac"; then
28950 28945 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28951 28946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28952 28947 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28953 28948 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28954 28949 BOOT_JDK_FOUND=no
28955 28950 else
28956 28951 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28957 28952 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28958 28953
28959 28954 # Extra M4 quote needed to protect [] in grep expression.
28960 28955 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28961 28956 if test "x$FOUND_CORRECT_VERSION" = x; then
28962 28957 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28963 28958 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28964 28959 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28965 28960 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28966 28961 BOOT_JDK_FOUND=no
28967 28962 else
28968 28963 # We're done! :-)
28969 28964 BOOT_JDK_FOUND=yes
28970 28965
28971 28966 # Only process if variable expands to non-empty
28972 28967
28973 28968 if test "x$BOOT_JDK" != x; then
28974 28969 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28975 28970
28976 28971 # Input might be given as Windows format, start by converting to
28977 28972 # unix format.
28978 28973 path="$BOOT_JDK"
28979 28974 new_path=`$CYGPATH -u "$path"`
28980 28975
28981 28976 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28982 28977 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28983 28978 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28984 28979 # "foo.exe" is OK but "foo" is an error.
28985 28980 #
28986 28981 # This test is therefore slightly more accurate than "test -f" to check for file precense.
28987 28982 # It is also a way to make sure we got the proper file name for the real test later on.
28988 28983 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28989 28984 if test "x$test_shortpath" = x; then
28990 28985 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28991 28986 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28992 28987 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28993 28988 fi
28994 28989
28995 28990 # Call helper function which possibly converts this using DOS-style short mode.
28996 28991 # If so, the updated path is stored in $new_path.
28997 28992
28998 28993 input_path="$new_path"
28999 28994 # Check if we need to convert this using DOS-style short mode. If the path
29000 28995 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29001 28996 # take no chances and rewrite it.
29002 28997 # Note: m4 eats our [], so we need to use [ and ] instead.
29003 28998 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29004 28999 if test "x$has_forbidden_chars" != x; then
29005 29000 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29006 29001 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29007 29002 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29008 29003 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29009 29004 # Going to short mode and back again did indeed matter. Since short mode is
29010 29005 # case insensitive, let's make it lowercase to improve readability.
29011 29006 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29012 29007 # Now convert it back to Unix-style (cygpath)
29013 29008 input_path=`$CYGPATH -u "$shortmode_path"`
29014 29009 new_path="$input_path"
29015 29010 fi
29016 29011 fi
29017 29012
29018 29013 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29019 29014 if test "x$test_cygdrive_prefix" = x; then
29020 29015 # As a simple fix, exclude /usr/bin since it's not a real path.
29021 29016 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29022 29017 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29023 29018 # a path prefixed by /cygdrive for fixpath to work.
29024 29019 new_path="$CYGWIN_ROOT_PATH$input_path"
29025 29020 fi
29026 29021 fi
29027 29022
29028 29023
29029 29024 if test "x$path" != "x$new_path"; then
29030 29025 BOOT_JDK="$new_path"
29031 29026 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29032 29027 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29033 29028 fi
29034 29029
29035 29030 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29036 29031
29037 29032 path="$BOOT_JDK"
29038 29033 has_colon=`$ECHO $path | $GREP ^.:`
29039 29034 new_path="$path"
29040 29035 if test "x$has_colon" = x; then
29041 29036 # Not in mixed or Windows style, start by that.
29042 29037 new_path=`cmd //c echo $path`
29043 29038 fi
29044 29039
29045 29040
29046 29041 input_path="$new_path"
29047 29042 # Check if we need to convert this using DOS-style short mode. If the path
29048 29043 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29049 29044 # take no chances and rewrite it.
29050 29045 # Note: m4 eats our [], so we need to use [ and ] instead.
29051 29046 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29052 29047 if test "x$has_forbidden_chars" != x; then
29053 29048 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29054 29049 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29055 29050 fi
29056 29051
29057 29052
29058 29053 windows_path="$new_path"
29059 29054 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29060 29055 unix_path=`$CYGPATH -u "$windows_path"`
29061 29056 new_path="$unix_path"
29062 29057 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29063 29058 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29064 29059 new_path="$unix_path"
29065 29060 fi
29066 29061
29067 29062 if test "x$path" != "x$new_path"; then
29068 29063 BOOT_JDK="$new_path"
29069 29064 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29070 29065 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29071 29066 fi
29072 29067
29073 29068 # Save the first 10 bytes of this path to the storage, so fixpath can work.
29074 29069 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29075 29070
29076 29071 else
29077 29072 # We're on a unix platform. Hooray! :)
29078 29073 path="$BOOT_JDK"
29079 29074 has_space=`$ECHO "$path" | $GREP " "`
29080 29075 if test "x$has_space" != x; then
29081 29076 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29082 29077 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29083 29078 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29084 29079 fi
29085 29080
29086 29081 # Use eval to expand a potential ~
29087 29082 eval path="$path"
29088 29083 if test ! -f "$path" && test ! -d "$path"; then
29089 29084 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29090 29085 fi
29091 29086
29092 29087 if test -d "$path"; then
29093 29088 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29094 29089 else
29095 29090 dir="`$DIRNAME "$path"`"
29096 29091 base="`$BASENAME "$path"`"
29097 29092 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29098 29093 fi
29099 29094 fi
29100 29095 fi
29101 29096
29102 29097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29103 29098 $as_echo_n "checking for Boot JDK... " >&6; }
29104 29099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29105 29100 $as_echo "$BOOT_JDK" >&6; }
29106 29101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29107 29102 $as_echo_n "checking Boot JDK version... " >&6; }
29108 29103 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
29109 29104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29110 29105 $as_echo "$BOOT_JDK_VERSION" >&6; }
29111 29106 fi # end check jdk version
29112 29107 fi # end check javac
29113 29108 fi # end check java
29114 29109 fi # end check boot jdk found
29115 29110 fi
29116 29111
29117 29112 done
29118 29113 fi
29119 29114
29120 29115
29121 29116 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29122 29117 if test "x$BOOT_JDK_FOUND" = xmaybe; then
29123 29118 # Do we have a bin/java?
29124 29119 if test ! -x "$BOOT_JDK/bin/java"; then
29125 29120 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29126 29121 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29127 29122 BOOT_JDK_FOUND=no
29128 29123 else
29129 29124 # Do we have a bin/javac?
29130 29125 if test ! -x "$BOOT_JDK/bin/javac"; then
29131 29126 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29132 29127 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29133 29128 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29134 29129 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29135 29130 BOOT_JDK_FOUND=no
29136 29131 else
29137 29132 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29138 29133 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29139 29134
29140 29135 # Extra M4 quote needed to protect [] in grep expression.
29141 29136 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29142 29137 if test "x$FOUND_CORRECT_VERSION" = x; then
29143 29138 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29144 29139 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29145 29140 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29146 29141 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29147 29142 BOOT_JDK_FOUND=no
29148 29143 else
29149 29144 # We're done! :-)
29150 29145 BOOT_JDK_FOUND=yes
29151 29146
29152 29147 # Only process if variable expands to non-empty
29153 29148
29154 29149 if test "x$BOOT_JDK" != x; then
29155 29150 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29156 29151
29157 29152 # Input might be given as Windows format, start by converting to
29158 29153 # unix format.
29159 29154 path="$BOOT_JDK"
29160 29155 new_path=`$CYGPATH -u "$path"`
29161 29156
29162 29157 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29163 29158 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29164 29159 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29165 29160 # "foo.exe" is OK but "foo" is an error.
29166 29161 #
29167 29162 # This test is therefore slightly more accurate than "test -f" to check for file precense.
29168 29163 # It is also a way to make sure we got the proper file name for the real test later on.
29169 29164 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29170 29165 if test "x$test_shortpath" = x; then
29171 29166 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29172 29167 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29173 29168 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29174 29169 fi
29175 29170
29176 29171 # Call helper function which possibly converts this using DOS-style short mode.
29177 29172 # If so, the updated path is stored in $new_path.
29178 29173
29179 29174 input_path="$new_path"
29180 29175 # Check if we need to convert this using DOS-style short mode. If the path
29181 29176 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29182 29177 # take no chances and rewrite it.
29183 29178 # Note: m4 eats our [], so we need to use [ and ] instead.
29184 29179 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29185 29180 if test "x$has_forbidden_chars" != x; then
29186 29181 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29187 29182 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29188 29183 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29189 29184 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29190 29185 # Going to short mode and back again did indeed matter. Since short mode is
29191 29186 # case insensitive, let's make it lowercase to improve readability.
29192 29187 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29193 29188 # Now convert it back to Unix-style (cygpath)
29194 29189 input_path=`$CYGPATH -u "$shortmode_path"`
29195 29190 new_path="$input_path"
29196 29191 fi
29197 29192 fi
29198 29193
29199 29194 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29200 29195 if test "x$test_cygdrive_prefix" = x; then
29201 29196 # As a simple fix, exclude /usr/bin since it's not a real path.
29202 29197 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29203 29198 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29204 29199 # a path prefixed by /cygdrive for fixpath to work.
29205 29200 new_path="$CYGWIN_ROOT_PATH$input_path"
29206 29201 fi
29207 29202 fi
29208 29203
29209 29204
29210 29205 if test "x$path" != "x$new_path"; then
29211 29206 BOOT_JDK="$new_path"
29212 29207 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29213 29208 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29214 29209 fi
29215 29210
29216 29211 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29217 29212
29218 29213 path="$BOOT_JDK"
29219 29214 has_colon=`$ECHO $path | $GREP ^.:`
29220 29215 new_path="$path"
29221 29216 if test "x$has_colon" = x; then
29222 29217 # Not in mixed or Windows style, start by that.
29223 29218 new_path=`cmd //c echo $path`
29224 29219 fi
29225 29220
29226 29221
29227 29222 input_path="$new_path"
29228 29223 # Check if we need to convert this using DOS-style short mode. If the path
29229 29224 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29230 29225 # take no chances and rewrite it.
29231 29226 # Note: m4 eats our [], so we need to use [ and ] instead.
29232 29227 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29233 29228 if test "x$has_forbidden_chars" != x; then
29234 29229 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29235 29230 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29236 29231 fi
29237 29232
29238 29233
29239 29234 windows_path="$new_path"
29240 29235 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29241 29236 unix_path=`$CYGPATH -u "$windows_path"`
29242 29237 new_path="$unix_path"
29243 29238 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29244 29239 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29245 29240 new_path="$unix_path"
29246 29241 fi
29247 29242
29248 29243 if test "x$path" != "x$new_path"; then
29249 29244 BOOT_JDK="$new_path"
29250 29245 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29251 29246 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29252 29247 fi
29253 29248
29254 29249 # Save the first 10 bytes of this path to the storage, so fixpath can work.
29255 29250 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29256 29251
29257 29252 else
29258 29253 # We're on a unix platform. Hooray! :)
29259 29254 path="$BOOT_JDK"
29260 29255 has_space=`$ECHO "$path" | $GREP " "`
29261 29256 if test "x$has_space" != x; then
29262 29257 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29263 29258 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29264 29259 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29265 29260 fi
29266 29261
29267 29262 # Use eval to expand a potential ~
29268 29263 eval path="$path"
29269 29264 if test ! -f "$path" && test ! -d "$path"; then
29270 29265 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29271 29266 fi
29272 29267
29273 29268 if test -d "$path"; then
29274 29269 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29275 29270 else
29276 29271 dir="`$DIRNAME "$path"`"
29277 29272 base="`$BASENAME "$path"`"
29278 29273 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29279 29274 fi
29280 29275 fi
29281 29276 fi
29282 29277
29283 29278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29284 29279 $as_echo_n "checking for Boot JDK... " >&6; }
29285 29280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29286 29281 $as_echo "$BOOT_JDK" >&6; }
29287 29282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29288 29283 $as_echo_n "checking Boot JDK version... " >&6; }
29289 29284 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
29290 29285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29291 29286 $as_echo "$BOOT_JDK_VERSION" >&6; }
29292 29287 fi # end check jdk version
29293 29288 fi # end check javac
29294 29289 fi # end check java
29295 29290 fi # end check boot jdk found
29296 29291 fi
29297 29292
29298 29293 elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29299 29294
29300 29295 if test "x$BOOT_JDK_FOUND" = xno; then
29301 29296 # Now execute the test
29302 29297
29303 29298 BOOT_JDK_PREFIX="/usr/lib/jvm"
29304 29299 BOOT_JDK_SUFFIX=""
29305 29300 ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29306 29301 if test "x$ALL_JDKS_FOUND" != x; then
29307 29302 for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29308 29303
29309 29304 if test "x$BOOT_JDK_FOUND" = xno; then
29310 29305 # Now execute the test
29311 29306
29312 29307 BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29313 29308 if test -d "$BOOT_JDK"; then
29314 29309 BOOT_JDK_FOUND=maybe
29315 29310 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29316 29311 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29317 29312 fi
29318 29313
29319 29314
29320 29315 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29321 29316 if test "x$BOOT_JDK_FOUND" = xmaybe; then
29322 29317 # Do we have a bin/java?
29323 29318 if test ! -x "$BOOT_JDK/bin/java"; then
29324 29319 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29325 29320 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29326 29321 BOOT_JDK_FOUND=no
29327 29322 else
29328 29323 # Do we have a bin/javac?
29329 29324 if test ! -x "$BOOT_JDK/bin/javac"; then
29330 29325 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29331 29326 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29332 29327 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29333 29328 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29334 29329 BOOT_JDK_FOUND=no
29335 29330 else
29336 29331 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29337 29332 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29338 29333
29339 29334 # Extra M4 quote needed to protect [] in grep expression.
29340 29335 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29341 29336 if test "x$FOUND_CORRECT_VERSION" = x; then
29342 29337 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29343 29338 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29344 29339 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29345 29340 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29346 29341 BOOT_JDK_FOUND=no
29347 29342 else
29348 29343 # We're done! :-)
29349 29344 BOOT_JDK_FOUND=yes
29350 29345
29351 29346 # Only process if variable expands to non-empty
29352 29347
29353 29348 if test "x$BOOT_JDK" != x; then
29354 29349 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29355 29350
29356 29351 # Input might be given as Windows format, start by converting to
29357 29352 # unix format.
29358 29353 path="$BOOT_JDK"
29359 29354 new_path=`$CYGPATH -u "$path"`
29360 29355
29361 29356 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29362 29357 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29363 29358 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29364 29359 # "foo.exe" is OK but "foo" is an error.
29365 29360 #
29366 29361 # This test is therefore slightly more accurate than "test -f" to check for file precense.
29367 29362 # It is also a way to make sure we got the proper file name for the real test later on.
29368 29363 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29369 29364 if test "x$test_shortpath" = x; then
29370 29365 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29371 29366 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29372 29367 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29373 29368 fi
29374 29369
29375 29370 # Call helper function which possibly converts this using DOS-style short mode.
29376 29371 # If so, the updated path is stored in $new_path.
29377 29372
29378 29373 input_path="$new_path"
29379 29374 # Check if we need to convert this using DOS-style short mode. If the path
29380 29375 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29381 29376 # take no chances and rewrite it.
29382 29377 # Note: m4 eats our [], so we need to use [ and ] instead.
29383 29378 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29384 29379 if test "x$has_forbidden_chars" != x; then
29385 29380 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29386 29381 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29387 29382 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29388 29383 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29389 29384 # Going to short mode and back again did indeed matter. Since short mode is
29390 29385 # case insensitive, let's make it lowercase to improve readability.
29391 29386 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29392 29387 # Now convert it back to Unix-style (cygpath)
29393 29388 input_path=`$CYGPATH -u "$shortmode_path"`
29394 29389 new_path="$input_path"
29395 29390 fi
29396 29391 fi
29397 29392
29398 29393 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29399 29394 if test "x$test_cygdrive_prefix" = x; then
29400 29395 # As a simple fix, exclude /usr/bin since it's not a real path.
29401 29396 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29402 29397 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29403 29398 # a path prefixed by /cygdrive for fixpath to work.
29404 29399 new_path="$CYGWIN_ROOT_PATH$input_path"
29405 29400 fi
29406 29401 fi
29407 29402
29408 29403
29409 29404 if test "x$path" != "x$new_path"; then
29410 29405 BOOT_JDK="$new_path"
29411 29406 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29412 29407 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29413 29408 fi
29414 29409
29415 29410 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29416 29411
29417 29412 path="$BOOT_JDK"
29418 29413 has_colon=`$ECHO $path | $GREP ^.:`
29419 29414 new_path="$path"
29420 29415 if test "x$has_colon" = x; then
29421 29416 # Not in mixed or Windows style, start by that.
29422 29417 new_path=`cmd //c echo $path`
29423 29418 fi
29424 29419
29425 29420
29426 29421 input_path="$new_path"
29427 29422 # Check if we need to convert this using DOS-style short mode. If the path
29428 29423 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29429 29424 # take no chances and rewrite it.
29430 29425 # Note: m4 eats our [], so we need to use [ and ] instead.
29431 29426 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29432 29427 if test "x$has_forbidden_chars" != x; then
29433 29428 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29434 29429 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29435 29430 fi
29436 29431
29437 29432
29438 29433 windows_path="$new_path"
29439 29434 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29440 29435 unix_path=`$CYGPATH -u "$windows_path"`
29441 29436 new_path="$unix_path"
29442 29437 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29443 29438 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29444 29439 new_path="$unix_path"
29445 29440 fi
29446 29441
29447 29442 if test "x$path" != "x$new_path"; then
29448 29443 BOOT_JDK="$new_path"
29449 29444 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29450 29445 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29451 29446 fi
29452 29447
29453 29448 # Save the first 10 bytes of this path to the storage, so fixpath can work.
29454 29449 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29455 29450
29456 29451 else
29457 29452 # We're on a unix platform. Hooray! :)
29458 29453 path="$BOOT_JDK"
29459 29454 has_space=`$ECHO "$path" | $GREP " "`
29460 29455 if test "x$has_space" != x; then
29461 29456 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29462 29457 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29463 29458 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29464 29459 fi
29465 29460
29466 29461 # Use eval to expand a potential ~
29467 29462 eval path="$path"
29468 29463 if test ! -f "$path" && test ! -d "$path"; then
29469 29464 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29470 29465 fi
29471 29466
29472 29467 if test -d "$path"; then
29473 29468 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29474 29469 else
29475 29470 dir="`$DIRNAME "$path"`"
29476 29471 base="`$BASENAME "$path"`"
29477 29472 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29478 29473 fi
29479 29474 fi
29480 29475 fi
29481 29476
29482 29477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29483 29478 $as_echo_n "checking for Boot JDK... " >&6; }
29484 29479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29485 29480 $as_echo "$BOOT_JDK" >&6; }
29486 29481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29487 29482 $as_echo_n "checking Boot JDK version... " >&6; }
29488 29483 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
29489 29484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29490 29485 $as_echo "$BOOT_JDK_VERSION" >&6; }
29491 29486 fi # end check jdk version
29492 29487 fi # end check javac
29493 29488 fi # end check java
29494 29489 fi # end check boot jdk found
29495 29490 fi
29496 29491
29497 29492 done
29498 29493 fi
29499 29494
29500 29495
29501 29496 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29502 29497 if test "x$BOOT_JDK_FOUND" = xmaybe; then
29503 29498 # Do we have a bin/java?
29504 29499 if test ! -x "$BOOT_JDK/bin/java"; then
29505 29500 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29506 29501 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29507 29502 BOOT_JDK_FOUND=no
29508 29503 else
29509 29504 # Do we have a bin/javac?
29510 29505 if test ! -x "$BOOT_JDK/bin/javac"; then
29511 29506 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29512 29507 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29513 29508 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29514 29509 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29515 29510 BOOT_JDK_FOUND=no
29516 29511 else
29517 29512 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29518 29513 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29519 29514
29520 29515 # Extra M4 quote needed to protect [] in grep expression.
29521 29516 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29522 29517 if test "x$FOUND_CORRECT_VERSION" = x; then
29523 29518 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29524 29519 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29525 29520 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29526 29521 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29527 29522 BOOT_JDK_FOUND=no
29528 29523 else
29529 29524 # We're done! :-)
29530 29525 BOOT_JDK_FOUND=yes
29531 29526
29532 29527 # Only process if variable expands to non-empty
29533 29528
29534 29529 if test "x$BOOT_JDK" != x; then
29535 29530 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29536 29531
29537 29532 # Input might be given as Windows format, start by converting to
29538 29533 # unix format.
29539 29534 path="$BOOT_JDK"
29540 29535 new_path=`$CYGPATH -u "$path"`
29541 29536
29542 29537 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29543 29538 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29544 29539 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29545 29540 # "foo.exe" is OK but "foo" is an error.
29546 29541 #
29547 29542 # This test is therefore slightly more accurate than "test -f" to check for file precense.
29548 29543 # It is also a way to make sure we got the proper file name for the real test later on.
29549 29544 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29550 29545 if test "x$test_shortpath" = x; then
29551 29546 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29552 29547 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29553 29548 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29554 29549 fi
29555 29550
29556 29551 # Call helper function which possibly converts this using DOS-style short mode.
29557 29552 # If so, the updated path is stored in $new_path.
29558 29553
29559 29554 input_path="$new_path"
29560 29555 # Check if we need to convert this using DOS-style short mode. If the path
29561 29556 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29562 29557 # take no chances and rewrite it.
29563 29558 # Note: m4 eats our [], so we need to use [ and ] instead.
29564 29559 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29565 29560 if test "x$has_forbidden_chars" != x; then
29566 29561 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29567 29562 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29568 29563 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29569 29564 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29570 29565 # Going to short mode and back again did indeed matter. Since short mode is
29571 29566 # case insensitive, let's make it lowercase to improve readability.
29572 29567 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29573 29568 # Now convert it back to Unix-style (cygpath)
29574 29569 input_path=`$CYGPATH -u "$shortmode_path"`
29575 29570 new_path="$input_path"
29576 29571 fi
29577 29572 fi
29578 29573
29579 29574 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29580 29575 if test "x$test_cygdrive_prefix" = x; then
29581 29576 # As a simple fix, exclude /usr/bin since it's not a real path.
29582 29577 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29583 29578 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29584 29579 # a path prefixed by /cygdrive for fixpath to work.
29585 29580 new_path="$CYGWIN_ROOT_PATH$input_path"
29586 29581 fi
29587 29582 fi
29588 29583
29589 29584
29590 29585 if test "x$path" != "x$new_path"; then
29591 29586 BOOT_JDK="$new_path"
29592 29587 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29593 29588 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29594 29589 fi
29595 29590
29596 29591 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29597 29592
29598 29593 path="$BOOT_JDK"
29599 29594 has_colon=`$ECHO $path | $GREP ^.:`
29600 29595 new_path="$path"
29601 29596 if test "x$has_colon" = x; then
29602 29597 # Not in mixed or Windows style, start by that.
29603 29598 new_path=`cmd //c echo $path`
29604 29599 fi
29605 29600
29606 29601
29607 29602 input_path="$new_path"
29608 29603 # Check if we need to convert this using DOS-style short mode. If the path
29609 29604 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29610 29605 # take no chances and rewrite it.
29611 29606 # Note: m4 eats our [], so we need to use [ and ] instead.
29612 29607 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29613 29608 if test "x$has_forbidden_chars" != x; then
29614 29609 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29615 29610 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29616 29611 fi
29617 29612
29618 29613
29619 29614 windows_path="$new_path"
29620 29615 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29621 29616 unix_path=`$CYGPATH -u "$windows_path"`
29622 29617 new_path="$unix_path"
29623 29618 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29624 29619 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29625 29620 new_path="$unix_path"
29626 29621 fi
29627 29622
29628 29623 if test "x$path" != "x$new_path"; then
29629 29624 BOOT_JDK="$new_path"
29630 29625 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29631 29626 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29632 29627 fi
29633 29628
29634 29629 # Save the first 10 bytes of this path to the storage, so fixpath can work.
29635 29630 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29636 29631
29637 29632 else
29638 29633 # We're on a unix platform. Hooray! :)
29639 29634 path="$BOOT_JDK"
29640 29635 has_space=`$ECHO "$path" | $GREP " "`
29641 29636 if test "x$has_space" != x; then
29642 29637 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29643 29638 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29644 29639 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29645 29640 fi
29646 29641
29647 29642 # Use eval to expand a potential ~
29648 29643 eval path="$path"
29649 29644 if test ! -f "$path" && test ! -d "$path"; then
29650 29645 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29651 29646 fi
29652 29647
29653 29648 if test -d "$path"; then
29654 29649 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29655 29650 else
29656 29651 dir="`$DIRNAME "$path"`"
29657 29652 base="`$BASENAME "$path"`"
29658 29653 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29659 29654 fi
29660 29655 fi
29661 29656 fi
29662 29657
29663 29658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29664 29659 $as_echo_n "checking for Boot JDK... " >&6; }
29665 29660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29666 29661 $as_echo "$BOOT_JDK" >&6; }
29667 29662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29668 29663 $as_echo_n "checking Boot JDK version... " >&6; }
29669 29664 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
29670 29665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29671 29666 $as_echo "$BOOT_JDK_VERSION" >&6; }
29672 29667 fi # end check jdk version
29673 29668 fi # end check javac
29674 29669 fi # end check java
29675 29670 fi # end check boot jdk found
29676 29671 fi
29677 29672
29678 29673 fi
29679 29674
29680 29675
29681 29676 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29682 29677 if test "x$BOOT_JDK_FOUND" = xmaybe; then
29683 29678 # Do we have a bin/java?
29684 29679 if test ! -x "$BOOT_JDK/bin/java"; then
29685 29680 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29686 29681 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29687 29682 BOOT_JDK_FOUND=no
29688 29683 else
29689 29684 # Do we have a bin/javac?
29690 29685 if test ! -x "$BOOT_JDK/bin/javac"; then
29691 29686 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29692 29687 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29693 29688 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29694 29689 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29695 29690 BOOT_JDK_FOUND=no
29696 29691 else
29697 29692 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29698 29693 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29699 29694
29700 29695 # Extra M4 quote needed to protect [] in grep expression.
29701 29696 FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29702 29697 if test "x$FOUND_CORRECT_VERSION" = x; then
29703 29698 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29704 29699 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29705 29700 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29706 29701 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29707 29702 BOOT_JDK_FOUND=no
29708 29703 else
29709 29704 # We're done! :-)
29710 29705 BOOT_JDK_FOUND=yes
29711 29706
29712 29707 # Only process if variable expands to non-empty
29713 29708
29714 29709 if test "x$BOOT_JDK" != x; then
29715 29710 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29716 29711
29717 29712 # Input might be given as Windows format, start by converting to
29718 29713 # unix format.
29719 29714 path="$BOOT_JDK"
29720 29715 new_path=`$CYGPATH -u "$path"`
29721 29716
29722 29717 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29723 29718 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29724 29719 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29725 29720 # "foo.exe" is OK but "foo" is an error.
29726 29721 #
29727 29722 # This test is therefore slightly more accurate than "test -f" to check for file precense.
29728 29723 # It is also a way to make sure we got the proper file name for the real test later on.
29729 29724 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29730 29725 if test "x$test_shortpath" = x; then
29731 29726 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29732 29727 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29733 29728 as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29734 29729 fi
29735 29730
29736 29731 # Call helper function which possibly converts this using DOS-style short mode.
29737 29732 # If so, the updated path is stored in $new_path.
29738 29733
29739 29734 input_path="$new_path"
29740 29735 # Check if we need to convert this using DOS-style short mode. If the path
29741 29736 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29742 29737 # take no chances and rewrite it.
29743 29738 # Note: m4 eats our [], so we need to use [ and ] instead.
29744 29739 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29745 29740 if test "x$has_forbidden_chars" != x; then
29746 29741 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29747 29742 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29748 29743 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29749 29744 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29750 29745 # Going to short mode and back again did indeed matter. Since short mode is
29751 29746 # case insensitive, let's make it lowercase to improve readability.
29752 29747 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29753 29748 # Now convert it back to Unix-style (cygpath)
29754 29749 input_path=`$CYGPATH -u "$shortmode_path"`
29755 29750 new_path="$input_path"
29756 29751 fi
29757 29752 fi
29758 29753
29759 29754 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29760 29755 if test "x$test_cygdrive_prefix" = x; then
29761 29756 # As a simple fix, exclude /usr/bin since it's not a real path.
29762 29757 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29763 29758 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29764 29759 # a path prefixed by /cygdrive for fixpath to work.
29765 29760 new_path="$CYGWIN_ROOT_PATH$input_path"
29766 29761 fi
29767 29762 fi
29768 29763
29769 29764
29770 29765 if test "x$path" != "x$new_path"; then
29771 29766 BOOT_JDK="$new_path"
29772 29767 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29773 29768 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29774 29769 fi
29775 29770
29776 29771 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29777 29772
29778 29773 path="$BOOT_JDK"
29779 29774 has_colon=`$ECHO $path | $GREP ^.:`
29780 29775 new_path="$path"
29781 29776 if test "x$has_colon" = x; then
29782 29777 # Not in mixed or Windows style, start by that.
29783 29778 new_path=`cmd //c echo $path`
29784 29779 fi
29785 29780
29786 29781
29787 29782 input_path="$new_path"
29788 29783 # Check if we need to convert this using DOS-style short mode. If the path
29789 29784 # contains just simple characters, use it. Otherwise (spaces, weird characters),
29790 29785 # take no chances and rewrite it.
29791 29786 # Note: m4 eats our [], so we need to use [ and ] instead.
29792 29787 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29793 29788 if test "x$has_forbidden_chars" != x; then
29794 29789 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29795 29790 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29796 29791 fi
29797 29792
29798 29793
29799 29794 windows_path="$new_path"
29800 29795 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29801 29796 unix_path=`$CYGPATH -u "$windows_path"`
29802 29797 new_path="$unix_path"
29803 29798 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29804 29799 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29805 29800 new_path="$unix_path"
29806 29801 fi
29807 29802
29808 29803 if test "x$path" != "x$new_path"; then
29809 29804 BOOT_JDK="$new_path"
29810 29805 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29811 29806 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29812 29807 fi
29813 29808
29814 29809 # Save the first 10 bytes of this path to the storage, so fixpath can work.
29815 29810 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29816 29811
29817 29812 else
29818 29813 # We're on a unix platform. Hooray! :)
29819 29814 path="$BOOT_JDK"
29820 29815 has_space=`$ECHO "$path" | $GREP " "`
29821 29816 if test "x$has_space" != x; then
29822 29817 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29823 29818 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29824 29819 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29825 29820 fi
29826 29821
29827 29822 # Use eval to expand a potential ~
29828 29823 eval path="$path"
29829 29824 if test ! -f "$path" && test ! -d "$path"; then
29830 29825 as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29831 29826 fi
29832 29827
29833 29828 if test -d "$path"; then
29834 29829 BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29835 29830 else
29836 29831 dir="`$DIRNAME "$path"`"
29837 29832 base="`$BASENAME "$path"`"
29838 29833 BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29839 29834 fi
29840 29835 fi
29841 29836 fi
29842 29837
29843 29838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29844 29839 $as_echo_n "checking for Boot JDK... " >&6; }
29845 29840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29846 29841 $as_echo "$BOOT_JDK" >&6; }
29847 29842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29848 29843 $as_echo_n "checking Boot JDK version... " >&6; }
29849 29844 BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
29850 29845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29851 29846 $as_echo "$BOOT_JDK_VERSION" >&6; }
29852 29847 fi # end check jdk version
29853 29848 fi # end check javac
29854 29849 fi # end check java
29855 29850 fi # end check boot jdk found
29856 29851 fi
29857 29852
29858 29853
29859 29854 # If we haven't found anything yet, we've truly lost. Give up.
29860 29855 if test "x$BOOT_JDK_FOUND" = xno; then
29861 29856
29862 29857 # Print a helpful message on how to acquire the necessary build dependency.
29863 29858 # openjdk is the help tag: freetype, cups, alsa etc
29864 29859 MISSING_DEPENDENCY=openjdk
29865 29860
29866 29861 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29867 29862 cygwin_help $MISSING_DEPENDENCY
29868 29863 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29869 29864 msys_help $MISSING_DEPENDENCY
29870 29865 else
29871 29866 PKGHANDLER_COMMAND=
29872 29867
29873 29868 case $PKGHANDLER in
29874 29869 apt-get)
29875 29870 apt_help $MISSING_DEPENDENCY ;;
29876 29871 yum)
29877 29872 yum_help $MISSING_DEPENDENCY ;;
29878 29873 port)
29879 29874 port_help $MISSING_DEPENDENCY ;;
29880 29875 pkgutil)
29881 29876 pkgutil_help $MISSING_DEPENDENCY ;;
29882 29877 pkgadd)
29883 29878 pkgadd_help $MISSING_DEPENDENCY ;;
29884 29879 esac
29885 29880
29886 29881 if test "x$PKGHANDLER_COMMAND" != x; then
29887 29882 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29888 29883 fi
29889 29884 fi
29890 29885
29891 29886 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29892 29887 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29893 29888 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29894 29889 $as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29895 29890 as_fn_error $? "Cannot continue" "$LINENO" 5
29896 29891 fi
29897 29892
29898 29893
29899 29894
29900 29895 # Setup tools from the Boot JDK.
29901 29896
29902 29897 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29903 29898
29904 29899 # Publish this variable in the help.
29905 29900
29906 29901
29907 29902 if [ -z "${JAVA+x}" ]; then
29908 29903 # The variable is not set by user, try to locate tool using the code snippet
29909 29904
29910 29905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29911 29906 $as_echo_n "checking for java in Boot JDK... " >&6; }
29912 29907 JAVA=$BOOT_JDK/bin/java
29913 29908 if test ! -x $JAVA; then
29914 29909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29915 29910 $as_echo "not found" >&6; }
29916 29911 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29917 29912 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29918 29913 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29919 29914 fi
29920 29915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29921 29916 $as_echo "ok" >&6; }
29922 29917
29923 29918
29924 29919 else
29925 29920 # The variable is set, but is it from the command line or the environment?
29926 29921
29927 29922 # Try to remove the string !JAVA! from our list.
29928 29923 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29929 29924 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29930 29925 # If it failed, the variable was not from the command line. Ignore it,
29931 29926 # but warn the user (except for BASH, which is always set by the calling BASH).
29932 29927 if test "xJAVA" != xBASH; then
29933 29928 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29934 29929 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29935 29930 fi
29936 29931 # Try to locate tool using the code snippet
29937 29932
29938 29933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29939 29934 $as_echo_n "checking for java in Boot JDK... " >&6; }
29940 29935 JAVA=$BOOT_JDK/bin/java
29941 29936 if test ! -x $JAVA; then
29942 29937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29943 29938 $as_echo "not found" >&6; }
29944 29939 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29945 29940 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29946 29941 as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29947 29942 fi
29948 29943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29949 29944 $as_echo "ok" >&6; }
29950 29945
29951 29946
29952 29947 else
29953 29948 # If it succeeded, then it was overridden by the user. We will use it
29954 29949 # for the tool.
29955 29950
29956 29951 # First remove it from the list of overridden variables, so we can test
29957 29952 # for unknown variables in the end.
29958 29953 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29959 29954
29960 29955 # Check if we try to supply an empty value
29961 29956 if test "x$JAVA" = x; then
29962 29957 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29963 29958 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29964 29959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29965 29960 $as_echo_n "checking for JAVA... " >&6; }
29966 29961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29967 29962 $as_echo "disabled" >&6; }
29968 29963 else
29969 29964 # Check if the provided tool contains a complete path.
29970 29965 tool_specified="$JAVA"
29971 29966 tool_basename="${tool_specified##*/}"
29972 29967 if test "x$tool_basename" = "x$tool_specified"; then
29973 29968 # A command without a complete path is provided, search $PATH.
29974 29969 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29975 29970 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29976 29971 # Extract the first word of "$tool_basename", so it can be a program name with args.
29977 29972 set dummy $tool_basename; ac_word=$2
29978 29973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29979 29974 $as_echo_n "checking for $ac_word... " >&6; }
29980 29975 if ${ac_cv_path_JAVA+:} false; then :
29981 29976 $as_echo_n "(cached) " >&6
29982 29977 else
29983 29978 case $JAVA in
29984 29979 [\\/]* | ?:[\\/]*)
29985 29980 ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29986 29981 ;;
29987 29982 *)
29988 29983 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29989 29984 for as_dir in $PATH
29990 29985 do
29991 29986 IFS=$as_save_IFS
29992 29987 test -z "$as_dir" && as_dir=.
29993 29988 for ac_exec_ext in '' $ac_executable_extensions; do
29994 29989 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29995 29990 ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29996 29991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29997 29992 break 2
29998 29993 fi
29999 29994 done
30000 29995 done
30001 29996 IFS=$as_save_IFS
30002 29997
30003 29998 ;;
30004 29999 esac
30005 30000 fi
30006 30001 JAVA=$ac_cv_path_JAVA
30007 30002 if test -n "$JAVA"; then
30008 30003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30009 30004 $as_echo "$JAVA" >&6; }
30010 30005 else
30011 30006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30012 30007 $as_echo "no" >&6; }
30013 30008 fi
30014 30009
30015 30010
30016 30011 if test "x$JAVA" = x; then
30017 30012 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30018 30013 fi
30019 30014 else
30020 30015 # Otherwise we believe it is a complete path. Use it as it is.
30021 30016 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30022 30017 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30023 30018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30024 30019 $as_echo_n "checking for JAVA... " >&6; }
30025 30020 if test ! -x "$tool_specified"; then
30026 30021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30027 30022 $as_echo "not found" >&6; }
30028 30023 as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30029 30024 fi
30030 30025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30031 30026 $as_echo "$tool_specified" >&6; }
30032 30027 fi
30033 30028 fi
30034 30029 fi
30035 30030
30036 30031 fi
30037 30032
30038 30033
30039 30034
30040 30035 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30041 30036
30042 30037 # Publish this variable in the help.
30043 30038
30044 30039
30045 30040 if [ -z "${JAVAC+x}" ]; then
30046 30041 # The variable is not set by user, try to locate tool using the code snippet
30047 30042
30048 30043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30049 30044 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30050 30045 JAVAC=$BOOT_JDK/bin/javac
30051 30046 if test ! -x $JAVAC; then
30052 30047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30053 30048 $as_echo "not found" >&6; }
30054 30049 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30055 30050 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30056 30051 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30057 30052 fi
30058 30053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30059 30054 $as_echo "ok" >&6; }
30060 30055
30061 30056
30062 30057 else
30063 30058 # The variable is set, but is it from the command line or the environment?
30064 30059
30065 30060 # Try to remove the string !JAVAC! from our list.
30066 30061 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30067 30062 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30068 30063 # If it failed, the variable was not from the command line. Ignore it,
30069 30064 # but warn the user (except for BASH, which is always set by the calling BASH).
30070 30065 if test "xJAVAC" != xBASH; then
30071 30066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30072 30067 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30073 30068 fi
30074 30069 # Try to locate tool using the code snippet
30075 30070
30076 30071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30077 30072 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30078 30073 JAVAC=$BOOT_JDK/bin/javac
30079 30074 if test ! -x $JAVAC; then
30080 30075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30081 30076 $as_echo "not found" >&6; }
30082 30077 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30083 30078 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30084 30079 as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30085 30080 fi
30086 30081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30087 30082 $as_echo "ok" >&6; }
30088 30083
30089 30084
30090 30085 else
30091 30086 # If it succeeded, then it was overridden by the user. We will use it
30092 30087 # for the tool.
30093 30088
30094 30089 # First remove it from the list of overridden variables, so we can test
30095 30090 # for unknown variables in the end.
30096 30091 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30097 30092
30098 30093 # Check if we try to supply an empty value
30099 30094 if test "x$JAVAC" = x; then
30100 30095 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30101 30096 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30102 30097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30103 30098 $as_echo_n "checking for JAVAC... " >&6; }
30104 30099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30105 30100 $as_echo "disabled" >&6; }
30106 30101 else
30107 30102 # Check if the provided tool contains a complete path.
30108 30103 tool_specified="$JAVAC"
30109 30104 tool_basename="${tool_specified##*/}"
30110 30105 if test "x$tool_basename" = "x$tool_specified"; then
30111 30106 # A command without a complete path is provided, search $PATH.
30112 30107 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30113 30108 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30114 30109 # Extract the first word of "$tool_basename", so it can be a program name with args.
30115 30110 set dummy $tool_basename; ac_word=$2
30116 30111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30117 30112 $as_echo_n "checking for $ac_word... " >&6; }
30118 30113 if ${ac_cv_path_JAVAC+:} false; then :
30119 30114 $as_echo_n "(cached) " >&6
30120 30115 else
30121 30116 case $JAVAC in
30122 30117 [\\/]* | ?:[\\/]*)
30123 30118 ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30124 30119 ;;
30125 30120 *)
30126 30121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30127 30122 for as_dir in $PATH
30128 30123 do
30129 30124 IFS=$as_save_IFS
30130 30125 test -z "$as_dir" && as_dir=.
30131 30126 for ac_exec_ext in '' $ac_executable_extensions; do
30132 30127 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30133 30128 ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30134 30129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30135 30130 break 2
30136 30131 fi
30137 30132 done
30138 30133 done
30139 30134 IFS=$as_save_IFS
30140 30135
30141 30136 ;;
30142 30137 esac
30143 30138 fi
30144 30139 JAVAC=$ac_cv_path_JAVAC
30145 30140 if test -n "$JAVAC"; then
30146 30141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30147 30142 $as_echo "$JAVAC" >&6; }
30148 30143 else
30149 30144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30150 30145 $as_echo "no" >&6; }
30151 30146 fi
30152 30147
30153 30148
30154 30149 if test "x$JAVAC" = x; then
30155 30150 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30156 30151 fi
30157 30152 else
30158 30153 # Otherwise we believe it is a complete path. Use it as it is.
30159 30154 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30160 30155 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30161 30156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30162 30157 $as_echo_n "checking for JAVAC... " >&6; }
30163 30158 if test ! -x "$tool_specified"; then
30164 30159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30165 30160 $as_echo "not found" >&6; }
30166 30161 as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30167 30162 fi
30168 30163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30169 30164 $as_echo "$tool_specified" >&6; }
30170 30165 fi
30171 30166 fi
30172 30167 fi
30173 30168
30174 30169 fi
30175 30170
30176 30171
30177 30172
30178 30173 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30179 30174
30180 30175 # Publish this variable in the help.
30181 30176
30182 30177
30183 30178 if [ -z "${JAVAH+x}" ]; then
30184 30179 # The variable is not set by user, try to locate tool using the code snippet
30185 30180
30186 30181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30187 30182 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30188 30183 JAVAH=$BOOT_JDK/bin/javah
30189 30184 if test ! -x $JAVAH; then
30190 30185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30191 30186 $as_echo "not found" >&6; }
30192 30187 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30193 30188 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30194 30189 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30195 30190 fi
30196 30191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30197 30192 $as_echo "ok" >&6; }
30198 30193
30199 30194
30200 30195 else
30201 30196 # The variable is set, but is it from the command line or the environment?
30202 30197
30203 30198 # Try to remove the string !JAVAH! from our list.
30204 30199 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30205 30200 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30206 30201 # If it failed, the variable was not from the command line. Ignore it,
30207 30202 # but warn the user (except for BASH, which is always set by the calling BASH).
30208 30203 if test "xJAVAH" != xBASH; then
30209 30204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30210 30205 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30211 30206 fi
30212 30207 # Try to locate tool using the code snippet
30213 30208
30214 30209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30215 30210 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30216 30211 JAVAH=$BOOT_JDK/bin/javah
30217 30212 if test ! -x $JAVAH; then
30218 30213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30219 30214 $as_echo "not found" >&6; }
30220 30215 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30221 30216 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30222 30217 as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30223 30218 fi
30224 30219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30225 30220 $as_echo "ok" >&6; }
30226 30221
30227 30222
30228 30223 else
30229 30224 # If it succeeded, then it was overridden by the user. We will use it
30230 30225 # for the tool.
30231 30226
30232 30227 # First remove it from the list of overridden variables, so we can test
30233 30228 # for unknown variables in the end.
30234 30229 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30235 30230
30236 30231 # Check if we try to supply an empty value
30237 30232 if test "x$JAVAH" = x; then
30238 30233 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30239 30234 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30240 30235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30241 30236 $as_echo_n "checking for JAVAH... " >&6; }
30242 30237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30243 30238 $as_echo "disabled" >&6; }
30244 30239 else
30245 30240 # Check if the provided tool contains a complete path.
30246 30241 tool_specified="$JAVAH"
30247 30242 tool_basename="${tool_specified##*/}"
30248 30243 if test "x$tool_basename" = "x$tool_specified"; then
30249 30244 # A command without a complete path is provided, search $PATH.
30250 30245 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30251 30246 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30252 30247 # Extract the first word of "$tool_basename", so it can be a program name with args.
30253 30248 set dummy $tool_basename; ac_word=$2
30254 30249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30255 30250 $as_echo_n "checking for $ac_word... " >&6; }
30256 30251 if ${ac_cv_path_JAVAH+:} false; then :
30257 30252 $as_echo_n "(cached) " >&6
30258 30253 else
30259 30254 case $JAVAH in
30260 30255 [\\/]* | ?:[\\/]*)
30261 30256 ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30262 30257 ;;
30263 30258 *)
30264 30259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30265 30260 for as_dir in $PATH
30266 30261 do
30267 30262 IFS=$as_save_IFS
30268 30263 test -z "$as_dir" && as_dir=.
30269 30264 for ac_exec_ext in '' $ac_executable_extensions; do
30270 30265 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30271 30266 ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30272 30267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30273 30268 break 2
30274 30269 fi
30275 30270 done
30276 30271 done
30277 30272 IFS=$as_save_IFS
30278 30273
30279 30274 ;;
30280 30275 esac
30281 30276 fi
30282 30277 JAVAH=$ac_cv_path_JAVAH
30283 30278 if test -n "$JAVAH"; then
30284 30279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30285 30280 $as_echo "$JAVAH" >&6; }
30286 30281 else
30287 30282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30288 30283 $as_echo "no" >&6; }
30289 30284 fi
30290 30285
30291 30286
30292 30287 if test "x$JAVAH" = x; then
30293 30288 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30294 30289 fi
30295 30290 else
30296 30291 # Otherwise we believe it is a complete path. Use it as it is.
30297 30292 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30298 30293 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30299 30294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30300 30295 $as_echo_n "checking for JAVAH... " >&6; }
30301 30296 if test ! -x "$tool_specified"; then
30302 30297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30303 30298 $as_echo "not found" >&6; }
30304 30299 as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30305 30300 fi
30306 30301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30307 30302 $as_echo "$tool_specified" >&6; }
30308 30303 fi
30309 30304 fi
30310 30305 fi
30311 30306
30312 30307 fi
30313 30308
30314 30309
30315 30310
30316 30311 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30317 30312
30318 30313 # Publish this variable in the help.
30319 30314
30320 30315
30321 30316 if [ -z "${JAR+x}" ]; then
30322 30317 # The variable is not set by user, try to locate tool using the code snippet
30323 30318
30324 30319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30325 30320 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30326 30321 JAR=$BOOT_JDK/bin/jar
30327 30322 if test ! -x $JAR; then
30328 30323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30329 30324 $as_echo "not found" >&6; }
30330 30325 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30331 30326 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30332 30327 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30333 30328 fi
30334 30329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30335 30330 $as_echo "ok" >&6; }
30336 30331
30337 30332
30338 30333 else
30339 30334 # The variable is set, but is it from the command line or the environment?
30340 30335
30341 30336 # Try to remove the string !JAR! from our list.
30342 30337 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30343 30338 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30344 30339 # If it failed, the variable was not from the command line. Ignore it,
30345 30340 # but warn the user (except for BASH, which is always set by the calling BASH).
30346 30341 if test "xJAR" != xBASH; then
30347 30342 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30348 30343 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30349 30344 fi
30350 30345 # Try to locate tool using the code snippet
30351 30346
30352 30347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30353 30348 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30354 30349 JAR=$BOOT_JDK/bin/jar
30355 30350 if test ! -x $JAR; then
30356 30351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30357 30352 $as_echo "not found" >&6; }
30358 30353 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30359 30354 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30360 30355 as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30361 30356 fi
30362 30357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30363 30358 $as_echo "ok" >&6; }
30364 30359
30365 30360
30366 30361 else
30367 30362 # If it succeeded, then it was overridden by the user. We will use it
30368 30363 # for the tool.
30369 30364
30370 30365 # First remove it from the list of overridden variables, so we can test
30371 30366 # for unknown variables in the end.
30372 30367 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30373 30368
30374 30369 # Check if we try to supply an empty value
30375 30370 if test "x$JAR" = x; then
30376 30371 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30377 30372 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30378 30373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30379 30374 $as_echo_n "checking for JAR... " >&6; }
30380 30375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30381 30376 $as_echo "disabled" >&6; }
30382 30377 else
30383 30378 # Check if the provided tool contains a complete path.
30384 30379 tool_specified="$JAR"
30385 30380 tool_basename="${tool_specified##*/}"
30386 30381 if test "x$tool_basename" = "x$tool_specified"; then
30387 30382 # A command without a complete path is provided, search $PATH.
30388 30383 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30389 30384 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30390 30385 # Extract the first word of "$tool_basename", so it can be a program name with args.
30391 30386 set dummy $tool_basename; ac_word=$2
30392 30387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30393 30388 $as_echo_n "checking for $ac_word... " >&6; }
30394 30389 if ${ac_cv_path_JAR+:} false; then :
30395 30390 $as_echo_n "(cached) " >&6
30396 30391 else
30397 30392 case $JAR in
30398 30393 [\\/]* | ?:[\\/]*)
30399 30394 ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30400 30395 ;;
30401 30396 *)
30402 30397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30403 30398 for as_dir in $PATH
30404 30399 do
30405 30400 IFS=$as_save_IFS
30406 30401 test -z "$as_dir" && as_dir=.
30407 30402 for ac_exec_ext in '' $ac_executable_extensions; do
30408 30403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30409 30404 ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30410 30405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30411 30406 break 2
30412 30407 fi
30413 30408 done
30414 30409 done
30415 30410 IFS=$as_save_IFS
30416 30411
30417 30412 ;;
30418 30413 esac
30419 30414 fi
30420 30415 JAR=$ac_cv_path_JAR
30421 30416 if test -n "$JAR"; then
30422 30417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30423 30418 $as_echo "$JAR" >&6; }
30424 30419 else
30425 30420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30426 30421 $as_echo "no" >&6; }
30427 30422 fi
30428 30423
30429 30424
30430 30425 if test "x$JAR" = x; then
30431 30426 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30432 30427 fi
30433 30428 else
30434 30429 # Otherwise we believe it is a complete path. Use it as it is.
30435 30430 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30436 30431 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30437 30432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30438 30433 $as_echo_n "checking for JAR... " >&6; }
30439 30434 if test ! -x "$tool_specified"; then
30440 30435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30441 30436 $as_echo "not found" >&6; }
30442 30437 as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30443 30438 fi
30444 30439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30445 30440 $as_echo "$tool_specified" >&6; }
30446 30441 fi
30447 30442 fi
30448 30443 fi
30449 30444
30450 30445 fi
30451 30446
30452 30447
30453 30448
30454 30449 # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30455 30450
30456 30451 # Publish this variable in the help.
30457 30452
30458 30453
30459 30454 if [ -z "${JARSIGNER+x}" ]; then
30460 30455 # The variable is not set by user, try to locate tool using the code snippet
30461 30456
30462 30457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30463 30458 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30464 30459 JARSIGNER=$BOOT_JDK/bin/jarsigner
30465 30460 if test ! -x $JARSIGNER; then
30466 30461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30467 30462 $as_echo "not found" >&6; }
30468 30463 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30469 30464 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30470 30465 as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30471 30466 fi
30472 30467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30473 30468 $as_echo "ok" >&6; }
30474 30469
30475 30470
30476 30471 else
30477 30472 # The variable is set, but is it from the command line or the environment?
30478 30473
30479 30474 # Try to remove the string !JARSIGNER! from our list.
30480 30475 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30481 30476 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30482 30477 # If it failed, the variable was not from the command line. Ignore it,
30483 30478 # but warn the user (except for BASH, which is always set by the calling BASH).
30484 30479 if test "xJARSIGNER" != xBASH; then
30485 30480 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30486 30481 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30487 30482 fi
30488 30483 # Try to locate tool using the code snippet
30489 30484
30490 30485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30491 30486 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30492 30487 JARSIGNER=$BOOT_JDK/bin/jarsigner
30493 30488 if test ! -x $JARSIGNER; then
30494 30489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30495 30490 $as_echo "not found" >&6; }
30496 30491 { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30497 30492 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30498 30493 as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30499 30494 fi
30500 30495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30501 30496 $as_echo "ok" >&6; }
30502 30497
30503 30498
30504 30499 else
30505 30500 # If it succeeded, then it was overridden by the user. We will use it
30506 30501 # for the tool.
30507 30502
30508 30503 # First remove it from the list of overridden variables, so we can test
30509 30504 # for unknown variables in the end.
30510 30505 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30511 30506
30512 30507 # Check if we try to supply an empty value
30513 30508 if test "x$JARSIGNER" = x; then
30514 30509 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30515 30510 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30516 30511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30517 30512 $as_echo_n "checking for JARSIGNER... " >&6; }
30518 30513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30519 30514 $as_echo "disabled" >&6; }
30520 30515 else
30521 30516 # Check if the provided tool contains a complete path.
30522 30517 tool_specified="$JARSIGNER"
30523 30518 tool_basename="${tool_specified##*/}"
30524 30519 if test "x$tool_basename" = "x$tool_specified"; then
30525 30520 # A command without a complete path is provided, search $PATH.
30526 30521 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30527 30522 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30528 30523 # Extract the first word of "$tool_basename", so it can be a program name with args.
30529 30524 set dummy $tool_basename; ac_word=$2
30530 30525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30531 30526 $as_echo_n "checking for $ac_word... " >&6; }
30532 30527 if ${ac_cv_path_JARSIGNER+:} false; then :
30533 30528 $as_echo_n "(cached) " >&6
30534 30529 else
30535 30530 case $JARSIGNER in
30536 30531 [\\/]* | ?:[\\/]*)
30537 30532 ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30538 30533 ;;
30539 30534 *)
30540 30535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30541 30536 for as_dir in $PATH
30542 30537 do
30543 30538 IFS=$as_save_IFS
30544 30539 test -z "$as_dir" && as_dir=.
30545 30540 for ac_exec_ext in '' $ac_executable_extensions; do
30546 30541 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30547 30542 ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30548 30543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30549 30544 break 2
30550 30545 fi
30551 30546 done
30552 30547 done
30553 30548 IFS=$as_save_IFS
30554 30549
30555 30550 ;;
30556 30551 esac
30557 30552 fi
30558 30553 JARSIGNER=$ac_cv_path_JARSIGNER
30559 30554 if test -n "$JARSIGNER"; then
30560 30555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30561 30556 $as_echo "$JARSIGNER" >&6; }
30562 30557 else
30563 30558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30564 30559 $as_echo "no" >&6; }
30565 30560 fi
30566 30561
30567 30562
30568 30563 if test "x$JARSIGNER" = x; then
30569 30564 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30570 30565 fi
30571 30566 else
30572 30567 # Otherwise we believe it is a complete path. Use it as it is.
30573 30568 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30574 30569 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30575 30570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30576 30571 $as_echo_n "checking for JARSIGNER... " >&6; }
30577 30572 if test ! -x "$tool_specified"; then
30578 30573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30579 30574 $as_echo "not found" >&6; }
30580 30575 as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30581 30576 fi
30582 30577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30583 30578 $as_echo "$tool_specified" >&6; }
30584 30579 fi
30585 30580 fi
30586 30581 fi
30587 30582
30588 30583 fi
30589 30584
30590 30585
30591 30586
30592 30587 # Finally, set some other options...
30593 30588
30594 30589 # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30595 30590 BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30596 30591
30597 30592
30598 30593
30599 30594 $ECHO "Check if jvm arg is ok: --patch-module foo=bar" >&5
30600 30595 $ECHO "Command: $JAVA --patch-module foo=bar -version" >&5
30601 30596 OUTPUT=`$JAVA --patch-module foo=bar -version 2>&1`
30602 30597 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30603 30598 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30604 30599 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30605 30600 dummy="$dummy --patch-module foo=bar"
30606 30601 JVM_ARG_OK=true
30607 30602 else
30608 30603 $ECHO "Arg failed:" >&5
30609 30604 $ECHO "$OUTPUT" >&5
30610 30605 JVM_ARG_OK=false
30611 30606 fi
30612 30607
30613 30608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30614 30609 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
30615 30610 if test "x$JVM_ARG_OK" = "xtrue"; then
30616 30611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30617 30612 $as_echo "yes" >&6; }
30618 30613 BOOT_JDK_MODULAR="true"
30619 30614 else
30620 30615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30621 30616 $as_echo "no" >&6; }
30622 30617 BOOT_JDK_MODULAR="false"
30623 30618 fi
30624 30619
30625 30620
30626 30621
30627 30622
30628 30623 # Check if the boot jdk is 32 or 64 bit
30629 30624 if "$JAVA" -d64 -version > /dev/null 2>&1; then
30630 30625 BOOT_JDK_BITS="64"
30631 30626 else
30632 30627 BOOT_JDK_BITS="32"
30633 30628 fi
30634 30629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30635 30630 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30636 30631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30637 30632 $as_echo "$BOOT_JDK_BITS" >&6; }
30638 30633
30639 30634
30640 30635
30641 30636
30642 30637 # Check whether --with-build-jdk was given.
30643 30638 if test "${with_build_jdk+set}" = set; then :
30644 30639 withval=$with_build_jdk;
30645 30640 fi
30646 30641
30647 30642
30648 30643 CREATE_BUILDJDK=false
30649 30644 EXTERNAL_BUILDJDK=false
30650 30645 BUILD_JDK_FOUND="no"
30651 30646 if test "x$with_build_jdk" != "x"; then
30652 30647
30653 30648 if test "x$BUILD_JDK_FOUND" = xno; then
30654 30649 # Execute the test
30655 30650
30656 30651 if test "x$with_build_jdk" != x; then
30657 30652 BUILD_JDK=$with_build_jdk
30658 30653 BUILD_JDK_FOUND=maybe
30659 30654 { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30660 30655 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30661 30656 fi
30662 30657
30663 30658 # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30664 30659 if test "x$BUILD_JDK_FOUND" = xmaybe; then
30665 30660 # Do we have a bin/java?
30666 30661 if test ! -x "$BUILD_JDK/bin/java"; then
30667 30662 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30668 30663 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30669 30664 BUILD_JDK_FOUND=no
30670 30665 elif test ! -x "$BUILD_JDK/bin/jlink"; then
30671 30666 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30672 30667 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30673 30668 BUILD_JDK_FOUND=no
30674 30669 elif test ! -x "$BUILD_JDK/bin/jmod"; then
30675 30670 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30676 30671 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30677 30672 BUILD_JDK_FOUND=no
30678 30673 elif test ! -x "$BUILD_JDK/bin/javac"; then
30679 30674 # Do we have a bin/javac?
30680 30675 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30681 30676 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30682 30677 { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30683 30678 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30684 30679 BUILD_JDK_FOUND=no
30685 30680 else
30686 30681 # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30687 30682 BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30688 30683
30689 30684 # Extra M4 quote needed to protect [] in grep expression.
30690 30685 FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30691 30686 if test "x$FOUND_CORRECT_VERSION" = x; then
30692 30687 { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30693 30688 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30694 30689 { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30695 30690 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30696 30691 BUILD_JDK_FOUND=no
30697 30692 else
30698 30693 # We're done!
30699 30694 BUILD_JDK_FOUND=yes
30700 30695
30701 30696 # Only process if variable expands to non-empty
30702 30697
30703 30698 if test "x$BUILD_JDK" != x; then
30704 30699 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30705 30700
30706 30701 # Input might be given as Windows format, start by converting to
30707 30702 # unix format.
30708 30703 path="$BUILD_JDK"
30709 30704 new_path=`$CYGPATH -u "$path"`
30710 30705
30711 30706 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30712 30707 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30713 30708 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30714 30709 # "foo.exe" is OK but "foo" is an error.
30715 30710 #
30716 30711 # This test is therefore slightly more accurate than "test -f" to check for file precense.
30717 30712 # It is also a way to make sure we got the proper file name for the real test later on.
30718 30713 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30719 30714 if test "x$test_shortpath" = x; then
30720 30715 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30721 30716 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30722 30717 as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30723 30718 fi
30724 30719
30725 30720 # Call helper function which possibly converts this using DOS-style short mode.
30726 30721 # If so, the updated path is stored in $new_path.
30727 30722
30728 30723 input_path="$new_path"
30729 30724 # Check if we need to convert this using DOS-style short mode. If the path
30730 30725 # contains just simple characters, use it. Otherwise (spaces, weird characters),
30731 30726 # take no chances and rewrite it.
30732 30727 # Note: m4 eats our [], so we need to use [ and ] instead.
30733 30728 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30734 30729 if test "x$has_forbidden_chars" != x; then
30735 30730 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30736 30731 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30737 30732 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30738 30733 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30739 30734 # Going to short mode and back again did indeed matter. Since short mode is
30740 30735 # case insensitive, let's make it lowercase to improve readability.
30741 30736 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30742 30737 # Now convert it back to Unix-style (cygpath)
30743 30738 input_path=`$CYGPATH -u "$shortmode_path"`
30744 30739 new_path="$input_path"
30745 30740 fi
30746 30741 fi
30747 30742
30748 30743 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30749 30744 if test "x$test_cygdrive_prefix" = x; then
30750 30745 # As a simple fix, exclude /usr/bin since it's not a real path.
30751 30746 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30752 30747 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30753 30748 # a path prefixed by /cygdrive for fixpath to work.
30754 30749 new_path="$CYGWIN_ROOT_PATH$input_path"
30755 30750 fi
30756 30751 fi
30757 30752
30758 30753
30759 30754 if test "x$path" != "x$new_path"; then
30760 30755 BUILD_JDK="$new_path"
30761 30756 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30762 30757 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30763 30758 fi
30764 30759
30765 30760 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30766 30761
30767 30762 path="$BUILD_JDK"
30768 30763 has_colon=`$ECHO $path | $GREP ^.:`
30769 30764 new_path="$path"
30770 30765 if test "x$has_colon" = x; then
30771 30766 # Not in mixed or Windows style, start by that.
30772 30767 new_path=`cmd //c echo $path`
30773 30768 fi
30774 30769
30775 30770
30776 30771 input_path="$new_path"
30777 30772 # Check if we need to convert this using DOS-style short mode. If the path
30778 30773 # contains just simple characters, use it. Otherwise (spaces, weird characters),
30779 30774 # take no chances and rewrite it.
30780 30775 # Note: m4 eats our [], so we need to use [ and ] instead.
30781 30776 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30782 30777 if test "x$has_forbidden_chars" != x; then
30783 30778 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30784 30779 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30785 30780 fi
30786 30781
30787 30782
30788 30783 windows_path="$new_path"
30789 30784 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30790 30785 unix_path=`$CYGPATH -u "$windows_path"`
30791 30786 new_path="$unix_path"
30792 30787 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30793 30788 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30794 30789 new_path="$unix_path"
30795 30790 fi
30796 30791
30797 30792 if test "x$path" != "x$new_path"; then
30798 30793 BUILD_JDK="$new_path"
30799 30794 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30800 30795 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30801 30796 fi
30802 30797
30803 30798 # Save the first 10 bytes of this path to the storage, so fixpath can work.
30804 30799 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30805 30800
30806 30801 else
30807 30802 # We're on a unix platform. Hooray! :)
30808 30803 path="$BUILD_JDK"
30809 30804 has_space=`$ECHO "$path" | $GREP " "`
30810 30805 if test "x$has_space" != x; then
30811 30806 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30812 30807 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30813 30808 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30814 30809 fi
30815 30810
30816 30811 # Use eval to expand a potential ~
30817 30812 eval path="$path"
30818 30813 if test ! -f "$path" && test ! -d "$path"; then
30819 30814 as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30820 30815 fi
30821 30816
30822 30817 if test -d "$path"; then
30823 30818 BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30824 30819 else
30825 30820 dir="`$DIRNAME "$path"`"
30826 30821 base="`$BASENAME "$path"`"
30827 30822 BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30828 30823 fi
30829 30824 fi
30830 30825 fi
30831 30826
30832 30827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30833 30828 $as_echo_n "checking for Build JDK... " >&6; }
30834 30829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30835 30830 $as_echo "$BUILD_JDK" >&6; }
30836 30831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30837 30832 $as_echo_n "checking Build JDK version... " >&6; }
30838 30833 BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
30839 30834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30840 30835 $as_echo "$BUILD_JDK_VERSION" >&6; }
30841 30836 fi # end check jdk version
30842 30837 fi # end check java
30843 30838 fi # end check build jdk found
30844 30839 fi
30845 30840
30846 30841 EXTERNAL_BUILDJDK=true
30847 30842 else
30848 30843 if test "x$COMPILE_TYPE" = "xcross"; then
30849 30844 BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30850 30845 BUILD_JDK_FOUND=yes
30851 30846 CREATE_BUILDJDK=true
30852 30847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30853 30848 $as_echo_n "checking for Build JDK... " >&6; }
30854 30849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30855 30850 $as_echo "yes, will build it for the host platform" >&6; }
30856 30851 else
30857 30852 BUILD_JDK="\$(JDK_OUTPUTDIR)"
30858 30853 BUILD_JDK_FOUND=yes
30859 30854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30860 30855 $as_echo_n "checking for Build JDK... " >&6; }
30861 30856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30862 30857 $as_echo "yes, will use output dir" >&6; }
30863 30858 fi
30864 30859 fi
30865 30860
30866 30861 JMOD="$BUILD_JDK/bin/jmod"
30867 30862 JLINK="$BUILD_JDK/bin/jlink"
30868 30863
30869 30864
30870 30865
30871 30866 if test "x$BUILD_JDK_FOUND" != "xyes"; then
30872 30867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30873 30868 $as_echo_n "checking for Build JDK... " >&6; }
30874 30869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30875 30870 $as_echo "no" >&6; }
30876 30871 as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30877 30872 fi
30878 30873
30879 30874
30880 30875
30881 30876
30882 30877
30883 30878
30884 30879 ###############################################################################
30885 30880 #
30886 30881 # Configure the sources to use. We can add or override individual directories.
30887 30882 #
30888 30883 ###############################################################################
30889 30884
30890 30885
30891 30886 # Where are the sources.
30892 30887 LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30893 30888 CORBA_TOPDIR="$SRC_ROOT/corba"
30894 30889 JAXP_TOPDIR="$SRC_ROOT/jaxp"
30895 30890 JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30896 30891 HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30897 30892 NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30898 30893 JDK_TOPDIR="$SRC_ROOT/jdk"
30899 30894
30900 30895
30901 30896
30902 30897
30903 30898
30904 30899
30905 30900
30906 30901
30907 30902
30908 30903 # This feature is no longer supported.
30909 30904
30910 30905
30911 30906
30912 30907 # Check whether --with-add-source-root was given.
30913 30908 if test "${with_add_source_root+set}" = set; then :
30914 30909 withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
30915 30910 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30916 30911 fi
30917 30912
30918 30913
30919 30914
30920 30915
30921 30916 # Check whether --with-override-source-root was given.
30922 30917 if test "${with_override_source_root+set}" = set; then :
30923 30918 withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
30924 30919 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30925 30920 fi
30926 30921
30927 30922
30928 30923
30929 30924
30930 30925 # Check whether --with-adds-and-overrides was given.
30931 30926 if test "${with_adds_and_overrides+set}" = set; then :
30932 30927 withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
30933 30928 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30934 30929 fi
30935 30930
30936 30931
30937 30932
30938 30933
30939 30934 # Check whether --with-override-langtools was given.
30940 30935 if test "${with_override_langtools+set}" = set; then :
30941 30936 withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30942 30937 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30943 30938 fi
30944 30939
30945 30940
30946 30941
30947 30942
30948 30943 # Check whether --with-override-corba was given.
30949 30944 if test "${with_override_corba+set}" = set; then :
30950 30945 withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30951 30946 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30952 30947 fi
30953 30948
30954 30949
30955 30950
30956 30951
30957 30952 # Check whether --with-override-jaxp was given.
30958 30953 if test "${with_override_jaxp+set}" = set; then :
30959 30954 withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30960 30955 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30961 30956 fi
30962 30957
30963 30958
30964 30959
30965 30960
30966 30961 # Check whether --with-override-jaxws was given.
30967 30962 if test "${with_override_jaxws+set}" = set; then :
30968 30963 withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30969 30964 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30970 30965 fi
30971 30966
30972 30967
30973 30968
30974 30969
30975 30970 # Check whether --with-override-hotspot was given.
30976 30971 if test "${with_override_hotspot+set}" = set; then :
30977 30972 withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30978 30973 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30979 30974 fi
30980 30975
30981 30976
30982 30977
30983 30978
30984 30979 # Check whether --with-override-nashorn was given.
30985 30980 if test "${with_override_nashorn+set}" = set; then :
30986 30981 withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30987 30982 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30988 30983 fi
30989 30984
30990 30985
30991 30986
30992 30987
30993 30988 # Check whether --with-override-jdk was given.
30994 30989 if test "${with_override_jdk+set}" = set; then :
30995 30990 withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30996 30991 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30997 30992 fi
30998 30993
30999 30994
31000 30995
31001 30996
31002 30997 BUILD_OUTPUT="$OUTPUT_ROOT"
31003 30998
31004 30999
31005 31000 HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31006 31001 BUILD_HOTSPOT=true
31007 31002
31008 31003
31009 31004
31010 31005 # Check whether --with-import-hotspot was given.
31011 31006 if test "${with_import_hotspot+set}" = set; then :
31012 31007 withval=$with_import_hotspot;
31013 31008 fi
31014 31009
31015 31010 if test "x$with_import_hotspot" != x; then
31016 31011 CURDIR="$PWD"
31017 31012 cd "$with_import_hotspot"
31018 31013 HOTSPOT_DIST="`pwd`"
31019 31014 cd "$CURDIR"
31020 31015 if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31021 31016 as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31022 31017 fi
31023 31018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31024 31019 $as_echo_n "checking if hotspot should be imported... " >&6; }
31025 31020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31026 31021 $as_echo "yes from $HOTSPOT_DIST" >&6; }
31027 31022 BUILD_HOTSPOT=false
31028 31023 fi
31029 31024
31030 31025 JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31031 31026
31032 31027
31033 31028
31034 31029
31035 31030 # Check whether --with-import-modules was given.
31036 31031 if test "${with_import_modules+set}" = set; then :
31037 31032 withval=$with_import_modules;
31038 31033 fi
31039 31034
31040 31035
31041 31036 if test "x$with_import_modules" != x \
31042 31037 && test "x$with_import_modules" != "xno"; then
31043 31038 if test -d "$with_import_modules"; then
31044 31039 IMPORT_MODULES_TOPDIR="$with_import_modules"
31045 31040
31046 31041 # Only process if variable expands to non-empty
31047 31042
31048 31043 if test "x$IMPORT_MODULES_TOPDIR" != x; then
31049 31044 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31050 31045
31051 31046 # Input might be given as Windows format, start by converting to
31052 31047 # unix format.
31053 31048 path="$IMPORT_MODULES_TOPDIR"
31054 31049 new_path=`$CYGPATH -u "$path"`
31055 31050
31056 31051 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31057 31052 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31058 31053 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31059 31054 # "foo.exe" is OK but "foo" is an error.
31060 31055 #
31061 31056 # This test is therefore slightly more accurate than "test -f" to check for file precense.
31062 31057 # It is also a way to make sure we got the proper file name for the real test later on.
31063 31058 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31064 31059 if test "x$test_shortpath" = x; then
31065 31060 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31066 31061 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31067 31062 as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31068 31063 fi
31069 31064
31070 31065 # Call helper function which possibly converts this using DOS-style short mode.
31071 31066 # If so, the updated path is stored in $new_path.
31072 31067
31073 31068 input_path="$new_path"
31074 31069 # Check if we need to convert this using DOS-style short mode. If the path
31075 31070 # contains just simple characters, use it. Otherwise (spaces, weird characters),
31076 31071 # take no chances and rewrite it.
31077 31072 # Note: m4 eats our [], so we need to use [ and ] instead.
31078 31073 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31079 31074 if test "x$has_forbidden_chars" != x; then
31080 31075 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31081 31076 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31082 31077 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31083 31078 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31084 31079 # Going to short mode and back again did indeed matter. Since short mode is
31085 31080 # case insensitive, let's make it lowercase to improve readability.
31086 31081 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31087 31082 # Now convert it back to Unix-style (cygpath)
31088 31083 input_path=`$CYGPATH -u "$shortmode_path"`
31089 31084 new_path="$input_path"
31090 31085 fi
31091 31086 fi
31092 31087
31093 31088 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31094 31089 if test "x$test_cygdrive_prefix" = x; then
31095 31090 # As a simple fix, exclude /usr/bin since it's not a real path.
31096 31091 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31097 31092 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31098 31093 # a path prefixed by /cygdrive for fixpath to work.
31099 31094 new_path="$CYGWIN_ROOT_PATH$input_path"
31100 31095 fi
31101 31096 fi
31102 31097
31103 31098
31104 31099 if test "x$path" != "x$new_path"; then
31105 31100 IMPORT_MODULES_TOPDIR="$new_path"
31106 31101 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31107 31102 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31108 31103 fi
31109 31104
31110 31105 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31111 31106
31112 31107 path="$IMPORT_MODULES_TOPDIR"
31113 31108 has_colon=`$ECHO $path | $GREP ^.:`
31114 31109 new_path="$path"
31115 31110 if test "x$has_colon" = x; then
31116 31111 # Not in mixed or Windows style, start by that.
31117 31112 new_path=`cmd //c echo $path`
31118 31113 fi
31119 31114
31120 31115
31121 31116 input_path="$new_path"
31122 31117 # Check if we need to convert this using DOS-style short mode. If the path
31123 31118 # contains just simple characters, use it. Otherwise (spaces, weird characters),
31124 31119 # take no chances and rewrite it.
31125 31120 # Note: m4 eats our [], so we need to use [ and ] instead.
31126 31121 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31127 31122 if test "x$has_forbidden_chars" != x; then
31128 31123 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31129 31124 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31130 31125 fi
31131 31126
31132 31127
31133 31128 windows_path="$new_path"
31134 31129 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31135 31130 unix_path=`$CYGPATH -u "$windows_path"`
31136 31131 new_path="$unix_path"
31137 31132 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31138 31133 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31139 31134 new_path="$unix_path"
31140 31135 fi
31141 31136
31142 31137 if test "x$path" != "x$new_path"; then
31143 31138 IMPORT_MODULES_TOPDIR="$new_path"
31144 31139 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31145 31140 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31146 31141 fi
31147 31142
31148 31143 # Save the first 10 bytes of this path to the storage, so fixpath can work.
31149 31144 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31150 31145
31151 31146 else
31152 31147 # We're on a unix platform. Hooray! :)
31153 31148 path="$IMPORT_MODULES_TOPDIR"
31154 31149 has_space=`$ECHO "$path" | $GREP " "`
31155 31150 if test "x$has_space" != x; then
31156 31151 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31157 31152 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31158 31153 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31159 31154 fi
31160 31155
31161 31156 # Use eval to expand a potential ~
31162 31157 eval path="$path"
31163 31158 if test ! -f "$path" && test ! -d "$path"; then
31164 31159 as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31165 31160 fi
31166 31161
31167 31162 if test -d "$path"; then
31168 31163 IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31169 31164 else
31170 31165 dir="`$DIRNAME "$path"`"
31171 31166 base="`$BASENAME "$path"`"
31172 31167 IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31173 31168 fi
31174 31169 fi
31175 31170 fi
31176 31171
31177 31172 elif test -e "$with_import_modules"; then
31178 31173 IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31179 31174 $RM -rf "$IMPORT_MODULES_TOPDIR"
31180 31175 $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31181 31176 if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31182 31177 as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31183 31178 fi
31184 31179 else
31185 31180 as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31186 31181 fi
31187 31182 fi
31188 31183
31189 31184 if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31190 31185 IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31191 31186 fi
31192 31187 if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31193 31188 IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31194 31189 fi
31195 31190 if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31196 31191 IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31197 31192 fi
31198 31193 if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31199 31194 IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31200 31195 fi
31201 31196 if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31202 31197 IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31203 31198 fi
31204 31199 if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31205 31200 IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31206 31201 fi
31207 31202
31208 31203
31209 31204
31210 31205
31211 31206
31212 31207
31213 31208
31214 31209
31215 31210
31216 31211 ###############################################################################
31217 31212 #
31218 31213 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31219 31214 # native code.
31220 31215 #
31221 31216 ###############################################################################
31222 31217
31223 31218 # See if we are doing a complete static build or not
31224 31219
31225 31220 # Check whether --enable-static-build was given.
31226 31221 if test "${enable_static_build+set}" = set; then :
31227 31222 enableval=$enable_static_build;
31228 31223 fi
31229 31224
31230 31225 STATIC_BUILD=false
31231 31226 if test "x$enable_static_build" = "xyes"; then
31232 31227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31233 31228 $as_echo_n "checking if static build is enabled... " >&6; }
31234 31229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31235 31230 $as_echo "yes" >&6; }
31236 31231 if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31237 31232 as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31238 31233 fi
31239 31234 STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31240 31235 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31241 31236 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31242 31237 CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31243 31238 CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31244 31239 STATIC_BUILD=true
31245 31240 elif test "x$enable_static_build" = "xno"; then
31246 31241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31247 31242 $as_echo_n "checking if static build is enabled... " >&6; }
31248 31243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31249 31244 $as_echo "no" >&6; }
31250 31245 elif test "x$enable_static_build" != "x"; then
31251 31246 as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31252 31247 fi
31253 31248
31254 31249
31255 31250
31256 31251
31257 31252 # First determine the toolchain type (compiler family)
31258 31253
31259 31254
31260 31255 # Check whether --with-toolchain-type was given.
31261 31256 if test "${with_toolchain_type+set}" = set; then :
31262 31257 withval=$with_toolchain_type;
31263 31258 fi
31264 31259
31265 31260
31266 31261 # Use indirect variable referencing
31267 31262 toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31268 31263 VALID_TOOLCHAINS=${!toolchain_var_name}
31269 31264
31270 31265 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31271 31266 if test -n "$XCODEBUILD"; then
31272 31267 # On Mac OS X, default toolchain to clang after Xcode 5
31273 31268 XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31274 31269 $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31275 31270 if test $? -ne 0; then
31276 31271 as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31277 31272 fi
31278 31273 XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31279 31274 $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31280 31275 $CUT -f 1 -d .`
31281 31276 { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31282 31277 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31283 31278 if test $XCODE_MAJOR_VERSION -ge 5; then
31284 31279 DEFAULT_TOOLCHAIN="clang"
31285 31280 else
31286 31281 DEFAULT_TOOLCHAIN="gcc"
31287 31282 fi
31288 31283 else
31289 31284 # If Xcode is not installed, but the command line tools are
31290 31285 # then we can't run xcodebuild. On these systems we should
31291 31286 # default to clang
31292 31287 DEFAULT_TOOLCHAIN="clang"
31293 31288 fi
31294 31289 else
31295 31290 # First toolchain type in the list is the default
31296 31291 DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31297 31292 fi
31298 31293
31299 31294 if test "x$with_toolchain_type" = xlist; then
31300 31295 # List all toolchains
31301 31296 { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31302 31297 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31303 31298 for toolchain in $VALID_TOOLCHAINS; do
31304 31299 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31305 31300 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31306 31301 $PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31307 31302 done
31308 31303
31309 31304 exit 0
31310 31305 elif test "x$with_toolchain_type" != x; then
31311 31306 # User override; check that it is valid
31312 31307 if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31313 31308 { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31314 31309 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31315 31310 { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31316 31311 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31317 31312 as_fn_error $? "Cannot continue." "$LINENO" 5
31318 31313 fi
31319 31314 TOOLCHAIN_TYPE=$with_toolchain_type
31320 31315 else
31321 31316 # No flag given, use default
31322 31317 TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31323 31318 fi
31324 31319
31325 31320
31326 31321 TOOLCHAIN_CC_BINARY_clang="clang"
31327 31322 TOOLCHAIN_CC_BINARY_gcc="gcc"
31328 31323 TOOLCHAIN_CC_BINARY_microsoft="cl"
31329 31324 TOOLCHAIN_CC_BINARY_solstudio="cc"
31330 31325 TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31331 31326
31332 31327 TOOLCHAIN_CXX_BINARY_clang="clang++"
31333 31328 TOOLCHAIN_CXX_BINARY_gcc="g++"
31334 31329 TOOLCHAIN_CXX_BINARY_microsoft="cl"
31335 31330 TOOLCHAIN_CXX_BINARY_solstudio="CC"
31336 31331 TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31337 31332
31338 31333 # Use indirect variable referencing
31339 31334 toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31340 31335 TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31341 31336 toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31342 31337 TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31343 31338 toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31344 31339 TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31345 31340 toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31346 31341 TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31347 31342
31348 31343
31349 31344 # Define filename patterns
31350 31345 if test "x$OPENJDK_TARGET_OS" = xwindows; then
31351 31346 LIBRARY_PREFIX=
31352 31347 SHARED_LIBRARY_SUFFIX='.dll'
31353 31348 STATIC_LIBRARY_SUFFIX='.lib'
31354 31349 SHARED_LIBRARY='$1.dll'
31355 31350 STATIC_LIBRARY='$1.lib'
31356 31351 OBJ_SUFFIX='.obj'
31357 31352 EXE_SUFFIX='.exe'
31358 31353 else
31359 31354 LIBRARY_PREFIX=lib
31360 31355 SHARED_LIBRARY_SUFFIX='.so'
31361 31356 STATIC_LIBRARY_SUFFIX='.a'
31362 31357 SHARED_LIBRARY='lib$1.so'
31363 31358 STATIC_LIBRARY='lib$1.a'
31364 31359 OBJ_SUFFIX='.o'
31365 31360 EXE_SUFFIX=''
31366 31361 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31367 31362 # For full static builds, we're overloading the SHARED_LIBRARY
31368 31363 # variables in order to limit the amount of changes required.
31369 31364 # It would be better to remove SHARED and just use LIBRARY and
31370 31365 # LIBRARY_SUFFIX for libraries that can be built either
31371 31366 # shared or static and use STATIC_* for libraries that are
31372 31367 # always built statically.
31373 31368 if test "x$STATIC_BUILD" = xtrue; then
31374 31369 SHARED_LIBRARY='lib$1.a'
31375 31370 SHARED_LIBRARY_SUFFIX='.a'
31376 31371 else
31377 31372 SHARED_LIBRARY='lib$1.dylib'
31378 31373 SHARED_LIBRARY_SUFFIX='.dylib'
31379 31374 fi
31380 31375 fi
31381 31376 fi
31382 31377
31383 31378
31384 31379
31385 31380
31386 31381
31387 31382
31388 31383
31389 31384
31390 31385
31391 31386
31392 31387 if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31393 31388 { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31394 31389 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31395 31390 else
31396 31391 { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31397 31392 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31398 31393 fi
31399 31394
31400 31395
31401 31396 # User supplied flags should be used when configure detects compilers
31402 31397
31403 31398 if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31404 31399 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31405 31400 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31406 31401 fi
31407 31402
31408 31403 if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31409 31404 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31410 31405 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31411 31406 fi
31412 31407
31413 31408 if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31414 31409 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31415 31410 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31416 31411 fi
31417 31412
31418 31413
31419 31414 # Check whether --with-extra-cflags was given.
31420 31415 if test "${with_extra_cflags+set}" = set; then :
31421 31416 withval=$with_extra_cflags;
31422 31417 fi
31423 31418
31424 31419
31425 31420
31426 31421 # Check whether --with-extra-cxxflags was given.
31427 31422 if test "${with_extra_cxxflags+set}" = set; then :
31428 31423 withval=$with_extra_cxxflags;
31429 31424 fi
31430 31425
31431 31426
31432 31427
31433 31428 # Check whether --with-extra-ldflags was given.
31434 31429 if test "${with_extra_ldflags+set}" = set; then :
31435 31430 withval=$with_extra_ldflags;
31436 31431 fi
31437 31432
31438 31433
31439 31434 EXTRA_CFLAGS="$with_extra_cflags"
31440 31435 EXTRA_CXXFLAGS="$with_extra_cxxflags"
31441 31436 EXTRA_LDFLAGS="$with_extra_ldflags"
31442 31437
31443 31438 # Hotspot needs these set in their legacy form
31444 31439 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31445 31440 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31446 31441 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31447 31442
31448 31443
31449 31444
31450 31445
31451 31446
31452 31447
31453 31448
31454 31449
31455 31450
31456 31451 # The global CFLAGS and LDLAGS variables are used by configure tests and
31457 31452 # should include the extra parameters
31458 31453 CFLAGS="$EXTRA_CFLAGS"
31459 31454 CXXFLAGS="$EXTRA_CXXFLAGS"
31460 31455 LDFLAGS="$EXTRA_LDFLAGS"
31461 31456 CPPFLAGS=""
31462 31457
31463 31458 # The sysroot cflags are needed for configure to be able to run the compilers
↓ open down ↓ |
14237 lines elided |
↑ open up ↑ |
31464 31459
31465 31460 if test "x$SYSROOT" != "x"; then
31466 31461 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31467 31462 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31468 31463 # Solaris Studio does not have a concept of sysroot. Instead we must
31469 31464 # make sure the default include and lib dirs are appended to each
31470 31465 # compile and link command line. Must also add -I-xbuiltin to enable
31471 31466 # inlining of system functions and intrinsics.
31472 31467 SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31473 31468 SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31474 - -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31475 - -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31469 + -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31476 31470 fi
31477 31471 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31478 31472 SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31479 31473 SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31480 31474 elif test "x$TOOLCHAIN_TYPE" = xclang; then
31481 31475 SYSROOT_CFLAGS="-isysroot $SYSROOT"
31482 31476 SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31483 31477 fi
31484 31478 # Propagate the sysroot args to hotspot
31485 31479 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31486 31480 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31487 31481 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31488 31482 # The global CFLAGS and LDFLAGS variables need these for configure to function
31489 31483 CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31490 31484 CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31491 31485 CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31492 31486 LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31493 31487 fi
31494 31488
31495 31489 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31496 31490 # We also need -iframework<path>/System/Library/Frameworks
31497 31491 SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31498 31492 SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31499 31493 # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31500 31494 # set this here so it doesn't have to be peppered throughout the forest
31501 31495 SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31502 31496 SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31503 31497 fi
31504 31498
31505 31499
31506 31500
31507 31501
31508 31502
31509 31503 # Then detect the actual binaries needed
31510 31504
31511 31505 # FIXME: Is this needed?
31512 31506 ac_ext=cpp
31513 31507 ac_cpp='$CXXCPP $CPPFLAGS'
31514 31508 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31515 31509 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31516 31510 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31517 31511
31518 31512
31519 31513 # Store the CFLAGS etc passed to the configure script.
31520 31514 ORG_CFLAGS="$CFLAGS"
31521 31515 ORG_CXXFLAGS="$CXXFLAGS"
31522 31516
31523 31517 # autoconf magic only relies on PATH, so update it if tools dir is specified
31524 31518 OLD_PATH="$PATH"
31525 31519
31526 31520 # On Windows, we need to detect the visual studio installation first.
31527 31521 # This will change the PATH, but we need to keep that new PATH even
31528 31522 # after toolchain detection is done, since the compiler (on x86) uses
31529 31523 # it for DLL resolution in runtime.
31530 31524 if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31531 31525 && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31532 31526
31533 31527 # Store path to cygwin link.exe to help excluding it when searching for
31534 31528 # VS linker. This must be done before changing the PATH when looking for VS.
31535 31529 # Extract the first word of "link", so it can be a program name with args.
31536 31530 set dummy link; ac_word=$2
31537 31531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31538 31532 $as_echo_n "checking for $ac_word... " >&6; }
31539 31533 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31540 31534 $as_echo_n "(cached) " >&6
31541 31535 else
31542 31536 case $CYGWIN_LINK in
31543 31537 [\\/]* | ?:[\\/]*)
31544 31538 ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31545 31539 ;;
31546 31540 *)
31547 31541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31548 31542 for as_dir in $PATH
31549 31543 do
31550 31544 IFS=$as_save_IFS
31551 31545 test -z "$as_dir" && as_dir=.
31552 31546 for ac_exec_ext in '' $ac_executable_extensions; do
31553 31547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31554 31548 ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31555 31549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31556 31550 break 2
31557 31551 fi
31558 31552 done
31559 31553 done
31560 31554 IFS=$as_save_IFS
31561 31555
31562 31556 ;;
31563 31557 esac
31564 31558 fi
31565 31559 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31566 31560 if test -n "$CYGWIN_LINK"; then
31567 31561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31568 31562 $as_echo "$CYGWIN_LINK" >&6; }
31569 31563 else
31570 31564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31571 31565 $as_echo "no" >&6; }
31572 31566 fi
31573 31567
31574 31568
31575 31569 if test "x$CYGWIN_LINK" != x; then
31576 31570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31577 31571 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31578 31572 "$CYGWIN_LINK" --version > /dev/null
31579 31573 if test $? -eq 0 ; then
31580 31574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31581 31575 $as_echo "yes" >&6; }
31582 31576 else
31583 31577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31584 31578 $as_echo "no" >&6; }
31585 31579 # This might be the VS linker. Don't exclude it later on.
31586 31580 CYGWIN_LINK=""
31587 31581 fi
31588 31582 fi
31589 31583
31590 31584 # First-hand choice is to locate and run the vsvars bat file.
31591 31585
31592 31586
31593 31587 # Check whether --with-toolchain-version was given.
31594 31588 if test "${with_toolchain_version+set}" = set; then :
31595 31589 withval=$with_toolchain_version;
31596 31590 fi
31597 31591
31598 31592
31599 31593 if test "x$with_toolchain_version" = xlist; then
31600 31594 # List all toolchains
31601 31595 { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31602 31596 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31603 31597 for version in $VALID_VS_VERSIONS; do
31604 31598 eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31605 31599 $PRINTF " %-10s %s\n" $version "$VS_DESCRIPTION"
31606 31600 done
31607 31601
31608 31602 exit 0
31609 31603 elif test "x$DEVKIT_VS_VERSION" != x; then
31610 31604 VS_VERSION=$DEVKIT_VS_VERSION
31611 31605 TOOLCHAIN_VERSION=$VS_VERSION
31612 31606 eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31613 31607 eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31614 31608 eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31615 31609 eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31616 31610 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31617 31611 VS_PATH="$TOOLCHAIN_PATH:$PATH"
31618 31612
31619 31613 # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31620 31614 # can still be exported as INCLUDE for compiler invocations without
31621 31615 # SYSROOT_CFLAGS
31622 31616 OLDIFS="$IFS"
31623 31617 IFS=";"
31624 31618 for i in $DEVKIT_VS_INCLUDE; do
31625 31619 ipath=$i
31626 31620
31627 31621 unix_path="$ipath"
31628 31622 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31629 31623 windows_path=`$CYGPATH -m "$unix_path"`
31630 31624 ipath="$windows_path"
31631 31625 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31632 31626 windows_path=`cmd //c echo $unix_path`
31633 31627 ipath="$windows_path"
31634 31628 fi
31635 31629
31636 31630 VS_INCLUDE="$VS_INCLUDE;$ipath"
31637 31631 done
31638 31632 # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31639 31633 # as LIB for compiler invocations without SYSROOT_LDFLAGS
31640 31634 for i in $DEVKIT_VS_LIB; do
31641 31635 libpath=$i
31642 31636
31643 31637 unix_path="$libpath"
31644 31638 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31645 31639 windows_path=`$CYGPATH -m "$unix_path"`
31646 31640 libpath="$windows_path"
31647 31641 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31648 31642 windows_path=`cmd //c echo $unix_path`
31649 31643 libpath="$windows_path"
31650 31644 fi
31651 31645
31652 31646 VS_LIB="$VS_LIB;$libpath"
31653 31647 done
31654 31648 IFS="$OLDIFS"
31655 31649
31656 31650 { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31657 31651 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31658 31652
31659 31653 elif test "x$with_toolchain_version" != x; then
31660 31654 # User override; check that it is valid
31661 31655 if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31662 31656 { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31663 31657 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31664 31658 { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31665 31659 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31666 31660 as_fn_error $? "Cannot continue." "$LINENO" 5
31667 31661 fi
31668 31662 VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31669 31663 else
31670 31664 # No flag given, use default
31671 31665 VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31672 31666 fi
31673 31667
31674 31668 for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31675 31669
31676 31670 VS_VERSION="$VS_VERSION"
31677 31671 eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31678 31672 eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31679 31673 eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31680 31674 eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31681 31675
31682 31676 # When using --with-tools-dir, assume it points to the correct and default
31683 31677 # version of Visual Studio or that --with-toolchain-version was also set.
31684 31678 if test "x$with_tools_dir" != x; then
31685 31679
31686 31680 if test "x$VS_ENV_CMD" = x; then
31687 31681 VS_VERSION="${VS_VERSION}"
31688 31682 VS_BASE="$with_tools_dir/../.."
31689 31683 METHOD="--with-tools-dir"
31690 31684
31691 31685 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31692 31686 VCVARSFILE="vc/bin/vcvars32.bat"
31693 31687 else
31694 31688 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31695 31689 fi
31696 31690
31697 31691
31698 31692 windows_path="$VS_BASE"
31699 31693 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31700 31694 unix_path=`$CYGPATH -u "$windows_path"`
31701 31695 VS_BASE="$unix_path"
31702 31696 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31703 31697 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31704 31698 VS_BASE="$unix_path"
31705 31699 fi
31706 31700
31707 31701 if test -d "$VS_BASE"; then
31708 31702 if test -f "$VS_BASE/$VCVARSFILE"; then
31709 31703 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31710 31704 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31711 31705 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31712 31706 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31713 31707 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31714 31708 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31715 31709 else
31716 31710 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31717 31711 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31718 31712 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31719 31713 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31720 31714 fi
31721 31715 fi
31722 31716 fi
31723 31717
31724 31718
31725 31719 if test "x$VS_ENV_CMD" = x; then
31726 31720 VS_VERSION="${VS_VERSION}"
31727 31721 VS_BASE="$with_tools_dir/../../.."
31728 31722 METHOD="--with-tools-dir"
31729 31723
31730 31724 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31731 31725 VCVARSFILE="vc/bin/vcvars32.bat"
31732 31726 else
31733 31727 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31734 31728 fi
31735 31729
31736 31730
31737 31731 windows_path="$VS_BASE"
31738 31732 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31739 31733 unix_path=`$CYGPATH -u "$windows_path"`
31740 31734 VS_BASE="$unix_path"
31741 31735 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31742 31736 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31743 31737 VS_BASE="$unix_path"
31744 31738 fi
31745 31739
31746 31740 if test -d "$VS_BASE"; then
31747 31741 if test -f "$VS_BASE/$VCVARSFILE"; then
31748 31742 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31749 31743 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31750 31744 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31751 31745 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31752 31746 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31753 31747 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31754 31748 else
31755 31749 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31756 31750 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31757 31751 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31758 31752 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31759 31753 fi
31760 31754 fi
31761 31755 fi
31762 31756
31763 31757 if test "x$VS_ENV_CMD" = x; then
31764 31758 # Having specified an argument which is incorrect will produce an instant failure;
31765 31759 # we should not go on looking
31766 31760 { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31767 31761 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31768 31762 { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31769 31763 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31770 31764 { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31771 31765 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31772 31766 as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31773 31767 fi
31774 31768 fi
31775 31769
31776 31770 VS_ENV_CMD=""
31777 31771 VS_ENV_ARGS=""
31778 31772
31779 31773 if test "x$VS_COMNTOOLS" != x; then
31780 31774
31781 31775 if test "x$VS_ENV_CMD" = x; then
31782 31776 VS_VERSION="${VS_VERSION}"
31783 31777 VS_BASE="$VS_COMNTOOLS/../.."
31784 31778 METHOD="$VS_COMNTOOLS_VAR variable"
31785 31779
31786 31780 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31787 31781 VCVARSFILE="vc/bin/vcvars32.bat"
31788 31782 else
31789 31783 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31790 31784 fi
31791 31785
31792 31786
31793 31787 windows_path="$VS_BASE"
31794 31788 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31795 31789 unix_path=`$CYGPATH -u "$windows_path"`
31796 31790 VS_BASE="$unix_path"
31797 31791 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31798 31792 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31799 31793 VS_BASE="$unix_path"
31800 31794 fi
31801 31795
31802 31796 if test -d "$VS_BASE"; then
31803 31797 if test -f "$VS_BASE/$VCVARSFILE"; then
31804 31798 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31805 31799 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31806 31800 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31807 31801 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31808 31802 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31809 31803 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31810 31804 else
31811 31805 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31812 31806 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31813 31807 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31814 31808 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31815 31809 fi
31816 31810 fi
31817 31811 fi
31818 31812
31819 31813 fi
31820 31814 if test "x$PROGRAMFILES" != x; then
31821 31815
31822 31816 if test "x$VS_ENV_CMD" = x; then
31823 31817 VS_VERSION="${VS_VERSION}"
31824 31818 VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31825 31819 METHOD="well-known name"
31826 31820
31827 31821 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31828 31822 VCVARSFILE="vc/bin/vcvars32.bat"
31829 31823 else
31830 31824 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31831 31825 fi
31832 31826
31833 31827
31834 31828 windows_path="$VS_BASE"
31835 31829 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31836 31830 unix_path=`$CYGPATH -u "$windows_path"`
31837 31831 VS_BASE="$unix_path"
31838 31832 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31839 31833 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31840 31834 VS_BASE="$unix_path"
31841 31835 fi
31842 31836
31843 31837 if test -d "$VS_BASE"; then
31844 31838 if test -f "$VS_BASE/$VCVARSFILE"; then
31845 31839 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31846 31840 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31847 31841 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31848 31842 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31849 31843 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31850 31844 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31851 31845 else
31852 31846 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31853 31847 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31854 31848 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31855 31849 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31856 31850 fi
31857 31851 fi
31858 31852 fi
31859 31853
31860 31854 fi
31861 31855 # Work around the insanely named ProgramFiles(x86) env variable
31862 31856 PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31863 31857 if test "x$PROGRAMFILES_X86" != x; then
31864 31858
31865 31859 if test "x$VS_ENV_CMD" = x; then
31866 31860 VS_VERSION="${VS_VERSION}"
31867 31861 VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31868 31862 METHOD="well-known name"
31869 31863
31870 31864 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31871 31865 VCVARSFILE="vc/bin/vcvars32.bat"
31872 31866 else
31873 31867 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31874 31868 fi
31875 31869
31876 31870
31877 31871 windows_path="$VS_BASE"
31878 31872 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31879 31873 unix_path=`$CYGPATH -u "$windows_path"`
31880 31874 VS_BASE="$unix_path"
31881 31875 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31882 31876 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31883 31877 VS_BASE="$unix_path"
31884 31878 fi
31885 31879
31886 31880 if test -d "$VS_BASE"; then
31887 31881 if test -f "$VS_BASE/$VCVARSFILE"; then
31888 31882 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31889 31883 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31890 31884 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31891 31885 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31892 31886 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31893 31887 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31894 31888 else
31895 31889 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31896 31890 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31897 31891 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31898 31892 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31899 31893 fi
31900 31894 fi
31901 31895 fi
31902 31896
31903 31897 fi
31904 31898
31905 31899 if test "x$VS_ENV_CMD" = x; then
31906 31900 VS_VERSION="${VS_VERSION}"
31907 31901 VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31908 31902 METHOD="well-known name"
31909 31903
31910 31904 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31911 31905 VCVARSFILE="vc/bin/vcvars32.bat"
31912 31906 else
31913 31907 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31914 31908 fi
31915 31909
31916 31910
31917 31911 windows_path="$VS_BASE"
31918 31912 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31919 31913 unix_path=`$CYGPATH -u "$windows_path"`
31920 31914 VS_BASE="$unix_path"
31921 31915 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31922 31916 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31923 31917 VS_BASE="$unix_path"
31924 31918 fi
31925 31919
31926 31920 if test -d "$VS_BASE"; then
31927 31921 if test -f "$VS_BASE/$VCVARSFILE"; then
31928 31922 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31929 31923 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31930 31924 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31931 31925 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31932 31926 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31933 31927 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31934 31928 else
31935 31929 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31936 31930 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31937 31931 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31938 31932 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31939 31933 fi
31940 31934 fi
31941 31935 fi
31942 31936
31943 31937
31944 31938 if test "x$VS_ENV_CMD" = x; then
31945 31939 VS_VERSION="${VS_VERSION}"
31946 31940 VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31947 31941 METHOD="well-known name"
31948 31942
31949 31943 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31950 31944 VCVARSFILE="vc/bin/vcvars32.bat"
31951 31945 else
31952 31946 VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31953 31947 fi
31954 31948
31955 31949
31956 31950 windows_path="$VS_BASE"
31957 31951 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31958 31952 unix_path=`$CYGPATH -u "$windows_path"`
31959 31953 VS_BASE="$unix_path"
31960 31954 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31961 31955 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31962 31956 VS_BASE="$unix_path"
31963 31957 fi
31964 31958
31965 31959 if test -d "$VS_BASE"; then
31966 31960 if test -f "$VS_BASE/$VCVARSFILE"; then
31967 31961 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31968 31962 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31969 31963 VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31970 31964 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31971 31965 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31972 31966 eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31973 31967 else
31974 31968 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31975 31969 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31976 31970 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31977 31971 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31978 31972 fi
31979 31973 fi
31980 31974 fi
31981 31975
31982 31976
31983 31977 if test "x$SDK_INSTALL_DIR" != x; then
31984 31978 if test "x$ProgramW6432" != x; then
31985 31979
31986 31980 if test "x$VS_ENV_CMD" = x; then
31987 31981 VS_VERSION="${VS_VERSION}"
31988 31982 WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31989 31983 METHOD="well-known name"
31990 31984
31991 31985 windows_path="$WIN_SDK_BASE"
31992 31986 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31993 31987 unix_path=`$CYGPATH -u "$windows_path"`
31994 31988 WIN_SDK_BASE="$unix_path"
31995 31989 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31996 31990 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31997 31991 WIN_SDK_BASE="$unix_path"
31998 31992 fi
31999 31993
32000 31994 if test -d "$WIN_SDK_BASE"; then
32001 31995 # There have been cases of partial or broken SDK installations. A missing
32002 31996 # lib dir is not going to work.
32003 31997 if test ! -d "$WIN_SDK_BASE/lib"; then
32004 31998 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32005 31999 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32006 32000 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32007 32001 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32008 32002 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32009 32003 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32010 32004 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32011 32005 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32012 32006 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32013 32007 VS_ENV_ARGS="/x86"
32014 32008 else
32015 32009 VS_ENV_ARGS="/x64"
32016 32010 fi
32017 32011 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32018 32012 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32019 32013 # TODO: improve detection for other versions of SDK
32020 32014 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32021 32015 else
32022 32016 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32023 32017 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32024 32018 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32025 32019 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32026 32020 fi
32027 32021 fi
32028 32022 fi
32029 32023
32030 32024 fi
32031 32025 if test "x$PROGRAMW6432" != x; then
32032 32026
32033 32027 if test "x$VS_ENV_CMD" = x; then
32034 32028 VS_VERSION="${VS_VERSION}"
32035 32029 WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32036 32030 METHOD="well-known name"
32037 32031
32038 32032 windows_path="$WIN_SDK_BASE"
32039 32033 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32040 32034 unix_path=`$CYGPATH -u "$windows_path"`
32041 32035 WIN_SDK_BASE="$unix_path"
32042 32036 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32043 32037 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32044 32038 WIN_SDK_BASE="$unix_path"
32045 32039 fi
32046 32040
32047 32041 if test -d "$WIN_SDK_BASE"; then
32048 32042 # There have been cases of partial or broken SDK installations. A missing
32049 32043 # lib dir is not going to work.
32050 32044 if test ! -d "$WIN_SDK_BASE/lib"; then
32051 32045 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32052 32046 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32053 32047 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32054 32048 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32055 32049 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32056 32050 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32057 32051 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32058 32052 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32059 32053 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32060 32054 VS_ENV_ARGS="/x86"
32061 32055 else
32062 32056 VS_ENV_ARGS="/x64"
32063 32057 fi
32064 32058 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32065 32059 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32066 32060 # TODO: improve detection for other versions of SDK
32067 32061 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32068 32062 else
32069 32063 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32070 32064 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32071 32065 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32072 32066 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32073 32067 fi
32074 32068 fi
32075 32069 fi
32076 32070
32077 32071 fi
32078 32072 if test "x$PROGRAMFILES" != x; then
32079 32073
32080 32074 if test "x$VS_ENV_CMD" = x; then
32081 32075 VS_VERSION="${VS_VERSION}"
32082 32076 WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32083 32077 METHOD="well-known name"
32084 32078
32085 32079 windows_path="$WIN_SDK_BASE"
32086 32080 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32087 32081 unix_path=`$CYGPATH -u "$windows_path"`
32088 32082 WIN_SDK_BASE="$unix_path"
32089 32083 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32090 32084 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32091 32085 WIN_SDK_BASE="$unix_path"
32092 32086 fi
32093 32087
32094 32088 if test -d "$WIN_SDK_BASE"; then
32095 32089 # There have been cases of partial or broken SDK installations. A missing
32096 32090 # lib dir is not going to work.
32097 32091 if test ! -d "$WIN_SDK_BASE/lib"; then
32098 32092 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32099 32093 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32100 32094 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32101 32095 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32102 32096 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32103 32097 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32104 32098 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32105 32099 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32106 32100 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32107 32101 VS_ENV_ARGS="/x86"
32108 32102 else
32109 32103 VS_ENV_ARGS="/x64"
32110 32104 fi
32111 32105 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32112 32106 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32113 32107 # TODO: improve detection for other versions of SDK
32114 32108 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32115 32109 else
32116 32110 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32117 32111 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32118 32112 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32119 32113 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32120 32114 fi
32121 32115 fi
32122 32116 fi
32123 32117
32124 32118 fi
32125 32119
32126 32120 if test "x$VS_ENV_CMD" = x; then
32127 32121 VS_VERSION="${VS_VERSION}"
32128 32122 WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32129 32123 METHOD="well-known name"
32130 32124
32131 32125 windows_path="$WIN_SDK_BASE"
32132 32126 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32133 32127 unix_path=`$CYGPATH -u "$windows_path"`
32134 32128 WIN_SDK_BASE="$unix_path"
32135 32129 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32136 32130 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32137 32131 WIN_SDK_BASE="$unix_path"
32138 32132 fi
32139 32133
32140 32134 if test -d "$WIN_SDK_BASE"; then
32141 32135 # There have been cases of partial or broken SDK installations. A missing
32142 32136 # lib dir is not going to work.
32143 32137 if test ! -d "$WIN_SDK_BASE/lib"; then
32144 32138 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32145 32139 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32146 32140 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32147 32141 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32148 32142 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32149 32143 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32150 32144 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32151 32145 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32152 32146 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32153 32147 VS_ENV_ARGS="/x86"
32154 32148 else
32155 32149 VS_ENV_ARGS="/x64"
32156 32150 fi
32157 32151 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32158 32152 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32159 32153 # TODO: improve detection for other versions of SDK
32160 32154 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32161 32155 else
32162 32156 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32163 32157 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32164 32158 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32165 32159 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32166 32160 fi
32167 32161 fi
32168 32162 fi
32169 32163
32170 32164
32171 32165 if test "x$VS_ENV_CMD" = x; then
32172 32166 VS_VERSION="${VS_VERSION}"
32173 32167 WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32174 32168 METHOD="well-known name"
32175 32169
32176 32170 windows_path="$WIN_SDK_BASE"
32177 32171 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32178 32172 unix_path=`$CYGPATH -u "$windows_path"`
32179 32173 WIN_SDK_BASE="$unix_path"
32180 32174 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32181 32175 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32182 32176 WIN_SDK_BASE="$unix_path"
32183 32177 fi
32184 32178
32185 32179 if test -d "$WIN_SDK_BASE"; then
32186 32180 # There have been cases of partial or broken SDK installations. A missing
32187 32181 # lib dir is not going to work.
32188 32182 if test ! -d "$WIN_SDK_BASE/lib"; then
32189 32183 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32190 32184 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32191 32185 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32192 32186 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32193 32187 elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32194 32188 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32195 32189 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32196 32190 VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32197 32191 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32198 32192 VS_ENV_ARGS="/x86"
32199 32193 else
32200 32194 VS_ENV_ARGS="/x64"
32201 32195 fi
32202 32196 # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32203 32197 # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32204 32198 # TODO: improve detection for other versions of SDK
32205 32199 eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32206 32200 else
32207 32201 { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32208 32202 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32209 32203 { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32210 32204 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32211 32205 fi
32212 32206 fi
32213 32207 fi
32214 32208
32215 32209 fi
32216 32210
32217 32211 if test "x$VS_ENV_CMD" != x; then
32218 32212 TOOLCHAIN_VERSION=$VS_VERSION
32219 32213 eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32220 32214 eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32221 32215 eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32222 32216 eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32223 32217 # The rest of the variables are already evaled while probing
32224 32218 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32225 32219 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32226 32220 break
32227 32221 fi
32228 32222 done
32229 32223
32230 32224
32231 32225 # If we have a devkit, skip all of the below.
32232 32226 if test "x$DEVKIT_VS_VERSION" = x; then
32233 32227 if test "x$VS_ENV_CMD" != x; then
32234 32228 # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32235 32229
32236 32230 # Only process if variable expands to non-empty
32237 32231
32238 32232 if test "x$VS_ENV_CMD" != x; then
32239 32233 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32240 32234
32241 32235 # First separate the path from the arguments. This will split at the first
32242 32236 # space.
32243 32237 complete="$VS_ENV_CMD"
32244 32238 path="${complete%% *}"
32245 32239 tmp="$complete EOL"
32246 32240 arguments="${tmp#* }"
32247 32241
32248 32242 # Input might be given as Windows format, start by converting to
32249 32243 # unix format.
32250 32244 new_path=`$CYGPATH -u "$path"`
32251 32245
32252 32246 # Now try to locate executable using which
32253 32247 new_path=`$WHICH "$new_path" 2> /dev/null`
32254 32248 # bat and cmd files are not always considered executable in cygwin causing which
32255 32249 # to not find them
32256 32250 if test "x$new_path" = x \
32257 32251 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32258 32252 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32259 32253 new_path=`$CYGPATH -u "$path"`
32260 32254 fi
32261 32255 if test "x$new_path" = x; then
32262 32256 # Oops. Which didn't find the executable.
32263 32257 # The splitting of arguments from the executable at a space might have been incorrect,
32264 32258 # since paths with space are more likely in Windows. Give it another try with the whole
32265 32259 # argument.
32266 32260 path="$complete"
32267 32261 arguments="EOL"
32268 32262 new_path=`$CYGPATH -u "$path"`
32269 32263 new_path=`$WHICH "$new_path" 2> /dev/null`
32270 32264 # bat and cmd files are not always considered executable in cygwin causing which
32271 32265 # to not find them
32272 32266 if test "x$new_path" = x \
32273 32267 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32274 32268 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32275 32269 new_path=`$CYGPATH -u "$path"`
32276 32270 fi
32277 32271 if test "x$new_path" = x; then
32278 32272 # It's still not found. Now this is an unrecoverable error.
32279 32273 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32280 32274 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32281 32275 has_space=`$ECHO "$complete" | $GREP " "`
32282 32276 if test "x$has_space" != x; then
32283 32277 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32284 32278 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32285 32279 fi
32286 32280 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32287 32281 fi
32288 32282 fi
32289 32283
32290 32284 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32291 32285 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32292 32286 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32293 32287 # "foo.exe" is OK but "foo" is an error.
32294 32288 #
32295 32289 # This test is therefore slightly more accurate than "test -f" to check for file presence.
32296 32290 # It is also a way to make sure we got the proper file name for the real test later on.
32297 32291 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32298 32292 if test "x$test_shortpath" = x; then
32299 32293 # Short path failed, file does not exist as specified.
32300 32294 # Try adding .exe or .cmd
32301 32295 if test -f "${new_path}.exe"; then
32302 32296 input_to_shortpath="${new_path}.exe"
32303 32297 elif test -f "${new_path}.cmd"; then
32304 32298 input_to_shortpath="${new_path}.cmd"
32305 32299 else
32306 32300 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32307 32301 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32308 32302 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32309 32303 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32310 32304 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32311 32305 fi
32312 32306 else
32313 32307 input_to_shortpath="$new_path"
32314 32308 fi
32315 32309
32316 32310 # Call helper function which possibly converts this using DOS-style short mode.
32317 32311 # If so, the updated path is stored in $new_path.
32318 32312 new_path="$input_to_shortpath"
32319 32313
32320 32314 input_path="$input_to_shortpath"
32321 32315 # Check if we need to convert this using DOS-style short mode. If the path
32322 32316 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32323 32317 # take no chances and rewrite it.
32324 32318 # Note: m4 eats our [], so we need to use [ and ] instead.
32325 32319 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32326 32320 if test "x$has_forbidden_chars" != x; then
32327 32321 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32328 32322 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32329 32323 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32330 32324 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32331 32325 # Going to short mode and back again did indeed matter. Since short mode is
32332 32326 # case insensitive, let's make it lowercase to improve readability.
32333 32327 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32334 32328 # Now convert it back to Unix-style (cygpath)
32335 32329 input_path=`$CYGPATH -u "$shortmode_path"`
32336 32330 new_path="$input_path"
32337 32331 fi
32338 32332 fi
32339 32333
32340 32334 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32341 32335 if test "x$test_cygdrive_prefix" = x; then
32342 32336 # As a simple fix, exclude /usr/bin since it's not a real path.
32343 32337 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32344 32338 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32345 32339 # a path prefixed by /cygdrive for fixpath to work.
32346 32340 new_path="$CYGWIN_ROOT_PATH$input_path"
32347 32341 fi
32348 32342 fi
32349 32343
32350 32344 # remove trailing .exe if any
32351 32345 new_path="${new_path/%.exe/}"
32352 32346
32353 32347 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32354 32348
32355 32349 # First separate the path from the arguments. This will split at the first
32356 32350 # space.
32357 32351 complete="$VS_ENV_CMD"
32358 32352 path="${complete%% *}"
32359 32353 tmp="$complete EOL"
32360 32354 arguments="${tmp#* }"
32361 32355
32362 32356 # Input might be given as Windows format, start by converting to
32363 32357 # unix format.
32364 32358 new_path="$path"
32365 32359
32366 32360 windows_path="$new_path"
32367 32361 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32368 32362 unix_path=`$CYGPATH -u "$windows_path"`
32369 32363 new_path="$unix_path"
32370 32364 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32371 32365 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32372 32366 new_path="$unix_path"
32373 32367 fi
32374 32368
32375 32369
32376 32370 # Now try to locate executable using which
32377 32371 new_path=`$WHICH "$new_path" 2> /dev/null`
32378 32372
32379 32373 if test "x$new_path" = x; then
32380 32374 # Oops. Which didn't find the executable.
32381 32375 # The splitting of arguments from the executable at a space might have been incorrect,
32382 32376 # since paths with space are more likely in Windows. Give it another try with the whole
32383 32377 # argument.
32384 32378 path="$complete"
32385 32379 arguments="EOL"
32386 32380 new_path="$path"
32387 32381
32388 32382 windows_path="$new_path"
32389 32383 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32390 32384 unix_path=`$CYGPATH -u "$windows_path"`
32391 32385 new_path="$unix_path"
32392 32386 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32393 32387 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32394 32388 new_path="$unix_path"
32395 32389 fi
32396 32390
32397 32391
32398 32392 new_path=`$WHICH "$new_path" 2> /dev/null`
32399 32393 # bat and cmd files are not always considered executable in MSYS causing which
32400 32394 # to not find them
32401 32395 if test "x$new_path" = x \
32402 32396 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32403 32397 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32404 32398 new_path="$path"
32405 32399
32406 32400 windows_path="$new_path"
32407 32401 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32408 32402 unix_path=`$CYGPATH -u "$windows_path"`
32409 32403 new_path="$unix_path"
32410 32404 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32411 32405 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32412 32406 new_path="$unix_path"
32413 32407 fi
32414 32408
32415 32409 fi
32416 32410
32417 32411 if test "x$new_path" = x; then
32418 32412 # It's still not found. Now this is an unrecoverable error.
32419 32413 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32420 32414 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32421 32415 has_space=`$ECHO "$complete" | $GREP " "`
32422 32416 if test "x$has_space" != x; then
32423 32417 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32424 32418 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32425 32419 fi
32426 32420 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32427 32421 fi
32428 32422 fi
32429 32423
32430 32424 # Now new_path has a complete unix path to the binary
32431 32425 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32432 32426 # Keep paths in /bin as-is, but remove trailing .exe if any
32433 32427 new_path="${new_path/%.exe/}"
32434 32428 # Do not save /bin paths to all_fixpath_prefixes!
32435 32429 else
32436 32430 # Not in mixed or Windows style, start by that.
32437 32431 new_path=`cmd //c echo $new_path`
32438 32432
32439 32433 input_path="$new_path"
32440 32434 # Check if we need to convert this using DOS-style short mode. If the path
32441 32435 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32442 32436 # take no chances and rewrite it.
32443 32437 # Note: m4 eats our [], so we need to use [ and ] instead.
32444 32438 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32445 32439 if test "x$has_forbidden_chars" != x; then
32446 32440 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32447 32441 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32448 32442 fi
32449 32443
32450 32444 # Output is in $new_path
32451 32445
32452 32446 windows_path="$new_path"
32453 32447 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32454 32448 unix_path=`$CYGPATH -u "$windows_path"`
32455 32449 new_path="$unix_path"
32456 32450 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32457 32451 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32458 32452 new_path="$unix_path"
32459 32453 fi
32460 32454
32461 32455 # remove trailing .exe if any
32462 32456 new_path="${new_path/%.exe/}"
32463 32457
32464 32458 # Save the first 10 bytes of this path to the storage, so fixpath can work.
32465 32459 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32466 32460 fi
32467 32461
32468 32462 else
32469 32463 # We're on a unix platform. Hooray! :)
32470 32464 # First separate the path from the arguments. This will split at the first
32471 32465 # space.
32472 32466 complete="$VS_ENV_CMD"
32473 32467 path="${complete%% *}"
32474 32468 tmp="$complete EOL"
32475 32469 arguments="${tmp#* }"
32476 32470
32477 32471 # Cannot rely on the command "which" here since it doesn't always work.
32478 32472 is_absolute_path=`$ECHO "$path" | $GREP ^/`
32479 32473 if test -z "$is_absolute_path"; then
32480 32474 # Path to executable is not absolute. Find it.
32481 32475 IFS_save="$IFS"
32482 32476 IFS=:
32483 32477 for p in $PATH; do
32484 32478 if test -f "$p/$path" && test -x "$p/$path"; then
32485 32479 new_path="$p/$path"
32486 32480 break
32487 32481 fi
32488 32482 done
32489 32483 IFS="$IFS_save"
32490 32484 else
32491 32485 # This is an absolute path, we can use it without further modifications.
32492 32486 new_path="$path"
32493 32487 fi
32494 32488
32495 32489 if test "x$new_path" = x; then
32496 32490 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32497 32491 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32498 32492 has_space=`$ECHO "$complete" | $GREP " "`
32499 32493 if test "x$has_space" != x; then
32500 32494 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32501 32495 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32502 32496 fi
32503 32497 as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32504 32498 fi
32505 32499 fi
32506 32500
32507 32501 # Now join together the path and the arguments once again
32508 32502 if test "x$arguments" != xEOL; then
32509 32503 new_complete="$new_path ${arguments% *}"
32510 32504 else
32511 32505 new_complete="$new_path"
32512 32506 fi
32513 32507
32514 32508 if test "x$complete" != "x$new_complete"; then
32515 32509 VS_ENV_CMD="$new_complete"
32516 32510 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32517 32511 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32518 32512 fi
32519 32513 fi
32520 32514
32521 32515
32522 32516 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32523 32517 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32524 32518 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32525 32519
32526 32520 # We need to create a couple of temporary files.
32527 32521 VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32528 32522 $MKDIR -p $VS_ENV_TMP_DIR
32529 32523
32530 32524 # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32531 32525 # Instead create a shell script which will set the relevant variables when run.
32532 32526 WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32533 32527
32534 32528 unix_path="$WINPATH_VS_ENV_CMD"
32535 32529 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32536 32530 windows_path=`$CYGPATH -m "$unix_path"`
32537 32531 WINPATH_VS_ENV_CMD="$windows_path"
32538 32532 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32539 32533 windows_path=`cmd //c echo $unix_path`
32540 32534 WINPATH_VS_ENV_CMD="$windows_path"
32541 32535 fi
32542 32536
32543 32537 WINPATH_BASH="$BASH"
32544 32538
32545 32539 unix_path="$WINPATH_BASH"
32546 32540 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32547 32541 windows_path=`$CYGPATH -m "$unix_path"`
32548 32542 WINPATH_BASH="$windows_path"
32549 32543 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32550 32544 windows_path=`cmd //c echo $unix_path`
32551 32545 WINPATH_BASH="$windows_path"
32552 32546 fi
32553 32547
32554 32548
32555 32549 # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32556 32550 # script (executable by bash) that will setup the important variables.
32557 32551 EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32558 32552 $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
32559 32553 # This will end up something like:
32560 32554 # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32561 32555 $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32562 32556 # These will end up something like:
32563 32557 # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32564 32558 # The trailing space for everyone except PATH is no typo, but is needed due
32565 32559 # to trailing \ in the Windows paths. These will be stripped later.
32566 32560 $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32567 32561 >> $EXTRACT_VC_ENV_BAT_FILE
32568 32562 $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32569 32563 >> $EXTRACT_VC_ENV_BAT_FILE
32570 32564 $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32571 32565 >> $EXTRACT_VC_ENV_BAT_FILE
32572 32566 $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32573 32567 >> $EXTRACT_VC_ENV_BAT_FILE
32574 32568 $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32575 32569 >> $EXTRACT_VC_ENV_BAT_FILE
32576 32570 $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32577 32571 >> $EXTRACT_VC_ENV_BAT_FILE
32578 32572
32579 32573 # Now execute the newly created bat file.
32580 32574 # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32581 32575 # Change directory so we don't need to mess with Windows paths in redirects.
32582 32576 cd $VS_ENV_TMP_DIR
32583 32577 cmd /c extract-vs-env.bat | $CAT
32584 32578 cd $CURDIR
32585 32579
32586 32580 if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32587 32581 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32588 32582 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32589 32583 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32590 32584 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32591 32585 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32592 32586 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32593 32587 as_fn_error $? "Cannot continue" "$LINENO" 5
32594 32588 fi
32595 32589
32596 32590 # Now set all paths and other env variables. This will allow the rest of
32597 32591 # the configure script to find and run the compiler in the proper way.
32598 32592 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32599 32593 $as_echo "$as_me: Setting extracted environment variables" >&6;}
32600 32594 . $VS_ENV_TMP_DIR/set-vs-env.sh
32601 32595 # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32602 32596 # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32603 32597 else
32604 32598 # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32605 32599 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32606 32600 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32607 32601 fi
32608 32602 fi
32609 32603
32610 32604 # At this point, we should have correct variables in the environment, or we can't continue.
32611 32605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32612 32606 $as_echo_n "checking for Visual Studio variables... " >&6; }
32613 32607
32614 32608 if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32615 32609 || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32616 32610 if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32617 32611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32618 32612 $as_echo "present but broken" >&6; }
32619 32613 as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32620 32614 else
32621 32615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32622 32616 $as_echo "ok" >&6; }
32623 32617 # Remove any trailing "\" ";" and " " from the variables.
32624 32618 VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32625 32619 VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32626 32620 VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32627 32621 WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32628 32622 WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32629 32623 # Remove any paths containing # (typically F#) as that messes up make. This
32630 32624 # is needed if visual studio was installed with F# support.
32631 32625 VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32632 32626
32633 32627
32634 32628
32635 32629
32636 32630
32637 32631 # Convert VS_INCLUDE into SYSROOT_CFLAGS
32638 32632 OLDIFS="$IFS"
32639 32633 IFS=";"
32640 32634 for i in $VS_INCLUDE; do
32641 32635 ipath=$i
32642 32636 # Only process non-empty elements
32643 32637 if test "x$ipath" != x; then
32644 32638 IFS="$OLDIFS"
32645 32639 # Check that directory exists before calling fixup_path
32646 32640 testpath=$ipath
32647 32641
32648 32642 windows_path="$testpath"
32649 32643 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32650 32644 unix_path=`$CYGPATH -u "$windows_path"`
32651 32645 testpath="$unix_path"
32652 32646 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32653 32647 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32654 32648 testpath="$unix_path"
32655 32649 fi
32656 32650
32657 32651 if test -d "$testpath"; then
32658 32652
32659 32653 # Only process if variable expands to non-empty
32660 32654
32661 32655 if test "x$ipath" != x; then
32662 32656 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32663 32657
32664 32658 # Input might be given as Windows format, start by converting to
32665 32659 # unix format.
32666 32660 path="$ipath"
32667 32661 new_path=`$CYGPATH -u "$path"`
32668 32662
32669 32663 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32670 32664 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32671 32665 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32672 32666 # "foo.exe" is OK but "foo" is an error.
32673 32667 #
32674 32668 # This test is therefore slightly more accurate than "test -f" to check for file precense.
32675 32669 # It is also a way to make sure we got the proper file name for the real test later on.
32676 32670 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32677 32671 if test "x$test_shortpath" = x; then
32678 32672 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32679 32673 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32680 32674 as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32681 32675 fi
32682 32676
32683 32677 # Call helper function which possibly converts this using DOS-style short mode.
32684 32678 # If so, the updated path is stored in $new_path.
32685 32679
32686 32680 input_path="$new_path"
32687 32681 # Check if we need to convert this using DOS-style short mode. If the path
32688 32682 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32689 32683 # take no chances and rewrite it.
32690 32684 # Note: m4 eats our [], so we need to use [ and ] instead.
32691 32685 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32692 32686 if test "x$has_forbidden_chars" != x; then
32693 32687 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32694 32688 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32695 32689 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32696 32690 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32697 32691 # Going to short mode and back again did indeed matter. Since short mode is
32698 32692 # case insensitive, let's make it lowercase to improve readability.
32699 32693 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32700 32694 # Now convert it back to Unix-style (cygpath)
32701 32695 input_path=`$CYGPATH -u "$shortmode_path"`
32702 32696 new_path="$input_path"
32703 32697 fi
32704 32698 fi
32705 32699
32706 32700 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32707 32701 if test "x$test_cygdrive_prefix" = x; then
32708 32702 # As a simple fix, exclude /usr/bin since it's not a real path.
32709 32703 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32710 32704 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32711 32705 # a path prefixed by /cygdrive for fixpath to work.
32712 32706 new_path="$CYGWIN_ROOT_PATH$input_path"
32713 32707 fi
32714 32708 fi
32715 32709
32716 32710
32717 32711 if test "x$path" != "x$new_path"; then
32718 32712 ipath="$new_path"
32719 32713 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32720 32714 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32721 32715 fi
32722 32716
32723 32717 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32724 32718
32725 32719 path="$ipath"
32726 32720 has_colon=`$ECHO $path | $GREP ^.:`
32727 32721 new_path="$path"
32728 32722 if test "x$has_colon" = x; then
32729 32723 # Not in mixed or Windows style, start by that.
32730 32724 new_path=`cmd //c echo $path`
32731 32725 fi
32732 32726
32733 32727
32734 32728 input_path="$new_path"
32735 32729 # Check if we need to convert this using DOS-style short mode. If the path
32736 32730 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32737 32731 # take no chances and rewrite it.
32738 32732 # Note: m4 eats our [], so we need to use [ and ] instead.
32739 32733 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32740 32734 if test "x$has_forbidden_chars" != x; then
32741 32735 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32742 32736 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32743 32737 fi
32744 32738
32745 32739
32746 32740 windows_path="$new_path"
32747 32741 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32748 32742 unix_path=`$CYGPATH -u "$windows_path"`
32749 32743 new_path="$unix_path"
32750 32744 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32751 32745 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32752 32746 new_path="$unix_path"
32753 32747 fi
32754 32748
32755 32749 if test "x$path" != "x$new_path"; then
32756 32750 ipath="$new_path"
32757 32751 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32758 32752 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32759 32753 fi
32760 32754
32761 32755 # Save the first 10 bytes of this path to the storage, so fixpath can work.
32762 32756 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32763 32757
32764 32758 else
32765 32759 # We're on a unix platform. Hooray! :)
32766 32760 path="$ipath"
32767 32761 has_space=`$ECHO "$path" | $GREP " "`
32768 32762 if test "x$has_space" != x; then
32769 32763 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32770 32764 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32771 32765 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32772 32766 fi
32773 32767
32774 32768 # Use eval to expand a potential ~
32775 32769 eval path="$path"
32776 32770 if test ! -f "$path" && test ! -d "$path"; then
32777 32771 as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32778 32772 fi
32779 32773
32780 32774 if test -d "$path"; then
32781 32775 ipath="`cd "$path"; $THEPWDCMD -L`"
32782 32776 else
32783 32777 dir="`$DIRNAME "$path"`"
32784 32778 base="`$BASENAME "$path"`"
32785 32779 ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32786 32780 fi
32787 32781 fi
32788 32782 fi
32789 32783
32790 32784 SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32791 32785 fi
32792 32786 IFS=";"
32793 32787 fi
32794 32788 done
32795 32789 # Convert VS_LIB into SYSROOT_LDFLAGS
32796 32790 for i in $VS_LIB; do
32797 32791 libpath=$i
32798 32792 # Only process non-empty elements
32799 32793 if test "x$libpath" != x; then
32800 32794 IFS="$OLDIFS"
32801 32795 # Check that directory exists before calling fixup_path
32802 32796 testpath=$libpath
32803 32797
32804 32798 windows_path="$testpath"
32805 32799 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32806 32800 unix_path=`$CYGPATH -u "$windows_path"`
32807 32801 testpath="$unix_path"
32808 32802 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32809 32803 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32810 32804 testpath="$unix_path"
32811 32805 fi
32812 32806
32813 32807 if test -d "$testpath"; then
32814 32808
32815 32809 # Only process if variable expands to non-empty
32816 32810
32817 32811 if test "x$libpath" != x; then
32818 32812 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32819 32813
32820 32814 # Input might be given as Windows format, start by converting to
32821 32815 # unix format.
32822 32816 path="$libpath"
32823 32817 new_path=`$CYGPATH -u "$path"`
32824 32818
32825 32819 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32826 32820 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32827 32821 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32828 32822 # "foo.exe" is OK but "foo" is an error.
32829 32823 #
32830 32824 # This test is therefore slightly more accurate than "test -f" to check for file precense.
32831 32825 # It is also a way to make sure we got the proper file name for the real test later on.
32832 32826 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32833 32827 if test "x$test_shortpath" = x; then
32834 32828 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32835 32829 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32836 32830 as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32837 32831 fi
32838 32832
32839 32833 # Call helper function which possibly converts this using DOS-style short mode.
32840 32834 # If so, the updated path is stored in $new_path.
32841 32835
32842 32836 input_path="$new_path"
32843 32837 # Check if we need to convert this using DOS-style short mode. If the path
32844 32838 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32845 32839 # take no chances and rewrite it.
32846 32840 # Note: m4 eats our [], so we need to use [ and ] instead.
32847 32841 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32848 32842 if test "x$has_forbidden_chars" != x; then
32849 32843 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32850 32844 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32851 32845 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32852 32846 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32853 32847 # Going to short mode and back again did indeed matter. Since short mode is
32854 32848 # case insensitive, let's make it lowercase to improve readability.
32855 32849 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32856 32850 # Now convert it back to Unix-style (cygpath)
32857 32851 input_path=`$CYGPATH -u "$shortmode_path"`
32858 32852 new_path="$input_path"
32859 32853 fi
32860 32854 fi
32861 32855
32862 32856 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32863 32857 if test "x$test_cygdrive_prefix" = x; then
32864 32858 # As a simple fix, exclude /usr/bin since it's not a real path.
32865 32859 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32866 32860 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32867 32861 # a path prefixed by /cygdrive for fixpath to work.
32868 32862 new_path="$CYGWIN_ROOT_PATH$input_path"
32869 32863 fi
32870 32864 fi
32871 32865
32872 32866
32873 32867 if test "x$path" != "x$new_path"; then
32874 32868 libpath="$new_path"
32875 32869 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32876 32870 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32877 32871 fi
32878 32872
32879 32873 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32880 32874
32881 32875 path="$libpath"
32882 32876 has_colon=`$ECHO $path | $GREP ^.:`
32883 32877 new_path="$path"
32884 32878 if test "x$has_colon" = x; then
32885 32879 # Not in mixed or Windows style, start by that.
32886 32880 new_path=`cmd //c echo $path`
32887 32881 fi
32888 32882
32889 32883
32890 32884 input_path="$new_path"
32891 32885 # Check if we need to convert this using DOS-style short mode. If the path
32892 32886 # contains just simple characters, use it. Otherwise (spaces, weird characters),
32893 32887 # take no chances and rewrite it.
32894 32888 # Note: m4 eats our [], so we need to use [ and ] instead.
32895 32889 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32896 32890 if test "x$has_forbidden_chars" != x; then
32897 32891 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32898 32892 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32899 32893 fi
32900 32894
32901 32895
32902 32896 windows_path="$new_path"
32903 32897 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32904 32898 unix_path=`$CYGPATH -u "$windows_path"`
32905 32899 new_path="$unix_path"
32906 32900 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32907 32901 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32908 32902 new_path="$unix_path"
32909 32903 fi
32910 32904
32911 32905 if test "x$path" != "x$new_path"; then
32912 32906 libpath="$new_path"
32913 32907 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32914 32908 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32915 32909 fi
32916 32910
32917 32911 # Save the first 10 bytes of this path to the storage, so fixpath can work.
32918 32912 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32919 32913
32920 32914 else
32921 32915 # We're on a unix platform. Hooray! :)
32922 32916 path="$libpath"
32923 32917 has_space=`$ECHO "$path" | $GREP " "`
32924 32918 if test "x$has_space" != x; then
32925 32919 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32926 32920 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32927 32921 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32928 32922 fi
32929 32923
32930 32924 # Use eval to expand a potential ~
32931 32925 eval path="$path"
32932 32926 if test ! -f "$path" && test ! -d "$path"; then
32933 32927 as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32934 32928 fi
32935 32929
32936 32930 if test -d "$path"; then
32937 32931 libpath="`cd "$path"; $THEPWDCMD -L`"
32938 32932 else
32939 32933 dir="`$DIRNAME "$path"`"
32940 32934 base="`$BASENAME "$path"`"
32941 32935 libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32942 32936 fi
32943 32937 fi
32944 32938 fi
32945 32939
32946 32940 SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32947 32941 fi
32948 32942 IFS=";"
32949 32943 fi
32950 32944 done
32951 32945 IFS="$OLDIFS"
32952 32946 fi
32953 32947 else
32954 32948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32955 32949 $as_echo "not found" >&6; }
32956 32950
32957 32951 if test "x$VS_ENV_CMD" = x; then
32958 32952 { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32959 32953 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32960 32954 { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32961 32955 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32962 32956 else
32963 32957 { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32964 32958 $as_echo "$as_me: Running the extraction script failed." >&6;}
32965 32959 fi
32966 32960 { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32967 32961 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32968 32962 { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32969 32963 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32970 32964 as_fn_error $? "Cannot continue" "$LINENO" 5
32971 32965 fi
32972 32966
32973 32967 # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32974 32968 # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32975 32969 PATH="$VS_PATH"
32976 32970 # The microsoft toolchain also requires INCLUDE and LIB to be set.
32977 32971 export INCLUDE="$VS_INCLUDE"
32978 32972 export LIB="$VS_LIB"
32979 32973 else
32980 32974 if test "x$XCODE_VERSION_OUTPUT" != x; then
↓ open down ↓ |
1495 lines elided |
↑ open up ↑ |
32981 32975 # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32982 32976 TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32983 32977 TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32984 32978 else
32985 32979 # Currently we do not define this for other toolchains. This might change as the need arise.
32986 32980 TOOLCHAIN_VERSION=
32987 32981 fi
32988 32982 fi
32989 32983
32990 32984
32991 - # For solaris we really need solaris tools, and not the GNU equivalent.
32992 - # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32993 - # so add that to path before starting to probe.
32994 - # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32995 - if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32996 - PATH="/usr/ccs/bin:$PATH"
32997 - fi
32998 -
32999 32985 # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33000 32986 # override all other locations.
33001 32987 if test "x$TOOLCHAIN_PATH" != x; then
33002 32988 PATH=$TOOLCHAIN_PATH:$PATH
33003 32989 fi
33004 32990
33005 32991
33006 32992 #
33007 32993 # Setup the compilers (CC and CXX)
33008 32994 #
33009 32995
33010 32996 COMPILER_NAME=C
33011 32997 SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33012 32998
33013 32999 if test "x$CC" != x; then
33014 33000 # User has supplied compiler name already, always let that override.
33015 33001 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33016 33002 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33017 33003 if test "x`basename $CC`" = "x$CC"; then
33018 33004 # A command without a complete path is provided, search $PATH.
33019 33005
33020 33006 for ac_prog in $CC
33021 33007 do
33022 33008 # Extract the first word of "$ac_prog", so it can be a program name with args.
33023 33009 set dummy $ac_prog; ac_word=$2
33024 33010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33025 33011 $as_echo_n "checking for $ac_word... " >&6; }
33026 33012 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33027 33013 $as_echo_n "(cached) " >&6
33028 33014 else
33029 33015 case $POTENTIAL_CC in
33030 33016 [\\/]* | ?:[\\/]*)
33031 33017 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33032 33018 ;;
33033 33019 *)
33034 33020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33035 33021 for as_dir in $PATH
33036 33022 do
33037 33023 IFS=$as_save_IFS
33038 33024 test -z "$as_dir" && as_dir=.
33039 33025 for ac_exec_ext in '' $ac_executable_extensions; do
33040 33026 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33041 33027 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33042 33028 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33043 33029 break 2
33044 33030 fi
33045 33031 done
33046 33032 done
33047 33033 IFS=$as_save_IFS
33048 33034
33049 33035 ;;
33050 33036 esac
33051 33037 fi
33052 33038 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33053 33039 if test -n "$POTENTIAL_CC"; then
33054 33040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33055 33041 $as_echo "$POTENTIAL_CC" >&6; }
33056 33042 else
33057 33043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33058 33044 $as_echo "no" >&6; }
33059 33045 fi
33060 33046
33061 33047
33062 33048 test -n "$POTENTIAL_CC" && break
33063 33049 done
33064 33050
33065 33051 if test "x$POTENTIAL_CC" != x; then
33066 33052 CC=$POTENTIAL_CC
33067 33053 else
33068 33054 as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33069 33055 fi
33070 33056 else
33071 33057 # Otherwise it might already be a complete path
33072 33058 if test ! -x "$CC"; then
33073 33059 as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33074 33060 fi
33075 33061 fi
33076 33062 else
33077 33063 # No user supplied value. Locate compiler ourselves.
33078 33064
33079 33065 # If we are cross compiling, assume cross compilation tools follows the
33080 33066 # cross compilation standard where they are prefixed with the autoconf
33081 33067 # standard name for the target. For example the binary
33082 33068 # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33083 33069 # If we are not cross compiling, then the default compiler name will be
33084 33070 # used.
33085 33071
33086 33072 CC=
33087 33073 # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33088 33074 # before checking the rest of the PATH.
33089 33075 # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33090 33076 # step, this should not be necessary.
33091 33077 if test -n "$TOOLCHAIN_PATH"; then
33092 33078 PATH_save="$PATH"
33093 33079 PATH="$TOOLCHAIN_PATH"
33094 33080 for ac_prog in $SEARCH_LIST
33095 33081 do
33096 33082 # Extract the first word of "$ac_prog", so it can be a program name with args.
33097 33083 set dummy $ac_prog; ac_word=$2
33098 33084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33099 33085 $as_echo_n "checking for $ac_word... " >&6; }
33100 33086 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33101 33087 $as_echo_n "(cached) " >&6
33102 33088 else
33103 33089 case $TOOLCHAIN_PATH_CC in
33104 33090 [\\/]* | ?:[\\/]*)
33105 33091 ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33106 33092 ;;
33107 33093 *)
33108 33094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33109 33095 for as_dir in $PATH
33110 33096 do
33111 33097 IFS=$as_save_IFS
33112 33098 test -z "$as_dir" && as_dir=.
33113 33099 for ac_exec_ext in '' $ac_executable_extensions; do
33114 33100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33115 33101 ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33116 33102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33117 33103 break 2
33118 33104 fi
33119 33105 done
33120 33106 done
33121 33107 IFS=$as_save_IFS
33122 33108
33123 33109 ;;
33124 33110 esac
33125 33111 fi
33126 33112 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33127 33113 if test -n "$TOOLCHAIN_PATH_CC"; then
33128 33114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33129 33115 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33130 33116 else
33131 33117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33132 33118 $as_echo "no" >&6; }
33133 33119 fi
33134 33120
33135 33121
33136 33122 test -n "$TOOLCHAIN_PATH_CC" && break
33137 33123 done
33138 33124
33139 33125 CC=$TOOLCHAIN_PATH_CC
33140 33126 PATH="$PATH_save"
33141 33127 fi
33142 33128
33143 33129 # AC_PATH_PROGS can't be run multiple times with the same variable,
33144 33130 # so create a new name for this run.
33145 33131 if test "x$CC" = x; then
33146 33132 for ac_prog in $SEARCH_LIST
33147 33133 do
33148 33134 # Extract the first word of "$ac_prog", so it can be a program name with args.
33149 33135 set dummy $ac_prog; ac_word=$2
33150 33136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33151 33137 $as_echo_n "checking for $ac_word... " >&6; }
33152 33138 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33153 33139 $as_echo_n "(cached) " >&6
33154 33140 else
33155 33141 case $POTENTIAL_CC in
33156 33142 [\\/]* | ?:[\\/]*)
33157 33143 ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33158 33144 ;;
33159 33145 *)
33160 33146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33161 33147 for as_dir in $PATH
33162 33148 do
33163 33149 IFS=$as_save_IFS
33164 33150 test -z "$as_dir" && as_dir=.
33165 33151 for ac_exec_ext in '' $ac_executable_extensions; do
33166 33152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33167 33153 ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33168 33154 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33169 33155 break 2
33170 33156 fi
33171 33157 done
33172 33158 done
33173 33159 IFS=$as_save_IFS
33174 33160
33175 33161 ;;
33176 33162 esac
33177 33163 fi
33178 33164 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33179 33165 if test -n "$POTENTIAL_CC"; then
33180 33166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33181 33167 $as_echo "$POTENTIAL_CC" >&6; }
33182 33168 else
33183 33169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33184 33170 $as_echo "no" >&6; }
33185 33171 fi
33186 33172
33187 33173
33188 33174 test -n "$POTENTIAL_CC" && break
33189 33175 done
33190 33176
33191 33177 CC=$POTENTIAL_CC
33192 33178 fi
33193 33179
33194 33180 if test "x$CC" = x; then
33195 33181
33196 33182 # Print a helpful message on how to acquire the necessary build dependency.
33197 33183 # devkit is the help tag: freetype, cups, alsa etc
33198 33184 MISSING_DEPENDENCY=devkit
33199 33185
33200 33186 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33201 33187 cygwin_help $MISSING_DEPENDENCY
33202 33188 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33203 33189 msys_help $MISSING_DEPENDENCY
33204 33190 else
33205 33191 PKGHANDLER_COMMAND=
33206 33192
33207 33193 case $PKGHANDLER in
33208 33194 apt-get)
33209 33195 apt_help $MISSING_DEPENDENCY ;;
33210 33196 yum)
33211 33197 yum_help $MISSING_DEPENDENCY ;;
33212 33198 port)
33213 33199 port_help $MISSING_DEPENDENCY ;;
33214 33200 pkgutil)
33215 33201 pkgutil_help $MISSING_DEPENDENCY ;;
33216 33202 pkgadd)
33217 33203 pkgadd_help $MISSING_DEPENDENCY ;;
33218 33204 esac
33219 33205
33220 33206 if test "x$PKGHANDLER_COMMAND" != x; then
33221 33207 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33222 33208 fi
33223 33209 fi
33224 33210
33225 33211 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33226 33212 fi
33227 33213 fi
33228 33214
33229 33215 # Now we have a compiler binary in CC. Make sure it's okay.
33230 33216
33231 33217 # Only process if variable expands to non-empty
33232 33218
33233 33219 if test "x$CC" != x; then
33234 33220 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33235 33221
33236 33222 # First separate the path from the arguments. This will split at the first
33237 33223 # space.
33238 33224 complete="$CC"
33239 33225 path="${complete%% *}"
33240 33226 tmp="$complete EOL"
33241 33227 arguments="${tmp#* }"
33242 33228
33243 33229 # Input might be given as Windows format, start by converting to
33244 33230 # unix format.
33245 33231 new_path=`$CYGPATH -u "$path"`
33246 33232
33247 33233 # Now try to locate executable using which
33248 33234 new_path=`$WHICH "$new_path" 2> /dev/null`
33249 33235 # bat and cmd files are not always considered executable in cygwin causing which
33250 33236 # to not find them
33251 33237 if test "x$new_path" = x \
33252 33238 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33253 33239 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33254 33240 new_path=`$CYGPATH -u "$path"`
33255 33241 fi
33256 33242 if test "x$new_path" = x; then
33257 33243 # Oops. Which didn't find the executable.
33258 33244 # The splitting of arguments from the executable at a space might have been incorrect,
33259 33245 # since paths with space are more likely in Windows. Give it another try with the whole
33260 33246 # argument.
33261 33247 path="$complete"
33262 33248 arguments="EOL"
33263 33249 new_path=`$CYGPATH -u "$path"`
33264 33250 new_path=`$WHICH "$new_path" 2> /dev/null`
33265 33251 # bat and cmd files are not always considered executable in cygwin causing which
33266 33252 # to not find them
33267 33253 if test "x$new_path" = x \
33268 33254 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33269 33255 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33270 33256 new_path=`$CYGPATH -u "$path"`
33271 33257 fi
33272 33258 if test "x$new_path" = x; then
33273 33259 # It's still not found. Now this is an unrecoverable error.
33274 33260 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33275 33261 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33276 33262 has_space=`$ECHO "$complete" | $GREP " "`
33277 33263 if test "x$has_space" != x; then
33278 33264 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33279 33265 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33280 33266 fi
33281 33267 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33282 33268 fi
33283 33269 fi
33284 33270
33285 33271 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33286 33272 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33287 33273 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33288 33274 # "foo.exe" is OK but "foo" is an error.
33289 33275 #
33290 33276 # This test is therefore slightly more accurate than "test -f" to check for file presence.
33291 33277 # It is also a way to make sure we got the proper file name for the real test later on.
33292 33278 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33293 33279 if test "x$test_shortpath" = x; then
33294 33280 # Short path failed, file does not exist as specified.
33295 33281 # Try adding .exe or .cmd
33296 33282 if test -f "${new_path}.exe"; then
33297 33283 input_to_shortpath="${new_path}.exe"
33298 33284 elif test -f "${new_path}.cmd"; then
33299 33285 input_to_shortpath="${new_path}.cmd"
33300 33286 else
33301 33287 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33302 33288 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33303 33289 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33304 33290 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33305 33291 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33306 33292 fi
33307 33293 else
33308 33294 input_to_shortpath="$new_path"
33309 33295 fi
33310 33296
33311 33297 # Call helper function which possibly converts this using DOS-style short mode.
33312 33298 # If so, the updated path is stored in $new_path.
33313 33299 new_path="$input_to_shortpath"
33314 33300
33315 33301 input_path="$input_to_shortpath"
33316 33302 # Check if we need to convert this using DOS-style short mode. If the path
33317 33303 # contains just simple characters, use it. Otherwise (spaces, weird characters),
33318 33304 # take no chances and rewrite it.
33319 33305 # Note: m4 eats our [], so we need to use [ and ] instead.
33320 33306 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33321 33307 if test "x$has_forbidden_chars" != x; then
33322 33308 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33323 33309 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33324 33310 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33325 33311 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33326 33312 # Going to short mode and back again did indeed matter. Since short mode is
33327 33313 # case insensitive, let's make it lowercase to improve readability.
33328 33314 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33329 33315 # Now convert it back to Unix-style (cygpath)
33330 33316 input_path=`$CYGPATH -u "$shortmode_path"`
33331 33317 new_path="$input_path"
33332 33318 fi
33333 33319 fi
33334 33320
33335 33321 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33336 33322 if test "x$test_cygdrive_prefix" = x; then
33337 33323 # As a simple fix, exclude /usr/bin since it's not a real path.
33338 33324 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33339 33325 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33340 33326 # a path prefixed by /cygdrive for fixpath to work.
33341 33327 new_path="$CYGWIN_ROOT_PATH$input_path"
33342 33328 fi
33343 33329 fi
33344 33330
33345 33331 # remove trailing .exe if any
33346 33332 new_path="${new_path/%.exe/}"
33347 33333
33348 33334 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33349 33335
33350 33336 # First separate the path from the arguments. This will split at the first
33351 33337 # space.
33352 33338 complete="$CC"
33353 33339 path="${complete%% *}"
33354 33340 tmp="$complete EOL"
33355 33341 arguments="${tmp#* }"
33356 33342
33357 33343 # Input might be given as Windows format, start by converting to
33358 33344 # unix format.
33359 33345 new_path="$path"
33360 33346
33361 33347 windows_path="$new_path"
33362 33348 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33363 33349 unix_path=`$CYGPATH -u "$windows_path"`
33364 33350 new_path="$unix_path"
33365 33351 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33366 33352 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33367 33353 new_path="$unix_path"
33368 33354 fi
33369 33355
33370 33356
33371 33357 # Now try to locate executable using which
33372 33358 new_path=`$WHICH "$new_path" 2> /dev/null`
33373 33359
33374 33360 if test "x$new_path" = x; then
33375 33361 # Oops. Which didn't find the executable.
33376 33362 # The splitting of arguments from the executable at a space might have been incorrect,
33377 33363 # since paths with space are more likely in Windows. Give it another try with the whole
33378 33364 # argument.
33379 33365 path="$complete"
33380 33366 arguments="EOL"
33381 33367 new_path="$path"
33382 33368
33383 33369 windows_path="$new_path"
33384 33370 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33385 33371 unix_path=`$CYGPATH -u "$windows_path"`
33386 33372 new_path="$unix_path"
33387 33373 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33388 33374 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33389 33375 new_path="$unix_path"
33390 33376 fi
33391 33377
33392 33378
33393 33379 new_path=`$WHICH "$new_path" 2> /dev/null`
33394 33380 # bat and cmd files are not always considered executable in MSYS causing which
33395 33381 # to not find them
33396 33382 if test "x$new_path" = x \
33397 33383 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33398 33384 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33399 33385 new_path="$path"
33400 33386
33401 33387 windows_path="$new_path"
33402 33388 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33403 33389 unix_path=`$CYGPATH -u "$windows_path"`
33404 33390 new_path="$unix_path"
33405 33391 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33406 33392 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33407 33393 new_path="$unix_path"
33408 33394 fi
33409 33395
33410 33396 fi
33411 33397
33412 33398 if test "x$new_path" = x; then
33413 33399 # It's still not found. Now this is an unrecoverable error.
33414 33400 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33415 33401 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33416 33402 has_space=`$ECHO "$complete" | $GREP " "`
33417 33403 if test "x$has_space" != x; then
33418 33404 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33419 33405 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33420 33406 fi
33421 33407 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33422 33408 fi
33423 33409 fi
33424 33410
33425 33411 # Now new_path has a complete unix path to the binary
33426 33412 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33427 33413 # Keep paths in /bin as-is, but remove trailing .exe if any
33428 33414 new_path="${new_path/%.exe/}"
33429 33415 # Do not save /bin paths to all_fixpath_prefixes!
33430 33416 else
33431 33417 # Not in mixed or Windows style, start by that.
33432 33418 new_path=`cmd //c echo $new_path`
33433 33419
33434 33420 input_path="$new_path"
33435 33421 # Check if we need to convert this using DOS-style short mode. If the path
33436 33422 # contains just simple characters, use it. Otherwise (spaces, weird characters),
33437 33423 # take no chances and rewrite it.
33438 33424 # Note: m4 eats our [], so we need to use [ and ] instead.
33439 33425 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33440 33426 if test "x$has_forbidden_chars" != x; then
33441 33427 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33442 33428 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33443 33429 fi
33444 33430
33445 33431 # Output is in $new_path
33446 33432
33447 33433 windows_path="$new_path"
33448 33434 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33449 33435 unix_path=`$CYGPATH -u "$windows_path"`
33450 33436 new_path="$unix_path"
33451 33437 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33452 33438 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33453 33439 new_path="$unix_path"
33454 33440 fi
33455 33441
33456 33442 # remove trailing .exe if any
33457 33443 new_path="${new_path/%.exe/}"
33458 33444
33459 33445 # Save the first 10 bytes of this path to the storage, so fixpath can work.
33460 33446 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33461 33447 fi
33462 33448
33463 33449 else
33464 33450 # We're on a unix platform. Hooray! :)
33465 33451 # First separate the path from the arguments. This will split at the first
33466 33452 # space.
33467 33453 complete="$CC"
33468 33454 path="${complete%% *}"
33469 33455 tmp="$complete EOL"
33470 33456 arguments="${tmp#* }"
33471 33457
33472 33458 # Cannot rely on the command "which" here since it doesn't always work.
33473 33459 is_absolute_path=`$ECHO "$path" | $GREP ^/`
33474 33460 if test -z "$is_absolute_path"; then
33475 33461 # Path to executable is not absolute. Find it.
33476 33462 IFS_save="$IFS"
33477 33463 IFS=:
33478 33464 for p in $PATH; do
33479 33465 if test -f "$p/$path" && test -x "$p/$path"; then
33480 33466 new_path="$p/$path"
33481 33467 break
33482 33468 fi
33483 33469 done
33484 33470 IFS="$IFS_save"
33485 33471 else
33486 33472 # This is an absolute path, we can use it without further modifications.
33487 33473 new_path="$path"
33488 33474 fi
33489 33475
33490 33476 if test "x$new_path" = x; then
33491 33477 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33492 33478 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33493 33479 has_space=`$ECHO "$complete" | $GREP " "`
33494 33480 if test "x$has_space" != x; then
33495 33481 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33496 33482 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33497 33483 fi
33498 33484 as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33499 33485 fi
33500 33486 fi
33501 33487
33502 33488 # Now join together the path and the arguments once again
33503 33489 if test "x$arguments" != xEOL; then
33504 33490 new_complete="$new_path ${arguments% *}"
33505 33491 else
33506 33492 new_complete="$new_path"
33507 33493 fi
33508 33494
33509 33495 if test "x$complete" != "x$new_complete"; then
33510 33496 CC="$new_complete"
33511 33497 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33512 33498 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33513 33499 fi
33514 33500 fi
33515 33501
33516 33502 TEST_COMPILER="$CC"
33517 33503
33518 33504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33519 33505 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
33520 33506 SYMLINK_ORIGINAL="$TEST_COMPILER"
33521 33507
33522 33508 if test "x$OPENJDK_BUILD_OS" != xwindows; then
33523 33509 # Follow a chain of symbolic links. Use readlink
33524 33510 # where it exists, else fall back to horribly
33525 33511 # complicated shell code.
33526 33512 if test "x$READLINK_TESTED" != yes; then
33527 33513 # On MacOSX there is a readlink tool with a different
33528 33514 # purpose than the GNU readlink tool. Check the found readlink.
33529 33515 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33530 33516 if test "x$ISGNU" = x; then
33531 33517 # A readlink that we do not know how to use.
33532 33518 # Are there other non-GNU readlinks out there?
33533 33519 READLINK_TESTED=yes
33534 33520 READLINK=
33535 33521 fi
33536 33522 fi
33537 33523
33538 33524 if test "x$READLINK" != x; then
33539 33525 SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33540 33526 else
33541 33527 # Save the current directory for restoring afterwards
33542 33528 STARTDIR=$PWD
33543 33529 COUNTER=0
33544 33530 sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33545 33531 sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33546 33532 cd $sym_link_dir
33547 33533 # Use -P flag to resolve symlinks in directories.
33548 33534 cd `$THEPWDCMD -P`
33549 33535 sym_link_dir=`$THEPWDCMD -P`
33550 33536 # Resolve file symlinks
33551 33537 while test $COUNTER -lt 20; do
33552 33538 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33553 33539 if test "x$ISLINK" == x; then
33554 33540 # This is not a symbolic link! We are done!
33555 33541 break
33556 33542 fi
33557 33543 # Again resolve directory symlinks since the target of the just found
33558 33544 # link could be in a different directory
33559 33545 cd `$DIRNAME $ISLINK`
33560 33546 sym_link_dir=`$THEPWDCMD -P`
33561 33547 sym_link_file=`$BASENAME $ISLINK`
33562 33548 let COUNTER=COUNTER+1
33563 33549 done
33564 33550 cd $STARTDIR
33565 33551 SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33566 33552 fi
33567 33553 fi
33568 33554
33569 33555 if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33570 33556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33571 33557 $as_echo "no symlink" >&6; }
33572 33558 else
33573 33559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33574 33560 $as_echo "$SYMLINK_ORIGINAL" >&6; }
33575 33561
33576 33562 # We can't handle ccache by gcc wrappers, since we need to know if we're
33577 33563 # using ccache. Instead ccache usage must be controlled by a configure option.
33578 33564 COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33579 33565 if test "x$COMPILER_BASENAME" = "xccache"; then
33580 33566 { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33581 33567 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33582 33568 as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33583 33569 fi
33584 33570 fi
33585 33571
33586 33572
33587 33573 COMPILER=$CC
33588 33574 COMPILER_NAME=$COMPILER_NAME
33589 33575
33590 33576 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33591 33577 # cc -V output typically looks like
33592 33578 # cc: Sun C 5.12 Linux_i386 2011/11/16
33593 33579 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33594 33580 # Check that this is likely to be the Solaris Studio cc.
33595 33581 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33596 33582 if test $? -ne 0; then
33597 33583 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33598 33584 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33599 33585 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33600 33586 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33601 33587 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33602 33588 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33603 33589 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33604 33590 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33605 33591 fi
33606 33592 # Remove usage instructions (if present), and
33607 33593 # collapse compiler output into a single line
33608 33594 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33609 33595 $SED -e 's/ *[Uu]sage:.*//'`
33610 33596 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33611 33597 $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33612 33598 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
33613 33599 # xlc -qversion output typically looks like
33614 33600 # IBM XL C/C++ for AIX, V11.1 (5724-X13)
33615 33601 # Version: 11.01.0000.0015
33616 33602 COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33617 33603 # Check that this is likely to be the IBM XL C compiler.
33618 33604 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33619 33605 if test $? -ne 0; then
33620 33606 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33621 33607 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33622 33608 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33623 33609 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33624 33610 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33625 33611 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33626 33612 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33627 33613 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33628 33614 fi
33629 33615 # Collapse compiler output into a single line
33630 33616 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33631 33617 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33632 33618 $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33633 33619 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33634 33620 # There is no specific version flag, but all output starts with a version string.
33635 33621 # First line typically looks something like:
33636 33622 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33637 33623 COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33638 33624 # Check that this is likely to be Microsoft CL.EXE.
33639 33625 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33640 33626 if test $? -ne 0; then
33641 33627 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33642 33628 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33643 33629 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33644 33630 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33645 33631 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33646 33632 fi
33647 33633 # Collapse compiler output into a single line
33648 33634 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33649 33635 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33650 33636 $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33651 33637 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
33652 33638 # gcc --version output typically looks like
33653 33639 # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33654 33640 # Copyright (C) 2013 Free Software Foundation, Inc.
33655 33641 # This is free software; see the source for copying conditions. There is NO
33656 33642 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33657 33643 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33658 33644 # Check that this is likely to be GCC.
33659 33645 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33660 33646 if test $? -ne 0; then
33661 33647 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33662 33648 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33663 33649 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33664 33650 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33665 33651 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33666 33652 fi
33667 33653 # Remove Copyright and legalese from version string, and
33668 33654 # collapse into a single line
33669 33655 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33670 33656 $SED -e 's/ *Copyright .*//'`
33671 33657 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33672 33658 $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33673 33659 elif test "x$TOOLCHAIN_TYPE" = xclang; then
33674 33660 # clang --version output typically looks like
33675 33661 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33676 33662 # clang version 3.3 (tags/RELEASE_33/final)
33677 33663 # or
33678 33664 # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33679 33665 # Target: x86_64-pc-linux-gnu
33680 33666 # Thread model: posix
33681 33667 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33682 33668 # Check that this is likely to be clang
33683 33669 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33684 33670 if test $? -ne 0; then
33685 33671 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33686 33672 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33687 33673 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33688 33674 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33689 33675 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33690 33676 fi
33691 33677 # Collapse compiler output into a single line
33692 33678 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33693 33679 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33694 33680 $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33695 33681 else
33696 33682 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33697 33683 fi
33698 33684 # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33699 33685 CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33700 33686 # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33701 33687 CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33702 33688
33703 33689 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33704 33690 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33705 33691
33706 33692
33707 33693 # Now that we have resolved CC ourself, let autoconf have its go at it
33708 33694 ac_ext=c
33709 33695 ac_cpp='$CPP $CPPFLAGS'
33710 33696 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33711 33697 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33712 33698 ac_compiler_gnu=$ac_cv_c_compiler_gnu
33713 33699 if test -n "$ac_tool_prefix"; then
33714 33700 for ac_prog in $CC
33715 33701 do
33716 33702 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33717 33703 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33718 33704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33719 33705 $as_echo_n "checking for $ac_word... " >&6; }
33720 33706 if ${ac_cv_prog_CC+:} false; then :
33721 33707 $as_echo_n "(cached) " >&6
33722 33708 else
33723 33709 if test -n "$CC"; then
33724 33710 ac_cv_prog_CC="$CC" # Let the user override the test.
33725 33711 else
33726 33712 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33727 33713 for as_dir in $PATH
33728 33714 do
33729 33715 IFS=$as_save_IFS
33730 33716 test -z "$as_dir" && as_dir=.
33731 33717 for ac_exec_ext in '' $ac_executable_extensions; do
33732 33718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33733 33719 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33734 33720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33735 33721 break 2
33736 33722 fi
33737 33723 done
33738 33724 done
33739 33725 IFS=$as_save_IFS
33740 33726
33741 33727 fi
33742 33728 fi
33743 33729 CC=$ac_cv_prog_CC
33744 33730 if test -n "$CC"; then
33745 33731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33746 33732 $as_echo "$CC" >&6; }
33747 33733 else
33748 33734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33749 33735 $as_echo "no" >&6; }
33750 33736 fi
33751 33737
33752 33738
33753 33739 test -n "$CC" && break
33754 33740 done
33755 33741 fi
33756 33742 if test -z "$CC"; then
33757 33743 ac_ct_CC=$CC
33758 33744 for ac_prog in $CC
33759 33745 do
33760 33746 # Extract the first word of "$ac_prog", so it can be a program name with args.
33761 33747 set dummy $ac_prog; ac_word=$2
33762 33748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33763 33749 $as_echo_n "checking for $ac_word... " >&6; }
33764 33750 if ${ac_cv_prog_ac_ct_CC+:} false; then :
33765 33751 $as_echo_n "(cached) " >&6
33766 33752 else
33767 33753 if test -n "$ac_ct_CC"; then
33768 33754 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33769 33755 else
33770 33756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33771 33757 for as_dir in $PATH
33772 33758 do
33773 33759 IFS=$as_save_IFS
33774 33760 test -z "$as_dir" && as_dir=.
33775 33761 for ac_exec_ext in '' $ac_executable_extensions; do
33776 33762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33777 33763 ac_cv_prog_ac_ct_CC="$ac_prog"
33778 33764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33779 33765 break 2
33780 33766 fi
33781 33767 done
33782 33768 done
33783 33769 IFS=$as_save_IFS
33784 33770
33785 33771 fi
33786 33772 fi
33787 33773 ac_ct_CC=$ac_cv_prog_ac_ct_CC
33788 33774 if test -n "$ac_ct_CC"; then
33789 33775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33790 33776 $as_echo "$ac_ct_CC" >&6; }
33791 33777 else
33792 33778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33793 33779 $as_echo "no" >&6; }
33794 33780 fi
33795 33781
33796 33782
33797 33783 test -n "$ac_ct_CC" && break
33798 33784 done
33799 33785
33800 33786 if test "x$ac_ct_CC" = x; then
33801 33787 CC=""
33802 33788 else
33803 33789 case $cross_compiling:$ac_tool_warned in
33804 33790 yes:)
33805 33791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33806 33792 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33807 33793 ac_tool_warned=yes ;;
33808 33794 esac
33809 33795 CC=$ac_ct_CC
33810 33796 fi
33811 33797 fi
33812 33798
33813 33799
33814 33800 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33815 33801 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33816 33802 as_fn_error $? "no acceptable C compiler found in \$PATH
33817 33803 See \`config.log' for more details" "$LINENO" 5; }
33818 33804
33819 33805 # Provide some information about the compiler.
33820 33806 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33821 33807 set X $ac_compile
33822 33808 ac_compiler=$2
33823 33809 for ac_option in --version -v -V -qversion; do
33824 33810 { { ac_try="$ac_compiler $ac_option >&5"
33825 33811 case "(($ac_try" in
33826 33812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33827 33813 *) ac_try_echo=$ac_try;;
33828 33814 esac
33829 33815 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33830 33816 $as_echo "$ac_try_echo"; } >&5
33831 33817 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33832 33818 ac_status=$?
33833 33819 if test -s conftest.err; then
33834 33820 sed '10a\
33835 33821 ... rest of stderr output deleted ...
33836 33822 10q' conftest.err >conftest.er1
33837 33823 cat conftest.er1 >&5
33838 33824 fi
33839 33825 rm -f conftest.er1 conftest.err
33840 33826 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33841 33827 test $ac_status = 0; }
33842 33828 done
33843 33829
33844 33830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33845 33831 /* end confdefs.h. */
33846 33832
33847 33833 int
33848 33834 main ()
33849 33835 {
33850 33836
33851 33837 ;
33852 33838 return 0;
33853 33839 }
33854 33840 _ACEOF
33855 33841 ac_clean_files_save=$ac_clean_files
33856 33842 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33857 33843 # Try to create an executable without -o first, disregard a.out.
33858 33844 # It will help us diagnose broken compilers, and finding out an intuition
33859 33845 # of exeext.
33860 33846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33861 33847 $as_echo_n "checking whether the C compiler works... " >&6; }
33862 33848 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33863 33849
33864 33850 # The possible output files:
33865 33851 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33866 33852
33867 33853 ac_rmfiles=
33868 33854 for ac_file in $ac_files
33869 33855 do
33870 33856 case $ac_file in
33871 33857 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33872 33858 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33873 33859 esac
33874 33860 done
33875 33861 rm -f $ac_rmfiles
33876 33862
33877 33863 if { { ac_try="$ac_link_default"
33878 33864 case "(($ac_try" in
33879 33865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33880 33866 *) ac_try_echo=$ac_try;;
33881 33867 esac
33882 33868 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33883 33869 $as_echo "$ac_try_echo"; } >&5
33884 33870 (eval "$ac_link_default") 2>&5
33885 33871 ac_status=$?
33886 33872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33887 33873 test $ac_status = 0; }; then :
33888 33874 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33889 33875 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33890 33876 # in a Makefile. We should not override ac_cv_exeext if it was cached,
33891 33877 # so that the user can short-circuit this test for compilers unknown to
33892 33878 # Autoconf.
33893 33879 for ac_file in $ac_files ''
33894 33880 do
33895 33881 test -f "$ac_file" || continue
33896 33882 case $ac_file in
33897 33883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33898 33884 ;;
33899 33885 [ab].out )
33900 33886 # We found the default executable, but exeext='' is most
33901 33887 # certainly right.
33902 33888 break;;
33903 33889 *.* )
33904 33890 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33905 33891 then :; else
33906 33892 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33907 33893 fi
33908 33894 # We set ac_cv_exeext here because the later test for it is not
33909 33895 # safe: cross compilers may not add the suffix if given an `-o'
33910 33896 # argument, so we may need to know it at that point already.
33911 33897 # Even if this section looks crufty: it has the advantage of
33912 33898 # actually working.
33913 33899 break;;
33914 33900 * )
33915 33901 break;;
33916 33902 esac
33917 33903 done
33918 33904 test "$ac_cv_exeext" = no && ac_cv_exeext=
33919 33905
33920 33906 else
33921 33907 ac_file=''
33922 33908 fi
33923 33909 if test -z "$ac_file"; then :
33924 33910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33925 33911 $as_echo "no" >&6; }
33926 33912 $as_echo "$as_me: failed program was:" >&5
33927 33913 sed 's/^/| /' conftest.$ac_ext >&5
33928 33914
33929 33915 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33930 33916 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33931 33917 as_fn_error 77 "C compiler cannot create executables
33932 33918 See \`config.log' for more details" "$LINENO" 5; }
33933 33919 else
33934 33920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33935 33921 $as_echo "yes" >&6; }
33936 33922 fi
33937 33923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33938 33924 $as_echo_n "checking for C compiler default output file name... " >&6; }
33939 33925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33940 33926 $as_echo "$ac_file" >&6; }
33941 33927 ac_exeext=$ac_cv_exeext
33942 33928
33943 33929 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33944 33930 ac_clean_files=$ac_clean_files_save
33945 33931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33946 33932 $as_echo_n "checking for suffix of executables... " >&6; }
33947 33933 if { { ac_try="$ac_link"
33948 33934 case "(($ac_try" in
33949 33935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33950 33936 *) ac_try_echo=$ac_try;;
33951 33937 esac
33952 33938 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33953 33939 $as_echo "$ac_try_echo"; } >&5
33954 33940 (eval "$ac_link") 2>&5
33955 33941 ac_status=$?
33956 33942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33957 33943 test $ac_status = 0; }; then :
33958 33944 # If both `conftest.exe' and `conftest' are `present' (well, observable)
33959 33945 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
33960 33946 # work properly (i.e., refer to `conftest.exe'), while it won't with
33961 33947 # `rm'.
33962 33948 for ac_file in conftest.exe conftest conftest.*; do
33963 33949 test -f "$ac_file" || continue
33964 33950 case $ac_file in
33965 33951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33966 33952 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33967 33953 break;;
33968 33954 * ) break;;
33969 33955 esac
33970 33956 done
33971 33957 else
33972 33958 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33973 33959 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33974 33960 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33975 33961 See \`config.log' for more details" "$LINENO" 5; }
33976 33962 fi
33977 33963 rm -f conftest conftest$ac_cv_exeext
33978 33964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33979 33965 $as_echo "$ac_cv_exeext" >&6; }
33980 33966
33981 33967 rm -f conftest.$ac_ext
33982 33968 EXEEXT=$ac_cv_exeext
33983 33969 ac_exeext=$EXEEXT
33984 33970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33985 33971 /* end confdefs.h. */
33986 33972 #include <stdio.h>
33987 33973 int
33988 33974 main ()
33989 33975 {
33990 33976 FILE *f = fopen ("conftest.out", "w");
33991 33977 return ferror (f) || fclose (f) != 0;
33992 33978
33993 33979 ;
33994 33980 return 0;
33995 33981 }
33996 33982 _ACEOF
33997 33983 ac_clean_files="$ac_clean_files conftest.out"
33998 33984 # Check that the compiler produces executables we can run. If not, either
33999 33985 # the compiler is broken, or we cross compile.
34000 33986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34001 33987 $as_echo_n "checking whether we are cross compiling... " >&6; }
34002 33988 if test "$cross_compiling" != yes; then
34003 33989 { { ac_try="$ac_link"
34004 33990 case "(($ac_try" in
34005 33991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34006 33992 *) ac_try_echo=$ac_try;;
34007 33993 esac
34008 33994 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34009 33995 $as_echo "$ac_try_echo"; } >&5
34010 33996 (eval "$ac_link") 2>&5
34011 33997 ac_status=$?
34012 33998 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34013 33999 test $ac_status = 0; }
34014 34000 if { ac_try='./conftest$ac_cv_exeext'
34015 34001 { { case "(($ac_try" in
34016 34002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34017 34003 *) ac_try_echo=$ac_try;;
34018 34004 esac
34019 34005 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34020 34006 $as_echo "$ac_try_echo"; } >&5
34021 34007 (eval "$ac_try") 2>&5
34022 34008 ac_status=$?
34023 34009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34024 34010 test $ac_status = 0; }; }; then
34025 34011 cross_compiling=no
34026 34012 else
34027 34013 if test "$cross_compiling" = maybe; then
34028 34014 cross_compiling=yes
34029 34015 else
34030 34016 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34031 34017 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34032 34018 as_fn_error $? "cannot run C compiled programs.
34033 34019 If you meant to cross compile, use \`--host'.
34034 34020 See \`config.log' for more details" "$LINENO" 5; }
34035 34021 fi
34036 34022 fi
34037 34023 fi
34038 34024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34039 34025 $as_echo "$cross_compiling" >&6; }
34040 34026
34041 34027 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34042 34028 ac_clean_files=$ac_clean_files_save
34043 34029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34044 34030 $as_echo_n "checking for suffix of object files... " >&6; }
34045 34031 if ${ac_cv_objext+:} false; then :
34046 34032 $as_echo_n "(cached) " >&6
34047 34033 else
34048 34034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34049 34035 /* end confdefs.h. */
34050 34036
34051 34037 int
34052 34038 main ()
34053 34039 {
34054 34040
34055 34041 ;
34056 34042 return 0;
34057 34043 }
34058 34044 _ACEOF
34059 34045 rm -f conftest.o conftest.obj
34060 34046 if { { ac_try="$ac_compile"
34061 34047 case "(($ac_try" in
34062 34048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34063 34049 *) ac_try_echo=$ac_try;;
34064 34050 esac
34065 34051 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34066 34052 $as_echo "$ac_try_echo"; } >&5
34067 34053 (eval "$ac_compile") 2>&5
34068 34054 ac_status=$?
34069 34055 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34070 34056 test $ac_status = 0; }; then :
34071 34057 for ac_file in conftest.o conftest.obj conftest.*; do
34072 34058 test -f "$ac_file" || continue;
34073 34059 case $ac_file in
34074 34060 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34075 34061 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34076 34062 break;;
34077 34063 esac
34078 34064 done
34079 34065 else
34080 34066 $as_echo "$as_me: failed program was:" >&5
34081 34067 sed 's/^/| /' conftest.$ac_ext >&5
34082 34068
34083 34069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34084 34070 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34085 34071 as_fn_error $? "cannot compute suffix of object files: cannot compile
34086 34072 See \`config.log' for more details" "$LINENO" 5; }
34087 34073 fi
34088 34074 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34089 34075 fi
34090 34076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34091 34077 $as_echo "$ac_cv_objext" >&6; }
34092 34078 OBJEXT=$ac_cv_objext
34093 34079 ac_objext=$OBJEXT
34094 34080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34095 34081 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34096 34082 if ${ac_cv_c_compiler_gnu+:} false; then :
34097 34083 $as_echo_n "(cached) " >&6
34098 34084 else
34099 34085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34100 34086 /* end confdefs.h. */
34101 34087
34102 34088 int
34103 34089 main ()
34104 34090 {
34105 34091 #ifndef __GNUC__
34106 34092 choke me
34107 34093 #endif
34108 34094
34109 34095 ;
34110 34096 return 0;
34111 34097 }
34112 34098 _ACEOF
34113 34099 if ac_fn_c_try_compile "$LINENO"; then :
34114 34100 ac_compiler_gnu=yes
34115 34101 else
34116 34102 ac_compiler_gnu=no
34117 34103 fi
34118 34104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34119 34105 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34120 34106
34121 34107 fi
34122 34108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34123 34109 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34124 34110 if test $ac_compiler_gnu = yes; then
34125 34111 GCC=yes
34126 34112 else
34127 34113 GCC=
34128 34114 fi
34129 34115 ac_test_CFLAGS=${CFLAGS+set}
34130 34116 ac_save_CFLAGS=$CFLAGS
34131 34117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34132 34118 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34133 34119 if ${ac_cv_prog_cc_g+:} false; then :
34134 34120 $as_echo_n "(cached) " >&6
34135 34121 else
34136 34122 ac_save_c_werror_flag=$ac_c_werror_flag
34137 34123 ac_c_werror_flag=yes
34138 34124 ac_cv_prog_cc_g=no
34139 34125 CFLAGS="-g"
34140 34126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34141 34127 /* end confdefs.h. */
34142 34128
34143 34129 int
34144 34130 main ()
34145 34131 {
34146 34132
34147 34133 ;
34148 34134 return 0;
34149 34135 }
34150 34136 _ACEOF
34151 34137 if ac_fn_c_try_compile "$LINENO"; then :
34152 34138 ac_cv_prog_cc_g=yes
34153 34139 else
34154 34140 CFLAGS=""
34155 34141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34156 34142 /* end confdefs.h. */
34157 34143
34158 34144 int
34159 34145 main ()
34160 34146 {
34161 34147
34162 34148 ;
34163 34149 return 0;
34164 34150 }
34165 34151 _ACEOF
34166 34152 if ac_fn_c_try_compile "$LINENO"; then :
34167 34153
34168 34154 else
34169 34155 ac_c_werror_flag=$ac_save_c_werror_flag
34170 34156 CFLAGS="-g"
34171 34157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34172 34158 /* end confdefs.h. */
34173 34159
34174 34160 int
34175 34161 main ()
34176 34162 {
34177 34163
34178 34164 ;
34179 34165 return 0;
34180 34166 }
34181 34167 _ACEOF
34182 34168 if ac_fn_c_try_compile "$LINENO"; then :
34183 34169 ac_cv_prog_cc_g=yes
34184 34170 fi
34185 34171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34186 34172 fi
34187 34173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34188 34174 fi
34189 34175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34190 34176 ac_c_werror_flag=$ac_save_c_werror_flag
34191 34177 fi
34192 34178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34193 34179 $as_echo "$ac_cv_prog_cc_g" >&6; }
34194 34180 if test "$ac_test_CFLAGS" = set; then
34195 34181 CFLAGS=$ac_save_CFLAGS
34196 34182 elif test $ac_cv_prog_cc_g = yes; then
34197 34183 if test "$GCC" = yes; then
34198 34184 CFLAGS="-g -O2"
34199 34185 else
34200 34186 CFLAGS="-g"
34201 34187 fi
34202 34188 else
34203 34189 if test "$GCC" = yes; then
34204 34190 CFLAGS="-O2"
34205 34191 else
34206 34192 CFLAGS=
34207 34193 fi
34208 34194 fi
34209 34195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34210 34196 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34211 34197 if ${ac_cv_prog_cc_c89+:} false; then :
34212 34198 $as_echo_n "(cached) " >&6
34213 34199 else
34214 34200 ac_cv_prog_cc_c89=no
34215 34201 ac_save_CC=$CC
34216 34202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34217 34203 /* end confdefs.h. */
34218 34204 #include <stdarg.h>
34219 34205 #include <stdio.h>
34220 34206 struct stat;
34221 34207 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
34222 34208 struct buf { int x; };
34223 34209 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34224 34210 static char *e (p, i)
34225 34211 char **p;
34226 34212 int i;
34227 34213 {
34228 34214 return p[i];
34229 34215 }
34230 34216 static char *f (char * (*g) (char **, int), char **p, ...)
34231 34217 {
34232 34218 char *s;
34233 34219 va_list v;
34234 34220 va_start (v,p);
34235 34221 s = g (p, va_arg (v,int));
34236 34222 va_end (v);
34237 34223 return s;
34238 34224 }
34239 34225
34240 34226 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
34241 34227 function prototypes and stuff, but not '\xHH' hex character constants.
34242 34228 These don't provoke an error unfortunately, instead are silently treated
34243 34229 as 'x'. The following induces an error, until -std is added to get
34244 34230 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
34245 34231 array size at least. It's necessary to write '\x00'==0 to get something
34246 34232 that's true only with -std. */
34247 34233 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34248 34234
34249 34235 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34250 34236 inside strings and character constants. */
34251 34237 #define FOO(x) 'x'
34252 34238 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34253 34239
34254 34240 int test (int i, double x);
34255 34241 struct s1 {int (*f) (int a);};
34256 34242 struct s2 {int (*f) (double a);};
34257 34243 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34258 34244 int argc;
34259 34245 char **argv;
34260 34246 int
34261 34247 main ()
34262 34248 {
34263 34249 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
34264 34250 ;
34265 34251 return 0;
34266 34252 }
34267 34253 _ACEOF
34268 34254 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34269 34255 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34270 34256 do
34271 34257 CC="$ac_save_CC $ac_arg"
34272 34258 if ac_fn_c_try_compile "$LINENO"; then :
34273 34259 ac_cv_prog_cc_c89=$ac_arg
34274 34260 fi
34275 34261 rm -f core conftest.err conftest.$ac_objext
34276 34262 test "x$ac_cv_prog_cc_c89" != "xno" && break
34277 34263 done
34278 34264 rm -f conftest.$ac_ext
34279 34265 CC=$ac_save_CC
34280 34266
34281 34267 fi
34282 34268 # AC_CACHE_VAL
34283 34269 case "x$ac_cv_prog_cc_c89" in
34284 34270 x)
34285 34271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34286 34272 $as_echo "none needed" >&6; } ;;
34287 34273 xno)
34288 34274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34289 34275 $as_echo "unsupported" >&6; } ;;
34290 34276 *)
34291 34277 CC="$CC $ac_cv_prog_cc_c89"
34292 34278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34293 34279 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34294 34280 esac
34295 34281 if test "x$ac_cv_prog_cc_c89" != xno; then :
34296 34282
34297 34283 fi
34298 34284
34299 34285 ac_ext=cpp
34300 34286 ac_cpp='$CXXCPP $CPPFLAGS'
34301 34287 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34302 34288 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34303 34289 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34304 34290
34305 34291
34306 34292
34307 34293 COMPILER_NAME=C++
34308 34294 SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34309 34295
34310 34296 if test "x$CXX" != x; then
34311 34297 # User has supplied compiler name already, always let that override.
34312 34298 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34313 34299 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34314 34300 if test "x`basename $CXX`" = "x$CXX"; then
34315 34301 # A command without a complete path is provided, search $PATH.
34316 34302
34317 34303 for ac_prog in $CXX
34318 34304 do
34319 34305 # Extract the first word of "$ac_prog", so it can be a program name with args.
34320 34306 set dummy $ac_prog; ac_word=$2
34321 34307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34322 34308 $as_echo_n "checking for $ac_word... " >&6; }
34323 34309 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34324 34310 $as_echo_n "(cached) " >&6
34325 34311 else
34326 34312 case $POTENTIAL_CXX in
34327 34313 [\\/]* | ?:[\\/]*)
34328 34314 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34329 34315 ;;
34330 34316 *)
34331 34317 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34332 34318 for as_dir in $PATH
34333 34319 do
34334 34320 IFS=$as_save_IFS
34335 34321 test -z "$as_dir" && as_dir=.
34336 34322 for ac_exec_ext in '' $ac_executable_extensions; do
34337 34323 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34338 34324 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34339 34325 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34340 34326 break 2
34341 34327 fi
34342 34328 done
34343 34329 done
34344 34330 IFS=$as_save_IFS
34345 34331
34346 34332 ;;
34347 34333 esac
34348 34334 fi
34349 34335 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34350 34336 if test -n "$POTENTIAL_CXX"; then
34351 34337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34352 34338 $as_echo "$POTENTIAL_CXX" >&6; }
34353 34339 else
34354 34340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34355 34341 $as_echo "no" >&6; }
34356 34342 fi
34357 34343
34358 34344
34359 34345 test -n "$POTENTIAL_CXX" && break
34360 34346 done
34361 34347
34362 34348 if test "x$POTENTIAL_CXX" != x; then
34363 34349 CXX=$POTENTIAL_CXX
34364 34350 else
34365 34351 as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34366 34352 fi
34367 34353 else
34368 34354 # Otherwise it might already be a complete path
34369 34355 if test ! -x "$CXX"; then
34370 34356 as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34371 34357 fi
34372 34358 fi
34373 34359 else
34374 34360 # No user supplied value. Locate compiler ourselves.
34375 34361
34376 34362 # If we are cross compiling, assume cross compilation tools follows the
34377 34363 # cross compilation standard where they are prefixed with the autoconf
34378 34364 # standard name for the target. For example the binary
34379 34365 # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34380 34366 # If we are not cross compiling, then the default compiler name will be
34381 34367 # used.
34382 34368
34383 34369 CXX=
34384 34370 # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34385 34371 # before checking the rest of the PATH.
34386 34372 # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34387 34373 # step, this should not be necessary.
34388 34374 if test -n "$TOOLCHAIN_PATH"; then
34389 34375 PATH_save="$PATH"
34390 34376 PATH="$TOOLCHAIN_PATH"
34391 34377 for ac_prog in $SEARCH_LIST
34392 34378 do
34393 34379 # Extract the first word of "$ac_prog", so it can be a program name with args.
34394 34380 set dummy $ac_prog; ac_word=$2
34395 34381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34396 34382 $as_echo_n "checking for $ac_word... " >&6; }
34397 34383 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34398 34384 $as_echo_n "(cached) " >&6
34399 34385 else
34400 34386 case $TOOLCHAIN_PATH_CXX in
34401 34387 [\\/]* | ?:[\\/]*)
34402 34388 ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34403 34389 ;;
34404 34390 *)
34405 34391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34406 34392 for as_dir in $PATH
34407 34393 do
34408 34394 IFS=$as_save_IFS
34409 34395 test -z "$as_dir" && as_dir=.
34410 34396 for ac_exec_ext in '' $ac_executable_extensions; do
34411 34397 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34412 34398 ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34413 34399 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34414 34400 break 2
34415 34401 fi
34416 34402 done
34417 34403 done
34418 34404 IFS=$as_save_IFS
34419 34405
34420 34406 ;;
34421 34407 esac
34422 34408 fi
34423 34409 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34424 34410 if test -n "$TOOLCHAIN_PATH_CXX"; then
34425 34411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34426 34412 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34427 34413 else
34428 34414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34429 34415 $as_echo "no" >&6; }
34430 34416 fi
34431 34417
34432 34418
34433 34419 test -n "$TOOLCHAIN_PATH_CXX" && break
34434 34420 done
34435 34421
34436 34422 CXX=$TOOLCHAIN_PATH_CXX
34437 34423 PATH="$PATH_save"
34438 34424 fi
34439 34425
34440 34426 # AC_PATH_PROGS can't be run multiple times with the same variable,
34441 34427 # so create a new name for this run.
34442 34428 if test "x$CXX" = x; then
34443 34429 for ac_prog in $SEARCH_LIST
34444 34430 do
34445 34431 # Extract the first word of "$ac_prog", so it can be a program name with args.
34446 34432 set dummy $ac_prog; ac_word=$2
34447 34433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34448 34434 $as_echo_n "checking for $ac_word... " >&6; }
34449 34435 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34450 34436 $as_echo_n "(cached) " >&6
34451 34437 else
34452 34438 case $POTENTIAL_CXX in
34453 34439 [\\/]* | ?:[\\/]*)
34454 34440 ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34455 34441 ;;
34456 34442 *)
34457 34443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34458 34444 for as_dir in $PATH
34459 34445 do
34460 34446 IFS=$as_save_IFS
34461 34447 test -z "$as_dir" && as_dir=.
34462 34448 for ac_exec_ext in '' $ac_executable_extensions; do
34463 34449 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34464 34450 ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34465 34451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34466 34452 break 2
34467 34453 fi
34468 34454 done
34469 34455 done
34470 34456 IFS=$as_save_IFS
34471 34457
34472 34458 ;;
34473 34459 esac
34474 34460 fi
34475 34461 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34476 34462 if test -n "$POTENTIAL_CXX"; then
34477 34463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34478 34464 $as_echo "$POTENTIAL_CXX" >&6; }
34479 34465 else
34480 34466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34481 34467 $as_echo "no" >&6; }
34482 34468 fi
34483 34469
34484 34470
34485 34471 test -n "$POTENTIAL_CXX" && break
34486 34472 done
34487 34473
34488 34474 CXX=$POTENTIAL_CXX
34489 34475 fi
34490 34476
34491 34477 if test "x$CXX" = x; then
34492 34478
34493 34479 # Print a helpful message on how to acquire the necessary build dependency.
34494 34480 # devkit is the help tag: freetype, cups, alsa etc
34495 34481 MISSING_DEPENDENCY=devkit
34496 34482
34497 34483 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34498 34484 cygwin_help $MISSING_DEPENDENCY
34499 34485 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34500 34486 msys_help $MISSING_DEPENDENCY
34501 34487 else
34502 34488 PKGHANDLER_COMMAND=
34503 34489
34504 34490 case $PKGHANDLER in
34505 34491 apt-get)
34506 34492 apt_help $MISSING_DEPENDENCY ;;
34507 34493 yum)
34508 34494 yum_help $MISSING_DEPENDENCY ;;
34509 34495 port)
34510 34496 port_help $MISSING_DEPENDENCY ;;
34511 34497 pkgutil)
34512 34498 pkgutil_help $MISSING_DEPENDENCY ;;
34513 34499 pkgadd)
34514 34500 pkgadd_help $MISSING_DEPENDENCY ;;
34515 34501 esac
34516 34502
34517 34503 if test "x$PKGHANDLER_COMMAND" != x; then
34518 34504 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34519 34505 fi
34520 34506 fi
34521 34507
34522 34508 as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34523 34509 fi
34524 34510 fi
34525 34511
34526 34512 # Now we have a compiler binary in CXX. Make sure it's okay.
34527 34513
34528 34514 # Only process if variable expands to non-empty
34529 34515
34530 34516 if test "x$CXX" != x; then
34531 34517 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34532 34518
34533 34519 # First separate the path from the arguments. This will split at the first
34534 34520 # space.
34535 34521 complete="$CXX"
34536 34522 path="${complete%% *}"
34537 34523 tmp="$complete EOL"
34538 34524 arguments="${tmp#* }"
34539 34525
34540 34526 # Input might be given as Windows format, start by converting to
34541 34527 # unix format.
34542 34528 new_path=`$CYGPATH -u "$path"`
34543 34529
34544 34530 # Now try to locate executable using which
34545 34531 new_path=`$WHICH "$new_path" 2> /dev/null`
34546 34532 # bat and cmd files are not always considered executable in cygwin causing which
34547 34533 # to not find them
34548 34534 if test "x$new_path" = x \
34549 34535 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34550 34536 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34551 34537 new_path=`$CYGPATH -u "$path"`
34552 34538 fi
34553 34539 if test "x$new_path" = x; then
34554 34540 # Oops. Which didn't find the executable.
34555 34541 # The splitting of arguments from the executable at a space might have been incorrect,
34556 34542 # since paths with space are more likely in Windows. Give it another try with the whole
34557 34543 # argument.
34558 34544 path="$complete"
34559 34545 arguments="EOL"
34560 34546 new_path=`$CYGPATH -u "$path"`
34561 34547 new_path=`$WHICH "$new_path" 2> /dev/null`
34562 34548 # bat and cmd files are not always considered executable in cygwin causing which
34563 34549 # to not find them
34564 34550 if test "x$new_path" = x \
34565 34551 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34566 34552 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34567 34553 new_path=`$CYGPATH -u "$path"`
34568 34554 fi
34569 34555 if test "x$new_path" = x; then
34570 34556 # It's still not found. Now this is an unrecoverable error.
34571 34557 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34572 34558 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34573 34559 has_space=`$ECHO "$complete" | $GREP " "`
34574 34560 if test "x$has_space" != x; then
34575 34561 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34576 34562 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34577 34563 fi
34578 34564 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34579 34565 fi
34580 34566 fi
34581 34567
34582 34568 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34583 34569 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34584 34570 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34585 34571 # "foo.exe" is OK but "foo" is an error.
34586 34572 #
34587 34573 # This test is therefore slightly more accurate than "test -f" to check for file presence.
34588 34574 # It is also a way to make sure we got the proper file name for the real test later on.
34589 34575 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34590 34576 if test "x$test_shortpath" = x; then
34591 34577 # Short path failed, file does not exist as specified.
34592 34578 # Try adding .exe or .cmd
34593 34579 if test -f "${new_path}.exe"; then
34594 34580 input_to_shortpath="${new_path}.exe"
34595 34581 elif test -f "${new_path}.cmd"; then
34596 34582 input_to_shortpath="${new_path}.cmd"
34597 34583 else
34598 34584 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34599 34585 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34600 34586 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34601 34587 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34602 34588 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34603 34589 fi
34604 34590 else
34605 34591 input_to_shortpath="$new_path"
34606 34592 fi
34607 34593
34608 34594 # Call helper function which possibly converts this using DOS-style short mode.
34609 34595 # If so, the updated path is stored in $new_path.
34610 34596 new_path="$input_to_shortpath"
34611 34597
34612 34598 input_path="$input_to_shortpath"
34613 34599 # Check if we need to convert this using DOS-style short mode. If the path
34614 34600 # contains just simple characters, use it. Otherwise (spaces, weird characters),
34615 34601 # take no chances and rewrite it.
34616 34602 # Note: m4 eats our [], so we need to use [ and ] instead.
34617 34603 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34618 34604 if test "x$has_forbidden_chars" != x; then
34619 34605 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34620 34606 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34621 34607 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34622 34608 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34623 34609 # Going to short mode and back again did indeed matter. Since short mode is
34624 34610 # case insensitive, let's make it lowercase to improve readability.
34625 34611 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34626 34612 # Now convert it back to Unix-style (cygpath)
34627 34613 input_path=`$CYGPATH -u "$shortmode_path"`
34628 34614 new_path="$input_path"
34629 34615 fi
34630 34616 fi
34631 34617
34632 34618 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34633 34619 if test "x$test_cygdrive_prefix" = x; then
34634 34620 # As a simple fix, exclude /usr/bin since it's not a real path.
34635 34621 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34636 34622 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34637 34623 # a path prefixed by /cygdrive for fixpath to work.
34638 34624 new_path="$CYGWIN_ROOT_PATH$input_path"
34639 34625 fi
34640 34626 fi
34641 34627
34642 34628 # remove trailing .exe if any
34643 34629 new_path="${new_path/%.exe/}"
34644 34630
34645 34631 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34646 34632
34647 34633 # First separate the path from the arguments. This will split at the first
34648 34634 # space.
34649 34635 complete="$CXX"
34650 34636 path="${complete%% *}"
34651 34637 tmp="$complete EOL"
34652 34638 arguments="${tmp#* }"
34653 34639
34654 34640 # Input might be given as Windows format, start by converting to
34655 34641 # unix format.
34656 34642 new_path="$path"
34657 34643
34658 34644 windows_path="$new_path"
34659 34645 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34660 34646 unix_path=`$CYGPATH -u "$windows_path"`
34661 34647 new_path="$unix_path"
34662 34648 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34663 34649 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34664 34650 new_path="$unix_path"
34665 34651 fi
34666 34652
34667 34653
34668 34654 # Now try to locate executable using which
34669 34655 new_path=`$WHICH "$new_path" 2> /dev/null`
34670 34656
34671 34657 if test "x$new_path" = x; then
34672 34658 # Oops. Which didn't find the executable.
34673 34659 # The splitting of arguments from the executable at a space might have been incorrect,
34674 34660 # since paths with space are more likely in Windows. Give it another try with the whole
34675 34661 # argument.
34676 34662 path="$complete"
34677 34663 arguments="EOL"
34678 34664 new_path="$path"
34679 34665
34680 34666 windows_path="$new_path"
34681 34667 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34682 34668 unix_path=`$CYGPATH -u "$windows_path"`
34683 34669 new_path="$unix_path"
34684 34670 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34685 34671 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34686 34672 new_path="$unix_path"
34687 34673 fi
34688 34674
34689 34675
34690 34676 new_path=`$WHICH "$new_path" 2> /dev/null`
34691 34677 # bat and cmd files are not always considered executable in MSYS causing which
34692 34678 # to not find them
34693 34679 if test "x$new_path" = x \
34694 34680 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34695 34681 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34696 34682 new_path="$path"
34697 34683
34698 34684 windows_path="$new_path"
34699 34685 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34700 34686 unix_path=`$CYGPATH -u "$windows_path"`
34701 34687 new_path="$unix_path"
34702 34688 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34703 34689 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34704 34690 new_path="$unix_path"
34705 34691 fi
34706 34692
34707 34693 fi
34708 34694
34709 34695 if test "x$new_path" = x; then
34710 34696 # It's still not found. Now this is an unrecoverable error.
34711 34697 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34712 34698 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34713 34699 has_space=`$ECHO "$complete" | $GREP " "`
34714 34700 if test "x$has_space" != x; then
34715 34701 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34716 34702 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34717 34703 fi
34718 34704 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34719 34705 fi
34720 34706 fi
34721 34707
34722 34708 # Now new_path has a complete unix path to the binary
34723 34709 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34724 34710 # Keep paths in /bin as-is, but remove trailing .exe if any
34725 34711 new_path="${new_path/%.exe/}"
34726 34712 # Do not save /bin paths to all_fixpath_prefixes!
34727 34713 else
34728 34714 # Not in mixed or Windows style, start by that.
34729 34715 new_path=`cmd //c echo $new_path`
34730 34716
34731 34717 input_path="$new_path"
34732 34718 # Check if we need to convert this using DOS-style short mode. If the path
34733 34719 # contains just simple characters, use it. Otherwise (spaces, weird characters),
34734 34720 # take no chances and rewrite it.
34735 34721 # Note: m4 eats our [], so we need to use [ and ] instead.
34736 34722 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34737 34723 if test "x$has_forbidden_chars" != x; then
34738 34724 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34739 34725 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34740 34726 fi
34741 34727
34742 34728 # Output is in $new_path
34743 34729
34744 34730 windows_path="$new_path"
34745 34731 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34746 34732 unix_path=`$CYGPATH -u "$windows_path"`
34747 34733 new_path="$unix_path"
34748 34734 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34749 34735 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34750 34736 new_path="$unix_path"
34751 34737 fi
34752 34738
34753 34739 # remove trailing .exe if any
34754 34740 new_path="${new_path/%.exe/}"
34755 34741
34756 34742 # Save the first 10 bytes of this path to the storage, so fixpath can work.
34757 34743 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34758 34744 fi
34759 34745
34760 34746 else
34761 34747 # We're on a unix platform. Hooray! :)
34762 34748 # First separate the path from the arguments. This will split at the first
34763 34749 # space.
34764 34750 complete="$CXX"
34765 34751 path="${complete%% *}"
34766 34752 tmp="$complete EOL"
34767 34753 arguments="${tmp#* }"
34768 34754
34769 34755 # Cannot rely on the command "which" here since it doesn't always work.
34770 34756 is_absolute_path=`$ECHO "$path" | $GREP ^/`
34771 34757 if test -z "$is_absolute_path"; then
34772 34758 # Path to executable is not absolute. Find it.
34773 34759 IFS_save="$IFS"
34774 34760 IFS=:
34775 34761 for p in $PATH; do
34776 34762 if test -f "$p/$path" && test -x "$p/$path"; then
34777 34763 new_path="$p/$path"
34778 34764 break
34779 34765 fi
34780 34766 done
34781 34767 IFS="$IFS_save"
34782 34768 else
34783 34769 # This is an absolute path, we can use it without further modifications.
34784 34770 new_path="$path"
34785 34771 fi
34786 34772
34787 34773 if test "x$new_path" = x; then
34788 34774 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34789 34775 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34790 34776 has_space=`$ECHO "$complete" | $GREP " "`
34791 34777 if test "x$has_space" != x; then
34792 34778 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34793 34779 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34794 34780 fi
34795 34781 as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34796 34782 fi
34797 34783 fi
34798 34784
34799 34785 # Now join together the path and the arguments once again
34800 34786 if test "x$arguments" != xEOL; then
34801 34787 new_complete="$new_path ${arguments% *}"
34802 34788 else
34803 34789 new_complete="$new_path"
34804 34790 fi
34805 34791
34806 34792 if test "x$complete" != "x$new_complete"; then
34807 34793 CXX="$new_complete"
34808 34794 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34809 34795 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34810 34796 fi
34811 34797 fi
34812 34798
34813 34799 TEST_COMPILER="$CXX"
34814 34800
34815 34801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34816 34802 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34817 34803 SYMLINK_ORIGINAL="$TEST_COMPILER"
34818 34804
34819 34805 if test "x$OPENJDK_BUILD_OS" != xwindows; then
34820 34806 # Follow a chain of symbolic links. Use readlink
34821 34807 # where it exists, else fall back to horribly
34822 34808 # complicated shell code.
34823 34809 if test "x$READLINK_TESTED" != yes; then
34824 34810 # On MacOSX there is a readlink tool with a different
34825 34811 # purpose than the GNU readlink tool. Check the found readlink.
34826 34812 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34827 34813 if test "x$ISGNU" = x; then
34828 34814 # A readlink that we do not know how to use.
34829 34815 # Are there other non-GNU readlinks out there?
34830 34816 READLINK_TESTED=yes
34831 34817 READLINK=
34832 34818 fi
34833 34819 fi
34834 34820
34835 34821 if test "x$READLINK" != x; then
34836 34822 SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34837 34823 else
34838 34824 # Save the current directory for restoring afterwards
34839 34825 STARTDIR=$PWD
34840 34826 COUNTER=0
34841 34827 sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34842 34828 sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34843 34829 cd $sym_link_dir
34844 34830 # Use -P flag to resolve symlinks in directories.
34845 34831 cd `$THEPWDCMD -P`
34846 34832 sym_link_dir=`$THEPWDCMD -P`
34847 34833 # Resolve file symlinks
34848 34834 while test $COUNTER -lt 20; do
34849 34835 ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34850 34836 if test "x$ISLINK" == x; then
34851 34837 # This is not a symbolic link! We are done!
34852 34838 break
34853 34839 fi
34854 34840 # Again resolve directory symlinks since the target of the just found
34855 34841 # link could be in a different directory
34856 34842 cd `$DIRNAME $ISLINK`
34857 34843 sym_link_dir=`$THEPWDCMD -P`
34858 34844 sym_link_file=`$BASENAME $ISLINK`
34859 34845 let COUNTER=COUNTER+1
34860 34846 done
34861 34847 cd $STARTDIR
34862 34848 SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34863 34849 fi
34864 34850 fi
34865 34851
34866 34852 if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34867 34853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34868 34854 $as_echo "no symlink" >&6; }
34869 34855 else
34870 34856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34871 34857 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34872 34858
34873 34859 # We can't handle ccache by gcc wrappers, since we need to know if we're
34874 34860 # using ccache. Instead ccache usage must be controlled by a configure option.
34875 34861 COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34876 34862 if test "x$COMPILER_BASENAME" = "xccache"; then
34877 34863 { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34878 34864 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34879 34865 as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34880 34866 fi
34881 34867 fi
34882 34868
34883 34869
34884 34870 COMPILER=$CXX
34885 34871 COMPILER_NAME=$COMPILER_NAME
34886 34872
34887 34873 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34888 34874 # cc -V output typically looks like
34889 34875 # cc: Sun C 5.12 Linux_i386 2011/11/16
34890 34876 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34891 34877 # Check that this is likely to be the Solaris Studio cc.
34892 34878 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34893 34879 if test $? -ne 0; then
34894 34880 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34895 34881 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34896 34882 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34897 34883 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34898 34884 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34899 34885 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34900 34886 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34901 34887 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34902 34888 fi
34903 34889 # Remove usage instructions (if present), and
34904 34890 # collapse compiler output into a single line
34905 34891 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34906 34892 $SED -e 's/ *[Uu]sage:.*//'`
34907 34893 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34908 34894 $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34909 34895 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
34910 34896 # xlc -qversion output typically looks like
34911 34897 # IBM XL C/C++ for AIX, V11.1 (5724-X13)
34912 34898 # Version: 11.01.0000.0015
34913 34899 COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34914 34900 # Check that this is likely to be the IBM XL C compiler.
34915 34901 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34916 34902 if test $? -ne 0; then
34917 34903 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34918 34904 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34919 34905 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34920 34906 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34921 34907 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34922 34908 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34923 34909 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34924 34910 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34925 34911 fi
34926 34912 # Collapse compiler output into a single line
34927 34913 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34928 34914 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34929 34915 $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34930 34916 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34931 34917 # There is no specific version flag, but all output starts with a version string.
34932 34918 # First line typically looks something like:
34933 34919 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34934 34920 COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34935 34921 # Check that this is likely to be Microsoft CL.EXE.
34936 34922 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34937 34923 if test $? -ne 0; then
34938 34924 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34939 34925 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34940 34926 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34941 34927 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34942 34928 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34943 34929 fi
34944 34930 # Collapse compiler output into a single line
34945 34931 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34946 34932 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34947 34933 $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34948 34934 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
34949 34935 # gcc --version output typically looks like
34950 34936 # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34951 34937 # Copyright (C) 2013 Free Software Foundation, Inc.
34952 34938 # This is free software; see the source for copying conditions. There is NO
34953 34939 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34954 34940 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34955 34941 # Check that this is likely to be GCC.
34956 34942 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34957 34943 if test $? -ne 0; then
34958 34944 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34959 34945 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34960 34946 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34961 34947 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34962 34948 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34963 34949 fi
34964 34950 # Remove Copyright and legalese from version string, and
34965 34951 # collapse into a single line
34966 34952 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34967 34953 $SED -e 's/ *Copyright .*//'`
34968 34954 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34969 34955 $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34970 34956 elif test "x$TOOLCHAIN_TYPE" = xclang; then
34971 34957 # clang --version output typically looks like
34972 34958 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34973 34959 # clang version 3.3 (tags/RELEASE_33/final)
34974 34960 # or
34975 34961 # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34976 34962 # Target: x86_64-pc-linux-gnu
34977 34963 # Thread model: posix
34978 34964 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34979 34965 # Check that this is likely to be clang
34980 34966 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34981 34967 if test $? -ne 0; then
34982 34968 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34983 34969 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34984 34970 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34985 34971 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34986 34972 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34987 34973 fi
34988 34974 # Collapse compiler output into a single line
34989 34975 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34990 34976 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34991 34977 $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34992 34978 else
34993 34979 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34994 34980 fi
34995 34981 # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34996 34982 CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34997 34983 # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34998 34984 CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34999 34985
35000 34986 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35001 34987 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35002 34988
35003 34989
35004 34990 # Now that we have resolved CXX ourself, let autoconf have its go at it
35005 34991 ac_ext=cpp
35006 34992 ac_cpp='$CXXCPP $CPPFLAGS'
35007 34993 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35008 34994 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35009 34995 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35010 34996 if test -z "$CXX"; then
35011 34997 if test -n "$CCC"; then
35012 34998 CXX=$CCC
35013 34999 else
35014 35000 if test -n "$ac_tool_prefix"; then
35015 35001 for ac_prog in $CXX
35016 35002 do
35017 35003 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35018 35004 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35019 35005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35020 35006 $as_echo_n "checking for $ac_word... " >&6; }
35021 35007 if ${ac_cv_prog_CXX+:} false; then :
35022 35008 $as_echo_n "(cached) " >&6
35023 35009 else
35024 35010 if test -n "$CXX"; then
35025 35011 ac_cv_prog_CXX="$CXX" # Let the user override the test.
35026 35012 else
35027 35013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35028 35014 for as_dir in $PATH
35029 35015 do
35030 35016 IFS=$as_save_IFS
35031 35017 test -z "$as_dir" && as_dir=.
35032 35018 for ac_exec_ext in '' $ac_executable_extensions; do
35033 35019 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35034 35020 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35035 35021 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35036 35022 break 2
35037 35023 fi
35038 35024 done
35039 35025 done
35040 35026 IFS=$as_save_IFS
35041 35027
35042 35028 fi
35043 35029 fi
35044 35030 CXX=$ac_cv_prog_CXX
35045 35031 if test -n "$CXX"; then
35046 35032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35047 35033 $as_echo "$CXX" >&6; }
35048 35034 else
35049 35035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35050 35036 $as_echo "no" >&6; }
35051 35037 fi
35052 35038
35053 35039
35054 35040 test -n "$CXX" && break
35055 35041 done
35056 35042 fi
35057 35043 if test -z "$CXX"; then
35058 35044 ac_ct_CXX=$CXX
35059 35045 for ac_prog in $CXX
35060 35046 do
35061 35047 # Extract the first word of "$ac_prog", so it can be a program name with args.
35062 35048 set dummy $ac_prog; ac_word=$2
35063 35049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35064 35050 $as_echo_n "checking for $ac_word... " >&6; }
35065 35051 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35066 35052 $as_echo_n "(cached) " >&6
35067 35053 else
35068 35054 if test -n "$ac_ct_CXX"; then
35069 35055 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35070 35056 else
35071 35057 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35072 35058 for as_dir in $PATH
35073 35059 do
35074 35060 IFS=$as_save_IFS
35075 35061 test -z "$as_dir" && as_dir=.
35076 35062 for ac_exec_ext in '' $ac_executable_extensions; do
35077 35063 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35078 35064 ac_cv_prog_ac_ct_CXX="$ac_prog"
35079 35065 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35080 35066 break 2
35081 35067 fi
35082 35068 done
35083 35069 done
35084 35070 IFS=$as_save_IFS
35085 35071
35086 35072 fi
35087 35073 fi
35088 35074 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35089 35075 if test -n "$ac_ct_CXX"; then
35090 35076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35091 35077 $as_echo "$ac_ct_CXX" >&6; }
35092 35078 else
35093 35079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35094 35080 $as_echo "no" >&6; }
35095 35081 fi
35096 35082
35097 35083
35098 35084 test -n "$ac_ct_CXX" && break
35099 35085 done
35100 35086
35101 35087 if test "x$ac_ct_CXX" = x; then
35102 35088 CXX="g++"
35103 35089 else
35104 35090 case $cross_compiling:$ac_tool_warned in
35105 35091 yes:)
35106 35092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35107 35093 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35108 35094 ac_tool_warned=yes ;;
35109 35095 esac
35110 35096 CXX=$ac_ct_CXX
35111 35097 fi
35112 35098 fi
35113 35099
35114 35100 fi
35115 35101 fi
35116 35102 # Provide some information about the compiler.
35117 35103 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35118 35104 set X $ac_compile
35119 35105 ac_compiler=$2
35120 35106 for ac_option in --version -v -V -qversion; do
35121 35107 { { ac_try="$ac_compiler $ac_option >&5"
35122 35108 case "(($ac_try" in
35123 35109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35124 35110 *) ac_try_echo=$ac_try;;
35125 35111 esac
35126 35112 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35127 35113 $as_echo "$ac_try_echo"; } >&5
35128 35114 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35129 35115 ac_status=$?
35130 35116 if test -s conftest.err; then
35131 35117 sed '10a\
35132 35118 ... rest of stderr output deleted ...
35133 35119 10q' conftest.err >conftest.er1
35134 35120 cat conftest.er1 >&5
35135 35121 fi
35136 35122 rm -f conftest.er1 conftest.err
35137 35123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35138 35124 test $ac_status = 0; }
35139 35125 done
35140 35126
35141 35127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35142 35128 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35143 35129 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35144 35130 $as_echo_n "(cached) " >&6
35145 35131 else
35146 35132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35147 35133 /* end confdefs.h. */
35148 35134
35149 35135 int
35150 35136 main ()
35151 35137 {
35152 35138 #ifndef __GNUC__
35153 35139 choke me
35154 35140 #endif
35155 35141
35156 35142 ;
35157 35143 return 0;
35158 35144 }
35159 35145 _ACEOF
35160 35146 if ac_fn_cxx_try_compile "$LINENO"; then :
35161 35147 ac_compiler_gnu=yes
35162 35148 else
35163 35149 ac_compiler_gnu=no
35164 35150 fi
35165 35151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35166 35152 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35167 35153
35168 35154 fi
35169 35155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35170 35156 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35171 35157 if test $ac_compiler_gnu = yes; then
35172 35158 GXX=yes
35173 35159 else
35174 35160 GXX=
35175 35161 fi
35176 35162 ac_test_CXXFLAGS=${CXXFLAGS+set}
35177 35163 ac_save_CXXFLAGS=$CXXFLAGS
35178 35164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35179 35165 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
35180 35166 if ${ac_cv_prog_cxx_g+:} false; then :
35181 35167 $as_echo_n "(cached) " >&6
35182 35168 else
35183 35169 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35184 35170 ac_cxx_werror_flag=yes
35185 35171 ac_cv_prog_cxx_g=no
35186 35172 CXXFLAGS="-g"
35187 35173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35188 35174 /* end confdefs.h. */
35189 35175
35190 35176 int
35191 35177 main ()
35192 35178 {
35193 35179
35194 35180 ;
35195 35181 return 0;
35196 35182 }
35197 35183 _ACEOF
35198 35184 if ac_fn_cxx_try_compile "$LINENO"; then :
35199 35185 ac_cv_prog_cxx_g=yes
35200 35186 else
35201 35187 CXXFLAGS=""
35202 35188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35203 35189 /* end confdefs.h. */
35204 35190
35205 35191 int
35206 35192 main ()
35207 35193 {
35208 35194
35209 35195 ;
35210 35196 return 0;
35211 35197 }
35212 35198 _ACEOF
35213 35199 if ac_fn_cxx_try_compile "$LINENO"; then :
35214 35200
35215 35201 else
35216 35202 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35217 35203 CXXFLAGS="-g"
35218 35204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35219 35205 /* end confdefs.h. */
35220 35206
35221 35207 int
35222 35208 main ()
35223 35209 {
35224 35210
35225 35211 ;
35226 35212 return 0;
35227 35213 }
35228 35214 _ACEOF
35229 35215 if ac_fn_cxx_try_compile "$LINENO"; then :
35230 35216 ac_cv_prog_cxx_g=yes
35231 35217 fi
35232 35218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35233 35219 fi
35234 35220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35235 35221 fi
35236 35222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35237 35223 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35238 35224 fi
35239 35225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35240 35226 $as_echo "$ac_cv_prog_cxx_g" >&6; }
35241 35227 if test "$ac_test_CXXFLAGS" = set; then
35242 35228 CXXFLAGS=$ac_save_CXXFLAGS
35243 35229 elif test $ac_cv_prog_cxx_g = yes; then
35244 35230 if test "$GXX" = yes; then
35245 35231 CXXFLAGS="-g -O2"
35246 35232 else
35247 35233 CXXFLAGS="-g"
35248 35234 fi
35249 35235 else
35250 35236 if test "$GXX" = yes; then
35251 35237 CXXFLAGS="-O2"
35252 35238 else
35253 35239 CXXFLAGS=
35254 35240 fi
35255 35241 fi
35256 35242 ac_ext=cpp
35257 35243 ac_cpp='$CXXCPP $CPPFLAGS'
35258 35244 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35259 35245 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35260 35246 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35261 35247
35262 35248
35263 35249 # This is the compiler version number on the form X.Y[.Z]
35264 35250
35265 35251
35266 35252
35267 35253
35268 35254 if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35269 35255 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35270 35256 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35271 35257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35272 35258 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35273 35259 fi
35274 35260
35275 35261 # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35276 35262 if [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35277 35263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35278 35264 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35279 35265 fi
35280 35266
35281 35267 if [[ "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35282 35268 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35283 35269 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35284 35270 fi
35285 35271
35286 35272 COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35287 35273
35288 35274
35289 35275 if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35290 35276
35291 35277
35292 35278
35293 35279
35294 35280
35295 35281
35296 35282
35297 35283
35298 35284
35299 35285
35300 35286
35301 35287
35302 35288
35303 35289
35304 35290
35305 35291
35306 35292
35307 35293
35308 35294
35309 35295
35310 35296
35311 35297
35312 35298
35313 35299
35314 35300
35315 35301
35316 35302
35317 35303
35318 35304
35319 35305
35320 35306
35321 35307
35322 35308
35323 35309
35324 35310
35325 35311
35326 35312
35327 35313
35328 35314
35329 35315
35330 35316
35331 35317
35332 35318
35333 35319
35334 35320
35335 35321
35336 35322
35337 35323
35338 35324
35339 35325 # Execute function body
35340 35326
35341 35327 # Need to assign to a variable since m4 is blocked from modifying parts in [].
35342 35328 REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35343 35329
35344 35330 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35345 35331 as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35346 35332 fi
35347 35333
35348 35334 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35349 35335 as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35350 35336 fi
35351 35337
35352 35338 # Version comparison method inspired by http://stackoverflow.com/a/24067243
35353 35339 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35354 35340
35355 35341 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35356 35342 :
35357 35343
35358 35344 else
35359 35345 :
35360 35346
35361 35347 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
35362 35348 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35363 35349
35364 35350
35365 35351 fi
35366 35352
35367 35353
35368 35354
35369 35355
35370 35356
35371 35357
35372 35358
35373 35359
35374 35360
35375 35361
35376 35362
35377 35363
35378 35364
35379 35365
35380 35366 fi
35381 35367
35382 35368 #
35383 35369 # Setup the preprocessor (CPP and CXXCPP)
35384 35370 #
35385 35371 ac_ext=c
35386 35372 ac_cpp='$CPP $CPPFLAGS'
35387 35373 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35388 35374 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35389 35375 ac_compiler_gnu=$ac_cv_c_compiler_gnu
35390 35376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35391 35377 $as_echo_n "checking how to run the C preprocessor... " >&6; }
35392 35378 # On Suns, sometimes $CPP names a directory.
35393 35379 if test -n "$CPP" && test -d "$CPP"; then
35394 35380 CPP=
35395 35381 fi
35396 35382 if test -z "$CPP"; then
35397 35383 if ${ac_cv_prog_CPP+:} false; then :
35398 35384 $as_echo_n "(cached) " >&6
35399 35385 else
35400 35386 # Double quotes because CPP needs to be expanded
35401 35387 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35402 35388 do
35403 35389 ac_preproc_ok=false
35404 35390 for ac_c_preproc_warn_flag in '' yes
35405 35391 do
35406 35392 # Use a header file that comes with gcc, so configuring glibc
35407 35393 # with a fresh cross-compiler works.
35408 35394 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35409 35395 # <limits.h> exists even on freestanding compilers.
35410 35396 # On the NeXT, cc -E runs the code through the compiler's parser,
35411 35397 # not just through cpp. "Syntax error" is here to catch this case.
35412 35398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35413 35399 /* end confdefs.h. */
35414 35400 #ifdef __STDC__
35415 35401 # include <limits.h>
35416 35402 #else
35417 35403 # include <assert.h>
35418 35404 #endif
35419 35405 Syntax error
35420 35406 _ACEOF
35421 35407 if ac_fn_c_try_cpp "$LINENO"; then :
35422 35408
35423 35409 else
35424 35410 # Broken: fails on valid input.
35425 35411 continue
35426 35412 fi
35427 35413 rm -f conftest.err conftest.i conftest.$ac_ext
35428 35414
35429 35415 # OK, works on sane cases. Now check whether nonexistent headers
35430 35416 # can be detected and how.
35431 35417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35432 35418 /* end confdefs.h. */
35433 35419 #include <ac_nonexistent.h>
35434 35420 _ACEOF
35435 35421 if ac_fn_c_try_cpp "$LINENO"; then :
35436 35422 # Broken: success on invalid input.
35437 35423 continue
35438 35424 else
35439 35425 # Passes both tests.
35440 35426 ac_preproc_ok=:
35441 35427 break
35442 35428 fi
35443 35429 rm -f conftest.err conftest.i conftest.$ac_ext
35444 35430
35445 35431 done
35446 35432 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35447 35433 rm -f conftest.i conftest.err conftest.$ac_ext
35448 35434 if $ac_preproc_ok; then :
35449 35435 break
35450 35436 fi
35451 35437
35452 35438 done
35453 35439 ac_cv_prog_CPP=$CPP
35454 35440
35455 35441 fi
35456 35442 CPP=$ac_cv_prog_CPP
35457 35443 else
35458 35444 ac_cv_prog_CPP=$CPP
35459 35445 fi
35460 35446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35461 35447 $as_echo "$CPP" >&6; }
35462 35448 ac_preproc_ok=false
35463 35449 for ac_c_preproc_warn_flag in '' yes
35464 35450 do
35465 35451 # Use a header file that comes with gcc, so configuring glibc
35466 35452 # with a fresh cross-compiler works.
35467 35453 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35468 35454 # <limits.h> exists even on freestanding compilers.
35469 35455 # On the NeXT, cc -E runs the code through the compiler's parser,
35470 35456 # not just through cpp. "Syntax error" is here to catch this case.
35471 35457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35472 35458 /* end confdefs.h. */
35473 35459 #ifdef __STDC__
35474 35460 # include <limits.h>
35475 35461 #else
35476 35462 # include <assert.h>
35477 35463 #endif
35478 35464 Syntax error
35479 35465 _ACEOF
35480 35466 if ac_fn_c_try_cpp "$LINENO"; then :
35481 35467
35482 35468 else
35483 35469 # Broken: fails on valid input.
35484 35470 continue
35485 35471 fi
35486 35472 rm -f conftest.err conftest.i conftest.$ac_ext
35487 35473
35488 35474 # OK, works on sane cases. Now check whether nonexistent headers
35489 35475 # can be detected and how.
35490 35476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35491 35477 /* end confdefs.h. */
35492 35478 #include <ac_nonexistent.h>
35493 35479 _ACEOF
35494 35480 if ac_fn_c_try_cpp "$LINENO"; then :
35495 35481 # Broken: success on invalid input.
35496 35482 continue
35497 35483 else
35498 35484 # Passes both tests.
35499 35485 ac_preproc_ok=:
35500 35486 break
35501 35487 fi
35502 35488 rm -f conftest.err conftest.i conftest.$ac_ext
35503 35489
35504 35490 done
35505 35491 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35506 35492 rm -f conftest.i conftest.err conftest.$ac_ext
35507 35493 if $ac_preproc_ok; then :
35508 35494
35509 35495 else
35510 35496 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35511 35497 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35512 35498 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35513 35499 See \`config.log' for more details" "$LINENO" 5; }
35514 35500 fi
35515 35501
35516 35502 ac_ext=cpp
35517 35503 ac_cpp='$CXXCPP $CPPFLAGS'
35518 35504 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35519 35505 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35520 35506 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35521 35507
35522 35508
35523 35509 # Only process if variable expands to non-empty
35524 35510
35525 35511 if test "x$CPP" != x; then
35526 35512 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35527 35513
35528 35514 # First separate the path from the arguments. This will split at the first
35529 35515 # space.
35530 35516 complete="$CPP"
35531 35517 path="${complete%% *}"
35532 35518 tmp="$complete EOL"
35533 35519 arguments="${tmp#* }"
35534 35520
35535 35521 # Input might be given as Windows format, start by converting to
35536 35522 # unix format.
35537 35523 new_path=`$CYGPATH -u "$path"`
35538 35524
35539 35525 # Now try to locate executable using which
35540 35526 new_path=`$WHICH "$new_path" 2> /dev/null`
35541 35527 # bat and cmd files are not always considered executable in cygwin causing which
35542 35528 # to not find them
35543 35529 if test "x$new_path" = x \
35544 35530 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35545 35531 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35546 35532 new_path=`$CYGPATH -u "$path"`
35547 35533 fi
35548 35534 if test "x$new_path" = x; then
35549 35535 # Oops. Which didn't find the executable.
35550 35536 # The splitting of arguments from the executable at a space might have been incorrect,
35551 35537 # since paths with space are more likely in Windows. Give it another try with the whole
35552 35538 # argument.
35553 35539 path="$complete"
35554 35540 arguments="EOL"
35555 35541 new_path=`$CYGPATH -u "$path"`
35556 35542 new_path=`$WHICH "$new_path" 2> /dev/null`
35557 35543 # bat and cmd files are not always considered executable in cygwin causing which
35558 35544 # to not find them
35559 35545 if test "x$new_path" = x \
35560 35546 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35561 35547 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35562 35548 new_path=`$CYGPATH -u "$path"`
35563 35549 fi
35564 35550 if test "x$new_path" = x; then
35565 35551 # It's still not found. Now this is an unrecoverable error.
35566 35552 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35567 35553 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35568 35554 has_space=`$ECHO "$complete" | $GREP " "`
35569 35555 if test "x$has_space" != x; then
35570 35556 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35571 35557 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35572 35558 fi
35573 35559 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35574 35560 fi
35575 35561 fi
35576 35562
35577 35563 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35578 35564 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35579 35565 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35580 35566 # "foo.exe" is OK but "foo" is an error.
35581 35567 #
35582 35568 # This test is therefore slightly more accurate than "test -f" to check for file presence.
35583 35569 # It is also a way to make sure we got the proper file name for the real test later on.
35584 35570 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35585 35571 if test "x$test_shortpath" = x; then
35586 35572 # Short path failed, file does not exist as specified.
35587 35573 # Try adding .exe or .cmd
35588 35574 if test -f "${new_path}.exe"; then
35589 35575 input_to_shortpath="${new_path}.exe"
35590 35576 elif test -f "${new_path}.cmd"; then
35591 35577 input_to_shortpath="${new_path}.cmd"
35592 35578 else
35593 35579 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35594 35580 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35595 35581 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35596 35582 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35597 35583 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35598 35584 fi
35599 35585 else
35600 35586 input_to_shortpath="$new_path"
35601 35587 fi
35602 35588
35603 35589 # Call helper function which possibly converts this using DOS-style short mode.
35604 35590 # If so, the updated path is stored in $new_path.
35605 35591 new_path="$input_to_shortpath"
35606 35592
35607 35593 input_path="$input_to_shortpath"
35608 35594 # Check if we need to convert this using DOS-style short mode. If the path
35609 35595 # contains just simple characters, use it. Otherwise (spaces, weird characters),
35610 35596 # take no chances and rewrite it.
35611 35597 # Note: m4 eats our [], so we need to use [ and ] instead.
35612 35598 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35613 35599 if test "x$has_forbidden_chars" != x; then
35614 35600 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35615 35601 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35616 35602 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35617 35603 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35618 35604 # Going to short mode and back again did indeed matter. Since short mode is
35619 35605 # case insensitive, let's make it lowercase to improve readability.
35620 35606 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35621 35607 # Now convert it back to Unix-style (cygpath)
35622 35608 input_path=`$CYGPATH -u "$shortmode_path"`
35623 35609 new_path="$input_path"
35624 35610 fi
35625 35611 fi
35626 35612
35627 35613 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35628 35614 if test "x$test_cygdrive_prefix" = x; then
35629 35615 # As a simple fix, exclude /usr/bin since it's not a real path.
35630 35616 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35631 35617 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35632 35618 # a path prefixed by /cygdrive for fixpath to work.
35633 35619 new_path="$CYGWIN_ROOT_PATH$input_path"
35634 35620 fi
35635 35621 fi
35636 35622
35637 35623 # remove trailing .exe if any
35638 35624 new_path="${new_path/%.exe/}"
35639 35625
35640 35626 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35641 35627
35642 35628 # First separate the path from the arguments. This will split at the first
35643 35629 # space.
35644 35630 complete="$CPP"
35645 35631 path="${complete%% *}"
35646 35632 tmp="$complete EOL"
35647 35633 arguments="${tmp#* }"
35648 35634
35649 35635 # Input might be given as Windows format, start by converting to
35650 35636 # unix format.
35651 35637 new_path="$path"
35652 35638
35653 35639 windows_path="$new_path"
35654 35640 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35655 35641 unix_path=`$CYGPATH -u "$windows_path"`
35656 35642 new_path="$unix_path"
35657 35643 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35658 35644 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35659 35645 new_path="$unix_path"
35660 35646 fi
35661 35647
35662 35648
35663 35649 # Now try to locate executable using which
35664 35650 new_path=`$WHICH "$new_path" 2> /dev/null`
35665 35651
35666 35652 if test "x$new_path" = x; then
35667 35653 # Oops. Which didn't find the executable.
35668 35654 # The splitting of arguments from the executable at a space might have been incorrect,
35669 35655 # since paths with space are more likely in Windows. Give it another try with the whole
35670 35656 # argument.
35671 35657 path="$complete"
35672 35658 arguments="EOL"
35673 35659 new_path="$path"
35674 35660
35675 35661 windows_path="$new_path"
35676 35662 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35677 35663 unix_path=`$CYGPATH -u "$windows_path"`
35678 35664 new_path="$unix_path"
35679 35665 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35680 35666 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35681 35667 new_path="$unix_path"
35682 35668 fi
35683 35669
35684 35670
35685 35671 new_path=`$WHICH "$new_path" 2> /dev/null`
35686 35672 # bat and cmd files are not always considered executable in MSYS causing which
35687 35673 # to not find them
35688 35674 if test "x$new_path" = x \
35689 35675 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35690 35676 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35691 35677 new_path="$path"
35692 35678
35693 35679 windows_path="$new_path"
35694 35680 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35695 35681 unix_path=`$CYGPATH -u "$windows_path"`
35696 35682 new_path="$unix_path"
35697 35683 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35698 35684 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35699 35685 new_path="$unix_path"
35700 35686 fi
35701 35687
35702 35688 fi
35703 35689
35704 35690 if test "x$new_path" = x; then
35705 35691 # It's still not found. Now this is an unrecoverable error.
35706 35692 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35707 35693 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35708 35694 has_space=`$ECHO "$complete" | $GREP " "`
35709 35695 if test "x$has_space" != x; then
35710 35696 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35711 35697 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35712 35698 fi
35713 35699 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35714 35700 fi
35715 35701 fi
35716 35702
35717 35703 # Now new_path has a complete unix path to the binary
35718 35704 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35719 35705 # Keep paths in /bin as-is, but remove trailing .exe if any
35720 35706 new_path="${new_path/%.exe/}"
35721 35707 # Do not save /bin paths to all_fixpath_prefixes!
35722 35708 else
35723 35709 # Not in mixed or Windows style, start by that.
35724 35710 new_path=`cmd //c echo $new_path`
35725 35711
35726 35712 input_path="$new_path"
35727 35713 # Check if we need to convert this using DOS-style short mode. If the path
35728 35714 # contains just simple characters, use it. Otherwise (spaces, weird characters),
35729 35715 # take no chances and rewrite it.
35730 35716 # Note: m4 eats our [], so we need to use [ and ] instead.
35731 35717 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35732 35718 if test "x$has_forbidden_chars" != x; then
35733 35719 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35734 35720 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35735 35721 fi
35736 35722
35737 35723 # Output is in $new_path
35738 35724
35739 35725 windows_path="$new_path"
35740 35726 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35741 35727 unix_path=`$CYGPATH -u "$windows_path"`
35742 35728 new_path="$unix_path"
35743 35729 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35744 35730 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35745 35731 new_path="$unix_path"
35746 35732 fi
35747 35733
35748 35734 # remove trailing .exe if any
35749 35735 new_path="${new_path/%.exe/}"
35750 35736
35751 35737 # Save the first 10 bytes of this path to the storage, so fixpath can work.
35752 35738 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35753 35739 fi
35754 35740
35755 35741 else
35756 35742 # We're on a unix platform. Hooray! :)
35757 35743 # First separate the path from the arguments. This will split at the first
35758 35744 # space.
35759 35745 complete="$CPP"
35760 35746 path="${complete%% *}"
35761 35747 tmp="$complete EOL"
35762 35748 arguments="${tmp#* }"
35763 35749
35764 35750 # Cannot rely on the command "which" here since it doesn't always work.
35765 35751 is_absolute_path=`$ECHO "$path" | $GREP ^/`
35766 35752 if test -z "$is_absolute_path"; then
35767 35753 # Path to executable is not absolute. Find it.
35768 35754 IFS_save="$IFS"
35769 35755 IFS=:
35770 35756 for p in $PATH; do
35771 35757 if test -f "$p/$path" && test -x "$p/$path"; then
35772 35758 new_path="$p/$path"
35773 35759 break
35774 35760 fi
35775 35761 done
35776 35762 IFS="$IFS_save"
35777 35763 else
35778 35764 # This is an absolute path, we can use it without further modifications.
35779 35765 new_path="$path"
35780 35766 fi
35781 35767
35782 35768 if test "x$new_path" = x; then
35783 35769 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35784 35770 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35785 35771 has_space=`$ECHO "$complete" | $GREP " "`
35786 35772 if test "x$has_space" != x; then
35787 35773 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35788 35774 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35789 35775 fi
35790 35776 as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35791 35777 fi
35792 35778 fi
35793 35779
35794 35780 # Now join together the path and the arguments once again
35795 35781 if test "x$arguments" != xEOL; then
35796 35782 new_complete="$new_path ${arguments% *}"
35797 35783 else
35798 35784 new_complete="$new_path"
35799 35785 fi
35800 35786
35801 35787 if test "x$complete" != "x$new_complete"; then
35802 35788 CPP="$new_complete"
35803 35789 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35804 35790 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35805 35791 fi
35806 35792 fi
35807 35793
35808 35794 ac_ext=cpp
35809 35795 ac_cpp='$CXXCPP $CPPFLAGS'
35810 35796 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35811 35797 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35812 35798 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35813 35799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35814 35800 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35815 35801 if test -z "$CXXCPP"; then
35816 35802 if ${ac_cv_prog_CXXCPP+:} false; then :
35817 35803 $as_echo_n "(cached) " >&6
35818 35804 else
35819 35805 # Double quotes because CXXCPP needs to be expanded
35820 35806 for CXXCPP in "$CXX -E" "/lib/cpp"
35821 35807 do
35822 35808 ac_preproc_ok=false
35823 35809 for ac_cxx_preproc_warn_flag in '' yes
35824 35810 do
35825 35811 # Use a header file that comes with gcc, so configuring glibc
35826 35812 # with a fresh cross-compiler works.
35827 35813 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35828 35814 # <limits.h> exists even on freestanding compilers.
35829 35815 # On the NeXT, cc -E runs the code through the compiler's parser,
35830 35816 # not just through cpp. "Syntax error" is here to catch this case.
35831 35817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35832 35818 /* end confdefs.h. */
35833 35819 #ifdef __STDC__
35834 35820 # include <limits.h>
35835 35821 #else
35836 35822 # include <assert.h>
35837 35823 #endif
35838 35824 Syntax error
35839 35825 _ACEOF
35840 35826 if ac_fn_cxx_try_cpp "$LINENO"; then :
35841 35827
35842 35828 else
35843 35829 # Broken: fails on valid input.
35844 35830 continue
35845 35831 fi
35846 35832 rm -f conftest.err conftest.i conftest.$ac_ext
35847 35833
35848 35834 # OK, works on sane cases. Now check whether nonexistent headers
35849 35835 # can be detected and how.
35850 35836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35851 35837 /* end confdefs.h. */
35852 35838 #include <ac_nonexistent.h>
35853 35839 _ACEOF
35854 35840 if ac_fn_cxx_try_cpp "$LINENO"; then :
35855 35841 # Broken: success on invalid input.
35856 35842 continue
35857 35843 else
35858 35844 # Passes both tests.
35859 35845 ac_preproc_ok=:
35860 35846 break
35861 35847 fi
35862 35848 rm -f conftest.err conftest.i conftest.$ac_ext
35863 35849
35864 35850 done
35865 35851 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35866 35852 rm -f conftest.i conftest.err conftest.$ac_ext
35867 35853 if $ac_preproc_ok; then :
35868 35854 break
35869 35855 fi
35870 35856
35871 35857 done
35872 35858 ac_cv_prog_CXXCPP=$CXXCPP
35873 35859
35874 35860 fi
35875 35861 CXXCPP=$ac_cv_prog_CXXCPP
35876 35862 else
35877 35863 ac_cv_prog_CXXCPP=$CXXCPP
35878 35864 fi
35879 35865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35880 35866 $as_echo "$CXXCPP" >&6; }
35881 35867 ac_preproc_ok=false
35882 35868 for ac_cxx_preproc_warn_flag in '' yes
35883 35869 do
35884 35870 # Use a header file that comes with gcc, so configuring glibc
35885 35871 # with a fresh cross-compiler works.
35886 35872 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35887 35873 # <limits.h> exists even on freestanding compilers.
35888 35874 # On the NeXT, cc -E runs the code through the compiler's parser,
35889 35875 # not just through cpp. "Syntax error" is here to catch this case.
35890 35876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35891 35877 /* end confdefs.h. */
35892 35878 #ifdef __STDC__
35893 35879 # include <limits.h>
35894 35880 #else
35895 35881 # include <assert.h>
35896 35882 #endif
35897 35883 Syntax error
35898 35884 _ACEOF
35899 35885 if ac_fn_cxx_try_cpp "$LINENO"; then :
35900 35886
35901 35887 else
35902 35888 # Broken: fails on valid input.
35903 35889 continue
35904 35890 fi
35905 35891 rm -f conftest.err conftest.i conftest.$ac_ext
35906 35892
35907 35893 # OK, works on sane cases. Now check whether nonexistent headers
35908 35894 # can be detected and how.
35909 35895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35910 35896 /* end confdefs.h. */
35911 35897 #include <ac_nonexistent.h>
35912 35898 _ACEOF
35913 35899 if ac_fn_cxx_try_cpp "$LINENO"; then :
35914 35900 # Broken: success on invalid input.
35915 35901 continue
35916 35902 else
35917 35903 # Passes both tests.
35918 35904 ac_preproc_ok=:
35919 35905 break
35920 35906 fi
35921 35907 rm -f conftest.err conftest.i conftest.$ac_ext
35922 35908
35923 35909 done
35924 35910 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35925 35911 rm -f conftest.i conftest.err conftest.$ac_ext
35926 35912 if $ac_preproc_ok; then :
35927 35913
35928 35914 else
35929 35915 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35930 35916 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35931 35917 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35932 35918 See \`config.log' for more details" "$LINENO" 5; }
35933 35919 fi
35934 35920
35935 35921 ac_ext=cpp
35936 35922 ac_cpp='$CXXCPP $CPPFLAGS'
35937 35923 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35938 35924 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35939 35925 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35940 35926
35941 35927
35942 35928 # Only process if variable expands to non-empty
35943 35929
35944 35930 if test "x$CXXCPP" != x; then
35945 35931 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35946 35932
35947 35933 # First separate the path from the arguments. This will split at the first
35948 35934 # space.
35949 35935 complete="$CXXCPP"
35950 35936 path="${complete%% *}"
35951 35937 tmp="$complete EOL"
35952 35938 arguments="${tmp#* }"
35953 35939
35954 35940 # Input might be given as Windows format, start by converting to
35955 35941 # unix format.
35956 35942 new_path=`$CYGPATH -u "$path"`
35957 35943
35958 35944 # Now try to locate executable using which
35959 35945 new_path=`$WHICH "$new_path" 2> /dev/null`
35960 35946 # bat and cmd files are not always considered executable in cygwin causing which
35961 35947 # to not find them
35962 35948 if test "x$new_path" = x \
35963 35949 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35964 35950 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35965 35951 new_path=`$CYGPATH -u "$path"`
35966 35952 fi
35967 35953 if test "x$new_path" = x; then
35968 35954 # Oops. Which didn't find the executable.
35969 35955 # The splitting of arguments from the executable at a space might have been incorrect,
35970 35956 # since paths with space are more likely in Windows. Give it another try with the whole
35971 35957 # argument.
35972 35958 path="$complete"
35973 35959 arguments="EOL"
35974 35960 new_path=`$CYGPATH -u "$path"`
35975 35961 new_path=`$WHICH "$new_path" 2> /dev/null`
35976 35962 # bat and cmd files are not always considered executable in cygwin causing which
35977 35963 # to not find them
35978 35964 if test "x$new_path" = x \
35979 35965 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35980 35966 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35981 35967 new_path=`$CYGPATH -u "$path"`
35982 35968 fi
35983 35969 if test "x$new_path" = x; then
35984 35970 # It's still not found. Now this is an unrecoverable error.
35985 35971 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35986 35972 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35987 35973 has_space=`$ECHO "$complete" | $GREP " "`
35988 35974 if test "x$has_space" != x; then
35989 35975 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35990 35976 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35991 35977 fi
35992 35978 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35993 35979 fi
35994 35980 fi
35995 35981
35996 35982 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35997 35983 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35998 35984 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35999 35985 # "foo.exe" is OK but "foo" is an error.
36000 35986 #
36001 35987 # This test is therefore slightly more accurate than "test -f" to check for file presence.
36002 35988 # It is also a way to make sure we got the proper file name for the real test later on.
36003 35989 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36004 35990 if test "x$test_shortpath" = x; then
36005 35991 # Short path failed, file does not exist as specified.
36006 35992 # Try adding .exe or .cmd
36007 35993 if test -f "${new_path}.exe"; then
36008 35994 input_to_shortpath="${new_path}.exe"
36009 35995 elif test -f "${new_path}.cmd"; then
36010 35996 input_to_shortpath="${new_path}.cmd"
36011 35997 else
36012 35998 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36013 35999 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36014 36000 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36015 36001 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36016 36002 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36017 36003 fi
36018 36004 else
36019 36005 input_to_shortpath="$new_path"
36020 36006 fi
36021 36007
36022 36008 # Call helper function which possibly converts this using DOS-style short mode.
36023 36009 # If so, the updated path is stored in $new_path.
36024 36010 new_path="$input_to_shortpath"
36025 36011
36026 36012 input_path="$input_to_shortpath"
36027 36013 # Check if we need to convert this using DOS-style short mode. If the path
36028 36014 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36029 36015 # take no chances and rewrite it.
36030 36016 # Note: m4 eats our [], so we need to use [ and ] instead.
36031 36017 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36032 36018 if test "x$has_forbidden_chars" != x; then
36033 36019 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36034 36020 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36035 36021 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36036 36022 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36037 36023 # Going to short mode and back again did indeed matter. Since short mode is
36038 36024 # case insensitive, let's make it lowercase to improve readability.
36039 36025 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36040 36026 # Now convert it back to Unix-style (cygpath)
36041 36027 input_path=`$CYGPATH -u "$shortmode_path"`
36042 36028 new_path="$input_path"
36043 36029 fi
36044 36030 fi
36045 36031
36046 36032 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36047 36033 if test "x$test_cygdrive_prefix" = x; then
36048 36034 # As a simple fix, exclude /usr/bin since it's not a real path.
36049 36035 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36050 36036 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36051 36037 # a path prefixed by /cygdrive for fixpath to work.
36052 36038 new_path="$CYGWIN_ROOT_PATH$input_path"
36053 36039 fi
36054 36040 fi
36055 36041
36056 36042 # remove trailing .exe if any
36057 36043 new_path="${new_path/%.exe/}"
36058 36044
36059 36045 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36060 36046
36061 36047 # First separate the path from the arguments. This will split at the first
36062 36048 # space.
36063 36049 complete="$CXXCPP"
36064 36050 path="${complete%% *}"
36065 36051 tmp="$complete EOL"
36066 36052 arguments="${tmp#* }"
36067 36053
36068 36054 # Input might be given as Windows format, start by converting to
36069 36055 # unix format.
36070 36056 new_path="$path"
36071 36057
36072 36058 windows_path="$new_path"
36073 36059 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36074 36060 unix_path=`$CYGPATH -u "$windows_path"`
36075 36061 new_path="$unix_path"
36076 36062 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36077 36063 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36078 36064 new_path="$unix_path"
36079 36065 fi
36080 36066
36081 36067
36082 36068 # Now try to locate executable using which
36083 36069 new_path=`$WHICH "$new_path" 2> /dev/null`
36084 36070
36085 36071 if test "x$new_path" = x; then
36086 36072 # Oops. Which didn't find the executable.
36087 36073 # The splitting of arguments from the executable at a space might have been incorrect,
36088 36074 # since paths with space are more likely in Windows. Give it another try with the whole
36089 36075 # argument.
36090 36076 path="$complete"
36091 36077 arguments="EOL"
36092 36078 new_path="$path"
36093 36079
36094 36080 windows_path="$new_path"
36095 36081 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36096 36082 unix_path=`$CYGPATH -u "$windows_path"`
36097 36083 new_path="$unix_path"
36098 36084 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36099 36085 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36100 36086 new_path="$unix_path"
36101 36087 fi
36102 36088
36103 36089
36104 36090 new_path=`$WHICH "$new_path" 2> /dev/null`
36105 36091 # bat and cmd files are not always considered executable in MSYS causing which
36106 36092 # to not find them
36107 36093 if test "x$new_path" = x \
36108 36094 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36109 36095 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36110 36096 new_path="$path"
36111 36097
36112 36098 windows_path="$new_path"
36113 36099 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36114 36100 unix_path=`$CYGPATH -u "$windows_path"`
36115 36101 new_path="$unix_path"
36116 36102 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36117 36103 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36118 36104 new_path="$unix_path"
36119 36105 fi
36120 36106
36121 36107 fi
36122 36108
36123 36109 if test "x$new_path" = x; then
36124 36110 # It's still not found. Now this is an unrecoverable error.
36125 36111 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36126 36112 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36127 36113 has_space=`$ECHO "$complete" | $GREP " "`
36128 36114 if test "x$has_space" != x; then
36129 36115 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36130 36116 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36131 36117 fi
36132 36118 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36133 36119 fi
36134 36120 fi
36135 36121
36136 36122 # Now new_path has a complete unix path to the binary
36137 36123 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36138 36124 # Keep paths in /bin as-is, but remove trailing .exe if any
36139 36125 new_path="${new_path/%.exe/}"
36140 36126 # Do not save /bin paths to all_fixpath_prefixes!
36141 36127 else
36142 36128 # Not in mixed or Windows style, start by that.
36143 36129 new_path=`cmd //c echo $new_path`
36144 36130
36145 36131 input_path="$new_path"
36146 36132 # Check if we need to convert this using DOS-style short mode. If the path
36147 36133 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36148 36134 # take no chances and rewrite it.
36149 36135 # Note: m4 eats our [], so we need to use [ and ] instead.
36150 36136 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36151 36137 if test "x$has_forbidden_chars" != x; then
36152 36138 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36153 36139 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36154 36140 fi
36155 36141
36156 36142 # Output is in $new_path
36157 36143
36158 36144 windows_path="$new_path"
36159 36145 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36160 36146 unix_path=`$CYGPATH -u "$windows_path"`
36161 36147 new_path="$unix_path"
36162 36148 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36163 36149 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36164 36150 new_path="$unix_path"
36165 36151 fi
36166 36152
36167 36153 # remove trailing .exe if any
36168 36154 new_path="${new_path/%.exe/}"
36169 36155
36170 36156 # Save the first 10 bytes of this path to the storage, so fixpath can work.
36171 36157 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36172 36158 fi
36173 36159
36174 36160 else
36175 36161 # We're on a unix platform. Hooray! :)
36176 36162 # First separate the path from the arguments. This will split at the first
36177 36163 # space.
36178 36164 complete="$CXXCPP"
36179 36165 path="${complete%% *}"
36180 36166 tmp="$complete EOL"
36181 36167 arguments="${tmp#* }"
36182 36168
36183 36169 # Cannot rely on the command "which" here since it doesn't always work.
36184 36170 is_absolute_path=`$ECHO "$path" | $GREP ^/`
36185 36171 if test -z "$is_absolute_path"; then
36186 36172 # Path to executable is not absolute. Find it.
36187 36173 IFS_save="$IFS"
36188 36174 IFS=:
36189 36175 for p in $PATH; do
36190 36176 if test -f "$p/$path" && test -x "$p/$path"; then
36191 36177 new_path="$p/$path"
36192 36178 break
36193 36179 fi
36194 36180 done
36195 36181 IFS="$IFS_save"
36196 36182 else
36197 36183 # This is an absolute path, we can use it without further modifications.
36198 36184 new_path="$path"
36199 36185 fi
36200 36186
36201 36187 if test "x$new_path" = x; then
36202 36188 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36203 36189 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36204 36190 has_space=`$ECHO "$complete" | $GREP " "`
36205 36191 if test "x$has_space" != x; then
36206 36192 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36207 36193 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36208 36194 fi
36209 36195 as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36210 36196 fi
36211 36197 fi
36212 36198
36213 36199 # Now join together the path and the arguments once again
36214 36200 if test "x$arguments" != xEOL; then
36215 36201 new_complete="$new_path ${arguments% *}"
36216 36202 else
36217 36203 new_complete="$new_path"
36218 36204 fi
36219 36205
36220 36206 if test "x$complete" != "x$new_complete"; then
36221 36207 CXXCPP="$new_complete"
36222 36208 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36223 36209 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36224 36210 fi
36225 36211 fi
36226 36212
36227 36213
36228 36214 #
36229 36215 # Setup the linker (LD)
36230 36216 #
36231 36217 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36232 36218 # In the Microsoft toolchain we have a separate LD command "link".
36233 36219 # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36234 36220 # a cygwin program for something completely different.
36235 36221 # Extract the first word of "link", so it can be a program name with args.
36236 36222 set dummy link; ac_word=$2
36237 36223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36238 36224 $as_echo_n "checking for $ac_word... " >&6; }
36239 36225 if ${ac_cv_prog_LD+:} false; then :
36240 36226 $as_echo_n "(cached) " >&6
36241 36227 else
36242 36228 if test -n "$LD"; then
36243 36229 ac_cv_prog_LD="$LD" # Let the user override the test.
36244 36230 else
36245 36231 ac_prog_rejected=no
36246 36232 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36247 36233 for as_dir in $PATH
36248 36234 do
36249 36235 IFS=$as_save_IFS
36250 36236 test -z "$as_dir" && as_dir=.
36251 36237 for ac_exec_ext in '' $ac_executable_extensions; do
36252 36238 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36253 36239 if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36254 36240 ac_prog_rejected=yes
36255 36241 continue
36256 36242 fi
36257 36243 ac_cv_prog_LD="link"
36258 36244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36259 36245 break 2
36260 36246 fi
36261 36247 done
36262 36248 done
36263 36249 IFS=$as_save_IFS
36264 36250
36265 36251 if test $ac_prog_rejected = yes; then
36266 36252 # We found a bogon in the path, so make sure we never use it.
36267 36253 set dummy $ac_cv_prog_LD
36268 36254 shift
36269 36255 if test $# != 0; then
36270 36256 # We chose a different compiler from the bogus one.
36271 36257 # However, it has the same basename, so the bogon will be chosen
36272 36258 # first if we set LD to just the basename; use the full file name.
36273 36259 shift
36274 36260 ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36275 36261 fi
36276 36262 fi
36277 36263 fi
36278 36264 fi
36279 36265 LD=$ac_cv_prog_LD
36280 36266 if test -n "$LD"; then
36281 36267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36282 36268 $as_echo "$LD" >&6; }
36283 36269 else
36284 36270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36285 36271 $as_echo "no" >&6; }
36286 36272 fi
36287 36273
36288 36274
36289 36275
36290 36276 # Only process if variable expands to non-empty
36291 36277
36292 36278 if test "x$LD" != x; then
36293 36279 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36294 36280
36295 36281 # First separate the path from the arguments. This will split at the first
36296 36282 # space.
36297 36283 complete="$LD"
36298 36284 path="${complete%% *}"
36299 36285 tmp="$complete EOL"
36300 36286 arguments="${tmp#* }"
36301 36287
36302 36288 # Input might be given as Windows format, start by converting to
36303 36289 # unix format.
36304 36290 new_path=`$CYGPATH -u "$path"`
36305 36291
36306 36292 # Now try to locate executable using which
36307 36293 new_path=`$WHICH "$new_path" 2> /dev/null`
36308 36294 # bat and cmd files are not always considered executable in cygwin causing which
36309 36295 # to not find them
36310 36296 if test "x$new_path" = x \
36311 36297 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36312 36298 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36313 36299 new_path=`$CYGPATH -u "$path"`
36314 36300 fi
36315 36301 if test "x$new_path" = x; then
36316 36302 # Oops. Which didn't find the executable.
36317 36303 # The splitting of arguments from the executable at a space might have been incorrect,
36318 36304 # since paths with space are more likely in Windows. Give it another try with the whole
36319 36305 # argument.
36320 36306 path="$complete"
36321 36307 arguments="EOL"
36322 36308 new_path=`$CYGPATH -u "$path"`
36323 36309 new_path=`$WHICH "$new_path" 2> /dev/null`
36324 36310 # bat and cmd files are not always considered executable in cygwin causing which
36325 36311 # to not find them
36326 36312 if test "x$new_path" = x \
36327 36313 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36328 36314 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36329 36315 new_path=`$CYGPATH -u "$path"`
36330 36316 fi
36331 36317 if test "x$new_path" = x; then
36332 36318 # It's still not found. Now this is an unrecoverable error.
36333 36319 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36334 36320 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36335 36321 has_space=`$ECHO "$complete" | $GREP " "`
36336 36322 if test "x$has_space" != x; then
36337 36323 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36338 36324 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36339 36325 fi
36340 36326 as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36341 36327 fi
36342 36328 fi
36343 36329
36344 36330 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36345 36331 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36346 36332 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36347 36333 # "foo.exe" is OK but "foo" is an error.
36348 36334 #
36349 36335 # This test is therefore slightly more accurate than "test -f" to check for file presence.
36350 36336 # It is also a way to make sure we got the proper file name for the real test later on.
36351 36337 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36352 36338 if test "x$test_shortpath" = x; then
36353 36339 # Short path failed, file does not exist as specified.
36354 36340 # Try adding .exe or .cmd
36355 36341 if test -f "${new_path}.exe"; then
36356 36342 input_to_shortpath="${new_path}.exe"
36357 36343 elif test -f "${new_path}.cmd"; then
36358 36344 input_to_shortpath="${new_path}.cmd"
36359 36345 else
36360 36346 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36361 36347 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36362 36348 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36363 36349 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36364 36350 as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36365 36351 fi
36366 36352 else
36367 36353 input_to_shortpath="$new_path"
36368 36354 fi
36369 36355
36370 36356 # Call helper function which possibly converts this using DOS-style short mode.
36371 36357 # If so, the updated path is stored in $new_path.
36372 36358 new_path="$input_to_shortpath"
36373 36359
36374 36360 input_path="$input_to_shortpath"
36375 36361 # Check if we need to convert this using DOS-style short mode. If the path
36376 36362 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36377 36363 # take no chances and rewrite it.
36378 36364 # Note: m4 eats our [], so we need to use [ and ] instead.
36379 36365 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36380 36366 if test "x$has_forbidden_chars" != x; then
36381 36367 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36382 36368 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36383 36369 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36384 36370 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36385 36371 # Going to short mode and back again did indeed matter. Since short mode is
36386 36372 # case insensitive, let's make it lowercase to improve readability.
36387 36373 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36388 36374 # Now convert it back to Unix-style (cygpath)
36389 36375 input_path=`$CYGPATH -u "$shortmode_path"`
36390 36376 new_path="$input_path"
36391 36377 fi
36392 36378 fi
36393 36379
36394 36380 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36395 36381 if test "x$test_cygdrive_prefix" = x; then
36396 36382 # As a simple fix, exclude /usr/bin since it's not a real path.
36397 36383 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36398 36384 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36399 36385 # a path prefixed by /cygdrive for fixpath to work.
36400 36386 new_path="$CYGWIN_ROOT_PATH$input_path"
36401 36387 fi
36402 36388 fi
36403 36389
36404 36390 # remove trailing .exe if any
36405 36391 new_path="${new_path/%.exe/}"
36406 36392
36407 36393 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36408 36394
36409 36395 # First separate the path from the arguments. This will split at the first
36410 36396 # space.
36411 36397 complete="$LD"
36412 36398 path="${complete%% *}"
36413 36399 tmp="$complete EOL"
36414 36400 arguments="${tmp#* }"
36415 36401
36416 36402 # Input might be given as Windows format, start by converting to
36417 36403 # unix format.
36418 36404 new_path="$path"
36419 36405
36420 36406 windows_path="$new_path"
36421 36407 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36422 36408 unix_path=`$CYGPATH -u "$windows_path"`
36423 36409 new_path="$unix_path"
36424 36410 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36425 36411 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36426 36412 new_path="$unix_path"
36427 36413 fi
36428 36414
36429 36415
36430 36416 # Now try to locate executable using which
36431 36417 new_path=`$WHICH "$new_path" 2> /dev/null`
36432 36418
36433 36419 if test "x$new_path" = x; then
36434 36420 # Oops. Which didn't find the executable.
36435 36421 # The splitting of arguments from the executable at a space might have been incorrect,
36436 36422 # since paths with space are more likely in Windows. Give it another try with the whole
36437 36423 # argument.
36438 36424 path="$complete"
36439 36425 arguments="EOL"
36440 36426 new_path="$path"
36441 36427
36442 36428 windows_path="$new_path"
36443 36429 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36444 36430 unix_path=`$CYGPATH -u "$windows_path"`
36445 36431 new_path="$unix_path"
36446 36432 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36447 36433 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36448 36434 new_path="$unix_path"
36449 36435 fi
36450 36436
36451 36437
36452 36438 new_path=`$WHICH "$new_path" 2> /dev/null`
36453 36439 # bat and cmd files are not always considered executable in MSYS causing which
36454 36440 # to not find them
36455 36441 if test "x$new_path" = x \
36456 36442 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36457 36443 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36458 36444 new_path="$path"
36459 36445
36460 36446 windows_path="$new_path"
36461 36447 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36462 36448 unix_path=`$CYGPATH -u "$windows_path"`
36463 36449 new_path="$unix_path"
36464 36450 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36465 36451 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36466 36452 new_path="$unix_path"
36467 36453 fi
36468 36454
36469 36455 fi
36470 36456
36471 36457 if test "x$new_path" = x; then
36472 36458 # It's still not found. Now this is an unrecoverable error.
36473 36459 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36474 36460 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36475 36461 has_space=`$ECHO "$complete" | $GREP " "`
36476 36462 if test "x$has_space" != x; then
36477 36463 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36478 36464 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36479 36465 fi
36480 36466 as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36481 36467 fi
36482 36468 fi
36483 36469
36484 36470 # Now new_path has a complete unix path to the binary
36485 36471 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36486 36472 # Keep paths in /bin as-is, but remove trailing .exe if any
36487 36473 new_path="${new_path/%.exe/}"
36488 36474 # Do not save /bin paths to all_fixpath_prefixes!
36489 36475 else
36490 36476 # Not in mixed or Windows style, start by that.
36491 36477 new_path=`cmd //c echo $new_path`
36492 36478
36493 36479 input_path="$new_path"
36494 36480 # Check if we need to convert this using DOS-style short mode. If the path
36495 36481 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36496 36482 # take no chances and rewrite it.
36497 36483 # Note: m4 eats our [], so we need to use [ and ] instead.
36498 36484 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36499 36485 if test "x$has_forbidden_chars" != x; then
36500 36486 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36501 36487 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36502 36488 fi
36503 36489
36504 36490 # Output is in $new_path
36505 36491
36506 36492 windows_path="$new_path"
36507 36493 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36508 36494 unix_path=`$CYGPATH -u "$windows_path"`
36509 36495 new_path="$unix_path"
36510 36496 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36511 36497 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36512 36498 new_path="$unix_path"
36513 36499 fi
36514 36500
36515 36501 # remove trailing .exe if any
36516 36502 new_path="${new_path/%.exe/}"
36517 36503
36518 36504 # Save the first 10 bytes of this path to the storage, so fixpath can work.
36519 36505 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36520 36506 fi
36521 36507
36522 36508 else
36523 36509 # We're on a unix platform. Hooray! :)
36524 36510 # First separate the path from the arguments. This will split at the first
36525 36511 # space.
36526 36512 complete="$LD"
36527 36513 path="${complete%% *}"
36528 36514 tmp="$complete EOL"
36529 36515 arguments="${tmp#* }"
36530 36516
36531 36517 # Cannot rely on the command "which" here since it doesn't always work.
36532 36518 is_absolute_path=`$ECHO "$path" | $GREP ^/`
36533 36519 if test -z "$is_absolute_path"; then
36534 36520 # Path to executable is not absolute. Find it.
36535 36521 IFS_save="$IFS"
36536 36522 IFS=:
36537 36523 for p in $PATH; do
36538 36524 if test -f "$p/$path" && test -x "$p/$path"; then
36539 36525 new_path="$p/$path"
36540 36526 break
36541 36527 fi
36542 36528 done
36543 36529 IFS="$IFS_save"
36544 36530 else
36545 36531 # This is an absolute path, we can use it without further modifications.
36546 36532 new_path="$path"
36547 36533 fi
36548 36534
36549 36535 if test "x$new_path" = x; then
36550 36536 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36551 36537 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36552 36538 has_space=`$ECHO "$complete" | $GREP " "`
36553 36539 if test "x$has_space" != x; then
36554 36540 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36555 36541 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36556 36542 fi
36557 36543 as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36558 36544 fi
36559 36545 fi
36560 36546
36561 36547 # Now join together the path and the arguments once again
36562 36548 if test "x$arguments" != xEOL; then
36563 36549 new_complete="$new_path ${arguments% *}"
36564 36550 else
36565 36551 new_complete="$new_path"
36566 36552 fi
36567 36553
36568 36554 if test "x$complete" != "x$new_complete"; then
36569 36555 LD="$new_complete"
36570 36556 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36571 36557 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36572 36558 fi
36573 36559 fi
36574 36560
36575 36561 # Verify that we indeed succeeded with this trick.
36576 36562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36577 36563 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36578 36564 "$LD" --version > /dev/null
36579 36565 if test $? -eq 0 ; then
36580 36566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36581 36567 $as_echo "no" >&6; }
36582 36568 as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36583 36569 else
36584 36570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36585 36571 $as_echo "yes" >&6; }
36586 36572 fi
36587 36573 LDCXX="$LD"
36588 36574 else
36589 36575 # All other toolchains use the compiler to link.
36590 36576 LD="$CC"
36591 36577 LDCXX="$CXX"
36592 36578 fi
36593 36579
36594 36580 # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36595 36581
36596 36582
36597 36583 #
36598 36584 # Setup the assembler (AS)
36599 36585 #
36600 36586 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36601 36587
36602 36588
36603 36589 # Publish this variable in the help.
36604 36590
36605 36591
36606 36592 if [ -z "${AS+x}" ]; then
36607 36593 # The variable is not set by user, try to locate tool using the code snippet
36608 36594 for ac_prog in as
36609 36595 do
36610 36596 # Extract the first word of "$ac_prog", so it can be a program name with args.
36611 36597 set dummy $ac_prog; ac_word=$2
36612 36598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36613 36599 $as_echo_n "checking for $ac_word... " >&6; }
36614 36600 if ${ac_cv_path_AS+:} false; then :
36615 36601 $as_echo_n "(cached) " >&6
36616 36602 else
36617 36603 case $AS in
36618 36604 [\\/]* | ?:[\\/]*)
36619 36605 ac_cv_path_AS="$AS" # Let the user override the test with a path.
36620 36606 ;;
36621 36607 *)
36622 36608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36623 36609 for as_dir in $PATH
36624 36610 do
36625 36611 IFS=$as_save_IFS
36626 36612 test -z "$as_dir" && as_dir=.
36627 36613 for ac_exec_ext in '' $ac_executable_extensions; do
36628 36614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36629 36615 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36630 36616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36631 36617 break 2
36632 36618 fi
36633 36619 done
36634 36620 done
36635 36621 IFS=$as_save_IFS
36636 36622
36637 36623 ;;
36638 36624 esac
36639 36625 fi
36640 36626 AS=$ac_cv_path_AS
36641 36627 if test -n "$AS"; then
36642 36628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36643 36629 $as_echo "$AS" >&6; }
36644 36630 else
36645 36631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36646 36632 $as_echo "no" >&6; }
36647 36633 fi
36648 36634
36649 36635
36650 36636 test -n "$AS" && break
36651 36637 done
36652 36638
36653 36639 else
36654 36640 # The variable is set, but is it from the command line or the environment?
36655 36641
36656 36642 # Try to remove the string !AS! from our list.
36657 36643 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36658 36644 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36659 36645 # If it failed, the variable was not from the command line. Ignore it,
36660 36646 # but warn the user (except for BASH, which is always set by the calling BASH).
36661 36647 if test "xAS" != xBASH; then
36662 36648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36663 36649 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36664 36650 fi
36665 36651 # Try to locate tool using the code snippet
36666 36652 for ac_prog in as
36667 36653 do
36668 36654 # Extract the first word of "$ac_prog", so it can be a program name with args.
36669 36655 set dummy $ac_prog; ac_word=$2
36670 36656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36671 36657 $as_echo_n "checking for $ac_word... " >&6; }
36672 36658 if ${ac_cv_path_AS+:} false; then :
36673 36659 $as_echo_n "(cached) " >&6
36674 36660 else
36675 36661 case $AS in
36676 36662 [\\/]* | ?:[\\/]*)
36677 36663 ac_cv_path_AS="$AS" # Let the user override the test with a path.
36678 36664 ;;
36679 36665 *)
36680 36666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36681 36667 for as_dir in $PATH
36682 36668 do
36683 36669 IFS=$as_save_IFS
36684 36670 test -z "$as_dir" && as_dir=.
36685 36671 for ac_exec_ext in '' $ac_executable_extensions; do
36686 36672 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36687 36673 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36688 36674 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36689 36675 break 2
36690 36676 fi
36691 36677 done
36692 36678 done
36693 36679 IFS=$as_save_IFS
36694 36680
36695 36681 ;;
36696 36682 esac
36697 36683 fi
36698 36684 AS=$ac_cv_path_AS
36699 36685 if test -n "$AS"; then
36700 36686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36701 36687 $as_echo "$AS" >&6; }
36702 36688 else
36703 36689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36704 36690 $as_echo "no" >&6; }
36705 36691 fi
36706 36692
36707 36693
36708 36694 test -n "$AS" && break
36709 36695 done
36710 36696
36711 36697 else
36712 36698 # If it succeeded, then it was overridden by the user. We will use it
36713 36699 # for the tool.
36714 36700
36715 36701 # First remove it from the list of overridden variables, so we can test
36716 36702 # for unknown variables in the end.
36717 36703 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36718 36704
36719 36705 # Check if we try to supply an empty value
36720 36706 if test "x$AS" = x; then
36721 36707 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36722 36708 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36723 36709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36724 36710 $as_echo_n "checking for AS... " >&6; }
36725 36711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36726 36712 $as_echo "disabled" >&6; }
36727 36713 else
36728 36714 # Check if the provided tool contains a complete path.
36729 36715 tool_specified="$AS"
36730 36716 tool_basename="${tool_specified##*/}"
36731 36717 if test "x$tool_basename" = "x$tool_specified"; then
36732 36718 # A command without a complete path is provided, search $PATH.
36733 36719 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36734 36720 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36735 36721 # Extract the first word of "$tool_basename", so it can be a program name with args.
36736 36722 set dummy $tool_basename; ac_word=$2
36737 36723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36738 36724 $as_echo_n "checking for $ac_word... " >&6; }
36739 36725 if ${ac_cv_path_AS+:} false; then :
36740 36726 $as_echo_n "(cached) " >&6
36741 36727 else
36742 36728 case $AS in
36743 36729 [\\/]* | ?:[\\/]*)
36744 36730 ac_cv_path_AS="$AS" # Let the user override the test with a path.
36745 36731 ;;
36746 36732 *)
36747 36733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36748 36734 for as_dir in $PATH
36749 36735 do
36750 36736 IFS=$as_save_IFS
36751 36737 test -z "$as_dir" && as_dir=.
36752 36738 for ac_exec_ext in '' $ac_executable_extensions; do
36753 36739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36754 36740 ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36755 36741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36756 36742 break 2
36757 36743 fi
36758 36744 done
36759 36745 done
36760 36746 IFS=$as_save_IFS
36761 36747
36762 36748 ;;
36763 36749 esac
36764 36750 fi
36765 36751 AS=$ac_cv_path_AS
36766 36752 if test -n "$AS"; then
36767 36753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36768 36754 $as_echo "$AS" >&6; }
36769 36755 else
36770 36756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36771 36757 $as_echo "no" >&6; }
36772 36758 fi
36773 36759
36774 36760
36775 36761 if test "x$AS" = x; then
36776 36762 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36777 36763 fi
36778 36764 else
36779 36765 # Otherwise we believe it is a complete path. Use it as it is.
36780 36766 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36781 36767 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36782 36768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36783 36769 $as_echo_n "checking for AS... " >&6; }
36784 36770 if test ! -x "$tool_specified"; then
36785 36771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36786 36772 $as_echo "not found" >&6; }
36787 36773 as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36788 36774 fi
36789 36775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36790 36776 $as_echo "$tool_specified" >&6; }
36791 36777 fi
36792 36778 fi
36793 36779 fi
36794 36780
36795 36781 fi
36796 36782
36797 36783
36798 36784
36799 36785 # Only process if variable expands to non-empty
36800 36786
36801 36787 if test "x$AS" != x; then
36802 36788 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36803 36789
36804 36790 # First separate the path from the arguments. This will split at the first
36805 36791 # space.
36806 36792 complete="$AS"
36807 36793 path="${complete%% *}"
36808 36794 tmp="$complete EOL"
36809 36795 arguments="${tmp#* }"
36810 36796
36811 36797 # Input might be given as Windows format, start by converting to
36812 36798 # unix format.
36813 36799 new_path=`$CYGPATH -u "$path"`
36814 36800
36815 36801 # Now try to locate executable using which
36816 36802 new_path=`$WHICH "$new_path" 2> /dev/null`
36817 36803 # bat and cmd files are not always considered executable in cygwin causing which
36818 36804 # to not find them
36819 36805 if test "x$new_path" = x \
36820 36806 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36821 36807 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36822 36808 new_path=`$CYGPATH -u "$path"`
36823 36809 fi
36824 36810 if test "x$new_path" = x; then
36825 36811 # Oops. Which didn't find the executable.
36826 36812 # The splitting of arguments from the executable at a space might have been incorrect,
36827 36813 # since paths with space are more likely in Windows. Give it another try with the whole
36828 36814 # argument.
36829 36815 path="$complete"
36830 36816 arguments="EOL"
36831 36817 new_path=`$CYGPATH -u "$path"`
36832 36818 new_path=`$WHICH "$new_path" 2> /dev/null`
36833 36819 # bat and cmd files are not always considered executable in cygwin causing which
36834 36820 # to not find them
36835 36821 if test "x$new_path" = x \
36836 36822 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36837 36823 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36838 36824 new_path=`$CYGPATH -u "$path"`
36839 36825 fi
36840 36826 if test "x$new_path" = x; then
36841 36827 # It's still not found. Now this is an unrecoverable error.
36842 36828 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36843 36829 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36844 36830 has_space=`$ECHO "$complete" | $GREP " "`
36845 36831 if test "x$has_space" != x; then
36846 36832 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36847 36833 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36848 36834 fi
36849 36835 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36850 36836 fi
36851 36837 fi
36852 36838
36853 36839 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36854 36840 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36855 36841 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36856 36842 # "foo.exe" is OK but "foo" is an error.
36857 36843 #
36858 36844 # This test is therefore slightly more accurate than "test -f" to check for file presence.
36859 36845 # It is also a way to make sure we got the proper file name for the real test later on.
36860 36846 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36861 36847 if test "x$test_shortpath" = x; then
36862 36848 # Short path failed, file does not exist as specified.
36863 36849 # Try adding .exe or .cmd
36864 36850 if test -f "${new_path}.exe"; then
36865 36851 input_to_shortpath="${new_path}.exe"
36866 36852 elif test -f "${new_path}.cmd"; then
36867 36853 input_to_shortpath="${new_path}.cmd"
36868 36854 else
36869 36855 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36870 36856 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36871 36857 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36872 36858 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36873 36859 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36874 36860 fi
36875 36861 else
36876 36862 input_to_shortpath="$new_path"
36877 36863 fi
36878 36864
36879 36865 # Call helper function which possibly converts this using DOS-style short mode.
36880 36866 # If so, the updated path is stored in $new_path.
36881 36867 new_path="$input_to_shortpath"
36882 36868
36883 36869 input_path="$input_to_shortpath"
36884 36870 # Check if we need to convert this using DOS-style short mode. If the path
36885 36871 # contains just simple characters, use it. Otherwise (spaces, weird characters),
36886 36872 # take no chances and rewrite it.
36887 36873 # Note: m4 eats our [], so we need to use [ and ] instead.
36888 36874 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36889 36875 if test "x$has_forbidden_chars" != x; then
36890 36876 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36891 36877 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36892 36878 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36893 36879 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36894 36880 # Going to short mode and back again did indeed matter. Since short mode is
36895 36881 # case insensitive, let's make it lowercase to improve readability.
36896 36882 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36897 36883 # Now convert it back to Unix-style (cygpath)
36898 36884 input_path=`$CYGPATH -u "$shortmode_path"`
36899 36885 new_path="$input_path"
36900 36886 fi
36901 36887 fi
36902 36888
36903 36889 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36904 36890 if test "x$test_cygdrive_prefix" = x; then
36905 36891 # As a simple fix, exclude /usr/bin since it's not a real path.
36906 36892 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36907 36893 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36908 36894 # a path prefixed by /cygdrive for fixpath to work.
36909 36895 new_path="$CYGWIN_ROOT_PATH$input_path"
36910 36896 fi
36911 36897 fi
36912 36898
36913 36899 # remove trailing .exe if any
36914 36900 new_path="${new_path/%.exe/}"
36915 36901
36916 36902 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36917 36903
36918 36904 # First separate the path from the arguments. This will split at the first
36919 36905 # space.
36920 36906 complete="$AS"
36921 36907 path="${complete%% *}"
36922 36908 tmp="$complete EOL"
36923 36909 arguments="${tmp#* }"
36924 36910
36925 36911 # Input might be given as Windows format, start by converting to
36926 36912 # unix format.
36927 36913 new_path="$path"
36928 36914
36929 36915 windows_path="$new_path"
36930 36916 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36931 36917 unix_path=`$CYGPATH -u "$windows_path"`
36932 36918 new_path="$unix_path"
36933 36919 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36934 36920 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36935 36921 new_path="$unix_path"
36936 36922 fi
36937 36923
36938 36924
36939 36925 # Now try to locate executable using which
36940 36926 new_path=`$WHICH "$new_path" 2> /dev/null`
36941 36927
36942 36928 if test "x$new_path" = x; then
36943 36929 # Oops. Which didn't find the executable.
36944 36930 # The splitting of arguments from the executable at a space might have been incorrect,
36945 36931 # since paths with space are more likely in Windows. Give it another try with the whole
36946 36932 # argument.
36947 36933 path="$complete"
36948 36934 arguments="EOL"
36949 36935 new_path="$path"
36950 36936
36951 36937 windows_path="$new_path"
36952 36938 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36953 36939 unix_path=`$CYGPATH -u "$windows_path"`
36954 36940 new_path="$unix_path"
36955 36941 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36956 36942 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36957 36943 new_path="$unix_path"
36958 36944 fi
36959 36945
36960 36946
36961 36947 new_path=`$WHICH "$new_path" 2> /dev/null`
36962 36948 # bat and cmd files are not always considered executable in MSYS causing which
36963 36949 # to not find them
36964 36950 if test "x$new_path" = x \
36965 36951 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36966 36952 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36967 36953 new_path="$path"
36968 36954
36969 36955 windows_path="$new_path"
36970 36956 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36971 36957 unix_path=`$CYGPATH -u "$windows_path"`
36972 36958 new_path="$unix_path"
36973 36959 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36974 36960 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36975 36961 new_path="$unix_path"
36976 36962 fi
36977 36963
36978 36964 fi
36979 36965
36980 36966 if test "x$new_path" = x; then
36981 36967 # It's still not found. Now this is an unrecoverable error.
36982 36968 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36983 36969 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36984 36970 has_space=`$ECHO "$complete" | $GREP " "`
36985 36971 if test "x$has_space" != x; then
36986 36972 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36987 36973 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36988 36974 fi
36989 36975 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36990 36976 fi
36991 36977 fi
36992 36978
36993 36979 # Now new_path has a complete unix path to the binary
36994 36980 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36995 36981 # Keep paths in /bin as-is, but remove trailing .exe if any
36996 36982 new_path="${new_path/%.exe/}"
36997 36983 # Do not save /bin paths to all_fixpath_prefixes!
36998 36984 else
36999 36985 # Not in mixed or Windows style, start by that.
37000 36986 new_path=`cmd //c echo $new_path`
37001 36987
37002 36988 input_path="$new_path"
37003 36989 # Check if we need to convert this using DOS-style short mode. If the path
37004 36990 # contains just simple characters, use it. Otherwise (spaces, weird characters),
37005 36991 # take no chances and rewrite it.
37006 36992 # Note: m4 eats our [], so we need to use [ and ] instead.
37007 36993 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37008 36994 if test "x$has_forbidden_chars" != x; then
37009 36995 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37010 36996 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37011 36997 fi
37012 36998
37013 36999 # Output is in $new_path
37014 37000
37015 37001 windows_path="$new_path"
37016 37002 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37017 37003 unix_path=`$CYGPATH -u "$windows_path"`
37018 37004 new_path="$unix_path"
37019 37005 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37020 37006 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37021 37007 new_path="$unix_path"
37022 37008 fi
37023 37009
37024 37010 # remove trailing .exe if any
37025 37011 new_path="${new_path/%.exe/}"
37026 37012
37027 37013 # Save the first 10 bytes of this path to the storage, so fixpath can work.
37028 37014 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37029 37015 fi
37030 37016
37031 37017 else
37032 37018 # We're on a unix platform. Hooray! :)
37033 37019 # First separate the path from the arguments. This will split at the first
37034 37020 # space.
37035 37021 complete="$AS"
37036 37022 path="${complete%% *}"
37037 37023 tmp="$complete EOL"
37038 37024 arguments="${tmp#* }"
37039 37025
37040 37026 # Cannot rely on the command "which" here since it doesn't always work.
37041 37027 is_absolute_path=`$ECHO "$path" | $GREP ^/`
37042 37028 if test -z "$is_absolute_path"; then
37043 37029 # Path to executable is not absolute. Find it.
37044 37030 IFS_save="$IFS"
37045 37031 IFS=:
37046 37032 for p in $PATH; do
37047 37033 if test -f "$p/$path" && test -x "$p/$path"; then
37048 37034 new_path="$p/$path"
37049 37035 break
37050 37036 fi
37051 37037 done
37052 37038 IFS="$IFS_save"
37053 37039 else
37054 37040 # This is an absolute path, we can use it without further modifications.
37055 37041 new_path="$path"
37056 37042 fi
37057 37043
37058 37044 if test "x$new_path" = x; then
37059 37045 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37060 37046 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37061 37047 has_space=`$ECHO "$complete" | $GREP " "`
37062 37048 if test "x$has_space" != x; then
37063 37049 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37064 37050 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37065 37051 fi
37066 37052 as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37067 37053 fi
37068 37054 fi
37069 37055
37070 37056 # Now join together the path and the arguments once again
37071 37057 if test "x$arguments" != xEOL; then
37072 37058 new_complete="$new_path ${arguments% *}"
37073 37059 else
37074 37060 new_complete="$new_path"
37075 37061 fi
37076 37062
37077 37063 if test "x$complete" != "x$new_complete"; then
37078 37064 AS="$new_complete"
37079 37065 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37080 37066 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37081 37067 fi
37082 37068 fi
37083 37069
37084 37070 if test "x$AS" = x; then
37085 37071 as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37086 37072 fi
37087 37073 else
37088 37074 # FIXME: is this correct for microsoft?
37089 37075 AS="$CC -c"
37090 37076 fi
37091 37077
37092 37078
37093 37079 #
37094 37080 # Setup the archiver (AR)
37095 37081 #
37096 37082 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37097 37083 # The corresponding ar tool is lib.exe (used to create static libraries)
37098 37084 # Extract the first word of "lib", so it can be a program name with args.
37099 37085 set dummy lib; ac_word=$2
37100 37086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37101 37087 $as_echo_n "checking for $ac_word... " >&6; }
37102 37088 if ${ac_cv_prog_AR+:} false; then :
37103 37089 $as_echo_n "(cached) " >&6
37104 37090 else
37105 37091 if test -n "$AR"; then
37106 37092 ac_cv_prog_AR="$AR" # Let the user override the test.
37107 37093 else
37108 37094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37109 37095 for as_dir in $PATH
37110 37096 do
37111 37097 IFS=$as_save_IFS
37112 37098 test -z "$as_dir" && as_dir=.
37113 37099 for ac_exec_ext in '' $ac_executable_extensions; do
37114 37100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37115 37101 ac_cv_prog_AR="lib"
37116 37102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37117 37103 break 2
37118 37104 fi
37119 37105 done
37120 37106 done
37121 37107 IFS=$as_save_IFS
37122 37108
37123 37109 fi
37124 37110 fi
37125 37111 AR=$ac_cv_prog_AR
37126 37112 if test -n "$AR"; then
37127 37113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37128 37114 $as_echo "$AR" >&6; }
37129 37115 else
37130 37116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37131 37117 $as_echo "no" >&6; }
37132 37118 fi
37133 37119
37134 37120
37135 37121 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37136 37122
37137 37123
37138 37124 # Publish this variable in the help.
37139 37125
37140 37126
37141 37127 if [ -z "${AR+x}" ]; then
37142 37128 # The variable is not set by user, try to locate tool using the code snippet
37143 37129 if test -n "$ac_tool_prefix"; then
37144 37130 for ac_prog in ar gcc-ar
37145 37131 do
37146 37132 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37147 37133 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37148 37134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37149 37135 $as_echo_n "checking for $ac_word... " >&6; }
37150 37136 if ${ac_cv_prog_AR+:} false; then :
37151 37137 $as_echo_n "(cached) " >&6
37152 37138 else
37153 37139 if test -n "$AR"; then
37154 37140 ac_cv_prog_AR="$AR" # Let the user override the test.
37155 37141 else
37156 37142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37157 37143 for as_dir in $PATH
37158 37144 do
37159 37145 IFS=$as_save_IFS
37160 37146 test -z "$as_dir" && as_dir=.
37161 37147 for ac_exec_ext in '' $ac_executable_extensions; do
37162 37148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37163 37149 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37164 37150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37165 37151 break 2
37166 37152 fi
37167 37153 done
37168 37154 done
37169 37155 IFS=$as_save_IFS
37170 37156
37171 37157 fi
37172 37158 fi
37173 37159 AR=$ac_cv_prog_AR
37174 37160 if test -n "$AR"; then
37175 37161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37176 37162 $as_echo "$AR" >&6; }
37177 37163 else
37178 37164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37179 37165 $as_echo "no" >&6; }
37180 37166 fi
37181 37167
37182 37168
37183 37169 test -n "$AR" && break
37184 37170 done
37185 37171 fi
37186 37172 if test -z "$AR"; then
37187 37173 ac_ct_AR=$AR
37188 37174 for ac_prog in ar gcc-ar
37189 37175 do
37190 37176 # Extract the first word of "$ac_prog", so it can be a program name with args.
37191 37177 set dummy $ac_prog; ac_word=$2
37192 37178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37193 37179 $as_echo_n "checking for $ac_word... " >&6; }
37194 37180 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37195 37181 $as_echo_n "(cached) " >&6
37196 37182 else
37197 37183 if test -n "$ac_ct_AR"; then
37198 37184 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37199 37185 else
37200 37186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37201 37187 for as_dir in $PATH
37202 37188 do
37203 37189 IFS=$as_save_IFS
37204 37190 test -z "$as_dir" && as_dir=.
37205 37191 for ac_exec_ext in '' $ac_executable_extensions; do
37206 37192 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37207 37193 ac_cv_prog_ac_ct_AR="$ac_prog"
37208 37194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37209 37195 break 2
37210 37196 fi
37211 37197 done
37212 37198 done
37213 37199 IFS=$as_save_IFS
37214 37200
37215 37201 fi
37216 37202 fi
37217 37203 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37218 37204 if test -n "$ac_ct_AR"; then
37219 37205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37220 37206 $as_echo "$ac_ct_AR" >&6; }
37221 37207 else
37222 37208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37223 37209 $as_echo "no" >&6; }
37224 37210 fi
37225 37211
37226 37212
37227 37213 test -n "$ac_ct_AR" && break
37228 37214 done
37229 37215
37230 37216 if test "x$ac_ct_AR" = x; then
37231 37217 AR=""
37232 37218 else
37233 37219 case $cross_compiling:$ac_tool_warned in
37234 37220 yes:)
37235 37221 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37236 37222 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37237 37223 ac_tool_warned=yes ;;
37238 37224 esac
37239 37225 AR=$ac_ct_AR
37240 37226 fi
37241 37227 fi
37242 37228
37243 37229 else
37244 37230 # The variable is set, but is it from the command line or the environment?
37245 37231
37246 37232 # Try to remove the string !AR! from our list.
37247 37233 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37248 37234 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37249 37235 # If it failed, the variable was not from the command line. Ignore it,
37250 37236 # but warn the user (except for BASH, which is always set by the calling BASH).
37251 37237 if test "xAR" != xBASH; then
37252 37238 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37253 37239 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37254 37240 fi
37255 37241 # Try to locate tool using the code snippet
37256 37242 if test -n "$ac_tool_prefix"; then
37257 37243 for ac_prog in ar gcc-ar
37258 37244 do
37259 37245 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37260 37246 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37261 37247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37262 37248 $as_echo_n "checking for $ac_word... " >&6; }
37263 37249 if ${ac_cv_prog_AR+:} false; then :
37264 37250 $as_echo_n "(cached) " >&6
37265 37251 else
37266 37252 if test -n "$AR"; then
37267 37253 ac_cv_prog_AR="$AR" # Let the user override the test.
37268 37254 else
37269 37255 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37270 37256 for as_dir in $PATH
37271 37257 do
37272 37258 IFS=$as_save_IFS
37273 37259 test -z "$as_dir" && as_dir=.
37274 37260 for ac_exec_ext in '' $ac_executable_extensions; do
37275 37261 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37276 37262 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37277 37263 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37278 37264 break 2
37279 37265 fi
37280 37266 done
37281 37267 done
37282 37268 IFS=$as_save_IFS
37283 37269
37284 37270 fi
37285 37271 fi
37286 37272 AR=$ac_cv_prog_AR
37287 37273 if test -n "$AR"; then
37288 37274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37289 37275 $as_echo "$AR" >&6; }
37290 37276 else
37291 37277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37292 37278 $as_echo "no" >&6; }
37293 37279 fi
37294 37280
37295 37281
37296 37282 test -n "$AR" && break
37297 37283 done
37298 37284 fi
37299 37285 if test -z "$AR"; then
37300 37286 ac_ct_AR=$AR
37301 37287 for ac_prog in ar gcc-ar
37302 37288 do
37303 37289 # Extract the first word of "$ac_prog", so it can be a program name with args.
37304 37290 set dummy $ac_prog; ac_word=$2
37305 37291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37306 37292 $as_echo_n "checking for $ac_word... " >&6; }
37307 37293 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37308 37294 $as_echo_n "(cached) " >&6
37309 37295 else
37310 37296 if test -n "$ac_ct_AR"; then
37311 37297 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37312 37298 else
37313 37299 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37314 37300 for as_dir in $PATH
37315 37301 do
37316 37302 IFS=$as_save_IFS
37317 37303 test -z "$as_dir" && as_dir=.
37318 37304 for ac_exec_ext in '' $ac_executable_extensions; do
37319 37305 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37320 37306 ac_cv_prog_ac_ct_AR="$ac_prog"
37321 37307 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37322 37308 break 2
37323 37309 fi
37324 37310 done
37325 37311 done
37326 37312 IFS=$as_save_IFS
37327 37313
37328 37314 fi
37329 37315 fi
37330 37316 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37331 37317 if test -n "$ac_ct_AR"; then
37332 37318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37333 37319 $as_echo "$ac_ct_AR" >&6; }
37334 37320 else
37335 37321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37336 37322 $as_echo "no" >&6; }
37337 37323 fi
37338 37324
37339 37325
37340 37326 test -n "$ac_ct_AR" && break
37341 37327 done
37342 37328
37343 37329 if test "x$ac_ct_AR" = x; then
37344 37330 AR=""
37345 37331 else
37346 37332 case $cross_compiling:$ac_tool_warned in
37347 37333 yes:)
37348 37334 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37349 37335 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37350 37336 ac_tool_warned=yes ;;
37351 37337 esac
37352 37338 AR=$ac_ct_AR
37353 37339 fi
37354 37340 fi
37355 37341
37356 37342 else
37357 37343 # If it succeeded, then it was overridden by the user. We will use it
37358 37344 # for the tool.
37359 37345
37360 37346 # First remove it from the list of overridden variables, so we can test
37361 37347 # for unknown variables in the end.
37362 37348 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37363 37349
37364 37350 # Check if we try to supply an empty value
37365 37351 if test "x$AR" = x; then
37366 37352 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37367 37353 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37368 37354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37369 37355 $as_echo_n "checking for AR... " >&6; }
37370 37356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37371 37357 $as_echo "disabled" >&6; }
37372 37358 else
37373 37359 # Check if the provided tool contains a complete path.
37374 37360 tool_specified="$AR"
37375 37361 tool_basename="${tool_specified##*/}"
37376 37362 if test "x$tool_basename" = "x$tool_specified"; then
37377 37363 # A command without a complete path is provided, search $PATH.
37378 37364 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37379 37365 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37380 37366 # Extract the first word of "$tool_basename", so it can be a program name with args.
37381 37367 set dummy $tool_basename; ac_word=$2
37382 37368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37383 37369 $as_echo_n "checking for $ac_word... " >&6; }
37384 37370 if ${ac_cv_path_AR+:} false; then :
37385 37371 $as_echo_n "(cached) " >&6
37386 37372 else
37387 37373 case $AR in
37388 37374 [\\/]* | ?:[\\/]*)
37389 37375 ac_cv_path_AR="$AR" # Let the user override the test with a path.
37390 37376 ;;
37391 37377 *)
37392 37378 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37393 37379 for as_dir in $PATH
37394 37380 do
37395 37381 IFS=$as_save_IFS
37396 37382 test -z "$as_dir" && as_dir=.
37397 37383 for ac_exec_ext in '' $ac_executable_extensions; do
37398 37384 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37399 37385 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37400 37386 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37401 37387 break 2
37402 37388 fi
37403 37389 done
37404 37390 done
37405 37391 IFS=$as_save_IFS
37406 37392
37407 37393 ;;
37408 37394 esac
37409 37395 fi
37410 37396 AR=$ac_cv_path_AR
37411 37397 if test -n "$AR"; then
37412 37398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37413 37399 $as_echo "$AR" >&6; }
37414 37400 else
37415 37401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37416 37402 $as_echo "no" >&6; }
37417 37403 fi
37418 37404
37419 37405
37420 37406 if test "x$AR" = x; then
37421 37407 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37422 37408 fi
37423 37409 else
37424 37410 # Otherwise we believe it is a complete path. Use it as it is.
37425 37411 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37426 37412 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37427 37413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37428 37414 $as_echo_n "checking for AR... " >&6; }
37429 37415 if test ! -x "$tool_specified"; then
37430 37416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37431 37417 $as_echo "not found" >&6; }
37432 37418 as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37433 37419 fi
37434 37420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37435 37421 $as_echo "$tool_specified" >&6; }
37436 37422 fi
37437 37423 fi
37438 37424 fi
37439 37425
37440 37426 fi
37441 37427
37442 37428
37443 37429 else
37444 37430
37445 37431
37446 37432 # Publish this variable in the help.
37447 37433
37448 37434
37449 37435 if [ -z "${AR+x}" ]; then
37450 37436 # The variable is not set by user, try to locate tool using the code snippet
37451 37437 if test -n "$ac_tool_prefix"; then
37452 37438 for ac_prog in ar
37453 37439 do
37454 37440 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37455 37441 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37456 37442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37457 37443 $as_echo_n "checking for $ac_word... " >&6; }
37458 37444 if ${ac_cv_prog_AR+:} false; then :
37459 37445 $as_echo_n "(cached) " >&6
37460 37446 else
37461 37447 if test -n "$AR"; then
37462 37448 ac_cv_prog_AR="$AR" # Let the user override the test.
37463 37449 else
37464 37450 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37465 37451 for as_dir in $PATH
37466 37452 do
37467 37453 IFS=$as_save_IFS
37468 37454 test -z "$as_dir" && as_dir=.
37469 37455 for ac_exec_ext in '' $ac_executable_extensions; do
37470 37456 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37471 37457 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37472 37458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37473 37459 break 2
37474 37460 fi
37475 37461 done
37476 37462 done
37477 37463 IFS=$as_save_IFS
37478 37464
37479 37465 fi
37480 37466 fi
37481 37467 AR=$ac_cv_prog_AR
37482 37468 if test -n "$AR"; then
37483 37469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37484 37470 $as_echo "$AR" >&6; }
37485 37471 else
37486 37472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37487 37473 $as_echo "no" >&6; }
37488 37474 fi
37489 37475
37490 37476
37491 37477 test -n "$AR" && break
37492 37478 done
37493 37479 fi
37494 37480 if test -z "$AR"; then
37495 37481 ac_ct_AR=$AR
37496 37482 for ac_prog in ar
37497 37483 do
37498 37484 # Extract the first word of "$ac_prog", so it can be a program name with args.
37499 37485 set dummy $ac_prog; ac_word=$2
37500 37486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37501 37487 $as_echo_n "checking for $ac_word... " >&6; }
37502 37488 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37503 37489 $as_echo_n "(cached) " >&6
37504 37490 else
37505 37491 if test -n "$ac_ct_AR"; then
37506 37492 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37507 37493 else
37508 37494 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37509 37495 for as_dir in $PATH
37510 37496 do
37511 37497 IFS=$as_save_IFS
37512 37498 test -z "$as_dir" && as_dir=.
37513 37499 for ac_exec_ext in '' $ac_executable_extensions; do
37514 37500 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37515 37501 ac_cv_prog_ac_ct_AR="$ac_prog"
37516 37502 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37517 37503 break 2
37518 37504 fi
37519 37505 done
37520 37506 done
37521 37507 IFS=$as_save_IFS
37522 37508
37523 37509 fi
37524 37510 fi
37525 37511 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37526 37512 if test -n "$ac_ct_AR"; then
37527 37513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37528 37514 $as_echo "$ac_ct_AR" >&6; }
37529 37515 else
37530 37516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37531 37517 $as_echo "no" >&6; }
37532 37518 fi
37533 37519
37534 37520
37535 37521 test -n "$ac_ct_AR" && break
37536 37522 done
37537 37523
37538 37524 if test "x$ac_ct_AR" = x; then
37539 37525 AR=""
37540 37526 else
37541 37527 case $cross_compiling:$ac_tool_warned in
37542 37528 yes:)
37543 37529 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37544 37530 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37545 37531 ac_tool_warned=yes ;;
37546 37532 esac
37547 37533 AR=$ac_ct_AR
37548 37534 fi
37549 37535 fi
37550 37536
37551 37537 else
37552 37538 # The variable is set, but is it from the command line or the environment?
37553 37539
37554 37540 # Try to remove the string !AR! from our list.
37555 37541 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37556 37542 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37557 37543 # If it failed, the variable was not from the command line. Ignore it,
37558 37544 # but warn the user (except for BASH, which is always set by the calling BASH).
37559 37545 if test "xAR" != xBASH; then
37560 37546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37561 37547 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37562 37548 fi
37563 37549 # Try to locate tool using the code snippet
37564 37550 if test -n "$ac_tool_prefix"; then
37565 37551 for ac_prog in ar
37566 37552 do
37567 37553 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37568 37554 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37569 37555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37570 37556 $as_echo_n "checking for $ac_word... " >&6; }
37571 37557 if ${ac_cv_prog_AR+:} false; then :
37572 37558 $as_echo_n "(cached) " >&6
37573 37559 else
37574 37560 if test -n "$AR"; then
37575 37561 ac_cv_prog_AR="$AR" # Let the user override the test.
37576 37562 else
37577 37563 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37578 37564 for as_dir in $PATH
37579 37565 do
37580 37566 IFS=$as_save_IFS
37581 37567 test -z "$as_dir" && as_dir=.
37582 37568 for ac_exec_ext in '' $ac_executable_extensions; do
37583 37569 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37584 37570 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37585 37571 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37586 37572 break 2
37587 37573 fi
37588 37574 done
37589 37575 done
37590 37576 IFS=$as_save_IFS
37591 37577
37592 37578 fi
37593 37579 fi
37594 37580 AR=$ac_cv_prog_AR
37595 37581 if test -n "$AR"; then
37596 37582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37597 37583 $as_echo "$AR" >&6; }
37598 37584 else
37599 37585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37600 37586 $as_echo "no" >&6; }
37601 37587 fi
37602 37588
37603 37589
37604 37590 test -n "$AR" && break
37605 37591 done
37606 37592 fi
37607 37593 if test -z "$AR"; then
37608 37594 ac_ct_AR=$AR
37609 37595 for ac_prog in ar
37610 37596 do
37611 37597 # Extract the first word of "$ac_prog", so it can be a program name with args.
37612 37598 set dummy $ac_prog; ac_word=$2
37613 37599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37614 37600 $as_echo_n "checking for $ac_word... " >&6; }
37615 37601 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37616 37602 $as_echo_n "(cached) " >&6
37617 37603 else
37618 37604 if test -n "$ac_ct_AR"; then
37619 37605 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37620 37606 else
37621 37607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37622 37608 for as_dir in $PATH
37623 37609 do
37624 37610 IFS=$as_save_IFS
37625 37611 test -z "$as_dir" && as_dir=.
37626 37612 for ac_exec_ext in '' $ac_executable_extensions; do
37627 37613 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37628 37614 ac_cv_prog_ac_ct_AR="$ac_prog"
37629 37615 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37630 37616 break 2
37631 37617 fi
37632 37618 done
37633 37619 done
37634 37620 IFS=$as_save_IFS
37635 37621
37636 37622 fi
37637 37623 fi
37638 37624 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37639 37625 if test -n "$ac_ct_AR"; then
37640 37626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37641 37627 $as_echo "$ac_ct_AR" >&6; }
37642 37628 else
37643 37629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37644 37630 $as_echo "no" >&6; }
37645 37631 fi
37646 37632
37647 37633
37648 37634 test -n "$ac_ct_AR" && break
37649 37635 done
37650 37636
37651 37637 if test "x$ac_ct_AR" = x; then
37652 37638 AR=""
37653 37639 else
37654 37640 case $cross_compiling:$ac_tool_warned in
37655 37641 yes:)
37656 37642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37657 37643 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37658 37644 ac_tool_warned=yes ;;
37659 37645 esac
37660 37646 AR=$ac_ct_AR
37661 37647 fi
37662 37648 fi
37663 37649
37664 37650 else
37665 37651 # If it succeeded, then it was overridden by the user. We will use it
37666 37652 # for the tool.
37667 37653
37668 37654 # First remove it from the list of overridden variables, so we can test
37669 37655 # for unknown variables in the end.
37670 37656 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37671 37657
37672 37658 # Check if we try to supply an empty value
37673 37659 if test "x$AR" = x; then
37674 37660 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37675 37661 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37676 37662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37677 37663 $as_echo_n "checking for AR... " >&6; }
37678 37664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37679 37665 $as_echo "disabled" >&6; }
37680 37666 else
37681 37667 # Check if the provided tool contains a complete path.
37682 37668 tool_specified="$AR"
37683 37669 tool_basename="${tool_specified##*/}"
37684 37670 if test "x$tool_basename" = "x$tool_specified"; then
37685 37671 # A command without a complete path is provided, search $PATH.
37686 37672 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37687 37673 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37688 37674 # Extract the first word of "$tool_basename", so it can be a program name with args.
37689 37675 set dummy $tool_basename; ac_word=$2
37690 37676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37691 37677 $as_echo_n "checking for $ac_word... " >&6; }
37692 37678 if ${ac_cv_path_AR+:} false; then :
37693 37679 $as_echo_n "(cached) " >&6
37694 37680 else
37695 37681 case $AR in
37696 37682 [\\/]* | ?:[\\/]*)
37697 37683 ac_cv_path_AR="$AR" # Let the user override the test with a path.
37698 37684 ;;
37699 37685 *)
37700 37686 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37701 37687 for as_dir in $PATH
37702 37688 do
37703 37689 IFS=$as_save_IFS
37704 37690 test -z "$as_dir" && as_dir=.
37705 37691 for ac_exec_ext in '' $ac_executable_extensions; do
37706 37692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37707 37693 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37708 37694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37709 37695 break 2
37710 37696 fi
37711 37697 done
37712 37698 done
37713 37699 IFS=$as_save_IFS
37714 37700
37715 37701 ;;
37716 37702 esac
37717 37703 fi
37718 37704 AR=$ac_cv_path_AR
37719 37705 if test -n "$AR"; then
37720 37706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37721 37707 $as_echo "$AR" >&6; }
37722 37708 else
37723 37709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37724 37710 $as_echo "no" >&6; }
37725 37711 fi
37726 37712
37727 37713
37728 37714 if test "x$AR" = x; then
37729 37715 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37730 37716 fi
37731 37717 else
37732 37718 # Otherwise we believe it is a complete path. Use it as it is.
37733 37719 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37734 37720 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37735 37721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37736 37722 $as_echo_n "checking for AR... " >&6; }
37737 37723 if test ! -x "$tool_specified"; then
37738 37724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37739 37725 $as_echo "not found" >&6; }
37740 37726 as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37741 37727 fi
37742 37728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37743 37729 $as_echo "$tool_specified" >&6; }
37744 37730 fi
37745 37731 fi
37746 37732 fi
37747 37733
37748 37734 fi
37749 37735
37750 37736
37751 37737 fi
37752 37738
37753 37739 # Only process if variable expands to non-empty
37754 37740
37755 37741 if test "x$AR" != x; then
37756 37742 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37757 37743
37758 37744 # First separate the path from the arguments. This will split at the first
37759 37745 # space.
37760 37746 complete="$AR"
37761 37747 path="${complete%% *}"
37762 37748 tmp="$complete EOL"
37763 37749 arguments="${tmp#* }"
37764 37750
37765 37751 # Input might be given as Windows format, start by converting to
37766 37752 # unix format.
37767 37753 new_path=`$CYGPATH -u "$path"`
37768 37754
37769 37755 # Now try to locate executable using which
37770 37756 new_path=`$WHICH "$new_path" 2> /dev/null`
37771 37757 # bat and cmd files are not always considered executable in cygwin causing which
37772 37758 # to not find them
37773 37759 if test "x$new_path" = x \
37774 37760 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37775 37761 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37776 37762 new_path=`$CYGPATH -u "$path"`
37777 37763 fi
37778 37764 if test "x$new_path" = x; then
37779 37765 # Oops. Which didn't find the executable.
37780 37766 # The splitting of arguments from the executable at a space might have been incorrect,
37781 37767 # since paths with space are more likely in Windows. Give it another try with the whole
37782 37768 # argument.
37783 37769 path="$complete"
37784 37770 arguments="EOL"
37785 37771 new_path=`$CYGPATH -u "$path"`
37786 37772 new_path=`$WHICH "$new_path" 2> /dev/null`
37787 37773 # bat and cmd files are not always considered executable in cygwin causing which
37788 37774 # to not find them
37789 37775 if test "x$new_path" = x \
37790 37776 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37791 37777 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37792 37778 new_path=`$CYGPATH -u "$path"`
37793 37779 fi
37794 37780 if test "x$new_path" = x; then
37795 37781 # It's still not found. Now this is an unrecoverable error.
37796 37782 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37797 37783 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37798 37784 has_space=`$ECHO "$complete" | $GREP " "`
37799 37785 if test "x$has_space" != x; then
37800 37786 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37801 37787 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37802 37788 fi
37803 37789 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37804 37790 fi
37805 37791 fi
37806 37792
37807 37793 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37808 37794 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37809 37795 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37810 37796 # "foo.exe" is OK but "foo" is an error.
37811 37797 #
37812 37798 # This test is therefore slightly more accurate than "test -f" to check for file presence.
37813 37799 # It is also a way to make sure we got the proper file name for the real test later on.
37814 37800 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37815 37801 if test "x$test_shortpath" = x; then
37816 37802 # Short path failed, file does not exist as specified.
37817 37803 # Try adding .exe or .cmd
37818 37804 if test -f "${new_path}.exe"; then
37819 37805 input_to_shortpath="${new_path}.exe"
37820 37806 elif test -f "${new_path}.cmd"; then
37821 37807 input_to_shortpath="${new_path}.cmd"
37822 37808 else
37823 37809 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37824 37810 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37825 37811 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37826 37812 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37827 37813 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37828 37814 fi
37829 37815 else
37830 37816 input_to_shortpath="$new_path"
37831 37817 fi
37832 37818
37833 37819 # Call helper function which possibly converts this using DOS-style short mode.
37834 37820 # If so, the updated path is stored in $new_path.
37835 37821 new_path="$input_to_shortpath"
37836 37822
37837 37823 input_path="$input_to_shortpath"
37838 37824 # Check if we need to convert this using DOS-style short mode. If the path
37839 37825 # contains just simple characters, use it. Otherwise (spaces, weird characters),
37840 37826 # take no chances and rewrite it.
37841 37827 # Note: m4 eats our [], so we need to use [ and ] instead.
37842 37828 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37843 37829 if test "x$has_forbidden_chars" != x; then
37844 37830 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37845 37831 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37846 37832 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37847 37833 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37848 37834 # Going to short mode and back again did indeed matter. Since short mode is
37849 37835 # case insensitive, let's make it lowercase to improve readability.
37850 37836 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37851 37837 # Now convert it back to Unix-style (cygpath)
37852 37838 input_path=`$CYGPATH -u "$shortmode_path"`
37853 37839 new_path="$input_path"
37854 37840 fi
37855 37841 fi
37856 37842
37857 37843 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37858 37844 if test "x$test_cygdrive_prefix" = x; then
37859 37845 # As a simple fix, exclude /usr/bin since it's not a real path.
37860 37846 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37861 37847 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37862 37848 # a path prefixed by /cygdrive for fixpath to work.
37863 37849 new_path="$CYGWIN_ROOT_PATH$input_path"
37864 37850 fi
37865 37851 fi
37866 37852
37867 37853 # remove trailing .exe if any
37868 37854 new_path="${new_path/%.exe/}"
37869 37855
37870 37856 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37871 37857
37872 37858 # First separate the path from the arguments. This will split at the first
37873 37859 # space.
37874 37860 complete="$AR"
37875 37861 path="${complete%% *}"
37876 37862 tmp="$complete EOL"
37877 37863 arguments="${tmp#* }"
37878 37864
37879 37865 # Input might be given as Windows format, start by converting to
37880 37866 # unix format.
37881 37867 new_path="$path"
37882 37868
37883 37869 windows_path="$new_path"
37884 37870 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37885 37871 unix_path=`$CYGPATH -u "$windows_path"`
37886 37872 new_path="$unix_path"
37887 37873 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37888 37874 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37889 37875 new_path="$unix_path"
37890 37876 fi
37891 37877
37892 37878
37893 37879 # Now try to locate executable using which
37894 37880 new_path=`$WHICH "$new_path" 2> /dev/null`
37895 37881
37896 37882 if test "x$new_path" = x; then
37897 37883 # Oops. Which didn't find the executable.
37898 37884 # The splitting of arguments from the executable at a space might have been incorrect,
37899 37885 # since paths with space are more likely in Windows. Give it another try with the whole
37900 37886 # argument.
37901 37887 path="$complete"
37902 37888 arguments="EOL"
37903 37889 new_path="$path"
37904 37890
37905 37891 windows_path="$new_path"
37906 37892 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37907 37893 unix_path=`$CYGPATH -u "$windows_path"`
37908 37894 new_path="$unix_path"
37909 37895 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37910 37896 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37911 37897 new_path="$unix_path"
37912 37898 fi
37913 37899
37914 37900
37915 37901 new_path=`$WHICH "$new_path" 2> /dev/null`
37916 37902 # bat and cmd files are not always considered executable in MSYS causing which
37917 37903 # to not find them
37918 37904 if test "x$new_path" = x \
37919 37905 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37920 37906 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37921 37907 new_path="$path"
37922 37908
37923 37909 windows_path="$new_path"
37924 37910 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37925 37911 unix_path=`$CYGPATH -u "$windows_path"`
37926 37912 new_path="$unix_path"
37927 37913 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37928 37914 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37929 37915 new_path="$unix_path"
37930 37916 fi
37931 37917
37932 37918 fi
37933 37919
37934 37920 if test "x$new_path" = x; then
37935 37921 # It's still not found. Now this is an unrecoverable error.
37936 37922 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37937 37923 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37938 37924 has_space=`$ECHO "$complete" | $GREP " "`
37939 37925 if test "x$has_space" != x; then
37940 37926 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37941 37927 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37942 37928 fi
37943 37929 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37944 37930 fi
37945 37931 fi
37946 37932
37947 37933 # Now new_path has a complete unix path to the binary
37948 37934 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37949 37935 # Keep paths in /bin as-is, but remove trailing .exe if any
37950 37936 new_path="${new_path/%.exe/}"
37951 37937 # Do not save /bin paths to all_fixpath_prefixes!
37952 37938 else
37953 37939 # Not in mixed or Windows style, start by that.
37954 37940 new_path=`cmd //c echo $new_path`
37955 37941
37956 37942 input_path="$new_path"
37957 37943 # Check if we need to convert this using DOS-style short mode. If the path
37958 37944 # contains just simple characters, use it. Otherwise (spaces, weird characters),
37959 37945 # take no chances and rewrite it.
37960 37946 # Note: m4 eats our [], so we need to use [ and ] instead.
37961 37947 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37962 37948 if test "x$has_forbidden_chars" != x; then
37963 37949 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37964 37950 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37965 37951 fi
37966 37952
37967 37953 # Output is in $new_path
37968 37954
37969 37955 windows_path="$new_path"
37970 37956 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37971 37957 unix_path=`$CYGPATH -u "$windows_path"`
37972 37958 new_path="$unix_path"
37973 37959 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37974 37960 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37975 37961 new_path="$unix_path"
37976 37962 fi
37977 37963
37978 37964 # remove trailing .exe if any
37979 37965 new_path="${new_path/%.exe/}"
37980 37966
37981 37967 # Save the first 10 bytes of this path to the storage, so fixpath can work.
37982 37968 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37983 37969 fi
37984 37970
37985 37971 else
37986 37972 # We're on a unix platform. Hooray! :)
37987 37973 # First separate the path from the arguments. This will split at the first
37988 37974 # space.
37989 37975 complete="$AR"
37990 37976 path="${complete%% *}"
37991 37977 tmp="$complete EOL"
37992 37978 arguments="${tmp#* }"
37993 37979
37994 37980 # Cannot rely on the command "which" here since it doesn't always work.
37995 37981 is_absolute_path=`$ECHO "$path" | $GREP ^/`
37996 37982 if test -z "$is_absolute_path"; then
37997 37983 # Path to executable is not absolute. Find it.
37998 37984 IFS_save="$IFS"
37999 37985 IFS=:
38000 37986 for p in $PATH; do
38001 37987 if test -f "$p/$path" && test -x "$p/$path"; then
38002 37988 new_path="$p/$path"
38003 37989 break
38004 37990 fi
38005 37991 done
38006 37992 IFS="$IFS_save"
38007 37993 else
38008 37994 # This is an absolute path, we can use it without further modifications.
38009 37995 new_path="$path"
38010 37996 fi
38011 37997
38012 37998 if test "x$new_path" = x; then
38013 37999 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38014 38000 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38015 38001 has_space=`$ECHO "$complete" | $GREP " "`
38016 38002 if test "x$has_space" != x; then
38017 38003 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38018 38004 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38019 38005 fi
38020 38006 as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38021 38007 fi
38022 38008 fi
38023 38009
38024 38010 # Now join together the path and the arguments once again
38025 38011 if test "x$arguments" != xEOL; then
38026 38012 new_complete="$new_path ${arguments% *}"
38027 38013 else
38028 38014 new_complete="$new_path"
38029 38015 fi
38030 38016
38031 38017 if test "x$complete" != "x$new_complete"; then
38032 38018 AR="$new_complete"
38033 38019 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38034 38020 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38035 38021 fi
38036 38022 fi
38037 38023
38038 38024
38039 38025
38040 38026 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38041 38027
38042 38028
38043 38029 # Publish this variable in the help.
38044 38030
38045 38031
38046 38032 if [ -z "${LIPO+x}" ]; then
38047 38033 # The variable is not set by user, try to locate tool using the code snippet
38048 38034 for ac_prog in lipo
38049 38035 do
38050 38036 # Extract the first word of "$ac_prog", so it can be a program name with args.
38051 38037 set dummy $ac_prog; ac_word=$2
38052 38038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38053 38039 $as_echo_n "checking for $ac_word... " >&6; }
38054 38040 if ${ac_cv_path_LIPO+:} false; then :
38055 38041 $as_echo_n "(cached) " >&6
38056 38042 else
38057 38043 case $LIPO in
38058 38044 [\\/]* | ?:[\\/]*)
38059 38045 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38060 38046 ;;
38061 38047 *)
38062 38048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38063 38049 for as_dir in $PATH
38064 38050 do
38065 38051 IFS=$as_save_IFS
38066 38052 test -z "$as_dir" && as_dir=.
38067 38053 for ac_exec_ext in '' $ac_executable_extensions; do
38068 38054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38069 38055 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38070 38056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38071 38057 break 2
38072 38058 fi
38073 38059 done
38074 38060 done
38075 38061 IFS=$as_save_IFS
38076 38062
38077 38063 ;;
38078 38064 esac
38079 38065 fi
38080 38066 LIPO=$ac_cv_path_LIPO
38081 38067 if test -n "$LIPO"; then
38082 38068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38083 38069 $as_echo "$LIPO" >&6; }
38084 38070 else
38085 38071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38086 38072 $as_echo "no" >&6; }
38087 38073 fi
38088 38074
38089 38075
38090 38076 test -n "$LIPO" && break
38091 38077 done
38092 38078
38093 38079 else
38094 38080 # The variable is set, but is it from the command line or the environment?
38095 38081
38096 38082 # Try to remove the string !LIPO! from our list.
38097 38083 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38098 38084 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38099 38085 # If it failed, the variable was not from the command line. Ignore it,
38100 38086 # but warn the user (except for BASH, which is always set by the calling BASH).
38101 38087 if test "xLIPO" != xBASH; then
38102 38088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38103 38089 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38104 38090 fi
38105 38091 # Try to locate tool using the code snippet
38106 38092 for ac_prog in lipo
38107 38093 do
38108 38094 # Extract the first word of "$ac_prog", so it can be a program name with args.
38109 38095 set dummy $ac_prog; ac_word=$2
38110 38096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38111 38097 $as_echo_n "checking for $ac_word... " >&6; }
38112 38098 if ${ac_cv_path_LIPO+:} false; then :
38113 38099 $as_echo_n "(cached) " >&6
38114 38100 else
38115 38101 case $LIPO in
38116 38102 [\\/]* | ?:[\\/]*)
38117 38103 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38118 38104 ;;
38119 38105 *)
38120 38106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38121 38107 for as_dir in $PATH
38122 38108 do
38123 38109 IFS=$as_save_IFS
38124 38110 test -z "$as_dir" && as_dir=.
38125 38111 for ac_exec_ext in '' $ac_executable_extensions; do
38126 38112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38127 38113 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38128 38114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38129 38115 break 2
38130 38116 fi
38131 38117 done
38132 38118 done
38133 38119 IFS=$as_save_IFS
38134 38120
38135 38121 ;;
38136 38122 esac
38137 38123 fi
38138 38124 LIPO=$ac_cv_path_LIPO
38139 38125 if test -n "$LIPO"; then
38140 38126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38141 38127 $as_echo "$LIPO" >&6; }
38142 38128 else
38143 38129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38144 38130 $as_echo "no" >&6; }
38145 38131 fi
38146 38132
38147 38133
38148 38134 test -n "$LIPO" && break
38149 38135 done
38150 38136
38151 38137 else
38152 38138 # If it succeeded, then it was overridden by the user. We will use it
38153 38139 # for the tool.
38154 38140
38155 38141 # First remove it from the list of overridden variables, so we can test
38156 38142 # for unknown variables in the end.
38157 38143 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38158 38144
38159 38145 # Check if we try to supply an empty value
38160 38146 if test "x$LIPO" = x; then
38161 38147 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38162 38148 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38163 38149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38164 38150 $as_echo_n "checking for LIPO... " >&6; }
38165 38151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38166 38152 $as_echo "disabled" >&6; }
38167 38153 else
38168 38154 # Check if the provided tool contains a complete path.
38169 38155 tool_specified="$LIPO"
38170 38156 tool_basename="${tool_specified##*/}"
38171 38157 if test "x$tool_basename" = "x$tool_specified"; then
38172 38158 # A command without a complete path is provided, search $PATH.
38173 38159 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38174 38160 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38175 38161 # Extract the first word of "$tool_basename", so it can be a program name with args.
38176 38162 set dummy $tool_basename; ac_word=$2
38177 38163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38178 38164 $as_echo_n "checking for $ac_word... " >&6; }
38179 38165 if ${ac_cv_path_LIPO+:} false; then :
38180 38166 $as_echo_n "(cached) " >&6
38181 38167 else
38182 38168 case $LIPO in
38183 38169 [\\/]* | ?:[\\/]*)
38184 38170 ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38185 38171 ;;
38186 38172 *)
38187 38173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38188 38174 for as_dir in $PATH
38189 38175 do
38190 38176 IFS=$as_save_IFS
38191 38177 test -z "$as_dir" && as_dir=.
38192 38178 for ac_exec_ext in '' $ac_executable_extensions; do
38193 38179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38194 38180 ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38195 38181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38196 38182 break 2
38197 38183 fi
38198 38184 done
38199 38185 done
38200 38186 IFS=$as_save_IFS
38201 38187
38202 38188 ;;
38203 38189 esac
38204 38190 fi
38205 38191 LIPO=$ac_cv_path_LIPO
38206 38192 if test -n "$LIPO"; then
38207 38193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38208 38194 $as_echo "$LIPO" >&6; }
38209 38195 else
38210 38196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38211 38197 $as_echo "no" >&6; }
38212 38198 fi
38213 38199
38214 38200
38215 38201 if test "x$LIPO" = x; then
38216 38202 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38217 38203 fi
38218 38204 else
38219 38205 # Otherwise we believe it is a complete path. Use it as it is.
38220 38206 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38221 38207 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38222 38208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38223 38209 $as_echo_n "checking for LIPO... " >&6; }
38224 38210 if test ! -x "$tool_specified"; then
38225 38211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38226 38212 $as_echo "not found" >&6; }
38227 38213 as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38228 38214 fi
38229 38215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38230 38216 $as_echo "$tool_specified" >&6; }
38231 38217 fi
38232 38218 fi
38233 38219 fi
38234 38220
38235 38221 fi
38236 38222
38237 38223
38238 38224
38239 38225 # Only process if variable expands to non-empty
38240 38226
38241 38227 if test "x$LIPO" != x; then
38242 38228 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38243 38229
38244 38230 # First separate the path from the arguments. This will split at the first
38245 38231 # space.
38246 38232 complete="$LIPO"
38247 38233 path="${complete%% *}"
38248 38234 tmp="$complete EOL"
38249 38235 arguments="${tmp#* }"
38250 38236
38251 38237 # Input might be given as Windows format, start by converting to
38252 38238 # unix format.
38253 38239 new_path=`$CYGPATH -u "$path"`
38254 38240
38255 38241 # Now try to locate executable using which
38256 38242 new_path=`$WHICH "$new_path" 2> /dev/null`
38257 38243 # bat and cmd files are not always considered executable in cygwin causing which
38258 38244 # to not find them
38259 38245 if test "x$new_path" = x \
38260 38246 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38261 38247 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38262 38248 new_path=`$CYGPATH -u "$path"`
38263 38249 fi
38264 38250 if test "x$new_path" = x; then
38265 38251 # Oops. Which didn't find the executable.
38266 38252 # The splitting of arguments from the executable at a space might have been incorrect,
38267 38253 # since paths with space are more likely in Windows. Give it another try with the whole
38268 38254 # argument.
38269 38255 path="$complete"
38270 38256 arguments="EOL"
38271 38257 new_path=`$CYGPATH -u "$path"`
38272 38258 new_path=`$WHICH "$new_path" 2> /dev/null`
38273 38259 # bat and cmd files are not always considered executable in cygwin causing which
38274 38260 # to not find them
38275 38261 if test "x$new_path" = x \
38276 38262 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38277 38263 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38278 38264 new_path=`$CYGPATH -u "$path"`
38279 38265 fi
38280 38266 if test "x$new_path" = x; then
38281 38267 # It's still not found. Now this is an unrecoverable error.
38282 38268 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38283 38269 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38284 38270 has_space=`$ECHO "$complete" | $GREP " "`
38285 38271 if test "x$has_space" != x; then
38286 38272 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38287 38273 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38288 38274 fi
38289 38275 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38290 38276 fi
38291 38277 fi
38292 38278
38293 38279 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38294 38280 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38295 38281 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38296 38282 # "foo.exe" is OK but "foo" is an error.
38297 38283 #
38298 38284 # This test is therefore slightly more accurate than "test -f" to check for file presence.
38299 38285 # It is also a way to make sure we got the proper file name for the real test later on.
38300 38286 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38301 38287 if test "x$test_shortpath" = x; then
38302 38288 # Short path failed, file does not exist as specified.
38303 38289 # Try adding .exe or .cmd
38304 38290 if test -f "${new_path}.exe"; then
38305 38291 input_to_shortpath="${new_path}.exe"
38306 38292 elif test -f "${new_path}.cmd"; then
38307 38293 input_to_shortpath="${new_path}.cmd"
38308 38294 else
38309 38295 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38310 38296 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38311 38297 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38312 38298 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38313 38299 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38314 38300 fi
38315 38301 else
38316 38302 input_to_shortpath="$new_path"
38317 38303 fi
38318 38304
38319 38305 # Call helper function which possibly converts this using DOS-style short mode.
38320 38306 # If so, the updated path is stored in $new_path.
38321 38307 new_path="$input_to_shortpath"
38322 38308
38323 38309 input_path="$input_to_shortpath"
38324 38310 # Check if we need to convert this using DOS-style short mode. If the path
38325 38311 # contains just simple characters, use it. Otherwise (spaces, weird characters),
38326 38312 # take no chances and rewrite it.
38327 38313 # Note: m4 eats our [], so we need to use [ and ] instead.
38328 38314 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38329 38315 if test "x$has_forbidden_chars" != x; then
38330 38316 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38331 38317 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38332 38318 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38333 38319 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38334 38320 # Going to short mode and back again did indeed matter. Since short mode is
38335 38321 # case insensitive, let's make it lowercase to improve readability.
38336 38322 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38337 38323 # Now convert it back to Unix-style (cygpath)
38338 38324 input_path=`$CYGPATH -u "$shortmode_path"`
38339 38325 new_path="$input_path"
38340 38326 fi
38341 38327 fi
38342 38328
38343 38329 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38344 38330 if test "x$test_cygdrive_prefix" = x; then
38345 38331 # As a simple fix, exclude /usr/bin since it's not a real path.
38346 38332 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38347 38333 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38348 38334 # a path prefixed by /cygdrive for fixpath to work.
38349 38335 new_path="$CYGWIN_ROOT_PATH$input_path"
38350 38336 fi
38351 38337 fi
38352 38338
38353 38339 # remove trailing .exe if any
38354 38340 new_path="${new_path/%.exe/}"
38355 38341
38356 38342 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38357 38343
38358 38344 # First separate the path from the arguments. This will split at the first
38359 38345 # space.
38360 38346 complete="$LIPO"
38361 38347 path="${complete%% *}"
38362 38348 tmp="$complete EOL"
38363 38349 arguments="${tmp#* }"
38364 38350
38365 38351 # Input might be given as Windows format, start by converting to
38366 38352 # unix format.
38367 38353 new_path="$path"
38368 38354
38369 38355 windows_path="$new_path"
38370 38356 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38371 38357 unix_path=`$CYGPATH -u "$windows_path"`
38372 38358 new_path="$unix_path"
38373 38359 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38374 38360 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38375 38361 new_path="$unix_path"
38376 38362 fi
38377 38363
38378 38364
38379 38365 # Now try to locate executable using which
38380 38366 new_path=`$WHICH "$new_path" 2> /dev/null`
38381 38367
38382 38368 if test "x$new_path" = x; then
38383 38369 # Oops. Which didn't find the executable.
38384 38370 # The splitting of arguments from the executable at a space might have been incorrect,
38385 38371 # since paths with space are more likely in Windows. Give it another try with the whole
38386 38372 # argument.
38387 38373 path="$complete"
38388 38374 arguments="EOL"
38389 38375 new_path="$path"
38390 38376
38391 38377 windows_path="$new_path"
38392 38378 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38393 38379 unix_path=`$CYGPATH -u "$windows_path"`
38394 38380 new_path="$unix_path"
38395 38381 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38396 38382 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38397 38383 new_path="$unix_path"
38398 38384 fi
38399 38385
38400 38386
38401 38387 new_path=`$WHICH "$new_path" 2> /dev/null`
38402 38388 # bat and cmd files are not always considered executable in MSYS causing which
38403 38389 # to not find them
38404 38390 if test "x$new_path" = x \
38405 38391 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38406 38392 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38407 38393 new_path="$path"
38408 38394
38409 38395 windows_path="$new_path"
38410 38396 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38411 38397 unix_path=`$CYGPATH -u "$windows_path"`
38412 38398 new_path="$unix_path"
38413 38399 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38414 38400 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38415 38401 new_path="$unix_path"
38416 38402 fi
38417 38403
38418 38404 fi
38419 38405
38420 38406 if test "x$new_path" = x; then
38421 38407 # It's still not found. Now this is an unrecoverable error.
38422 38408 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38423 38409 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38424 38410 has_space=`$ECHO "$complete" | $GREP " "`
38425 38411 if test "x$has_space" != x; then
38426 38412 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38427 38413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38428 38414 fi
38429 38415 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38430 38416 fi
38431 38417 fi
38432 38418
38433 38419 # Now new_path has a complete unix path to the binary
38434 38420 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38435 38421 # Keep paths in /bin as-is, but remove trailing .exe if any
38436 38422 new_path="${new_path/%.exe/}"
38437 38423 # Do not save /bin paths to all_fixpath_prefixes!
38438 38424 else
38439 38425 # Not in mixed or Windows style, start by that.
38440 38426 new_path=`cmd //c echo $new_path`
38441 38427
38442 38428 input_path="$new_path"
38443 38429 # Check if we need to convert this using DOS-style short mode. If the path
38444 38430 # contains just simple characters, use it. Otherwise (spaces, weird characters),
38445 38431 # take no chances and rewrite it.
38446 38432 # Note: m4 eats our [], so we need to use [ and ] instead.
38447 38433 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38448 38434 if test "x$has_forbidden_chars" != x; then
38449 38435 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38450 38436 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38451 38437 fi
38452 38438
38453 38439 # Output is in $new_path
38454 38440
38455 38441 windows_path="$new_path"
38456 38442 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38457 38443 unix_path=`$CYGPATH -u "$windows_path"`
38458 38444 new_path="$unix_path"
38459 38445 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38460 38446 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38461 38447 new_path="$unix_path"
38462 38448 fi
38463 38449
38464 38450 # remove trailing .exe if any
38465 38451 new_path="${new_path/%.exe/}"
38466 38452
38467 38453 # Save the first 10 bytes of this path to the storage, so fixpath can work.
38468 38454 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38469 38455 fi
38470 38456
38471 38457 else
38472 38458 # We're on a unix platform. Hooray! :)
38473 38459 # First separate the path from the arguments. This will split at the first
38474 38460 # space.
38475 38461 complete="$LIPO"
38476 38462 path="${complete%% *}"
38477 38463 tmp="$complete EOL"
38478 38464 arguments="${tmp#* }"
38479 38465
38480 38466 # Cannot rely on the command "which" here since it doesn't always work.
38481 38467 is_absolute_path=`$ECHO "$path" | $GREP ^/`
38482 38468 if test -z "$is_absolute_path"; then
38483 38469 # Path to executable is not absolute. Find it.
38484 38470 IFS_save="$IFS"
38485 38471 IFS=:
38486 38472 for p in $PATH; do
38487 38473 if test -f "$p/$path" && test -x "$p/$path"; then
38488 38474 new_path="$p/$path"
38489 38475 break
38490 38476 fi
38491 38477 done
38492 38478 IFS="$IFS_save"
38493 38479 else
38494 38480 # This is an absolute path, we can use it without further modifications.
38495 38481 new_path="$path"
38496 38482 fi
38497 38483
38498 38484 if test "x$new_path" = x; then
38499 38485 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38500 38486 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38501 38487 has_space=`$ECHO "$complete" | $GREP " "`
38502 38488 if test "x$has_space" != x; then
38503 38489 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38504 38490 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38505 38491 fi
38506 38492 as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38507 38493 fi
38508 38494 fi
38509 38495
38510 38496 # Now join together the path and the arguments once again
38511 38497 if test "x$arguments" != xEOL; then
38512 38498 new_complete="$new_path ${arguments% *}"
38513 38499 else
38514 38500 new_complete="$new_path"
38515 38501 fi
38516 38502
38517 38503 if test "x$complete" != "x$new_complete"; then
38518 38504 LIPO="$new_complete"
38519 38505 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38520 38506 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38521 38507 fi
38522 38508 fi
38523 38509
38524 38510 fi
38525 38511
38526 38512 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38527 38513 # Extract the first word of "mt", so it can be a program name with args.
38528 38514 set dummy mt; ac_word=$2
38529 38515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38530 38516 $as_echo_n "checking for $ac_word... " >&6; }
38531 38517 if ${ac_cv_prog_MT+:} false; then :
38532 38518 $as_echo_n "(cached) " >&6
38533 38519 else
38534 38520 if test -n "$MT"; then
38535 38521 ac_cv_prog_MT="$MT" # Let the user override the test.
38536 38522 else
38537 38523 ac_prog_rejected=no
38538 38524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38539 38525 for as_dir in $PATH
38540 38526 do
38541 38527 IFS=$as_save_IFS
38542 38528 test -z "$as_dir" && as_dir=.
38543 38529 for ac_exec_ext in '' $ac_executable_extensions; do
38544 38530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38545 38531 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38546 38532 ac_prog_rejected=yes
38547 38533 continue
38548 38534 fi
38549 38535 ac_cv_prog_MT="mt"
38550 38536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38551 38537 break 2
38552 38538 fi
38553 38539 done
38554 38540 done
38555 38541 IFS=$as_save_IFS
38556 38542
38557 38543 if test $ac_prog_rejected = yes; then
38558 38544 # We found a bogon in the path, so make sure we never use it.
38559 38545 set dummy $ac_cv_prog_MT
38560 38546 shift
38561 38547 if test $# != 0; then
38562 38548 # We chose a different compiler from the bogus one.
38563 38549 # However, it has the same basename, so the bogon will be chosen
38564 38550 # first if we set MT to just the basename; use the full file name.
38565 38551 shift
38566 38552 ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38567 38553 fi
38568 38554 fi
38569 38555 fi
38570 38556 fi
38571 38557 MT=$ac_cv_prog_MT
38572 38558 if test -n "$MT"; then
38573 38559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38574 38560 $as_echo "$MT" >&6; }
38575 38561 else
38576 38562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38577 38563 $as_echo "no" >&6; }
38578 38564 fi
38579 38565
38580 38566
38581 38567
38582 38568 # Only process if variable expands to non-empty
38583 38569
38584 38570 if test "x$MT" != x; then
38585 38571 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38586 38572
38587 38573 # First separate the path from the arguments. This will split at the first
38588 38574 # space.
38589 38575 complete="$MT"
38590 38576 path="${complete%% *}"
38591 38577 tmp="$complete EOL"
38592 38578 arguments="${tmp#* }"
38593 38579
38594 38580 # Input might be given as Windows format, start by converting to
38595 38581 # unix format.
38596 38582 new_path=`$CYGPATH -u "$path"`
38597 38583
38598 38584 # Now try to locate executable using which
38599 38585 new_path=`$WHICH "$new_path" 2> /dev/null`
38600 38586 # bat and cmd files are not always considered executable in cygwin causing which
38601 38587 # to not find them
38602 38588 if test "x$new_path" = x \
38603 38589 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38604 38590 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38605 38591 new_path=`$CYGPATH -u "$path"`
38606 38592 fi
38607 38593 if test "x$new_path" = x; then
38608 38594 # Oops. Which didn't find the executable.
38609 38595 # The splitting of arguments from the executable at a space might have been incorrect,
38610 38596 # since paths with space are more likely in Windows. Give it another try with the whole
38611 38597 # argument.
38612 38598 path="$complete"
38613 38599 arguments="EOL"
38614 38600 new_path=`$CYGPATH -u "$path"`
38615 38601 new_path=`$WHICH "$new_path" 2> /dev/null`
38616 38602 # bat and cmd files are not always considered executable in cygwin causing which
38617 38603 # to not find them
38618 38604 if test "x$new_path" = x \
38619 38605 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38620 38606 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38621 38607 new_path=`$CYGPATH -u "$path"`
38622 38608 fi
38623 38609 if test "x$new_path" = x; then
38624 38610 # It's still not found. Now this is an unrecoverable error.
38625 38611 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38626 38612 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38627 38613 has_space=`$ECHO "$complete" | $GREP " "`
38628 38614 if test "x$has_space" != x; then
38629 38615 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38630 38616 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38631 38617 fi
38632 38618 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38633 38619 fi
38634 38620 fi
38635 38621
38636 38622 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38637 38623 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38638 38624 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38639 38625 # "foo.exe" is OK but "foo" is an error.
38640 38626 #
38641 38627 # This test is therefore slightly more accurate than "test -f" to check for file presence.
38642 38628 # It is also a way to make sure we got the proper file name for the real test later on.
38643 38629 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38644 38630 if test "x$test_shortpath" = x; then
38645 38631 # Short path failed, file does not exist as specified.
38646 38632 # Try adding .exe or .cmd
38647 38633 if test -f "${new_path}.exe"; then
38648 38634 input_to_shortpath="${new_path}.exe"
38649 38635 elif test -f "${new_path}.cmd"; then
38650 38636 input_to_shortpath="${new_path}.cmd"
38651 38637 else
38652 38638 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38653 38639 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38654 38640 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38655 38641 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38656 38642 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38657 38643 fi
38658 38644 else
38659 38645 input_to_shortpath="$new_path"
38660 38646 fi
38661 38647
38662 38648 # Call helper function which possibly converts this using DOS-style short mode.
38663 38649 # If so, the updated path is stored in $new_path.
38664 38650 new_path="$input_to_shortpath"
38665 38651
38666 38652 input_path="$input_to_shortpath"
38667 38653 # Check if we need to convert this using DOS-style short mode. If the path
38668 38654 # contains just simple characters, use it. Otherwise (spaces, weird characters),
38669 38655 # take no chances and rewrite it.
38670 38656 # Note: m4 eats our [], so we need to use [ and ] instead.
38671 38657 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38672 38658 if test "x$has_forbidden_chars" != x; then
38673 38659 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38674 38660 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38675 38661 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38676 38662 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38677 38663 # Going to short mode and back again did indeed matter. Since short mode is
38678 38664 # case insensitive, let's make it lowercase to improve readability.
38679 38665 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38680 38666 # Now convert it back to Unix-style (cygpath)
38681 38667 input_path=`$CYGPATH -u "$shortmode_path"`
38682 38668 new_path="$input_path"
38683 38669 fi
38684 38670 fi
38685 38671
38686 38672 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38687 38673 if test "x$test_cygdrive_prefix" = x; then
38688 38674 # As a simple fix, exclude /usr/bin since it's not a real path.
38689 38675 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38690 38676 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38691 38677 # a path prefixed by /cygdrive for fixpath to work.
38692 38678 new_path="$CYGWIN_ROOT_PATH$input_path"
38693 38679 fi
38694 38680 fi
38695 38681
38696 38682 # remove trailing .exe if any
38697 38683 new_path="${new_path/%.exe/}"
38698 38684
38699 38685 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38700 38686
38701 38687 # First separate the path from the arguments. This will split at the first
38702 38688 # space.
38703 38689 complete="$MT"
38704 38690 path="${complete%% *}"
38705 38691 tmp="$complete EOL"
38706 38692 arguments="${tmp#* }"
38707 38693
38708 38694 # Input might be given as Windows format, start by converting to
38709 38695 # unix format.
38710 38696 new_path="$path"
38711 38697
38712 38698 windows_path="$new_path"
38713 38699 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38714 38700 unix_path=`$CYGPATH -u "$windows_path"`
38715 38701 new_path="$unix_path"
38716 38702 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38717 38703 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38718 38704 new_path="$unix_path"
38719 38705 fi
38720 38706
38721 38707
38722 38708 # Now try to locate executable using which
38723 38709 new_path=`$WHICH "$new_path" 2> /dev/null`
38724 38710
38725 38711 if test "x$new_path" = x; then
38726 38712 # Oops. Which didn't find the executable.
38727 38713 # The splitting of arguments from the executable at a space might have been incorrect,
38728 38714 # since paths with space are more likely in Windows. Give it another try with the whole
38729 38715 # argument.
38730 38716 path="$complete"
38731 38717 arguments="EOL"
38732 38718 new_path="$path"
38733 38719
38734 38720 windows_path="$new_path"
38735 38721 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38736 38722 unix_path=`$CYGPATH -u "$windows_path"`
38737 38723 new_path="$unix_path"
38738 38724 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38739 38725 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38740 38726 new_path="$unix_path"
38741 38727 fi
38742 38728
38743 38729
38744 38730 new_path=`$WHICH "$new_path" 2> /dev/null`
38745 38731 # bat and cmd files are not always considered executable in MSYS causing which
38746 38732 # to not find them
38747 38733 if test "x$new_path" = x \
38748 38734 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38749 38735 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38750 38736 new_path="$path"
38751 38737
38752 38738 windows_path="$new_path"
38753 38739 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38754 38740 unix_path=`$CYGPATH -u "$windows_path"`
38755 38741 new_path="$unix_path"
38756 38742 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38757 38743 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38758 38744 new_path="$unix_path"
38759 38745 fi
38760 38746
38761 38747 fi
38762 38748
38763 38749 if test "x$new_path" = x; then
38764 38750 # It's still not found. Now this is an unrecoverable error.
38765 38751 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38766 38752 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38767 38753 has_space=`$ECHO "$complete" | $GREP " "`
38768 38754 if test "x$has_space" != x; then
38769 38755 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38770 38756 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38771 38757 fi
38772 38758 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38773 38759 fi
38774 38760 fi
38775 38761
38776 38762 # Now new_path has a complete unix path to the binary
38777 38763 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38778 38764 # Keep paths in /bin as-is, but remove trailing .exe if any
38779 38765 new_path="${new_path/%.exe/}"
38780 38766 # Do not save /bin paths to all_fixpath_prefixes!
38781 38767 else
38782 38768 # Not in mixed or Windows style, start by that.
38783 38769 new_path=`cmd //c echo $new_path`
38784 38770
38785 38771 input_path="$new_path"
38786 38772 # Check if we need to convert this using DOS-style short mode. If the path
38787 38773 # contains just simple characters, use it. Otherwise (spaces, weird characters),
38788 38774 # take no chances and rewrite it.
38789 38775 # Note: m4 eats our [], so we need to use [ and ] instead.
38790 38776 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38791 38777 if test "x$has_forbidden_chars" != x; then
38792 38778 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38793 38779 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38794 38780 fi
38795 38781
38796 38782 # Output is in $new_path
38797 38783
38798 38784 windows_path="$new_path"
38799 38785 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38800 38786 unix_path=`$CYGPATH -u "$windows_path"`
38801 38787 new_path="$unix_path"
38802 38788 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38803 38789 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38804 38790 new_path="$unix_path"
38805 38791 fi
38806 38792
38807 38793 # remove trailing .exe if any
38808 38794 new_path="${new_path/%.exe/}"
38809 38795
38810 38796 # Save the first 10 bytes of this path to the storage, so fixpath can work.
38811 38797 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38812 38798 fi
38813 38799
38814 38800 else
38815 38801 # We're on a unix platform. Hooray! :)
38816 38802 # First separate the path from the arguments. This will split at the first
38817 38803 # space.
38818 38804 complete="$MT"
38819 38805 path="${complete%% *}"
38820 38806 tmp="$complete EOL"
38821 38807 arguments="${tmp#* }"
38822 38808
38823 38809 # Cannot rely on the command "which" here since it doesn't always work.
38824 38810 is_absolute_path=`$ECHO "$path" | $GREP ^/`
38825 38811 if test -z "$is_absolute_path"; then
38826 38812 # Path to executable is not absolute. Find it.
38827 38813 IFS_save="$IFS"
38828 38814 IFS=:
38829 38815 for p in $PATH; do
38830 38816 if test -f "$p/$path" && test -x "$p/$path"; then
38831 38817 new_path="$p/$path"
38832 38818 break
38833 38819 fi
38834 38820 done
38835 38821 IFS="$IFS_save"
38836 38822 else
38837 38823 # This is an absolute path, we can use it without further modifications.
38838 38824 new_path="$path"
38839 38825 fi
38840 38826
38841 38827 if test "x$new_path" = x; then
38842 38828 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38843 38829 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38844 38830 has_space=`$ECHO "$complete" | $GREP " "`
38845 38831 if test "x$has_space" != x; then
38846 38832 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38847 38833 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38848 38834 fi
38849 38835 as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38850 38836 fi
38851 38837 fi
38852 38838
38853 38839 # Now join together the path and the arguments once again
38854 38840 if test "x$arguments" != xEOL; then
38855 38841 new_complete="$new_path ${arguments% *}"
38856 38842 else
38857 38843 new_complete="$new_path"
38858 38844 fi
38859 38845
38860 38846 if test "x$complete" != "x$new_complete"; then
38861 38847 MT="$new_complete"
38862 38848 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38863 38849 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38864 38850 fi
38865 38851 fi
38866 38852
38867 38853 # Setup the resource compiler (RC)
38868 38854 # Extract the first word of "rc", so it can be a program name with args.
38869 38855 set dummy rc; ac_word=$2
38870 38856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38871 38857 $as_echo_n "checking for $ac_word... " >&6; }
38872 38858 if ${ac_cv_prog_RC+:} false; then :
38873 38859 $as_echo_n "(cached) " >&6
38874 38860 else
38875 38861 if test -n "$RC"; then
38876 38862 ac_cv_prog_RC="$RC" # Let the user override the test.
38877 38863 else
38878 38864 ac_prog_rejected=no
38879 38865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38880 38866 for as_dir in $PATH
38881 38867 do
38882 38868 IFS=$as_save_IFS
38883 38869 test -z "$as_dir" && as_dir=.
38884 38870 for ac_exec_ext in '' $ac_executable_extensions; do
38885 38871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38886 38872 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38887 38873 ac_prog_rejected=yes
38888 38874 continue
38889 38875 fi
38890 38876 ac_cv_prog_RC="rc"
38891 38877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38892 38878 break 2
38893 38879 fi
38894 38880 done
38895 38881 done
38896 38882 IFS=$as_save_IFS
38897 38883
38898 38884 if test $ac_prog_rejected = yes; then
38899 38885 # We found a bogon in the path, so make sure we never use it.
38900 38886 set dummy $ac_cv_prog_RC
38901 38887 shift
38902 38888 if test $# != 0; then
38903 38889 # We chose a different compiler from the bogus one.
38904 38890 # However, it has the same basename, so the bogon will be chosen
38905 38891 # first if we set RC to just the basename; use the full file name.
38906 38892 shift
38907 38893 ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38908 38894 fi
38909 38895 fi
38910 38896 fi
38911 38897 fi
38912 38898 RC=$ac_cv_prog_RC
38913 38899 if test -n "$RC"; then
38914 38900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38915 38901 $as_echo "$RC" >&6; }
38916 38902 else
38917 38903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38918 38904 $as_echo "no" >&6; }
38919 38905 fi
38920 38906
38921 38907
38922 38908
38923 38909 # Only process if variable expands to non-empty
38924 38910
38925 38911 if test "x$RC" != x; then
38926 38912 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38927 38913
38928 38914 # First separate the path from the arguments. This will split at the first
38929 38915 # space.
38930 38916 complete="$RC"
38931 38917 path="${complete%% *}"
38932 38918 tmp="$complete EOL"
38933 38919 arguments="${tmp#* }"
38934 38920
38935 38921 # Input might be given as Windows format, start by converting to
38936 38922 # unix format.
38937 38923 new_path=`$CYGPATH -u "$path"`
38938 38924
38939 38925 # Now try to locate executable using which
38940 38926 new_path=`$WHICH "$new_path" 2> /dev/null`
38941 38927 # bat and cmd files are not always considered executable in cygwin causing which
38942 38928 # to not find them
38943 38929 if test "x$new_path" = x \
38944 38930 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38945 38931 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38946 38932 new_path=`$CYGPATH -u "$path"`
38947 38933 fi
38948 38934 if test "x$new_path" = x; then
38949 38935 # Oops. Which didn't find the executable.
38950 38936 # The splitting of arguments from the executable at a space might have been incorrect,
38951 38937 # since paths with space are more likely in Windows. Give it another try with the whole
38952 38938 # argument.
38953 38939 path="$complete"
38954 38940 arguments="EOL"
38955 38941 new_path=`$CYGPATH -u "$path"`
38956 38942 new_path=`$WHICH "$new_path" 2> /dev/null`
38957 38943 # bat and cmd files are not always considered executable in cygwin causing which
38958 38944 # to not find them
38959 38945 if test "x$new_path" = x \
38960 38946 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38961 38947 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38962 38948 new_path=`$CYGPATH -u "$path"`
38963 38949 fi
38964 38950 if test "x$new_path" = x; then
38965 38951 # It's still not found. Now this is an unrecoverable error.
38966 38952 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38967 38953 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38968 38954 has_space=`$ECHO "$complete" | $GREP " "`
38969 38955 if test "x$has_space" != x; then
38970 38956 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38971 38957 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38972 38958 fi
38973 38959 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38974 38960 fi
38975 38961 fi
38976 38962
38977 38963 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38978 38964 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38979 38965 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38980 38966 # "foo.exe" is OK but "foo" is an error.
38981 38967 #
38982 38968 # This test is therefore slightly more accurate than "test -f" to check for file presence.
38983 38969 # It is also a way to make sure we got the proper file name for the real test later on.
38984 38970 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38985 38971 if test "x$test_shortpath" = x; then
38986 38972 # Short path failed, file does not exist as specified.
38987 38973 # Try adding .exe or .cmd
38988 38974 if test -f "${new_path}.exe"; then
38989 38975 input_to_shortpath="${new_path}.exe"
38990 38976 elif test -f "${new_path}.cmd"; then
38991 38977 input_to_shortpath="${new_path}.cmd"
38992 38978 else
38993 38979 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38994 38980 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38995 38981 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38996 38982 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38997 38983 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38998 38984 fi
38999 38985 else
39000 38986 input_to_shortpath="$new_path"
39001 38987 fi
39002 38988
39003 38989 # Call helper function which possibly converts this using DOS-style short mode.
39004 38990 # If so, the updated path is stored in $new_path.
39005 38991 new_path="$input_to_shortpath"
39006 38992
39007 38993 input_path="$input_to_shortpath"
39008 38994 # Check if we need to convert this using DOS-style short mode. If the path
39009 38995 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39010 38996 # take no chances and rewrite it.
39011 38997 # Note: m4 eats our [], so we need to use [ and ] instead.
39012 38998 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39013 38999 if test "x$has_forbidden_chars" != x; then
39014 39000 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39015 39001 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39016 39002 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39017 39003 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39018 39004 # Going to short mode and back again did indeed matter. Since short mode is
39019 39005 # case insensitive, let's make it lowercase to improve readability.
39020 39006 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39021 39007 # Now convert it back to Unix-style (cygpath)
39022 39008 input_path=`$CYGPATH -u "$shortmode_path"`
39023 39009 new_path="$input_path"
39024 39010 fi
39025 39011 fi
39026 39012
39027 39013 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39028 39014 if test "x$test_cygdrive_prefix" = x; then
39029 39015 # As a simple fix, exclude /usr/bin since it's not a real path.
39030 39016 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39031 39017 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39032 39018 # a path prefixed by /cygdrive for fixpath to work.
39033 39019 new_path="$CYGWIN_ROOT_PATH$input_path"
39034 39020 fi
39035 39021 fi
39036 39022
39037 39023 # remove trailing .exe if any
39038 39024 new_path="${new_path/%.exe/}"
39039 39025
39040 39026 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39041 39027
39042 39028 # First separate the path from the arguments. This will split at the first
39043 39029 # space.
39044 39030 complete="$RC"
39045 39031 path="${complete%% *}"
39046 39032 tmp="$complete EOL"
39047 39033 arguments="${tmp#* }"
39048 39034
39049 39035 # Input might be given as Windows format, start by converting to
39050 39036 # unix format.
39051 39037 new_path="$path"
39052 39038
39053 39039 windows_path="$new_path"
39054 39040 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39055 39041 unix_path=`$CYGPATH -u "$windows_path"`
39056 39042 new_path="$unix_path"
39057 39043 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39058 39044 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39059 39045 new_path="$unix_path"
39060 39046 fi
39061 39047
39062 39048
39063 39049 # Now try to locate executable using which
39064 39050 new_path=`$WHICH "$new_path" 2> /dev/null`
39065 39051
39066 39052 if test "x$new_path" = x; then
39067 39053 # Oops. Which didn't find the executable.
39068 39054 # The splitting of arguments from the executable at a space might have been incorrect,
39069 39055 # since paths with space are more likely in Windows. Give it another try with the whole
39070 39056 # argument.
39071 39057 path="$complete"
39072 39058 arguments="EOL"
39073 39059 new_path="$path"
39074 39060
39075 39061 windows_path="$new_path"
39076 39062 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39077 39063 unix_path=`$CYGPATH -u "$windows_path"`
39078 39064 new_path="$unix_path"
39079 39065 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39080 39066 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39081 39067 new_path="$unix_path"
39082 39068 fi
39083 39069
39084 39070
39085 39071 new_path=`$WHICH "$new_path" 2> /dev/null`
39086 39072 # bat and cmd files are not always considered executable in MSYS causing which
39087 39073 # to not find them
39088 39074 if test "x$new_path" = x \
39089 39075 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39090 39076 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39091 39077 new_path="$path"
39092 39078
39093 39079 windows_path="$new_path"
39094 39080 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39095 39081 unix_path=`$CYGPATH -u "$windows_path"`
39096 39082 new_path="$unix_path"
39097 39083 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39098 39084 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39099 39085 new_path="$unix_path"
39100 39086 fi
39101 39087
39102 39088 fi
39103 39089
39104 39090 if test "x$new_path" = x; then
39105 39091 # It's still not found. Now this is an unrecoverable error.
39106 39092 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39107 39093 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39108 39094 has_space=`$ECHO "$complete" | $GREP " "`
39109 39095 if test "x$has_space" != x; then
39110 39096 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39111 39097 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39112 39098 fi
39113 39099 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39114 39100 fi
39115 39101 fi
39116 39102
39117 39103 # Now new_path has a complete unix path to the binary
39118 39104 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39119 39105 # Keep paths in /bin as-is, but remove trailing .exe if any
39120 39106 new_path="${new_path/%.exe/}"
39121 39107 # Do not save /bin paths to all_fixpath_prefixes!
39122 39108 else
39123 39109 # Not in mixed or Windows style, start by that.
39124 39110 new_path=`cmd //c echo $new_path`
39125 39111
39126 39112 input_path="$new_path"
39127 39113 # Check if we need to convert this using DOS-style short mode. If the path
39128 39114 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39129 39115 # take no chances and rewrite it.
39130 39116 # Note: m4 eats our [], so we need to use [ and ] instead.
39131 39117 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39132 39118 if test "x$has_forbidden_chars" != x; then
39133 39119 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39134 39120 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39135 39121 fi
39136 39122
39137 39123 # Output is in $new_path
39138 39124
39139 39125 windows_path="$new_path"
39140 39126 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39141 39127 unix_path=`$CYGPATH -u "$windows_path"`
39142 39128 new_path="$unix_path"
39143 39129 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39144 39130 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39145 39131 new_path="$unix_path"
39146 39132 fi
39147 39133
39148 39134 # remove trailing .exe if any
39149 39135 new_path="${new_path/%.exe/}"
39150 39136
39151 39137 # Save the first 10 bytes of this path to the storage, so fixpath can work.
39152 39138 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39153 39139 fi
39154 39140
39155 39141 else
39156 39142 # We're on a unix platform. Hooray! :)
39157 39143 # First separate the path from the arguments. This will split at the first
39158 39144 # space.
39159 39145 complete="$RC"
39160 39146 path="${complete%% *}"
39161 39147 tmp="$complete EOL"
39162 39148 arguments="${tmp#* }"
39163 39149
39164 39150 # Cannot rely on the command "which" here since it doesn't always work.
39165 39151 is_absolute_path=`$ECHO "$path" | $GREP ^/`
39166 39152 if test -z "$is_absolute_path"; then
39167 39153 # Path to executable is not absolute. Find it.
39168 39154 IFS_save="$IFS"
39169 39155 IFS=:
39170 39156 for p in $PATH; do
39171 39157 if test -f "$p/$path" && test -x "$p/$path"; then
39172 39158 new_path="$p/$path"
39173 39159 break
39174 39160 fi
39175 39161 done
39176 39162 IFS="$IFS_save"
39177 39163 else
39178 39164 # This is an absolute path, we can use it without further modifications.
39179 39165 new_path="$path"
39180 39166 fi
39181 39167
39182 39168 if test "x$new_path" = x; then
39183 39169 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39184 39170 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39185 39171 has_space=`$ECHO "$complete" | $GREP " "`
39186 39172 if test "x$has_space" != x; then
39187 39173 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39188 39174 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39189 39175 fi
39190 39176 as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39191 39177 fi
39192 39178 fi
39193 39179
39194 39180 # Now join together the path and the arguments once again
39195 39181 if test "x$arguments" != xEOL; then
39196 39182 new_complete="$new_path ${arguments% *}"
39197 39183 else
39198 39184 new_complete="$new_path"
39199 39185 fi
39200 39186
39201 39187 if test "x$complete" != "x$new_complete"; then
39202 39188 RC="$new_complete"
39203 39189 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39204 39190 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39205 39191 fi
39206 39192 fi
39207 39193
39208 39194 # Extract the first word of "dumpbin", so it can be a program name with args.
39209 39195 set dummy dumpbin; ac_word=$2
39210 39196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39211 39197 $as_echo_n "checking for $ac_word... " >&6; }
39212 39198 if ${ac_cv_prog_DUMPBIN+:} false; then :
39213 39199 $as_echo_n "(cached) " >&6
39214 39200 else
39215 39201 if test -n "$DUMPBIN"; then
39216 39202 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39217 39203 else
39218 39204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39219 39205 for as_dir in $PATH
39220 39206 do
39221 39207 IFS=$as_save_IFS
39222 39208 test -z "$as_dir" && as_dir=.
39223 39209 for ac_exec_ext in '' $ac_executable_extensions; do
39224 39210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39225 39211 ac_cv_prog_DUMPBIN="dumpbin"
39226 39212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39227 39213 break 2
39228 39214 fi
39229 39215 done
39230 39216 done
39231 39217 IFS=$as_save_IFS
39232 39218
39233 39219 fi
39234 39220 fi
39235 39221 DUMPBIN=$ac_cv_prog_DUMPBIN
39236 39222 if test -n "$DUMPBIN"; then
39237 39223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39238 39224 $as_echo "$DUMPBIN" >&6; }
39239 39225 else
39240 39226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39241 39227 $as_echo "no" >&6; }
39242 39228 fi
39243 39229
39244 39230
39245 39231
39246 39232 # Only process if variable expands to non-empty
39247 39233
39248 39234 if test "x$DUMPBIN" != x; then
39249 39235 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39250 39236
39251 39237 # First separate the path from the arguments. This will split at the first
39252 39238 # space.
39253 39239 complete="$DUMPBIN"
39254 39240 path="${complete%% *}"
39255 39241 tmp="$complete EOL"
39256 39242 arguments="${tmp#* }"
39257 39243
39258 39244 # Input might be given as Windows format, start by converting to
39259 39245 # unix format.
39260 39246 new_path=`$CYGPATH -u "$path"`
39261 39247
39262 39248 # Now try to locate executable using which
39263 39249 new_path=`$WHICH "$new_path" 2> /dev/null`
39264 39250 # bat and cmd files are not always considered executable in cygwin causing which
39265 39251 # to not find them
39266 39252 if test "x$new_path" = x \
39267 39253 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39268 39254 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39269 39255 new_path=`$CYGPATH -u "$path"`
39270 39256 fi
39271 39257 if test "x$new_path" = x; then
39272 39258 # Oops. Which didn't find the executable.
39273 39259 # The splitting of arguments from the executable at a space might have been incorrect,
39274 39260 # since paths with space are more likely in Windows. Give it another try with the whole
39275 39261 # argument.
39276 39262 path="$complete"
39277 39263 arguments="EOL"
39278 39264 new_path=`$CYGPATH -u "$path"`
39279 39265 new_path=`$WHICH "$new_path" 2> /dev/null`
39280 39266 # bat and cmd files are not always considered executable in cygwin causing which
39281 39267 # to not find them
39282 39268 if test "x$new_path" = x \
39283 39269 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39284 39270 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39285 39271 new_path=`$CYGPATH -u "$path"`
39286 39272 fi
39287 39273 if test "x$new_path" = x; then
39288 39274 # It's still not found. Now this is an unrecoverable error.
39289 39275 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39290 39276 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39291 39277 has_space=`$ECHO "$complete" | $GREP " "`
39292 39278 if test "x$has_space" != x; then
39293 39279 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39294 39280 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39295 39281 fi
39296 39282 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39297 39283 fi
39298 39284 fi
39299 39285
39300 39286 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39301 39287 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39302 39288 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39303 39289 # "foo.exe" is OK but "foo" is an error.
39304 39290 #
39305 39291 # This test is therefore slightly more accurate than "test -f" to check for file presence.
39306 39292 # It is also a way to make sure we got the proper file name for the real test later on.
39307 39293 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39308 39294 if test "x$test_shortpath" = x; then
39309 39295 # Short path failed, file does not exist as specified.
39310 39296 # Try adding .exe or .cmd
39311 39297 if test -f "${new_path}.exe"; then
39312 39298 input_to_shortpath="${new_path}.exe"
39313 39299 elif test -f "${new_path}.cmd"; then
39314 39300 input_to_shortpath="${new_path}.cmd"
39315 39301 else
39316 39302 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39317 39303 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39318 39304 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39319 39305 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39320 39306 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39321 39307 fi
39322 39308 else
39323 39309 input_to_shortpath="$new_path"
39324 39310 fi
39325 39311
39326 39312 # Call helper function which possibly converts this using DOS-style short mode.
39327 39313 # If so, the updated path is stored in $new_path.
39328 39314 new_path="$input_to_shortpath"
39329 39315
39330 39316 input_path="$input_to_shortpath"
39331 39317 # Check if we need to convert this using DOS-style short mode. If the path
39332 39318 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39333 39319 # take no chances and rewrite it.
39334 39320 # Note: m4 eats our [], so we need to use [ and ] instead.
39335 39321 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39336 39322 if test "x$has_forbidden_chars" != x; then
39337 39323 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39338 39324 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39339 39325 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39340 39326 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39341 39327 # Going to short mode and back again did indeed matter. Since short mode is
39342 39328 # case insensitive, let's make it lowercase to improve readability.
39343 39329 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39344 39330 # Now convert it back to Unix-style (cygpath)
39345 39331 input_path=`$CYGPATH -u "$shortmode_path"`
39346 39332 new_path="$input_path"
39347 39333 fi
39348 39334 fi
39349 39335
39350 39336 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39351 39337 if test "x$test_cygdrive_prefix" = x; then
39352 39338 # As a simple fix, exclude /usr/bin since it's not a real path.
39353 39339 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39354 39340 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39355 39341 # a path prefixed by /cygdrive for fixpath to work.
39356 39342 new_path="$CYGWIN_ROOT_PATH$input_path"
39357 39343 fi
39358 39344 fi
39359 39345
39360 39346 # remove trailing .exe if any
39361 39347 new_path="${new_path/%.exe/}"
39362 39348
39363 39349 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39364 39350
39365 39351 # First separate the path from the arguments. This will split at the first
39366 39352 # space.
39367 39353 complete="$DUMPBIN"
39368 39354 path="${complete%% *}"
39369 39355 tmp="$complete EOL"
39370 39356 arguments="${tmp#* }"
39371 39357
39372 39358 # Input might be given as Windows format, start by converting to
39373 39359 # unix format.
39374 39360 new_path="$path"
39375 39361
39376 39362 windows_path="$new_path"
39377 39363 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39378 39364 unix_path=`$CYGPATH -u "$windows_path"`
39379 39365 new_path="$unix_path"
39380 39366 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39381 39367 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39382 39368 new_path="$unix_path"
39383 39369 fi
39384 39370
39385 39371
39386 39372 # Now try to locate executable using which
39387 39373 new_path=`$WHICH "$new_path" 2> /dev/null`
39388 39374
39389 39375 if test "x$new_path" = x; then
39390 39376 # Oops. Which didn't find the executable.
39391 39377 # The splitting of arguments from the executable at a space might have been incorrect,
39392 39378 # since paths with space are more likely in Windows. Give it another try with the whole
39393 39379 # argument.
39394 39380 path="$complete"
39395 39381 arguments="EOL"
39396 39382 new_path="$path"
39397 39383
39398 39384 windows_path="$new_path"
39399 39385 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39400 39386 unix_path=`$CYGPATH -u "$windows_path"`
39401 39387 new_path="$unix_path"
39402 39388 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39403 39389 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39404 39390 new_path="$unix_path"
39405 39391 fi
39406 39392
39407 39393
39408 39394 new_path=`$WHICH "$new_path" 2> /dev/null`
39409 39395 # bat and cmd files are not always considered executable in MSYS causing which
39410 39396 # to not find them
39411 39397 if test "x$new_path" = x \
39412 39398 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39413 39399 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39414 39400 new_path="$path"
39415 39401
39416 39402 windows_path="$new_path"
39417 39403 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39418 39404 unix_path=`$CYGPATH -u "$windows_path"`
39419 39405 new_path="$unix_path"
39420 39406 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39421 39407 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39422 39408 new_path="$unix_path"
39423 39409 fi
39424 39410
39425 39411 fi
39426 39412
39427 39413 if test "x$new_path" = x; then
39428 39414 # It's still not found. Now this is an unrecoverable error.
39429 39415 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39430 39416 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39431 39417 has_space=`$ECHO "$complete" | $GREP " "`
39432 39418 if test "x$has_space" != x; then
39433 39419 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39434 39420 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39435 39421 fi
39436 39422 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39437 39423 fi
39438 39424 fi
39439 39425
39440 39426 # Now new_path has a complete unix path to the binary
39441 39427 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39442 39428 # Keep paths in /bin as-is, but remove trailing .exe if any
39443 39429 new_path="${new_path/%.exe/}"
39444 39430 # Do not save /bin paths to all_fixpath_prefixes!
39445 39431 else
39446 39432 # Not in mixed or Windows style, start by that.
39447 39433 new_path=`cmd //c echo $new_path`
39448 39434
39449 39435 input_path="$new_path"
39450 39436 # Check if we need to convert this using DOS-style short mode. If the path
39451 39437 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39452 39438 # take no chances and rewrite it.
39453 39439 # Note: m4 eats our [], so we need to use [ and ] instead.
39454 39440 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39455 39441 if test "x$has_forbidden_chars" != x; then
39456 39442 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39457 39443 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39458 39444 fi
39459 39445
39460 39446 # Output is in $new_path
39461 39447
39462 39448 windows_path="$new_path"
39463 39449 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39464 39450 unix_path=`$CYGPATH -u "$windows_path"`
39465 39451 new_path="$unix_path"
39466 39452 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39467 39453 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39468 39454 new_path="$unix_path"
39469 39455 fi
39470 39456
39471 39457 # remove trailing .exe if any
39472 39458 new_path="${new_path/%.exe/}"
39473 39459
39474 39460 # Save the first 10 bytes of this path to the storage, so fixpath can work.
39475 39461 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39476 39462 fi
39477 39463
39478 39464 else
39479 39465 # We're on a unix platform. Hooray! :)
39480 39466 # First separate the path from the arguments. This will split at the first
39481 39467 # space.
39482 39468 complete="$DUMPBIN"
39483 39469 path="${complete%% *}"
39484 39470 tmp="$complete EOL"
39485 39471 arguments="${tmp#* }"
39486 39472
39487 39473 # Cannot rely on the command "which" here since it doesn't always work.
39488 39474 is_absolute_path=`$ECHO "$path" | $GREP ^/`
39489 39475 if test -z "$is_absolute_path"; then
39490 39476 # Path to executable is not absolute. Find it.
39491 39477 IFS_save="$IFS"
39492 39478 IFS=:
39493 39479 for p in $PATH; do
39494 39480 if test -f "$p/$path" && test -x "$p/$path"; then
39495 39481 new_path="$p/$path"
39496 39482 break
39497 39483 fi
39498 39484 done
39499 39485 IFS="$IFS_save"
39500 39486 else
39501 39487 # This is an absolute path, we can use it without further modifications.
39502 39488 new_path="$path"
39503 39489 fi
39504 39490
39505 39491 if test "x$new_path" = x; then
39506 39492 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39507 39493 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39508 39494 has_space=`$ECHO "$complete" | $GREP " "`
39509 39495 if test "x$has_space" != x; then
39510 39496 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39511 39497 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39512 39498 fi
39513 39499 as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39514 39500 fi
39515 39501 fi
39516 39502
39517 39503 # Now join together the path and the arguments once again
39518 39504 if test "x$arguments" != xEOL; then
39519 39505 new_complete="$new_path ${arguments% *}"
39520 39506 else
39521 39507 new_complete="$new_path"
39522 39508 fi
39523 39509
39524 39510 if test "x$complete" != "x$new_complete"; then
39525 39511 DUMPBIN="$new_complete"
39526 39512 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39527 39513 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39528 39514 fi
39529 39515 fi
39530 39516
39531 39517 # We need to check for 'msbuild.exe' because at the place where we expect to
39532 39518 # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39533 39519 # won't find the 'msbuild.exe' executable in that case (and the
39534 39520 # 'ac_executable_extensions' is unusable due to performance reasons).
39535 39521 # Notice that we intentionally don't fix up the path to MSBUILD because we
39536 39522 # will call it in a DOS shell during freetype detection on Windows (see
39537 39523 # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39538 39524 # Extract the first word of "msbuild.exe", so it can be a program name with args.
39539 39525 set dummy msbuild.exe; ac_word=$2
39540 39526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39541 39527 $as_echo_n "checking for $ac_word... " >&6; }
39542 39528 if ${ac_cv_prog_MSBUILD+:} false; then :
39543 39529 $as_echo_n "(cached) " >&6
39544 39530 else
39545 39531 if test -n "$MSBUILD"; then
39546 39532 ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39547 39533 else
39548 39534 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39549 39535 for as_dir in $PATH
39550 39536 do
39551 39537 IFS=$as_save_IFS
39552 39538 test -z "$as_dir" && as_dir=.
39553 39539 for ac_exec_ext in '' $ac_executable_extensions; do
39554 39540 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39555 39541 ac_cv_prog_MSBUILD="msbuild.exe"
39556 39542 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39557 39543 break 2
39558 39544 fi
39559 39545 done
39560 39546 done
39561 39547 IFS=$as_save_IFS
39562 39548
39563 39549 fi
39564 39550 fi
39565 39551 MSBUILD=$ac_cv_prog_MSBUILD
39566 39552 if test -n "$MSBUILD"; then
39567 39553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39568 39554 $as_echo "$MSBUILD" >&6; }
39569 39555 else
39570 39556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39571 39557 $as_echo "no" >&6; }
39572 39558 fi
39573 39559
39574 39560
39575 39561 fi
39576 39562
39577 39563 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39578 39564
39579 39565
39580 39566 # Publish this variable in the help.
39581 39567
39582 39568
39583 39569 if [ -z "${STRIP+x}" ]; then
39584 39570 # The variable is not set by user, try to locate tool using the code snippet
39585 39571 for ac_prog in strip
39586 39572 do
39587 39573 # Extract the first word of "$ac_prog", so it can be a program name with args.
39588 39574 set dummy $ac_prog; ac_word=$2
39589 39575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39590 39576 $as_echo_n "checking for $ac_word... " >&6; }
39591 39577 if ${ac_cv_path_STRIP+:} false; then :
39592 39578 $as_echo_n "(cached) " >&6
39593 39579 else
39594 39580 case $STRIP in
39595 39581 [\\/]* | ?:[\\/]*)
39596 39582 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39597 39583 ;;
39598 39584 *)
39599 39585 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39600 39586 for as_dir in $PATH
39601 39587 do
39602 39588 IFS=$as_save_IFS
39603 39589 test -z "$as_dir" && as_dir=.
39604 39590 for ac_exec_ext in '' $ac_executable_extensions; do
39605 39591 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39606 39592 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39607 39593 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39608 39594 break 2
39609 39595 fi
39610 39596 done
39611 39597 done
39612 39598 IFS=$as_save_IFS
39613 39599
39614 39600 ;;
39615 39601 esac
39616 39602 fi
39617 39603 STRIP=$ac_cv_path_STRIP
39618 39604 if test -n "$STRIP"; then
39619 39605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39620 39606 $as_echo "$STRIP" >&6; }
39621 39607 else
39622 39608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39623 39609 $as_echo "no" >&6; }
39624 39610 fi
39625 39611
39626 39612
39627 39613 test -n "$STRIP" && break
39628 39614 done
39629 39615
39630 39616 else
39631 39617 # The variable is set, but is it from the command line or the environment?
39632 39618
39633 39619 # Try to remove the string !STRIP! from our list.
39634 39620 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39635 39621 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39636 39622 # If it failed, the variable was not from the command line. Ignore it,
39637 39623 # but warn the user (except for BASH, which is always set by the calling BASH).
39638 39624 if test "xSTRIP" != xBASH; then
39639 39625 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39640 39626 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39641 39627 fi
39642 39628 # Try to locate tool using the code snippet
39643 39629 for ac_prog in strip
39644 39630 do
39645 39631 # Extract the first word of "$ac_prog", so it can be a program name with args.
39646 39632 set dummy $ac_prog; ac_word=$2
39647 39633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39648 39634 $as_echo_n "checking for $ac_word... " >&6; }
39649 39635 if ${ac_cv_path_STRIP+:} false; then :
39650 39636 $as_echo_n "(cached) " >&6
39651 39637 else
39652 39638 case $STRIP in
39653 39639 [\\/]* | ?:[\\/]*)
39654 39640 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39655 39641 ;;
39656 39642 *)
39657 39643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39658 39644 for as_dir in $PATH
39659 39645 do
39660 39646 IFS=$as_save_IFS
39661 39647 test -z "$as_dir" && as_dir=.
39662 39648 for ac_exec_ext in '' $ac_executable_extensions; do
39663 39649 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39664 39650 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39665 39651 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39666 39652 break 2
39667 39653 fi
39668 39654 done
39669 39655 done
39670 39656 IFS=$as_save_IFS
39671 39657
39672 39658 ;;
39673 39659 esac
39674 39660 fi
39675 39661 STRIP=$ac_cv_path_STRIP
39676 39662 if test -n "$STRIP"; then
39677 39663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39678 39664 $as_echo "$STRIP" >&6; }
39679 39665 else
39680 39666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39681 39667 $as_echo "no" >&6; }
39682 39668 fi
39683 39669
39684 39670
39685 39671 test -n "$STRIP" && break
39686 39672 done
39687 39673
39688 39674 else
39689 39675 # If it succeeded, then it was overridden by the user. We will use it
39690 39676 # for the tool.
39691 39677
39692 39678 # First remove it from the list of overridden variables, so we can test
39693 39679 # for unknown variables in the end.
39694 39680 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39695 39681
39696 39682 # Check if we try to supply an empty value
39697 39683 if test "x$STRIP" = x; then
39698 39684 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39699 39685 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39700 39686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39701 39687 $as_echo_n "checking for STRIP... " >&6; }
39702 39688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39703 39689 $as_echo "disabled" >&6; }
39704 39690 else
39705 39691 # Check if the provided tool contains a complete path.
39706 39692 tool_specified="$STRIP"
39707 39693 tool_basename="${tool_specified##*/}"
39708 39694 if test "x$tool_basename" = "x$tool_specified"; then
39709 39695 # A command without a complete path is provided, search $PATH.
39710 39696 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39711 39697 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39712 39698 # Extract the first word of "$tool_basename", so it can be a program name with args.
39713 39699 set dummy $tool_basename; ac_word=$2
39714 39700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39715 39701 $as_echo_n "checking for $ac_word... " >&6; }
39716 39702 if ${ac_cv_path_STRIP+:} false; then :
39717 39703 $as_echo_n "(cached) " >&6
39718 39704 else
39719 39705 case $STRIP in
39720 39706 [\\/]* | ?:[\\/]*)
39721 39707 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39722 39708 ;;
39723 39709 *)
39724 39710 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39725 39711 for as_dir in $PATH
39726 39712 do
39727 39713 IFS=$as_save_IFS
39728 39714 test -z "$as_dir" && as_dir=.
39729 39715 for ac_exec_ext in '' $ac_executable_extensions; do
39730 39716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39731 39717 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39732 39718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39733 39719 break 2
39734 39720 fi
39735 39721 done
39736 39722 done
39737 39723 IFS=$as_save_IFS
39738 39724
39739 39725 ;;
39740 39726 esac
39741 39727 fi
39742 39728 STRIP=$ac_cv_path_STRIP
39743 39729 if test -n "$STRIP"; then
39744 39730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39745 39731 $as_echo "$STRIP" >&6; }
39746 39732 else
39747 39733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39748 39734 $as_echo "no" >&6; }
39749 39735 fi
39750 39736
39751 39737
39752 39738 if test "x$STRIP" = x; then
39753 39739 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39754 39740 fi
39755 39741 else
39756 39742 # Otherwise we believe it is a complete path. Use it as it is.
39757 39743 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39758 39744 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39759 39745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39760 39746 $as_echo_n "checking for STRIP... " >&6; }
39761 39747 if test ! -x "$tool_specified"; then
39762 39748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39763 39749 $as_echo "not found" >&6; }
39764 39750 as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39765 39751 fi
39766 39752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39767 39753 $as_echo "$tool_specified" >&6; }
39768 39754 fi
39769 39755 fi
39770 39756 fi
39771 39757
39772 39758 fi
39773 39759
39774 39760
39775 39761
39776 39762 # Only process if variable expands to non-empty
39777 39763
39778 39764 if test "x$STRIP" != x; then
39779 39765 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39780 39766
39781 39767 # First separate the path from the arguments. This will split at the first
39782 39768 # space.
39783 39769 complete="$STRIP"
39784 39770 path="${complete%% *}"
39785 39771 tmp="$complete EOL"
39786 39772 arguments="${tmp#* }"
39787 39773
39788 39774 # Input might be given as Windows format, start by converting to
39789 39775 # unix format.
39790 39776 new_path=`$CYGPATH -u "$path"`
39791 39777
39792 39778 # Now try to locate executable using which
39793 39779 new_path=`$WHICH "$new_path" 2> /dev/null`
39794 39780 # bat and cmd files are not always considered executable in cygwin causing which
39795 39781 # to not find them
39796 39782 if test "x$new_path" = x \
39797 39783 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39798 39784 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39799 39785 new_path=`$CYGPATH -u "$path"`
39800 39786 fi
39801 39787 if test "x$new_path" = x; then
39802 39788 # Oops. Which didn't find the executable.
39803 39789 # The splitting of arguments from the executable at a space might have been incorrect,
39804 39790 # since paths with space are more likely in Windows. Give it another try with the whole
39805 39791 # argument.
39806 39792 path="$complete"
39807 39793 arguments="EOL"
39808 39794 new_path=`$CYGPATH -u "$path"`
39809 39795 new_path=`$WHICH "$new_path" 2> /dev/null`
39810 39796 # bat and cmd files are not always considered executable in cygwin causing which
39811 39797 # to not find them
39812 39798 if test "x$new_path" = x \
39813 39799 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39814 39800 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39815 39801 new_path=`$CYGPATH -u "$path"`
39816 39802 fi
39817 39803 if test "x$new_path" = x; then
39818 39804 # It's still not found. Now this is an unrecoverable error.
39819 39805 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39820 39806 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39821 39807 has_space=`$ECHO "$complete" | $GREP " "`
39822 39808 if test "x$has_space" != x; then
39823 39809 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39824 39810 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39825 39811 fi
39826 39812 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39827 39813 fi
39828 39814 fi
39829 39815
39830 39816 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39831 39817 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39832 39818 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39833 39819 # "foo.exe" is OK but "foo" is an error.
39834 39820 #
39835 39821 # This test is therefore slightly more accurate than "test -f" to check for file presence.
39836 39822 # It is also a way to make sure we got the proper file name for the real test later on.
39837 39823 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39838 39824 if test "x$test_shortpath" = x; then
39839 39825 # Short path failed, file does not exist as specified.
39840 39826 # Try adding .exe or .cmd
39841 39827 if test -f "${new_path}.exe"; then
39842 39828 input_to_shortpath="${new_path}.exe"
39843 39829 elif test -f "${new_path}.cmd"; then
39844 39830 input_to_shortpath="${new_path}.cmd"
39845 39831 else
39846 39832 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39847 39833 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39848 39834 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39849 39835 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39850 39836 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39851 39837 fi
39852 39838 else
39853 39839 input_to_shortpath="$new_path"
39854 39840 fi
39855 39841
39856 39842 # Call helper function which possibly converts this using DOS-style short mode.
39857 39843 # If so, the updated path is stored in $new_path.
39858 39844 new_path="$input_to_shortpath"
39859 39845
39860 39846 input_path="$input_to_shortpath"
39861 39847 # Check if we need to convert this using DOS-style short mode. If the path
39862 39848 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39863 39849 # take no chances and rewrite it.
39864 39850 # Note: m4 eats our [], so we need to use [ and ] instead.
39865 39851 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39866 39852 if test "x$has_forbidden_chars" != x; then
39867 39853 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39868 39854 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39869 39855 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39870 39856 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39871 39857 # Going to short mode and back again did indeed matter. Since short mode is
39872 39858 # case insensitive, let's make it lowercase to improve readability.
39873 39859 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39874 39860 # Now convert it back to Unix-style (cygpath)
39875 39861 input_path=`$CYGPATH -u "$shortmode_path"`
39876 39862 new_path="$input_path"
39877 39863 fi
39878 39864 fi
39879 39865
39880 39866 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39881 39867 if test "x$test_cygdrive_prefix" = x; then
39882 39868 # As a simple fix, exclude /usr/bin since it's not a real path.
39883 39869 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39884 39870 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39885 39871 # a path prefixed by /cygdrive for fixpath to work.
39886 39872 new_path="$CYGWIN_ROOT_PATH$input_path"
39887 39873 fi
39888 39874 fi
39889 39875
39890 39876 # remove trailing .exe if any
39891 39877 new_path="${new_path/%.exe/}"
39892 39878
39893 39879 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39894 39880
39895 39881 # First separate the path from the arguments. This will split at the first
39896 39882 # space.
39897 39883 complete="$STRIP"
39898 39884 path="${complete%% *}"
39899 39885 tmp="$complete EOL"
39900 39886 arguments="${tmp#* }"
39901 39887
39902 39888 # Input might be given as Windows format, start by converting to
39903 39889 # unix format.
39904 39890 new_path="$path"
39905 39891
39906 39892 windows_path="$new_path"
39907 39893 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39908 39894 unix_path=`$CYGPATH -u "$windows_path"`
39909 39895 new_path="$unix_path"
39910 39896 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39911 39897 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39912 39898 new_path="$unix_path"
39913 39899 fi
39914 39900
39915 39901
39916 39902 # Now try to locate executable using which
39917 39903 new_path=`$WHICH "$new_path" 2> /dev/null`
39918 39904
39919 39905 if test "x$new_path" = x; then
39920 39906 # Oops. Which didn't find the executable.
39921 39907 # The splitting of arguments from the executable at a space might have been incorrect,
39922 39908 # since paths with space are more likely in Windows. Give it another try with the whole
39923 39909 # argument.
39924 39910 path="$complete"
39925 39911 arguments="EOL"
39926 39912 new_path="$path"
39927 39913
39928 39914 windows_path="$new_path"
39929 39915 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39930 39916 unix_path=`$CYGPATH -u "$windows_path"`
39931 39917 new_path="$unix_path"
39932 39918 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39933 39919 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39934 39920 new_path="$unix_path"
39935 39921 fi
39936 39922
39937 39923
39938 39924 new_path=`$WHICH "$new_path" 2> /dev/null`
39939 39925 # bat and cmd files are not always considered executable in MSYS causing which
39940 39926 # to not find them
39941 39927 if test "x$new_path" = x \
39942 39928 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39943 39929 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39944 39930 new_path="$path"
39945 39931
39946 39932 windows_path="$new_path"
39947 39933 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39948 39934 unix_path=`$CYGPATH -u "$windows_path"`
39949 39935 new_path="$unix_path"
39950 39936 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39951 39937 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39952 39938 new_path="$unix_path"
39953 39939 fi
39954 39940
39955 39941 fi
39956 39942
39957 39943 if test "x$new_path" = x; then
39958 39944 # It's still not found. Now this is an unrecoverable error.
39959 39945 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39960 39946 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39961 39947 has_space=`$ECHO "$complete" | $GREP " "`
39962 39948 if test "x$has_space" != x; then
39963 39949 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39964 39950 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39965 39951 fi
39966 39952 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39967 39953 fi
39968 39954 fi
39969 39955
39970 39956 # Now new_path has a complete unix path to the binary
39971 39957 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39972 39958 # Keep paths in /bin as-is, but remove trailing .exe if any
39973 39959 new_path="${new_path/%.exe/}"
39974 39960 # Do not save /bin paths to all_fixpath_prefixes!
39975 39961 else
39976 39962 # Not in mixed or Windows style, start by that.
39977 39963 new_path=`cmd //c echo $new_path`
39978 39964
39979 39965 input_path="$new_path"
39980 39966 # Check if we need to convert this using DOS-style short mode. If the path
39981 39967 # contains just simple characters, use it. Otherwise (spaces, weird characters),
39982 39968 # take no chances and rewrite it.
39983 39969 # Note: m4 eats our [], so we need to use [ and ] instead.
39984 39970 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39985 39971 if test "x$has_forbidden_chars" != x; then
39986 39972 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39987 39973 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39988 39974 fi
39989 39975
39990 39976 # Output is in $new_path
39991 39977
39992 39978 windows_path="$new_path"
39993 39979 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39994 39980 unix_path=`$CYGPATH -u "$windows_path"`
39995 39981 new_path="$unix_path"
39996 39982 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39997 39983 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39998 39984 new_path="$unix_path"
39999 39985 fi
40000 39986
40001 39987 # remove trailing .exe if any
40002 39988 new_path="${new_path/%.exe/}"
40003 39989
40004 39990 # Save the first 10 bytes of this path to the storage, so fixpath can work.
40005 39991 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40006 39992 fi
40007 39993
40008 39994 else
40009 39995 # We're on a unix platform. Hooray! :)
40010 39996 # First separate the path from the arguments. This will split at the first
40011 39997 # space.
40012 39998 complete="$STRIP"
40013 39999 path="${complete%% *}"
40014 40000 tmp="$complete EOL"
40015 40001 arguments="${tmp#* }"
40016 40002
40017 40003 # Cannot rely on the command "which" here since it doesn't always work.
40018 40004 is_absolute_path=`$ECHO "$path" | $GREP ^/`
40019 40005 if test -z "$is_absolute_path"; then
40020 40006 # Path to executable is not absolute. Find it.
40021 40007 IFS_save="$IFS"
40022 40008 IFS=:
40023 40009 for p in $PATH; do
40024 40010 if test -f "$p/$path" && test -x "$p/$path"; then
40025 40011 new_path="$p/$path"
40026 40012 break
40027 40013 fi
40028 40014 done
40029 40015 IFS="$IFS_save"
40030 40016 else
40031 40017 # This is an absolute path, we can use it without further modifications.
40032 40018 new_path="$path"
40033 40019 fi
40034 40020
40035 40021 if test "x$new_path" = x; then
40036 40022 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40037 40023 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40038 40024 has_space=`$ECHO "$complete" | $GREP " "`
40039 40025 if test "x$has_space" != x; then
40040 40026 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40041 40027 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40042 40028 fi
40043 40029 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40044 40030 fi
40045 40031 fi
40046 40032
40047 40033 # Now join together the path and the arguments once again
40048 40034 if test "x$arguments" != xEOL; then
40049 40035 new_complete="$new_path ${arguments% *}"
40050 40036 else
40051 40037 new_complete="$new_path"
40052 40038 fi
40053 40039
40054 40040 if test "x$complete" != "x$new_complete"; then
40055 40041 STRIP="$new_complete"
40056 40042 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40057 40043 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40058 40044 fi
40059 40045 fi
40060 40046
40061 40047
40062 40048
40063 40049 # Publish this variable in the help.
40064 40050
40065 40051
40066 40052 if [ -z "${NM+x}" ]; then
40067 40053 # The variable is not set by user, try to locate tool using the code snippet
40068 40054 for ac_prog in nm
40069 40055 do
40070 40056 # Extract the first word of "$ac_prog", so it can be a program name with args.
40071 40057 set dummy $ac_prog; ac_word=$2
40072 40058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40073 40059 $as_echo_n "checking for $ac_word... " >&6; }
40074 40060 if ${ac_cv_path_NM+:} false; then :
40075 40061 $as_echo_n "(cached) " >&6
40076 40062 else
40077 40063 case $NM in
40078 40064 [\\/]* | ?:[\\/]*)
40079 40065 ac_cv_path_NM="$NM" # Let the user override the test with a path.
40080 40066 ;;
40081 40067 *)
40082 40068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40083 40069 for as_dir in $PATH
40084 40070 do
40085 40071 IFS=$as_save_IFS
40086 40072 test -z "$as_dir" && as_dir=.
40087 40073 for ac_exec_ext in '' $ac_executable_extensions; do
40088 40074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40089 40075 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40090 40076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40091 40077 break 2
40092 40078 fi
40093 40079 done
40094 40080 done
40095 40081 IFS=$as_save_IFS
40096 40082
40097 40083 ;;
40098 40084 esac
40099 40085 fi
40100 40086 NM=$ac_cv_path_NM
40101 40087 if test -n "$NM"; then
40102 40088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40103 40089 $as_echo "$NM" >&6; }
40104 40090 else
40105 40091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40106 40092 $as_echo "no" >&6; }
40107 40093 fi
40108 40094
40109 40095
40110 40096 test -n "$NM" && break
40111 40097 done
40112 40098
40113 40099 else
40114 40100 # The variable is set, but is it from the command line or the environment?
40115 40101
40116 40102 # Try to remove the string !NM! from our list.
40117 40103 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40118 40104 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40119 40105 # If it failed, the variable was not from the command line. Ignore it,
40120 40106 # but warn the user (except for BASH, which is always set by the calling BASH).
40121 40107 if test "xNM" != xBASH; then
40122 40108 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40123 40109 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40124 40110 fi
40125 40111 # Try to locate tool using the code snippet
40126 40112 for ac_prog in nm
40127 40113 do
40128 40114 # Extract the first word of "$ac_prog", so it can be a program name with args.
40129 40115 set dummy $ac_prog; ac_word=$2
40130 40116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40131 40117 $as_echo_n "checking for $ac_word... " >&6; }
40132 40118 if ${ac_cv_path_NM+:} false; then :
40133 40119 $as_echo_n "(cached) " >&6
40134 40120 else
40135 40121 case $NM in
40136 40122 [\\/]* | ?:[\\/]*)
40137 40123 ac_cv_path_NM="$NM" # Let the user override the test with a path.
40138 40124 ;;
40139 40125 *)
40140 40126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40141 40127 for as_dir in $PATH
40142 40128 do
40143 40129 IFS=$as_save_IFS
40144 40130 test -z "$as_dir" && as_dir=.
40145 40131 for ac_exec_ext in '' $ac_executable_extensions; do
40146 40132 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40147 40133 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40148 40134 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40149 40135 break 2
40150 40136 fi
40151 40137 done
40152 40138 done
40153 40139 IFS=$as_save_IFS
40154 40140
40155 40141 ;;
40156 40142 esac
40157 40143 fi
40158 40144 NM=$ac_cv_path_NM
40159 40145 if test -n "$NM"; then
40160 40146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40161 40147 $as_echo "$NM" >&6; }
40162 40148 else
40163 40149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40164 40150 $as_echo "no" >&6; }
40165 40151 fi
40166 40152
40167 40153
40168 40154 test -n "$NM" && break
40169 40155 done
40170 40156
40171 40157 else
40172 40158 # If it succeeded, then it was overridden by the user. We will use it
40173 40159 # for the tool.
40174 40160
40175 40161 # First remove it from the list of overridden variables, so we can test
40176 40162 # for unknown variables in the end.
40177 40163 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40178 40164
40179 40165 # Check if we try to supply an empty value
40180 40166 if test "x$NM" = x; then
40181 40167 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40182 40168 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40183 40169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40184 40170 $as_echo_n "checking for NM... " >&6; }
40185 40171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40186 40172 $as_echo "disabled" >&6; }
40187 40173 else
40188 40174 # Check if the provided tool contains a complete path.
40189 40175 tool_specified="$NM"
40190 40176 tool_basename="${tool_specified##*/}"
40191 40177 if test "x$tool_basename" = "x$tool_specified"; then
40192 40178 # A command without a complete path is provided, search $PATH.
40193 40179 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40194 40180 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40195 40181 # Extract the first word of "$tool_basename", so it can be a program name with args.
40196 40182 set dummy $tool_basename; ac_word=$2
40197 40183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40198 40184 $as_echo_n "checking for $ac_word... " >&6; }
40199 40185 if ${ac_cv_path_NM+:} false; then :
40200 40186 $as_echo_n "(cached) " >&6
40201 40187 else
40202 40188 case $NM in
40203 40189 [\\/]* | ?:[\\/]*)
40204 40190 ac_cv_path_NM="$NM" # Let the user override the test with a path.
40205 40191 ;;
40206 40192 *)
40207 40193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40208 40194 for as_dir in $PATH
40209 40195 do
40210 40196 IFS=$as_save_IFS
40211 40197 test -z "$as_dir" && as_dir=.
40212 40198 for ac_exec_ext in '' $ac_executable_extensions; do
40213 40199 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40214 40200 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40215 40201 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40216 40202 break 2
40217 40203 fi
40218 40204 done
40219 40205 done
40220 40206 IFS=$as_save_IFS
40221 40207
40222 40208 ;;
40223 40209 esac
40224 40210 fi
40225 40211 NM=$ac_cv_path_NM
40226 40212 if test -n "$NM"; then
40227 40213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40228 40214 $as_echo "$NM" >&6; }
40229 40215 else
40230 40216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40231 40217 $as_echo "no" >&6; }
40232 40218 fi
40233 40219
40234 40220
40235 40221 if test "x$NM" = x; then
40236 40222 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40237 40223 fi
40238 40224 else
40239 40225 # Otherwise we believe it is a complete path. Use it as it is.
40240 40226 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40241 40227 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40242 40228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40243 40229 $as_echo_n "checking for NM... " >&6; }
40244 40230 if test ! -x "$tool_specified"; then
40245 40231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40246 40232 $as_echo "not found" >&6; }
40247 40233 as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40248 40234 fi
40249 40235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40250 40236 $as_echo "$tool_specified" >&6; }
40251 40237 fi
40252 40238 fi
40253 40239 fi
40254 40240
40255 40241 fi
40256 40242
40257 40243
40258 40244
40259 40245 # Only process if variable expands to non-empty
40260 40246
40261 40247 if test "x$NM" != x; then
40262 40248 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40263 40249
40264 40250 # First separate the path from the arguments. This will split at the first
40265 40251 # space.
40266 40252 complete="$NM"
40267 40253 path="${complete%% *}"
40268 40254 tmp="$complete EOL"
40269 40255 arguments="${tmp#* }"
40270 40256
40271 40257 # Input might be given as Windows format, start by converting to
40272 40258 # unix format.
40273 40259 new_path=`$CYGPATH -u "$path"`
40274 40260
40275 40261 # Now try to locate executable using which
40276 40262 new_path=`$WHICH "$new_path" 2> /dev/null`
40277 40263 # bat and cmd files are not always considered executable in cygwin causing which
40278 40264 # to not find them
40279 40265 if test "x$new_path" = x \
40280 40266 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40281 40267 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40282 40268 new_path=`$CYGPATH -u "$path"`
40283 40269 fi
40284 40270 if test "x$new_path" = x; then
40285 40271 # Oops. Which didn't find the executable.
40286 40272 # The splitting of arguments from the executable at a space might have been incorrect,
40287 40273 # since paths with space are more likely in Windows. Give it another try with the whole
40288 40274 # argument.
40289 40275 path="$complete"
40290 40276 arguments="EOL"
40291 40277 new_path=`$CYGPATH -u "$path"`
40292 40278 new_path=`$WHICH "$new_path" 2> /dev/null`
40293 40279 # bat and cmd files are not always considered executable in cygwin causing which
40294 40280 # to not find them
40295 40281 if test "x$new_path" = x \
40296 40282 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40297 40283 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40298 40284 new_path=`$CYGPATH -u "$path"`
40299 40285 fi
40300 40286 if test "x$new_path" = x; then
40301 40287 # It's still not found. Now this is an unrecoverable error.
40302 40288 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40303 40289 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40304 40290 has_space=`$ECHO "$complete" | $GREP " "`
40305 40291 if test "x$has_space" != x; then
40306 40292 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40307 40293 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40308 40294 fi
40309 40295 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40310 40296 fi
40311 40297 fi
40312 40298
40313 40299 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40314 40300 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40315 40301 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40316 40302 # "foo.exe" is OK but "foo" is an error.
40317 40303 #
40318 40304 # This test is therefore slightly more accurate than "test -f" to check for file presence.
40319 40305 # It is also a way to make sure we got the proper file name for the real test later on.
40320 40306 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40321 40307 if test "x$test_shortpath" = x; then
40322 40308 # Short path failed, file does not exist as specified.
40323 40309 # Try adding .exe or .cmd
40324 40310 if test -f "${new_path}.exe"; then
40325 40311 input_to_shortpath="${new_path}.exe"
40326 40312 elif test -f "${new_path}.cmd"; then
40327 40313 input_to_shortpath="${new_path}.cmd"
40328 40314 else
40329 40315 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40330 40316 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40331 40317 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40332 40318 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40333 40319 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40334 40320 fi
40335 40321 else
40336 40322 input_to_shortpath="$new_path"
40337 40323 fi
40338 40324
40339 40325 # Call helper function which possibly converts this using DOS-style short mode.
40340 40326 # If so, the updated path is stored in $new_path.
40341 40327 new_path="$input_to_shortpath"
40342 40328
40343 40329 input_path="$input_to_shortpath"
40344 40330 # Check if we need to convert this using DOS-style short mode. If the path
40345 40331 # contains just simple characters, use it. Otherwise (spaces, weird characters),
40346 40332 # take no chances and rewrite it.
40347 40333 # Note: m4 eats our [], so we need to use [ and ] instead.
40348 40334 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40349 40335 if test "x$has_forbidden_chars" != x; then
40350 40336 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40351 40337 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40352 40338 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40353 40339 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40354 40340 # Going to short mode and back again did indeed matter. Since short mode is
40355 40341 # case insensitive, let's make it lowercase to improve readability.
40356 40342 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40357 40343 # Now convert it back to Unix-style (cygpath)
40358 40344 input_path=`$CYGPATH -u "$shortmode_path"`
40359 40345 new_path="$input_path"
40360 40346 fi
40361 40347 fi
40362 40348
40363 40349 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40364 40350 if test "x$test_cygdrive_prefix" = x; then
40365 40351 # As a simple fix, exclude /usr/bin since it's not a real path.
40366 40352 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40367 40353 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40368 40354 # a path prefixed by /cygdrive for fixpath to work.
40369 40355 new_path="$CYGWIN_ROOT_PATH$input_path"
40370 40356 fi
40371 40357 fi
40372 40358
40373 40359 # remove trailing .exe if any
40374 40360 new_path="${new_path/%.exe/}"
40375 40361
40376 40362 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40377 40363
40378 40364 # First separate the path from the arguments. This will split at the first
40379 40365 # space.
40380 40366 complete="$NM"
40381 40367 path="${complete%% *}"
40382 40368 tmp="$complete EOL"
40383 40369 arguments="${tmp#* }"
40384 40370
40385 40371 # Input might be given as Windows format, start by converting to
40386 40372 # unix format.
40387 40373 new_path="$path"
40388 40374
40389 40375 windows_path="$new_path"
40390 40376 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40391 40377 unix_path=`$CYGPATH -u "$windows_path"`
40392 40378 new_path="$unix_path"
40393 40379 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40394 40380 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40395 40381 new_path="$unix_path"
40396 40382 fi
40397 40383
40398 40384
40399 40385 # Now try to locate executable using which
40400 40386 new_path=`$WHICH "$new_path" 2> /dev/null`
40401 40387
40402 40388 if test "x$new_path" = x; then
40403 40389 # Oops. Which didn't find the executable.
40404 40390 # The splitting of arguments from the executable at a space might have been incorrect,
40405 40391 # since paths with space are more likely in Windows. Give it another try with the whole
40406 40392 # argument.
40407 40393 path="$complete"
40408 40394 arguments="EOL"
40409 40395 new_path="$path"
40410 40396
40411 40397 windows_path="$new_path"
40412 40398 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40413 40399 unix_path=`$CYGPATH -u "$windows_path"`
40414 40400 new_path="$unix_path"
40415 40401 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40416 40402 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40417 40403 new_path="$unix_path"
40418 40404 fi
40419 40405
40420 40406
40421 40407 new_path=`$WHICH "$new_path" 2> /dev/null`
40422 40408 # bat and cmd files are not always considered executable in MSYS causing which
40423 40409 # to not find them
40424 40410 if test "x$new_path" = x \
40425 40411 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40426 40412 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40427 40413 new_path="$path"
40428 40414
40429 40415 windows_path="$new_path"
40430 40416 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40431 40417 unix_path=`$CYGPATH -u "$windows_path"`
40432 40418 new_path="$unix_path"
40433 40419 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40434 40420 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40435 40421 new_path="$unix_path"
40436 40422 fi
40437 40423
40438 40424 fi
40439 40425
40440 40426 if test "x$new_path" = x; then
40441 40427 # It's still not found. Now this is an unrecoverable error.
40442 40428 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40443 40429 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40444 40430 has_space=`$ECHO "$complete" | $GREP " "`
40445 40431 if test "x$has_space" != x; then
40446 40432 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40447 40433 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40448 40434 fi
40449 40435 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40450 40436 fi
40451 40437 fi
40452 40438
40453 40439 # Now new_path has a complete unix path to the binary
40454 40440 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40455 40441 # Keep paths in /bin as-is, but remove trailing .exe if any
40456 40442 new_path="${new_path/%.exe/}"
40457 40443 # Do not save /bin paths to all_fixpath_prefixes!
40458 40444 else
40459 40445 # Not in mixed or Windows style, start by that.
40460 40446 new_path=`cmd //c echo $new_path`
40461 40447
40462 40448 input_path="$new_path"
40463 40449 # Check if we need to convert this using DOS-style short mode. If the path
40464 40450 # contains just simple characters, use it. Otherwise (spaces, weird characters),
40465 40451 # take no chances and rewrite it.
40466 40452 # Note: m4 eats our [], so we need to use [ and ] instead.
40467 40453 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40468 40454 if test "x$has_forbidden_chars" != x; then
40469 40455 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40470 40456 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40471 40457 fi
40472 40458
40473 40459 # Output is in $new_path
40474 40460
40475 40461 windows_path="$new_path"
40476 40462 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40477 40463 unix_path=`$CYGPATH -u "$windows_path"`
40478 40464 new_path="$unix_path"
40479 40465 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40480 40466 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40481 40467 new_path="$unix_path"
40482 40468 fi
40483 40469
40484 40470 # remove trailing .exe if any
40485 40471 new_path="${new_path/%.exe/}"
40486 40472
40487 40473 # Save the first 10 bytes of this path to the storage, so fixpath can work.
40488 40474 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40489 40475 fi
40490 40476
40491 40477 else
40492 40478 # We're on a unix platform. Hooray! :)
40493 40479 # First separate the path from the arguments. This will split at the first
40494 40480 # space.
40495 40481 complete="$NM"
40496 40482 path="${complete%% *}"
40497 40483 tmp="$complete EOL"
40498 40484 arguments="${tmp#* }"
40499 40485
40500 40486 # Cannot rely on the command "which" here since it doesn't always work.
40501 40487 is_absolute_path=`$ECHO "$path" | $GREP ^/`
40502 40488 if test -z "$is_absolute_path"; then
40503 40489 # Path to executable is not absolute. Find it.
40504 40490 IFS_save="$IFS"
40505 40491 IFS=:
40506 40492 for p in $PATH; do
40507 40493 if test -f "$p/$path" && test -x "$p/$path"; then
40508 40494 new_path="$p/$path"
40509 40495 break
40510 40496 fi
40511 40497 done
40512 40498 IFS="$IFS_save"
40513 40499 else
40514 40500 # This is an absolute path, we can use it without further modifications.
40515 40501 new_path="$path"
40516 40502 fi
40517 40503
40518 40504 if test "x$new_path" = x; then
40519 40505 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40520 40506 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40521 40507 has_space=`$ECHO "$complete" | $GREP " "`
40522 40508 if test "x$has_space" != x; then
40523 40509 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40524 40510 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40525 40511 fi
40526 40512 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40527 40513 fi
40528 40514 fi
40529 40515
40530 40516 # Now join together the path and the arguments once again
40531 40517 if test "x$arguments" != xEOL; then
40532 40518 new_complete="$new_path ${arguments% *}"
40533 40519 else
40534 40520 new_complete="$new_path"
40535 40521 fi
40536 40522
40537 40523 if test "x$complete" != "x$new_complete"; then
40538 40524 NM="$new_complete"
40539 40525 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40540 40526 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40541 40527 fi
40542 40528 fi
40543 40529
40544 40530
40545 40531
40546 40532 # Publish this variable in the help.
40547 40533
40548 40534
40549 40535 if [ -z "${GNM+x}" ]; then
40550 40536 # The variable is not set by user, try to locate tool using the code snippet
40551 40537 for ac_prog in gnm
40552 40538 do
40553 40539 # Extract the first word of "$ac_prog", so it can be a program name with args.
40554 40540 set dummy $ac_prog; ac_word=$2
40555 40541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40556 40542 $as_echo_n "checking for $ac_word... " >&6; }
40557 40543 if ${ac_cv_path_GNM+:} false; then :
40558 40544 $as_echo_n "(cached) " >&6
40559 40545 else
40560 40546 case $GNM in
40561 40547 [\\/]* | ?:[\\/]*)
40562 40548 ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40563 40549 ;;
40564 40550 *)
40565 40551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40566 40552 for as_dir in $PATH
40567 40553 do
40568 40554 IFS=$as_save_IFS
40569 40555 test -z "$as_dir" && as_dir=.
40570 40556 for ac_exec_ext in '' $ac_executable_extensions; do
40571 40557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40572 40558 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40573 40559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40574 40560 break 2
40575 40561 fi
40576 40562 done
40577 40563 done
40578 40564 IFS=$as_save_IFS
40579 40565
40580 40566 ;;
40581 40567 esac
40582 40568 fi
40583 40569 GNM=$ac_cv_path_GNM
40584 40570 if test -n "$GNM"; then
40585 40571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40586 40572 $as_echo "$GNM" >&6; }
40587 40573 else
40588 40574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40589 40575 $as_echo "no" >&6; }
40590 40576 fi
40591 40577
40592 40578
40593 40579 test -n "$GNM" && break
40594 40580 done
40595 40581
40596 40582 else
40597 40583 # The variable is set, but is it from the command line or the environment?
40598 40584
40599 40585 # Try to remove the string !GNM! from our list.
40600 40586 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40601 40587 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40602 40588 # If it failed, the variable was not from the command line. Ignore it,
40603 40589 # but warn the user (except for BASH, which is always set by the calling BASH).
40604 40590 if test "xGNM" != xBASH; then
40605 40591 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40606 40592 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40607 40593 fi
40608 40594 # Try to locate tool using the code snippet
40609 40595 for ac_prog in gnm
40610 40596 do
40611 40597 # Extract the first word of "$ac_prog", so it can be a program name with args.
40612 40598 set dummy $ac_prog; ac_word=$2
40613 40599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40614 40600 $as_echo_n "checking for $ac_word... " >&6; }
40615 40601 if ${ac_cv_path_GNM+:} false; then :
40616 40602 $as_echo_n "(cached) " >&6
40617 40603 else
40618 40604 case $GNM in
40619 40605 [\\/]* | ?:[\\/]*)
40620 40606 ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40621 40607 ;;
40622 40608 *)
40623 40609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40624 40610 for as_dir in $PATH
40625 40611 do
40626 40612 IFS=$as_save_IFS
40627 40613 test -z "$as_dir" && as_dir=.
40628 40614 for ac_exec_ext in '' $ac_executable_extensions; do
40629 40615 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40630 40616 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40631 40617 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40632 40618 break 2
40633 40619 fi
40634 40620 done
40635 40621 done
40636 40622 IFS=$as_save_IFS
40637 40623
40638 40624 ;;
40639 40625 esac
40640 40626 fi
40641 40627 GNM=$ac_cv_path_GNM
40642 40628 if test -n "$GNM"; then
40643 40629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40644 40630 $as_echo "$GNM" >&6; }
40645 40631 else
40646 40632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40647 40633 $as_echo "no" >&6; }
40648 40634 fi
40649 40635
40650 40636
40651 40637 test -n "$GNM" && break
40652 40638 done
40653 40639
40654 40640 else
40655 40641 # If it succeeded, then it was overridden by the user. We will use it
40656 40642 # for the tool.
40657 40643
40658 40644 # First remove it from the list of overridden variables, so we can test
40659 40645 # for unknown variables in the end.
40660 40646 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40661 40647
40662 40648 # Check if we try to supply an empty value
40663 40649 if test "x$GNM" = x; then
40664 40650 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40665 40651 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40666 40652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40667 40653 $as_echo_n "checking for GNM... " >&6; }
40668 40654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40669 40655 $as_echo "disabled" >&6; }
40670 40656 else
40671 40657 # Check if the provided tool contains a complete path.
40672 40658 tool_specified="$GNM"
40673 40659 tool_basename="${tool_specified##*/}"
40674 40660 if test "x$tool_basename" = "x$tool_specified"; then
40675 40661 # A command without a complete path is provided, search $PATH.
40676 40662 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40677 40663 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40678 40664 # Extract the first word of "$tool_basename", so it can be a program name with args.
40679 40665 set dummy $tool_basename; ac_word=$2
40680 40666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40681 40667 $as_echo_n "checking for $ac_word... " >&6; }
40682 40668 if ${ac_cv_path_GNM+:} false; then :
40683 40669 $as_echo_n "(cached) " >&6
40684 40670 else
40685 40671 case $GNM in
40686 40672 [\\/]* | ?:[\\/]*)
40687 40673 ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40688 40674 ;;
40689 40675 *)
40690 40676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40691 40677 for as_dir in $PATH
40692 40678 do
40693 40679 IFS=$as_save_IFS
40694 40680 test -z "$as_dir" && as_dir=.
40695 40681 for ac_exec_ext in '' $ac_executable_extensions; do
40696 40682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40697 40683 ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40698 40684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40699 40685 break 2
40700 40686 fi
40701 40687 done
40702 40688 done
40703 40689 IFS=$as_save_IFS
40704 40690
40705 40691 ;;
40706 40692 esac
40707 40693 fi
40708 40694 GNM=$ac_cv_path_GNM
40709 40695 if test -n "$GNM"; then
40710 40696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40711 40697 $as_echo "$GNM" >&6; }
40712 40698 else
40713 40699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40714 40700 $as_echo "no" >&6; }
40715 40701 fi
40716 40702
40717 40703
40718 40704 if test "x$GNM" = x; then
40719 40705 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40720 40706 fi
40721 40707 else
40722 40708 # Otherwise we believe it is a complete path. Use it as it is.
40723 40709 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40724 40710 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40725 40711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40726 40712 $as_echo_n "checking for GNM... " >&6; }
40727 40713 if test ! -x "$tool_specified"; then
40728 40714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40729 40715 $as_echo "not found" >&6; }
40730 40716 as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40731 40717 fi
40732 40718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40733 40719 $as_echo "$tool_specified" >&6; }
40734 40720 fi
40735 40721 fi
40736 40722 fi
40737 40723
40738 40724 fi
40739 40725
40740 40726
40741 40727
40742 40728 # Only process if variable expands to non-empty
40743 40729
40744 40730 if test "x$GNM" != x; then
40745 40731 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40746 40732
40747 40733 # First separate the path from the arguments. This will split at the first
40748 40734 # space.
40749 40735 complete="$GNM"
40750 40736 path="${complete%% *}"
40751 40737 tmp="$complete EOL"
40752 40738 arguments="${tmp#* }"
40753 40739
40754 40740 # Input might be given as Windows format, start by converting to
40755 40741 # unix format.
40756 40742 new_path=`$CYGPATH -u "$path"`
40757 40743
40758 40744 # Now try to locate executable using which
40759 40745 new_path=`$WHICH "$new_path" 2> /dev/null`
40760 40746 # bat and cmd files are not always considered executable in cygwin causing which
40761 40747 # to not find them
40762 40748 if test "x$new_path" = x \
40763 40749 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40764 40750 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40765 40751 new_path=`$CYGPATH -u "$path"`
40766 40752 fi
40767 40753 if test "x$new_path" = x; then
40768 40754 # Oops. Which didn't find the executable.
40769 40755 # The splitting of arguments from the executable at a space might have been incorrect,
40770 40756 # since paths with space are more likely in Windows. Give it another try with the whole
40771 40757 # argument.
40772 40758 path="$complete"
40773 40759 arguments="EOL"
40774 40760 new_path=`$CYGPATH -u "$path"`
40775 40761 new_path=`$WHICH "$new_path" 2> /dev/null`
40776 40762 # bat and cmd files are not always considered executable in cygwin causing which
40777 40763 # to not find them
40778 40764 if test "x$new_path" = x \
40779 40765 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40780 40766 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40781 40767 new_path=`$CYGPATH -u "$path"`
40782 40768 fi
40783 40769 if test "x$new_path" = x; then
40784 40770 # It's still not found. Now this is an unrecoverable error.
40785 40771 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40786 40772 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40787 40773 has_space=`$ECHO "$complete" | $GREP " "`
40788 40774 if test "x$has_space" != x; then
40789 40775 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40790 40776 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40791 40777 fi
40792 40778 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40793 40779 fi
40794 40780 fi
40795 40781
40796 40782 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40797 40783 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40798 40784 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40799 40785 # "foo.exe" is OK but "foo" is an error.
40800 40786 #
40801 40787 # This test is therefore slightly more accurate than "test -f" to check for file presence.
40802 40788 # It is also a way to make sure we got the proper file name for the real test later on.
40803 40789 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40804 40790 if test "x$test_shortpath" = x; then
40805 40791 # Short path failed, file does not exist as specified.
40806 40792 # Try adding .exe or .cmd
40807 40793 if test -f "${new_path}.exe"; then
40808 40794 input_to_shortpath="${new_path}.exe"
40809 40795 elif test -f "${new_path}.cmd"; then
40810 40796 input_to_shortpath="${new_path}.cmd"
40811 40797 else
40812 40798 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40813 40799 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40814 40800 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40815 40801 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40816 40802 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40817 40803 fi
40818 40804 else
40819 40805 input_to_shortpath="$new_path"
40820 40806 fi
40821 40807
40822 40808 # Call helper function which possibly converts this using DOS-style short mode.
40823 40809 # If so, the updated path is stored in $new_path.
40824 40810 new_path="$input_to_shortpath"
40825 40811
40826 40812 input_path="$input_to_shortpath"
40827 40813 # Check if we need to convert this using DOS-style short mode. If the path
40828 40814 # contains just simple characters, use it. Otherwise (spaces, weird characters),
40829 40815 # take no chances and rewrite it.
40830 40816 # Note: m4 eats our [], so we need to use [ and ] instead.
40831 40817 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40832 40818 if test "x$has_forbidden_chars" != x; then
40833 40819 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40834 40820 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40835 40821 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40836 40822 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40837 40823 # Going to short mode and back again did indeed matter. Since short mode is
40838 40824 # case insensitive, let's make it lowercase to improve readability.
40839 40825 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40840 40826 # Now convert it back to Unix-style (cygpath)
40841 40827 input_path=`$CYGPATH -u "$shortmode_path"`
40842 40828 new_path="$input_path"
40843 40829 fi
40844 40830 fi
40845 40831
40846 40832 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40847 40833 if test "x$test_cygdrive_prefix" = x; then
40848 40834 # As a simple fix, exclude /usr/bin since it's not a real path.
40849 40835 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40850 40836 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40851 40837 # a path prefixed by /cygdrive for fixpath to work.
40852 40838 new_path="$CYGWIN_ROOT_PATH$input_path"
40853 40839 fi
40854 40840 fi
40855 40841
40856 40842 # remove trailing .exe if any
40857 40843 new_path="${new_path/%.exe/}"
40858 40844
40859 40845 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40860 40846
40861 40847 # First separate the path from the arguments. This will split at the first
40862 40848 # space.
40863 40849 complete="$GNM"
40864 40850 path="${complete%% *}"
40865 40851 tmp="$complete EOL"
40866 40852 arguments="${tmp#* }"
40867 40853
40868 40854 # Input might be given as Windows format, start by converting to
40869 40855 # unix format.
40870 40856 new_path="$path"
40871 40857
40872 40858 windows_path="$new_path"
40873 40859 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40874 40860 unix_path=`$CYGPATH -u "$windows_path"`
40875 40861 new_path="$unix_path"
40876 40862 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40877 40863 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40878 40864 new_path="$unix_path"
40879 40865 fi
40880 40866
40881 40867
40882 40868 # Now try to locate executable using which
40883 40869 new_path=`$WHICH "$new_path" 2> /dev/null`
40884 40870
40885 40871 if test "x$new_path" = x; then
40886 40872 # Oops. Which didn't find the executable.
40887 40873 # The splitting of arguments from the executable at a space might have been incorrect,
40888 40874 # since paths with space are more likely in Windows. Give it another try with the whole
40889 40875 # argument.
40890 40876 path="$complete"
40891 40877 arguments="EOL"
40892 40878 new_path="$path"
40893 40879
40894 40880 windows_path="$new_path"
40895 40881 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40896 40882 unix_path=`$CYGPATH -u "$windows_path"`
40897 40883 new_path="$unix_path"
40898 40884 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40899 40885 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40900 40886 new_path="$unix_path"
40901 40887 fi
40902 40888
40903 40889
40904 40890 new_path=`$WHICH "$new_path" 2> /dev/null`
40905 40891 # bat and cmd files are not always considered executable in MSYS causing which
40906 40892 # to not find them
40907 40893 if test "x$new_path" = x \
40908 40894 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40909 40895 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40910 40896 new_path="$path"
40911 40897
40912 40898 windows_path="$new_path"
40913 40899 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40914 40900 unix_path=`$CYGPATH -u "$windows_path"`
40915 40901 new_path="$unix_path"
40916 40902 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40917 40903 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40918 40904 new_path="$unix_path"
40919 40905 fi
40920 40906
40921 40907 fi
40922 40908
40923 40909 if test "x$new_path" = x; then
40924 40910 # It's still not found. Now this is an unrecoverable error.
40925 40911 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40926 40912 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40927 40913 has_space=`$ECHO "$complete" | $GREP " "`
40928 40914 if test "x$has_space" != x; then
40929 40915 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40930 40916 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40931 40917 fi
40932 40918 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40933 40919 fi
40934 40920 fi
40935 40921
40936 40922 # Now new_path has a complete unix path to the binary
40937 40923 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40938 40924 # Keep paths in /bin as-is, but remove trailing .exe if any
40939 40925 new_path="${new_path/%.exe/}"
40940 40926 # Do not save /bin paths to all_fixpath_prefixes!
40941 40927 else
40942 40928 # Not in mixed or Windows style, start by that.
40943 40929 new_path=`cmd //c echo $new_path`
40944 40930
40945 40931 input_path="$new_path"
40946 40932 # Check if we need to convert this using DOS-style short mode. If the path
40947 40933 # contains just simple characters, use it. Otherwise (spaces, weird characters),
40948 40934 # take no chances and rewrite it.
40949 40935 # Note: m4 eats our [], so we need to use [ and ] instead.
40950 40936 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40951 40937 if test "x$has_forbidden_chars" != x; then
40952 40938 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40953 40939 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40954 40940 fi
40955 40941
40956 40942 # Output is in $new_path
40957 40943
40958 40944 windows_path="$new_path"
40959 40945 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40960 40946 unix_path=`$CYGPATH -u "$windows_path"`
40961 40947 new_path="$unix_path"
40962 40948 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40963 40949 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40964 40950 new_path="$unix_path"
40965 40951 fi
40966 40952
40967 40953 # remove trailing .exe if any
40968 40954 new_path="${new_path/%.exe/}"
40969 40955
40970 40956 # Save the first 10 bytes of this path to the storage, so fixpath can work.
40971 40957 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40972 40958 fi
40973 40959
40974 40960 else
40975 40961 # We're on a unix platform. Hooray! :)
40976 40962 # First separate the path from the arguments. This will split at the first
40977 40963 # space.
40978 40964 complete="$GNM"
40979 40965 path="${complete%% *}"
40980 40966 tmp="$complete EOL"
40981 40967 arguments="${tmp#* }"
40982 40968
40983 40969 # Cannot rely on the command "which" here since it doesn't always work.
40984 40970 is_absolute_path=`$ECHO "$path" | $GREP ^/`
40985 40971 if test -z "$is_absolute_path"; then
40986 40972 # Path to executable is not absolute. Find it.
40987 40973 IFS_save="$IFS"
40988 40974 IFS=:
40989 40975 for p in $PATH; do
40990 40976 if test -f "$p/$path" && test -x "$p/$path"; then
40991 40977 new_path="$p/$path"
40992 40978 break
40993 40979 fi
40994 40980 done
40995 40981 IFS="$IFS_save"
40996 40982 else
40997 40983 # This is an absolute path, we can use it without further modifications.
40998 40984 new_path="$path"
40999 40985 fi
41000 40986
41001 40987 if test "x$new_path" = x; then
41002 40988 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41003 40989 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41004 40990 has_space=`$ECHO "$complete" | $GREP " "`
41005 40991 if test "x$has_space" != x; then
41006 40992 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41007 40993 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41008 40994 fi
41009 40995 as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41010 40996 fi
41011 40997 fi
41012 40998
41013 40999 # Now join together the path and the arguments once again
41014 41000 if test "x$arguments" != xEOL; then
41015 41001 new_complete="$new_path ${arguments% *}"
41016 41002 else
41017 41003 new_complete="$new_path"
41018 41004 fi
41019 41005
41020 41006 if test "x$complete" != "x$new_complete"; then
41021 41007 GNM="$new_complete"
41022 41008 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41023 41009 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41024 41010 fi
41025 41011 fi
41026 41012
41027 41013 elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41028 41014 # FIXME: we should unify this with the solaris case above.
41029 41015
41030 41016
41031 41017 # Publish this variable in the help.
41032 41018
41033 41019
41034 41020 if [ -z "${STRIP+x}" ]; then
41035 41021 # The variable is not set by user, try to locate tool using the code snippet
41036 41022 if test -n "$ac_tool_prefix"; then
41037 41023 for ac_prog in strip
41038 41024 do
41039 41025 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41040 41026 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41041 41027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41042 41028 $as_echo_n "checking for $ac_word... " >&6; }
41043 41029 if ${ac_cv_prog_STRIP+:} false; then :
41044 41030 $as_echo_n "(cached) " >&6
41045 41031 else
41046 41032 if test -n "$STRIP"; then
41047 41033 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41048 41034 else
41049 41035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41050 41036 for as_dir in $PATH
41051 41037 do
41052 41038 IFS=$as_save_IFS
41053 41039 test -z "$as_dir" && as_dir=.
41054 41040 for ac_exec_ext in '' $ac_executable_extensions; do
41055 41041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41056 41042 ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41057 41043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41058 41044 break 2
41059 41045 fi
41060 41046 done
41061 41047 done
41062 41048 IFS=$as_save_IFS
41063 41049
41064 41050 fi
41065 41051 fi
41066 41052 STRIP=$ac_cv_prog_STRIP
41067 41053 if test -n "$STRIP"; then
41068 41054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41069 41055 $as_echo "$STRIP" >&6; }
41070 41056 else
41071 41057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41072 41058 $as_echo "no" >&6; }
41073 41059 fi
41074 41060
41075 41061
41076 41062 test -n "$STRIP" && break
41077 41063 done
41078 41064 fi
41079 41065 if test -z "$STRIP"; then
41080 41066 ac_ct_STRIP=$STRIP
41081 41067 for ac_prog in strip
41082 41068 do
41083 41069 # Extract the first word of "$ac_prog", so it can be a program name with args.
41084 41070 set dummy $ac_prog; ac_word=$2
41085 41071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41086 41072 $as_echo_n "checking for $ac_word... " >&6; }
41087 41073 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41088 41074 $as_echo_n "(cached) " >&6
41089 41075 else
41090 41076 if test -n "$ac_ct_STRIP"; then
41091 41077 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41092 41078 else
41093 41079 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41094 41080 for as_dir in $PATH
41095 41081 do
41096 41082 IFS=$as_save_IFS
41097 41083 test -z "$as_dir" && as_dir=.
41098 41084 for ac_exec_ext in '' $ac_executable_extensions; do
41099 41085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41100 41086 ac_cv_prog_ac_ct_STRIP="$ac_prog"
41101 41087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41102 41088 break 2
41103 41089 fi
41104 41090 done
41105 41091 done
41106 41092 IFS=$as_save_IFS
41107 41093
41108 41094 fi
41109 41095 fi
41110 41096 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41111 41097 if test -n "$ac_ct_STRIP"; then
41112 41098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41113 41099 $as_echo "$ac_ct_STRIP" >&6; }
41114 41100 else
41115 41101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41116 41102 $as_echo "no" >&6; }
41117 41103 fi
41118 41104
41119 41105
41120 41106 test -n "$ac_ct_STRIP" && break
41121 41107 done
41122 41108
41123 41109 if test "x$ac_ct_STRIP" = x; then
41124 41110 STRIP=""
41125 41111 else
41126 41112 case $cross_compiling:$ac_tool_warned in
41127 41113 yes:)
41128 41114 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41129 41115 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41130 41116 ac_tool_warned=yes ;;
41131 41117 esac
41132 41118 STRIP=$ac_ct_STRIP
41133 41119 fi
41134 41120 fi
41135 41121
41136 41122 else
41137 41123 # The variable is set, but is it from the command line or the environment?
41138 41124
41139 41125 # Try to remove the string !STRIP! from our list.
41140 41126 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41141 41127 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41142 41128 # If it failed, the variable was not from the command line. Ignore it,
41143 41129 # but warn the user (except for BASH, which is always set by the calling BASH).
41144 41130 if test "xSTRIP" != xBASH; then
41145 41131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41146 41132 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41147 41133 fi
41148 41134 # Try to locate tool using the code snippet
41149 41135 if test -n "$ac_tool_prefix"; then
41150 41136 for ac_prog in strip
41151 41137 do
41152 41138 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41153 41139 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41154 41140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41155 41141 $as_echo_n "checking for $ac_word... " >&6; }
41156 41142 if ${ac_cv_prog_STRIP+:} false; then :
41157 41143 $as_echo_n "(cached) " >&6
41158 41144 else
41159 41145 if test -n "$STRIP"; then
41160 41146 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41161 41147 else
41162 41148 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41163 41149 for as_dir in $PATH
41164 41150 do
41165 41151 IFS=$as_save_IFS
41166 41152 test -z "$as_dir" && as_dir=.
41167 41153 for ac_exec_ext in '' $ac_executable_extensions; do
41168 41154 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41169 41155 ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41170 41156 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41171 41157 break 2
41172 41158 fi
41173 41159 done
41174 41160 done
41175 41161 IFS=$as_save_IFS
41176 41162
41177 41163 fi
41178 41164 fi
41179 41165 STRIP=$ac_cv_prog_STRIP
41180 41166 if test -n "$STRIP"; then
41181 41167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41182 41168 $as_echo "$STRIP" >&6; }
41183 41169 else
41184 41170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41185 41171 $as_echo "no" >&6; }
41186 41172 fi
41187 41173
41188 41174
41189 41175 test -n "$STRIP" && break
41190 41176 done
41191 41177 fi
41192 41178 if test -z "$STRIP"; then
41193 41179 ac_ct_STRIP=$STRIP
41194 41180 for ac_prog in strip
41195 41181 do
41196 41182 # Extract the first word of "$ac_prog", so it can be a program name with args.
41197 41183 set dummy $ac_prog; ac_word=$2
41198 41184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41199 41185 $as_echo_n "checking for $ac_word... " >&6; }
41200 41186 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41201 41187 $as_echo_n "(cached) " >&6
41202 41188 else
41203 41189 if test -n "$ac_ct_STRIP"; then
41204 41190 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41205 41191 else
41206 41192 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41207 41193 for as_dir in $PATH
41208 41194 do
41209 41195 IFS=$as_save_IFS
41210 41196 test -z "$as_dir" && as_dir=.
41211 41197 for ac_exec_ext in '' $ac_executable_extensions; do
41212 41198 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41213 41199 ac_cv_prog_ac_ct_STRIP="$ac_prog"
41214 41200 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41215 41201 break 2
41216 41202 fi
41217 41203 done
41218 41204 done
41219 41205 IFS=$as_save_IFS
41220 41206
41221 41207 fi
41222 41208 fi
41223 41209 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41224 41210 if test -n "$ac_ct_STRIP"; then
41225 41211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41226 41212 $as_echo "$ac_ct_STRIP" >&6; }
41227 41213 else
41228 41214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41229 41215 $as_echo "no" >&6; }
41230 41216 fi
41231 41217
41232 41218
41233 41219 test -n "$ac_ct_STRIP" && break
41234 41220 done
41235 41221
41236 41222 if test "x$ac_ct_STRIP" = x; then
41237 41223 STRIP=""
41238 41224 else
41239 41225 case $cross_compiling:$ac_tool_warned in
41240 41226 yes:)
41241 41227 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41242 41228 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41243 41229 ac_tool_warned=yes ;;
41244 41230 esac
41245 41231 STRIP=$ac_ct_STRIP
41246 41232 fi
41247 41233 fi
41248 41234
41249 41235 else
41250 41236 # If it succeeded, then it was overridden by the user. We will use it
41251 41237 # for the tool.
41252 41238
41253 41239 # First remove it from the list of overridden variables, so we can test
41254 41240 # for unknown variables in the end.
41255 41241 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41256 41242
41257 41243 # Check if we try to supply an empty value
41258 41244 if test "x$STRIP" = x; then
41259 41245 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41260 41246 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41261 41247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41262 41248 $as_echo_n "checking for STRIP... " >&6; }
41263 41249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41264 41250 $as_echo "disabled" >&6; }
41265 41251 else
41266 41252 # Check if the provided tool contains a complete path.
41267 41253 tool_specified="$STRIP"
41268 41254 tool_basename="${tool_specified##*/}"
41269 41255 if test "x$tool_basename" = "x$tool_specified"; then
41270 41256 # A command without a complete path is provided, search $PATH.
41271 41257 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41272 41258 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41273 41259 # Extract the first word of "$tool_basename", so it can be a program name with args.
41274 41260 set dummy $tool_basename; ac_word=$2
41275 41261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41276 41262 $as_echo_n "checking for $ac_word... " >&6; }
41277 41263 if ${ac_cv_path_STRIP+:} false; then :
41278 41264 $as_echo_n "(cached) " >&6
41279 41265 else
41280 41266 case $STRIP in
41281 41267 [\\/]* | ?:[\\/]*)
41282 41268 ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41283 41269 ;;
41284 41270 *)
41285 41271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41286 41272 for as_dir in $PATH
41287 41273 do
41288 41274 IFS=$as_save_IFS
41289 41275 test -z "$as_dir" && as_dir=.
41290 41276 for ac_exec_ext in '' $ac_executable_extensions; do
41291 41277 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41292 41278 ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41293 41279 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41294 41280 break 2
41295 41281 fi
41296 41282 done
41297 41283 done
41298 41284 IFS=$as_save_IFS
41299 41285
41300 41286 ;;
41301 41287 esac
41302 41288 fi
41303 41289 STRIP=$ac_cv_path_STRIP
41304 41290 if test -n "$STRIP"; then
41305 41291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41306 41292 $as_echo "$STRIP" >&6; }
41307 41293 else
41308 41294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41309 41295 $as_echo "no" >&6; }
41310 41296 fi
41311 41297
41312 41298
41313 41299 if test "x$STRIP" = x; then
41314 41300 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41315 41301 fi
41316 41302 else
41317 41303 # Otherwise we believe it is a complete path. Use it as it is.
41318 41304 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41319 41305 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41320 41306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41321 41307 $as_echo_n "checking for STRIP... " >&6; }
41322 41308 if test ! -x "$tool_specified"; then
41323 41309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41324 41310 $as_echo "not found" >&6; }
41325 41311 as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41326 41312 fi
41327 41313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41328 41314 $as_echo "$tool_specified" >&6; }
41329 41315 fi
41330 41316 fi
41331 41317 fi
41332 41318
41333 41319 fi
41334 41320
41335 41321
41336 41322
41337 41323 # Only process if variable expands to non-empty
41338 41324
41339 41325 if test "x$STRIP" != x; then
41340 41326 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41341 41327
41342 41328 # First separate the path from the arguments. This will split at the first
41343 41329 # space.
41344 41330 complete="$STRIP"
41345 41331 path="${complete%% *}"
41346 41332 tmp="$complete EOL"
41347 41333 arguments="${tmp#* }"
41348 41334
41349 41335 # Input might be given as Windows format, start by converting to
41350 41336 # unix format.
41351 41337 new_path=`$CYGPATH -u "$path"`
41352 41338
41353 41339 # Now try to locate executable using which
41354 41340 new_path=`$WHICH "$new_path" 2> /dev/null`
41355 41341 # bat and cmd files are not always considered executable in cygwin causing which
41356 41342 # to not find them
41357 41343 if test "x$new_path" = x \
41358 41344 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41359 41345 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41360 41346 new_path=`$CYGPATH -u "$path"`
41361 41347 fi
41362 41348 if test "x$new_path" = x; then
41363 41349 # Oops. Which didn't find the executable.
41364 41350 # The splitting of arguments from the executable at a space might have been incorrect,
41365 41351 # since paths with space are more likely in Windows. Give it another try with the whole
41366 41352 # argument.
41367 41353 path="$complete"
41368 41354 arguments="EOL"
41369 41355 new_path=`$CYGPATH -u "$path"`
41370 41356 new_path=`$WHICH "$new_path" 2> /dev/null`
41371 41357 # bat and cmd files are not always considered executable in cygwin causing which
41372 41358 # to not find them
41373 41359 if test "x$new_path" = x \
41374 41360 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41375 41361 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41376 41362 new_path=`$CYGPATH -u "$path"`
41377 41363 fi
41378 41364 if test "x$new_path" = x; then
41379 41365 # It's still not found. Now this is an unrecoverable error.
41380 41366 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41381 41367 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41382 41368 has_space=`$ECHO "$complete" | $GREP " "`
41383 41369 if test "x$has_space" != x; then
41384 41370 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41385 41371 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41386 41372 fi
41387 41373 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41388 41374 fi
41389 41375 fi
41390 41376
41391 41377 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41392 41378 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41393 41379 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41394 41380 # "foo.exe" is OK but "foo" is an error.
41395 41381 #
41396 41382 # This test is therefore slightly more accurate than "test -f" to check for file presence.
41397 41383 # It is also a way to make sure we got the proper file name for the real test later on.
41398 41384 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41399 41385 if test "x$test_shortpath" = x; then
41400 41386 # Short path failed, file does not exist as specified.
41401 41387 # Try adding .exe or .cmd
41402 41388 if test -f "${new_path}.exe"; then
41403 41389 input_to_shortpath="${new_path}.exe"
41404 41390 elif test -f "${new_path}.cmd"; then
41405 41391 input_to_shortpath="${new_path}.cmd"
41406 41392 else
41407 41393 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41408 41394 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41409 41395 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41410 41396 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41411 41397 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41412 41398 fi
41413 41399 else
41414 41400 input_to_shortpath="$new_path"
41415 41401 fi
41416 41402
41417 41403 # Call helper function which possibly converts this using DOS-style short mode.
41418 41404 # If so, the updated path is stored in $new_path.
41419 41405 new_path="$input_to_shortpath"
41420 41406
41421 41407 input_path="$input_to_shortpath"
41422 41408 # Check if we need to convert this using DOS-style short mode. If the path
41423 41409 # contains just simple characters, use it. Otherwise (spaces, weird characters),
41424 41410 # take no chances and rewrite it.
41425 41411 # Note: m4 eats our [], so we need to use [ and ] instead.
41426 41412 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41427 41413 if test "x$has_forbidden_chars" != x; then
41428 41414 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41429 41415 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41430 41416 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41431 41417 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41432 41418 # Going to short mode and back again did indeed matter. Since short mode is
41433 41419 # case insensitive, let's make it lowercase to improve readability.
41434 41420 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41435 41421 # Now convert it back to Unix-style (cygpath)
41436 41422 input_path=`$CYGPATH -u "$shortmode_path"`
41437 41423 new_path="$input_path"
41438 41424 fi
41439 41425 fi
41440 41426
41441 41427 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41442 41428 if test "x$test_cygdrive_prefix" = x; then
41443 41429 # As a simple fix, exclude /usr/bin since it's not a real path.
41444 41430 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41445 41431 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41446 41432 # a path prefixed by /cygdrive for fixpath to work.
41447 41433 new_path="$CYGWIN_ROOT_PATH$input_path"
41448 41434 fi
41449 41435 fi
41450 41436
41451 41437 # remove trailing .exe if any
41452 41438 new_path="${new_path/%.exe/}"
41453 41439
41454 41440 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41455 41441
41456 41442 # First separate the path from the arguments. This will split at the first
41457 41443 # space.
41458 41444 complete="$STRIP"
41459 41445 path="${complete%% *}"
41460 41446 tmp="$complete EOL"
41461 41447 arguments="${tmp#* }"
41462 41448
41463 41449 # Input might be given as Windows format, start by converting to
41464 41450 # unix format.
41465 41451 new_path="$path"
41466 41452
41467 41453 windows_path="$new_path"
41468 41454 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41469 41455 unix_path=`$CYGPATH -u "$windows_path"`
41470 41456 new_path="$unix_path"
41471 41457 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41472 41458 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41473 41459 new_path="$unix_path"
41474 41460 fi
41475 41461
41476 41462
41477 41463 # Now try to locate executable using which
41478 41464 new_path=`$WHICH "$new_path" 2> /dev/null`
41479 41465
41480 41466 if test "x$new_path" = x; then
41481 41467 # Oops. Which didn't find the executable.
41482 41468 # The splitting of arguments from the executable at a space might have been incorrect,
41483 41469 # since paths with space are more likely in Windows. Give it another try with the whole
41484 41470 # argument.
41485 41471 path="$complete"
41486 41472 arguments="EOL"
41487 41473 new_path="$path"
41488 41474
41489 41475 windows_path="$new_path"
41490 41476 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41491 41477 unix_path=`$CYGPATH -u "$windows_path"`
41492 41478 new_path="$unix_path"
41493 41479 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41494 41480 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41495 41481 new_path="$unix_path"
41496 41482 fi
41497 41483
41498 41484
41499 41485 new_path=`$WHICH "$new_path" 2> /dev/null`
41500 41486 # bat and cmd files are not always considered executable in MSYS causing which
41501 41487 # to not find them
41502 41488 if test "x$new_path" = x \
41503 41489 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41504 41490 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41505 41491 new_path="$path"
41506 41492
41507 41493 windows_path="$new_path"
41508 41494 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41509 41495 unix_path=`$CYGPATH -u "$windows_path"`
41510 41496 new_path="$unix_path"
41511 41497 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41512 41498 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41513 41499 new_path="$unix_path"
41514 41500 fi
41515 41501
41516 41502 fi
41517 41503
41518 41504 if test "x$new_path" = x; then
41519 41505 # It's still not found. Now this is an unrecoverable error.
41520 41506 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41521 41507 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41522 41508 has_space=`$ECHO "$complete" | $GREP " "`
41523 41509 if test "x$has_space" != x; then
41524 41510 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41525 41511 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41526 41512 fi
41527 41513 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41528 41514 fi
41529 41515 fi
41530 41516
41531 41517 # Now new_path has a complete unix path to the binary
41532 41518 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41533 41519 # Keep paths in /bin as-is, but remove trailing .exe if any
41534 41520 new_path="${new_path/%.exe/}"
41535 41521 # Do not save /bin paths to all_fixpath_prefixes!
41536 41522 else
41537 41523 # Not in mixed or Windows style, start by that.
41538 41524 new_path=`cmd //c echo $new_path`
41539 41525
41540 41526 input_path="$new_path"
41541 41527 # Check if we need to convert this using DOS-style short mode. If the path
41542 41528 # contains just simple characters, use it. Otherwise (spaces, weird characters),
41543 41529 # take no chances and rewrite it.
41544 41530 # Note: m4 eats our [], so we need to use [ and ] instead.
41545 41531 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41546 41532 if test "x$has_forbidden_chars" != x; then
41547 41533 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41548 41534 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41549 41535 fi
41550 41536
41551 41537 # Output is in $new_path
41552 41538
41553 41539 windows_path="$new_path"
41554 41540 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41555 41541 unix_path=`$CYGPATH -u "$windows_path"`
41556 41542 new_path="$unix_path"
41557 41543 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41558 41544 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41559 41545 new_path="$unix_path"
41560 41546 fi
41561 41547
41562 41548 # remove trailing .exe if any
41563 41549 new_path="${new_path/%.exe/}"
41564 41550
41565 41551 # Save the first 10 bytes of this path to the storage, so fixpath can work.
41566 41552 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41567 41553 fi
41568 41554
41569 41555 else
41570 41556 # We're on a unix platform. Hooray! :)
41571 41557 # First separate the path from the arguments. This will split at the first
41572 41558 # space.
41573 41559 complete="$STRIP"
41574 41560 path="${complete%% *}"
41575 41561 tmp="$complete EOL"
41576 41562 arguments="${tmp#* }"
41577 41563
41578 41564 # Cannot rely on the command "which" here since it doesn't always work.
41579 41565 is_absolute_path=`$ECHO "$path" | $GREP ^/`
41580 41566 if test -z "$is_absolute_path"; then
41581 41567 # Path to executable is not absolute. Find it.
41582 41568 IFS_save="$IFS"
41583 41569 IFS=:
41584 41570 for p in $PATH; do
41585 41571 if test -f "$p/$path" && test -x "$p/$path"; then
41586 41572 new_path="$p/$path"
41587 41573 break
41588 41574 fi
41589 41575 done
41590 41576 IFS="$IFS_save"
41591 41577 else
41592 41578 # This is an absolute path, we can use it without further modifications.
41593 41579 new_path="$path"
41594 41580 fi
41595 41581
41596 41582 if test "x$new_path" = x; then
41597 41583 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41598 41584 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41599 41585 has_space=`$ECHO "$complete" | $GREP " "`
41600 41586 if test "x$has_space" != x; then
41601 41587 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41602 41588 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41603 41589 fi
41604 41590 as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41605 41591 fi
41606 41592 fi
41607 41593
41608 41594 # Now join together the path and the arguments once again
41609 41595 if test "x$arguments" != xEOL; then
41610 41596 new_complete="$new_path ${arguments% *}"
41611 41597 else
41612 41598 new_complete="$new_path"
41613 41599 fi
41614 41600
41615 41601 if test "x$complete" != "x$new_complete"; then
41616 41602 STRIP="$new_complete"
41617 41603 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41618 41604 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41619 41605 fi
41620 41606 fi
41621 41607
41622 41608 if test "x$TOOLCHAIN_TYPE" = xgcc; then
41623 41609
41624 41610
41625 41611 # Publish this variable in the help.
41626 41612
41627 41613
41628 41614 if [ -z "${NM+x}" ]; then
41629 41615 # The variable is not set by user, try to locate tool using the code snippet
41630 41616 if test -n "$ac_tool_prefix"; then
41631 41617 for ac_prog in nm gcc-nm
41632 41618 do
41633 41619 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41634 41620 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41635 41621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41636 41622 $as_echo_n "checking for $ac_word... " >&6; }
41637 41623 if ${ac_cv_prog_NM+:} false; then :
41638 41624 $as_echo_n "(cached) " >&6
41639 41625 else
41640 41626 if test -n "$NM"; then
41641 41627 ac_cv_prog_NM="$NM" # Let the user override the test.
41642 41628 else
41643 41629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41644 41630 for as_dir in $PATH
41645 41631 do
41646 41632 IFS=$as_save_IFS
41647 41633 test -z "$as_dir" && as_dir=.
41648 41634 for ac_exec_ext in '' $ac_executable_extensions; do
41649 41635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41650 41636 ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41651 41637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41652 41638 break 2
41653 41639 fi
41654 41640 done
41655 41641 done
41656 41642 IFS=$as_save_IFS
41657 41643
41658 41644 fi
41659 41645 fi
41660 41646 NM=$ac_cv_prog_NM
41661 41647 if test -n "$NM"; then
41662 41648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41663 41649 $as_echo "$NM" >&6; }
41664 41650 else
41665 41651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41666 41652 $as_echo "no" >&6; }
41667 41653 fi
41668 41654
41669 41655
41670 41656 test -n "$NM" && break
41671 41657 done
41672 41658 fi
41673 41659 if test -z "$NM"; then
41674 41660 ac_ct_NM=$NM
41675 41661 for ac_prog in nm gcc-nm
41676 41662 do
41677 41663 # Extract the first word of "$ac_prog", so it can be a program name with args.
41678 41664 set dummy $ac_prog; ac_word=$2
41679 41665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41680 41666 $as_echo_n "checking for $ac_word... " >&6; }
41681 41667 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41682 41668 $as_echo_n "(cached) " >&6
41683 41669 else
41684 41670 if test -n "$ac_ct_NM"; then
41685 41671 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41686 41672 else
41687 41673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41688 41674 for as_dir in $PATH
41689 41675 do
41690 41676 IFS=$as_save_IFS
41691 41677 test -z "$as_dir" && as_dir=.
41692 41678 for ac_exec_ext in '' $ac_executable_extensions; do
41693 41679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41694 41680 ac_cv_prog_ac_ct_NM="$ac_prog"
41695 41681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41696 41682 break 2
41697 41683 fi
41698 41684 done
41699 41685 done
41700 41686 IFS=$as_save_IFS
41701 41687
41702 41688 fi
41703 41689 fi
41704 41690 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41705 41691 if test -n "$ac_ct_NM"; then
41706 41692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41707 41693 $as_echo "$ac_ct_NM" >&6; }
41708 41694 else
41709 41695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41710 41696 $as_echo "no" >&6; }
41711 41697 fi
41712 41698
41713 41699
41714 41700 test -n "$ac_ct_NM" && break
41715 41701 done
41716 41702
41717 41703 if test "x$ac_ct_NM" = x; then
41718 41704 NM=""
41719 41705 else
41720 41706 case $cross_compiling:$ac_tool_warned in
41721 41707 yes:)
41722 41708 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41723 41709 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41724 41710 ac_tool_warned=yes ;;
41725 41711 esac
41726 41712 NM=$ac_ct_NM
41727 41713 fi
41728 41714 fi
41729 41715
41730 41716 else
41731 41717 # The variable is set, but is it from the command line or the environment?
41732 41718
41733 41719 # Try to remove the string !NM! from our list.
41734 41720 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41735 41721 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41736 41722 # If it failed, the variable was not from the command line. Ignore it,
41737 41723 # but warn the user (except for BASH, which is always set by the calling BASH).
41738 41724 if test "xNM" != xBASH; then
41739 41725 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41740 41726 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41741 41727 fi
41742 41728 # Try to locate tool using the code snippet
41743 41729 if test -n "$ac_tool_prefix"; then
41744 41730 for ac_prog in nm gcc-nm
41745 41731 do
41746 41732 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41747 41733 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41748 41734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41749 41735 $as_echo_n "checking for $ac_word... " >&6; }
41750 41736 if ${ac_cv_prog_NM+:} false; then :
41751 41737 $as_echo_n "(cached) " >&6
41752 41738 else
41753 41739 if test -n "$NM"; then
41754 41740 ac_cv_prog_NM="$NM" # Let the user override the test.
41755 41741 else
41756 41742 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41757 41743 for as_dir in $PATH
41758 41744 do
41759 41745 IFS=$as_save_IFS
41760 41746 test -z "$as_dir" && as_dir=.
41761 41747 for ac_exec_ext in '' $ac_executable_extensions; do
41762 41748 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41763 41749 ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41764 41750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41765 41751 break 2
41766 41752 fi
41767 41753 done
41768 41754 done
41769 41755 IFS=$as_save_IFS
41770 41756
41771 41757 fi
41772 41758 fi
41773 41759 NM=$ac_cv_prog_NM
41774 41760 if test -n "$NM"; then
41775 41761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41776 41762 $as_echo "$NM" >&6; }
41777 41763 else
41778 41764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41779 41765 $as_echo "no" >&6; }
41780 41766 fi
41781 41767
41782 41768
41783 41769 test -n "$NM" && break
41784 41770 done
41785 41771 fi
41786 41772 if test -z "$NM"; then
41787 41773 ac_ct_NM=$NM
41788 41774 for ac_prog in nm gcc-nm
41789 41775 do
41790 41776 # Extract the first word of "$ac_prog", so it can be a program name with args.
41791 41777 set dummy $ac_prog; ac_word=$2
41792 41778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41793 41779 $as_echo_n "checking for $ac_word... " >&6; }
41794 41780 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41795 41781 $as_echo_n "(cached) " >&6
41796 41782 else
41797 41783 if test -n "$ac_ct_NM"; then
41798 41784 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41799 41785 else
41800 41786 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41801 41787 for as_dir in $PATH
41802 41788 do
41803 41789 IFS=$as_save_IFS
41804 41790 test -z "$as_dir" && as_dir=.
41805 41791 for ac_exec_ext in '' $ac_executable_extensions; do
41806 41792 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41807 41793 ac_cv_prog_ac_ct_NM="$ac_prog"
41808 41794 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41809 41795 break 2
41810 41796 fi
41811 41797 done
41812 41798 done
41813 41799 IFS=$as_save_IFS
41814 41800
41815 41801 fi
41816 41802 fi
41817 41803 ac_ct_NM=$ac_cv_prog_ac_ct_NM
41818 41804 if test -n "$ac_ct_NM"; then
41819 41805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41820 41806 $as_echo "$ac_ct_NM" >&6; }
41821 41807 else
41822 41808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41823 41809 $as_echo "no" >&6; }
41824 41810 fi
41825 41811
41826 41812
41827 41813 test -n "$ac_ct_NM" && break
41828 41814 done
41829 41815
41830 41816 if test "x$ac_ct_NM" = x; then
41831 41817 NM=""
41832 41818 else
41833 41819 case $cross_compiling:$ac_tool_warned in
41834 41820 yes:)
41835 41821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41836 41822 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41837 41823 ac_tool_warned=yes ;;
41838 41824 esac
41839 41825 NM=$ac_ct_NM
41840 41826 fi
41841 41827 fi
41842 41828
41843 41829 else
41844 41830 # If it succeeded, then it was overridden by the user. We will use it
41845 41831 # for the tool.
41846 41832
41847 41833 # First remove it from the list of overridden variables, so we can test
41848 41834 # for unknown variables in the end.
41849 41835 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41850 41836
41851 41837 # Check if we try to supply an empty value
41852 41838 if test "x$NM" = x; then
41853 41839 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41854 41840 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41855 41841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41856 41842 $as_echo_n "checking for NM... " >&6; }
41857 41843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41858 41844 $as_echo "disabled" >&6; }
41859 41845 else
41860 41846 # Check if the provided tool contains a complete path.
41861 41847 tool_specified="$NM"
41862 41848 tool_basename="${tool_specified##*/}"
41863 41849 if test "x$tool_basename" = "x$tool_specified"; then
41864 41850 # A command without a complete path is provided, search $PATH.
41865 41851 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41866 41852 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41867 41853 # Extract the first word of "$tool_basename", so it can be a program name with args.
41868 41854 set dummy $tool_basename; ac_word=$2
41869 41855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41870 41856 $as_echo_n "checking for $ac_word... " >&6; }
41871 41857 if ${ac_cv_path_NM+:} false; then :
41872 41858 $as_echo_n "(cached) " >&6
41873 41859 else
41874 41860 case $NM in
41875 41861 [\\/]* | ?:[\\/]*)
41876 41862 ac_cv_path_NM="$NM" # Let the user override the test with a path.
41877 41863 ;;
41878 41864 *)
41879 41865 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41880 41866 for as_dir in $PATH
41881 41867 do
41882 41868 IFS=$as_save_IFS
41883 41869 test -z "$as_dir" && as_dir=.
41884 41870 for ac_exec_ext in '' $ac_executable_extensions; do
41885 41871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41886 41872 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41887 41873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41888 41874 break 2
41889 41875 fi
41890 41876 done
41891 41877 done
41892 41878 IFS=$as_save_IFS
41893 41879
41894 41880 ;;
41895 41881 esac
41896 41882 fi
41897 41883 NM=$ac_cv_path_NM
41898 41884 if test -n "$NM"; then
41899 41885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41900 41886 $as_echo "$NM" >&6; }
41901 41887 else
41902 41888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41903 41889 $as_echo "no" >&6; }
41904 41890 fi
41905 41891
41906 41892
41907 41893 if test "x$NM" = x; then
41908 41894 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41909 41895 fi
41910 41896 else
41911 41897 # Otherwise we believe it is a complete path. Use it as it is.
41912 41898 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41913 41899 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41914 41900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41915 41901 $as_echo_n "checking for NM... " >&6; }
41916 41902 if test ! -x "$tool_specified"; then
41917 41903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41918 41904 $as_echo "not found" >&6; }
41919 41905 as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41920 41906 fi
41921 41907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41922 41908 $as_echo "$tool_specified" >&6; }
41923 41909 fi
41924 41910 fi
41925 41911 fi
41926 41912
41927 41913 fi
41928 41914
41929 41915
41930 41916 else
41931 41917
41932 41918
41933 41919 # Publish this variable in the help.
41934 41920
41935 41921
41936 41922 if [ -z "${NM+x}" ]; then
41937 41923 # The variable is not set by user, try to locate tool using the code snippet
41938 41924 if test -n "$ac_tool_prefix"; then
41939 41925 for ac_prog in nm
41940 41926 do
41941 41927 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41942 41928 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41943 41929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41944 41930 $as_echo_n "checking for $ac_word... " >&6; }
41945 41931 if ${ac_cv_prog_NM+:} false; then :
41946 41932 $as_echo_n "(cached) " >&6
41947 41933 else
41948 41934 if test -n "$NM"; then
41949 41935 ac_cv_prog_NM="$NM" # Let the user override the test.
41950 41936 else
41951 41937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41952 41938 for as_dir in $PATH
41953 41939 do
41954 41940 IFS=$as_save_IFS
41955 41941 test -z "$as_dir" && as_dir=.
41956 41942 for ac_exec_ext in '' $ac_executable_extensions; do
41957 41943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41958 41944 ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41959 41945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41960 41946 break 2
41961 41947 fi
41962 41948 done
41963 41949 done
41964 41950 IFS=$as_save_IFS
41965 41951
41966 41952 fi
41967 41953 fi
41968 41954 NM=$ac_cv_prog_NM
41969 41955 if test -n "$NM"; then
41970 41956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41971 41957 $as_echo "$NM" >&6; }
41972 41958 else
41973 41959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41974 41960 $as_echo "no" >&6; }
41975 41961 fi
41976 41962
41977 41963
41978 41964 test -n "$NM" && break
41979 41965 done
41980 41966 fi
41981 41967 if test -z "$NM"; then
41982 41968 ac_ct_NM=$NM
41983 41969 for ac_prog in nm
41984 41970 do
41985 41971 # Extract the first word of "$ac_prog", so it can be a program name with args.
41986 41972 set dummy $ac_prog; ac_word=$2
41987 41973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41988 41974 $as_echo_n "checking for $ac_word... " >&6; }
41989 41975 if ${ac_cv_prog_ac_ct_NM+:} false; then :
41990 41976 $as_echo_n "(cached) " >&6
41991 41977 else
41992 41978 if test -n "$ac_ct_NM"; then
41993 41979 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41994 41980 else
41995 41981 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41996 41982 for as_dir in $PATH
41997 41983 do
41998 41984 IFS=$as_save_IFS
41999 41985 test -z "$as_dir" && as_dir=.
42000 41986 for ac_exec_ext in '' $ac_executable_extensions; do
42001 41987 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42002 41988 ac_cv_prog_ac_ct_NM="$ac_prog"
42003 41989 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42004 41990 break 2
42005 41991 fi
42006 41992 done
42007 41993 done
42008 41994 IFS=$as_save_IFS
42009 41995
42010 41996 fi
42011 41997 fi
42012 41998 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42013 41999 if test -n "$ac_ct_NM"; then
42014 42000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42015 42001 $as_echo "$ac_ct_NM" >&6; }
42016 42002 else
42017 42003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42018 42004 $as_echo "no" >&6; }
42019 42005 fi
42020 42006
42021 42007
42022 42008 test -n "$ac_ct_NM" && break
42023 42009 done
42024 42010
42025 42011 if test "x$ac_ct_NM" = x; then
42026 42012 NM=""
42027 42013 else
42028 42014 case $cross_compiling:$ac_tool_warned in
42029 42015 yes:)
42030 42016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42031 42017 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42032 42018 ac_tool_warned=yes ;;
42033 42019 esac
42034 42020 NM=$ac_ct_NM
42035 42021 fi
42036 42022 fi
42037 42023
42038 42024 else
42039 42025 # The variable is set, but is it from the command line or the environment?
42040 42026
42041 42027 # Try to remove the string !NM! from our list.
42042 42028 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42043 42029 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42044 42030 # If it failed, the variable was not from the command line. Ignore it,
42045 42031 # but warn the user (except for BASH, which is always set by the calling BASH).
42046 42032 if test "xNM" != xBASH; then
42047 42033 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42048 42034 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42049 42035 fi
42050 42036 # Try to locate tool using the code snippet
42051 42037 if test -n "$ac_tool_prefix"; then
42052 42038 for ac_prog in nm
42053 42039 do
42054 42040 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42055 42041 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42056 42042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42057 42043 $as_echo_n "checking for $ac_word... " >&6; }
42058 42044 if ${ac_cv_prog_NM+:} false; then :
42059 42045 $as_echo_n "(cached) " >&6
42060 42046 else
42061 42047 if test -n "$NM"; then
42062 42048 ac_cv_prog_NM="$NM" # Let the user override the test.
42063 42049 else
42064 42050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42065 42051 for as_dir in $PATH
42066 42052 do
42067 42053 IFS=$as_save_IFS
42068 42054 test -z "$as_dir" && as_dir=.
42069 42055 for ac_exec_ext in '' $ac_executable_extensions; do
42070 42056 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42071 42057 ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42072 42058 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42073 42059 break 2
42074 42060 fi
42075 42061 done
42076 42062 done
42077 42063 IFS=$as_save_IFS
42078 42064
42079 42065 fi
42080 42066 fi
42081 42067 NM=$ac_cv_prog_NM
42082 42068 if test -n "$NM"; then
42083 42069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42084 42070 $as_echo "$NM" >&6; }
42085 42071 else
42086 42072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42087 42073 $as_echo "no" >&6; }
42088 42074 fi
42089 42075
42090 42076
42091 42077 test -n "$NM" && break
42092 42078 done
42093 42079 fi
42094 42080 if test -z "$NM"; then
42095 42081 ac_ct_NM=$NM
42096 42082 for ac_prog in nm
42097 42083 do
42098 42084 # Extract the first word of "$ac_prog", so it can be a program name with args.
42099 42085 set dummy $ac_prog; ac_word=$2
42100 42086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42101 42087 $as_echo_n "checking for $ac_word... " >&6; }
42102 42088 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42103 42089 $as_echo_n "(cached) " >&6
42104 42090 else
42105 42091 if test -n "$ac_ct_NM"; then
42106 42092 ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42107 42093 else
42108 42094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42109 42095 for as_dir in $PATH
42110 42096 do
42111 42097 IFS=$as_save_IFS
42112 42098 test -z "$as_dir" && as_dir=.
42113 42099 for ac_exec_ext in '' $ac_executable_extensions; do
42114 42100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42115 42101 ac_cv_prog_ac_ct_NM="$ac_prog"
42116 42102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42117 42103 break 2
42118 42104 fi
42119 42105 done
42120 42106 done
42121 42107 IFS=$as_save_IFS
42122 42108
42123 42109 fi
42124 42110 fi
42125 42111 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42126 42112 if test -n "$ac_ct_NM"; then
42127 42113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42128 42114 $as_echo "$ac_ct_NM" >&6; }
42129 42115 else
42130 42116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42131 42117 $as_echo "no" >&6; }
42132 42118 fi
42133 42119
42134 42120
42135 42121 test -n "$ac_ct_NM" && break
42136 42122 done
42137 42123
42138 42124 if test "x$ac_ct_NM" = x; then
42139 42125 NM=""
42140 42126 else
42141 42127 case $cross_compiling:$ac_tool_warned in
42142 42128 yes:)
42143 42129 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42144 42130 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42145 42131 ac_tool_warned=yes ;;
42146 42132 esac
42147 42133 NM=$ac_ct_NM
42148 42134 fi
42149 42135 fi
42150 42136
42151 42137 else
42152 42138 # If it succeeded, then it was overridden by the user. We will use it
42153 42139 # for the tool.
42154 42140
42155 42141 # First remove it from the list of overridden variables, so we can test
42156 42142 # for unknown variables in the end.
42157 42143 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42158 42144
42159 42145 # Check if we try to supply an empty value
42160 42146 if test "x$NM" = x; then
42161 42147 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42162 42148 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42163 42149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42164 42150 $as_echo_n "checking for NM... " >&6; }
42165 42151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42166 42152 $as_echo "disabled" >&6; }
42167 42153 else
42168 42154 # Check if the provided tool contains a complete path.
42169 42155 tool_specified="$NM"
42170 42156 tool_basename="${tool_specified##*/}"
42171 42157 if test "x$tool_basename" = "x$tool_specified"; then
42172 42158 # A command without a complete path is provided, search $PATH.
42173 42159 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42174 42160 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42175 42161 # Extract the first word of "$tool_basename", so it can be a program name with args.
42176 42162 set dummy $tool_basename; ac_word=$2
42177 42163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42178 42164 $as_echo_n "checking for $ac_word... " >&6; }
42179 42165 if ${ac_cv_path_NM+:} false; then :
42180 42166 $as_echo_n "(cached) " >&6
42181 42167 else
42182 42168 case $NM in
42183 42169 [\\/]* | ?:[\\/]*)
42184 42170 ac_cv_path_NM="$NM" # Let the user override the test with a path.
42185 42171 ;;
42186 42172 *)
42187 42173 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42188 42174 for as_dir in $PATH
42189 42175 do
42190 42176 IFS=$as_save_IFS
42191 42177 test -z "$as_dir" && as_dir=.
42192 42178 for ac_exec_ext in '' $ac_executable_extensions; do
42193 42179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42194 42180 ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42195 42181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42196 42182 break 2
42197 42183 fi
42198 42184 done
42199 42185 done
42200 42186 IFS=$as_save_IFS
42201 42187
42202 42188 ;;
42203 42189 esac
42204 42190 fi
42205 42191 NM=$ac_cv_path_NM
42206 42192 if test -n "$NM"; then
42207 42193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42208 42194 $as_echo "$NM" >&6; }
42209 42195 else
42210 42196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42211 42197 $as_echo "no" >&6; }
42212 42198 fi
42213 42199
42214 42200
42215 42201 if test "x$NM" = x; then
42216 42202 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42217 42203 fi
42218 42204 else
42219 42205 # Otherwise we believe it is a complete path. Use it as it is.
42220 42206 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42221 42207 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42222 42208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42223 42209 $as_echo_n "checking for NM... " >&6; }
42224 42210 if test ! -x "$tool_specified"; then
42225 42211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42226 42212 $as_echo "not found" >&6; }
42227 42213 as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42228 42214 fi
42229 42215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42230 42216 $as_echo "$tool_specified" >&6; }
42231 42217 fi
42232 42218 fi
42233 42219 fi
42234 42220
42235 42221 fi
42236 42222
42237 42223
42238 42224 fi
42239 42225
42240 42226 # Only process if variable expands to non-empty
42241 42227
42242 42228 if test "x$NM" != x; then
42243 42229 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42244 42230
42245 42231 # First separate the path from the arguments. This will split at the first
42246 42232 # space.
42247 42233 complete="$NM"
42248 42234 path="${complete%% *}"
42249 42235 tmp="$complete EOL"
42250 42236 arguments="${tmp#* }"
42251 42237
42252 42238 # Input might be given as Windows format, start by converting to
42253 42239 # unix format.
42254 42240 new_path=`$CYGPATH -u "$path"`
42255 42241
42256 42242 # Now try to locate executable using which
42257 42243 new_path=`$WHICH "$new_path" 2> /dev/null`
42258 42244 # bat and cmd files are not always considered executable in cygwin causing which
42259 42245 # to not find them
42260 42246 if test "x$new_path" = x \
42261 42247 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42262 42248 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42263 42249 new_path=`$CYGPATH -u "$path"`
42264 42250 fi
42265 42251 if test "x$new_path" = x; then
42266 42252 # Oops. Which didn't find the executable.
42267 42253 # The splitting of arguments from the executable at a space might have been incorrect,
42268 42254 # since paths with space are more likely in Windows. Give it another try with the whole
42269 42255 # argument.
42270 42256 path="$complete"
42271 42257 arguments="EOL"
42272 42258 new_path=`$CYGPATH -u "$path"`
42273 42259 new_path=`$WHICH "$new_path" 2> /dev/null`
42274 42260 # bat and cmd files are not always considered executable in cygwin causing which
42275 42261 # to not find them
42276 42262 if test "x$new_path" = x \
42277 42263 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42278 42264 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42279 42265 new_path=`$CYGPATH -u "$path"`
42280 42266 fi
42281 42267 if test "x$new_path" = x; then
42282 42268 # It's still not found. Now this is an unrecoverable error.
42283 42269 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42284 42270 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42285 42271 has_space=`$ECHO "$complete" | $GREP " "`
42286 42272 if test "x$has_space" != x; then
42287 42273 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42288 42274 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42289 42275 fi
42290 42276 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42291 42277 fi
42292 42278 fi
42293 42279
42294 42280 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42295 42281 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42296 42282 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42297 42283 # "foo.exe" is OK but "foo" is an error.
42298 42284 #
42299 42285 # This test is therefore slightly more accurate than "test -f" to check for file presence.
42300 42286 # It is also a way to make sure we got the proper file name for the real test later on.
42301 42287 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42302 42288 if test "x$test_shortpath" = x; then
42303 42289 # Short path failed, file does not exist as specified.
42304 42290 # Try adding .exe or .cmd
42305 42291 if test -f "${new_path}.exe"; then
42306 42292 input_to_shortpath="${new_path}.exe"
42307 42293 elif test -f "${new_path}.cmd"; then
42308 42294 input_to_shortpath="${new_path}.cmd"
42309 42295 else
42310 42296 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42311 42297 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42312 42298 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42313 42299 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42314 42300 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42315 42301 fi
42316 42302 else
42317 42303 input_to_shortpath="$new_path"
42318 42304 fi
42319 42305
42320 42306 # Call helper function which possibly converts this using DOS-style short mode.
42321 42307 # If so, the updated path is stored in $new_path.
42322 42308 new_path="$input_to_shortpath"
42323 42309
42324 42310 input_path="$input_to_shortpath"
42325 42311 # Check if we need to convert this using DOS-style short mode. If the path
42326 42312 # contains just simple characters, use it. Otherwise (spaces, weird characters),
42327 42313 # take no chances and rewrite it.
42328 42314 # Note: m4 eats our [], so we need to use [ and ] instead.
42329 42315 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42330 42316 if test "x$has_forbidden_chars" != x; then
42331 42317 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42332 42318 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42333 42319 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42334 42320 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42335 42321 # Going to short mode and back again did indeed matter. Since short mode is
42336 42322 # case insensitive, let's make it lowercase to improve readability.
42337 42323 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42338 42324 # Now convert it back to Unix-style (cygpath)
42339 42325 input_path=`$CYGPATH -u "$shortmode_path"`
42340 42326 new_path="$input_path"
42341 42327 fi
42342 42328 fi
42343 42329
42344 42330 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42345 42331 if test "x$test_cygdrive_prefix" = x; then
42346 42332 # As a simple fix, exclude /usr/bin since it's not a real path.
42347 42333 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42348 42334 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42349 42335 # a path prefixed by /cygdrive for fixpath to work.
42350 42336 new_path="$CYGWIN_ROOT_PATH$input_path"
42351 42337 fi
42352 42338 fi
42353 42339
42354 42340 # remove trailing .exe if any
42355 42341 new_path="${new_path/%.exe/}"
42356 42342
42357 42343 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42358 42344
42359 42345 # First separate the path from the arguments. This will split at the first
42360 42346 # space.
42361 42347 complete="$NM"
42362 42348 path="${complete%% *}"
42363 42349 tmp="$complete EOL"
42364 42350 arguments="${tmp#* }"
42365 42351
42366 42352 # Input might be given as Windows format, start by converting to
42367 42353 # unix format.
42368 42354 new_path="$path"
42369 42355
42370 42356 windows_path="$new_path"
42371 42357 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42372 42358 unix_path=`$CYGPATH -u "$windows_path"`
42373 42359 new_path="$unix_path"
42374 42360 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42375 42361 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42376 42362 new_path="$unix_path"
42377 42363 fi
42378 42364
42379 42365
42380 42366 # Now try to locate executable using which
42381 42367 new_path=`$WHICH "$new_path" 2> /dev/null`
42382 42368
42383 42369 if test "x$new_path" = x; then
42384 42370 # Oops. Which didn't find the executable.
42385 42371 # The splitting of arguments from the executable at a space might have been incorrect,
42386 42372 # since paths with space are more likely in Windows. Give it another try with the whole
42387 42373 # argument.
42388 42374 path="$complete"
42389 42375 arguments="EOL"
42390 42376 new_path="$path"
42391 42377
42392 42378 windows_path="$new_path"
42393 42379 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42394 42380 unix_path=`$CYGPATH -u "$windows_path"`
42395 42381 new_path="$unix_path"
42396 42382 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42397 42383 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42398 42384 new_path="$unix_path"
42399 42385 fi
42400 42386
42401 42387
42402 42388 new_path=`$WHICH "$new_path" 2> /dev/null`
42403 42389 # bat and cmd files are not always considered executable in MSYS causing which
42404 42390 # to not find them
42405 42391 if test "x$new_path" = x \
42406 42392 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42407 42393 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42408 42394 new_path="$path"
42409 42395
42410 42396 windows_path="$new_path"
42411 42397 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42412 42398 unix_path=`$CYGPATH -u "$windows_path"`
42413 42399 new_path="$unix_path"
42414 42400 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42415 42401 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42416 42402 new_path="$unix_path"
42417 42403 fi
42418 42404
42419 42405 fi
42420 42406
42421 42407 if test "x$new_path" = x; then
42422 42408 # It's still not found. Now this is an unrecoverable error.
42423 42409 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42424 42410 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42425 42411 has_space=`$ECHO "$complete" | $GREP " "`
42426 42412 if test "x$has_space" != x; then
42427 42413 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42428 42414 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42429 42415 fi
42430 42416 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42431 42417 fi
42432 42418 fi
42433 42419
42434 42420 # Now new_path has a complete unix path to the binary
42435 42421 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42436 42422 # Keep paths in /bin as-is, but remove trailing .exe if any
42437 42423 new_path="${new_path/%.exe/}"
42438 42424 # Do not save /bin paths to all_fixpath_prefixes!
42439 42425 else
42440 42426 # Not in mixed or Windows style, start by that.
42441 42427 new_path=`cmd //c echo $new_path`
42442 42428
42443 42429 input_path="$new_path"
42444 42430 # Check if we need to convert this using DOS-style short mode. If the path
42445 42431 # contains just simple characters, use it. Otherwise (spaces, weird characters),
42446 42432 # take no chances and rewrite it.
42447 42433 # Note: m4 eats our [], so we need to use [ and ] instead.
42448 42434 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42449 42435 if test "x$has_forbidden_chars" != x; then
42450 42436 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42451 42437 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42452 42438 fi
42453 42439
42454 42440 # Output is in $new_path
42455 42441
42456 42442 windows_path="$new_path"
42457 42443 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42458 42444 unix_path=`$CYGPATH -u "$windows_path"`
42459 42445 new_path="$unix_path"
42460 42446 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42461 42447 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42462 42448 new_path="$unix_path"
42463 42449 fi
42464 42450
42465 42451 # remove trailing .exe if any
42466 42452 new_path="${new_path/%.exe/}"
42467 42453
42468 42454 # Save the first 10 bytes of this path to the storage, so fixpath can work.
42469 42455 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42470 42456 fi
42471 42457
42472 42458 else
42473 42459 # We're on a unix platform. Hooray! :)
42474 42460 # First separate the path from the arguments. This will split at the first
42475 42461 # space.
42476 42462 complete="$NM"
42477 42463 path="${complete%% *}"
42478 42464 tmp="$complete EOL"
42479 42465 arguments="${tmp#* }"
42480 42466
42481 42467 # Cannot rely on the command "which" here since it doesn't always work.
42482 42468 is_absolute_path=`$ECHO "$path" | $GREP ^/`
42483 42469 if test -z "$is_absolute_path"; then
42484 42470 # Path to executable is not absolute. Find it.
42485 42471 IFS_save="$IFS"
42486 42472 IFS=:
42487 42473 for p in $PATH; do
42488 42474 if test -f "$p/$path" && test -x "$p/$path"; then
42489 42475 new_path="$p/$path"
42490 42476 break
42491 42477 fi
42492 42478 done
42493 42479 IFS="$IFS_save"
42494 42480 else
42495 42481 # This is an absolute path, we can use it without further modifications.
42496 42482 new_path="$path"
42497 42483 fi
42498 42484
42499 42485 if test "x$new_path" = x; then
42500 42486 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42501 42487 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42502 42488 has_space=`$ECHO "$complete" | $GREP " "`
42503 42489 if test "x$has_space" != x; then
42504 42490 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42505 42491 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42506 42492 fi
42507 42493 as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42508 42494 fi
42509 42495 fi
42510 42496
42511 42497 # Now join together the path and the arguments once again
42512 42498 if test "x$arguments" != xEOL; then
42513 42499 new_complete="$new_path ${arguments% *}"
42514 42500 else
42515 42501 new_complete="$new_path"
42516 42502 fi
42517 42503
42518 42504 if test "x$complete" != "x$new_complete"; then
42519 42505 NM="$new_complete"
42520 42506 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42521 42507 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42522 42508 fi
42523 42509 fi
42524 42510
42525 42511 GNM="$NM"
42526 42512
42527 42513 fi
42528 42514
42529 42515 # objcopy is used for moving debug symbols to separate files when
42530 42516 # full debug symbols are enabled.
42531 42517 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42532 42518
42533 42519
42534 42520 # Publish this variable in the help.
42535 42521
42536 42522
42537 42523 if [ -z "${OBJCOPY+x}" ]; then
42538 42524 # The variable is not set by user, try to locate tool using the code snippet
42539 42525 if test -n "$ac_tool_prefix"; then
42540 42526 for ac_prog in gobjcopy objcopy
42541 42527 do
42542 42528 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42543 42529 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42544 42530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42545 42531 $as_echo_n "checking for $ac_word... " >&6; }
42546 42532 if ${ac_cv_prog_OBJCOPY+:} false; then :
42547 42533 $as_echo_n "(cached) " >&6
42548 42534 else
42549 42535 if test -n "$OBJCOPY"; then
42550 42536 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42551 42537 else
42552 42538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42553 42539 for as_dir in $PATH
42554 42540 do
42555 42541 IFS=$as_save_IFS
42556 42542 test -z "$as_dir" && as_dir=.
42557 42543 for ac_exec_ext in '' $ac_executable_extensions; do
42558 42544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42559 42545 ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42560 42546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42561 42547 break 2
42562 42548 fi
42563 42549 done
42564 42550 done
42565 42551 IFS=$as_save_IFS
42566 42552
42567 42553 fi
42568 42554 fi
42569 42555 OBJCOPY=$ac_cv_prog_OBJCOPY
42570 42556 if test -n "$OBJCOPY"; then
42571 42557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42572 42558 $as_echo "$OBJCOPY" >&6; }
42573 42559 else
42574 42560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42575 42561 $as_echo "no" >&6; }
42576 42562 fi
42577 42563
42578 42564
42579 42565 test -n "$OBJCOPY" && break
42580 42566 done
42581 42567 fi
42582 42568 if test -z "$OBJCOPY"; then
42583 42569 ac_ct_OBJCOPY=$OBJCOPY
42584 42570 for ac_prog in gobjcopy objcopy
42585 42571 do
42586 42572 # Extract the first word of "$ac_prog", so it can be a program name with args.
42587 42573 set dummy $ac_prog; ac_word=$2
42588 42574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42589 42575 $as_echo_n "checking for $ac_word... " >&6; }
42590 42576 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42591 42577 $as_echo_n "(cached) " >&6
42592 42578 else
42593 42579 if test -n "$ac_ct_OBJCOPY"; then
42594 42580 ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42595 42581 else
42596 42582 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42597 42583 for as_dir in $PATH
42598 42584 do
42599 42585 IFS=$as_save_IFS
42600 42586 test -z "$as_dir" && as_dir=.
42601 42587 for ac_exec_ext in '' $ac_executable_extensions; do
42602 42588 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42603 42589 ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42604 42590 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42605 42591 break 2
42606 42592 fi
42607 42593 done
42608 42594 done
42609 42595 IFS=$as_save_IFS
42610 42596
42611 42597 fi
42612 42598 fi
42613 42599 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42614 42600 if test -n "$ac_ct_OBJCOPY"; then
42615 42601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42616 42602 $as_echo "$ac_ct_OBJCOPY" >&6; }
42617 42603 else
42618 42604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42619 42605 $as_echo "no" >&6; }
42620 42606 fi
42621 42607
42622 42608
42623 42609 test -n "$ac_ct_OBJCOPY" && break
42624 42610 done
42625 42611
42626 42612 if test "x$ac_ct_OBJCOPY" = x; then
42627 42613 OBJCOPY=""
42628 42614 else
42629 42615 case $cross_compiling:$ac_tool_warned in
42630 42616 yes:)
42631 42617 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42632 42618 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42633 42619 ac_tool_warned=yes ;;
42634 42620 esac
42635 42621 OBJCOPY=$ac_ct_OBJCOPY
42636 42622 fi
42637 42623 fi
42638 42624
42639 42625 else
42640 42626 # The variable is set, but is it from the command line or the environment?
42641 42627
42642 42628 # Try to remove the string !OBJCOPY! from our list.
42643 42629 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42644 42630 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42645 42631 # If it failed, the variable was not from the command line. Ignore it,
42646 42632 # but warn the user (except for BASH, which is always set by the calling BASH).
42647 42633 if test "xOBJCOPY" != xBASH; then
42648 42634 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42649 42635 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42650 42636 fi
42651 42637 # Try to locate tool using the code snippet
42652 42638 if test -n "$ac_tool_prefix"; then
42653 42639 for ac_prog in gobjcopy objcopy
42654 42640 do
42655 42641 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42656 42642 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42657 42643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42658 42644 $as_echo_n "checking for $ac_word... " >&6; }
42659 42645 if ${ac_cv_prog_OBJCOPY+:} false; then :
42660 42646 $as_echo_n "(cached) " >&6
42661 42647 else
42662 42648 if test -n "$OBJCOPY"; then
42663 42649 ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42664 42650 else
42665 42651 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42666 42652 for as_dir in $PATH
42667 42653 do
42668 42654 IFS=$as_save_IFS
42669 42655 test -z "$as_dir" && as_dir=.
42670 42656 for ac_exec_ext in '' $ac_executable_extensions; do
42671 42657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42672 42658 ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42673 42659 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42674 42660 break 2
42675 42661 fi
42676 42662 done
42677 42663 done
42678 42664 IFS=$as_save_IFS
42679 42665
42680 42666 fi
42681 42667 fi
42682 42668 OBJCOPY=$ac_cv_prog_OBJCOPY
42683 42669 if test -n "$OBJCOPY"; then
42684 42670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42685 42671 $as_echo "$OBJCOPY" >&6; }
42686 42672 else
42687 42673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42688 42674 $as_echo "no" >&6; }
42689 42675 fi
42690 42676
42691 42677
42692 42678 test -n "$OBJCOPY" && break
42693 42679 done
42694 42680 fi
42695 42681 if test -z "$OBJCOPY"; then
42696 42682 ac_ct_OBJCOPY=$OBJCOPY
42697 42683 for ac_prog in gobjcopy objcopy
42698 42684 do
42699 42685 # Extract the first word of "$ac_prog", so it can be a program name with args.
42700 42686 set dummy $ac_prog; ac_word=$2
42701 42687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42702 42688 $as_echo_n "checking for $ac_word... " >&6; }
42703 42689 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42704 42690 $as_echo_n "(cached) " >&6
42705 42691 else
42706 42692 if test -n "$ac_ct_OBJCOPY"; then
42707 42693 ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42708 42694 else
42709 42695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42710 42696 for as_dir in $PATH
42711 42697 do
42712 42698 IFS=$as_save_IFS
42713 42699 test -z "$as_dir" && as_dir=.
42714 42700 for ac_exec_ext in '' $ac_executable_extensions; do
42715 42701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42716 42702 ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42717 42703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42718 42704 break 2
42719 42705 fi
42720 42706 done
42721 42707 done
42722 42708 IFS=$as_save_IFS
42723 42709
42724 42710 fi
42725 42711 fi
42726 42712 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42727 42713 if test -n "$ac_ct_OBJCOPY"; then
42728 42714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42729 42715 $as_echo "$ac_ct_OBJCOPY" >&6; }
42730 42716 else
42731 42717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42732 42718 $as_echo "no" >&6; }
42733 42719 fi
42734 42720
42735 42721
42736 42722 test -n "$ac_ct_OBJCOPY" && break
42737 42723 done
42738 42724
42739 42725 if test "x$ac_ct_OBJCOPY" = x; then
42740 42726 OBJCOPY=""
42741 42727 else
42742 42728 case $cross_compiling:$ac_tool_warned in
42743 42729 yes:)
42744 42730 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42745 42731 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42746 42732 ac_tool_warned=yes ;;
42747 42733 esac
42748 42734 OBJCOPY=$ac_ct_OBJCOPY
42749 42735 fi
42750 42736 fi
42751 42737
42752 42738 else
42753 42739 # If it succeeded, then it was overridden by the user. We will use it
42754 42740 # for the tool.
42755 42741
42756 42742 # First remove it from the list of overridden variables, so we can test
42757 42743 # for unknown variables in the end.
42758 42744 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42759 42745
42760 42746 # Check if we try to supply an empty value
42761 42747 if test "x$OBJCOPY" = x; then
42762 42748 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42763 42749 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42764 42750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42765 42751 $as_echo_n "checking for OBJCOPY... " >&6; }
42766 42752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42767 42753 $as_echo "disabled" >&6; }
42768 42754 else
42769 42755 # Check if the provided tool contains a complete path.
42770 42756 tool_specified="$OBJCOPY"
42771 42757 tool_basename="${tool_specified##*/}"
42772 42758 if test "x$tool_basename" = "x$tool_specified"; then
42773 42759 # A command without a complete path is provided, search $PATH.
42774 42760 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42775 42761 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42776 42762 # Extract the first word of "$tool_basename", so it can be a program name with args.
42777 42763 set dummy $tool_basename; ac_word=$2
42778 42764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42779 42765 $as_echo_n "checking for $ac_word... " >&6; }
42780 42766 if ${ac_cv_path_OBJCOPY+:} false; then :
42781 42767 $as_echo_n "(cached) " >&6
42782 42768 else
42783 42769 case $OBJCOPY in
42784 42770 [\\/]* | ?:[\\/]*)
42785 42771 ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42786 42772 ;;
42787 42773 *)
42788 42774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42789 42775 for as_dir in $PATH
42790 42776 do
42791 42777 IFS=$as_save_IFS
42792 42778 test -z "$as_dir" && as_dir=.
42793 42779 for ac_exec_ext in '' $ac_executable_extensions; do
42794 42780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42795 42781 ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42796 42782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42797 42783 break 2
42798 42784 fi
42799 42785 done
42800 42786 done
42801 42787 IFS=$as_save_IFS
42802 42788
42803 42789 ;;
42804 42790 esac
42805 42791 fi
42806 42792 OBJCOPY=$ac_cv_path_OBJCOPY
42807 42793 if test -n "$OBJCOPY"; then
42808 42794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42809 42795 $as_echo "$OBJCOPY" >&6; }
42810 42796 else
42811 42797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42812 42798 $as_echo "no" >&6; }
42813 42799 fi
42814 42800
42815 42801
42816 42802 if test "x$OBJCOPY" = x; then
42817 42803 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42818 42804 fi
42819 42805 else
42820 42806 # Otherwise we believe it is a complete path. Use it as it is.
42821 42807 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42822 42808 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42823 42809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42824 42810 $as_echo_n "checking for OBJCOPY... " >&6; }
42825 42811 if test ! -x "$tool_specified"; then
42826 42812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42827 42813 $as_echo "not found" >&6; }
42828 42814 as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42829 42815 fi
42830 42816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42831 42817 $as_echo "$tool_specified" >&6; }
42832 42818 fi
42833 42819 fi
42834 42820 fi
42835 42821
42836 42822 fi
42837 42823
42838 42824
42839 42825 # Only call fixup if objcopy was found.
42840 42826 if test -n "$OBJCOPY"; then
42841 42827
42842 42828 # Only process if variable expands to non-empty
42843 42829
42844 42830 if test "x$OBJCOPY" != x; then
42845 42831 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42846 42832
42847 42833 # First separate the path from the arguments. This will split at the first
42848 42834 # space.
42849 42835 complete="$OBJCOPY"
42850 42836 path="${complete%% *}"
42851 42837 tmp="$complete EOL"
42852 42838 arguments="${tmp#* }"
42853 42839
42854 42840 # Input might be given as Windows format, start by converting to
42855 42841 # unix format.
42856 42842 new_path=`$CYGPATH -u "$path"`
42857 42843
42858 42844 # Now try to locate executable using which
42859 42845 new_path=`$WHICH "$new_path" 2> /dev/null`
42860 42846 # bat and cmd files are not always considered executable in cygwin causing which
42861 42847 # to not find them
42862 42848 if test "x$new_path" = x \
42863 42849 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42864 42850 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42865 42851 new_path=`$CYGPATH -u "$path"`
42866 42852 fi
42867 42853 if test "x$new_path" = x; then
42868 42854 # Oops. Which didn't find the executable.
42869 42855 # The splitting of arguments from the executable at a space might have been incorrect,
42870 42856 # since paths with space are more likely in Windows. Give it another try with the whole
42871 42857 # argument.
42872 42858 path="$complete"
42873 42859 arguments="EOL"
42874 42860 new_path=`$CYGPATH -u "$path"`
42875 42861 new_path=`$WHICH "$new_path" 2> /dev/null`
42876 42862 # bat and cmd files are not always considered executable in cygwin causing which
42877 42863 # to not find them
42878 42864 if test "x$new_path" = x \
42879 42865 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42880 42866 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42881 42867 new_path=`$CYGPATH -u "$path"`
42882 42868 fi
42883 42869 if test "x$new_path" = x; then
42884 42870 # It's still not found. Now this is an unrecoverable error.
42885 42871 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42886 42872 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42887 42873 has_space=`$ECHO "$complete" | $GREP " "`
42888 42874 if test "x$has_space" != x; then
42889 42875 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42890 42876 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42891 42877 fi
42892 42878 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42893 42879 fi
42894 42880 fi
42895 42881
42896 42882 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42897 42883 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42898 42884 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42899 42885 # "foo.exe" is OK but "foo" is an error.
42900 42886 #
42901 42887 # This test is therefore slightly more accurate than "test -f" to check for file presence.
42902 42888 # It is also a way to make sure we got the proper file name for the real test later on.
42903 42889 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42904 42890 if test "x$test_shortpath" = x; then
42905 42891 # Short path failed, file does not exist as specified.
42906 42892 # Try adding .exe or .cmd
42907 42893 if test -f "${new_path}.exe"; then
42908 42894 input_to_shortpath="${new_path}.exe"
42909 42895 elif test -f "${new_path}.cmd"; then
42910 42896 input_to_shortpath="${new_path}.cmd"
42911 42897 else
42912 42898 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42913 42899 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42914 42900 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42915 42901 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42916 42902 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42917 42903 fi
42918 42904 else
42919 42905 input_to_shortpath="$new_path"
42920 42906 fi
42921 42907
42922 42908 # Call helper function which possibly converts this using DOS-style short mode.
42923 42909 # If so, the updated path is stored in $new_path.
42924 42910 new_path="$input_to_shortpath"
42925 42911
42926 42912 input_path="$input_to_shortpath"
42927 42913 # Check if we need to convert this using DOS-style short mode. If the path
42928 42914 # contains just simple characters, use it. Otherwise (spaces, weird characters),
42929 42915 # take no chances and rewrite it.
42930 42916 # Note: m4 eats our [], so we need to use [ and ] instead.
42931 42917 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42932 42918 if test "x$has_forbidden_chars" != x; then
42933 42919 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42934 42920 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42935 42921 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42936 42922 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42937 42923 # Going to short mode and back again did indeed matter. Since short mode is
42938 42924 # case insensitive, let's make it lowercase to improve readability.
42939 42925 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42940 42926 # Now convert it back to Unix-style (cygpath)
42941 42927 input_path=`$CYGPATH -u "$shortmode_path"`
42942 42928 new_path="$input_path"
42943 42929 fi
42944 42930 fi
42945 42931
42946 42932 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42947 42933 if test "x$test_cygdrive_prefix" = x; then
42948 42934 # As a simple fix, exclude /usr/bin since it's not a real path.
42949 42935 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42950 42936 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42951 42937 # a path prefixed by /cygdrive for fixpath to work.
42952 42938 new_path="$CYGWIN_ROOT_PATH$input_path"
42953 42939 fi
42954 42940 fi
42955 42941
42956 42942 # remove trailing .exe if any
42957 42943 new_path="${new_path/%.exe/}"
42958 42944
42959 42945 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42960 42946
42961 42947 # First separate the path from the arguments. This will split at the first
42962 42948 # space.
42963 42949 complete="$OBJCOPY"
42964 42950 path="${complete%% *}"
42965 42951 tmp="$complete EOL"
42966 42952 arguments="${tmp#* }"
42967 42953
42968 42954 # Input might be given as Windows format, start by converting to
42969 42955 # unix format.
42970 42956 new_path="$path"
42971 42957
42972 42958 windows_path="$new_path"
42973 42959 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42974 42960 unix_path=`$CYGPATH -u "$windows_path"`
42975 42961 new_path="$unix_path"
42976 42962 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42977 42963 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42978 42964 new_path="$unix_path"
42979 42965 fi
42980 42966
42981 42967
42982 42968 # Now try to locate executable using which
42983 42969 new_path=`$WHICH "$new_path" 2> /dev/null`
42984 42970
42985 42971 if test "x$new_path" = x; then
42986 42972 # Oops. Which didn't find the executable.
42987 42973 # The splitting of arguments from the executable at a space might have been incorrect,
42988 42974 # since paths with space are more likely in Windows. Give it another try with the whole
42989 42975 # argument.
42990 42976 path="$complete"
42991 42977 arguments="EOL"
42992 42978 new_path="$path"
42993 42979
42994 42980 windows_path="$new_path"
42995 42981 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42996 42982 unix_path=`$CYGPATH -u "$windows_path"`
42997 42983 new_path="$unix_path"
42998 42984 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42999 42985 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43000 42986 new_path="$unix_path"
43001 42987 fi
43002 42988
43003 42989
43004 42990 new_path=`$WHICH "$new_path" 2> /dev/null`
43005 42991 # bat and cmd files are not always considered executable in MSYS causing which
43006 42992 # to not find them
43007 42993 if test "x$new_path" = x \
43008 42994 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43009 42995 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43010 42996 new_path="$path"
43011 42997
43012 42998 windows_path="$new_path"
43013 42999 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43014 43000 unix_path=`$CYGPATH -u "$windows_path"`
43015 43001 new_path="$unix_path"
43016 43002 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43017 43003 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43018 43004 new_path="$unix_path"
43019 43005 fi
43020 43006
43021 43007 fi
43022 43008
43023 43009 if test "x$new_path" = x; then
43024 43010 # It's still not found. Now this is an unrecoverable error.
43025 43011 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43026 43012 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43027 43013 has_space=`$ECHO "$complete" | $GREP " "`
43028 43014 if test "x$has_space" != x; then
43029 43015 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43030 43016 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43031 43017 fi
43032 43018 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43033 43019 fi
43034 43020 fi
43035 43021
43036 43022 # Now new_path has a complete unix path to the binary
43037 43023 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43038 43024 # Keep paths in /bin as-is, but remove trailing .exe if any
43039 43025 new_path="${new_path/%.exe/}"
43040 43026 # Do not save /bin paths to all_fixpath_prefixes!
43041 43027 else
43042 43028 # Not in mixed or Windows style, start by that.
43043 43029 new_path=`cmd //c echo $new_path`
43044 43030
43045 43031 input_path="$new_path"
43046 43032 # Check if we need to convert this using DOS-style short mode. If the path
43047 43033 # contains just simple characters, use it. Otherwise (spaces, weird characters),
43048 43034 # take no chances and rewrite it.
43049 43035 # Note: m4 eats our [], so we need to use [ and ] instead.
43050 43036 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43051 43037 if test "x$has_forbidden_chars" != x; then
43052 43038 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43053 43039 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43054 43040 fi
43055 43041
43056 43042 # Output is in $new_path
43057 43043
43058 43044 windows_path="$new_path"
43059 43045 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43060 43046 unix_path=`$CYGPATH -u "$windows_path"`
43061 43047 new_path="$unix_path"
43062 43048 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43063 43049 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43064 43050 new_path="$unix_path"
43065 43051 fi
43066 43052
43067 43053 # remove trailing .exe if any
43068 43054 new_path="${new_path/%.exe/}"
43069 43055
43070 43056 # Save the first 10 bytes of this path to the storage, so fixpath can work.
43071 43057 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43072 43058 fi
43073 43059
43074 43060 else
43075 43061 # We're on a unix platform. Hooray! :)
43076 43062 # First separate the path from the arguments. This will split at the first
43077 43063 # space.
43078 43064 complete="$OBJCOPY"
43079 43065 path="${complete%% *}"
43080 43066 tmp="$complete EOL"
43081 43067 arguments="${tmp#* }"
43082 43068
43083 43069 # Cannot rely on the command "which" here since it doesn't always work.
43084 43070 is_absolute_path=`$ECHO "$path" | $GREP ^/`
43085 43071 if test -z "$is_absolute_path"; then
43086 43072 # Path to executable is not absolute. Find it.
43087 43073 IFS_save="$IFS"
43088 43074 IFS=:
43089 43075 for p in $PATH; do
43090 43076 if test -f "$p/$path" && test -x "$p/$path"; then
43091 43077 new_path="$p/$path"
43092 43078 break
43093 43079 fi
43094 43080 done
43095 43081 IFS="$IFS_save"
43096 43082 else
43097 43083 # This is an absolute path, we can use it without further modifications.
43098 43084 new_path="$path"
43099 43085 fi
43100 43086
43101 43087 if test "x$new_path" = x; then
43102 43088 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43103 43089 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43104 43090 has_space=`$ECHO "$complete" | $GREP " "`
43105 43091 if test "x$has_space" != x; then
43106 43092 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43107 43093 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43108 43094 fi
43109 43095 as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43110 43096 fi
43111 43097 fi
43112 43098
43113 43099 # Now join together the path and the arguments once again
43114 43100 if test "x$arguments" != xEOL; then
43115 43101 new_complete="$new_path ${arguments% *}"
43116 43102 else
43117 43103 new_complete="$new_path"
43118 43104 fi
43119 43105
43120 43106 if test "x$complete" != "x$new_complete"; then
43121 43107 OBJCOPY="$new_complete"
43122 43108 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43123 43109 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43124 43110 fi
43125 43111 fi
43126 43112
43127 43113 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43128 43114 # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43129 43115 # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43130 43116 # - version number is last blank separate word on first line
43131 43117 # - version number formats that have been seen:
43132 43118 # - <major>.<minor>
43133 43119 # - <major>.<minor>.<micro>
43134 43120 OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43135 43121 # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43136 43122 OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43137 43123 -e 's/.* //' \
43138 43124 -e '/^[01]\./b bad' \
43139 43125 -e '/^2\./{' \
43140 43126 -e ' s/^2\.//' \
43141 43127 -e ' /^[0-9]$/b bad' \
43142 43128 -e ' /^[0-9]\./b bad' \
43143 43129 -e ' /^1[0-9]$/b bad' \
43144 43130 -e ' /^1[0-9]\./b bad' \
43145 43131 -e ' /^20\./b bad' \
43146 43132 -e ' /^21\.0$/b bad' \
43147 43133 -e ' /^21\.0\./b bad' \
43148 43134 -e '}' \
43149 43135 -e ':good' \
43150 43136 -e 's/.*/VALID_VERSION/p' \
43151 43137 -e 'q' \
43152 43138 -e ':bad' \
43153 43139 -e 's/.*/BAD_VERSION/p' \
43154 43140 -e 'q'`
43155 43141 if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43156 43142 OBJCOPY=
43157 43143 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
43158 43144 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43159 43145 { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43160 43146 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43161 43147 { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43162 43148 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43163 43149 { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43164 43150 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43165 43151 { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43166 43152 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43167 43153 fi
43168 43154 fi
43169 43155 fi
43170 43156 fi
43171 43157
43172 43158
43173 43159
43174 43160 # Publish this variable in the help.
43175 43161
43176 43162
43177 43163 if [ -z "${OBJDUMP+x}" ]; then
43178 43164 # The variable is not set by user, try to locate tool using the code snippet
43179 43165 if test -n "$ac_tool_prefix"; then
43180 43166 for ac_prog in gobjdump objdump
43181 43167 do
43182 43168 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43183 43169 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43184 43170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43185 43171 $as_echo_n "checking for $ac_word... " >&6; }
43186 43172 if ${ac_cv_prog_OBJDUMP+:} false; then :
43187 43173 $as_echo_n "(cached) " >&6
43188 43174 else
43189 43175 if test -n "$OBJDUMP"; then
43190 43176 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43191 43177 else
43192 43178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43193 43179 for as_dir in $PATH
43194 43180 do
43195 43181 IFS=$as_save_IFS
43196 43182 test -z "$as_dir" && as_dir=.
43197 43183 for ac_exec_ext in '' $ac_executable_extensions; do
43198 43184 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43199 43185 ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43200 43186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43201 43187 break 2
43202 43188 fi
43203 43189 done
43204 43190 done
43205 43191 IFS=$as_save_IFS
43206 43192
43207 43193 fi
43208 43194 fi
43209 43195 OBJDUMP=$ac_cv_prog_OBJDUMP
43210 43196 if test -n "$OBJDUMP"; then
43211 43197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43212 43198 $as_echo "$OBJDUMP" >&6; }
43213 43199 else
43214 43200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43215 43201 $as_echo "no" >&6; }
43216 43202 fi
43217 43203
43218 43204
43219 43205 test -n "$OBJDUMP" && break
43220 43206 done
43221 43207 fi
43222 43208 if test -z "$OBJDUMP"; then
43223 43209 ac_ct_OBJDUMP=$OBJDUMP
43224 43210 for ac_prog in gobjdump objdump
43225 43211 do
43226 43212 # Extract the first word of "$ac_prog", so it can be a program name with args.
43227 43213 set dummy $ac_prog; ac_word=$2
43228 43214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43229 43215 $as_echo_n "checking for $ac_word... " >&6; }
43230 43216 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43231 43217 $as_echo_n "(cached) " >&6
43232 43218 else
43233 43219 if test -n "$ac_ct_OBJDUMP"; then
43234 43220 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43235 43221 else
43236 43222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43237 43223 for as_dir in $PATH
43238 43224 do
43239 43225 IFS=$as_save_IFS
43240 43226 test -z "$as_dir" && as_dir=.
43241 43227 for ac_exec_ext in '' $ac_executable_extensions; do
43242 43228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43243 43229 ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43244 43230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43245 43231 break 2
43246 43232 fi
43247 43233 done
43248 43234 done
43249 43235 IFS=$as_save_IFS
43250 43236
43251 43237 fi
43252 43238 fi
43253 43239 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43254 43240 if test -n "$ac_ct_OBJDUMP"; then
43255 43241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43256 43242 $as_echo "$ac_ct_OBJDUMP" >&6; }
43257 43243 else
43258 43244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43259 43245 $as_echo "no" >&6; }
43260 43246 fi
43261 43247
43262 43248
43263 43249 test -n "$ac_ct_OBJDUMP" && break
43264 43250 done
43265 43251
43266 43252 if test "x$ac_ct_OBJDUMP" = x; then
43267 43253 OBJDUMP=""
43268 43254 else
43269 43255 case $cross_compiling:$ac_tool_warned in
43270 43256 yes:)
43271 43257 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43272 43258 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43273 43259 ac_tool_warned=yes ;;
43274 43260 esac
43275 43261 OBJDUMP=$ac_ct_OBJDUMP
43276 43262 fi
43277 43263 fi
43278 43264
43279 43265 else
43280 43266 # The variable is set, but is it from the command line or the environment?
43281 43267
43282 43268 # Try to remove the string !OBJDUMP! from our list.
43283 43269 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43284 43270 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43285 43271 # If it failed, the variable was not from the command line. Ignore it,
43286 43272 # but warn the user (except for BASH, which is always set by the calling BASH).
43287 43273 if test "xOBJDUMP" != xBASH; then
43288 43274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43289 43275 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43290 43276 fi
43291 43277 # Try to locate tool using the code snippet
43292 43278 if test -n "$ac_tool_prefix"; then
43293 43279 for ac_prog in gobjdump objdump
43294 43280 do
43295 43281 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43296 43282 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43297 43283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43298 43284 $as_echo_n "checking for $ac_word... " >&6; }
43299 43285 if ${ac_cv_prog_OBJDUMP+:} false; then :
43300 43286 $as_echo_n "(cached) " >&6
43301 43287 else
43302 43288 if test -n "$OBJDUMP"; then
43303 43289 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43304 43290 else
43305 43291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43306 43292 for as_dir in $PATH
43307 43293 do
43308 43294 IFS=$as_save_IFS
43309 43295 test -z "$as_dir" && as_dir=.
43310 43296 for ac_exec_ext in '' $ac_executable_extensions; do
43311 43297 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43312 43298 ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43313 43299 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43314 43300 break 2
43315 43301 fi
43316 43302 done
43317 43303 done
43318 43304 IFS=$as_save_IFS
43319 43305
43320 43306 fi
43321 43307 fi
43322 43308 OBJDUMP=$ac_cv_prog_OBJDUMP
43323 43309 if test -n "$OBJDUMP"; then
43324 43310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43325 43311 $as_echo "$OBJDUMP" >&6; }
43326 43312 else
43327 43313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43328 43314 $as_echo "no" >&6; }
43329 43315 fi
43330 43316
43331 43317
43332 43318 test -n "$OBJDUMP" && break
43333 43319 done
43334 43320 fi
43335 43321 if test -z "$OBJDUMP"; then
43336 43322 ac_ct_OBJDUMP=$OBJDUMP
43337 43323 for ac_prog in gobjdump objdump
43338 43324 do
43339 43325 # Extract the first word of "$ac_prog", so it can be a program name with args.
43340 43326 set dummy $ac_prog; ac_word=$2
43341 43327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43342 43328 $as_echo_n "checking for $ac_word... " >&6; }
43343 43329 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43344 43330 $as_echo_n "(cached) " >&6
43345 43331 else
43346 43332 if test -n "$ac_ct_OBJDUMP"; then
43347 43333 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43348 43334 else
43349 43335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43350 43336 for as_dir in $PATH
43351 43337 do
43352 43338 IFS=$as_save_IFS
43353 43339 test -z "$as_dir" && as_dir=.
43354 43340 for ac_exec_ext in '' $ac_executable_extensions; do
43355 43341 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43356 43342 ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43357 43343 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43358 43344 break 2
43359 43345 fi
43360 43346 done
43361 43347 done
43362 43348 IFS=$as_save_IFS
43363 43349
43364 43350 fi
43365 43351 fi
43366 43352 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43367 43353 if test -n "$ac_ct_OBJDUMP"; then
43368 43354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43369 43355 $as_echo "$ac_ct_OBJDUMP" >&6; }
43370 43356 else
43371 43357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43372 43358 $as_echo "no" >&6; }
43373 43359 fi
43374 43360
43375 43361
43376 43362 test -n "$ac_ct_OBJDUMP" && break
43377 43363 done
43378 43364
43379 43365 if test "x$ac_ct_OBJDUMP" = x; then
43380 43366 OBJDUMP=""
43381 43367 else
43382 43368 case $cross_compiling:$ac_tool_warned in
43383 43369 yes:)
43384 43370 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43385 43371 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43386 43372 ac_tool_warned=yes ;;
43387 43373 esac
43388 43374 OBJDUMP=$ac_ct_OBJDUMP
43389 43375 fi
43390 43376 fi
43391 43377
43392 43378 else
43393 43379 # If it succeeded, then it was overridden by the user. We will use it
43394 43380 # for the tool.
43395 43381
43396 43382 # First remove it from the list of overridden variables, so we can test
43397 43383 # for unknown variables in the end.
43398 43384 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43399 43385
43400 43386 # Check if we try to supply an empty value
43401 43387 if test "x$OBJDUMP" = x; then
43402 43388 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43403 43389 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43404 43390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43405 43391 $as_echo_n "checking for OBJDUMP... " >&6; }
43406 43392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43407 43393 $as_echo "disabled" >&6; }
43408 43394 else
43409 43395 # Check if the provided tool contains a complete path.
43410 43396 tool_specified="$OBJDUMP"
43411 43397 tool_basename="${tool_specified##*/}"
43412 43398 if test "x$tool_basename" = "x$tool_specified"; then
43413 43399 # A command without a complete path is provided, search $PATH.
43414 43400 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43415 43401 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43416 43402 # Extract the first word of "$tool_basename", so it can be a program name with args.
43417 43403 set dummy $tool_basename; ac_word=$2
43418 43404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43419 43405 $as_echo_n "checking for $ac_word... " >&6; }
43420 43406 if ${ac_cv_path_OBJDUMP+:} false; then :
43421 43407 $as_echo_n "(cached) " >&6
43422 43408 else
43423 43409 case $OBJDUMP in
43424 43410 [\\/]* | ?:[\\/]*)
43425 43411 ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43426 43412 ;;
43427 43413 *)
43428 43414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43429 43415 for as_dir in $PATH
43430 43416 do
43431 43417 IFS=$as_save_IFS
43432 43418 test -z "$as_dir" && as_dir=.
43433 43419 for ac_exec_ext in '' $ac_executable_extensions; do
43434 43420 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43435 43421 ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43436 43422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43437 43423 break 2
43438 43424 fi
43439 43425 done
43440 43426 done
43441 43427 IFS=$as_save_IFS
43442 43428
43443 43429 ;;
43444 43430 esac
43445 43431 fi
43446 43432 OBJDUMP=$ac_cv_path_OBJDUMP
43447 43433 if test -n "$OBJDUMP"; then
43448 43434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43449 43435 $as_echo "$OBJDUMP" >&6; }
43450 43436 else
43451 43437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43452 43438 $as_echo "no" >&6; }
43453 43439 fi
43454 43440
43455 43441
43456 43442 if test "x$OBJDUMP" = x; then
43457 43443 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43458 43444 fi
43459 43445 else
43460 43446 # Otherwise we believe it is a complete path. Use it as it is.
43461 43447 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43462 43448 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43463 43449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43464 43450 $as_echo_n "checking for OBJDUMP... " >&6; }
43465 43451 if test ! -x "$tool_specified"; then
43466 43452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43467 43453 $as_echo "not found" >&6; }
43468 43454 as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43469 43455 fi
43470 43456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43471 43457 $as_echo "$tool_specified" >&6; }
43472 43458 fi
43473 43459 fi
43474 43460 fi
43475 43461
43476 43462 fi
43477 43463
43478 43464
43479 43465 if test "x$OBJDUMP" != x; then
43480 43466 # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43481 43467 # bails if argument is missing.
43482 43468
43483 43469 # Only process if variable expands to non-empty
43484 43470
43485 43471 if test "x$OBJDUMP" != x; then
43486 43472 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43487 43473
43488 43474 # First separate the path from the arguments. This will split at the first
43489 43475 # space.
43490 43476 complete="$OBJDUMP"
43491 43477 path="${complete%% *}"
43492 43478 tmp="$complete EOL"
43493 43479 arguments="${tmp#* }"
43494 43480
43495 43481 # Input might be given as Windows format, start by converting to
43496 43482 # unix format.
43497 43483 new_path=`$CYGPATH -u "$path"`
43498 43484
43499 43485 # Now try to locate executable using which
43500 43486 new_path=`$WHICH "$new_path" 2> /dev/null`
43501 43487 # bat and cmd files are not always considered executable in cygwin causing which
43502 43488 # to not find them
43503 43489 if test "x$new_path" = x \
43504 43490 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43505 43491 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43506 43492 new_path=`$CYGPATH -u "$path"`
43507 43493 fi
43508 43494 if test "x$new_path" = x; then
43509 43495 # Oops. Which didn't find the executable.
43510 43496 # The splitting of arguments from the executable at a space might have been incorrect,
43511 43497 # since paths with space are more likely in Windows. Give it another try with the whole
43512 43498 # argument.
43513 43499 path="$complete"
43514 43500 arguments="EOL"
43515 43501 new_path=`$CYGPATH -u "$path"`
43516 43502 new_path=`$WHICH "$new_path" 2> /dev/null`
43517 43503 # bat and cmd files are not always considered executable in cygwin causing which
43518 43504 # to not find them
43519 43505 if test "x$new_path" = x \
43520 43506 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43521 43507 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43522 43508 new_path=`$CYGPATH -u "$path"`
43523 43509 fi
43524 43510 if test "x$new_path" = x; then
43525 43511 # It's still not found. Now this is an unrecoverable error.
43526 43512 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43527 43513 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43528 43514 has_space=`$ECHO "$complete" | $GREP " "`
43529 43515 if test "x$has_space" != x; then
43530 43516 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43531 43517 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43532 43518 fi
43533 43519 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43534 43520 fi
43535 43521 fi
43536 43522
43537 43523 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43538 43524 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43539 43525 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43540 43526 # "foo.exe" is OK but "foo" is an error.
43541 43527 #
43542 43528 # This test is therefore slightly more accurate than "test -f" to check for file presence.
43543 43529 # It is also a way to make sure we got the proper file name for the real test later on.
43544 43530 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43545 43531 if test "x$test_shortpath" = x; then
43546 43532 # Short path failed, file does not exist as specified.
43547 43533 # Try adding .exe or .cmd
43548 43534 if test -f "${new_path}.exe"; then
43549 43535 input_to_shortpath="${new_path}.exe"
43550 43536 elif test -f "${new_path}.cmd"; then
43551 43537 input_to_shortpath="${new_path}.cmd"
43552 43538 else
43553 43539 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43554 43540 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43555 43541 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43556 43542 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43557 43543 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43558 43544 fi
43559 43545 else
43560 43546 input_to_shortpath="$new_path"
43561 43547 fi
43562 43548
43563 43549 # Call helper function which possibly converts this using DOS-style short mode.
43564 43550 # If so, the updated path is stored in $new_path.
43565 43551 new_path="$input_to_shortpath"
43566 43552
43567 43553 input_path="$input_to_shortpath"
43568 43554 # Check if we need to convert this using DOS-style short mode. If the path
43569 43555 # contains just simple characters, use it. Otherwise (spaces, weird characters),
43570 43556 # take no chances and rewrite it.
43571 43557 # Note: m4 eats our [], so we need to use [ and ] instead.
43572 43558 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43573 43559 if test "x$has_forbidden_chars" != x; then
43574 43560 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43575 43561 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43576 43562 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43577 43563 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43578 43564 # Going to short mode and back again did indeed matter. Since short mode is
43579 43565 # case insensitive, let's make it lowercase to improve readability.
43580 43566 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43581 43567 # Now convert it back to Unix-style (cygpath)
43582 43568 input_path=`$CYGPATH -u "$shortmode_path"`
43583 43569 new_path="$input_path"
43584 43570 fi
43585 43571 fi
43586 43572
43587 43573 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43588 43574 if test "x$test_cygdrive_prefix" = x; then
43589 43575 # As a simple fix, exclude /usr/bin since it's not a real path.
43590 43576 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43591 43577 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43592 43578 # a path prefixed by /cygdrive for fixpath to work.
43593 43579 new_path="$CYGWIN_ROOT_PATH$input_path"
43594 43580 fi
43595 43581 fi
43596 43582
43597 43583 # remove trailing .exe if any
43598 43584 new_path="${new_path/%.exe/}"
43599 43585
43600 43586 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43601 43587
43602 43588 # First separate the path from the arguments. This will split at the first
43603 43589 # space.
43604 43590 complete="$OBJDUMP"
43605 43591 path="${complete%% *}"
43606 43592 tmp="$complete EOL"
43607 43593 arguments="${tmp#* }"
43608 43594
43609 43595 # Input might be given as Windows format, start by converting to
43610 43596 # unix format.
43611 43597 new_path="$path"
43612 43598
43613 43599 windows_path="$new_path"
43614 43600 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43615 43601 unix_path=`$CYGPATH -u "$windows_path"`
43616 43602 new_path="$unix_path"
43617 43603 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43618 43604 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43619 43605 new_path="$unix_path"
43620 43606 fi
43621 43607
43622 43608
43623 43609 # Now try to locate executable using which
43624 43610 new_path=`$WHICH "$new_path" 2> /dev/null`
43625 43611
43626 43612 if test "x$new_path" = x; then
43627 43613 # Oops. Which didn't find the executable.
43628 43614 # The splitting of arguments from the executable at a space might have been incorrect,
43629 43615 # since paths with space are more likely in Windows. Give it another try with the whole
43630 43616 # argument.
43631 43617 path="$complete"
43632 43618 arguments="EOL"
43633 43619 new_path="$path"
43634 43620
43635 43621 windows_path="$new_path"
43636 43622 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43637 43623 unix_path=`$CYGPATH -u "$windows_path"`
43638 43624 new_path="$unix_path"
43639 43625 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43640 43626 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43641 43627 new_path="$unix_path"
43642 43628 fi
43643 43629
43644 43630
43645 43631 new_path=`$WHICH "$new_path" 2> /dev/null`
43646 43632 # bat and cmd files are not always considered executable in MSYS causing which
43647 43633 # to not find them
43648 43634 if test "x$new_path" = x \
43649 43635 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43650 43636 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43651 43637 new_path="$path"
43652 43638
43653 43639 windows_path="$new_path"
43654 43640 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43655 43641 unix_path=`$CYGPATH -u "$windows_path"`
43656 43642 new_path="$unix_path"
43657 43643 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43658 43644 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43659 43645 new_path="$unix_path"
43660 43646 fi
43661 43647
43662 43648 fi
43663 43649
43664 43650 if test "x$new_path" = x; then
43665 43651 # It's still not found. Now this is an unrecoverable error.
43666 43652 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43667 43653 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43668 43654 has_space=`$ECHO "$complete" | $GREP " "`
43669 43655 if test "x$has_space" != x; then
43670 43656 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43671 43657 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43672 43658 fi
43673 43659 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43674 43660 fi
43675 43661 fi
43676 43662
43677 43663 # Now new_path has a complete unix path to the binary
43678 43664 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43679 43665 # Keep paths in /bin as-is, but remove trailing .exe if any
43680 43666 new_path="${new_path/%.exe/}"
43681 43667 # Do not save /bin paths to all_fixpath_prefixes!
43682 43668 else
43683 43669 # Not in mixed or Windows style, start by that.
43684 43670 new_path=`cmd //c echo $new_path`
43685 43671
43686 43672 input_path="$new_path"
43687 43673 # Check if we need to convert this using DOS-style short mode. If the path
43688 43674 # contains just simple characters, use it. Otherwise (spaces, weird characters),
43689 43675 # take no chances and rewrite it.
43690 43676 # Note: m4 eats our [], so we need to use [ and ] instead.
43691 43677 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43692 43678 if test "x$has_forbidden_chars" != x; then
43693 43679 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43694 43680 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43695 43681 fi
43696 43682
43697 43683 # Output is in $new_path
43698 43684
43699 43685 windows_path="$new_path"
43700 43686 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43701 43687 unix_path=`$CYGPATH -u "$windows_path"`
43702 43688 new_path="$unix_path"
43703 43689 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43704 43690 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43705 43691 new_path="$unix_path"
43706 43692 fi
43707 43693
43708 43694 # remove trailing .exe if any
43709 43695 new_path="${new_path/%.exe/}"
43710 43696
43711 43697 # Save the first 10 bytes of this path to the storage, so fixpath can work.
43712 43698 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43713 43699 fi
43714 43700
43715 43701 else
43716 43702 # We're on a unix platform. Hooray! :)
43717 43703 # First separate the path from the arguments. This will split at the first
43718 43704 # space.
43719 43705 complete="$OBJDUMP"
43720 43706 path="${complete%% *}"
43721 43707 tmp="$complete EOL"
43722 43708 arguments="${tmp#* }"
43723 43709
43724 43710 # Cannot rely on the command "which" here since it doesn't always work.
43725 43711 is_absolute_path=`$ECHO "$path" | $GREP ^/`
43726 43712 if test -z "$is_absolute_path"; then
43727 43713 # Path to executable is not absolute. Find it.
43728 43714 IFS_save="$IFS"
43729 43715 IFS=:
43730 43716 for p in $PATH; do
43731 43717 if test -f "$p/$path" && test -x "$p/$path"; then
43732 43718 new_path="$p/$path"
43733 43719 break
43734 43720 fi
43735 43721 done
43736 43722 IFS="$IFS_save"
43737 43723 else
43738 43724 # This is an absolute path, we can use it without further modifications.
43739 43725 new_path="$path"
43740 43726 fi
43741 43727
43742 43728 if test "x$new_path" = x; then
43743 43729 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43744 43730 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43745 43731 has_space=`$ECHO "$complete" | $GREP " "`
43746 43732 if test "x$has_space" != x; then
43747 43733 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43748 43734 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43749 43735 fi
43750 43736 as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43751 43737 fi
43752 43738 fi
43753 43739
43754 43740 # Now join together the path and the arguments once again
43755 43741 if test "x$arguments" != xEOL; then
43756 43742 new_complete="$new_path ${arguments% *}"
43757 43743 else
43758 43744 new_complete="$new_path"
43759 43745 fi
43760 43746
43761 43747 if test "x$complete" != "x$new_complete"; then
43762 43748 OBJDUMP="$new_complete"
43763 43749 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43764 43750 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43765 43751 fi
43766 43752 fi
43767 43753
43768 43754 fi
43769 43755
43770 43756
43771 43757 # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43772 43758 # to remain in place. Otherwise the compiler will not work in some siutations
43773 43759 # in later configure checks.
43774 43760 if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43775 43761 PATH="$OLD_PATH"
43776 43762 fi
43777 43763
43778 43764 # Restore the flags to the user specified values.
43779 43765 # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43780 43766 CFLAGS="$ORG_CFLAGS"
43781 43767 CXXFLAGS="$ORG_CXXFLAGS"
43782 43768
43783 43769
43784 43770 # Finally do some processing after the detection phase
43785 43771
43786 43772 if test "x$COMPILE_TYPE" = "xcross"; then
43787 43773 # Now we need to find a C/C++ compiler that can build executables for the
43788 43774 # build platform. We can't use the AC_PROG_CC macro, since it can only be
43789 43775 # used once. Also, we need to do this without adding a tools dir to the
43790 43776 # path, otherwise we might pick up cross-compilers which don't use standard
43791 43777 # naming.
43792 43778
43793 43779 OLDPATH="$PATH"
43794 43780
43795 43781
43796 43782 # Check whether --with-build-devkit was given.
43797 43783 if test "${with_build_devkit+set}" = set; then :
43798 43784 withval=$with_build_devkit;
43799 43785 fi
43800 43786
43801 43787 if test "x$with_build_devkit" = "xyes"; then
43802 43788 as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43803 43789 elif test -n "$with_build_devkit"; then
43804 43790 if test ! -d "$with_build_devkit"; then
43805 43791 as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43806 43792 else
43807 43793
43808 43794 # Only process if variable expands to non-empty
43809 43795
43810 43796 if test "x$with_build_devkit" != x; then
43811 43797 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43812 43798
43813 43799 # Input might be given as Windows format, start by converting to
43814 43800 # unix format.
43815 43801 path="$with_build_devkit"
43816 43802 new_path=`$CYGPATH -u "$path"`
43817 43803
43818 43804 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43819 43805 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43820 43806 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43821 43807 # "foo.exe" is OK but "foo" is an error.
43822 43808 #
43823 43809 # This test is therefore slightly more accurate than "test -f" to check for file precense.
43824 43810 # It is also a way to make sure we got the proper file name for the real test later on.
43825 43811 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43826 43812 if test "x$test_shortpath" = x; then
43827 43813 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43828 43814 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43829 43815 as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43830 43816 fi
43831 43817
43832 43818 # Call helper function which possibly converts this using DOS-style short mode.
43833 43819 # If so, the updated path is stored in $new_path.
43834 43820
43835 43821 input_path="$new_path"
43836 43822 # Check if we need to convert this using DOS-style short mode. If the path
43837 43823 # contains just simple characters, use it. Otherwise (spaces, weird characters),
43838 43824 # take no chances and rewrite it.
43839 43825 # Note: m4 eats our [], so we need to use [ and ] instead.
43840 43826 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43841 43827 if test "x$has_forbidden_chars" != x; then
43842 43828 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43843 43829 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43844 43830 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43845 43831 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43846 43832 # Going to short mode and back again did indeed matter. Since short mode is
43847 43833 # case insensitive, let's make it lowercase to improve readability.
43848 43834 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43849 43835 # Now convert it back to Unix-style (cygpath)
43850 43836 input_path=`$CYGPATH -u "$shortmode_path"`
43851 43837 new_path="$input_path"
43852 43838 fi
43853 43839 fi
43854 43840
43855 43841 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43856 43842 if test "x$test_cygdrive_prefix" = x; then
43857 43843 # As a simple fix, exclude /usr/bin since it's not a real path.
43858 43844 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43859 43845 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43860 43846 # a path prefixed by /cygdrive for fixpath to work.
43861 43847 new_path="$CYGWIN_ROOT_PATH$input_path"
43862 43848 fi
43863 43849 fi
43864 43850
43865 43851
43866 43852 if test "x$path" != "x$new_path"; then
43867 43853 with_build_devkit="$new_path"
43868 43854 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43869 43855 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43870 43856 fi
43871 43857
43872 43858 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43873 43859
43874 43860 path="$with_build_devkit"
43875 43861 has_colon=`$ECHO $path | $GREP ^.:`
43876 43862 new_path="$path"
43877 43863 if test "x$has_colon" = x; then
43878 43864 # Not in mixed or Windows style, start by that.
43879 43865 new_path=`cmd //c echo $path`
43880 43866 fi
43881 43867
43882 43868
43883 43869 input_path="$new_path"
43884 43870 # Check if we need to convert this using DOS-style short mode. If the path
43885 43871 # contains just simple characters, use it. Otherwise (spaces, weird characters),
43886 43872 # take no chances and rewrite it.
43887 43873 # Note: m4 eats our [], so we need to use [ and ] instead.
43888 43874 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43889 43875 if test "x$has_forbidden_chars" != x; then
43890 43876 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43891 43877 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43892 43878 fi
43893 43879
43894 43880
43895 43881 windows_path="$new_path"
43896 43882 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43897 43883 unix_path=`$CYGPATH -u "$windows_path"`
43898 43884 new_path="$unix_path"
43899 43885 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43900 43886 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43901 43887 new_path="$unix_path"
43902 43888 fi
43903 43889
43904 43890 if test "x$path" != "x$new_path"; then
43905 43891 with_build_devkit="$new_path"
43906 43892 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43907 43893 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43908 43894 fi
43909 43895
43910 43896 # Save the first 10 bytes of this path to the storage, so fixpath can work.
43911 43897 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43912 43898
43913 43899 else
43914 43900 # We're on a unix platform. Hooray! :)
43915 43901 path="$with_build_devkit"
43916 43902 has_space=`$ECHO "$path" | $GREP " "`
43917 43903 if test "x$has_space" != x; then
43918 43904 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43919 43905 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43920 43906 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43921 43907 fi
43922 43908
43923 43909 # Use eval to expand a potential ~
43924 43910 eval path="$path"
43925 43911 if test ! -f "$path" && test ! -d "$path"; then
43926 43912 as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43927 43913 fi
43928 43914
43929 43915 if test -d "$path"; then
43930 43916 with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43931 43917 else
43932 43918 dir="`$DIRNAME "$path"`"
43933 43919 base="`$BASENAME "$path"`"
43934 43920 with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43935 43921 fi
43936 43922 fi
43937 43923 fi
43938 43924
43939 43925 BUILD_DEVKIT_ROOT="$with_build_devkit"
43940 43926 # Check for a meta data info file in the root of the devkit
43941 43927 if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43942 43928 # Process devkit.info so that existing devkit variables are not
43943 43929 # modified by this
43944 43930 $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43945 43931 -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43946 43932 -e "s/\$host/\$build/g" \
43947 43933 $BUILD_DEVKIT_ROOT/devkit.info \
43948 43934 > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43949 43935 . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43950 43936 # This potentially sets the following:
43951 43937 # A descriptive name of the devkit
43952 43938
43953 43939 if test "x$BUILD_DEVKIT_NAME" = x; then
43954 43940 eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43955 43941 fi
43956 43942
43957 43943 # Corresponds to --with-extra-path
43958 43944
43959 43945 if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43960 43946 eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43961 43947 fi
43962 43948
43963 43949 # Corresponds to --with-toolchain-path
43964 43950
43965 43951 if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43966 43952 eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43967 43953 fi
43968 43954
43969 43955 # Corresponds to --with-sysroot
43970 43956
43971 43957 if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43972 43958 eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43973 43959 fi
43974 43960
43975 43961 # Skip the Window specific parts
43976 43962 fi
43977 43963
43978 43964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43979 43965 $as_echo_n "checking for build platform devkit... " >&6; }
43980 43966 if test "x$BUILD_DEVKIT_NAME" != x; then
43981 43967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43982 43968 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43983 43969 else
43984 43970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43985 43971 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43986 43972 fi
43987 43973
43988 43974 BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
↓ open down ↓ |
10980 lines elided |
↑ open up ↑ |
43989 43975
43990 43976 if test "x$BUILD_SYSROOT" != "x"; then
43991 43977 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43992 43978 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43993 43979 # Solaris Studio does not have a concept of sysroot. Instead we must
43994 43980 # make sure the default include and lib dirs are appended to each
43995 43981 # compile and link command line. Must also add -I-xbuiltin to enable
43996 43982 # inlining of system functions and intrinsics.
43997 43983 BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43998 43984 BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43999 - -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
44000 - -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43985 + -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44001 43986 fi
44002 43987 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44003 43988 BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44004 43989 BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44005 43990 elif test "x$TOOLCHAIN_TYPE" = xclang; then
44006 43991 BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44007 43992 BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44008 43993 fi
44009 43994 # Propagate the sysroot args to hotspot
44010 43995 BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44011 43996 BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44012 43997 BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44013 43998 # The global CFLAGS and LDFLAGS variables need these for configure to function
44014 43999 BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44015 44000 BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44016 44001 BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44017 44002 BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44018 44003 fi
44019 44004
44020 44005 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44021 44006 # We also need -iframework<path>/System/Library/Frameworks
44022 44007 BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44023 44008 BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44024 44009 # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44025 44010 # set this here so it doesn't have to be peppered throughout the forest
44026 44011 BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44027 44012 BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44028 44013 fi
44029 44014
44030 44015
44031 44016
44032 44017
44033 44018
44034 44019 # Fallback default of just /bin if DEVKIT_PATH is not defined
44035 44020 if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44036 44021 BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44037 44022 fi
44038 44023 PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44039 44024 fi
44040 44025 fi
44041 44026
44042 44027 # FIXME: we should list the discovered compilers as an exclude pattern!
44043 44028 # If we do that, we can do this detection before POST_DETECTION, and still
44044 44029 # find the build compilers in the tools dir, if needed.
44045 44030
44046 44031
44047 44032
44048 44033 # Publish this variable in the help.
44049 44034
44050 44035
44051 44036 if [ -z "${BUILD_CC+x}" ]; then
44052 44037 # The variable is not set by user, try to locate tool using the code snippet
44053 44038 for ac_prog in cl cc gcc
44054 44039 do
44055 44040 # Extract the first word of "$ac_prog", so it can be a program name with args.
44056 44041 set dummy $ac_prog; ac_word=$2
44057 44042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44058 44043 $as_echo_n "checking for $ac_word... " >&6; }
44059 44044 if ${ac_cv_path_BUILD_CC+:} false; then :
44060 44045 $as_echo_n "(cached) " >&6
44061 44046 else
44062 44047 case $BUILD_CC in
44063 44048 [\\/]* | ?:[\\/]*)
44064 44049 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44065 44050 ;;
44066 44051 *)
44067 44052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44068 44053 for as_dir in $PATH
44069 44054 do
44070 44055 IFS=$as_save_IFS
44071 44056 test -z "$as_dir" && as_dir=.
44072 44057 for ac_exec_ext in '' $ac_executable_extensions; do
44073 44058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44074 44059 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44075 44060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44076 44061 break 2
44077 44062 fi
44078 44063 done
44079 44064 done
44080 44065 IFS=$as_save_IFS
44081 44066
44082 44067 ;;
44083 44068 esac
44084 44069 fi
44085 44070 BUILD_CC=$ac_cv_path_BUILD_CC
44086 44071 if test -n "$BUILD_CC"; then
44087 44072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44088 44073 $as_echo "$BUILD_CC" >&6; }
44089 44074 else
44090 44075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44091 44076 $as_echo "no" >&6; }
44092 44077 fi
44093 44078
44094 44079
44095 44080 test -n "$BUILD_CC" && break
44096 44081 done
44097 44082
44098 44083 else
44099 44084 # The variable is set, but is it from the command line or the environment?
44100 44085
44101 44086 # Try to remove the string !BUILD_CC! from our list.
44102 44087 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44103 44088 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44104 44089 # If it failed, the variable was not from the command line. Ignore it,
44105 44090 # but warn the user (except for BASH, which is always set by the calling BASH).
44106 44091 if test "xBUILD_CC" != xBASH; then
44107 44092 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44108 44093 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44109 44094 fi
44110 44095 # Try to locate tool using the code snippet
44111 44096 for ac_prog in cl cc gcc
44112 44097 do
44113 44098 # Extract the first word of "$ac_prog", so it can be a program name with args.
44114 44099 set dummy $ac_prog; ac_word=$2
44115 44100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44116 44101 $as_echo_n "checking for $ac_word... " >&6; }
44117 44102 if ${ac_cv_path_BUILD_CC+:} false; then :
44118 44103 $as_echo_n "(cached) " >&6
44119 44104 else
44120 44105 case $BUILD_CC in
44121 44106 [\\/]* | ?:[\\/]*)
44122 44107 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44123 44108 ;;
44124 44109 *)
44125 44110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44126 44111 for as_dir in $PATH
44127 44112 do
44128 44113 IFS=$as_save_IFS
44129 44114 test -z "$as_dir" && as_dir=.
44130 44115 for ac_exec_ext in '' $ac_executable_extensions; do
44131 44116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44132 44117 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44133 44118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44134 44119 break 2
44135 44120 fi
44136 44121 done
44137 44122 done
44138 44123 IFS=$as_save_IFS
44139 44124
44140 44125 ;;
44141 44126 esac
44142 44127 fi
44143 44128 BUILD_CC=$ac_cv_path_BUILD_CC
44144 44129 if test -n "$BUILD_CC"; then
44145 44130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44146 44131 $as_echo "$BUILD_CC" >&6; }
44147 44132 else
44148 44133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44149 44134 $as_echo "no" >&6; }
44150 44135 fi
44151 44136
44152 44137
44153 44138 test -n "$BUILD_CC" && break
44154 44139 done
44155 44140
44156 44141 else
44157 44142 # If it succeeded, then it was overridden by the user. We will use it
44158 44143 # for the tool.
44159 44144
44160 44145 # First remove it from the list of overridden variables, so we can test
44161 44146 # for unknown variables in the end.
44162 44147 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44163 44148
44164 44149 # Check if we try to supply an empty value
44165 44150 if test "x$BUILD_CC" = x; then
44166 44151 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44167 44152 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44168 44153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44169 44154 $as_echo_n "checking for BUILD_CC... " >&6; }
44170 44155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44171 44156 $as_echo "disabled" >&6; }
44172 44157 else
44173 44158 # Check if the provided tool contains a complete path.
44174 44159 tool_specified="$BUILD_CC"
44175 44160 tool_basename="${tool_specified##*/}"
44176 44161 if test "x$tool_basename" = "x$tool_specified"; then
44177 44162 # A command without a complete path is provided, search $PATH.
44178 44163 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44179 44164 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44180 44165 # Extract the first word of "$tool_basename", so it can be a program name with args.
44181 44166 set dummy $tool_basename; ac_word=$2
44182 44167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44183 44168 $as_echo_n "checking for $ac_word... " >&6; }
44184 44169 if ${ac_cv_path_BUILD_CC+:} false; then :
44185 44170 $as_echo_n "(cached) " >&6
44186 44171 else
44187 44172 case $BUILD_CC in
44188 44173 [\\/]* | ?:[\\/]*)
44189 44174 ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44190 44175 ;;
44191 44176 *)
44192 44177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44193 44178 for as_dir in $PATH
44194 44179 do
44195 44180 IFS=$as_save_IFS
44196 44181 test -z "$as_dir" && as_dir=.
44197 44182 for ac_exec_ext in '' $ac_executable_extensions; do
44198 44183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44199 44184 ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44200 44185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44201 44186 break 2
44202 44187 fi
44203 44188 done
44204 44189 done
44205 44190 IFS=$as_save_IFS
44206 44191
44207 44192 ;;
44208 44193 esac
44209 44194 fi
44210 44195 BUILD_CC=$ac_cv_path_BUILD_CC
44211 44196 if test -n "$BUILD_CC"; then
44212 44197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44213 44198 $as_echo "$BUILD_CC" >&6; }
44214 44199 else
44215 44200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44216 44201 $as_echo "no" >&6; }
44217 44202 fi
44218 44203
44219 44204
44220 44205 if test "x$BUILD_CC" = x; then
44221 44206 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44222 44207 fi
44223 44208 else
44224 44209 # Otherwise we believe it is a complete path. Use it as it is.
44225 44210 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44226 44211 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44227 44212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44228 44213 $as_echo_n "checking for BUILD_CC... " >&6; }
44229 44214 if test ! -x "$tool_specified"; then
44230 44215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44231 44216 $as_echo "not found" >&6; }
44232 44217 as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44233 44218 fi
44234 44219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44235 44220 $as_echo "$tool_specified" >&6; }
44236 44221 fi
44237 44222 fi
44238 44223 fi
44239 44224
44240 44225 fi
44241 44226
44242 44227
44243 44228
44244 44229 if test "x$BUILD_CC" = x; then
44245 44230 as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44246 44231 fi
44247 44232
44248 44233
44249 44234
44250 44235 # Only process if variable expands to non-empty
44251 44236
44252 44237 if test "x$BUILD_CC" != x; then
44253 44238 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44254 44239
44255 44240 # First separate the path from the arguments. This will split at the first
44256 44241 # space.
44257 44242 complete="$BUILD_CC"
44258 44243 path="${complete%% *}"
44259 44244 tmp="$complete EOL"
44260 44245 arguments="${tmp#* }"
44261 44246
44262 44247 # Input might be given as Windows format, start by converting to
44263 44248 # unix format.
44264 44249 new_path=`$CYGPATH -u "$path"`
44265 44250
44266 44251 # Now try to locate executable using which
44267 44252 new_path=`$WHICH "$new_path" 2> /dev/null`
44268 44253 # bat and cmd files are not always considered executable in cygwin causing which
44269 44254 # to not find them
44270 44255 if test "x$new_path" = x \
44271 44256 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44272 44257 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44273 44258 new_path=`$CYGPATH -u "$path"`
44274 44259 fi
44275 44260 if test "x$new_path" = x; then
44276 44261 # Oops. Which didn't find the executable.
44277 44262 # The splitting of arguments from the executable at a space might have been incorrect,
44278 44263 # since paths with space are more likely in Windows. Give it another try with the whole
44279 44264 # argument.
44280 44265 path="$complete"
44281 44266 arguments="EOL"
44282 44267 new_path=`$CYGPATH -u "$path"`
44283 44268 new_path=`$WHICH "$new_path" 2> /dev/null`
44284 44269 # bat and cmd files are not always considered executable in cygwin causing which
44285 44270 # to not find them
44286 44271 if test "x$new_path" = x \
44287 44272 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44288 44273 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44289 44274 new_path=`$CYGPATH -u "$path"`
44290 44275 fi
44291 44276 if test "x$new_path" = x; then
44292 44277 # It's still not found. Now this is an unrecoverable error.
44293 44278 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44294 44279 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44295 44280 has_space=`$ECHO "$complete" | $GREP " "`
44296 44281 if test "x$has_space" != x; then
44297 44282 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44298 44283 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44299 44284 fi
44300 44285 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44301 44286 fi
44302 44287 fi
44303 44288
44304 44289 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44305 44290 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44306 44291 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44307 44292 # "foo.exe" is OK but "foo" is an error.
44308 44293 #
44309 44294 # This test is therefore slightly more accurate than "test -f" to check for file presence.
44310 44295 # It is also a way to make sure we got the proper file name for the real test later on.
44311 44296 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44312 44297 if test "x$test_shortpath" = x; then
44313 44298 # Short path failed, file does not exist as specified.
44314 44299 # Try adding .exe or .cmd
44315 44300 if test -f "${new_path}.exe"; then
44316 44301 input_to_shortpath="${new_path}.exe"
44317 44302 elif test -f "${new_path}.cmd"; then
44318 44303 input_to_shortpath="${new_path}.cmd"
44319 44304 else
44320 44305 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44321 44306 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44322 44307 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44323 44308 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44324 44309 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44325 44310 fi
44326 44311 else
44327 44312 input_to_shortpath="$new_path"
44328 44313 fi
44329 44314
44330 44315 # Call helper function which possibly converts this using DOS-style short mode.
44331 44316 # If so, the updated path is stored in $new_path.
44332 44317 new_path="$input_to_shortpath"
44333 44318
44334 44319 input_path="$input_to_shortpath"
44335 44320 # Check if we need to convert this using DOS-style short mode. If the path
44336 44321 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44337 44322 # take no chances and rewrite it.
44338 44323 # Note: m4 eats our [], so we need to use [ and ] instead.
44339 44324 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44340 44325 if test "x$has_forbidden_chars" != x; then
44341 44326 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44342 44327 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44343 44328 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44344 44329 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44345 44330 # Going to short mode and back again did indeed matter. Since short mode is
44346 44331 # case insensitive, let's make it lowercase to improve readability.
44347 44332 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44348 44333 # Now convert it back to Unix-style (cygpath)
44349 44334 input_path=`$CYGPATH -u "$shortmode_path"`
44350 44335 new_path="$input_path"
44351 44336 fi
44352 44337 fi
44353 44338
44354 44339 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44355 44340 if test "x$test_cygdrive_prefix" = x; then
44356 44341 # As a simple fix, exclude /usr/bin since it's not a real path.
44357 44342 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44358 44343 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44359 44344 # a path prefixed by /cygdrive for fixpath to work.
44360 44345 new_path="$CYGWIN_ROOT_PATH$input_path"
44361 44346 fi
44362 44347 fi
44363 44348
44364 44349 # remove trailing .exe if any
44365 44350 new_path="${new_path/%.exe/}"
44366 44351
44367 44352 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44368 44353
44369 44354 # First separate the path from the arguments. This will split at the first
44370 44355 # space.
44371 44356 complete="$BUILD_CC"
44372 44357 path="${complete%% *}"
44373 44358 tmp="$complete EOL"
44374 44359 arguments="${tmp#* }"
44375 44360
44376 44361 # Input might be given as Windows format, start by converting to
44377 44362 # unix format.
44378 44363 new_path="$path"
44379 44364
44380 44365 windows_path="$new_path"
44381 44366 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44382 44367 unix_path=`$CYGPATH -u "$windows_path"`
44383 44368 new_path="$unix_path"
44384 44369 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44385 44370 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44386 44371 new_path="$unix_path"
44387 44372 fi
44388 44373
44389 44374
44390 44375 # Now try to locate executable using which
44391 44376 new_path=`$WHICH "$new_path" 2> /dev/null`
44392 44377
44393 44378 if test "x$new_path" = x; then
44394 44379 # Oops. Which didn't find the executable.
44395 44380 # The splitting of arguments from the executable at a space might have been incorrect,
44396 44381 # since paths with space are more likely in Windows. Give it another try with the whole
44397 44382 # argument.
44398 44383 path="$complete"
44399 44384 arguments="EOL"
44400 44385 new_path="$path"
44401 44386
44402 44387 windows_path="$new_path"
44403 44388 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44404 44389 unix_path=`$CYGPATH -u "$windows_path"`
44405 44390 new_path="$unix_path"
44406 44391 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44407 44392 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44408 44393 new_path="$unix_path"
44409 44394 fi
44410 44395
44411 44396
44412 44397 new_path=`$WHICH "$new_path" 2> /dev/null`
44413 44398 # bat and cmd files are not always considered executable in MSYS causing which
44414 44399 # to not find them
44415 44400 if test "x$new_path" = x \
44416 44401 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44417 44402 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44418 44403 new_path="$path"
44419 44404
44420 44405 windows_path="$new_path"
44421 44406 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44422 44407 unix_path=`$CYGPATH -u "$windows_path"`
44423 44408 new_path="$unix_path"
44424 44409 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44425 44410 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44426 44411 new_path="$unix_path"
44427 44412 fi
44428 44413
44429 44414 fi
44430 44415
44431 44416 if test "x$new_path" = x; then
44432 44417 # It's still not found. Now this is an unrecoverable error.
44433 44418 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44434 44419 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44435 44420 has_space=`$ECHO "$complete" | $GREP " "`
44436 44421 if test "x$has_space" != x; then
44437 44422 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44438 44423 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44439 44424 fi
44440 44425 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44441 44426 fi
44442 44427 fi
44443 44428
44444 44429 # Now new_path has a complete unix path to the binary
44445 44430 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44446 44431 # Keep paths in /bin as-is, but remove trailing .exe if any
44447 44432 new_path="${new_path/%.exe/}"
44448 44433 # Do not save /bin paths to all_fixpath_prefixes!
44449 44434 else
44450 44435 # Not in mixed or Windows style, start by that.
44451 44436 new_path=`cmd //c echo $new_path`
44452 44437
44453 44438 input_path="$new_path"
44454 44439 # Check if we need to convert this using DOS-style short mode. If the path
44455 44440 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44456 44441 # take no chances and rewrite it.
44457 44442 # Note: m4 eats our [], so we need to use [ and ] instead.
44458 44443 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44459 44444 if test "x$has_forbidden_chars" != x; then
44460 44445 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44461 44446 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44462 44447 fi
44463 44448
44464 44449 # Output is in $new_path
44465 44450
44466 44451 windows_path="$new_path"
44467 44452 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44468 44453 unix_path=`$CYGPATH -u "$windows_path"`
44469 44454 new_path="$unix_path"
44470 44455 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44471 44456 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44472 44457 new_path="$unix_path"
44473 44458 fi
44474 44459
44475 44460 # remove trailing .exe if any
44476 44461 new_path="${new_path/%.exe/}"
44477 44462
44478 44463 # Save the first 10 bytes of this path to the storage, so fixpath can work.
44479 44464 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44480 44465 fi
44481 44466
44482 44467 else
44483 44468 # We're on a unix platform. Hooray! :)
44484 44469 # First separate the path from the arguments. This will split at the first
44485 44470 # space.
44486 44471 complete="$BUILD_CC"
44487 44472 path="${complete%% *}"
44488 44473 tmp="$complete EOL"
44489 44474 arguments="${tmp#* }"
44490 44475
44491 44476 # Cannot rely on the command "which" here since it doesn't always work.
44492 44477 is_absolute_path=`$ECHO "$path" | $GREP ^/`
44493 44478 if test -z "$is_absolute_path"; then
44494 44479 # Path to executable is not absolute. Find it.
44495 44480 IFS_save="$IFS"
44496 44481 IFS=:
44497 44482 for p in $PATH; do
44498 44483 if test -f "$p/$path" && test -x "$p/$path"; then
44499 44484 new_path="$p/$path"
44500 44485 break
44501 44486 fi
44502 44487 done
44503 44488 IFS="$IFS_save"
44504 44489 else
44505 44490 # This is an absolute path, we can use it without further modifications.
44506 44491 new_path="$path"
44507 44492 fi
44508 44493
44509 44494 if test "x$new_path" = x; then
44510 44495 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44511 44496 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44512 44497 has_space=`$ECHO "$complete" | $GREP " "`
44513 44498 if test "x$has_space" != x; then
44514 44499 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44515 44500 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44516 44501 fi
44517 44502 as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44518 44503 fi
44519 44504 fi
44520 44505
44521 44506 # Now join together the path and the arguments once again
44522 44507 if test "x$arguments" != xEOL; then
44523 44508 new_complete="$new_path ${arguments% *}"
44524 44509 else
44525 44510 new_complete="$new_path"
44526 44511 fi
44527 44512
44528 44513 if test "x$complete" != "x$new_complete"; then
44529 44514 BUILD_CC="$new_complete"
44530 44515 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44531 44516 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44532 44517 fi
44533 44518 fi
44534 44519
44535 44520
44536 44521
44537 44522
44538 44523 # Publish this variable in the help.
44539 44524
44540 44525
44541 44526 if [ -z "${BUILD_CXX+x}" ]; then
44542 44527 # The variable is not set by user, try to locate tool using the code snippet
44543 44528 for ac_prog in cl CC g++
44544 44529 do
44545 44530 # Extract the first word of "$ac_prog", so it can be a program name with args.
44546 44531 set dummy $ac_prog; ac_word=$2
44547 44532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44548 44533 $as_echo_n "checking for $ac_word... " >&6; }
44549 44534 if ${ac_cv_path_BUILD_CXX+:} false; then :
44550 44535 $as_echo_n "(cached) " >&6
44551 44536 else
44552 44537 case $BUILD_CXX in
44553 44538 [\\/]* | ?:[\\/]*)
44554 44539 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44555 44540 ;;
44556 44541 *)
44557 44542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44558 44543 for as_dir in $PATH
44559 44544 do
44560 44545 IFS=$as_save_IFS
44561 44546 test -z "$as_dir" && as_dir=.
44562 44547 for ac_exec_ext in '' $ac_executable_extensions; do
44563 44548 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44564 44549 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44565 44550 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44566 44551 break 2
44567 44552 fi
44568 44553 done
44569 44554 done
44570 44555 IFS=$as_save_IFS
44571 44556
44572 44557 ;;
44573 44558 esac
44574 44559 fi
44575 44560 BUILD_CXX=$ac_cv_path_BUILD_CXX
44576 44561 if test -n "$BUILD_CXX"; then
44577 44562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44578 44563 $as_echo "$BUILD_CXX" >&6; }
44579 44564 else
44580 44565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44581 44566 $as_echo "no" >&6; }
44582 44567 fi
44583 44568
44584 44569
44585 44570 test -n "$BUILD_CXX" && break
44586 44571 done
44587 44572
44588 44573 else
44589 44574 # The variable is set, but is it from the command line or the environment?
44590 44575
44591 44576 # Try to remove the string !BUILD_CXX! from our list.
44592 44577 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44593 44578 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44594 44579 # If it failed, the variable was not from the command line. Ignore it,
44595 44580 # but warn the user (except for BASH, which is always set by the calling BASH).
44596 44581 if test "xBUILD_CXX" != xBASH; then
44597 44582 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44598 44583 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44599 44584 fi
44600 44585 # Try to locate tool using the code snippet
44601 44586 for ac_prog in cl CC g++
44602 44587 do
44603 44588 # Extract the first word of "$ac_prog", so it can be a program name with args.
44604 44589 set dummy $ac_prog; ac_word=$2
44605 44590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44606 44591 $as_echo_n "checking for $ac_word... " >&6; }
44607 44592 if ${ac_cv_path_BUILD_CXX+:} false; then :
44608 44593 $as_echo_n "(cached) " >&6
44609 44594 else
44610 44595 case $BUILD_CXX in
44611 44596 [\\/]* | ?:[\\/]*)
44612 44597 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44613 44598 ;;
44614 44599 *)
44615 44600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44616 44601 for as_dir in $PATH
44617 44602 do
44618 44603 IFS=$as_save_IFS
44619 44604 test -z "$as_dir" && as_dir=.
44620 44605 for ac_exec_ext in '' $ac_executable_extensions; do
44621 44606 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44622 44607 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44623 44608 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44624 44609 break 2
44625 44610 fi
44626 44611 done
44627 44612 done
44628 44613 IFS=$as_save_IFS
44629 44614
44630 44615 ;;
44631 44616 esac
44632 44617 fi
44633 44618 BUILD_CXX=$ac_cv_path_BUILD_CXX
44634 44619 if test -n "$BUILD_CXX"; then
44635 44620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44636 44621 $as_echo "$BUILD_CXX" >&6; }
44637 44622 else
44638 44623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44639 44624 $as_echo "no" >&6; }
44640 44625 fi
44641 44626
44642 44627
44643 44628 test -n "$BUILD_CXX" && break
44644 44629 done
44645 44630
44646 44631 else
44647 44632 # If it succeeded, then it was overridden by the user. We will use it
44648 44633 # for the tool.
44649 44634
44650 44635 # First remove it from the list of overridden variables, so we can test
44651 44636 # for unknown variables in the end.
44652 44637 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44653 44638
44654 44639 # Check if we try to supply an empty value
44655 44640 if test "x$BUILD_CXX" = x; then
44656 44641 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44657 44642 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44658 44643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44659 44644 $as_echo_n "checking for BUILD_CXX... " >&6; }
44660 44645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44661 44646 $as_echo "disabled" >&6; }
44662 44647 else
44663 44648 # Check if the provided tool contains a complete path.
44664 44649 tool_specified="$BUILD_CXX"
44665 44650 tool_basename="${tool_specified##*/}"
44666 44651 if test "x$tool_basename" = "x$tool_specified"; then
44667 44652 # A command without a complete path is provided, search $PATH.
44668 44653 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44669 44654 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44670 44655 # Extract the first word of "$tool_basename", so it can be a program name with args.
44671 44656 set dummy $tool_basename; ac_word=$2
44672 44657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44673 44658 $as_echo_n "checking for $ac_word... " >&6; }
44674 44659 if ${ac_cv_path_BUILD_CXX+:} false; then :
44675 44660 $as_echo_n "(cached) " >&6
44676 44661 else
44677 44662 case $BUILD_CXX in
44678 44663 [\\/]* | ?:[\\/]*)
44679 44664 ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44680 44665 ;;
44681 44666 *)
44682 44667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44683 44668 for as_dir in $PATH
44684 44669 do
44685 44670 IFS=$as_save_IFS
44686 44671 test -z "$as_dir" && as_dir=.
44687 44672 for ac_exec_ext in '' $ac_executable_extensions; do
44688 44673 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44689 44674 ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44690 44675 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44691 44676 break 2
44692 44677 fi
44693 44678 done
44694 44679 done
44695 44680 IFS=$as_save_IFS
44696 44681
44697 44682 ;;
44698 44683 esac
44699 44684 fi
44700 44685 BUILD_CXX=$ac_cv_path_BUILD_CXX
44701 44686 if test -n "$BUILD_CXX"; then
44702 44687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44703 44688 $as_echo "$BUILD_CXX" >&6; }
44704 44689 else
44705 44690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44706 44691 $as_echo "no" >&6; }
44707 44692 fi
44708 44693
44709 44694
44710 44695 if test "x$BUILD_CXX" = x; then
44711 44696 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44712 44697 fi
44713 44698 else
44714 44699 # Otherwise we believe it is a complete path. Use it as it is.
44715 44700 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44716 44701 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44717 44702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44718 44703 $as_echo_n "checking for BUILD_CXX... " >&6; }
44719 44704 if test ! -x "$tool_specified"; then
44720 44705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44721 44706 $as_echo "not found" >&6; }
44722 44707 as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44723 44708 fi
44724 44709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44725 44710 $as_echo "$tool_specified" >&6; }
44726 44711 fi
44727 44712 fi
44728 44713 fi
44729 44714
44730 44715 fi
44731 44716
44732 44717
44733 44718
44734 44719 if test "x$BUILD_CXX" = x; then
44735 44720 as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44736 44721 fi
44737 44722
44738 44723
44739 44724
44740 44725 # Only process if variable expands to non-empty
44741 44726
44742 44727 if test "x$BUILD_CXX" != x; then
44743 44728 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44744 44729
44745 44730 # First separate the path from the arguments. This will split at the first
44746 44731 # space.
44747 44732 complete="$BUILD_CXX"
44748 44733 path="${complete%% *}"
44749 44734 tmp="$complete EOL"
44750 44735 arguments="${tmp#* }"
44751 44736
44752 44737 # Input might be given as Windows format, start by converting to
44753 44738 # unix format.
44754 44739 new_path=`$CYGPATH -u "$path"`
44755 44740
44756 44741 # Now try to locate executable using which
44757 44742 new_path=`$WHICH "$new_path" 2> /dev/null`
44758 44743 # bat and cmd files are not always considered executable in cygwin causing which
44759 44744 # to not find them
44760 44745 if test "x$new_path" = x \
44761 44746 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44762 44747 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44763 44748 new_path=`$CYGPATH -u "$path"`
44764 44749 fi
44765 44750 if test "x$new_path" = x; then
44766 44751 # Oops. Which didn't find the executable.
44767 44752 # The splitting of arguments from the executable at a space might have been incorrect,
44768 44753 # since paths with space are more likely in Windows. Give it another try with the whole
44769 44754 # argument.
44770 44755 path="$complete"
44771 44756 arguments="EOL"
44772 44757 new_path=`$CYGPATH -u "$path"`
44773 44758 new_path=`$WHICH "$new_path" 2> /dev/null`
44774 44759 # bat and cmd files are not always considered executable in cygwin causing which
44775 44760 # to not find them
44776 44761 if test "x$new_path" = x \
44777 44762 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44778 44763 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44779 44764 new_path=`$CYGPATH -u "$path"`
44780 44765 fi
44781 44766 if test "x$new_path" = x; then
44782 44767 # It's still not found. Now this is an unrecoverable error.
44783 44768 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44784 44769 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44785 44770 has_space=`$ECHO "$complete" | $GREP " "`
44786 44771 if test "x$has_space" != x; then
44787 44772 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44788 44773 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44789 44774 fi
44790 44775 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44791 44776 fi
44792 44777 fi
44793 44778
44794 44779 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44795 44780 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44796 44781 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44797 44782 # "foo.exe" is OK but "foo" is an error.
44798 44783 #
44799 44784 # This test is therefore slightly more accurate than "test -f" to check for file presence.
44800 44785 # It is also a way to make sure we got the proper file name for the real test later on.
44801 44786 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44802 44787 if test "x$test_shortpath" = x; then
44803 44788 # Short path failed, file does not exist as specified.
44804 44789 # Try adding .exe or .cmd
44805 44790 if test -f "${new_path}.exe"; then
44806 44791 input_to_shortpath="${new_path}.exe"
44807 44792 elif test -f "${new_path}.cmd"; then
44808 44793 input_to_shortpath="${new_path}.cmd"
44809 44794 else
44810 44795 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44811 44796 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44812 44797 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44813 44798 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44814 44799 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44815 44800 fi
44816 44801 else
44817 44802 input_to_shortpath="$new_path"
44818 44803 fi
44819 44804
44820 44805 # Call helper function which possibly converts this using DOS-style short mode.
44821 44806 # If so, the updated path is stored in $new_path.
44822 44807 new_path="$input_to_shortpath"
44823 44808
44824 44809 input_path="$input_to_shortpath"
44825 44810 # Check if we need to convert this using DOS-style short mode. If the path
44826 44811 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44827 44812 # take no chances and rewrite it.
44828 44813 # Note: m4 eats our [], so we need to use [ and ] instead.
44829 44814 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44830 44815 if test "x$has_forbidden_chars" != x; then
44831 44816 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44832 44817 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44833 44818 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44834 44819 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44835 44820 # Going to short mode and back again did indeed matter. Since short mode is
44836 44821 # case insensitive, let's make it lowercase to improve readability.
44837 44822 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44838 44823 # Now convert it back to Unix-style (cygpath)
44839 44824 input_path=`$CYGPATH -u "$shortmode_path"`
44840 44825 new_path="$input_path"
44841 44826 fi
44842 44827 fi
44843 44828
44844 44829 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44845 44830 if test "x$test_cygdrive_prefix" = x; then
44846 44831 # As a simple fix, exclude /usr/bin since it's not a real path.
44847 44832 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44848 44833 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44849 44834 # a path prefixed by /cygdrive for fixpath to work.
44850 44835 new_path="$CYGWIN_ROOT_PATH$input_path"
44851 44836 fi
44852 44837 fi
44853 44838
44854 44839 # remove trailing .exe if any
44855 44840 new_path="${new_path/%.exe/}"
44856 44841
44857 44842 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44858 44843
44859 44844 # First separate the path from the arguments. This will split at the first
44860 44845 # space.
44861 44846 complete="$BUILD_CXX"
44862 44847 path="${complete%% *}"
44863 44848 tmp="$complete EOL"
44864 44849 arguments="${tmp#* }"
44865 44850
44866 44851 # Input might be given as Windows format, start by converting to
44867 44852 # unix format.
44868 44853 new_path="$path"
44869 44854
44870 44855 windows_path="$new_path"
44871 44856 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44872 44857 unix_path=`$CYGPATH -u "$windows_path"`
44873 44858 new_path="$unix_path"
44874 44859 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44875 44860 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44876 44861 new_path="$unix_path"
44877 44862 fi
44878 44863
44879 44864
44880 44865 # Now try to locate executable using which
44881 44866 new_path=`$WHICH "$new_path" 2> /dev/null`
44882 44867
44883 44868 if test "x$new_path" = x; then
44884 44869 # Oops. Which didn't find the executable.
44885 44870 # The splitting of arguments from the executable at a space might have been incorrect,
44886 44871 # since paths with space are more likely in Windows. Give it another try with the whole
44887 44872 # argument.
44888 44873 path="$complete"
44889 44874 arguments="EOL"
44890 44875 new_path="$path"
44891 44876
44892 44877 windows_path="$new_path"
44893 44878 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44894 44879 unix_path=`$CYGPATH -u "$windows_path"`
44895 44880 new_path="$unix_path"
44896 44881 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44897 44882 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44898 44883 new_path="$unix_path"
44899 44884 fi
44900 44885
44901 44886
44902 44887 new_path=`$WHICH "$new_path" 2> /dev/null`
44903 44888 # bat and cmd files are not always considered executable in MSYS causing which
44904 44889 # to not find them
44905 44890 if test "x$new_path" = x \
44906 44891 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44907 44892 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44908 44893 new_path="$path"
44909 44894
44910 44895 windows_path="$new_path"
44911 44896 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44912 44897 unix_path=`$CYGPATH -u "$windows_path"`
44913 44898 new_path="$unix_path"
44914 44899 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44915 44900 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44916 44901 new_path="$unix_path"
44917 44902 fi
44918 44903
44919 44904 fi
44920 44905
44921 44906 if test "x$new_path" = x; then
44922 44907 # It's still not found. Now this is an unrecoverable error.
44923 44908 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44924 44909 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44925 44910 has_space=`$ECHO "$complete" | $GREP " "`
44926 44911 if test "x$has_space" != x; then
44927 44912 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44928 44913 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44929 44914 fi
44930 44915 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44931 44916 fi
44932 44917 fi
44933 44918
44934 44919 # Now new_path has a complete unix path to the binary
44935 44920 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44936 44921 # Keep paths in /bin as-is, but remove trailing .exe if any
44937 44922 new_path="${new_path/%.exe/}"
44938 44923 # Do not save /bin paths to all_fixpath_prefixes!
44939 44924 else
44940 44925 # Not in mixed or Windows style, start by that.
44941 44926 new_path=`cmd //c echo $new_path`
44942 44927
44943 44928 input_path="$new_path"
44944 44929 # Check if we need to convert this using DOS-style short mode. If the path
44945 44930 # contains just simple characters, use it. Otherwise (spaces, weird characters),
44946 44931 # take no chances and rewrite it.
44947 44932 # Note: m4 eats our [], so we need to use [ and ] instead.
44948 44933 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44949 44934 if test "x$has_forbidden_chars" != x; then
44950 44935 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44951 44936 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44952 44937 fi
44953 44938
44954 44939 # Output is in $new_path
44955 44940
44956 44941 windows_path="$new_path"
44957 44942 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44958 44943 unix_path=`$CYGPATH -u "$windows_path"`
44959 44944 new_path="$unix_path"
44960 44945 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44961 44946 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44962 44947 new_path="$unix_path"
44963 44948 fi
44964 44949
44965 44950 # remove trailing .exe if any
44966 44951 new_path="${new_path/%.exe/}"
44967 44952
44968 44953 # Save the first 10 bytes of this path to the storage, so fixpath can work.
44969 44954 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44970 44955 fi
44971 44956
44972 44957 else
44973 44958 # We're on a unix platform. Hooray! :)
44974 44959 # First separate the path from the arguments. This will split at the first
44975 44960 # space.
44976 44961 complete="$BUILD_CXX"
44977 44962 path="${complete%% *}"
44978 44963 tmp="$complete EOL"
44979 44964 arguments="${tmp#* }"
44980 44965
44981 44966 # Cannot rely on the command "which" here since it doesn't always work.
44982 44967 is_absolute_path=`$ECHO "$path" | $GREP ^/`
44983 44968 if test -z "$is_absolute_path"; then
44984 44969 # Path to executable is not absolute. Find it.
44985 44970 IFS_save="$IFS"
44986 44971 IFS=:
44987 44972 for p in $PATH; do
44988 44973 if test -f "$p/$path" && test -x "$p/$path"; then
44989 44974 new_path="$p/$path"
44990 44975 break
44991 44976 fi
44992 44977 done
44993 44978 IFS="$IFS_save"
44994 44979 else
44995 44980 # This is an absolute path, we can use it without further modifications.
44996 44981 new_path="$path"
44997 44982 fi
44998 44983
44999 44984 if test "x$new_path" = x; then
45000 44985 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45001 44986 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45002 44987 has_space=`$ECHO "$complete" | $GREP " "`
45003 44988 if test "x$has_space" != x; then
45004 44989 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45005 44990 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45006 44991 fi
45007 44992 as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45008 44993 fi
45009 44994 fi
45010 44995
45011 44996 # Now join together the path and the arguments once again
45012 44997 if test "x$arguments" != xEOL; then
45013 44998 new_complete="$new_path ${arguments% *}"
45014 44999 else
45015 45000 new_complete="$new_path"
45016 45001 fi
45017 45002
45018 45003 if test "x$complete" != "x$new_complete"; then
45019 45004 BUILD_CXX="$new_complete"
45020 45005 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45021 45006 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45022 45007 fi
45023 45008 fi
45024 45009
45025 45010
45026 45011
45027 45012 # Publish this variable in the help.
45028 45013
45029 45014
45030 45015 if [ -z "${BUILD_NM+x}" ]; then
45031 45016 # The variable is not set by user, try to locate tool using the code snippet
45032 45017 for ac_prog in nm gcc-nm
45033 45018 do
45034 45019 # Extract the first word of "$ac_prog", so it can be a program name with args.
45035 45020 set dummy $ac_prog; ac_word=$2
45036 45021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45037 45022 $as_echo_n "checking for $ac_word... " >&6; }
45038 45023 if ${ac_cv_path_BUILD_NM+:} false; then :
45039 45024 $as_echo_n "(cached) " >&6
45040 45025 else
45041 45026 case $BUILD_NM in
45042 45027 [\\/]* | ?:[\\/]*)
45043 45028 ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45044 45029 ;;
45045 45030 *)
45046 45031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45047 45032 for as_dir in $PATH
45048 45033 do
45049 45034 IFS=$as_save_IFS
45050 45035 test -z "$as_dir" && as_dir=.
45051 45036 for ac_exec_ext in '' $ac_executable_extensions; do
45052 45037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45053 45038 ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45054 45039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45055 45040 break 2
45056 45041 fi
45057 45042 done
45058 45043 done
45059 45044 IFS=$as_save_IFS
45060 45045
45061 45046 ;;
45062 45047 esac
45063 45048 fi
45064 45049 BUILD_NM=$ac_cv_path_BUILD_NM
45065 45050 if test -n "$BUILD_NM"; then
45066 45051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45067 45052 $as_echo "$BUILD_NM" >&6; }
45068 45053 else
45069 45054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45070 45055 $as_echo "no" >&6; }
45071 45056 fi
45072 45057
45073 45058
45074 45059 test -n "$BUILD_NM" && break
45075 45060 done
45076 45061
45077 45062 else
45078 45063 # The variable is set, but is it from the command line or the environment?
45079 45064
45080 45065 # Try to remove the string !BUILD_NM! from our list.
45081 45066 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45082 45067 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45083 45068 # If it failed, the variable was not from the command line. Ignore it,
45084 45069 # but warn the user (except for BASH, which is always set by the calling BASH).
45085 45070 if test "xBUILD_NM" != xBASH; then
45086 45071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45087 45072 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45088 45073 fi
45089 45074 # Try to locate tool using the code snippet
45090 45075 for ac_prog in nm gcc-nm
45091 45076 do
45092 45077 # Extract the first word of "$ac_prog", so it can be a program name with args.
45093 45078 set dummy $ac_prog; ac_word=$2
45094 45079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45095 45080 $as_echo_n "checking for $ac_word... " >&6; }
45096 45081 if ${ac_cv_path_BUILD_NM+:} false; then :
45097 45082 $as_echo_n "(cached) " >&6
45098 45083 else
45099 45084 case $BUILD_NM in
45100 45085 [\\/]* | ?:[\\/]*)
45101 45086 ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45102 45087 ;;
45103 45088 *)
45104 45089 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45105 45090 for as_dir in $PATH
45106 45091 do
45107 45092 IFS=$as_save_IFS
45108 45093 test -z "$as_dir" && as_dir=.
45109 45094 for ac_exec_ext in '' $ac_executable_extensions; do
45110 45095 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45111 45096 ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45112 45097 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45113 45098 break 2
45114 45099 fi
45115 45100 done
45116 45101 done
45117 45102 IFS=$as_save_IFS
45118 45103
45119 45104 ;;
45120 45105 esac
45121 45106 fi
45122 45107 BUILD_NM=$ac_cv_path_BUILD_NM
45123 45108 if test -n "$BUILD_NM"; then
45124 45109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45125 45110 $as_echo "$BUILD_NM" >&6; }
45126 45111 else
45127 45112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45128 45113 $as_echo "no" >&6; }
45129 45114 fi
45130 45115
45131 45116
45132 45117 test -n "$BUILD_NM" && break
45133 45118 done
45134 45119
45135 45120 else
45136 45121 # If it succeeded, then it was overridden by the user. We will use it
45137 45122 # for the tool.
45138 45123
45139 45124 # First remove it from the list of overridden variables, so we can test
45140 45125 # for unknown variables in the end.
45141 45126 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45142 45127
45143 45128 # Check if we try to supply an empty value
45144 45129 if test "x$BUILD_NM" = x; then
45145 45130 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45146 45131 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45147 45132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45148 45133 $as_echo_n "checking for BUILD_NM... " >&6; }
45149 45134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45150 45135 $as_echo "disabled" >&6; }
45151 45136 else
45152 45137 # Check if the provided tool contains a complete path.
45153 45138 tool_specified="$BUILD_NM"
45154 45139 tool_basename="${tool_specified##*/}"
45155 45140 if test "x$tool_basename" = "x$tool_specified"; then
45156 45141 # A command without a complete path is provided, search $PATH.
45157 45142 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45158 45143 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45159 45144 # Extract the first word of "$tool_basename", so it can be a program name with args.
45160 45145 set dummy $tool_basename; ac_word=$2
45161 45146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45162 45147 $as_echo_n "checking for $ac_word... " >&6; }
45163 45148 if ${ac_cv_path_BUILD_NM+:} false; then :
45164 45149 $as_echo_n "(cached) " >&6
45165 45150 else
45166 45151 case $BUILD_NM in
45167 45152 [\\/]* | ?:[\\/]*)
45168 45153 ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45169 45154 ;;
45170 45155 *)
45171 45156 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45172 45157 for as_dir in $PATH
45173 45158 do
45174 45159 IFS=$as_save_IFS
45175 45160 test -z "$as_dir" && as_dir=.
45176 45161 for ac_exec_ext in '' $ac_executable_extensions; do
45177 45162 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45178 45163 ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45179 45164 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45180 45165 break 2
45181 45166 fi
45182 45167 done
45183 45168 done
45184 45169 IFS=$as_save_IFS
45185 45170
45186 45171 ;;
45187 45172 esac
45188 45173 fi
45189 45174 BUILD_NM=$ac_cv_path_BUILD_NM
45190 45175 if test -n "$BUILD_NM"; then
45191 45176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45192 45177 $as_echo "$BUILD_NM" >&6; }
45193 45178 else
45194 45179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45195 45180 $as_echo "no" >&6; }
45196 45181 fi
45197 45182
45198 45183
45199 45184 if test "x$BUILD_NM" = x; then
45200 45185 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45201 45186 fi
45202 45187 else
45203 45188 # Otherwise we believe it is a complete path. Use it as it is.
45204 45189 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45205 45190 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45206 45191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45207 45192 $as_echo_n "checking for BUILD_NM... " >&6; }
45208 45193 if test ! -x "$tool_specified"; then
45209 45194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45210 45195 $as_echo "not found" >&6; }
45211 45196 as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45212 45197 fi
45213 45198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45214 45199 $as_echo "$tool_specified" >&6; }
45215 45200 fi
45216 45201 fi
45217 45202 fi
45218 45203
45219 45204 fi
45220 45205
45221 45206
45222 45207
45223 45208 # Only process if variable expands to non-empty
45224 45209
45225 45210 if test "x$BUILD_NM" != x; then
45226 45211 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45227 45212
45228 45213 # First separate the path from the arguments. This will split at the first
45229 45214 # space.
45230 45215 complete="$BUILD_NM"
45231 45216 path="${complete%% *}"
45232 45217 tmp="$complete EOL"
45233 45218 arguments="${tmp#* }"
45234 45219
45235 45220 # Input might be given as Windows format, start by converting to
45236 45221 # unix format.
45237 45222 new_path=`$CYGPATH -u "$path"`
45238 45223
45239 45224 # Now try to locate executable using which
45240 45225 new_path=`$WHICH "$new_path" 2> /dev/null`
45241 45226 # bat and cmd files are not always considered executable in cygwin causing which
45242 45227 # to not find them
45243 45228 if test "x$new_path" = x \
45244 45229 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45245 45230 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45246 45231 new_path=`$CYGPATH -u "$path"`
45247 45232 fi
45248 45233 if test "x$new_path" = x; then
45249 45234 # Oops. Which didn't find the executable.
45250 45235 # The splitting of arguments from the executable at a space might have been incorrect,
45251 45236 # since paths with space are more likely in Windows. Give it another try with the whole
45252 45237 # argument.
45253 45238 path="$complete"
45254 45239 arguments="EOL"
45255 45240 new_path=`$CYGPATH -u "$path"`
45256 45241 new_path=`$WHICH "$new_path" 2> /dev/null`
45257 45242 # bat and cmd files are not always considered executable in cygwin causing which
45258 45243 # to not find them
45259 45244 if test "x$new_path" = x \
45260 45245 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45261 45246 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45262 45247 new_path=`$CYGPATH -u "$path"`
45263 45248 fi
45264 45249 if test "x$new_path" = x; then
45265 45250 # It's still not found. Now this is an unrecoverable error.
45266 45251 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45267 45252 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45268 45253 has_space=`$ECHO "$complete" | $GREP " "`
45269 45254 if test "x$has_space" != x; then
45270 45255 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45271 45256 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45272 45257 fi
45273 45258 as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45274 45259 fi
45275 45260 fi
45276 45261
45277 45262 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45278 45263 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45279 45264 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45280 45265 # "foo.exe" is OK but "foo" is an error.
45281 45266 #
45282 45267 # This test is therefore slightly more accurate than "test -f" to check for file presence.
45283 45268 # It is also a way to make sure we got the proper file name for the real test later on.
45284 45269 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45285 45270 if test "x$test_shortpath" = x; then
45286 45271 # Short path failed, file does not exist as specified.
45287 45272 # Try adding .exe or .cmd
45288 45273 if test -f "${new_path}.exe"; then
45289 45274 input_to_shortpath="${new_path}.exe"
45290 45275 elif test -f "${new_path}.cmd"; then
45291 45276 input_to_shortpath="${new_path}.cmd"
45292 45277 else
45293 45278 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45294 45279 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45295 45280 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45296 45281 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45297 45282 as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45298 45283 fi
45299 45284 else
45300 45285 input_to_shortpath="$new_path"
45301 45286 fi
45302 45287
45303 45288 # Call helper function which possibly converts this using DOS-style short mode.
45304 45289 # If so, the updated path is stored in $new_path.
45305 45290 new_path="$input_to_shortpath"
45306 45291
45307 45292 input_path="$input_to_shortpath"
45308 45293 # Check if we need to convert this using DOS-style short mode. If the path
45309 45294 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45310 45295 # take no chances and rewrite it.
45311 45296 # Note: m4 eats our [], so we need to use [ and ] instead.
45312 45297 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45313 45298 if test "x$has_forbidden_chars" != x; then
45314 45299 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45315 45300 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45316 45301 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45317 45302 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45318 45303 # Going to short mode and back again did indeed matter. Since short mode is
45319 45304 # case insensitive, let's make it lowercase to improve readability.
45320 45305 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45321 45306 # Now convert it back to Unix-style (cygpath)
45322 45307 input_path=`$CYGPATH -u "$shortmode_path"`
45323 45308 new_path="$input_path"
45324 45309 fi
45325 45310 fi
45326 45311
45327 45312 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45328 45313 if test "x$test_cygdrive_prefix" = x; then
45329 45314 # As a simple fix, exclude /usr/bin since it's not a real path.
45330 45315 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45331 45316 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45332 45317 # a path prefixed by /cygdrive for fixpath to work.
45333 45318 new_path="$CYGWIN_ROOT_PATH$input_path"
45334 45319 fi
45335 45320 fi
45336 45321
45337 45322 # remove trailing .exe if any
45338 45323 new_path="${new_path/%.exe/}"
45339 45324
45340 45325 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45341 45326
45342 45327 # First separate the path from the arguments. This will split at the first
45343 45328 # space.
45344 45329 complete="$BUILD_NM"
45345 45330 path="${complete%% *}"
45346 45331 tmp="$complete EOL"
45347 45332 arguments="${tmp#* }"
45348 45333
45349 45334 # Input might be given as Windows format, start by converting to
45350 45335 # unix format.
45351 45336 new_path="$path"
45352 45337
45353 45338 windows_path="$new_path"
45354 45339 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45355 45340 unix_path=`$CYGPATH -u "$windows_path"`
45356 45341 new_path="$unix_path"
45357 45342 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45358 45343 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45359 45344 new_path="$unix_path"
45360 45345 fi
45361 45346
45362 45347
45363 45348 # Now try to locate executable using which
45364 45349 new_path=`$WHICH "$new_path" 2> /dev/null`
45365 45350
45366 45351 if test "x$new_path" = x; then
45367 45352 # Oops. Which didn't find the executable.
45368 45353 # The splitting of arguments from the executable at a space might have been incorrect,
45369 45354 # since paths with space are more likely in Windows. Give it another try with the whole
45370 45355 # argument.
45371 45356 path="$complete"
45372 45357 arguments="EOL"
45373 45358 new_path="$path"
45374 45359
45375 45360 windows_path="$new_path"
45376 45361 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45377 45362 unix_path=`$CYGPATH -u "$windows_path"`
45378 45363 new_path="$unix_path"
45379 45364 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45380 45365 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45381 45366 new_path="$unix_path"
45382 45367 fi
45383 45368
45384 45369
45385 45370 new_path=`$WHICH "$new_path" 2> /dev/null`
45386 45371 # bat and cmd files are not always considered executable in MSYS causing which
45387 45372 # to not find them
45388 45373 if test "x$new_path" = x \
45389 45374 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45390 45375 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45391 45376 new_path="$path"
45392 45377
45393 45378 windows_path="$new_path"
45394 45379 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45395 45380 unix_path=`$CYGPATH -u "$windows_path"`
45396 45381 new_path="$unix_path"
45397 45382 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45398 45383 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45399 45384 new_path="$unix_path"
45400 45385 fi
45401 45386
45402 45387 fi
45403 45388
45404 45389 if test "x$new_path" = x; then
45405 45390 # It's still not found. Now this is an unrecoverable error.
45406 45391 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45407 45392 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45408 45393 has_space=`$ECHO "$complete" | $GREP " "`
45409 45394 if test "x$has_space" != x; then
45410 45395 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45411 45396 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45412 45397 fi
45413 45398 as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45414 45399 fi
45415 45400 fi
45416 45401
45417 45402 # Now new_path has a complete unix path to the binary
45418 45403 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45419 45404 # Keep paths in /bin as-is, but remove trailing .exe if any
45420 45405 new_path="${new_path/%.exe/}"
45421 45406 # Do not save /bin paths to all_fixpath_prefixes!
45422 45407 else
45423 45408 # Not in mixed or Windows style, start by that.
45424 45409 new_path=`cmd //c echo $new_path`
45425 45410
45426 45411 input_path="$new_path"
45427 45412 # Check if we need to convert this using DOS-style short mode. If the path
45428 45413 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45429 45414 # take no chances and rewrite it.
45430 45415 # Note: m4 eats our [], so we need to use [ and ] instead.
45431 45416 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45432 45417 if test "x$has_forbidden_chars" != x; then
45433 45418 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45434 45419 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45435 45420 fi
45436 45421
45437 45422 # Output is in $new_path
45438 45423
45439 45424 windows_path="$new_path"
45440 45425 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45441 45426 unix_path=`$CYGPATH -u "$windows_path"`
45442 45427 new_path="$unix_path"
45443 45428 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45444 45429 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45445 45430 new_path="$unix_path"
45446 45431 fi
45447 45432
45448 45433 # remove trailing .exe if any
45449 45434 new_path="${new_path/%.exe/}"
45450 45435
45451 45436 # Save the first 10 bytes of this path to the storage, so fixpath can work.
45452 45437 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45453 45438 fi
45454 45439
45455 45440 else
45456 45441 # We're on a unix platform. Hooray! :)
45457 45442 # First separate the path from the arguments. This will split at the first
45458 45443 # space.
45459 45444 complete="$BUILD_NM"
45460 45445 path="${complete%% *}"
45461 45446 tmp="$complete EOL"
45462 45447 arguments="${tmp#* }"
45463 45448
45464 45449 # Cannot rely on the command "which" here since it doesn't always work.
45465 45450 is_absolute_path=`$ECHO "$path" | $GREP ^/`
45466 45451 if test -z "$is_absolute_path"; then
45467 45452 # Path to executable is not absolute. Find it.
45468 45453 IFS_save="$IFS"
45469 45454 IFS=:
45470 45455 for p in $PATH; do
45471 45456 if test -f "$p/$path" && test -x "$p/$path"; then
45472 45457 new_path="$p/$path"
45473 45458 break
45474 45459 fi
45475 45460 done
45476 45461 IFS="$IFS_save"
45477 45462 else
45478 45463 # This is an absolute path, we can use it without further modifications.
45479 45464 new_path="$path"
45480 45465 fi
45481 45466
45482 45467 if test "x$new_path" = x; then
45483 45468 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45484 45469 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45485 45470 has_space=`$ECHO "$complete" | $GREP " "`
45486 45471 if test "x$has_space" != x; then
45487 45472 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45488 45473 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45489 45474 fi
45490 45475 as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45491 45476 fi
45492 45477 fi
45493 45478
45494 45479 # Now join together the path and the arguments once again
45495 45480 if test "x$arguments" != xEOL; then
45496 45481 new_complete="$new_path ${arguments% *}"
45497 45482 else
45498 45483 new_complete="$new_path"
45499 45484 fi
45500 45485
45501 45486 if test "x$complete" != "x$new_complete"; then
45502 45487 BUILD_NM="$new_complete"
45503 45488 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45504 45489 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45505 45490 fi
45506 45491 fi
45507 45492
45508 45493
45509 45494
45510 45495 # Publish this variable in the help.
45511 45496
45512 45497
45513 45498 if [ -z "${BUILD_AR+x}" ]; then
45514 45499 # The variable is not set by user, try to locate tool using the code snippet
45515 45500 for ac_prog in ar gcc-ar
45516 45501 do
45517 45502 # Extract the first word of "$ac_prog", so it can be a program name with args.
45518 45503 set dummy $ac_prog; ac_word=$2
45519 45504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45520 45505 $as_echo_n "checking for $ac_word... " >&6; }
45521 45506 if ${ac_cv_path_BUILD_AR+:} false; then :
45522 45507 $as_echo_n "(cached) " >&6
45523 45508 else
45524 45509 case $BUILD_AR in
45525 45510 [\\/]* | ?:[\\/]*)
45526 45511 ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45527 45512 ;;
45528 45513 *)
45529 45514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45530 45515 for as_dir in $PATH
45531 45516 do
45532 45517 IFS=$as_save_IFS
45533 45518 test -z "$as_dir" && as_dir=.
45534 45519 for ac_exec_ext in '' $ac_executable_extensions; do
45535 45520 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45536 45521 ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45537 45522 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45538 45523 break 2
45539 45524 fi
45540 45525 done
45541 45526 done
45542 45527 IFS=$as_save_IFS
45543 45528
45544 45529 ;;
45545 45530 esac
45546 45531 fi
45547 45532 BUILD_AR=$ac_cv_path_BUILD_AR
45548 45533 if test -n "$BUILD_AR"; then
45549 45534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45550 45535 $as_echo "$BUILD_AR" >&6; }
45551 45536 else
45552 45537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45553 45538 $as_echo "no" >&6; }
45554 45539 fi
45555 45540
45556 45541
45557 45542 test -n "$BUILD_AR" && break
45558 45543 done
45559 45544
45560 45545 else
45561 45546 # The variable is set, but is it from the command line or the environment?
45562 45547
45563 45548 # Try to remove the string !BUILD_AR! from our list.
45564 45549 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45565 45550 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45566 45551 # If it failed, the variable was not from the command line. Ignore it,
45567 45552 # but warn the user (except for BASH, which is always set by the calling BASH).
45568 45553 if test "xBUILD_AR" != xBASH; then
45569 45554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45570 45555 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45571 45556 fi
45572 45557 # Try to locate tool using the code snippet
45573 45558 for ac_prog in ar gcc-ar
45574 45559 do
45575 45560 # Extract the first word of "$ac_prog", so it can be a program name with args.
45576 45561 set dummy $ac_prog; ac_word=$2
45577 45562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45578 45563 $as_echo_n "checking for $ac_word... " >&6; }
45579 45564 if ${ac_cv_path_BUILD_AR+:} false; then :
45580 45565 $as_echo_n "(cached) " >&6
45581 45566 else
45582 45567 case $BUILD_AR in
45583 45568 [\\/]* | ?:[\\/]*)
45584 45569 ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45585 45570 ;;
45586 45571 *)
45587 45572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45588 45573 for as_dir in $PATH
45589 45574 do
45590 45575 IFS=$as_save_IFS
45591 45576 test -z "$as_dir" && as_dir=.
45592 45577 for ac_exec_ext in '' $ac_executable_extensions; do
45593 45578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45594 45579 ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45595 45580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45596 45581 break 2
45597 45582 fi
45598 45583 done
45599 45584 done
45600 45585 IFS=$as_save_IFS
45601 45586
45602 45587 ;;
45603 45588 esac
45604 45589 fi
45605 45590 BUILD_AR=$ac_cv_path_BUILD_AR
45606 45591 if test -n "$BUILD_AR"; then
45607 45592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45608 45593 $as_echo "$BUILD_AR" >&6; }
45609 45594 else
45610 45595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45611 45596 $as_echo "no" >&6; }
45612 45597 fi
45613 45598
45614 45599
45615 45600 test -n "$BUILD_AR" && break
45616 45601 done
45617 45602
45618 45603 else
45619 45604 # If it succeeded, then it was overridden by the user. We will use it
45620 45605 # for the tool.
45621 45606
45622 45607 # First remove it from the list of overridden variables, so we can test
45623 45608 # for unknown variables in the end.
45624 45609 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45625 45610
45626 45611 # Check if we try to supply an empty value
45627 45612 if test "x$BUILD_AR" = x; then
45628 45613 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45629 45614 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45630 45615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45631 45616 $as_echo_n "checking for BUILD_AR... " >&6; }
45632 45617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45633 45618 $as_echo "disabled" >&6; }
45634 45619 else
45635 45620 # Check if the provided tool contains a complete path.
45636 45621 tool_specified="$BUILD_AR"
45637 45622 tool_basename="${tool_specified##*/}"
45638 45623 if test "x$tool_basename" = "x$tool_specified"; then
45639 45624 # A command without a complete path is provided, search $PATH.
45640 45625 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45641 45626 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45642 45627 # Extract the first word of "$tool_basename", so it can be a program name with args.
45643 45628 set dummy $tool_basename; ac_word=$2
45644 45629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45645 45630 $as_echo_n "checking for $ac_word... " >&6; }
45646 45631 if ${ac_cv_path_BUILD_AR+:} false; then :
45647 45632 $as_echo_n "(cached) " >&6
45648 45633 else
45649 45634 case $BUILD_AR in
45650 45635 [\\/]* | ?:[\\/]*)
45651 45636 ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45652 45637 ;;
45653 45638 *)
45654 45639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45655 45640 for as_dir in $PATH
45656 45641 do
45657 45642 IFS=$as_save_IFS
45658 45643 test -z "$as_dir" && as_dir=.
45659 45644 for ac_exec_ext in '' $ac_executable_extensions; do
45660 45645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45661 45646 ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45662 45647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45663 45648 break 2
45664 45649 fi
45665 45650 done
45666 45651 done
45667 45652 IFS=$as_save_IFS
45668 45653
45669 45654 ;;
45670 45655 esac
45671 45656 fi
45672 45657 BUILD_AR=$ac_cv_path_BUILD_AR
45673 45658 if test -n "$BUILD_AR"; then
45674 45659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45675 45660 $as_echo "$BUILD_AR" >&6; }
45676 45661 else
45677 45662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45678 45663 $as_echo "no" >&6; }
45679 45664 fi
45680 45665
45681 45666
45682 45667 if test "x$BUILD_AR" = x; then
45683 45668 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45684 45669 fi
45685 45670 else
45686 45671 # Otherwise we believe it is a complete path. Use it as it is.
45687 45672 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45688 45673 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45689 45674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45690 45675 $as_echo_n "checking for BUILD_AR... " >&6; }
45691 45676 if test ! -x "$tool_specified"; then
45692 45677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45693 45678 $as_echo "not found" >&6; }
45694 45679 as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45695 45680 fi
45696 45681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45697 45682 $as_echo "$tool_specified" >&6; }
45698 45683 fi
45699 45684 fi
45700 45685 fi
45701 45686
45702 45687 fi
45703 45688
45704 45689
45705 45690
45706 45691 # Only process if variable expands to non-empty
45707 45692
45708 45693 if test "x$BUILD_AR" != x; then
45709 45694 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45710 45695
45711 45696 # First separate the path from the arguments. This will split at the first
45712 45697 # space.
45713 45698 complete="$BUILD_AR"
45714 45699 path="${complete%% *}"
45715 45700 tmp="$complete EOL"
45716 45701 arguments="${tmp#* }"
45717 45702
45718 45703 # Input might be given as Windows format, start by converting to
45719 45704 # unix format.
45720 45705 new_path=`$CYGPATH -u "$path"`
45721 45706
45722 45707 # Now try to locate executable using which
45723 45708 new_path=`$WHICH "$new_path" 2> /dev/null`
45724 45709 # bat and cmd files are not always considered executable in cygwin causing which
45725 45710 # to not find them
45726 45711 if test "x$new_path" = x \
45727 45712 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45728 45713 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45729 45714 new_path=`$CYGPATH -u "$path"`
45730 45715 fi
45731 45716 if test "x$new_path" = x; then
45732 45717 # Oops. Which didn't find the executable.
45733 45718 # The splitting of arguments from the executable at a space might have been incorrect,
45734 45719 # since paths with space are more likely in Windows. Give it another try with the whole
45735 45720 # argument.
45736 45721 path="$complete"
45737 45722 arguments="EOL"
45738 45723 new_path=`$CYGPATH -u "$path"`
45739 45724 new_path=`$WHICH "$new_path" 2> /dev/null`
45740 45725 # bat and cmd files are not always considered executable in cygwin causing which
45741 45726 # to not find them
45742 45727 if test "x$new_path" = x \
45743 45728 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45744 45729 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45745 45730 new_path=`$CYGPATH -u "$path"`
45746 45731 fi
45747 45732 if test "x$new_path" = x; then
45748 45733 # It's still not found. Now this is an unrecoverable error.
45749 45734 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45750 45735 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45751 45736 has_space=`$ECHO "$complete" | $GREP " "`
45752 45737 if test "x$has_space" != x; then
45753 45738 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45754 45739 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45755 45740 fi
45756 45741 as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45757 45742 fi
45758 45743 fi
45759 45744
45760 45745 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45761 45746 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45762 45747 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45763 45748 # "foo.exe" is OK but "foo" is an error.
45764 45749 #
45765 45750 # This test is therefore slightly more accurate than "test -f" to check for file presence.
45766 45751 # It is also a way to make sure we got the proper file name for the real test later on.
45767 45752 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45768 45753 if test "x$test_shortpath" = x; then
45769 45754 # Short path failed, file does not exist as specified.
45770 45755 # Try adding .exe or .cmd
45771 45756 if test -f "${new_path}.exe"; then
45772 45757 input_to_shortpath="${new_path}.exe"
45773 45758 elif test -f "${new_path}.cmd"; then
45774 45759 input_to_shortpath="${new_path}.cmd"
45775 45760 else
45776 45761 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45777 45762 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45778 45763 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45779 45764 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45780 45765 as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45781 45766 fi
45782 45767 else
45783 45768 input_to_shortpath="$new_path"
45784 45769 fi
45785 45770
45786 45771 # Call helper function which possibly converts this using DOS-style short mode.
45787 45772 # If so, the updated path is stored in $new_path.
45788 45773 new_path="$input_to_shortpath"
45789 45774
45790 45775 input_path="$input_to_shortpath"
45791 45776 # Check if we need to convert this using DOS-style short mode. If the path
45792 45777 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45793 45778 # take no chances and rewrite it.
45794 45779 # Note: m4 eats our [], so we need to use [ and ] instead.
45795 45780 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45796 45781 if test "x$has_forbidden_chars" != x; then
45797 45782 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45798 45783 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45799 45784 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45800 45785 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45801 45786 # Going to short mode and back again did indeed matter. Since short mode is
45802 45787 # case insensitive, let's make it lowercase to improve readability.
45803 45788 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45804 45789 # Now convert it back to Unix-style (cygpath)
45805 45790 input_path=`$CYGPATH -u "$shortmode_path"`
45806 45791 new_path="$input_path"
45807 45792 fi
45808 45793 fi
45809 45794
45810 45795 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45811 45796 if test "x$test_cygdrive_prefix" = x; then
45812 45797 # As a simple fix, exclude /usr/bin since it's not a real path.
45813 45798 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45814 45799 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45815 45800 # a path prefixed by /cygdrive for fixpath to work.
45816 45801 new_path="$CYGWIN_ROOT_PATH$input_path"
45817 45802 fi
45818 45803 fi
45819 45804
45820 45805 # remove trailing .exe if any
45821 45806 new_path="${new_path/%.exe/}"
45822 45807
45823 45808 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45824 45809
45825 45810 # First separate the path from the arguments. This will split at the first
45826 45811 # space.
45827 45812 complete="$BUILD_AR"
45828 45813 path="${complete%% *}"
45829 45814 tmp="$complete EOL"
45830 45815 arguments="${tmp#* }"
45831 45816
45832 45817 # Input might be given as Windows format, start by converting to
45833 45818 # unix format.
45834 45819 new_path="$path"
45835 45820
45836 45821 windows_path="$new_path"
45837 45822 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45838 45823 unix_path=`$CYGPATH -u "$windows_path"`
45839 45824 new_path="$unix_path"
45840 45825 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45841 45826 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45842 45827 new_path="$unix_path"
45843 45828 fi
45844 45829
45845 45830
45846 45831 # Now try to locate executable using which
45847 45832 new_path=`$WHICH "$new_path" 2> /dev/null`
45848 45833
45849 45834 if test "x$new_path" = x; then
45850 45835 # Oops. Which didn't find the executable.
45851 45836 # The splitting of arguments from the executable at a space might have been incorrect,
45852 45837 # since paths with space are more likely in Windows. Give it another try with the whole
45853 45838 # argument.
45854 45839 path="$complete"
45855 45840 arguments="EOL"
45856 45841 new_path="$path"
45857 45842
45858 45843 windows_path="$new_path"
45859 45844 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45860 45845 unix_path=`$CYGPATH -u "$windows_path"`
45861 45846 new_path="$unix_path"
45862 45847 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45863 45848 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45864 45849 new_path="$unix_path"
45865 45850 fi
45866 45851
45867 45852
45868 45853 new_path=`$WHICH "$new_path" 2> /dev/null`
45869 45854 # bat and cmd files are not always considered executable in MSYS causing which
45870 45855 # to not find them
45871 45856 if test "x$new_path" = x \
45872 45857 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45873 45858 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45874 45859 new_path="$path"
45875 45860
45876 45861 windows_path="$new_path"
45877 45862 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45878 45863 unix_path=`$CYGPATH -u "$windows_path"`
45879 45864 new_path="$unix_path"
45880 45865 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45881 45866 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45882 45867 new_path="$unix_path"
45883 45868 fi
45884 45869
45885 45870 fi
45886 45871
45887 45872 if test "x$new_path" = x; then
45888 45873 # It's still not found. Now this is an unrecoverable error.
45889 45874 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45890 45875 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45891 45876 has_space=`$ECHO "$complete" | $GREP " "`
45892 45877 if test "x$has_space" != x; then
45893 45878 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45894 45879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45895 45880 fi
45896 45881 as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45897 45882 fi
45898 45883 fi
45899 45884
45900 45885 # Now new_path has a complete unix path to the binary
45901 45886 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45902 45887 # Keep paths in /bin as-is, but remove trailing .exe if any
45903 45888 new_path="${new_path/%.exe/}"
45904 45889 # Do not save /bin paths to all_fixpath_prefixes!
45905 45890 else
45906 45891 # Not in mixed or Windows style, start by that.
45907 45892 new_path=`cmd //c echo $new_path`
45908 45893
45909 45894 input_path="$new_path"
45910 45895 # Check if we need to convert this using DOS-style short mode. If the path
45911 45896 # contains just simple characters, use it. Otherwise (spaces, weird characters),
45912 45897 # take no chances and rewrite it.
45913 45898 # Note: m4 eats our [], so we need to use [ and ] instead.
45914 45899 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45915 45900 if test "x$has_forbidden_chars" != x; then
45916 45901 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45917 45902 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45918 45903 fi
45919 45904
45920 45905 # Output is in $new_path
45921 45906
45922 45907 windows_path="$new_path"
45923 45908 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45924 45909 unix_path=`$CYGPATH -u "$windows_path"`
45925 45910 new_path="$unix_path"
45926 45911 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45927 45912 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45928 45913 new_path="$unix_path"
45929 45914 fi
45930 45915
45931 45916 # remove trailing .exe if any
45932 45917 new_path="${new_path/%.exe/}"
45933 45918
45934 45919 # Save the first 10 bytes of this path to the storage, so fixpath can work.
45935 45920 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45936 45921 fi
45937 45922
45938 45923 else
45939 45924 # We're on a unix platform. Hooray! :)
45940 45925 # First separate the path from the arguments. This will split at the first
45941 45926 # space.
45942 45927 complete="$BUILD_AR"
45943 45928 path="${complete%% *}"
45944 45929 tmp="$complete EOL"
45945 45930 arguments="${tmp#* }"
45946 45931
45947 45932 # Cannot rely on the command "which" here since it doesn't always work.
45948 45933 is_absolute_path=`$ECHO "$path" | $GREP ^/`
45949 45934 if test -z "$is_absolute_path"; then
45950 45935 # Path to executable is not absolute. Find it.
45951 45936 IFS_save="$IFS"
45952 45937 IFS=:
45953 45938 for p in $PATH; do
45954 45939 if test -f "$p/$path" && test -x "$p/$path"; then
45955 45940 new_path="$p/$path"
45956 45941 break
45957 45942 fi
45958 45943 done
45959 45944 IFS="$IFS_save"
45960 45945 else
45961 45946 # This is an absolute path, we can use it without further modifications.
45962 45947 new_path="$path"
45963 45948 fi
45964 45949
45965 45950 if test "x$new_path" = x; then
45966 45951 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45967 45952 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45968 45953 has_space=`$ECHO "$complete" | $GREP " "`
45969 45954 if test "x$has_space" != x; then
45970 45955 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45971 45956 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45972 45957 fi
45973 45958 as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45974 45959 fi
45975 45960 fi
45976 45961
45977 45962 # Now join together the path and the arguments once again
45978 45963 if test "x$arguments" != xEOL; then
45979 45964 new_complete="$new_path ${arguments% *}"
45980 45965 else
45981 45966 new_complete="$new_path"
45982 45967 fi
45983 45968
45984 45969 if test "x$complete" != "x$new_complete"; then
45985 45970 BUILD_AR="$new_complete"
45986 45971 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45987 45972 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45988 45973 fi
45989 45974 fi
45990 45975
45991 45976
45992 45977
45993 45978 # Publish this variable in the help.
45994 45979
45995 45980
45996 45981 if [ -z "${BUILD_OBJCOPY+x}" ]; then
45997 45982 # The variable is not set by user, try to locate tool using the code snippet
45998 45983 for ac_prog in objcopy
45999 45984 do
46000 45985 # Extract the first word of "$ac_prog", so it can be a program name with args.
46001 45986 set dummy $ac_prog; ac_word=$2
46002 45987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46003 45988 $as_echo_n "checking for $ac_word... " >&6; }
46004 45989 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46005 45990 $as_echo_n "(cached) " >&6
46006 45991 else
46007 45992 case $BUILD_OBJCOPY in
46008 45993 [\\/]* | ?:[\\/]*)
46009 45994 ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46010 45995 ;;
46011 45996 *)
46012 45997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46013 45998 for as_dir in $PATH
46014 45999 do
46015 46000 IFS=$as_save_IFS
46016 46001 test -z "$as_dir" && as_dir=.
46017 46002 for ac_exec_ext in '' $ac_executable_extensions; do
46018 46003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46019 46004 ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46020 46005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46021 46006 break 2
46022 46007 fi
46023 46008 done
46024 46009 done
46025 46010 IFS=$as_save_IFS
46026 46011
46027 46012 ;;
46028 46013 esac
46029 46014 fi
46030 46015 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46031 46016 if test -n "$BUILD_OBJCOPY"; then
46032 46017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46033 46018 $as_echo "$BUILD_OBJCOPY" >&6; }
46034 46019 else
46035 46020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46036 46021 $as_echo "no" >&6; }
46037 46022 fi
46038 46023
46039 46024
46040 46025 test -n "$BUILD_OBJCOPY" && break
46041 46026 done
46042 46027
46043 46028 else
46044 46029 # The variable is set, but is it from the command line or the environment?
46045 46030
46046 46031 # Try to remove the string !BUILD_OBJCOPY! from our list.
46047 46032 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46048 46033 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46049 46034 # If it failed, the variable was not from the command line. Ignore it,
46050 46035 # but warn the user (except for BASH, which is always set by the calling BASH).
46051 46036 if test "xBUILD_OBJCOPY" != xBASH; then
46052 46037 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46053 46038 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46054 46039 fi
46055 46040 # Try to locate tool using the code snippet
46056 46041 for ac_prog in objcopy
46057 46042 do
46058 46043 # Extract the first word of "$ac_prog", so it can be a program name with args.
46059 46044 set dummy $ac_prog; ac_word=$2
46060 46045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46061 46046 $as_echo_n "checking for $ac_word... " >&6; }
46062 46047 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46063 46048 $as_echo_n "(cached) " >&6
46064 46049 else
46065 46050 case $BUILD_OBJCOPY in
46066 46051 [\\/]* | ?:[\\/]*)
46067 46052 ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46068 46053 ;;
46069 46054 *)
46070 46055 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46071 46056 for as_dir in $PATH
46072 46057 do
46073 46058 IFS=$as_save_IFS
46074 46059 test -z "$as_dir" && as_dir=.
46075 46060 for ac_exec_ext in '' $ac_executable_extensions; do
46076 46061 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46077 46062 ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46078 46063 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46079 46064 break 2
46080 46065 fi
46081 46066 done
46082 46067 done
46083 46068 IFS=$as_save_IFS
46084 46069
46085 46070 ;;
46086 46071 esac
46087 46072 fi
46088 46073 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46089 46074 if test -n "$BUILD_OBJCOPY"; then
46090 46075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46091 46076 $as_echo "$BUILD_OBJCOPY" >&6; }
46092 46077 else
46093 46078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46094 46079 $as_echo "no" >&6; }
46095 46080 fi
46096 46081
46097 46082
46098 46083 test -n "$BUILD_OBJCOPY" && break
46099 46084 done
46100 46085
46101 46086 else
46102 46087 # If it succeeded, then it was overridden by the user. We will use it
46103 46088 # for the tool.
46104 46089
46105 46090 # First remove it from the list of overridden variables, so we can test
46106 46091 # for unknown variables in the end.
46107 46092 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46108 46093
46109 46094 # Check if we try to supply an empty value
46110 46095 if test "x$BUILD_OBJCOPY" = x; then
46111 46096 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46112 46097 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46113 46098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46114 46099 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46115 46100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46116 46101 $as_echo "disabled" >&6; }
46117 46102 else
46118 46103 # Check if the provided tool contains a complete path.
46119 46104 tool_specified="$BUILD_OBJCOPY"
46120 46105 tool_basename="${tool_specified##*/}"
46121 46106 if test "x$tool_basename" = "x$tool_specified"; then
46122 46107 # A command without a complete path is provided, search $PATH.
46123 46108 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46124 46109 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46125 46110 # Extract the first word of "$tool_basename", so it can be a program name with args.
46126 46111 set dummy $tool_basename; ac_word=$2
46127 46112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46128 46113 $as_echo_n "checking for $ac_word... " >&6; }
46129 46114 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46130 46115 $as_echo_n "(cached) " >&6
46131 46116 else
46132 46117 case $BUILD_OBJCOPY in
46133 46118 [\\/]* | ?:[\\/]*)
46134 46119 ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46135 46120 ;;
46136 46121 *)
46137 46122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46138 46123 for as_dir in $PATH
46139 46124 do
46140 46125 IFS=$as_save_IFS
46141 46126 test -z "$as_dir" && as_dir=.
46142 46127 for ac_exec_ext in '' $ac_executable_extensions; do
46143 46128 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46144 46129 ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46145 46130 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46146 46131 break 2
46147 46132 fi
46148 46133 done
46149 46134 done
46150 46135 IFS=$as_save_IFS
46151 46136
46152 46137 ;;
46153 46138 esac
46154 46139 fi
46155 46140 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46156 46141 if test -n "$BUILD_OBJCOPY"; then
46157 46142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46158 46143 $as_echo "$BUILD_OBJCOPY" >&6; }
46159 46144 else
46160 46145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46161 46146 $as_echo "no" >&6; }
46162 46147 fi
46163 46148
46164 46149
46165 46150 if test "x$BUILD_OBJCOPY" = x; then
46166 46151 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46167 46152 fi
46168 46153 else
46169 46154 # Otherwise we believe it is a complete path. Use it as it is.
46170 46155 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46171 46156 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46172 46157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46173 46158 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46174 46159 if test ! -x "$tool_specified"; then
46175 46160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46176 46161 $as_echo "not found" >&6; }
46177 46162 as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46178 46163 fi
46179 46164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46180 46165 $as_echo "$tool_specified" >&6; }
46181 46166 fi
46182 46167 fi
46183 46168 fi
46184 46169
46185 46170 fi
46186 46171
46187 46172
46188 46173
46189 46174 # Only process if variable expands to non-empty
46190 46175
46191 46176 if test "x$BUILD_OBJCOPY" != x; then
46192 46177 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46193 46178
46194 46179 # First separate the path from the arguments. This will split at the first
46195 46180 # space.
46196 46181 complete="$BUILD_OBJCOPY"
46197 46182 path="${complete%% *}"
46198 46183 tmp="$complete EOL"
46199 46184 arguments="${tmp#* }"
46200 46185
46201 46186 # Input might be given as Windows format, start by converting to
46202 46187 # unix format.
46203 46188 new_path=`$CYGPATH -u "$path"`
46204 46189
46205 46190 # Now try to locate executable using which
46206 46191 new_path=`$WHICH "$new_path" 2> /dev/null`
46207 46192 # bat and cmd files are not always considered executable in cygwin causing which
46208 46193 # to not find them
46209 46194 if test "x$new_path" = x \
46210 46195 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46211 46196 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46212 46197 new_path=`$CYGPATH -u "$path"`
46213 46198 fi
46214 46199 if test "x$new_path" = x; then
46215 46200 # Oops. Which didn't find the executable.
46216 46201 # The splitting of arguments from the executable at a space might have been incorrect,
46217 46202 # since paths with space are more likely in Windows. Give it another try with the whole
46218 46203 # argument.
46219 46204 path="$complete"
46220 46205 arguments="EOL"
46221 46206 new_path=`$CYGPATH -u "$path"`
46222 46207 new_path=`$WHICH "$new_path" 2> /dev/null`
46223 46208 # bat and cmd files are not always considered executable in cygwin causing which
46224 46209 # to not find them
46225 46210 if test "x$new_path" = x \
46226 46211 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46227 46212 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46228 46213 new_path=`$CYGPATH -u "$path"`
46229 46214 fi
46230 46215 if test "x$new_path" = x; then
46231 46216 # It's still not found. Now this is an unrecoverable error.
46232 46217 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46233 46218 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46234 46219 has_space=`$ECHO "$complete" | $GREP " "`
46235 46220 if test "x$has_space" != x; then
46236 46221 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46237 46222 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46238 46223 fi
46239 46224 as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46240 46225 fi
46241 46226 fi
46242 46227
46243 46228 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46244 46229 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46245 46230 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46246 46231 # "foo.exe" is OK but "foo" is an error.
46247 46232 #
46248 46233 # This test is therefore slightly more accurate than "test -f" to check for file presence.
46249 46234 # It is also a way to make sure we got the proper file name for the real test later on.
46250 46235 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46251 46236 if test "x$test_shortpath" = x; then
46252 46237 # Short path failed, file does not exist as specified.
46253 46238 # Try adding .exe or .cmd
46254 46239 if test -f "${new_path}.exe"; then
46255 46240 input_to_shortpath="${new_path}.exe"
46256 46241 elif test -f "${new_path}.cmd"; then
46257 46242 input_to_shortpath="${new_path}.cmd"
46258 46243 else
46259 46244 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46260 46245 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46261 46246 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46262 46247 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46263 46248 as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46264 46249 fi
46265 46250 else
46266 46251 input_to_shortpath="$new_path"
46267 46252 fi
46268 46253
46269 46254 # Call helper function which possibly converts this using DOS-style short mode.
46270 46255 # If so, the updated path is stored in $new_path.
46271 46256 new_path="$input_to_shortpath"
46272 46257
46273 46258 input_path="$input_to_shortpath"
46274 46259 # Check if we need to convert this using DOS-style short mode. If the path
46275 46260 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46276 46261 # take no chances and rewrite it.
46277 46262 # Note: m4 eats our [], so we need to use [ and ] instead.
46278 46263 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46279 46264 if test "x$has_forbidden_chars" != x; then
46280 46265 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46281 46266 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46282 46267 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46283 46268 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46284 46269 # Going to short mode and back again did indeed matter. Since short mode is
46285 46270 # case insensitive, let's make it lowercase to improve readability.
46286 46271 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46287 46272 # Now convert it back to Unix-style (cygpath)
46288 46273 input_path=`$CYGPATH -u "$shortmode_path"`
46289 46274 new_path="$input_path"
46290 46275 fi
46291 46276 fi
46292 46277
46293 46278 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46294 46279 if test "x$test_cygdrive_prefix" = x; then
46295 46280 # As a simple fix, exclude /usr/bin since it's not a real path.
46296 46281 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46297 46282 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46298 46283 # a path prefixed by /cygdrive for fixpath to work.
46299 46284 new_path="$CYGWIN_ROOT_PATH$input_path"
46300 46285 fi
46301 46286 fi
46302 46287
46303 46288 # remove trailing .exe if any
46304 46289 new_path="${new_path/%.exe/}"
46305 46290
46306 46291 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46307 46292
46308 46293 # First separate the path from the arguments. This will split at the first
46309 46294 # space.
46310 46295 complete="$BUILD_OBJCOPY"
46311 46296 path="${complete%% *}"
46312 46297 tmp="$complete EOL"
46313 46298 arguments="${tmp#* }"
46314 46299
46315 46300 # Input might be given as Windows format, start by converting to
46316 46301 # unix format.
46317 46302 new_path="$path"
46318 46303
46319 46304 windows_path="$new_path"
46320 46305 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46321 46306 unix_path=`$CYGPATH -u "$windows_path"`
46322 46307 new_path="$unix_path"
46323 46308 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46324 46309 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46325 46310 new_path="$unix_path"
46326 46311 fi
46327 46312
46328 46313
46329 46314 # Now try to locate executable using which
46330 46315 new_path=`$WHICH "$new_path" 2> /dev/null`
46331 46316
46332 46317 if test "x$new_path" = x; then
46333 46318 # Oops. Which didn't find the executable.
46334 46319 # The splitting of arguments from the executable at a space might have been incorrect,
46335 46320 # since paths with space are more likely in Windows. Give it another try with the whole
46336 46321 # argument.
46337 46322 path="$complete"
46338 46323 arguments="EOL"
46339 46324 new_path="$path"
46340 46325
46341 46326 windows_path="$new_path"
46342 46327 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46343 46328 unix_path=`$CYGPATH -u "$windows_path"`
46344 46329 new_path="$unix_path"
46345 46330 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46346 46331 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46347 46332 new_path="$unix_path"
46348 46333 fi
46349 46334
46350 46335
46351 46336 new_path=`$WHICH "$new_path" 2> /dev/null`
46352 46337 # bat and cmd files are not always considered executable in MSYS causing which
46353 46338 # to not find them
46354 46339 if test "x$new_path" = x \
46355 46340 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46356 46341 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46357 46342 new_path="$path"
46358 46343
46359 46344 windows_path="$new_path"
46360 46345 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46361 46346 unix_path=`$CYGPATH -u "$windows_path"`
46362 46347 new_path="$unix_path"
46363 46348 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46364 46349 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46365 46350 new_path="$unix_path"
46366 46351 fi
46367 46352
46368 46353 fi
46369 46354
46370 46355 if test "x$new_path" = x; then
46371 46356 # It's still not found. Now this is an unrecoverable error.
46372 46357 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46373 46358 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46374 46359 has_space=`$ECHO "$complete" | $GREP " "`
46375 46360 if test "x$has_space" != x; then
46376 46361 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46377 46362 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46378 46363 fi
46379 46364 as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46380 46365 fi
46381 46366 fi
46382 46367
46383 46368 # Now new_path has a complete unix path to the binary
46384 46369 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46385 46370 # Keep paths in /bin as-is, but remove trailing .exe if any
46386 46371 new_path="${new_path/%.exe/}"
46387 46372 # Do not save /bin paths to all_fixpath_prefixes!
46388 46373 else
46389 46374 # Not in mixed or Windows style, start by that.
46390 46375 new_path=`cmd //c echo $new_path`
46391 46376
46392 46377 input_path="$new_path"
46393 46378 # Check if we need to convert this using DOS-style short mode. If the path
46394 46379 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46395 46380 # take no chances and rewrite it.
46396 46381 # Note: m4 eats our [], so we need to use [ and ] instead.
46397 46382 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46398 46383 if test "x$has_forbidden_chars" != x; then
46399 46384 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46400 46385 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46401 46386 fi
46402 46387
46403 46388 # Output is in $new_path
46404 46389
46405 46390 windows_path="$new_path"
46406 46391 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46407 46392 unix_path=`$CYGPATH -u "$windows_path"`
46408 46393 new_path="$unix_path"
46409 46394 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46410 46395 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46411 46396 new_path="$unix_path"
46412 46397 fi
46413 46398
46414 46399 # remove trailing .exe if any
46415 46400 new_path="${new_path/%.exe/}"
46416 46401
46417 46402 # Save the first 10 bytes of this path to the storage, so fixpath can work.
46418 46403 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46419 46404 fi
46420 46405
46421 46406 else
46422 46407 # We're on a unix platform. Hooray! :)
46423 46408 # First separate the path from the arguments. This will split at the first
46424 46409 # space.
46425 46410 complete="$BUILD_OBJCOPY"
46426 46411 path="${complete%% *}"
46427 46412 tmp="$complete EOL"
46428 46413 arguments="${tmp#* }"
46429 46414
46430 46415 # Cannot rely on the command "which" here since it doesn't always work.
46431 46416 is_absolute_path=`$ECHO "$path" | $GREP ^/`
46432 46417 if test -z "$is_absolute_path"; then
46433 46418 # Path to executable is not absolute. Find it.
46434 46419 IFS_save="$IFS"
46435 46420 IFS=:
46436 46421 for p in $PATH; do
46437 46422 if test -f "$p/$path" && test -x "$p/$path"; then
46438 46423 new_path="$p/$path"
46439 46424 break
46440 46425 fi
46441 46426 done
46442 46427 IFS="$IFS_save"
46443 46428 else
46444 46429 # This is an absolute path, we can use it without further modifications.
46445 46430 new_path="$path"
46446 46431 fi
46447 46432
46448 46433 if test "x$new_path" = x; then
46449 46434 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46450 46435 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46451 46436 has_space=`$ECHO "$complete" | $GREP " "`
46452 46437 if test "x$has_space" != x; then
46453 46438 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46454 46439 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46455 46440 fi
46456 46441 as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46457 46442 fi
46458 46443 fi
46459 46444
46460 46445 # Now join together the path and the arguments once again
46461 46446 if test "x$arguments" != xEOL; then
46462 46447 new_complete="$new_path ${arguments% *}"
46463 46448 else
46464 46449 new_complete="$new_path"
46465 46450 fi
46466 46451
46467 46452 if test "x$complete" != "x$new_complete"; then
46468 46453 BUILD_OBJCOPY="$new_complete"
46469 46454 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46470 46455 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46471 46456 fi
46472 46457 fi
46473 46458
46474 46459
46475 46460
46476 46461 # Publish this variable in the help.
46477 46462
46478 46463
46479 46464 if [ -z "${BUILD_STRIP+x}" ]; then
46480 46465 # The variable is not set by user, try to locate tool using the code snippet
46481 46466 for ac_prog in strip
46482 46467 do
46483 46468 # Extract the first word of "$ac_prog", so it can be a program name with args.
46484 46469 set dummy $ac_prog; ac_word=$2
46485 46470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46486 46471 $as_echo_n "checking for $ac_word... " >&6; }
46487 46472 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46488 46473 $as_echo_n "(cached) " >&6
46489 46474 else
46490 46475 case $BUILD_STRIP in
46491 46476 [\\/]* | ?:[\\/]*)
46492 46477 ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46493 46478 ;;
46494 46479 *)
46495 46480 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46496 46481 for as_dir in $PATH
46497 46482 do
46498 46483 IFS=$as_save_IFS
46499 46484 test -z "$as_dir" && as_dir=.
46500 46485 for ac_exec_ext in '' $ac_executable_extensions; do
46501 46486 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46502 46487 ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46503 46488 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46504 46489 break 2
46505 46490 fi
46506 46491 done
46507 46492 done
46508 46493 IFS=$as_save_IFS
46509 46494
46510 46495 ;;
46511 46496 esac
46512 46497 fi
46513 46498 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46514 46499 if test -n "$BUILD_STRIP"; then
46515 46500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46516 46501 $as_echo "$BUILD_STRIP" >&6; }
46517 46502 else
46518 46503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46519 46504 $as_echo "no" >&6; }
46520 46505 fi
46521 46506
46522 46507
46523 46508 test -n "$BUILD_STRIP" && break
46524 46509 done
46525 46510
46526 46511 else
46527 46512 # The variable is set, but is it from the command line or the environment?
46528 46513
46529 46514 # Try to remove the string !BUILD_STRIP! from our list.
46530 46515 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46531 46516 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46532 46517 # If it failed, the variable was not from the command line. Ignore it,
46533 46518 # but warn the user (except for BASH, which is always set by the calling BASH).
46534 46519 if test "xBUILD_STRIP" != xBASH; then
46535 46520 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46536 46521 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46537 46522 fi
46538 46523 # Try to locate tool using the code snippet
46539 46524 for ac_prog in strip
46540 46525 do
46541 46526 # Extract the first word of "$ac_prog", so it can be a program name with args.
46542 46527 set dummy $ac_prog; ac_word=$2
46543 46528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46544 46529 $as_echo_n "checking for $ac_word... " >&6; }
46545 46530 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46546 46531 $as_echo_n "(cached) " >&6
46547 46532 else
46548 46533 case $BUILD_STRIP in
46549 46534 [\\/]* | ?:[\\/]*)
46550 46535 ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46551 46536 ;;
46552 46537 *)
46553 46538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46554 46539 for as_dir in $PATH
46555 46540 do
46556 46541 IFS=$as_save_IFS
46557 46542 test -z "$as_dir" && as_dir=.
46558 46543 for ac_exec_ext in '' $ac_executable_extensions; do
46559 46544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46560 46545 ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46561 46546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46562 46547 break 2
46563 46548 fi
46564 46549 done
46565 46550 done
46566 46551 IFS=$as_save_IFS
46567 46552
46568 46553 ;;
46569 46554 esac
46570 46555 fi
46571 46556 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46572 46557 if test -n "$BUILD_STRIP"; then
46573 46558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46574 46559 $as_echo "$BUILD_STRIP" >&6; }
46575 46560 else
46576 46561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46577 46562 $as_echo "no" >&6; }
46578 46563 fi
46579 46564
46580 46565
46581 46566 test -n "$BUILD_STRIP" && break
46582 46567 done
46583 46568
46584 46569 else
46585 46570 # If it succeeded, then it was overridden by the user. We will use it
46586 46571 # for the tool.
46587 46572
46588 46573 # First remove it from the list of overridden variables, so we can test
46589 46574 # for unknown variables in the end.
46590 46575 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46591 46576
46592 46577 # Check if we try to supply an empty value
46593 46578 if test "x$BUILD_STRIP" = x; then
46594 46579 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46595 46580 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46596 46581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46597 46582 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46598 46583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46599 46584 $as_echo "disabled" >&6; }
46600 46585 else
46601 46586 # Check if the provided tool contains a complete path.
46602 46587 tool_specified="$BUILD_STRIP"
46603 46588 tool_basename="${tool_specified##*/}"
46604 46589 if test "x$tool_basename" = "x$tool_specified"; then
46605 46590 # A command without a complete path is provided, search $PATH.
46606 46591 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46607 46592 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46608 46593 # Extract the first word of "$tool_basename", so it can be a program name with args.
46609 46594 set dummy $tool_basename; ac_word=$2
46610 46595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46611 46596 $as_echo_n "checking for $ac_word... " >&6; }
46612 46597 if ${ac_cv_path_BUILD_STRIP+:} false; then :
46613 46598 $as_echo_n "(cached) " >&6
46614 46599 else
46615 46600 case $BUILD_STRIP in
46616 46601 [\\/]* | ?:[\\/]*)
46617 46602 ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46618 46603 ;;
46619 46604 *)
46620 46605 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46621 46606 for as_dir in $PATH
46622 46607 do
46623 46608 IFS=$as_save_IFS
46624 46609 test -z "$as_dir" && as_dir=.
46625 46610 for ac_exec_ext in '' $ac_executable_extensions; do
46626 46611 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46627 46612 ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46628 46613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46629 46614 break 2
46630 46615 fi
46631 46616 done
46632 46617 done
46633 46618 IFS=$as_save_IFS
46634 46619
46635 46620 ;;
46636 46621 esac
46637 46622 fi
46638 46623 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46639 46624 if test -n "$BUILD_STRIP"; then
46640 46625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46641 46626 $as_echo "$BUILD_STRIP" >&6; }
46642 46627 else
46643 46628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46644 46629 $as_echo "no" >&6; }
46645 46630 fi
46646 46631
46647 46632
46648 46633 if test "x$BUILD_STRIP" = x; then
46649 46634 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46650 46635 fi
46651 46636 else
46652 46637 # Otherwise we believe it is a complete path. Use it as it is.
46653 46638 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46654 46639 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46655 46640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46656 46641 $as_echo_n "checking for BUILD_STRIP... " >&6; }
46657 46642 if test ! -x "$tool_specified"; then
46658 46643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46659 46644 $as_echo "not found" >&6; }
46660 46645 as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46661 46646 fi
46662 46647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46663 46648 $as_echo "$tool_specified" >&6; }
46664 46649 fi
46665 46650 fi
46666 46651 fi
46667 46652
46668 46653 fi
46669 46654
46670 46655
46671 46656
46672 46657 # Only process if variable expands to non-empty
46673 46658
46674 46659 if test "x$BUILD_STRIP" != x; then
46675 46660 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46676 46661
46677 46662 # First separate the path from the arguments. This will split at the first
46678 46663 # space.
46679 46664 complete="$BUILD_STRIP"
46680 46665 path="${complete%% *}"
46681 46666 tmp="$complete EOL"
46682 46667 arguments="${tmp#* }"
46683 46668
46684 46669 # Input might be given as Windows format, start by converting to
46685 46670 # unix format.
46686 46671 new_path=`$CYGPATH -u "$path"`
46687 46672
46688 46673 # Now try to locate executable using which
46689 46674 new_path=`$WHICH "$new_path" 2> /dev/null`
46690 46675 # bat and cmd files are not always considered executable in cygwin causing which
46691 46676 # to not find them
46692 46677 if test "x$new_path" = x \
46693 46678 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46694 46679 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46695 46680 new_path=`$CYGPATH -u "$path"`
46696 46681 fi
46697 46682 if test "x$new_path" = x; then
46698 46683 # Oops. Which didn't find the executable.
46699 46684 # The splitting of arguments from the executable at a space might have been incorrect,
46700 46685 # since paths with space are more likely in Windows. Give it another try with the whole
46701 46686 # argument.
46702 46687 path="$complete"
46703 46688 arguments="EOL"
46704 46689 new_path=`$CYGPATH -u "$path"`
46705 46690 new_path=`$WHICH "$new_path" 2> /dev/null`
46706 46691 # bat and cmd files are not always considered executable in cygwin causing which
46707 46692 # to not find them
46708 46693 if test "x$new_path" = x \
46709 46694 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46710 46695 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46711 46696 new_path=`$CYGPATH -u "$path"`
46712 46697 fi
46713 46698 if test "x$new_path" = x; then
46714 46699 # It's still not found. Now this is an unrecoverable error.
46715 46700 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46716 46701 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46717 46702 has_space=`$ECHO "$complete" | $GREP " "`
46718 46703 if test "x$has_space" != x; then
46719 46704 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46720 46705 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46721 46706 fi
46722 46707 as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46723 46708 fi
46724 46709 fi
46725 46710
46726 46711 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46727 46712 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46728 46713 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46729 46714 # "foo.exe" is OK but "foo" is an error.
46730 46715 #
46731 46716 # This test is therefore slightly more accurate than "test -f" to check for file presence.
46732 46717 # It is also a way to make sure we got the proper file name for the real test later on.
46733 46718 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46734 46719 if test "x$test_shortpath" = x; then
46735 46720 # Short path failed, file does not exist as specified.
46736 46721 # Try adding .exe or .cmd
46737 46722 if test -f "${new_path}.exe"; then
46738 46723 input_to_shortpath="${new_path}.exe"
46739 46724 elif test -f "${new_path}.cmd"; then
46740 46725 input_to_shortpath="${new_path}.cmd"
46741 46726 else
46742 46727 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46743 46728 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46744 46729 { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46745 46730 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46746 46731 as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46747 46732 fi
46748 46733 else
46749 46734 input_to_shortpath="$new_path"
46750 46735 fi
46751 46736
46752 46737 # Call helper function which possibly converts this using DOS-style short mode.
46753 46738 # If so, the updated path is stored in $new_path.
46754 46739 new_path="$input_to_shortpath"
46755 46740
46756 46741 input_path="$input_to_shortpath"
46757 46742 # Check if we need to convert this using DOS-style short mode. If the path
46758 46743 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46759 46744 # take no chances and rewrite it.
46760 46745 # Note: m4 eats our [], so we need to use [ and ] instead.
46761 46746 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46762 46747 if test "x$has_forbidden_chars" != x; then
46763 46748 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46764 46749 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46765 46750 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46766 46751 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46767 46752 # Going to short mode and back again did indeed matter. Since short mode is
46768 46753 # case insensitive, let's make it lowercase to improve readability.
46769 46754 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46770 46755 # Now convert it back to Unix-style (cygpath)
46771 46756 input_path=`$CYGPATH -u "$shortmode_path"`
46772 46757 new_path="$input_path"
46773 46758 fi
46774 46759 fi
46775 46760
46776 46761 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46777 46762 if test "x$test_cygdrive_prefix" = x; then
46778 46763 # As a simple fix, exclude /usr/bin since it's not a real path.
46779 46764 if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46780 46765 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46781 46766 # a path prefixed by /cygdrive for fixpath to work.
46782 46767 new_path="$CYGWIN_ROOT_PATH$input_path"
46783 46768 fi
46784 46769 fi
46785 46770
46786 46771 # remove trailing .exe if any
46787 46772 new_path="${new_path/%.exe/}"
46788 46773
46789 46774 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46790 46775
46791 46776 # First separate the path from the arguments. This will split at the first
46792 46777 # space.
46793 46778 complete="$BUILD_STRIP"
46794 46779 path="${complete%% *}"
46795 46780 tmp="$complete EOL"
46796 46781 arguments="${tmp#* }"
46797 46782
46798 46783 # Input might be given as Windows format, start by converting to
46799 46784 # unix format.
46800 46785 new_path="$path"
46801 46786
46802 46787 windows_path="$new_path"
46803 46788 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46804 46789 unix_path=`$CYGPATH -u "$windows_path"`
46805 46790 new_path="$unix_path"
46806 46791 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46807 46792 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46808 46793 new_path="$unix_path"
46809 46794 fi
46810 46795
46811 46796
46812 46797 # Now try to locate executable using which
46813 46798 new_path=`$WHICH "$new_path" 2> /dev/null`
46814 46799
46815 46800 if test "x$new_path" = x; then
46816 46801 # Oops. Which didn't find the executable.
46817 46802 # The splitting of arguments from the executable at a space might have been incorrect,
46818 46803 # since paths with space are more likely in Windows. Give it another try with the whole
46819 46804 # argument.
46820 46805 path="$complete"
46821 46806 arguments="EOL"
46822 46807 new_path="$path"
46823 46808
46824 46809 windows_path="$new_path"
46825 46810 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46826 46811 unix_path=`$CYGPATH -u "$windows_path"`
46827 46812 new_path="$unix_path"
46828 46813 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46829 46814 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46830 46815 new_path="$unix_path"
46831 46816 fi
46832 46817
46833 46818
46834 46819 new_path=`$WHICH "$new_path" 2> /dev/null`
46835 46820 # bat and cmd files are not always considered executable in MSYS causing which
46836 46821 # to not find them
46837 46822 if test "x$new_path" = x \
46838 46823 && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46839 46824 && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46840 46825 new_path="$path"
46841 46826
46842 46827 windows_path="$new_path"
46843 46828 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46844 46829 unix_path=`$CYGPATH -u "$windows_path"`
46845 46830 new_path="$unix_path"
46846 46831 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46847 46832 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46848 46833 new_path="$unix_path"
46849 46834 fi
46850 46835
46851 46836 fi
46852 46837
46853 46838 if test "x$new_path" = x; then
46854 46839 # It's still not found. Now this is an unrecoverable error.
46855 46840 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46856 46841 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46857 46842 has_space=`$ECHO "$complete" | $GREP " "`
46858 46843 if test "x$has_space" != x; then
46859 46844 { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46860 46845 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46861 46846 fi
46862 46847 as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46863 46848 fi
46864 46849 fi
46865 46850
46866 46851 # Now new_path has a complete unix path to the binary
46867 46852 if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46868 46853 # Keep paths in /bin as-is, but remove trailing .exe if any
46869 46854 new_path="${new_path/%.exe/}"
46870 46855 # Do not save /bin paths to all_fixpath_prefixes!
46871 46856 else
46872 46857 # Not in mixed or Windows style, start by that.
46873 46858 new_path=`cmd //c echo $new_path`
46874 46859
46875 46860 input_path="$new_path"
46876 46861 # Check if we need to convert this using DOS-style short mode. If the path
46877 46862 # contains just simple characters, use it. Otherwise (spaces, weird characters),
46878 46863 # take no chances and rewrite it.
46879 46864 # Note: m4 eats our [], so we need to use [ and ] instead.
46880 46865 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46881 46866 if test "x$has_forbidden_chars" != x; then
46882 46867 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46883 46868 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46884 46869 fi
46885 46870
46886 46871 # Output is in $new_path
46887 46872
46888 46873 windows_path="$new_path"
46889 46874 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46890 46875 unix_path=`$CYGPATH -u "$windows_path"`
46891 46876 new_path="$unix_path"
46892 46877 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46893 46878 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46894 46879 new_path="$unix_path"
46895 46880 fi
46896 46881
46897 46882 # remove trailing .exe if any
46898 46883 new_path="${new_path/%.exe/}"
46899 46884
46900 46885 # Save the first 10 bytes of this path to the storage, so fixpath can work.
46901 46886 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46902 46887 fi
46903 46888
46904 46889 else
46905 46890 # We're on a unix platform. Hooray! :)
46906 46891 # First separate the path from the arguments. This will split at the first
46907 46892 # space.
46908 46893 complete="$BUILD_STRIP"
46909 46894 path="${complete%% *}"
46910 46895 tmp="$complete EOL"
46911 46896 arguments="${tmp#* }"
46912 46897
46913 46898 # Cannot rely on the command "which" here since it doesn't always work.
46914 46899 is_absolute_path=`$ECHO "$path" | $GREP ^/`
46915 46900 if test -z "$is_absolute_path"; then
46916 46901 # Path to executable is not absolute. Find it.
46917 46902 IFS_save="$IFS"
46918 46903 IFS=:
46919 46904 for p in $PATH; do
46920 46905 if test -f "$p/$path" && test -x "$p/$path"; then
46921 46906 new_path="$p/$path"
46922 46907 break
46923 46908 fi
46924 46909 done
46925 46910 IFS="$IFS_save"
46926 46911 else
46927 46912 # This is an absolute path, we can use it without further modifications.
46928 46913 new_path="$path"
46929 46914 fi
46930 46915
46931 46916 if test "x$new_path" = x; then
46932 46917 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46933 46918 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46934 46919 has_space=`$ECHO "$complete" | $GREP " "`
46935 46920 if test "x$has_space" != x; then
46936 46921 { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46937 46922 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46938 46923 fi
46939 46924 as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46940 46925 fi
46941 46926 fi
46942 46927
46943 46928 # Now join together the path and the arguments once again
46944 46929 if test "x$arguments" != xEOL; then
46945 46930 new_complete="$new_path ${arguments% *}"
46946 46931 else
46947 46932 new_complete="$new_path"
46948 46933 fi
46949 46934
46950 46935 if test "x$complete" != "x$new_complete"; then
46951 46936 BUILD_STRIP="$new_complete"
46952 46937 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46953 46938 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46954 46939 fi
46955 46940 fi
46956 46941
46957 46942 # Assume the C compiler is the assembler
46958 46943 BUILD_AS="$BUILD_CC -c"
46959 46944 # Just like for the target compiler, use the compiler as linker
46960 46945 BUILD_LD="$BUILD_CC"
46961 46946 BUILD_LDCXX="$BUILD_CXX"
46962 46947
46963 46948 PATH="$OLDPATH"
46964 46949
46965 46950
46966 46951 COMPILER=$BUILD_CC
46967 46952 COMPILER_NAME=BuildC
46968 46953
46969 46954 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46970 46955 # cc -V output typically looks like
46971 46956 # cc: Sun C 5.12 Linux_i386 2011/11/16
46972 46957 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46973 46958 # Check that this is likely to be the Solaris Studio cc.
46974 46959 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46975 46960 if test $? -ne 0; then
46976 46961 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46977 46962 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
46978 46963 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46979 46964 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46980 46965 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46981 46966 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46982 46967 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46983 46968 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46984 46969 fi
46985 46970 # Remove usage instructions (if present), and
46986 46971 # collapse compiler output into a single line
46987 46972 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46988 46973 $SED -e 's/ *[Uu]sage:.*//'`
46989 46974 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46990 46975 $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46991 46976 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
46992 46977 # xlc -qversion output typically looks like
46993 46978 # IBM XL C/C++ for AIX, V11.1 (5724-X13)
46994 46979 # Version: 11.01.0000.0015
46995 46980 COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46996 46981 # Check that this is likely to be the IBM XL C compiler.
46997 46982 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46998 46983 if test $? -ne 0; then
46999 46984 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47000 46985 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47001 46986 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47002 46987 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47003 46988 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47004 46989 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47005 46990 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47006 46991 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47007 46992 fi
47008 46993 # Collapse compiler output into a single line
47009 46994 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47010 46995 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47011 46996 $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47012 46997 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47013 46998 # There is no specific version flag, but all output starts with a version string.
47014 46999 # First line typically looks something like:
47015 47000 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47016 47001 COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47017 47002 # Check that this is likely to be Microsoft CL.EXE.
47018 47003 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47019 47004 if test $? -ne 0; then
47020 47005 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47021 47006 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47022 47007 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47023 47008 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47024 47009 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47025 47010 fi
47026 47011 # Collapse compiler output into a single line
47027 47012 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47028 47013 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47029 47014 $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47030 47015 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47031 47016 # gcc --version output typically looks like
47032 47017 # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47033 47018 # Copyright (C) 2013 Free Software Foundation, Inc.
47034 47019 # This is free software; see the source for copying conditions. There is NO
47035 47020 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47036 47021 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47037 47022 # Check that this is likely to be GCC.
47038 47023 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47039 47024 if test $? -ne 0; then
47040 47025 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47041 47026 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47042 47027 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47043 47028 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47044 47029 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47045 47030 fi
47046 47031 # Remove Copyright and legalese from version string, and
47047 47032 # collapse into a single line
47048 47033 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47049 47034 $SED -e 's/ *Copyright .*//'`
47050 47035 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47051 47036 $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47052 47037 elif test "x$TOOLCHAIN_TYPE" = xclang; then
47053 47038 # clang --version output typically looks like
47054 47039 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47055 47040 # clang version 3.3 (tags/RELEASE_33/final)
47056 47041 # or
47057 47042 # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47058 47043 # Target: x86_64-pc-linux-gnu
47059 47044 # Thread model: posix
47060 47045 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47061 47046 # Check that this is likely to be clang
47062 47047 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47063 47048 if test $? -ne 0; then
47064 47049 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47065 47050 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47066 47051 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47067 47052 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47068 47053 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47069 47054 fi
47070 47055 # Collapse compiler output into a single line
47071 47056 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47072 47057 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47073 47058 $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47074 47059 else
47075 47060 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47076 47061 fi
47077 47062 # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47078 47063 BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47079 47064 # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47080 47065 BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47081 47066
47082 47067 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47083 47068 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47084 47069
47085 47070
47086 47071 COMPILER=$BUILD_CXX
47087 47072 COMPILER_NAME=BuildC++
47088 47073
47089 47074 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47090 47075 # cc -V output typically looks like
47091 47076 # cc: Sun C 5.12 Linux_i386 2011/11/16
47092 47077 COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47093 47078 # Check that this is likely to be the Solaris Studio cc.
47094 47079 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47095 47080 if test $? -ne 0; then
47096 47081 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47097 47082 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47098 47083 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47099 47084 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47100 47085 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47101 47086 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47102 47087 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47103 47088 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47104 47089 fi
47105 47090 # Remove usage instructions (if present), and
47106 47091 # collapse compiler output into a single line
47107 47092 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47108 47093 $SED -e 's/ *[Uu]sage:.*//'`
47109 47094 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47110 47095 $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47111 47096 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
47112 47097 # xlc -qversion output typically looks like
47113 47098 # IBM XL C/C++ for AIX, V11.1 (5724-X13)
47114 47099 # Version: 11.01.0000.0015
47115 47100 COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47116 47101 # Check that this is likely to be the IBM XL C compiler.
47117 47102 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47118 47103 if test $? -ne 0; then
47119 47104 ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47120 47105 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47121 47106 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47122 47107 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47123 47108 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47124 47109 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47125 47110 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47126 47111 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47127 47112 fi
47128 47113 # Collapse compiler output into a single line
47129 47114 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47130 47115 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47131 47116 $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47132 47117 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47133 47118 # There is no specific version flag, but all output starts with a version string.
47134 47119 # First line typically looks something like:
47135 47120 # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47136 47121 COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47137 47122 # Check that this is likely to be Microsoft CL.EXE.
47138 47123 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47139 47124 if test $? -ne 0; then
47140 47125 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47141 47126 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47142 47127 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47143 47128 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47144 47129 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47145 47130 fi
47146 47131 # Collapse compiler output into a single line
47147 47132 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47148 47133 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47149 47134 $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47150 47135 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
47151 47136 # gcc --version output typically looks like
47152 47137 # gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47153 47138 # Copyright (C) 2013 Free Software Foundation, Inc.
47154 47139 # This is free software; see the source for copying conditions. There is NO
47155 47140 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47156 47141 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47157 47142 # Check that this is likely to be GCC.
47158 47143 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47159 47144 if test $? -ne 0; then
47160 47145 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47161 47146 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47162 47147 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47163 47148 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47164 47149 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47165 47150 fi
47166 47151 # Remove Copyright and legalese from version string, and
47167 47152 # collapse into a single line
47168 47153 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47169 47154 $SED -e 's/ *Copyright .*//'`
47170 47155 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47171 47156 $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47172 47157 elif test "x$TOOLCHAIN_TYPE" = xclang; then
47173 47158 # clang --version output typically looks like
47174 47159 # Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47175 47160 # clang version 3.3 (tags/RELEASE_33/final)
47176 47161 # or
47177 47162 # Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47178 47163 # Target: x86_64-pc-linux-gnu
47179 47164 # Thread model: posix
47180 47165 COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47181 47166 # Check that this is likely to be clang
47182 47167 $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47183 47168 if test $? -ne 0; then
47184 47169 { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
47185 47170 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47186 47171 { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47187 47172 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47188 47173 as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47189 47174 fi
47190 47175 # Collapse compiler output into a single line
47191 47176 COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47192 47177 COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47193 47178 $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47194 47179 else
47195 47180 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47196 47181 fi
47197 47182 # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47198 47183 BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47199 47184 # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47200 47185 BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47201 47186
47202 47187 { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47203 47188 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47204 47189
47205 47190
47206 47191 if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47207 47192 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47208 47193 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47209 47194 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47210 47195 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47211 47196 fi
47212 47197
47213 47198 # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47214 47199 if [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47215 47200 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47216 47201 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47217 47202 fi
47218 47203
47219 47204 if [[ "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47220 47205 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47221 47206 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47222 47207 fi
47223 47208
47224 47209 OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47225 47210
47226 47211 else
47227 47212 # If we are not cross compiling, use the normal target compilers for
47228 47213 # building the build platform executables.
47229 47214 BUILD_CC="$CC"
47230 47215 BUILD_CXX="$CXX"
47231 47216 BUILD_LD="$LD"
47232 47217 BUILD_LDCXX="$LDCXX"
47233 47218 BUILD_NM="$NM"
47234 47219 BUILD_AS="$AS"
47235 47220 BUILD_OBJCOPY="$OBJCOPY"
47236 47221 BUILD_STRIP="$STRIP"
47237 47222 BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47238 47223 BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47239 47224 BUILD_AR="$AR"
47240 47225
47241 47226
47242 47227 if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47243 47228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47244 47229 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47245 47230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47246 47231 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47247 47232 fi
47248 47233
47249 47234 # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47250 47235 if [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47251 47236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47252 47237 $as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47253 47238 fi
47254 47239
47255 47240 if [[ "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47256 47241 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47257 47242 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47258 47243 fi
47259 47244
47260 47245 OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
47261 47246
47262 47247 fi
47263 47248
47264 47249
47265 47250
47266 47251
47267 47252
47268 47253
47269 47254
47270 47255
47271 47256
47272 47257
47273 47258
47274 47259
47275 47260 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47276 47261 # For hotspot, we need these in Windows mixed path,
47277 47262 # so rewrite them all. Need added .exe suffix.
47278 47263 HOTSPOT_CXX="$CXX.exe"
47279 47264 HOTSPOT_LD="$LD.exe"
47280 47265 HOTSPOT_MT="$MT.exe"
47281 47266 HOTSPOT_RC="$RC.exe"
47282 47267
47283 47268 unix_path="$HOTSPOT_CXX"
47284 47269 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47285 47270 windows_path=`$CYGPATH -m "$unix_path"`
47286 47271 HOTSPOT_CXX="$windows_path"
47287 47272 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47288 47273 windows_path=`cmd //c echo $unix_path`
47289 47274 HOTSPOT_CXX="$windows_path"
47290 47275 fi
47291 47276
47292 47277
47293 47278 unix_path="$HOTSPOT_LD"
47294 47279 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47295 47280 windows_path=`$CYGPATH -m "$unix_path"`
47296 47281 HOTSPOT_LD="$windows_path"
47297 47282 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47298 47283 windows_path=`cmd //c echo $unix_path`
47299 47284 HOTSPOT_LD="$windows_path"
47300 47285 fi
47301 47286
47302 47287
47303 47288 unix_path="$HOTSPOT_MT"
47304 47289 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47305 47290 windows_path=`$CYGPATH -m "$unix_path"`
47306 47291 HOTSPOT_MT="$windows_path"
47307 47292 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47308 47293 windows_path=`cmd //c echo $unix_path`
47309 47294 HOTSPOT_MT="$windows_path"
47310 47295 fi
47311 47296
47312 47297
47313 47298 unix_path="$HOTSPOT_RC"
47314 47299 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47315 47300 windows_path=`$CYGPATH -m "$unix_path"`
47316 47301 HOTSPOT_RC="$windows_path"
47317 47302 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47318 47303 windows_path=`cmd //c echo $unix_path`
47319 47304 HOTSPOT_RC="$windows_path"
47320 47305 fi
47321 47306
47322 47307
47323 47308
47324 47309 else
47325 47310 HOTSPOT_CXX="$CXX"
47326 47311 HOTSPOT_LD="$LD"
47327 47312 fi
47328 47313
47329 47314
47330 47315
47331 47316 if test "x$TOOLCHAIN_TYPE" = xclang; then
47332 47317 USE_CLANG=true
47333 47318 fi
47334 47319
47335 47320
47336 47321
47337 47322
47338 47323
47339 47324 # The package path is used only on macosx?
47340 47325 # FIXME: clean this up, and/or move it elsewhere.
47341 47326 PACKAGE_PATH=/opt/local
47342 47327
47343 47328
47344 47329 # Check for extra potential brokenness.
47345 47330 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47346 47331 # On Windows, double-check that we got the right compiler.
47347 47332 CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47348 47333 COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47349 47334 if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47350 47335 if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47351 47336 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\" or \"x86\"." "$LINENO" 5
47352 47337 fi
47353 47338 elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47354 47339 if test "x$COMPILER_CPU_TEST" != "xx64"; then
47355 47340 as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47356 47341 fi
47357 47342 fi
47358 47343 fi
47359 47344
47360 47345 if test "x$TOOLCHAIN_TYPE" = xgcc; then
47361 47346 # If this is a --hash-style=gnu system, use --hash-style=both, why?
47362 47347 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47363 47348 # This is later checked when setting flags.
47364 47349
47365 47350 # "-Og" suppported for GCC 4.8 and later
47366 47351 CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47367 47352
47368 47353
47369 47354
47370 47355
47371 47356
47372 47357
47373 47358
47374 47359
47375 47360
47376 47361
47377 47362
47378 47363
47379 47364
47380 47365
47381 47366
47382 47367
47383 47368
47384 47369
47385 47370
47386 47371
47387 47372
47388 47373
47389 47374
47390 47375
47391 47376
47392 47377
47393 47378
47394 47379
47395 47380
47396 47381
47397 47382
47398 47383
47399 47384
47400 47385
47401 47386
47402 47387
47403 47388
47404 47389
47405 47390
47406 47391
47407 47392
47408 47393
47409 47394
47410 47395
47411 47396
47412 47397
47413 47398
47414 47399 # Execute function body
47415 47400
47416 47401
47417 47402
47418 47403
47419 47404
47420 47405
47421 47406
47422 47407
47423 47408
47424 47409
47425 47410
47426 47411
47427 47412
47428 47413
47429 47414
47430 47415
47431 47416
47432 47417
47433 47418
47434 47419
47435 47420
47436 47421
47437 47422
47438 47423
47439 47424
47440 47425
47441 47426
47442 47427
47443 47428
47444 47429
47445 47430
47446 47431
47447 47432
47448 47433
47449 47434
47450 47435
47451 47436
47452 47437
47453 47438
47454 47439
47455 47440
47456 47441
47457 47442
47458 47443
47459 47444
47460 47445
47461 47446
47462 47447
47463 47448 # Execute function body
47464 47449
47465 47450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47466 47451 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47467 47452 supports=yes
47468 47453
47469 47454 saved_cflags="$CFLAGS"
47470 47455 CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47471 47456 ac_ext=c
47472 47457 ac_cpp='$CPP $CPPFLAGS'
47473 47458 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47474 47459 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47475 47460 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47476 47461
47477 47462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47478 47463 /* end confdefs.h. */
47479 47464 int i;
47480 47465 _ACEOF
47481 47466 if ac_fn_c_try_compile "$LINENO"; then :
47482 47467
47483 47468 else
47484 47469 supports=no
47485 47470 fi
47486 47471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47487 47472 ac_ext=cpp
47488 47473 ac_cpp='$CXXCPP $CPPFLAGS'
47489 47474 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47490 47475 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47491 47476 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47492 47477
47493 47478 CFLAGS="$saved_cflags"
47494 47479
47495 47480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47496 47481 $as_echo "$supports" >&6; }
47497 47482 if test "x$supports" = "xyes" ; then
47498 47483 :
47499 47484 C_COMP_SUPPORTS="yes"
47500 47485 else
47501 47486 :
47502 47487 C_COMP_SUPPORTS="no"
47503 47488 fi
47504 47489
47505 47490
47506 47491
47507 47492
47508 47493
47509 47494
47510 47495
47511 47496
47512 47497
47513 47498
47514 47499
47515 47500
47516 47501
47517 47502
47518 47503
47519 47504
47520 47505
47521 47506
47522 47507
47523 47508
47524 47509
47525 47510
47526 47511
47527 47512
47528 47513
47529 47514
47530 47515
47531 47516
47532 47517
47533 47518
47534 47519
47535 47520
47536 47521
47537 47522
47538 47523
47539 47524
47540 47525
47541 47526
47542 47527
47543 47528
47544 47529
47545 47530
47546 47531
47547 47532
47548 47533
47549 47534
47550 47535
47551 47536
47552 47537
47553 47538
47554 47539
47555 47540
47556 47541
47557 47542
47558 47543
47559 47544
47560 47545
47561 47546
47562 47547
47563 47548 # Execute function body
47564 47549
47565 47550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47566 47551 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47567 47552 supports=yes
47568 47553
47569 47554 saved_cxxflags="$CXXFLAGS"
47570 47555 CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47571 47556 ac_ext=cpp
47572 47557 ac_cpp='$CXXCPP $CPPFLAGS'
47573 47558 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47574 47559 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47575 47560 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47576 47561
47577 47562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47578 47563 /* end confdefs.h. */
47579 47564 int i;
47580 47565 _ACEOF
47581 47566 if ac_fn_cxx_try_compile "$LINENO"; then :
47582 47567
47583 47568 else
47584 47569 supports=no
47585 47570 fi
47586 47571 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47587 47572 ac_ext=cpp
47588 47573 ac_cpp='$CXXCPP $CPPFLAGS'
47589 47574 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47590 47575 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47591 47576 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47592 47577
47593 47578 CXXFLAGS="$saved_cxxflags"
47594 47579
47595 47580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47596 47581 $as_echo "$supports" >&6; }
47597 47582 if test "x$supports" = "xyes" ; then
47598 47583 :
47599 47584 CXX_COMP_SUPPORTS="yes"
47600 47585 else
47601 47586 :
47602 47587 CXX_COMP_SUPPORTS="no"
47603 47588 fi
47604 47589
47605 47590
47606 47591
47607 47592
47608 47593
47609 47594
47610 47595
47611 47596
47612 47597
47613 47598
47614 47599
47615 47600
47616 47601
47617 47602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47618 47603 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47619 47604 supports=no
47620 47605 if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47621 47606
47622 47607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47623 47608 $as_echo "$supports" >&6; }
47624 47609 if test "x$supports" = "xyes" ; then
47625 47610 :
47626 47611 HAS_CFLAG_OPTIMIZE_DEBUG=true
47627 47612 else
47628 47613 :
47629 47614 HAS_CFLAG_OPTIMIZE_DEBUG=false
47630 47615 fi
47631 47616
47632 47617
47633 47618
47634 47619
47635 47620
47636 47621
47637 47622
47638 47623 # "-z relro" supported in GNU binutils 2.17 and later
47639 47624 LINKER_RELRO_FLAG="-Wl,-z,relro"
47640 47625
47641 47626
47642 47627
47643 47628
47644 47629
47645 47630
47646 47631
47647 47632
47648 47633
47649 47634
47650 47635
47651 47636
47652 47637
47653 47638
47654 47639
47655 47640
47656 47641
47657 47642
47658 47643
47659 47644
47660 47645
47661 47646
47662 47647
47663 47648
47664 47649
47665 47650
47666 47651
47667 47652
47668 47653
47669 47654
47670 47655
47671 47656
47672 47657
47673 47658
47674 47659
47675 47660
47676 47661
47677 47662
47678 47663
47679 47664
47680 47665
47681 47666
47682 47667
47683 47668
47684 47669
47685 47670
47686 47671
47687 47672 # Execute function body
47688 47673
47689 47674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47690 47675 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47691 47676 supports=yes
47692 47677
47693 47678 saved_ldflags="$LDFLAGS"
47694 47679 LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47695 47680 ac_ext=c
47696 47681 ac_cpp='$CPP $CPPFLAGS'
47697 47682 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47698 47683 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47699 47684 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47700 47685
47701 47686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47702 47687 /* end confdefs.h. */
47703 47688
47704 47689 int
47705 47690 main ()
47706 47691 {
47707 47692
47708 47693 ;
47709 47694 return 0;
47710 47695 }
47711 47696 _ACEOF
47712 47697 if ac_fn_c_try_link "$LINENO"; then :
47713 47698
47714 47699 else
47715 47700 supports=no
47716 47701 fi
47717 47702 rm -f core conftest.err conftest.$ac_objext \
47718 47703 conftest$ac_exeext conftest.$ac_ext
47719 47704 ac_ext=cpp
47720 47705 ac_cpp='$CXXCPP $CPPFLAGS'
47721 47706 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47722 47707 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47723 47708 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47724 47709
47725 47710 LDFLAGS="$saved_ldflags"
47726 47711
47727 47712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47728 47713 $as_echo "$supports" >&6; }
47729 47714 if test "x$supports" = "xyes" ; then
47730 47715 :
47731 47716 HAS_LINKER_RELRO=true
47732 47717 else
47733 47718 :
47734 47719 HAS_LINKER_RELRO=false
47735 47720 fi
47736 47721
47737 47722
47738 47723
47739 47724
47740 47725
47741 47726
47742 47727
47743 47728
47744 47729
47745 47730
47746 47731
47747 47732
47748 47733
47749 47734 # "-z now" supported in GNU binutils 2.11 and later
47750 47735 LINKER_NOW_FLAG="-Wl,-z,now"
47751 47736
47752 47737
47753 47738
47754 47739
47755 47740
47756 47741
47757 47742
47758 47743
47759 47744
47760 47745
47761 47746
47762 47747
47763 47748
47764 47749
47765 47750
47766 47751
47767 47752
47768 47753
47769 47754
47770 47755
47771 47756
47772 47757
47773 47758
47774 47759
47775 47760
47776 47761
47777 47762
47778 47763
47779 47764
47780 47765
47781 47766
47782 47767
47783 47768
47784 47769
47785 47770
47786 47771
47787 47772
47788 47773
47789 47774
47790 47775
47791 47776
47792 47777
47793 47778
47794 47779
47795 47780
47796 47781
47797 47782
47798 47783 # Execute function body
47799 47784
47800 47785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47801 47786 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47802 47787 supports=yes
47803 47788
47804 47789 saved_ldflags="$LDFLAGS"
47805 47790 LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47806 47791 ac_ext=c
47807 47792 ac_cpp='$CPP $CPPFLAGS'
47808 47793 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47809 47794 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47810 47795 ac_compiler_gnu=$ac_cv_c_compiler_gnu
47811 47796
47812 47797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47813 47798 /* end confdefs.h. */
47814 47799
47815 47800 int
47816 47801 main ()
47817 47802 {
47818 47803
47819 47804 ;
47820 47805 return 0;
47821 47806 }
47822 47807 _ACEOF
47823 47808 if ac_fn_c_try_link "$LINENO"; then :
47824 47809
47825 47810 else
47826 47811 supports=no
47827 47812 fi
47828 47813 rm -f core conftest.err conftest.$ac_objext \
47829 47814 conftest$ac_exeext conftest.$ac_ext
47830 47815 ac_ext=cpp
47831 47816 ac_cpp='$CXXCPP $CPPFLAGS'
47832 47817 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47833 47818 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47834 47819 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47835 47820
47836 47821 LDFLAGS="$saved_ldflags"
47837 47822
47838 47823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47839 47824 $as_echo "$supports" >&6; }
47840 47825 if test "x$supports" = "xyes" ; then
47841 47826 :
47842 47827 HAS_LINKER_NOW=true
47843 47828 else
47844 47829 :
47845 47830 HAS_LINKER_NOW=false
47846 47831 fi
47847 47832
47848 47833
47849 47834
47850 47835
47851 47836
47852 47837
47853 47838
47854 47839
47855 47840
47856 47841
47857 47842
47858 47843
47859 47844 fi
47860 47845
47861 47846 # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47862 47847 # in executable.'
47863 47848 USING_BROKEN_SUSE_LD=no
47864 47849 if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47865 47850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47866 47851 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47867 47852 $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47868 47853 $ECHO "int main() { }" > main.c
47869 47854 if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47870 47855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47871 47856 $as_echo "no" >&6; }
47872 47857 USING_BROKEN_SUSE_LD=no
47873 47858 else
47874 47859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47875 47860 $as_echo "yes" >&6; }
47876 47861 USING_BROKEN_SUSE_LD=yes
47877 47862 fi
47878 47863 $RM version-script.map main.c a.out
47879 47864 fi
47880 47865
47881 47866
47882 47867 # Setup hotspot lecagy names for toolchains
47883 47868 HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47884 47869 if test "x$TOOLCHAIN_TYPE" = xclang; then
47885 47870 HOTSPOT_TOOLCHAIN_TYPE=gcc
47886 47871 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47887 47872 HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47888 47873 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47889 47874 HOTSPOT_TOOLCHAIN_TYPE=visCPP
47890 47875 fi
47891 47876
47892 47877
47893 47878
47894 47879 # Setup the JTReg Regression Test Harness.
47895 47880
47896 47881
47897 47882 # Check whether --with-jtreg was given.
47898 47883 if test "${with_jtreg+set}" = set; then :
47899 47884 withval=$with_jtreg;
47900 47885 else
47901 47886 with_jtreg=no
47902 47887 fi
47903 47888
47904 47889
47905 47890 if test "x$with_jtreg" = xno; then
47906 47891 # jtreg disabled
47907 47892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47908 47893 $as_echo_n "checking for jtreg... " >&6; }
47909 47894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47910 47895 $as_echo "no" >&6; }
47911 47896 else
47912 47897 if test "x$with_jtreg" != xyes; then
47913 47898 # with path specified.
47914 47899 JT_HOME="$with_jtreg"
47915 47900 fi
47916 47901
47917 47902 if test "x$JT_HOME" != x; then
47918 47903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47919 47904 $as_echo_n "checking for jtreg... " >&6; }
47920 47905
47921 47906 # use JT_HOME enviroment var.
47922 47907
47923 47908 # Only process if variable expands to non-empty
47924 47909
47925 47910 if test "x$JT_HOME" != x; then
47926 47911 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47927 47912
47928 47913 # Input might be given as Windows format, start by converting to
47929 47914 # unix format.
47930 47915 path="$JT_HOME"
47931 47916 new_path=`$CYGPATH -u "$path"`
47932 47917
47933 47918 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47934 47919 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47935 47920 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47936 47921 # "foo.exe" is OK but "foo" is an error.
47937 47922 #
47938 47923 # This test is therefore slightly more accurate than "test -f" to check for file precense.
47939 47924 # It is also a way to make sure we got the proper file name for the real test later on.
47940 47925 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47941 47926 if test "x$test_shortpath" = x; then
47942 47927 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47943 47928 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47944 47929 as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47945 47930 fi
47946 47931
47947 47932 # Call helper function which possibly converts this using DOS-style short mode.
47948 47933 # If so, the updated path is stored in $new_path.
47949 47934
47950 47935 input_path="$new_path"
47951 47936 # Check if we need to convert this using DOS-style short mode. If the path
47952 47937 # contains just simple characters, use it. Otherwise (spaces, weird characters),
47953 47938 # take no chances and rewrite it.
47954 47939 # Note: m4 eats our [], so we need to use [ and ] instead.
47955 47940 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47956 47941 if test "x$has_forbidden_chars" != x; then
47957 47942 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47958 47943 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47959 47944 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47960 47945 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47961 47946 # Going to short mode and back again did indeed matter. Since short mode is
47962 47947 # case insensitive, let's make it lowercase to improve readability.
47963 47948 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47964 47949 # Now convert it back to Unix-style (cygpath)
47965 47950 input_path=`$CYGPATH -u "$shortmode_path"`
47966 47951 new_path="$input_path"
47967 47952 fi
47968 47953 fi
47969 47954
47970 47955 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47971 47956 if test "x$test_cygdrive_prefix" = x; then
47972 47957 # As a simple fix, exclude /usr/bin since it's not a real path.
47973 47958 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47974 47959 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47975 47960 # a path prefixed by /cygdrive for fixpath to work.
47976 47961 new_path="$CYGWIN_ROOT_PATH$input_path"
47977 47962 fi
47978 47963 fi
47979 47964
47980 47965
47981 47966 if test "x$path" != "x$new_path"; then
47982 47967 JT_HOME="$new_path"
47983 47968 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47984 47969 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47985 47970 fi
47986 47971
47987 47972 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47988 47973
47989 47974 path="$JT_HOME"
47990 47975 has_colon=`$ECHO $path | $GREP ^.:`
47991 47976 new_path="$path"
47992 47977 if test "x$has_colon" = x; then
47993 47978 # Not in mixed or Windows style, start by that.
47994 47979 new_path=`cmd //c echo $path`
47995 47980 fi
47996 47981
47997 47982
47998 47983 input_path="$new_path"
47999 47984 # Check if we need to convert this using DOS-style short mode. If the path
48000 47985 # contains just simple characters, use it. Otherwise (spaces, weird characters),
48001 47986 # take no chances and rewrite it.
48002 47987 # Note: m4 eats our [], so we need to use [ and ] instead.
48003 47988 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48004 47989 if test "x$has_forbidden_chars" != x; then
48005 47990 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48006 47991 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48007 47992 fi
48008 47993
48009 47994
48010 47995 windows_path="$new_path"
48011 47996 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48012 47997 unix_path=`$CYGPATH -u "$windows_path"`
48013 47998 new_path="$unix_path"
48014 47999 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48015 48000 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48016 48001 new_path="$unix_path"
48017 48002 fi
48018 48003
48019 48004 if test "x$path" != "x$new_path"; then
48020 48005 JT_HOME="$new_path"
48021 48006 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48022 48007 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48023 48008 fi
48024 48009
48025 48010 # Save the first 10 bytes of this path to the storage, so fixpath can work.
48026 48011 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48027 48012
48028 48013 else
48029 48014 # We're on a unix platform. Hooray! :)
48030 48015 path="$JT_HOME"
48031 48016 has_space=`$ECHO "$path" | $GREP " "`
48032 48017 if test "x$has_space" != x; then
48033 48018 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48034 48019 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48035 48020 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48036 48021 fi
48037 48022
48038 48023 # Use eval to expand a potential ~
48039 48024 eval path="$path"
48040 48025 if test ! -f "$path" && test ! -d "$path"; then
48041 48026 as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48042 48027 fi
48043 48028
48044 48029 if test -d "$path"; then
48045 48030 JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48046 48031 else
48047 48032 dir="`$DIRNAME "$path"`"
48048 48033 base="`$BASENAME "$path"`"
48049 48034 JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48050 48035 fi
48051 48036 fi
48052 48037 fi
48053 48038
48054 48039
48055 48040 # jtreg win32 script works for everybody
48056 48041 JTREGEXE="$JT_HOME/bin/jtreg"
48057 48042
48058 48043 if test ! -f "$JTREGEXE"; then
48059 48044 as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48060 48045 fi
48061 48046
48062 48047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48063 48048 $as_echo "$JTREGEXE" >&6; }
48064 48049 else
48065 48050 # try to find jtreg on path
48066 48051
48067 48052
48068 48053
48069 48054 # Publish this variable in the help.
48070 48055
48071 48056
48072 48057 if [ -z "${JTREGEXE+x}" ]; then
48073 48058 # The variable is not set by user, try to locate tool using the code snippet
48074 48059 for ac_prog in jtreg
48075 48060 do
48076 48061 # Extract the first word of "$ac_prog", so it can be a program name with args.
48077 48062 set dummy $ac_prog; ac_word=$2
48078 48063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48079 48064 $as_echo_n "checking for $ac_word... " >&6; }
48080 48065 if ${ac_cv_path_JTREGEXE+:} false; then :
48081 48066 $as_echo_n "(cached) " >&6
48082 48067 else
48083 48068 case $JTREGEXE in
48084 48069 [\\/]* | ?:[\\/]*)
48085 48070 ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48086 48071 ;;
48087 48072 *)
48088 48073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48089 48074 for as_dir in $PATH
48090 48075 do
48091 48076 IFS=$as_save_IFS
48092 48077 test -z "$as_dir" && as_dir=.
48093 48078 for ac_exec_ext in '' $ac_executable_extensions; do
48094 48079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48095 48080 ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48096 48081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48097 48082 break 2
48098 48083 fi
48099 48084 done
48100 48085 done
48101 48086 IFS=$as_save_IFS
48102 48087
48103 48088 ;;
48104 48089 esac
48105 48090 fi
48106 48091 JTREGEXE=$ac_cv_path_JTREGEXE
48107 48092 if test -n "$JTREGEXE"; then
48108 48093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48109 48094 $as_echo "$JTREGEXE" >&6; }
48110 48095 else
48111 48096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48112 48097 $as_echo "no" >&6; }
48113 48098 fi
48114 48099
48115 48100
48116 48101 test -n "$JTREGEXE" && break
48117 48102 done
48118 48103
48119 48104 else
48120 48105 # The variable is set, but is it from the command line or the environment?
48121 48106
48122 48107 # Try to remove the string !JTREGEXE! from our list.
48123 48108 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48124 48109 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48125 48110 # If it failed, the variable was not from the command line. Ignore it,
48126 48111 # but warn the user (except for BASH, which is always set by the calling BASH).
48127 48112 if test "xJTREGEXE" != xBASH; then
48128 48113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48129 48114 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48130 48115 fi
48131 48116 # Try to locate tool using the code snippet
48132 48117 for ac_prog in jtreg
48133 48118 do
48134 48119 # Extract the first word of "$ac_prog", so it can be a program name with args.
48135 48120 set dummy $ac_prog; ac_word=$2
48136 48121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48137 48122 $as_echo_n "checking for $ac_word... " >&6; }
48138 48123 if ${ac_cv_path_JTREGEXE+:} false; then :
48139 48124 $as_echo_n "(cached) " >&6
48140 48125 else
48141 48126 case $JTREGEXE in
48142 48127 [\\/]* | ?:[\\/]*)
48143 48128 ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48144 48129 ;;
48145 48130 *)
48146 48131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48147 48132 for as_dir in $PATH
48148 48133 do
48149 48134 IFS=$as_save_IFS
48150 48135 test -z "$as_dir" && as_dir=.
48151 48136 for ac_exec_ext in '' $ac_executable_extensions; do
48152 48137 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48153 48138 ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48154 48139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48155 48140 break 2
48156 48141 fi
48157 48142 done
48158 48143 done
48159 48144 IFS=$as_save_IFS
48160 48145
48161 48146 ;;
48162 48147 esac
48163 48148 fi
48164 48149 JTREGEXE=$ac_cv_path_JTREGEXE
48165 48150 if test -n "$JTREGEXE"; then
48166 48151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48167 48152 $as_echo "$JTREGEXE" >&6; }
48168 48153 else
48169 48154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48170 48155 $as_echo "no" >&6; }
48171 48156 fi
48172 48157
48173 48158
48174 48159 test -n "$JTREGEXE" && break
48175 48160 done
48176 48161
48177 48162 else
48178 48163 # If it succeeded, then it was overridden by the user. We will use it
48179 48164 # for the tool.
48180 48165
48181 48166 # First remove it from the list of overridden variables, so we can test
48182 48167 # for unknown variables in the end.
48183 48168 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48184 48169
48185 48170 # Check if we try to supply an empty value
48186 48171 if test "x$JTREGEXE" = x; then
48187 48172 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48188 48173 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48189 48174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48190 48175 $as_echo_n "checking for JTREGEXE... " >&6; }
48191 48176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48192 48177 $as_echo "disabled" >&6; }
48193 48178 else
48194 48179 # Check if the provided tool contains a complete path.
48195 48180 tool_specified="$JTREGEXE"
48196 48181 tool_basename="${tool_specified##*/}"
48197 48182 if test "x$tool_basename" = "x$tool_specified"; then
48198 48183 # A command without a complete path is provided, search $PATH.
48199 48184 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48200 48185 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48201 48186 # Extract the first word of "$tool_basename", so it can be a program name with args.
48202 48187 set dummy $tool_basename; ac_word=$2
48203 48188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48204 48189 $as_echo_n "checking for $ac_word... " >&6; }
48205 48190 if ${ac_cv_path_JTREGEXE+:} false; then :
48206 48191 $as_echo_n "(cached) " >&6
48207 48192 else
48208 48193 case $JTREGEXE in
48209 48194 [\\/]* | ?:[\\/]*)
48210 48195 ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48211 48196 ;;
48212 48197 *)
48213 48198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48214 48199 for as_dir in $PATH
48215 48200 do
48216 48201 IFS=$as_save_IFS
48217 48202 test -z "$as_dir" && as_dir=.
48218 48203 for ac_exec_ext in '' $ac_executable_extensions; do
48219 48204 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48220 48205 ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48221 48206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48222 48207 break 2
48223 48208 fi
48224 48209 done
48225 48210 done
48226 48211 IFS=$as_save_IFS
48227 48212
48228 48213 ;;
48229 48214 esac
48230 48215 fi
48231 48216 JTREGEXE=$ac_cv_path_JTREGEXE
48232 48217 if test -n "$JTREGEXE"; then
48233 48218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48234 48219 $as_echo "$JTREGEXE" >&6; }
48235 48220 else
48236 48221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48237 48222 $as_echo "no" >&6; }
48238 48223 fi
48239 48224
48240 48225
48241 48226 if test "x$JTREGEXE" = x; then
48242 48227 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48243 48228 fi
48244 48229 else
48245 48230 # Otherwise we believe it is a complete path. Use it as it is.
48246 48231 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48247 48232 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48248 48233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48249 48234 $as_echo_n "checking for JTREGEXE... " >&6; }
48250 48235 if test ! -x "$tool_specified"; then
48251 48236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48252 48237 $as_echo "not found" >&6; }
48253 48238 as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48254 48239 fi
48255 48240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48256 48241 $as_echo "$tool_specified" >&6; }
48257 48242 fi
48258 48243 fi
48259 48244 fi
48260 48245
48261 48246 fi
48262 48247
48263 48248
48264 48249
48265 48250 if test "x$JTREGEXE" = x; then
48266 48251 as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48267 48252 fi
48268 48253
48269 48254
48270 48255 JT_HOME="`$DIRNAME $JTREGEXE`"
48271 48256 fi
48272 48257 fi
48273 48258
48274 48259
48275 48260
48276 48261
48277 48262
48278 48263
48279 48264 # COMPILER_TARGET_BITS_FLAG : option for selecting 32- or 64-bit output
48280 48265 # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48281 48266 # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48282 48267 # commands produced by the link step (currently AIX only)
48283 48268 if test "x$TOOLCHAIN_TYPE" = xxlc; then
48284 48269 COMPILER_TARGET_BITS_FLAG="-q"
48285 48270 COMPILER_COMMAND_FILE_FLAG="-f"
48286 48271 COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48287 48272 else
48288 48273 COMPILER_TARGET_BITS_FLAG="-m"
48289 48274 COMPILER_COMMAND_FILE_FLAG="@"
48290 48275 COMPILER_BINDCMD_FILE_FLAG=""
48291 48276
48292 48277 # The solstudio linker does not support @-files.
48293 48278 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48294 48279 COMPILER_COMMAND_FILE_FLAG=
48295 48280 fi
48296 48281
48297 48282 # Check if @file is supported by gcc
48298 48283 if test "x$TOOLCHAIN_TYPE" = xgcc; then
48299 48284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48300 48285 $as_echo_n "checking if @file is supported by gcc... " >&6; }
48301 48286 # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48302 48287 $ECHO "" "--version" > command.file
48303 48288 if $CXX @command.file 2>&5 >&5; then
48304 48289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48305 48290 $as_echo "yes" >&6; }
48306 48291 COMPILER_COMMAND_FILE_FLAG="@"
48307 48292 else
48308 48293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48309 48294 $as_echo "no" >&6; }
48310 48295 COMPILER_COMMAND_FILE_FLAG=
48311 48296 fi
48312 48297 $RM command.file
48313 48298 fi
48314 48299 fi
48315 48300
48316 48301
48317 48302
48318 48303
48319 48304 # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48320 48305 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48321 48306 ARFLAGS="-r"
48322 48307 elif test "x$OPENJDK_TARGET_OS" = xaix; then
48323 48308 ARFLAGS="-X64"
48324 48309 elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48325 48310 # lib.exe is used as AR to create static libraries.
48326 48311 ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48327 48312 else
48328 48313 ARFLAGS=""
48329 48314 fi
48330 48315
48331 48316
48332 48317 ## Setup strip.
48333 48318 # FIXME: should this really be per platform, or should it be per toolchain type?
48334 48319 # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48335 48320 # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48336 48321 if test "x$OPENJDK_TARGET_OS" = xlinux; then
48337 48322 STRIPFLAGS="-g"
48338 48323 elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48339 48324 STRIPFLAGS="-x"
48340 48325 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48341 48326 STRIPFLAGS="-S"
48342 48327 elif test "x$OPENJDK_TARGET_OS" = xaix; then
48343 48328 STRIPFLAGS="-X32_64"
48344 48329 fi
48345 48330
48346 48331
48347 48332
48348 48333 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48349 48334 CC_OUT_OPTION=-Fo
48350 48335 EXE_OUT_OPTION=-out:
48351 48336 LD_OUT_OPTION=-out:
48352 48337 AR_OUT_OPTION=-out:
48353 48338 else
48354 48339 # The option used to specify the target .o,.a or .so file.
48355 48340 # When compiling, how to specify the to be created object file.
48356 48341 CC_OUT_OPTION='-o$(SPACE)'
48357 48342 # When linking, how to specify the to be created executable.
48358 48343 EXE_OUT_OPTION='-o$(SPACE)'
48359 48344 # When linking, how to specify the to be created dynamically linkable library.
48360 48345 LD_OUT_OPTION='-o$(SPACE)'
48361 48346 # When archiving, how to specify the to be create static archive for object files.
48362 48347 AR_OUT_OPTION='rcs$(SPACE)'
48363 48348 fi
48364 48349
48365 48350
48366 48351
48367 48352
48368 48353
48369 48354 # On Windows, we need to set RC flags.
48370 48355 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48371 48356 RC_FLAGS="-nologo -l0x409"
48372 48357 JVM_RCFLAGS="-nologo"
48373 48358 if test "x$DEBUG_LEVEL" = xrelease; then
48374 48359 RC_FLAGS="$RC_FLAGS -DNDEBUG"
48375 48360 JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48376 48361 fi
48377 48362
48378 48363 # The version variables used to create RC_FLAGS may be overridden
48379 48364 # in a custom configure script, or possibly the command line.
48380 48365 # Let those variables be expanded at make time in spec.gmk.
48381 48366 # The \$ are escaped to the shell, and the $(...) variables
48382 48367 # are evaluated by make.
48383 48368 RC_FLAGS="$RC_FLAGS \
48384 48369 -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48385 48370 -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48386 48371 -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48387 48372 -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48388 48373 -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48389 48374 -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48390 48375 -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48391 48376
48392 48377 JVM_RCFLAGS="$JVM_RCFLAGS \
48393 48378 -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48394 48379 -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48395 48380 -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48396 48381 -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48397 48382 -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48398 48383 -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48399 48384 -D\"HS_FNAME=jvm.dll\" \
48400 48385 -D\"HS_INTERNAL_NAME=jvm\""
48401 48386 fi
48402 48387
48403 48388
48404 48389
48405 48390 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48406 48391 # silence copyright notice and other headers.
48407 48392 COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48408 48393 fi
48409 48394
48410 48395
48411 48396 # Now we can test some aspects on the target using configure macros.
48412 48397
48413 48398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48414 48399 $as_echo_n "checking for ANSI C header files... " >&6; }
48415 48400 if ${ac_cv_header_stdc+:} false; then :
48416 48401 $as_echo_n "(cached) " >&6
48417 48402 else
48418 48403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48419 48404 /* end confdefs.h. */
48420 48405 #include <stdlib.h>
48421 48406 #include <stdarg.h>
48422 48407 #include <string.h>
48423 48408 #include <float.h>
48424 48409
48425 48410 int
48426 48411 main ()
48427 48412 {
48428 48413
48429 48414 ;
48430 48415 return 0;
48431 48416 }
48432 48417 _ACEOF
48433 48418 if ac_fn_cxx_try_compile "$LINENO"; then :
48434 48419 ac_cv_header_stdc=yes
48435 48420 else
48436 48421 ac_cv_header_stdc=no
48437 48422 fi
48438 48423 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48439 48424
48440 48425 if test $ac_cv_header_stdc = yes; then
48441 48426 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48442 48427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48443 48428 /* end confdefs.h. */
48444 48429 #include <string.h>
48445 48430
48446 48431 _ACEOF
48447 48432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48448 48433 $EGREP "memchr" >/dev/null 2>&1; then :
48449 48434
48450 48435 else
48451 48436 ac_cv_header_stdc=no
48452 48437 fi
48453 48438 rm -f conftest*
48454 48439
48455 48440 fi
48456 48441
48457 48442 if test $ac_cv_header_stdc = yes; then
48458 48443 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48459 48444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48460 48445 /* end confdefs.h. */
48461 48446 #include <stdlib.h>
48462 48447
48463 48448 _ACEOF
48464 48449 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48465 48450 $EGREP "free" >/dev/null 2>&1; then :
48466 48451
48467 48452 else
48468 48453 ac_cv_header_stdc=no
48469 48454 fi
48470 48455 rm -f conftest*
48471 48456
48472 48457 fi
48473 48458
48474 48459 if test $ac_cv_header_stdc = yes; then
48475 48460 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48476 48461 if test "$cross_compiling" = yes; then :
48477 48462 :
48478 48463 else
48479 48464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48480 48465 /* end confdefs.h. */
48481 48466 #include <ctype.h>
48482 48467 #include <stdlib.h>
48483 48468 #if ((' ' & 0x0FF) == 0x020)
48484 48469 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48485 48470 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48486 48471 #else
48487 48472 # define ISLOWER(c) \
48488 48473 (('a' <= (c) && (c) <= 'i') \
48489 48474 || ('j' <= (c) && (c) <= 'r') \
48490 48475 || ('s' <= (c) && (c) <= 'z'))
48491 48476 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48492 48477 #endif
48493 48478
48494 48479 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48495 48480 int
48496 48481 main ()
48497 48482 {
48498 48483 int i;
48499 48484 for (i = 0; i < 256; i++)
48500 48485 if (XOR (islower (i), ISLOWER (i))
48501 48486 || toupper (i) != TOUPPER (i))
48502 48487 return 2;
48503 48488 return 0;
48504 48489 }
48505 48490 _ACEOF
48506 48491 if ac_fn_cxx_try_run "$LINENO"; then :
48507 48492
48508 48493 else
48509 48494 ac_cv_header_stdc=no
48510 48495 fi
48511 48496 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48512 48497 conftest.$ac_objext conftest.beam conftest.$ac_ext
48513 48498 fi
48514 48499
48515 48500 fi
48516 48501 fi
48517 48502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48518 48503 $as_echo "$ac_cv_header_stdc" >&6; }
48519 48504 if test $ac_cv_header_stdc = yes; then
48520 48505
48521 48506 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
48522 48507
48523 48508 fi
48524 48509
48525 48510 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
48526 48511 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48527 48512 inttypes.h stdint.h unistd.h
48528 48513 do :
48529 48514 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48530 48515 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48531 48516 "
48532 48517 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48533 48518 cat >>confdefs.h <<_ACEOF
48534 48519 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48535 48520 _ACEOF
48536 48521
48537 48522 fi
48538 48523
48539 48524 done
48540 48525
48541 48526
48542 48527
48543 48528 ###############################################################################
48544 48529 #
48545 48530 # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48546 48531 # (The JVM can use 32 or 64 bit Java pointers but that decision
48547 48532 # is made at runtime.)
48548 48533 #
48549 48534
48550 48535 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48551 48536 # Always specify -m flag on Solaris
48552 48537 # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48553 48538
48554 48539 # When we add flags to the "official" CFLAGS etc, we need to
48555 48540 # keep track of these additions in ADDED_CFLAGS etc. These
48556 48541 # will later be checked to make sure only controlled additions
48557 48542 # have been made to CFLAGS etc.
48558 48543 ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48559 48544 ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48560 48545 ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48561 48546
48562 48547 CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48563 48548 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48564 48549 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48565 48550
48566 48551 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48567 48552 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48568 48553 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48569 48554
48570 48555 JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48571 48556 JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48572 48557 JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48573 48558
48574 48559 elif test "x$COMPILE_TYPE" = xreduced; then
48575 48560 if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48576 48561 # Specify -m if running reduced on unix platforms
48577 48562
48578 48563 # When we add flags to the "official" CFLAGS etc, we need to
48579 48564 # keep track of these additions in ADDED_CFLAGS etc. These
48580 48565 # will later be checked to make sure only controlled additions
48581 48566 # have been made to CFLAGS etc.
48582 48567 ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48583 48568 ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48584 48569 ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48585 48570
48586 48571 CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48587 48572 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48588 48573 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48589 48574
48590 48575 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48591 48576 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48592 48577 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48593 48578
48594 48579 JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48595 48580 JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48596 48581 JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48597 48582
48598 48583 fi
48599 48584 fi
48600 48585 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48601 48586 JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48602 48587 JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48603 48588 JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48604 48589 fi
48605 48590
48606 48591 # Make compilation sanity check
48607 48592 for ac_header in stdio.h
48608 48593 do :
48609 48594 ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48610 48595 if test "x$ac_cv_header_stdio_h" = xyes; then :
48611 48596 cat >>confdefs.h <<_ACEOF
48612 48597 #define HAVE_STDIO_H 1
48613 48598 _ACEOF
48614 48599
48615 48600 else
48616 48601
48617 48602 { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48618 48603 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48619 48604 if test "x$COMPILE_TYPE" = xreduced; then
48620 48605
48621 48606 # Print a helpful message on how to acquire the necessary build dependency.
48622 48607 # reduced is the help tag: freetype, cups, alsa etc
48623 48608 MISSING_DEPENDENCY=reduced
48624 48609
48625 48610 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48626 48611 cygwin_help $MISSING_DEPENDENCY
48627 48612 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48628 48613 msys_help $MISSING_DEPENDENCY
48629 48614 else
48630 48615 PKGHANDLER_COMMAND=
48631 48616
48632 48617 case $PKGHANDLER in
48633 48618 apt-get)
48634 48619 apt_help $MISSING_DEPENDENCY ;;
48635 48620 yum)
48636 48621 yum_help $MISSING_DEPENDENCY ;;
48637 48622 port)
48638 48623 port_help $MISSING_DEPENDENCY ;;
48639 48624 pkgutil)
48640 48625 pkgutil_help $MISSING_DEPENDENCY ;;
48641 48626 pkgadd)
48642 48627 pkgadd_help $MISSING_DEPENDENCY ;;
48643 48628 esac
48644 48629
48645 48630 if test "x$PKGHANDLER_COMMAND" != x; then
48646 48631 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48647 48632 fi
48648 48633 fi
48649 48634
48650 48635 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48651 48636 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48652 48637 elif test "x$COMPILE_TYPE" = xcross; then
48653 48638 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48654 48639 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48655 48640 fi
48656 48641 as_fn_error $? "Cannot continue." "$LINENO" 5
48657 48642
48658 48643 fi
48659 48644
48660 48645 done
48661 48646
48662 48647
48663 48648 # The cast to long int works around a bug in the HP C Compiler
48664 48649 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48665 48650 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48666 48651 # This bug is HP SR number 8606223364.
48667 48652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48668 48653 $as_echo_n "checking size of int *... " >&6; }
48669 48654 if ${ac_cv_sizeof_int_p+:} false; then :
48670 48655 $as_echo_n "(cached) " >&6
48671 48656 else
48672 48657 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then :
48673 48658
48674 48659 else
48675 48660 if test "$ac_cv_type_int_p" = yes; then
48676 48661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48677 48662 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48678 48663 as_fn_error 77 "cannot compute sizeof (int *)
48679 48664 See \`config.log' for more details" "$LINENO" 5; }
48680 48665 else
48681 48666 ac_cv_sizeof_int_p=0
48682 48667 fi
48683 48668 fi
48684 48669
48685 48670 fi
48686 48671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48687 48672 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48688 48673
48689 48674
48690 48675
48691 48676 cat >>confdefs.h <<_ACEOF
48692 48677 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48693 48678 _ACEOF
48694 48679
48695 48680
48696 48681
48697 48682 # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48698 48683 if test "x$ac_cv_sizeof_int_p" = x; then
48699 48684 # The test failed, lets stick to the assumed value.
48700 48685 { $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
48701 48686 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48702 48687 else
48703 48688 TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48704 48689
48705 48690 if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48706 48691 # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48707 48692 # Let's try to implicitely set the compilers target architecture and retry the test
48708 48693 { $as_echo "$as_me:${as_lineno-$LINENO}: 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)." >&5
48709 48694 $as_echo "$as_me: 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)." >&6;}
48710 48695 { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48711 48696 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48712 48697
48713 48698 # When we add flags to the "official" CFLAGS etc, we need to
48714 48699 # keep track of these additions in ADDED_CFLAGS etc. These
48715 48700 # will later be checked to make sure only controlled additions
48716 48701 # have been made to CFLAGS etc.
48717 48702 ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48718 48703 ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48719 48704 ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48720 48705
48721 48706 CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48722 48707 CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48723 48708 LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48724 48709
48725 48710 CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48726 48711 CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48727 48712 LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48728 48713
48729 48714 JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48730 48715 JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48731 48716 JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48732 48717
48733 48718
48734 48719 # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48735 48720 unset ac_cv_sizeof_int_p
48736 48721 # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48737 48722 cat >>confdefs.h <<_ACEOF
48738 48723 #undef SIZEOF_INT_P
48739 48724 _ACEOF
48740 48725
48741 48726 # The cast to long int works around a bug in the HP C Compiler
48742 48727 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48743 48728 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48744 48729 # This bug is HP SR number 8606223364.
48745 48730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48746 48731 $as_echo_n "checking size of int *... " >&6; }
48747 48732 if ${ac_cv_sizeof_int_p+:} false; then :
48748 48733 $as_echo_n "(cached) " >&6
48749 48734 else
48750 48735 if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p" "$ac_includes_default"; then :
48751 48736
48752 48737 else
48753 48738 if test "$ac_cv_type_int_p" = yes; then
48754 48739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48755 48740 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48756 48741 as_fn_error 77 "cannot compute sizeof (int *)
48757 48742 See \`config.log' for more details" "$LINENO" 5; }
48758 48743 else
48759 48744 ac_cv_sizeof_int_p=0
48760 48745 fi
48761 48746 fi
48762 48747
48763 48748 fi
48764 48749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48765 48750 $as_echo "$ac_cv_sizeof_int_p" >&6; }
48766 48751
48767 48752
48768 48753
48769 48754 cat >>confdefs.h <<_ACEOF
48770 48755 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
48771 48756 _ACEOF
48772 48757
48773 48758
48774 48759
48775 48760 TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48776 48761
48777 48762 if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48778 48763 { $as_echo "$as_me:${as_lineno-$LINENO}: 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)" >&5
48779 48764 $as_echo "$as_me: 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)" >&6;}
48780 48765 if test "x$COMPILE_TYPE" = xreduced; then
48781 48766
48782 48767 # Print a helpful message on how to acquire the necessary build dependency.
48783 48768 # reduced is the help tag: freetype, cups, alsa etc
48784 48769 MISSING_DEPENDENCY=reduced
48785 48770
48786 48771 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48787 48772 cygwin_help $MISSING_DEPENDENCY
48788 48773 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48789 48774 msys_help $MISSING_DEPENDENCY
48790 48775 else
48791 48776 PKGHANDLER_COMMAND=
48792 48777
48793 48778 case $PKGHANDLER in
48794 48779 apt-get)
48795 48780 apt_help $MISSING_DEPENDENCY ;;
48796 48781 yum)
48797 48782 yum_help $MISSING_DEPENDENCY ;;
48798 48783 port)
48799 48784 port_help $MISSING_DEPENDENCY ;;
48800 48785 pkgutil)
48801 48786 pkgutil_help $MISSING_DEPENDENCY ;;
48802 48787 pkgadd)
48803 48788 pkgadd_help $MISSING_DEPENDENCY ;;
48804 48789 esac
48805 48790
48806 48791 if test "x$PKGHANDLER_COMMAND" != x; then
48807 48792 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48808 48793 fi
48809 48794 fi
48810 48795
48811 48796 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48812 48797 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48813 48798 elif test "x$COMPILE_TYPE" = xcross; then
48814 48799 { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48815 48800 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48816 48801 fi
48817 48802 as_fn_error $? "Cannot continue." "$LINENO" 5
48818 48803 fi
48819 48804 fi
48820 48805 fi
48821 48806
48822 48807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48823 48808 $as_echo_n "checking for target address size... " >&6; }
48824 48809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48825 48810 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48826 48811
48827 48812
48828 48813 ###############################################################################
48829 48814 #
48830 48815 # Is the target little of big endian?
48831 48816 #
48832 48817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48833 48818 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48834 48819 if ${ac_cv_c_bigendian+:} false; then :
48835 48820 $as_echo_n "(cached) " >&6
48836 48821 else
48837 48822 ac_cv_c_bigendian=unknown
48838 48823 # See if we're dealing with a universal compiler.
48839 48824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48840 48825 /* end confdefs.h. */
48841 48826 #ifndef __APPLE_CC__
48842 48827 not a universal capable compiler
48843 48828 #endif
48844 48829 typedef int dummy;
48845 48830
48846 48831 _ACEOF
48847 48832 if ac_fn_cxx_try_compile "$LINENO"; then :
48848 48833
48849 48834 # Check for potential -arch flags. It is not universal unless
48850 48835 # there are at least two -arch flags with different values.
48851 48836 ac_arch=
48852 48837 ac_prev=
48853 48838 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48854 48839 if test -n "$ac_prev"; then
48855 48840 case $ac_word in
48856 48841 i?86 | x86_64 | ppc | ppc64)
48857 48842 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48858 48843 ac_arch=$ac_word
48859 48844 else
48860 48845 ac_cv_c_bigendian=universal
48861 48846 break
48862 48847 fi
48863 48848 ;;
48864 48849 esac
48865 48850 ac_prev=
48866 48851 elif test "x$ac_word" = "x-arch"; then
48867 48852 ac_prev=arch
48868 48853 fi
48869 48854 done
48870 48855 fi
48871 48856 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48872 48857 if test $ac_cv_c_bigendian = unknown; then
48873 48858 # See if sys/param.h defines the BYTE_ORDER macro.
48874 48859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48875 48860 /* end confdefs.h. */
48876 48861 #include <sys/types.h>
48877 48862 #include <sys/param.h>
48878 48863
48879 48864 int
48880 48865 main ()
48881 48866 {
48882 48867 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48883 48868 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48884 48869 && LITTLE_ENDIAN)
48885 48870 bogus endian macros
48886 48871 #endif
48887 48872
48888 48873 ;
48889 48874 return 0;
48890 48875 }
48891 48876 _ACEOF
48892 48877 if ac_fn_cxx_try_compile "$LINENO"; then :
48893 48878 # It does; now see whether it defined to BIG_ENDIAN or not.
48894 48879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48895 48880 /* end confdefs.h. */
48896 48881 #include <sys/types.h>
48897 48882 #include <sys/param.h>
48898 48883
48899 48884 int
48900 48885 main ()
48901 48886 {
48902 48887 #if BYTE_ORDER != BIG_ENDIAN
48903 48888 not big endian
48904 48889 #endif
48905 48890
48906 48891 ;
48907 48892 return 0;
48908 48893 }
48909 48894 _ACEOF
48910 48895 if ac_fn_cxx_try_compile "$LINENO"; then :
48911 48896 ac_cv_c_bigendian=yes
48912 48897 else
48913 48898 ac_cv_c_bigendian=no
48914 48899 fi
48915 48900 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48916 48901 fi
48917 48902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48918 48903 fi
48919 48904 if test $ac_cv_c_bigendian = unknown; then
48920 48905 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48921 48906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48922 48907 /* end confdefs.h. */
48923 48908 #include <limits.h>
48924 48909
48925 48910 int
48926 48911 main ()
48927 48912 {
48928 48913 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48929 48914 bogus endian macros
48930 48915 #endif
48931 48916
48932 48917 ;
48933 48918 return 0;
48934 48919 }
48935 48920 _ACEOF
48936 48921 if ac_fn_cxx_try_compile "$LINENO"; then :
48937 48922 # It does; now see whether it defined to _BIG_ENDIAN or not.
48938 48923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48939 48924 /* end confdefs.h. */
48940 48925 #include <limits.h>
48941 48926
48942 48927 int
48943 48928 main ()
48944 48929 {
48945 48930 #ifndef _BIG_ENDIAN
48946 48931 not big endian
48947 48932 #endif
48948 48933
48949 48934 ;
48950 48935 return 0;
48951 48936 }
48952 48937 _ACEOF
48953 48938 if ac_fn_cxx_try_compile "$LINENO"; then :
48954 48939 ac_cv_c_bigendian=yes
48955 48940 else
48956 48941 ac_cv_c_bigendian=no
48957 48942 fi
48958 48943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48959 48944 fi
48960 48945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48961 48946 fi
48962 48947 if test $ac_cv_c_bigendian = unknown; then
48963 48948 # Compile a test program.
48964 48949 if test "$cross_compiling" = yes; then :
48965 48950 # Try to guess by grepping values from an object file.
48966 48951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48967 48952 /* end confdefs.h. */
48968 48953 short int ascii_mm[] =
48969 48954 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48970 48955 short int ascii_ii[] =
48971 48956 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48972 48957 int use_ascii (int i) {
48973 48958 return ascii_mm[i] + ascii_ii[i];
48974 48959 }
48975 48960 short int ebcdic_ii[] =
48976 48961 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48977 48962 short int ebcdic_mm[] =
48978 48963 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48979 48964 int use_ebcdic (int i) {
48980 48965 return ebcdic_mm[i] + ebcdic_ii[i];
48981 48966 }
48982 48967 extern int foo;
48983 48968
48984 48969 int
48985 48970 main ()
48986 48971 {
48987 48972 return use_ascii (foo) == use_ebcdic (foo);
48988 48973 ;
48989 48974 return 0;
48990 48975 }
48991 48976 _ACEOF
48992 48977 if ac_fn_cxx_try_compile "$LINENO"; then :
48993 48978 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48994 48979 ac_cv_c_bigendian=yes
48995 48980 fi
48996 48981 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48997 48982 if test "$ac_cv_c_bigendian" = unknown; then
48998 48983 ac_cv_c_bigendian=no
48999 48984 else
49000 48985 # finding both strings is unlikely to happen, but who knows?
49001 48986 ac_cv_c_bigendian=unknown
49002 48987 fi
49003 48988 fi
49004 48989 fi
49005 48990 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49006 48991 else
49007 48992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49008 48993 /* end confdefs.h. */
49009 48994 $ac_includes_default
49010 48995 int
49011 48996 main ()
49012 48997 {
49013 48998
49014 48999 /* Are we little or big endian? From Harbison&Steele. */
49015 49000 union
49016 49001 {
49017 49002 long int l;
49018 49003 char c[sizeof (long int)];
49019 49004 } u;
49020 49005 u.l = 1;
49021 49006 return u.c[sizeof (long int) - 1] == 1;
49022 49007
49023 49008 ;
49024 49009 return 0;
49025 49010 }
49026 49011 _ACEOF
49027 49012 if ac_fn_cxx_try_run "$LINENO"; then :
49028 49013 ac_cv_c_bigendian=no
49029 49014 else
49030 49015 ac_cv_c_bigendian=yes
49031 49016 fi
49032 49017 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49033 49018 conftest.$ac_objext conftest.beam conftest.$ac_ext
49034 49019 fi
49035 49020
49036 49021 fi
49037 49022 fi
49038 49023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49039 49024 $as_echo "$ac_cv_c_bigendian" >&6; }
49040 49025 case $ac_cv_c_bigendian in #(
49041 49026 yes)
49042 49027 ENDIAN="big";; #(
49043 49028 no)
49044 49029 ENDIAN="little" ;; #(
49045 49030 universal)
49046 49031 ENDIAN="universal_endianness"
49047 49032 ;; #(
49048 49033 *)
49049 49034 ENDIAN="unknown" ;;
49050 49035 esac
49051 49036
49052 49037
49053 49038 if test "x$ENDIAN" = xuniversal_endianness; then
49054 49039 as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49055 49040 fi
49056 49041 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49057 49042 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
49058 49043 fi
49059 49044
49060 49045
49061 49046 # Configure flags for the tools
49062 49047
49063 49048 ###############################################################################
49064 49049 #
49065 49050 # How to compile shared libraries.
49066 49051 #
49067 49052
49068 49053 if test "x$TOOLCHAIN_TYPE" = xgcc; then
49069 49054 PICFLAG="-fPIC"
49070 49055 C_FLAG_REORDER=''
49071 49056 CXX_FLAG_REORDER=''
49072 49057
49073 49058 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49074 49059 # Linking is different on MacOSX
49075 49060 if test "x$STATIC_BUILD" = xtrue; then
49076 49061 SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49077 49062 else
49078 49063 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49079 49064 JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49080 49065 fi
49081 49066 SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49082 49067 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49083 49068 SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49084 49069 SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49085 49070 else
49086 49071 # Default works for linux, might work on other platforms as well.
49087 49072 SHARED_LIBRARY_FLAGS='-shared'
49088 49073 SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49089 49074 SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49090 49075 SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49091 49076 SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49092 49077 fi
49093 49078 elif test "x$TOOLCHAIN_TYPE" = xclang; then
49094 49079 C_FLAG_REORDER=''
49095 49080 CXX_FLAG_REORDER=''
49096 49081
49097 49082 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49098 49083 # Linking is different on MacOSX
49099 49084 PICFLAG=''
49100 49085 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49101 49086 SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49102 49087 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49103 49088 SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49104 49089 SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49105 49090
49106 49091 if test "x$STATIC_BUILD" = xfalse; then
49107 49092 JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49108 49093 fi
49109 49094 else
49110 49095 # Default works for linux, might work on other platforms as well.
49111 49096 PICFLAG='-fPIC'
49112 49097 SHARED_LIBRARY_FLAGS='-shared'
49113 49098 SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49114 49099 SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49115 49100 SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49116 49101 SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49117 49102 fi
49118 49103 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49119 49104 PICFLAG="-KPIC"
49120 49105 C_FLAG_REORDER='-xF'
49121 49106 CXX_FLAG_REORDER='-xF'
49122 49107 SHARED_LIBRARY_FLAGS="-G"
49123 49108 SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49124 49109 SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49125 49110 SET_SHARED_LIBRARY_NAME='-h $1'
49126 49111 SET_SHARED_LIBRARY_MAPFILE='-M$1'
49127 49112 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49128 49113 # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49129 49114 # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49130 49115 # will have to patch this single instruction with a call to some out-of-order code which
49131 49116 # does the load from the TOC. This is of course slow. But in that case we also would have
49132 49117 # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49133 49118 # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49134 49119 # can be patched directly by the linker and does not require a jump to out-of-order code.
49135 49120 # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49136 49121 # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49137 49122 # loads for accessing a global variable). But there are rumors that this may be seen as a
49138 49123 # 'performance feature' because of improved code locality of the symbols used in a
49139 49124 # compilation unit.
49140 49125 PICFLAG="-qpic"
49141 49126 JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49142 49127 C_FLAG_REORDER=''
49143 49128 CXX_FLAG_REORDER=''
49144 49129 SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49145 49130 SET_EXECUTABLE_ORIGIN=""
49146 49131 SET_SHARED_LIBRARY_ORIGIN=''
49147 49132 SET_SHARED_LIBRARY_NAME=''
49148 49133 SET_SHARED_LIBRARY_MAPFILE=''
49149 49134 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49150 49135 PICFLAG=""
49151 49136 C_FLAG_REORDER=''
49152 49137 CXX_FLAG_REORDER=''
49153 49138 SHARED_LIBRARY_FLAGS="-dll"
49154 49139 SET_EXECUTABLE_ORIGIN=''
49155 49140 SET_SHARED_LIBRARY_ORIGIN=''
49156 49141 SET_SHARED_LIBRARY_NAME=''
49157 49142 SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49158 49143 fi
49159 49144
49160 49145
49161 49146
49162 49147
49163 49148
49164 49149
49165 49150
49166 49151
49167 49152
49168 49153 # The (cross) compiler is now configured, we can now test capabilities
49169 49154 # of the target platform.
49170 49155
49171 49156
49172 49157
49173 49158 ###############################################################################
49174 49159 #
49175 49160 # Setup the opt flags for different compilers
49176 49161 # and different operating systems.
49177 49162 #
49178 49163
49179 49164 # FIXME: this was indirectly the old default, but just inherited.
49180 49165 # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49181 49166 # C_FLAG_DEPS="-MMD -MF"
49182 49167 # fi
49183 49168
49184 49169 # Generate make dependency files
49185 49170 if test "x$TOOLCHAIN_TYPE" = xgcc; then
49186 49171 C_FLAG_DEPS="-MMD -MF"
49187 49172 elif test "x$TOOLCHAIN_TYPE" = xclang; then
49188 49173 C_FLAG_DEPS="-MMD -MF"
49189 49174 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49190 49175 C_FLAG_DEPS="-xMMD -xMF"
49191 49176 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49192 49177 C_FLAG_DEPS="-qmakedep=gcc -MF"
49193 49178 fi
49194 49179 CXX_FLAG_DEPS="$C_FLAG_DEPS"
49195 49180
49196 49181
49197 49182
49198 49183 # Debug symbols
49199 49184 if test "x$TOOLCHAIN_TYPE" = xgcc; then
49200 49185 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49201 49186 # reduce from default "-g2" option to save space
49202 49187 CFLAGS_DEBUG_SYMBOLS="-g1"
49203 49188 CXXFLAGS_DEBUG_SYMBOLS="-g1"
49204 49189 else
49205 49190 CFLAGS_DEBUG_SYMBOLS="-g"
49206 49191 CXXFLAGS_DEBUG_SYMBOLS="-g"
49207 49192 fi
49208 49193 elif test "x$TOOLCHAIN_TYPE" = xclang; then
49209 49194 CFLAGS_DEBUG_SYMBOLS="-g"
49210 49195 CXXFLAGS_DEBUG_SYMBOLS="-g"
49211 49196 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49212 49197 CFLAGS_DEBUG_SYMBOLS="-g -xs"
49213 49198 # -g0 enables debug symbols without disabling inlining.
49214 49199 CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49215 49200 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49216 49201 CFLAGS_DEBUG_SYMBOLS="-g"
49217 49202 CXXFLAGS_DEBUG_SYMBOLS="-g"
49218 49203 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49219 49204 CFLAGS_DEBUG_SYMBOLS="-Zi"
49220 49205 CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49221 49206 fi
49222 49207
49223 49208
49224 49209
49225 49210 # Debug symbols for JVM_CFLAGS
49226 49211 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49227 49212 JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49228 49213 if test "x$DEBUG_LEVEL" = xslowdebug; then
49229 49214 JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49230 49215 else
49231 49216 # -g0 does not disable inlining, which -g does.
49232 49217 JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49233 49218 fi
49234 49219 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49235 49220 JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49236 49221 else
49237 49222 JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49238 49223 fi
49239 49224
49240 49225
49241 49226 # bounds, memory and behavior checking options
49242 49227 if test "x$TOOLCHAIN_TYPE" = xgcc; then
49243 49228 case $DEBUG_LEVEL in
49244 49229 release )
49245 49230 # no adjustment
49246 49231 ;;
49247 49232 fastdebug )
49248 49233 # no adjustment
49249 49234 ;;
49250 49235 slowdebug )
49251 49236 # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49252 49237 # get's added conditionally on whether we produce debug symbols or not.
49253 49238 # This is most likely not really correct.
49254 49239
49255 49240 # Add runtime stack smashing and undefined behavior checks.
49256 49241 # Not all versions of gcc support -fstack-protector
49257 49242 STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49258 49243
49259 49244
49260 49245
49261 49246
49262 49247
49263 49248
49264 49249
49265 49250
49266 49251
49267 49252
49268 49253
49269 49254
49270 49255
49271 49256
49272 49257
49273 49258
49274 49259
49275 49260
49276 49261
49277 49262
49278 49263
49279 49264
49280 49265
49281 49266
49282 49267
49283 49268
49284 49269
49285 49270
49286 49271
49287 49272
49288 49273
49289 49274
49290 49275
49291 49276
49292 49277
49293 49278
49294 49279
49295 49280
49296 49281
49297 49282
49298 49283
49299 49284
49300 49285 # Execute function body
49301 49286
49302 49287
49303 49288
49304 49289
49305 49290
49306 49291
49307 49292
49308 49293
49309 49294
49310 49295
49311 49296
49312 49297
49313 49298
49314 49299
49315 49300
49316 49301
49317 49302
49318 49303
49319 49304
49320 49305
49321 49306
49322 49307
49323 49308
49324 49309
49325 49310
49326 49311
49327 49312
49328 49313
49329 49314
49330 49315
49331 49316
49332 49317
49333 49318
49334 49319
49335 49320
49336 49321
49337 49322
49338 49323
49339 49324
49340 49325
49341 49326
49342 49327
49343 49328
49344 49329
49345 49330
49346 49331
49347 49332
49348 49333
49349 49334 # Execute function body
49350 49335
49351 49336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49352 49337 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49353 49338 supports=yes
49354 49339
49355 49340 saved_cflags="$CFLAGS"
49356 49341 CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49357 49342 ac_ext=c
49358 49343 ac_cpp='$CPP $CPPFLAGS'
49359 49344 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49360 49345 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49361 49346 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49362 49347
49363 49348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49364 49349 /* end confdefs.h. */
49365 49350 int i;
49366 49351 _ACEOF
49367 49352 if ac_fn_c_try_compile "$LINENO"; then :
49368 49353
49369 49354 else
49370 49355 supports=no
49371 49356 fi
49372 49357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49373 49358 ac_ext=cpp
49374 49359 ac_cpp='$CXXCPP $CPPFLAGS'
49375 49360 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49376 49361 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49377 49362 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49378 49363
49379 49364 CFLAGS="$saved_cflags"
49380 49365
49381 49366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49382 49367 $as_echo "$supports" >&6; }
49383 49368 if test "x$supports" = "xyes" ; then
49384 49369 :
49385 49370 C_COMP_SUPPORTS="yes"
49386 49371 else
49387 49372 :
49388 49373 C_COMP_SUPPORTS="no"
49389 49374 fi
49390 49375
49391 49376
49392 49377
49393 49378
49394 49379
49395 49380
49396 49381
49397 49382
49398 49383
49399 49384
49400 49385
49401 49386
49402 49387
49403 49388
49404 49389
49405 49390
49406 49391
49407 49392
49408 49393
49409 49394
49410 49395
49411 49396
49412 49397
49413 49398
49414 49399
49415 49400
49416 49401
49417 49402
49418 49403
49419 49404
49420 49405
49421 49406
49422 49407
49423 49408
49424 49409
49425 49410
49426 49411
49427 49412
49428 49413
49429 49414
49430 49415
49431 49416
49432 49417
49433 49418
49434 49419
49435 49420
49436 49421
49437 49422
49438 49423
49439 49424
49440 49425
49441 49426
49442 49427
49443 49428
49444 49429
49445 49430
49446 49431
49447 49432
49448 49433
49449 49434 # Execute function body
49450 49435
49451 49436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49452 49437 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49453 49438 supports=yes
49454 49439
49455 49440 saved_cxxflags="$CXXFLAGS"
49456 49441 CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49457 49442 ac_ext=cpp
49458 49443 ac_cpp='$CXXCPP $CPPFLAGS'
49459 49444 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49460 49445 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49461 49446 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49462 49447
49463 49448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49464 49449 /* end confdefs.h. */
49465 49450 int i;
49466 49451 _ACEOF
49467 49452 if ac_fn_cxx_try_compile "$LINENO"; then :
49468 49453
49469 49454 else
49470 49455 supports=no
49471 49456 fi
49472 49457 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49473 49458 ac_ext=cpp
49474 49459 ac_cpp='$CXXCPP $CPPFLAGS'
49475 49460 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49476 49461 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49477 49462 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49478 49463
49479 49464 CXXFLAGS="$saved_cxxflags"
49480 49465
49481 49466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49482 49467 $as_echo "$supports" >&6; }
49483 49468 if test "x$supports" = "xyes" ; then
49484 49469 :
49485 49470 CXX_COMP_SUPPORTS="yes"
49486 49471 else
49487 49472 :
49488 49473 CXX_COMP_SUPPORTS="no"
49489 49474 fi
49490 49475
49491 49476
49492 49477
49493 49478
49494 49479
49495 49480
49496 49481
49497 49482
49498 49483
49499 49484
49500 49485
49501 49486
49502 49487
49503 49488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49504 49489 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49505 49490 supports=no
49506 49491 if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49507 49492
49508 49493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49509 49494 $as_echo "$supports" >&6; }
49510 49495 if test "x$supports" = "xyes" ; then
49511 49496 :
49512 49497
49513 49498 else
49514 49499 :
49515 49500 STACK_PROTECTOR_CFLAG=""
49516 49501 fi
49517 49502
49518 49503
49519 49504
49520 49505
49521 49506
49522 49507
49523 49508
49524 49509 CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49525 49510 CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49526 49511 if test "x$STACK_PROTECTOR_CFLAG" != x; then
49527 49512 JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49528 49513 fi
49529 49514 ;;
49530 49515 esac
49531 49516 fi
49532 49517
49533 49518 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49534 49519 if test "x$DEBUG_LEVEL" != xrelease; then
49535 49520 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49536 49521 JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49537 49522 fi
49538 49523 fi
49539 49524 fi
49540 49525
49541 49526 # Optimization levels
49542 49527 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49543 49528 CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49544 49529
49545 49530 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49546 49531 # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49547 49532 C_O_FLAG_HIGHEST_JVM="-xO4"
49548 49533 C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49549 49534 C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49550 49535 C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49551 49536 C_O_FLAG_DEBUG="-xregs=no%frameptr"
49552 49537 C_O_FLAG_DEBUG_JVM=""
49553 49538 C_O_FLAG_NONE="-xregs=no%frameptr"
49554 49539 CXX_O_FLAG_HIGHEST_JVM="-xO4"
49555 49540 CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49556 49541 CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49557 49542 CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49558 49543 CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49559 49544 CXX_O_FLAG_DEBUG_JVM=""
49560 49545 CXX_O_FLAG_NONE="-xregs=no%frameptr"
49561 49546 if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49562 49547 C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49563 49548 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49564 49549 fi
49565 49550 elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49566 49551 C_O_FLAG_HIGHEST_JVM="-xO4"
49567 49552 C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49568 49553 C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49569 49554 C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49570 49555 C_O_FLAG_DEBUG=""
49571 49556 C_O_FLAG_DEBUG_JVM=""
49572 49557 C_O_FLAG_NONE=""
49573 49558 CXX_O_FLAG_HIGHEST_JVM="-xO4"
49574 49559 CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49575 49560 CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49576 49561 CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49577 49562 CXX_O_FLAG_DEBUG=""
49578 49563 CXX_O_FLAG_DEBUG_JVM=""
49579 49564 CXX_O_FLAG_NONE=""
49580 49565 fi
49581 49566 else
49582 49567 # The remaining toolchains share opt flags between CC and CXX;
49583 49568 # setup for C and duplicate afterwards.
49584 49569 if test "x$TOOLCHAIN_TYPE" = xgcc; then
49585 49570 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49586 49571 # On MacOSX we optimize for size, something
49587 49572 # we should do for all platforms?
49588 49573 C_O_FLAG_HIGHEST_JVM="-Os"
49589 49574 C_O_FLAG_HIGHEST="-Os"
49590 49575 C_O_FLAG_HI="-Os"
49591 49576 C_O_FLAG_NORM="-Os"
49592 49577 C_O_FLAG_SIZE="-Os"
49593 49578 else
49594 49579 C_O_FLAG_HIGHEST_JVM="-O3"
49595 49580 C_O_FLAG_HIGHEST="-O3"
49596 49581 C_O_FLAG_HI="-O3"
49597 49582 C_O_FLAG_NORM="-O2"
49598 49583 C_O_FLAG_SIZE="-Os"
49599 49584 fi
49600 49585 C_O_FLAG_DEBUG="-O0"
49601 49586 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49602 49587 C_O_FLAG_DEBUG_JVM=""
49603 49588 elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49604 49589 C_O_FLAG_DEBUG_JVM="-O0"
49605 49590 fi
49606 49591 C_O_FLAG_NONE="-O0"
49607 49592 elif test "x$TOOLCHAIN_TYPE" = xclang; then
49608 49593 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49609 49594 # On MacOSX we optimize for size, something
49610 49595 # we should do for all platforms?
49611 49596 C_O_FLAG_HIGHEST_JVM="-Os"
49612 49597 C_O_FLAG_HIGHEST="-Os"
49613 49598 C_O_FLAG_HI="-Os"
49614 49599 C_O_FLAG_NORM="-Os"
49615 49600 C_O_FLAG_SIZE="-Os"
49616 49601 else
49617 49602 C_O_FLAG_HIGHEST_JVM="-O3"
49618 49603 C_O_FLAG_HIGHEST="-O3"
49619 49604 C_O_FLAG_HI="-O3"
49620 49605 C_O_FLAG_NORM="-O2"
49621 49606 C_O_FLAG_SIZE="-Os"
49622 49607 fi
49623 49608 C_O_FLAG_DEBUG="-O0"
49624 49609 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49625 49610 C_O_FLAG_DEBUG_JVM=""
49626 49611 elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49627 49612 C_O_FLAG_DEBUG_JVM="-O0"
49628 49613 fi
49629 49614 C_O_FLAG_NONE="-O0"
49630 49615 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49631 49616 C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49632 49617 C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49633 49618 C_O_FLAG_HI="-O3 -qinline -qinlglue"
49634 49619 C_O_FLAG_NORM="-O2"
49635 49620 C_O_FLAG_DEBUG="-qnoopt"
49636 49621 # FIXME: Value below not verified.
49637 49622 C_O_FLAG_DEBUG_JVM=""
49638 49623 C_O_FLAG_NONE="-qnoopt"
49639 49624 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49640 49625 C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49641 49626 C_O_FLAG_HIGHEST="-O2"
49642 49627 C_O_FLAG_HI="-O1"
49643 49628 C_O_FLAG_NORM="-O1"
49644 49629 C_O_FLAG_DEBUG="-Od"
49645 49630 C_O_FLAG_DEBUG_JVM=""
49646 49631 C_O_FLAG_NONE="-Od"
49647 49632 C_O_FLAG_SIZE="-Os"
49648 49633 fi
49649 49634 CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49650 49635 CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49651 49636 CXX_O_FLAG_HI="$C_O_FLAG_HI"
49652 49637 CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49653 49638 CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49654 49639 CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49655 49640 CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49656 49641 CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49657 49642 fi
49658 49643
49659 49644 # Adjust optimization flags according to debug level.
49660 49645 case $DEBUG_LEVEL in
49661 49646 release )
49662 49647 # no adjustment
49663 49648 ;;
49664 49649 fastdebug )
49665 49650 # Not quite so much optimization
49666 49651 C_O_FLAG_HI="$C_O_FLAG_NORM"
49667 49652 CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49668 49653 ;;
49669 49654 slowdebug )
49670 49655 # Disable optimization
49671 49656 C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49672 49657 C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49673 49658 C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49674 49659 C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49675 49660 C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49676 49661 CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49677 49662 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49678 49663 CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49679 49664 CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49680 49665 CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49681 49666 ;;
49682 49667 esac
49683 49668
49684 49669
49685 49670
49686 49671
49687 49672
49688 49673
49689 49674
49690 49675
49691 49676
49692 49677
49693 49678
49694 49679
49695 49680
49696 49681
49697 49682
49698 49683
49699 49684
49700 49685
49701 49686
49702 49687 # Special extras...
49703 49688 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49704 49689 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49705 49690 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49706 49691 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49707 49692 fi
49708 49693 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49709 49694 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49710 49695 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49711 49696 CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49712 49697 CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49713 49698 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49714 49699 CXXSTD_CXXFLAG="-std=gnu++98"
49715 49700
49716 49701
49717 49702
49718 49703
49719 49704
49720 49705
49721 49706
49722 49707
49723 49708
49724 49709
49725 49710
49726 49711
49727 49712
49728 49713
49729 49714
49730 49715
49731 49716
49732 49717
49733 49718
49734 49719
49735 49720
49736 49721
49737 49722
49738 49723
49739 49724
49740 49725
49741 49726
49742 49727
49743 49728
49744 49729
49745 49730
49746 49731
49747 49732
49748 49733
49749 49734
49750 49735
49751 49736
49752 49737
49753 49738
49754 49739
49755 49740
49756 49741
49757 49742 # Execute function body
49758 49743
49759 49744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49760 49745 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49761 49746 supports=yes
49762 49747
49763 49748 saved_cxxflags="$CXXFLAGS"
49764 49749 CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49765 49750 ac_ext=cpp
49766 49751 ac_cpp='$CXXCPP $CPPFLAGS'
49767 49752 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49768 49753 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49769 49754 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49770 49755
49771 49756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49772 49757 /* end confdefs.h. */
49773 49758 int i;
49774 49759 _ACEOF
49775 49760 if ac_fn_cxx_try_compile "$LINENO"; then :
49776 49761
49777 49762 else
49778 49763 supports=no
49779 49764 fi
49780 49765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49781 49766 ac_ext=cpp
49782 49767 ac_cpp='$CXXCPP $CPPFLAGS'
49783 49768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49784 49769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49785 49770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49786 49771
49787 49772 CXXFLAGS="$saved_cxxflags"
49788 49773
49789 49774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49790 49775 $as_echo "$supports" >&6; }
49791 49776 if test "x$supports" = "xyes" ; then
49792 49777 :
49793 49778
49794 49779 else
49795 49780 :
49796 49781 CXXSTD_CXXFLAG=""
49797 49782 fi
49798 49783
49799 49784
49800 49785
49801 49786
49802 49787
49803 49788
49804 49789
49805 49790
49806 49791
49807 49792
49808 49793
49809 49794
49810 49795 CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49811 49796 JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
49812 49797
49813 49798 fi
49814 49799 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49815 49800 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49816 49801 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49817 49802 fi
49818 49803
49819 49804 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49820 49805 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49821 49806 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49822 49807 fi
49823 49808
49824 49809 CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49825 49810 CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49826 49811 LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49827 49812
49828 49813 ###############################################################################
49829 49814 #
49830 49815 # Now setup the CFLAGS and LDFLAGS for the JDK build.
49831 49816 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49832 49817 #
49833 49818
49834 49819 # Setup compiler/platform specific flags into
49835 49820 # CFLAGS_JDK - C Compiler flags
49836 49821 # CXXFLAGS_JDK - C++ Compiler flags
49837 49822 # COMMON_CCXXFLAGS_JDK - common to C and C++
49838 49823 if test "x$TOOLCHAIN_TYPE" = xgcc; then
49839 49824 JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49840 49825 JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49841 49826 JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49842 49827 if test "x$OPENJDK_TARGET_CPU" = xx86; then
49843 49828 # Force compatibility with i586 on 32 bit intel platforms.
49844 49829 COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49845 49830 JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49846 49831 fi
49847 49832 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49848 49833 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49849 49834 case $OPENJDK_TARGET_CPU_ARCH in
49850 49835 arm )
49851 49836 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49852 49837 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49853 49838 ;;
49854 49839 ppc )
49855 49840 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49856 49841 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49857 49842 ;;
49858 49843 * )
49859 49844 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49860 49845 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49861 49846 ;;
49862 49847 esac
49863 49848
49864 49849
49865 49850
49866 49851
49867 49852
49868 49853
49869 49854
49870 49855
49871 49856
49872 49857
49873 49858
49874 49859
49875 49860
49876 49861
49877 49862
49878 49863
49879 49864
49880 49865
49881 49866
49882 49867
49883 49868
49884 49869
49885 49870
49886 49871
49887 49872
49888 49873
49889 49874
49890 49875
49891 49876
49892 49877
49893 49878
49894 49879
49895 49880
49896 49881
49897 49882
49898 49883
49899 49884
49900 49885
49901 49886
49902 49887
49903 49888
49904 49889
49905 49890
49906 49891
49907 49892
49908 49893
49909 49894
49910 49895
49911 49896
49912 49897
49913 49898
49914 49899
49915 49900
49916 49901
49917 49902 # Execute function body
49918 49903
49919 49904 # Need to assign to a variable since m4 is blocked from modifying parts in [].
49920 49905 REFERENCE_VERSION=6
49921 49906
49922 49907 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49923 49908 as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49924 49909 fi
49925 49910
49926 49911 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49927 49912 as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49928 49913 fi
49929 49914
49930 49915 # Version comparison method inspired by http://stackoverflow.com/a/24067243
49931 49916 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49932 49917
49933 49918 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49934 49919 :
49935 49920
49936 49921 # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49937 49922 # runs afoul of the more aggressive versions of these optimisations.
49938 49923 # Notably, value range propagation now assumes that the this pointer of C++
49939 49924 # member functions is non-null.
49940 49925 NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
49941 49926 NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
49942 49927 { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
49943 49928 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
49944 49929 CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49945 49930 JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49946 49931
49947 49932 else
49948 49933 :
49949 49934
49950 49935 fi
49951 49936
49952 49937
49953 49938
49954 49939
49955 49940
49956 49941
49957 49942
49958 49943
49959 49944
49960 49945
49961 49946
49962 49947
49963 49948
49964 49949
49965 49950 elif test "x$TOOLCHAIN_TYPE" = xclang; then
49966 49951 JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49967 49952
49968 49953 # Restrict the debug information created by Clang to avoid
49969 49954 # too big object files and speed the build up a little bit
49970 49955 # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
49971 49956 JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
49972 49957 if test "x$OPENJDK_TARGET_OS" = xlinux; then
49973 49958 if test "x$OPENJDK_TARGET_CPU" = xx86; then
49974 49959 # Force compatibility with i586 on 32 bit intel platforms.
49975 49960 COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49976 49961 JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49977 49962 fi
49978 49963 JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
49979 49964 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49980 49965 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49981 49966 case $OPENJDK_TARGET_CPU_ARCH in
49982 49967 ppc )
49983 49968 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49984 49969 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49985 49970 ;;
49986 49971 * )
49987 49972 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49988 49973 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49989 49974 ;;
49990 49975 esac
49991 49976 fi
49992 49977 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49993 49978 JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
49994 49979 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
49995 49980 if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
49996 49981 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
49997 49982 fi
49998 49983
49999 49984 CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50000 49985 CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50001 49986 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50002 49987 JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50003 49988 CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50004 49989 CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50005 49990 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50006 49991 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50007 49992 -MD -Zc:wchar_t- -W3 -wd4800 \
50008 49993 -DWIN32_LEAN_AND_MEAN \
50009 49994 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50010 49995 -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50011 49996 -DWIN32 -DIAL"
50012 49997 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50013 49998 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50014 49999 else
50015 50000 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50016 50001 fi
50017 50002 # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50018 50003 # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50019 50004 # studio.
50020 50005 if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50021 50006 STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50022 50007 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50023 50008 JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50024 50009 fi
50025 50010 fi
50026 50011
50027 50012 ###############################################################################
50028 50013
50029 50014 # Adjust flags according to debug level.
50030 50015 case $DEBUG_LEVEL in
50031 50016 fastdebug | slowdebug )
50032 50017 CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50033 50018 CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50034 50019 JAVAC_FLAGS="$JAVAC_FLAGS -g"
50035 50020 ;;
50036 50021 release )
50037 50022 ;;
50038 50023 * )
50039 50024 as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50040 50025 ;;
50041 50026 esac
50042 50027
50043 50028 # Set some common defines. These works for all compilers, but assume
50044 50029 # -D is universally accepted.
50045 50030
50046 50031 # Setup endianness
50047 50032 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50048 50033 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50049 50034 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50050 50035 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50051 50036 # Note: -Dmacro is the same as #define macro 1
50052 50037 # -Dmacro= is the same as #define macro
50053 50038 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50054 50039 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50055 50040 else
50056 50041 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50057 50042 fi
50058 50043 else
50059 50044 # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50060 50045 # are defined in the system?
50061 50046 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50062 50047 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50063 50048 else
50064 50049 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50065 50050 fi
50066 50051 fi
50067 50052
50068 50053 # Setup target OS define. Use OS target name but in upper case.
50069 50054 OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50070 50055 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50071 50056
50072 50057 # Setup target CPU
50073 50058 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50074 50059 $OPENJDK_TARGET_ADD_LP64 \
50075 50060 -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50076 50061
50077 50062 # Setup debug/release defines
50078 50063 if test "x$DEBUG_LEVEL" = xrelease; then
50079 50064 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50080 50065 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50081 50066 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50082 50067 fi
50083 50068 else
50084 50069 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50085 50070 fi
50086 50071
50087 50072 # Set some additional per-OS defines.
50088 50073 if test "x$OPENJDK_TARGET_OS" = xlinux; then
50089 50074 JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50090 50075 JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50091 50076 -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50092 50077 elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50093 50078 JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50094 50079 JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50095 50080 -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50096 50081 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50097 50082 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50098 50083 JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50099 50084 JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50100 50085 JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50101 50086 -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50102 50087 -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50103 50088 -fno-omit-frame-pointer"
50104 50089 elif test "x$OPENJDK_TARGET_OS" = xaix; then
50105 50090 JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50106 50091 # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50107 50092 JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50108 50093 -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50109 50094 -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50110 50095 elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50111 50096 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50112 50097 elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50113 50098 JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50114 50099 JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50115 50100 fi
50116 50101
50117 50102 # Set some additional per-CPU defines.
50118 50103 if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50119 50104 JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50120 50105 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50121 50106 JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50122 50107 elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50123 50108 if test "x$OPENJDK_TARGET_OS" = xlinux; then
50124 50109 JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50125 50110 # fixes `relocation truncated to fit' error for gcc 4.1.
50126 50111 JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50127 50112 # Use ppc64 instructions, but schedule for power5
50128 50113 JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50129 50114 elif test "x$OPENJDK_TARGET_OS" = xaix; then
50130 50115 JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50131 50116 fi
50132 50117 elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50133 50118 if test "x$OPENJDK_TARGET_OS" = xlinux; then
50134 50119 JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50135 50120 # Little endian machine uses ELFv2 ABI.
50136 50121 JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50137 50122 # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50138 50123 JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50139 50124 fi
50140 50125 fi
50141 50126
50142 50127 if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50143 50128 JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50144 50129 fi
50145 50130
50146 50131 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50147 50132 if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50148 50133 # Solaris does not have _LP64=1 in the old build.
50149 50134 # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50150 50135 JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50151 50136 fi
50152 50137 fi
50153 50138
50154 50139 # Set JVM_CFLAGS warning handling
50155 50140 if test "x$OPENJDK_TARGET_OS" = xlinux; then
50156 50141 JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50157 50142 -Wunused-value -Woverloaded-virtual"
50158 50143
50159 50144 if test "x$TOOLCHAIN_TYPE" = xgcc; then
50160 50145
50161 50146
50162 50147
50163 50148
50164 50149
50165 50150
50166 50151
50167 50152
50168 50153
50169 50154
50170 50155
50171 50156
50172 50157
50173 50158
50174 50159
50175 50160
50176 50161
50177 50162
50178 50163
50179 50164
50180 50165
50181 50166
50182 50167
50183 50168
50184 50169
50185 50170
50186 50171
50187 50172
50188 50173
50189 50174
50190 50175
50191 50176
50192 50177
50193 50178
50194 50179
50195 50180
50196 50181
50197 50182
50198 50183
50199 50184
50200 50185
50201 50186
50202 50187
50203 50188
50204 50189
50205 50190
50206 50191
50207 50192
50208 50193
50209 50194
50210 50195
50211 50196
50212 50197
50213 50198
50214 50199 # Execute function body
50215 50200
50216 50201 # Need to assign to a variable since m4 is blocked from modifying parts in [].
50217 50202 REFERENCE_VERSION=4.8
50218 50203
50219 50204 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50220 50205 as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50221 50206 fi
50222 50207
50223 50208 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50224 50209 as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50225 50210 fi
50226 50211
50227 50212 # Version comparison method inspired by http://stackoverflow.com/a/24067243
50228 50213 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50229 50214
50230 50215 if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50231 50216 :
50232 50217
50233 50218 # These flags either do not work or give spurious warnings prior to gcc 4.8.
50234 50219 JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50235 50220
50236 50221
50237 50222 else
50238 50223 :
50239 50224
50240 50225 fi
50241 50226
50242 50227
50243 50228
50244 50229
50245 50230
50246 50231
50247 50232
50248 50233
50249 50234
50250 50235
50251 50236
50252 50237
50253 50238
50254 50239
50255 50240 fi
50256 50241 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
50257 50242 # Non-zero builds have stricter warnings
50258 50243 JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50259 50244 else
50260 50245 if test "x$TOOLCHAIN_TYPE" = xclang; then
50261 50246 # Some versions of llvm do not like -Wundef
50262 50247 JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50263 50248 fi
50264 50249 fi
50265 50250 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50266 50251 JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50267 50252 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50268 50253 fi
50269 50254
50270 50255 # Additional macosx handling
50271 50256 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50272 50257 # Setting these parameters makes it an error to link to macosx APIs that are
50273 50258 # newer than the given OS version and makes the linked binaries compatible
50274 50259 # even if built on a newer version of the OS.
50275 50260 # The expected format is X.Y.Z
50276 50261 MACOSX_VERSION_MIN=10.7.0
50277 50262
50278 50263
50279 50264 # The macro takes the version with no dots, ex: 1070
50280 50265 # Let the flags variables get resolved in make for easier override on make
50281 50266 # command line.
50282 50267 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50283 50268 LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50284 50269 fi
50285 50270
50286 50271 # Setup some hard coded includes
50287 50272 COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50288 50273 -I${JDK_TOPDIR}/src/java.base/share/native/include \
50289 50274 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50290 50275 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50291 50276 -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50292 50277 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50293 50278
50294 50279 # The shared libraries are compiled using the picflag.
50295 50280 CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50296 50281 $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50297 50282 CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50298 50283 $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50299 50284
50300 50285 # Executable flags
50301 50286 CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50302 50287 CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50303 50288
50304 50289
50305 50290
50306 50291
50307 50292
50308 50293
50309 50294 # Setup LDFLAGS et al.
50310 50295 #
50311 50296
50312 50297 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50313 50298 LDFLAGS_MICROSOFT="-nologo -opt:ref"
50314 50299 LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50315 50300 JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50316 50301 if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50317 50302 LDFLAGS_SAFESH="-safeseh"
50318 50303 LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50319 50304 JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50320 50305 # NOTE: Old build added -machine. Probably not needed.
50321 50306 JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50322 50307 else
50323 50308 JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50324 50309 fi
50325 50310 elif test "x$TOOLCHAIN_TYPE" = xclang; then
50326 50311 JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50327 50312 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50328 50313 # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50329 50314 JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50330 50315 fi
50331 50316 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50332 50317 # If this is a --hash-style=gnu system, use --hash-style=both, why?
50333 50318 # We have previously set HAS_GNU_HASH if this is the case
50334 50319 if test -n "$HAS_GNU_HASH"; then
50335 50320 LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50336 50321 LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50337 50322 JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50338 50323 fi
50339 50324 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50340 50325 JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50341 50326 fi
50342 50327 if test "x$OPENJDK_TARGET_OS" = xlinux; then
50343 50328 # And since we now know that the linker is gnu, then add -z defs, to forbid
50344 50329 # undefined symbols in object files.
50345 50330 LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50346 50331 LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50347 50332 JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_UNDEF_SYM"
50348 50333 LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50349 50334 JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50350 50335 if test "x$OPENJDK_TARGET_CPU" = xx86; then
50351 50336 JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50352 50337 fi
50353 50338 case $DEBUG_LEVEL in
50354 50339 release )
50355 50340 # tell linker to optimize libraries.
50356 50341 # Should this be supplied to the OSS linker as well?
50357 50342 LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50358 50343 LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50359 50344 JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50360 50345 if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50361 50346 JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50362 50347 fi
50363 50348 ;;
50364 50349 slowdebug )
50365 50350 # Hotspot always let the linker optimize
50366 50351 JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50367 50352 if test "x$HAS_LINKER_NOW" = "xtrue"; then
50368 50353 # do relocations at load
50369 50354 LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50370 50355 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50371 50356 JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50372 50357 fi
50373 50358 if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50374 50359 # mark relocations read only
50375 50360 LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50376 50361 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50377 50362 JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50378 50363 fi
50379 50364 ;;
50380 50365 fastdebug )
50381 50366 # Hotspot always let the linker optimize
50382 50367 JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50383 50368 if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50384 50369 # mark relocations read only
50385 50370 LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50386 50371 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50387 50372 JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50388 50373 fi
50389 50374 ;;
50390 50375 * )
50391 50376 as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50392 50377 ;;
50393 50378 esac
50394 50379 fi
50395 50380 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50396 50381 LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50397 50382 LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50398 50383 LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50399 50384 LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50400 50385 JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50401 50386 if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50402 50387 JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50403 50388 fi
50404 50389 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50405 50390 LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50406 50391 LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50407 50392 JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50408 50393 fi
50409 50394
50410 50395 # Customize LDFLAGS for executables
50411 50396
50412 50397 LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50413 50398
50414 50399 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50415 50400 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50416 50401 LDFLAGS_STACK_SIZE=1048576
50417 50402 else
50418 50403 LDFLAGS_STACK_SIZE=327680
50419 50404 fi
50420 50405 LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50421 50406 elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50422 50407 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50423 50408 fi
50424 50409
50425 50410 LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50426 50411
50427 50412 # Customize LDFLAGS for libs
50428 50413 LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50429 50414
50430 50415 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50431 50416 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50432 50417 JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50433 50418 -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50434 50419 JDKLIB_LIBS=""
50435 50420 else
50436 50421 JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50437 50422 -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50438 50423
50439 50424 if test "xTARGET" = "xTARGET"; then
50440 50425 # On some platforms (mac) the linker warns about non existing -L dirs.
50441 50426 # Add server first if available. Linking aginst client does not always produce the same results.
50442 50427 # Only add client/minimal dir if client/minimal is being built.
50443 50428 # Default to server for other variants.
50444 50429 if [[ " $JVM_VARIANTS " =~ " server " ]] ; then
50445 50430 JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50446 50431 elif [[ " $JVM_VARIANTS " =~ " client " ]] ; then
50447 50432 JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50448 50433 elif [[ " $JVM_VARIANTS " =~ " minimal " ]] ; then
50449 50434 JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50450 50435 else
50451 50436 JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50452 50437 fi
50453 50438 elif test "xTARGET" = "xBUILD"; then
50454 50439 # When building a buildjdk, it's always only the server variant
50455 50440 JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50456 50441 -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50457 50442 fi
50458 50443
50459 50444 JDKLIB_LIBS="-ljava -ljvm"
50460 50445 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50461 50446 JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50462 50447 fi
50463 50448
50464 50449 fi
50465 50450
50466 50451 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50467 50452
50468 50453 # Set JVM_LIBS (per os)
50469 50454 if test "x$OPENJDK_TARGET_OS" = xlinux; then
50470 50455 JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50471 50456 elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50472 50457 # FIXME: This hard-coded path is not really proper.
50473 50458 if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50474 50459 SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50475 50460 elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50476 50461 SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50477 50462 fi
50478 50463 JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50479 50464 -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50480 50465 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50481 50466 JVM_LIBS="$JVM_LIBS -lm"
50482 50467 elif test "x$OPENJDK_TARGET_OS" = xaix; then
50483 50468 JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50484 50469 elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50485 50470 JVM_LIBS="$JVM_LIBS -lm"
50486 50471 elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50487 50472 JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50488 50473 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50489 50474 wsock32.lib winmm.lib version.lib psapi.lib"
50490 50475 fi
50491 50476
50492 50477 # Set JVM_ASFLAGS
50493 50478 if test "x$OPENJDK_TARGET_OS" = xlinux; then
50494 50479 if test "x$OPENJDK_TARGET_CPU" = xx86; then
50495 50480 JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50496 50481 fi
50497 50482 elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50498 50483 JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50499 50484 fi
50500 50485
50501 50486 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50502 50487
50503 50488
50504 50489
50505 50490
50506 50491
50507 50492
50508 50493
50509 50494
50510 50495
50511 50496
50512 50497
50513 50498
50514 50499
50515 50500
50516 50501
50517 50502 # Special extras...
50518 50503 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50519 50504 if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50520 50505 OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50521 50506 OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50522 50507 fi
50523 50508 OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50524 50509 OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50525 50510 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50526 50511 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50527 50512 OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50528 50513 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50529 50514 OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50530 50515
50531 50516
50532 50517
50533 50518
50534 50519
50535 50520
50536 50521
50537 50522
50538 50523
50539 50524
50540 50525
50541 50526
50542 50527
50543 50528
50544 50529
50545 50530
50546 50531
50547 50532
50548 50533
50549 50534
50550 50535
50551 50536
50552 50537
50553 50538
50554 50539
50555 50540
50556 50541
50557 50542
50558 50543
50559 50544
50560 50545
50561 50546
50562 50547
50563 50548
50564 50549
50565 50550
50566 50551
50567 50552
50568 50553
50569 50554
50570 50555
50571 50556
50572 50557 # Execute function body
50573 50558
50574 50559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50575 50560 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50576 50561 supports=yes
50577 50562
50578 50563 saved_cxxflags="$CXXFLAGS"
50579 50564 CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50580 50565 ac_ext=cpp
50581 50566 ac_cpp='$CXXCPP $CPPFLAGS'
50582 50567 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50583 50568 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50584 50569 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50585 50570
50586 50571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50587 50572 /* end confdefs.h. */
50588 50573 int i;
50589 50574 _ACEOF
50590 50575 if ac_fn_cxx_try_compile "$LINENO"; then :
50591 50576
50592 50577 else
50593 50578 supports=no
50594 50579 fi
50595 50580 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50596 50581 ac_ext=cpp
50597 50582 ac_cpp='$CXXCPP $CPPFLAGS'
50598 50583 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50599 50584 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50600 50585 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50601 50586
50602 50587 CXXFLAGS="$saved_cxxflags"
50603 50588
50604 50589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50605 50590 $as_echo "$supports" >&6; }
50606 50591 if test "x$supports" = "xyes" ; then
50607 50592 :
50608 50593
50609 50594 else
50610 50595 :
50611 50596 OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50612 50597 fi
50613 50598
50614 50599
50615 50600
50616 50601
50617 50602
50618 50603
50619 50604
50620 50605
50621 50606
50622 50607
50623 50608
50624 50609
50625 50610 OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50626 50611 OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50627 50612
50628 50613 fi
50629 50614 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50630 50615 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50631 50616 OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50632 50617 fi
50633 50618
50634 50619 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50635 50620 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50636 50621 OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50637 50622 fi
50638 50623
50639 50624 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50640 50625 OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50641 50626 OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50642 50627
50643 50628 ###############################################################################
50644 50629 #
50645 50630 # Now setup the CFLAGS and LDFLAGS for the JDK build.
50646 50631 # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50647 50632 #
50648 50633
50649 50634 # Setup compiler/platform specific flags into
50650 50635 # OPENJDK_BUILD_CFLAGS_JDK - C Compiler flags
50651 50636 # OPENJDK_BUILD_CXXFLAGS_JDK - C++ Compiler flags
50652 50637 # OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50653 50638 if test "x$TOOLCHAIN_TYPE" = xgcc; then
50654 50639 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50655 50640 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50656 50641 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50657 50642 if test "x$OPENJDK_BUILD_CPU" = xx86; then
50658 50643 # Force compatibility with i586 on 32 bit intel platforms.
50659 50644 OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50660 50645 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50661 50646 fi
50662 50647 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50663 50648 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50664 50649 case $OPENJDK_BUILD_CPU_ARCH in
50665 50650 arm )
50666 50651 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50667 50652 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50668 50653 ;;
50669 50654 ppc )
50670 50655 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50671 50656 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50672 50657 ;;
50673 50658 * )
50674 50659 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50675 50660 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50676 50661 ;;
50677 50662 esac
50678 50663
50679 50664
50680 50665
50681 50666
50682 50667
50683 50668
50684 50669
50685 50670
50686 50671
50687 50672
50688 50673
50689 50674
50690 50675
50691 50676
50692 50677
50693 50678
50694 50679
50695 50680
50696 50681
50697 50682
50698 50683
50699 50684
50700 50685
50701 50686
50702 50687
50703 50688
50704 50689
50705 50690
50706 50691
50707 50692
50708 50693
50709 50694
50710 50695
50711 50696
50712 50697
50713 50698
50714 50699
50715 50700
50716 50701
50717 50702
50718 50703
50719 50704
50720 50705
50721 50706
50722 50707
50723 50708
50724 50709
50725 50710
50726 50711
50727 50712
50728 50713
50729 50714
50730 50715
50731 50716
50732 50717 # Execute function body
50733 50718
50734 50719 # Need to assign to a variable since m4 is blocked from modifying parts in [].
50735 50720 REFERENCE_VERSION=6
50736 50721
50737 50722 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50738 50723 as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50739 50724 fi
50740 50725
50741 50726 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50742 50727 as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50743 50728 fi
50744 50729
50745 50730 # Version comparison method inspired by http://stackoverflow.com/a/24067243
50746 50731 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50747 50732
50748 50733 if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50749 50734 :
50750 50735
50751 50736 # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50752 50737 # runs afoul of the more aggressive versions of these optimisations.
50753 50738 # Notably, value range propagation now assumes that the this pointer of C++
50754 50739 # member functions is non-null.
50755 50740 NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50756 50741 NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50757 50742 { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50758 50743 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50759 50744 OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50760 50745 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50761 50746
50762 50747 else
50763 50748 :
50764 50749
50765 50750 fi
50766 50751
50767 50752
50768 50753
50769 50754
50770 50755
50771 50756
50772 50757
50773 50758
50774 50759
50775 50760
50776 50761
50777 50762
50778 50763
50779 50764
50780 50765 elif test "x$TOOLCHAIN_TYPE" = xclang; then
50781 50766 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50782 50767
50783 50768 # Restrict the debug information created by Clang to avoid
50784 50769 # too big object files and speed the build up a little bit
50785 50770 # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50786 50771 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50787 50772 if test "x$OPENJDK_BUILD_OS" = xlinux; then
50788 50773 if test "x$OPENJDK_BUILD_CPU" = xx86; then
50789 50774 # Force compatibility with i586 on 32 bit intel platforms.
50790 50775 OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50791 50776 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50792 50777 fi
50793 50778 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50794 50779 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50795 50780 -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50796 50781 case $OPENJDK_BUILD_CPU_ARCH in
50797 50782 ppc )
50798 50783 # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50799 50784 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50800 50785 ;;
50801 50786 * )
50802 50787 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50803 50788 OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50804 50789 ;;
50805 50790 esac
50806 50791 fi
50807 50792 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50808 50793 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50809 50794 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50810 50795 if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50811 50796 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50812 50797 fi
50813 50798
50814 50799 OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50815 50800 OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50816 50801 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50817 50802 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50818 50803 OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50819 50804 OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50820 50805 elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50821 50806 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50822 50807 -MD -Zc:wchar_t- -W3 -wd4800 \
50823 50808 -DWIN32_LEAN_AND_MEAN \
50824 50809 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50825 50810 -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50826 50811 -DWIN32 -DIAL"
50827 50812 if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50828 50813 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50829 50814 else
50830 50815 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50831 50816 fi
50832 50817 # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50833 50818 # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50834 50819 # studio.
50835 50820 if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50836 50821 STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50837 50822 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50838 50823 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50839 50824 fi
50840 50825 fi
50841 50826
50842 50827 ###############################################################################
50843 50828
50844 50829 # Adjust flags according to debug level.
50845 50830 case $DEBUG_LEVEL in
50846 50831 fastdebug | slowdebug )
50847 50832 OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50848 50833 OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50849 50834 JAVAC_FLAGS="$JAVAC_FLAGS -g"
50850 50835 ;;
50851 50836 release )
50852 50837 ;;
50853 50838 * )
50854 50839 as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50855 50840 ;;
50856 50841 esac
50857 50842
50858 50843 # Set some common defines. These works for all compilers, but assume
50859 50844 # -D is universally accepted.
50860 50845
50861 50846 # Setup endianness
50862 50847 if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50863 50848 # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50864 50849 # Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50865 50850 # (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50866 50851 # Note: -Dmacro is the same as #define macro 1
50867 50852 # -Dmacro= is the same as #define macro
50868 50853 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50869 50854 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50870 50855 else
50871 50856 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50872 50857 fi
50873 50858 else
50874 50859 # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50875 50860 # are defined in the system?
50876 50861 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50877 50862 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50878 50863 else
50879 50864 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50880 50865 fi
50881 50866 fi
50882 50867
50883 50868 # Setup target OS define. Use OS target name but in upper case.
50884 50869 OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50885 50870 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50886 50871
50887 50872 # Setup target CPU
50888 50873 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50889 50874 $OPENJDK_BUILD_ADD_LP64 \
50890 50875 -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50891 50876
50892 50877 # Setup debug/release defines
50893 50878 if test "x$DEBUG_LEVEL" = xrelease; then
50894 50879 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50895 50880 if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50896 50881 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50897 50882 fi
50898 50883 else
50899 50884 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50900 50885 fi
50901 50886
50902 50887 # Set some additional per-OS defines.
50903 50888 if test "x$OPENJDK_BUILD_OS" = xlinux; then
50904 50889 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50905 50890 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50906 50891 -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50907 50892 elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50908 50893 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50909 50894 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50910 50895 -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50911 50896 elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50912 50897 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50913 50898 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50914 50899 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50915 50900 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50916 50901 -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50917 50902 -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50918 50903 -fno-omit-frame-pointer"
50919 50904 elif test "x$OPENJDK_BUILD_OS" = xaix; then
50920 50905 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50921 50906 # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50922 50907 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
50923 50908 -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50924 50909 -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50925 50910 elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50926 50911 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50927 50912 elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50928 50913 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50929 50914 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50930 50915 fi
50931 50916
50932 50917 # Set some additional per-CPU defines.
50933 50918 if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50934 50919 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50935 50920 elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50936 50921 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50937 50922 elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50938 50923 if test "x$OPENJDK_BUILD_OS" = xlinux; then
50939 50924 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50940 50925 # fixes `relocation truncated to fit' error for gcc 4.1.
50941 50926 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50942 50927 # Use ppc64 instructions, but schedule for power5
50943 50928 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50944 50929 elif test "x$OPENJDK_BUILD_OS" = xaix; then
50945 50930 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50946 50931 fi
50947 50932 elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50948 50933 if test "x$OPENJDK_BUILD_OS" = xlinux; then
50949 50934 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50950 50935 # Little endian machine uses ELFv2 ABI.
50951 50936 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50952 50937 # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50953 50938 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50954 50939 fi
50955 50940 fi
50956 50941
50957 50942 if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50958 50943 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50959 50944 fi
50960 50945
50961 50946 if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50962 50947 if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50963 50948 # Solaris does not have _LP64=1 in the old build.
50964 50949 # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50965 50950 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50966 50951 fi
50967 50952 fi
50968 50953
50969 50954 # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50970 50955 if test "x$OPENJDK_BUILD_OS" = xlinux; then
50971 50956 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50972 50957 -Wunused-value -Woverloaded-virtual"
50973 50958
50974 50959 if test "x$TOOLCHAIN_TYPE" = xgcc; then
50975 50960
50976 50961
50977 50962
50978 50963
50979 50964
50980 50965
50981 50966
50982 50967
50983 50968
50984 50969
50985 50970
50986 50971
50987 50972
50988 50973
50989 50974
50990 50975
50991 50976
50992 50977
50993 50978
50994 50979
50995 50980
50996 50981
50997 50982
50998 50983
50999 50984
51000 50985
51001 50986
51002 50987
51003 50988
51004 50989
51005 50990
51006 50991
51007 50992
51008 50993
51009 50994
51010 50995
51011 50996
51012 50997
51013 50998
51014 50999
51015 51000
51016 51001
51017 51002
51018 51003
51019 51004
51020 51005
51021 51006
51022 51007
51023 51008
51024 51009
51025 51010
51026 51011
51027 51012
51028 51013
51029 51014 # Execute function body
51030 51015
51031 51016 # Need to assign to a variable since m4 is blocked from modifying parts in [].
51032 51017 REFERENCE_VERSION=4.8
51033 51018
51034 51019 if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51035 51020 as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51036 51021 fi
51037 51022
51038 51023 if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51039 51024 as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51040 51025 fi
51041 51026
51042 51027 # Version comparison method inspired by http://stackoverflow.com/a/24067243
51043 51028 COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51044 51029
51045 51030 if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51046 51031 :
51047 51032
51048 51033 # These flags either do not work or give spurious warnings prior to gcc 4.8.
51049 51034 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51050 51035
51051 51036
51052 51037 else
51053 51038 :
51054 51039
51055 51040 fi
51056 51041
51057 51042
51058 51043
51059 51044
51060 51045
51061 51046
51062 51047
51063 51048
51064 51049
51065 51050
51066 51051
51067 51052
51068 51053
51069 51054
51070 51055 fi
51071 51056 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
51072 51057 # Non-zero builds have stricter warnings
51073 51058 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51074 51059 else
51075 51060 if test "x$TOOLCHAIN_TYPE" = xclang; then
51076 51061 # Some versions of llvm do not like -Wundef
51077 51062 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51078 51063 fi
51079 51064 fi
51080 51065 elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51081 51066 OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51082 51067 -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51083 51068 fi
51084 51069
51085 51070 # Additional macosx handling
51086 51071 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51087 51072 # Setting these parameters makes it an error to link to macosx APIs that are
51088 51073 # newer than the given OS version and makes the linked binaries compatible
51089 51074 # even if built on a newer version of the OS.
51090 51075 # The expected format is X.Y.Z
51091 51076 MACOSX_VERSION_MIN=10.7.0
51092 51077
51093 51078
51094 51079 # The macro takes the version with no dots, ex: 1070
51095 51080 # Let the flags variables get resolved in make for easier override on make
51096 51081 # command line.
51097 51082 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51098 51083 OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51099 51084 fi
51100 51085
51101 51086 # Setup some hard coded includes
51102 51087 OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51103 51088 -I${JDK_TOPDIR}/src/java.base/share/native/include \
51104 51089 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51105 51090 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51106 51091 -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51107 51092 -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51108 51093
51109 51094 # The shared libraries are compiled using the picflag.
51110 51095 OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51111 51096 $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51112 51097 OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51113 51098 $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51114 51099
51115 51100 # Executable flags
51116 51101 OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51117 51102 OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51118 51103
51119 51104
51120 51105
51121 51106
51122 51107
51123 51108
51124 51109 # Setup LDFLAGS et al.
51125 51110 #
51126 51111
51127 51112 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51128 51113 LDFLAGS_MICROSOFT="-nologo -opt:ref"
51129 51114 OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51130 51115 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51131 51116 if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51132 51117 LDFLAGS_SAFESH="-safeseh"
51133 51118 OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51134 51119 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51135 51120 # NOTE: Old build added -machine. Probably not needed.
51136 51121 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51137 51122 else
51138 51123 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51139 51124 fi
51140 51125 elif test "x$TOOLCHAIN_TYPE" = xclang; then
51141 51126 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51142 51127 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51143 51128 # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51144 51129 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51145 51130 fi
51146 51131 elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51147 51132 # If this is a --hash-style=gnu system, use --hash-style=both, why?
51148 51133 # We have previously set HAS_GNU_HASH if this is the case
51149 51134 if test -n "$HAS_GNU_HASH"; then
51150 51135 OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51151 51136 OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51152 51137 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51153 51138 fi
51154 51139 if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51155 51140 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51156 51141 fi
51157 51142 if test "x$OPENJDK_BUILD_OS" = xlinux; then
51158 51143 # And since we now know that the linker is gnu, then add -z defs, to forbid
51159 51144 # undefined symbols in object files.
51160 51145 LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51161 51146 OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51162 51147 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_UNDEF_SYM"
51163 51148 LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51164 51149 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51165 51150 if test "x$OPENJDK_BUILD_CPU" = xx86; then
51166 51151 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51167 51152 fi
51168 51153 case $DEBUG_LEVEL in
51169 51154 release )
51170 51155 # tell linker to optimize libraries.
51171 51156 # Should this be supplied to the OSS linker as well?
51172 51157 LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51173 51158 OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51174 51159 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51175 51160 if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51176 51161 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51177 51162 fi
51178 51163 ;;
51179 51164 slowdebug )
51180 51165 # Hotspot always let the linker optimize
51181 51166 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51182 51167 if test "x$HAS_LINKER_NOW" = "xtrue"; then
51183 51168 # do relocations at load
51184 51169 OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51185 51170 OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51186 51171 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51187 51172 fi
51188 51173 if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51189 51174 # mark relocations read only
51190 51175 OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51191 51176 OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51192 51177 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51193 51178 fi
51194 51179 ;;
51195 51180 fastdebug )
51196 51181 # Hotspot always let the linker optimize
51197 51182 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51198 51183 if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51199 51184 # mark relocations read only
51200 51185 OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51201 51186 OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51202 51187 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51203 51188 fi
51204 51189 ;;
51205 51190 * )
51206 51191 as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51207 51192 ;;
51208 51193 esac
51209 51194 fi
51210 51195 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51211 51196 LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51212 51197 OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51213 51198 LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51214 51199 OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51215 51200 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51216 51201 if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51217 51202 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51218 51203 fi
51219 51204 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51220 51205 LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51221 51206 OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51222 51207 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51223 51208 fi
51224 51209
51225 51210 # Customize LDFLAGS for executables
51226 51211
51227 51212 OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51228 51213
51229 51214 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51230 51215 if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51231 51216 LDFLAGS_STACK_SIZE=1048576
51232 51217 else
51233 51218 LDFLAGS_STACK_SIZE=327680
51234 51219 fi
51235 51220 OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51236 51221 elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51237 51222 OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51238 51223 fi
51239 51224
51240 51225 OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51241 51226
51242 51227 # Customize LDFLAGS for libs
51243 51228 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51244 51229
51245 51230 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51246 51231 if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51247 51232 OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51248 51233 -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51249 51234 OPENJDK_BUILD_JDKLIB_LIBS=""
51250 51235 else
51251 51236 OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51252 51237 -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51253 51238
51254 51239 if test "xBUILD" = "xTARGET"; then
51255 51240 # On some platforms (mac) the linker warns about non existing -L dirs.
51256 51241 # Add server first if available. Linking aginst client does not always produce the same results.
51257 51242 # Only add client/minimal dir if client/minimal is being built.
51258 51243 # Default to server for other variants.
51259 51244 if [[ " $JVM_VARIANTS " =~ " server " ]] ; then
51260 51245 OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51261 51246 elif [[ " $JVM_VARIANTS " =~ " client " ]] ; then
51262 51247 OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51263 51248 elif [[ " $JVM_VARIANTS " =~ " minimal " ]] ; then
51264 51249 OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51265 51250 else
51266 51251 OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51267 51252 fi
51268 51253 elif test "xBUILD" = "xBUILD"; then
51269 51254 # When building a buildjdk, it's always only the server variant
51270 51255 OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51271 51256 -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51272 51257 fi
51273 51258
51274 51259 OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51275 51260 if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51276 51261 OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51277 51262 fi
51278 51263
51279 51264 fi
51280 51265
51281 51266 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51282 51267
51283 51268 # Set OPENJDK_BUILD_JVM_LIBS (per os)
51284 51269 if test "x$OPENJDK_BUILD_OS" = xlinux; then
51285 51270 OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51286 51271 elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51287 51272 # FIXME: This hard-coded path is not really proper.
51288 51273 if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51289 51274 OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51290 51275 elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51291 51276 OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51292 51277 fi
51293 51278 OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51294 51279 -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51295 51280 elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51296 51281 OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51297 51282 elif test "x$OPENJDK_BUILD_OS" = xaix; then
51298 51283 OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51299 51284 elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51300 51285 OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51301 51286 elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51302 51287 OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51303 51288 comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51304 51289 wsock32.lib winmm.lib version.lib psapi.lib"
51305 51290 fi
51306 51291
51307 51292 # Set OPENJDK_BUILD_JVM_ASFLAGS
51308 51293 if test "x$OPENJDK_BUILD_OS" = xlinux; then
51309 51294 if test "x$OPENJDK_BUILD_CPU" = xx86; then
51310 51295 OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51311 51296 fi
51312 51297 elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51313 51298 OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51314 51299 fi
51315 51300
51316 51301 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51317 51302
51318 51303
51319 51304
51320 51305
51321 51306
51322 51307
51323 51308
51324 51309
51325 51310
51326 51311
51327 51312
51328 51313
51329 51314
51330 51315
51331 51316
51332 51317 # Tests are only ever compiled for TARGET
51333 51318 # Flags for compiling test libraries
51334 51319 CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51335 51320 CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51336 51321
51337 51322 # Flags for compiling test executables
51338 51323 CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51339 51324 CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51340 51325
51341 51326
51342 51327
51343 51328
51344 51329
51345 51330
51346 51331 LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51347 51332 LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51348 51333
51349 51334
51350 51335
51351 51336
51352 51337
51353 51338
51354 51339 # Some Zero and Shark settings.
51355 51340 # ZERO_ARCHFLAG tells the compiler which mode to build for
51356 51341 case "${OPENJDK_TARGET_CPU}" in
51357 51342 s390)
51358 51343 ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51359 51344 ;;
51360 51345 *)
51361 51346 ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51362 51347 esac
51363 51348
51364 51349
51365 51350
51366 51351
51367 51352
51368 51353
51369 51354
51370 51355
51371 51356
51372 51357
51373 51358
51374 51359
51375 51360
51376 51361
51377 51362
51378 51363
51379 51364
51380 51365
51381 51366
51382 51367
51383 51368
51384 51369
51385 51370
51386 51371
51387 51372
51388 51373
51389 51374
51390 51375
51391 51376
51392 51377
51393 51378
51394 51379
51395 51380
51396 51381
51397 51382
51398 51383
51399 51384
51400 51385
51401 51386
51402 51387
51403 51388
51404 51389
51405 51390 # Execute function body
51406 51391
51407 51392
51408 51393
51409 51394
51410 51395
51411 51396
51412 51397
51413 51398
51414 51399
51415 51400
51416 51401
51417 51402
51418 51403
51419 51404
51420 51405
51421 51406
51422 51407
51423 51408
51424 51409
51425 51410
51426 51411
51427 51412
51428 51413
51429 51414
51430 51415
51431 51416
51432 51417
51433 51418
51434 51419
51435 51420
51436 51421
51437 51422
51438 51423
51439 51424
51440 51425
51441 51426
51442 51427
51443 51428
51444 51429
51445 51430
51446 51431
51447 51432
51448 51433
51449 51434
51450 51435
51451 51436
51452 51437
51453 51438
51454 51439 # Execute function body
51455 51440
51456 51441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51457 51442 $as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51458 51443 supports=yes
51459 51444
51460 51445 saved_cflags="$CFLAGS"
51461 51446 CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51462 51447 ac_ext=c
51463 51448 ac_cpp='$CPP $CPPFLAGS'
51464 51449 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51465 51450 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51466 51451 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51467 51452
51468 51453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51469 51454 /* end confdefs.h. */
51470 51455 int i;
51471 51456 _ACEOF
51472 51457 if ac_fn_c_try_compile "$LINENO"; then :
51473 51458
51474 51459 else
51475 51460 supports=no
51476 51461 fi
51477 51462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51478 51463 ac_ext=cpp
51479 51464 ac_cpp='$CXXCPP $CPPFLAGS'
51480 51465 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51481 51466 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51482 51467 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51483 51468
51484 51469 CFLAGS="$saved_cflags"
51485 51470
51486 51471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51487 51472 $as_echo "$supports" >&6; }
51488 51473 if test "x$supports" = "xyes" ; then
51489 51474 :
51490 51475 C_COMP_SUPPORTS="yes"
51491 51476 else
51492 51477 :
51493 51478 C_COMP_SUPPORTS="no"
51494 51479 fi
51495 51480
51496 51481
51497 51482
51498 51483
51499 51484
51500 51485
51501 51486
51502 51487
51503 51488
51504 51489
51505 51490
51506 51491
51507 51492
51508 51493
51509 51494
51510 51495
51511 51496
51512 51497
51513 51498
51514 51499
51515 51500
51516 51501
51517 51502
51518 51503
51519 51504
51520 51505
51521 51506
51522 51507
51523 51508
51524 51509
51525 51510
51526 51511
51527 51512
51528 51513
51529 51514
51530 51515
51531 51516
51532 51517
51533 51518
51534 51519
51535 51520
51536 51521
51537 51522
51538 51523
51539 51524
51540 51525
51541 51526
51542 51527
51543 51528
51544 51529
51545 51530
51546 51531
51547 51532
51548 51533
51549 51534
51550 51535
51551 51536
51552 51537
51553 51538
51554 51539 # Execute function body
51555 51540
51556 51541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51557 51542 $as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51558 51543 supports=yes
51559 51544
51560 51545 saved_cxxflags="$CXXFLAGS"
51561 51546 CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51562 51547 ac_ext=cpp
51563 51548 ac_cpp='$CXXCPP $CPPFLAGS'
51564 51549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51565 51550 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51566 51551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51567 51552
51568 51553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51569 51554 /* end confdefs.h. */
51570 51555 int i;
51571 51556 _ACEOF
51572 51557 if ac_fn_cxx_try_compile "$LINENO"; then :
51573 51558
51574 51559 else
51575 51560 supports=no
51576 51561 fi
51577 51562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51578 51563 ac_ext=cpp
51579 51564 ac_cpp='$CXXCPP $CPPFLAGS'
51580 51565 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51581 51566 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51582 51567 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51583 51568
51584 51569 CXXFLAGS="$saved_cxxflags"
51585 51570
51586 51571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51587 51572 $as_echo "$supports" >&6; }
51588 51573 if test "x$supports" = "xyes" ; then
51589 51574 :
51590 51575 CXX_COMP_SUPPORTS="yes"
51591 51576 else
51592 51577 :
51593 51578 CXX_COMP_SUPPORTS="no"
51594 51579 fi
51595 51580
51596 51581
51597 51582
51598 51583
51599 51584
51600 51585
51601 51586
51602 51587
51603 51588
51604 51589
51605 51590
51606 51591
51607 51592
51608 51593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51609 51594 $as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51610 51595 supports=no
51611 51596 if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51612 51597
51613 51598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51614 51599 $as_echo "$supports" >&6; }
51615 51600 if test "x$supports" = "xyes" ; then
51616 51601 :
51617 51602
51618 51603 else
51619 51604 :
51620 51605 ZERO_ARCHFLAG=""
51621 51606 fi
51622 51607
51623 51608
51624 51609
51625 51610
51626 51611
51627 51612
51628 51613
51629 51614
51630 51615 # Check that the compiler supports -mX (or -qX on AIX) flags
51631 51616 # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51632 51617
51633 51618
51634 51619
51635 51620
51636 51621
51637 51622
51638 51623
51639 51624
51640 51625
51641 51626
51642 51627
51643 51628
51644 51629
51645 51630
51646 51631
51647 51632
51648 51633
51649 51634
51650 51635
51651 51636
51652 51637
51653 51638
51654 51639
51655 51640
51656 51641
51657 51642
51658 51643
51659 51644
51660 51645
51661 51646
51662 51647
51663 51648
51664 51649
51665 51650
51666 51651
51667 51652
51668 51653
51669 51654
51670 51655
51671 51656
51672 51657
51673 51658
51674 51659
51675 51660
51676 51661
51677 51662
51678 51663
51679 51664 # Execute function body
51680 51665
51681 51666
51682 51667
51683 51668
51684 51669
51685 51670
51686 51671
51687 51672
51688 51673
51689 51674
51690 51675
51691 51676
51692 51677
51693 51678
51694 51679
51695 51680
51696 51681
51697 51682
51698 51683
51699 51684
51700 51685
51701 51686
51702 51687
51703 51688
51704 51689
51705 51690
51706 51691
51707 51692
51708 51693
51709 51694
51710 51695
51711 51696
51712 51697
51713 51698
51714 51699
51715 51700
51716 51701
51717 51702
51718 51703
51719 51704
51720 51705
51721 51706
51722 51707
51723 51708
51724 51709
51725 51710
51726 51711
51727 51712
51728 51713 # Execute function body
51729 51714
51730 51715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51731 51716 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51732 51717 supports=yes
51733 51718
51734 51719 saved_cflags="$CFLAGS"
51735 51720 CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51736 51721 ac_ext=c
51737 51722 ac_cpp='$CPP $CPPFLAGS'
51738 51723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51739 51724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51740 51725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51741 51726
51742 51727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51743 51728 /* end confdefs.h. */
51744 51729 int i;
51745 51730 _ACEOF
51746 51731 if ac_fn_c_try_compile "$LINENO"; then :
51747 51732
51748 51733 else
51749 51734 supports=no
51750 51735 fi
51751 51736 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51752 51737 ac_ext=cpp
51753 51738 ac_cpp='$CXXCPP $CPPFLAGS'
51754 51739 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51755 51740 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51756 51741 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51757 51742
51758 51743 CFLAGS="$saved_cflags"
51759 51744
51760 51745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51761 51746 $as_echo "$supports" >&6; }
51762 51747 if test "x$supports" = "xyes" ; then
51763 51748 :
51764 51749 C_COMP_SUPPORTS="yes"
51765 51750 else
51766 51751 :
51767 51752 C_COMP_SUPPORTS="no"
51768 51753 fi
51769 51754
51770 51755
51771 51756
51772 51757
51773 51758
51774 51759
51775 51760
51776 51761
51777 51762
51778 51763
51779 51764
51780 51765
51781 51766
51782 51767
51783 51768
51784 51769
51785 51770
51786 51771
51787 51772
51788 51773
51789 51774
51790 51775
51791 51776
51792 51777
51793 51778
51794 51779
51795 51780
51796 51781
51797 51782
51798 51783
51799 51784
51800 51785
51801 51786
51802 51787
51803 51788
51804 51789
51805 51790
51806 51791
51807 51792
51808 51793
51809 51794
51810 51795
51811 51796
51812 51797
51813 51798
51814 51799
51815 51800
51816 51801
51817 51802
51818 51803
51819 51804
51820 51805
51821 51806
51822 51807
51823 51808
51824 51809
51825 51810
51826 51811
51827 51812
51828 51813 # Execute function body
51829 51814
51830 51815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51831 51816 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51832 51817 supports=yes
51833 51818
51834 51819 saved_cxxflags="$CXXFLAGS"
51835 51820 CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51836 51821 ac_ext=cpp
51837 51822 ac_cpp='$CXXCPP $CPPFLAGS'
51838 51823 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51839 51824 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51840 51825 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51841 51826
51842 51827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51843 51828 /* end confdefs.h. */
51844 51829 int i;
51845 51830 _ACEOF
51846 51831 if ac_fn_cxx_try_compile "$LINENO"; then :
51847 51832
51848 51833 else
51849 51834 supports=no
51850 51835 fi
51851 51836 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51852 51837 ac_ext=cpp
51853 51838 ac_cpp='$CXXCPP $CPPFLAGS'
51854 51839 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51855 51840 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51856 51841 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51857 51842
51858 51843 CXXFLAGS="$saved_cxxflags"
51859 51844
51860 51845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51861 51846 $as_echo "$supports" >&6; }
51862 51847 if test "x$supports" = "xyes" ; then
51863 51848 :
51864 51849 CXX_COMP_SUPPORTS="yes"
51865 51850 else
51866 51851 :
51867 51852 CXX_COMP_SUPPORTS="no"
51868 51853 fi
51869 51854
51870 51855
51871 51856
51872 51857
51873 51858
51874 51859
51875 51860
51876 51861
51877 51862
51878 51863
51879 51864
51880 51865
51881 51866
51882 51867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51883 51868 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51884 51869 supports=no
51885 51870 if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51886 51871
51887 51872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51888 51873 $as_echo "$supports" >&6; }
51889 51874 if test "x$supports" = "xyes" ; then
51890 51875 :
51891 51876 COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51892 51877 else
51893 51878 :
51894 51879 COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51895 51880 fi
51896 51881
51897 51882
51898 51883
51899 51884
51900 51885
51901 51886
51902 51887
51903 51888
51904 51889 # Check whether --enable-warnings-as-errors was given.
51905 51890 if test "${enable_warnings_as_errors+set}" = set; then :
51906 51891 enableval=$enable_warnings_as_errors;
51907 51892 fi
51908 51893
51909 51894
51910 51895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51911 51896 $as_echo_n "checking if native warnings are errors... " >&6; }
51912 51897 if test "x$enable_warnings_as_errors" = "xyes"; then
51913 51898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51914 51899 $as_echo "yes (explicitely set)" >&6; }
51915 51900 WARNINGS_AS_ERRORS=true
51916 51901 elif test "x$enable_warnings_as_errors" = "xno"; then
51917 51902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51918 51903 $as_echo "no" >&6; }
51919 51904 WARNINGS_AS_ERRORS=false
51920 51905 elif test "x$enable_warnings_as_errors" = "x"; then
51921 51906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51922 51907 $as_echo "yes (default)" >&6; }
51923 51908 WARNINGS_AS_ERRORS=true
51924 51909 else
51925 51910 as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51926 51911 fi
51927 51912
51928 51913 if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51929 51914 # Set legacy hotspot variable
51930 51915 HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51931 51916 else
51932 51917 HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51933 51918 fi
51934 51919
51935 51920
51936 51921
51937 51922
51938 51923 case "${TOOLCHAIN_TYPE}" in
51939 51924 microsoft)
51940 51925 DISABLE_WARNING_PREFIX="-wd"
51941 51926 CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51942 51927 ;;
51943 51928 solstudio)
51944 51929 DISABLE_WARNING_PREFIX="-erroff="
51945 51930 CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51946 51931 ;;
51947 51932 gcc)
51948 51933 # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51949 51934
51950 51935
51951 51936
51952 51937
51953 51938
51954 51939
51955 51940
51956 51941
51957 51942
51958 51943
51959 51944
51960 51945
51961 51946
51962 51947
51963 51948
51964 51949
51965 51950
51966 51951
51967 51952
51968 51953
51969 51954
51970 51955
51971 51956
51972 51957
51973 51958
51974 51959
51975 51960
51976 51961
51977 51962
51978 51963
51979 51964
51980 51965
51981 51966
51982 51967
51983 51968
51984 51969
51985 51970
51986 51971
51987 51972
51988 51973
51989 51974
51990 51975
51991 51976
51992 51977
51993 51978
51994 51979
51995 51980
51996 51981 # Execute function body
51997 51982
51998 51983
51999 51984
52000 51985
52001 51986
52002 51987
52003 51988
52004 51989
52005 51990
52006 51991
52007 51992
52008 51993
52009 51994
52010 51995
52011 51996
52012 51997
52013 51998
52014 51999
52015 52000
52016 52001
52017 52002
52018 52003
52019 52004
52020 52005
52021 52006
52022 52007
52023 52008
52024 52009
52025 52010
52026 52011
52027 52012
52028 52013
52029 52014
52030 52015
52031 52016
52032 52017
52033 52018
52034 52019
52035 52020
52036 52021
52037 52022
52038 52023
52039 52024
52040 52025
52041 52026
52042 52027
52043 52028
52044 52029
52045 52030 # Execute function body
52046 52031
52047 52032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52048 52033 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52049 52034 supports=yes
52050 52035
52051 52036 saved_cflags="$CFLAGS"
52052 52037 CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52053 52038 ac_ext=c
52054 52039 ac_cpp='$CPP $CPPFLAGS'
52055 52040 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52056 52041 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52057 52042 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52058 52043
52059 52044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52060 52045 /* end confdefs.h. */
52061 52046 int i;
52062 52047 _ACEOF
52063 52048 if ac_fn_c_try_compile "$LINENO"; then :
52064 52049
52065 52050 else
52066 52051 supports=no
52067 52052 fi
52068 52053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52069 52054 ac_ext=cpp
52070 52055 ac_cpp='$CXXCPP $CPPFLAGS'
52071 52056 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52072 52057 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52073 52058 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52074 52059
52075 52060 CFLAGS="$saved_cflags"
52076 52061
52077 52062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52078 52063 $as_echo "$supports" >&6; }
52079 52064 if test "x$supports" = "xyes" ; then
52080 52065 :
52081 52066 C_COMP_SUPPORTS="yes"
52082 52067 else
52083 52068 :
52084 52069 C_COMP_SUPPORTS="no"
52085 52070 fi
52086 52071
52087 52072
52088 52073
52089 52074
52090 52075
52091 52076
52092 52077
52093 52078
52094 52079
52095 52080
52096 52081
52097 52082
52098 52083
52099 52084
52100 52085
52101 52086
52102 52087
52103 52088
52104 52089
52105 52090
52106 52091
52107 52092
52108 52093
52109 52094
52110 52095
52111 52096
52112 52097
52113 52098
52114 52099
52115 52100
52116 52101
52117 52102
52118 52103
52119 52104
52120 52105
52121 52106
52122 52107
52123 52108
52124 52109
52125 52110
52126 52111
52127 52112
52128 52113
52129 52114
52130 52115
52131 52116
52132 52117
52133 52118
52134 52119
52135 52120
52136 52121
52137 52122
52138 52123
52139 52124
52140 52125
52141 52126
52142 52127
52143 52128
52144 52129
52145 52130 # Execute function body
52146 52131
52147 52132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52148 52133 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52149 52134 supports=yes
52150 52135
52151 52136 saved_cxxflags="$CXXFLAGS"
52152 52137 CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52153 52138 ac_ext=cpp
52154 52139 ac_cpp='$CXXCPP $CPPFLAGS'
52155 52140 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52156 52141 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52157 52142 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52158 52143
52159 52144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52160 52145 /* end confdefs.h. */
52161 52146 int i;
52162 52147 _ACEOF
52163 52148 if ac_fn_cxx_try_compile "$LINENO"; then :
52164 52149
52165 52150 else
52166 52151 supports=no
52167 52152 fi
52168 52153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52169 52154 ac_ext=cpp
52170 52155 ac_cpp='$CXXCPP $CPPFLAGS'
52171 52156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52172 52157 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52173 52158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52174 52159
52175 52160 CXXFLAGS="$saved_cxxflags"
52176 52161
52177 52162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52178 52163 $as_echo "$supports" >&6; }
52179 52164 if test "x$supports" = "xyes" ; then
52180 52165 :
52181 52166 CXX_COMP_SUPPORTS="yes"
52182 52167 else
52183 52168 :
52184 52169 CXX_COMP_SUPPORTS="no"
52185 52170 fi
52186 52171
52187 52172
52188 52173
52189 52174
52190 52175
52191 52176
52192 52177
52193 52178
52194 52179
52195 52180
52196 52181
52197 52182
52198 52183
52199 52184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52200 52185 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52201 52186 supports=no
52202 52187 if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52203 52188
52204 52189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52205 52190 $as_echo "$supports" >&6; }
52206 52191 if test "x$supports" = "xyes" ; then
52207 52192 :
52208 52193 GCC_CAN_DISABLE_WARNINGS=true
52209 52194 else
52210 52195 :
52211 52196 GCC_CAN_DISABLE_WARNINGS=false
52212 52197
52213 52198 fi
52214 52199
52215 52200
52216 52201
52217 52202
52218 52203
52219 52204
52220 52205 if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52221 52206 DISABLE_WARNING_PREFIX="-Wno-"
52222 52207 else
52223 52208 DISABLE_WARNING_PREFIX=
52224 52209 fi
52225 52210 CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52226 52211 # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52227 52212 # CFLAGS since any target specific flags will likely not work with the
52228 52213 # build compiler
52229 52214 CC_OLD="$CC"
52230 52215 CXX_OLD="$CXX"
52231 52216 CC="$BUILD_CC"
52232 52217 CXX="$BUILD_CXX"
52233 52218 CFLAGS_OLD="$CFLAGS"
52234 52219 CFLAGS=""
52235 52220
52236 52221
52237 52222
52238 52223
52239 52224
52240 52225
52241 52226
52242 52227
52243 52228
52244 52229
52245 52230
52246 52231
52247 52232
52248 52233
52249 52234
52250 52235
52251 52236
52252 52237
52253 52238
52254 52239
52255 52240
52256 52241
52257 52242
52258 52243
52259 52244
52260 52245
52261 52246
52262 52247
52263 52248
52264 52249
52265 52250
52266 52251
52267 52252
52268 52253
52269 52254
52270 52255
52271 52256
52272 52257
52273 52258
52274 52259
52275 52260
52276 52261
52277 52262
52278 52263
52279 52264
52280 52265
52281 52266
52282 52267 # Execute function body
52283 52268
52284 52269
52285 52270
52286 52271
52287 52272
52288 52273
52289 52274
52290 52275
52291 52276
52292 52277
52293 52278
52294 52279
52295 52280
52296 52281
52297 52282
52298 52283
52299 52284
52300 52285
52301 52286
52302 52287
52303 52288
52304 52289
52305 52290
52306 52291
52307 52292
52308 52293
52309 52294
52310 52295
52311 52296
52312 52297
52313 52298
52314 52299
52315 52300
52316 52301
52317 52302
52318 52303
52319 52304
52320 52305
52321 52306
52322 52307
52323 52308
52324 52309
52325 52310
52326 52311
52327 52312
52328 52313
52329 52314
52330 52315
52331 52316 # Execute function body
52332 52317
52333 52318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52334 52319 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52335 52320 supports=yes
52336 52321
52337 52322 saved_cflags="$CFLAGS"
52338 52323 CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52339 52324 ac_ext=c
52340 52325 ac_cpp='$CPP $CPPFLAGS'
52341 52326 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52342 52327 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52343 52328 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52344 52329
52345 52330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52346 52331 /* end confdefs.h. */
52347 52332 int i;
52348 52333 _ACEOF
52349 52334 if ac_fn_c_try_compile "$LINENO"; then :
52350 52335
52351 52336 else
52352 52337 supports=no
52353 52338 fi
52354 52339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52355 52340 ac_ext=cpp
52356 52341 ac_cpp='$CXXCPP $CPPFLAGS'
52357 52342 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52358 52343 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52359 52344 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52360 52345
52361 52346 CFLAGS="$saved_cflags"
52362 52347
52363 52348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52364 52349 $as_echo "$supports" >&6; }
52365 52350 if test "x$supports" = "xyes" ; then
52366 52351 :
52367 52352 C_COMP_SUPPORTS="yes"
52368 52353 else
52369 52354 :
52370 52355 C_COMP_SUPPORTS="no"
52371 52356 fi
52372 52357
52373 52358
52374 52359
52375 52360
52376 52361
52377 52362
52378 52363
52379 52364
52380 52365
52381 52366
52382 52367
52383 52368
52384 52369
52385 52370
52386 52371
52387 52372
52388 52373
52389 52374
52390 52375
52391 52376
52392 52377
52393 52378
52394 52379
52395 52380
52396 52381
52397 52382
52398 52383
52399 52384
52400 52385
52401 52386
52402 52387
52403 52388
52404 52389
52405 52390
52406 52391
52407 52392
52408 52393
52409 52394
52410 52395
52411 52396
52412 52397
52413 52398
52414 52399
52415 52400
52416 52401
52417 52402
52418 52403
52419 52404
52420 52405
52421 52406
52422 52407
52423 52408
52424 52409
52425 52410
52426 52411
52427 52412
52428 52413
52429 52414
52430 52415
52431 52416 # Execute function body
52432 52417
52433 52418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52434 52419 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52435 52420 supports=yes
52436 52421
52437 52422 saved_cxxflags="$CXXFLAGS"
52438 52423 CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52439 52424 ac_ext=cpp
52440 52425 ac_cpp='$CXXCPP $CPPFLAGS'
52441 52426 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52442 52427 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52443 52428 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52444 52429
52445 52430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52446 52431 /* end confdefs.h. */
52447 52432 int i;
52448 52433 _ACEOF
52449 52434 if ac_fn_cxx_try_compile "$LINENO"; then :
52450 52435
52451 52436 else
52452 52437 supports=no
52453 52438 fi
52454 52439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52455 52440 ac_ext=cpp
52456 52441 ac_cpp='$CXXCPP $CPPFLAGS'
52457 52442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52458 52443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52459 52444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52460 52445
52461 52446 CXXFLAGS="$saved_cxxflags"
52462 52447
52463 52448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52464 52449 $as_echo "$supports" >&6; }
52465 52450 if test "x$supports" = "xyes" ; then
52466 52451 :
52467 52452 CXX_COMP_SUPPORTS="yes"
52468 52453 else
52469 52454 :
52470 52455 CXX_COMP_SUPPORTS="no"
52471 52456 fi
52472 52457
52473 52458
52474 52459
52475 52460
52476 52461
52477 52462
52478 52463
52479 52464
52480 52465
52481 52466
52482 52467
52483 52468
52484 52469
52485 52470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52486 52471 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52487 52472 supports=no
52488 52473 if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52489 52474
52490 52475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52491 52476 $as_echo "$supports" >&6; }
52492 52477 if test "x$supports" = "xyes" ; then
52493 52478 :
52494 52479 BUILD_CC_CAN_DISABLE_WARNINGS=true
52495 52480 else
52496 52481 :
52497 52482 BUILD_CC_CAN_DISABLE_WARNINGS=false
52498 52483
52499 52484 fi
52500 52485
52501 52486
52502 52487
52503 52488
52504 52489
52505 52490
52506 52491 if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52507 52492 BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52508 52493 else
52509 52494 BUILD_CC_DISABLE_WARNING_PREFIX=
52510 52495 fi
52511 52496 CC="$CC_OLD"
52512 52497 CXX="$CXX_OLD"
52513 52498 CFLAGS="$CFLAGS_OLD"
52514 52499 ;;
52515 52500 clang)
52516 52501 DISABLE_WARNING_PREFIX="-Wno-"
52517 52502 CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52518 52503 ;;
52519 52504 xlc)
52520 52505 DISABLE_WARNING_PREFIX="-qsuppress="
52521 52506 CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52522 52507 ;;
52523 52508 esac
52524 52509
52525 52510
52526 52511
52527 52512
52528 52513
52529 52514 # Setup debug symbols (need objcopy from the toolchain for that)
52530 52515
52531 52516 #
52532 52517 # NATIVE_DEBUG_SYMBOLS
52533 52518 # This must be done after the toolchain is setup, since we're looking at objcopy.
52534 52519 #
52535 52520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52536 52521 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52537 52522
52538 52523 # Check whether --with-native-debug-symbols was given.
52539 52524 if test "${with_native_debug_symbols+set}" = set; then :
52540 52525 withval=$with_native_debug_symbols;
52541 52526 if test "x$OPENJDK_TARGET_OS" = xaix; then
52542 52527 if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52543 52528 as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52544 52529 fi
52545 52530 fi
52546 52531
52547 52532 else
52548 52533
52549 52534 if test "x$OPENJDK_TARGET_OS" = xaix; then
52550 52535 # AIX doesn't support 'zipped' so use 'internal' as default
52551 52536 with_native_debug_symbols="internal"
52552 52537 else
52553 52538 if test "x$STATIC_BUILD" = xtrue; then
52554 52539 with_native_debug_symbols="none"
52555 52540 else
52556 52541 with_native_debug_symbols="zipped"
52557 52542 fi
52558 52543 fi
52559 52544
52560 52545 fi
52561 52546
52562 52547 NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52563 52548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52564 52549 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52565 52550
52566 52551 if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52567 52552
52568 52553 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52569 52554 if test "x$OBJCOPY" = x; then
52570 52555 # enabling of enable-debug-symbols and can't find objcopy
52571 52556 # this is an error
52572 52557 as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52573 52558 fi
52574 52559 fi
52575 52560
52576 52561 COMPILE_WITH_DEBUG_SYMBOLS=true
52577 52562 COPY_DEBUG_SYMBOLS=true
52578 52563 ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52579 52564
52580 52565 # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52581 52566 DEBUG_BINARIES=false
52582 52567 STRIP_POLICY=min_strip
52583 52568
52584 52569 elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52585 52570 COMPILE_WITH_DEBUG_SYMBOLS=false
52586 52571 COPY_DEBUG_SYMBOLS=false
52587 52572 ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52588 52573
52589 52574 DEBUG_BINARIES=false
52590 52575 STRIP_POLICY=no_strip
52591 52576 elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52592 52577 COMPILE_WITH_DEBUG_SYMBOLS=true
52593 52578 COPY_DEBUG_SYMBOLS=false
52594 52579 ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52595 52580
52596 52581 # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52597 52582 DEBUG_BINARIES=true
52598 52583 STRIP_POLICY=no_strip
52599 52584 STRIP=""
52600 52585
52601 52586 elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52602 52587
52603 52588 if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52604 52589 if test "x$OBJCOPY" = x; then
52605 52590 # enabling of enable-debug-symbols and can't find objcopy
52606 52591 # this is an error
52607 52592 as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52608 52593 fi
52609 52594 fi
52610 52595
52611 52596 COMPILE_WITH_DEBUG_SYMBOLS=true
52612 52597 COPY_DEBUG_SYMBOLS=true
52613 52598 ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52614 52599
52615 52600 # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52616 52601 DEBUG_BINARIES=false
52617 52602 STRIP_POLICY=min_strip
52618 52603 else
52619 52604 as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52620 52605 fi
52621 52606
52622 52607 # --enable-debug-symbols is deprecated.
52623 52608 # Please use --with-native-debug-symbols=[internal,external,zipped] .
52624 52609
52625 52610 # Check whether --enable-debug-symbols was given.
52626 52611 if test "${enable_debug_symbols+set}" = set; then :
52627 52612 enableval=$enable_debug_symbols;
52628 52613 fi
52629 52614
52630 52615 if test "x$enable_debug_symbols" != x; then
52631 52616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52632 52617 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52633 52618
52634 52619 if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52635 52620 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52636 52621 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52637 52622 fi
52638 52623
52639 52624 fi
52640 52625
52641 52626
52642 52627 # --enable-zip-debug-info is deprecated.
52643 52628 # Please use --with-native-debug-symbols=zipped .
52644 52629
52645 52630 # Check whether --enable-zip-debug-info was given.
52646 52631 if test "${enable_zip_debug_info+set}" = set; then :
52647 52632 enableval=$enable_zip_debug_info;
52648 52633 fi
52649 52634
52650 52635 if test "x$enable_zip_debug_info" != x; then
52651 52636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52652 52637 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52653 52638
52654 52639 if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52655 52640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52656 52641 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52657 52642 fi
52658 52643
52659 52644 fi
52660 52645
52661 52646
52662 52647
52663 52648
52664 52649
52665 52650
52666 52651 # Legacy values
52667 52652
52668 52653
52669 52654
52670 52655
52671 52656 # Check whether --enable-native-coverage was given.
52672 52657 if test "${enable_native_coverage+set}" = set; then :
52673 52658 enableval=$enable_native_coverage;
52674 52659 fi
52675 52660
52676 52661 GCOV_ENABLED="false"
52677 52662 if test "x$enable_native_coverage" = "xyes"; then
52678 52663 if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52679 52664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52680 52665 $as_echo_n "checking if native coverage is enabled... " >&6; }
52681 52666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52682 52667 $as_echo "yes" >&6; }
52683 52668 GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52684 52669 GCOV_LDFLAGS="-fprofile-arcs"
52685 52670 LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52686 52671 LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52687 52672 LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52688 52673 CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52689 52674 CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52690 52675 CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52691 52676 CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52692 52677 LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52693 52678 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52694 52679 GCOV_ENABLED="true"
52695 52680 else
52696 52681 as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52697 52682 fi
52698 52683 elif test "x$enable_native_coverage" = "xno"; then
52699 52684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52700 52685 $as_echo_n "checking if native coverage is enabled... " >&6; }
52701 52686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52702 52687 $as_echo "no" >&6; }
52703 52688 elif test "x$enable_native_coverage" != "x"; then
52704 52689 as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52705 52690 fi
52706 52691
52707 52692
52708 52693
52709 52694
52710 52695 # Need toolchain to setup dtrace
52711 52696
52712 52697 # Test for dtrace dependencies
52713 52698 # Check whether --enable-dtrace was given.
52714 52699 if test "${enable_dtrace+set}" = set; then :
52715 52700 enableval=$enable_dtrace;
52716 52701 fi
52717 52702
52718 52703
52719 52704 DTRACE_DEP_MISSING=false
52720 52705
52721 52706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52722 52707 $as_echo_n "checking for dtrace tool... " >&6; }
52723 52708 if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52724 52709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52725 52710 $as_echo "$DTRACE" >&6; }
52726 52711 else
52727 52712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52728 52713 $as_echo "not found, cannot build dtrace" >&6; }
52729 52714 DTRACE_DEP_MISSING=true
52730 52715 fi
52731 52716
52732 52717 for ac_header in sys/sdt.h
52733 52718 do :
52734 52719 ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52735 52720 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52736 52721 cat >>confdefs.h <<_ACEOF
52737 52722 #define HAVE_SYS_SDT_H 1
52738 52723 _ACEOF
52739 52724 DTRACE_HEADERS_OK=yes
52740 52725 else
52741 52726 DTRACE_HEADERS_OK=no
52742 52727 fi
52743 52728
52744 52729 done
52745 52730
52746 52731 if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52747 52732 DTRACE_DEP_MISSING=true
52748 52733 fi
52749 52734
52750 52735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52751 52736 $as_echo_n "checking if dtrace should be built... " >&6; }
52752 52737 if test "x$enable_dtrace" = "xyes"; then
52753 52738 if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52754 52739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52755 52740 $as_echo "no, missing dependencies" >&6; }
52756 52741
52757 52742 # Print a helpful message on how to acquire the necessary build dependency.
52758 52743 # dtrace is the help tag: freetype, cups, alsa etc
52759 52744 MISSING_DEPENDENCY=dtrace
52760 52745
52761 52746 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52762 52747 cygwin_help $MISSING_DEPENDENCY
52763 52748 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52764 52749 msys_help $MISSING_DEPENDENCY
52765 52750 else
52766 52751 PKGHANDLER_COMMAND=
52767 52752
52768 52753 case $PKGHANDLER in
52769 52754 apt-get)
52770 52755 apt_help $MISSING_DEPENDENCY ;;
52771 52756 yum)
52772 52757 yum_help $MISSING_DEPENDENCY ;;
52773 52758 port)
52774 52759 port_help $MISSING_DEPENDENCY ;;
52775 52760 pkgutil)
52776 52761 pkgutil_help $MISSING_DEPENDENCY ;;
52777 52762 pkgadd)
52778 52763 pkgadd_help $MISSING_DEPENDENCY ;;
52779 52764 esac
52780 52765
52781 52766 if test "x$PKGHANDLER_COMMAND" != x; then
52782 52767 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52783 52768 fi
52784 52769 fi
52785 52770
52786 52771 as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52787 52772 else
52788 52773 INCLUDE_DTRACE=true
52789 52774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52790 52775 $as_echo "yes, forced" >&6; }
52791 52776 fi
52792 52777 elif test "x$enable_dtrace" = "xno"; then
52793 52778 INCLUDE_DTRACE=false
52794 52779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52795 52780 $as_echo "no, forced" >&6; }
52796 52781 elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52797 52782 if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52798 52783 INCLUDE_DTRACE=false
52799 52784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52800 52785 $as_echo "no, missing dependencies" >&6; }
52801 52786 else
52802 52787 INCLUDE_DTRACE=true
52803 52788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52804 52789 $as_echo "yes, dependencies present" >&6; }
52805 52790 fi
52806 52791 else
52807 52792 as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52808 52793 fi
52809 52794
52810 52795
52811 52796
52812 52797 # The user can in some cases supply additional jvm features. For the custom
52813 52798 # variant, this defines the entire variant.
52814 52799
52815 52800 # Check whether --with-jvm-features was given.
52816 52801 if test "${with_jvm_features+set}" = set; then :
52817 52802 withval=$with_jvm_features;
52818 52803 fi
52819 52804
52820 52805 if test "x$with_jvm_features" != x; then
52821 52806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52822 52807 $as_echo_n "checking additional JVM features... " >&6; }
52823 52808 JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52824 52809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52825 52810 $as_echo "$JVM_FEATURES" >&6; }
52826 52811 fi
52827 52812
52828 52813 # Verify that dependencies are met for explicitly set features.
52829 52814 if [[ " $JVM_FEATURES " =~ " jvmti " ]] && ! [[ " $JVM_FEATURES " =~ " services " ]] ; then
52830 52815 as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52831 52816 fi
52832 52817
52833 52818 if [[ " $JVM_FEATURES " =~ " management " ]] && ! [[ " $JVM_FEATURES " =~ " nmt " ]] ; then
52834 52819 as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52835 52820 fi
52836 52821
52837 52822 if [[ " $JVM_FEATURES " =~ " jvmci " ]] && ! ( [[ " $JVM_FEATURES " =~ " compiler1 " ]] || [[ " $JVM_FEATURES " =~ " compiler2 " ]] ); then
52838 52823 as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
52839 52824 fi
52840 52825
52841 52826 if [[ " $JVM_FEATURES " =~ " compiler2 " ]] && ! [[ " $JVM_FEATURES " =~ " all-gcs " ]] ; then
52842 52827 as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52843 52828 fi
52844 52829
52845 52830 if [[ " $JVM_FEATURES " =~ " vm-structs " ]] && ! [[ " $JVM_FEATURES " =~ " all-gcs " ]] ; then
52846 52831 as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52847 52832 fi
52848 52833
52849 52834 # Turn on additional features based on other parts of configure
52850 52835 if test "x$INCLUDE_DTRACE" = "xtrue"; then
52851 52836 JVM_FEATURES="$JVM_FEATURES dtrace"
52852 52837 else
52853 52838 if [[ " $JVM_FEATURES " =~ " dtrace " ]] ; then
52854 52839 as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52855 52840 fi
52856 52841 fi
52857 52842
52858 52843 if test "x$STATIC_BUILD" = "xtrue"; then
52859 52844 JVM_FEATURES="$JVM_FEATURES static-build"
52860 52845 else
52861 52846 if [[ " $JVM_FEATURES " =~ " static-build " ]] ; then
52862 52847 as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52863 52848 fi
52864 52849 fi
52865 52850
52866 52851 if ! [[ " $JVM_VARIANTS " =~ " zero " ]] && ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
52867 52852 if [[ " $JVM_FEATURES " =~ " zero " ]] ; then
52868 52853 as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52869 52854 fi
52870 52855 fi
52871 52856
52872 52857 if ! [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
52873 52858 if [[ " $JVM_FEATURES " =~ " shark " ]] ; then
52874 52859 as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52875 52860 fi
52876 52861 fi
52877 52862
52878 52863 # Only enable jvmci on x86_64, sparcv9 and aarch64.
52879 52864 if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52880 52865 test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52881 52866 test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52882 52867 JVM_FEATURES_jvmci="jvmci"
52883 52868 else
52884 52869 JVM_FEATURES_jvmci=""
52885 52870 fi
52886 52871
52887 52872 # All variants but minimal (and custom) get these features
52888 52873 NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52889 52874
52890 52875 # Enable features depending on variant.
52891 52876 JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52892 52877 JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52893 52878 JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52894 52879 JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52895 52880 JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52896 52881 JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52897 52882 JVM_FEATURES_custom="$JVM_FEATURES"
52898 52883
52899 52884
52900 52885
52901 52886
52902 52887
52903 52888
52904 52889
52905 52890
52906 52891
52907 52892 # Used for verification of Makefiles by check-jvm-feature
52908 52893
52909 52894
52910 52895 # We don't support --with-jvm-interpreter anymore, use zero instead.
52911 52896
52912 52897
52913 52898 # Check whether --with-jvm-interpreter was given.
52914 52899 if test "${with_jvm_interpreter+set}" = set; then :
52915 52900 withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52916 52901 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52917 52902 fi
52918 52903
52919 52904
52920 52905
52921 52906
52922 52907 # Check whether --enable-hotspot-gtest was given.
52923 52908 if test "${enable_hotspot_gtest+set}" = set; then :
52924 52909 enableval=$enable_hotspot_gtest;
52925 52910 fi
52926 52911
52927 52912
52928 52913 if test -e "$HOTSPOT_TOPDIR/test/native"; then
52929 52914 GTEST_DIR_EXISTS="true"
52930 52915 else
52931 52916 GTEST_DIR_EXISTS="false"
52932 52917 fi
52933 52918
52934 52919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
52935 52920 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
52936 52921 if test "x$enable_hotspot_gtest" = "xyes"; then
52937 52922 if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
52938 52923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52939 52924 $as_echo "yes, forced" >&6; }
52940 52925 BUILD_GTEST="true"
52941 52926 else
52942 52927 as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
52943 52928 fi
52944 52929 elif test "x$enable_hotspot_gtest" = "xno"; then
52945 52930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52946 52931 $as_echo "no, forced" >&6; }
52947 52932 BUILD_GTEST="false"
52948 52933 elif test "x$enable_hotspot_gtest" = "x"; then
52949 52934 if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
52950 52935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52951 52936 $as_echo "yes" >&6; }
52952 52937 BUILD_GTEST="true"
52953 52938 else
52954 52939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52955 52940 $as_echo "no" >&6; }
52956 52941 BUILD_GTEST="false"
52957 52942 fi
52958 52943 else
52959 52944 as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
52960 52945 fi
52961 52946
52962 52947
52963 52948
52964 52949
52965 52950 ###############################################################################
52966 52951 #
52967 52952 # Check dependencies for external and internal libraries.
52968 52953 #
52969 52954 ###############################################################################
52970 52955
52971 52956 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52972 52957
52973 52958 # When using cygwin or msys, we need a wrapper binary that renames
52974 52959 # /cygdrive/c/ arguments into c:/ arguments and peeks into
52975 52960 # @files and rewrites these too! This wrapper binary is
52976 52961 # called fixpath.
52977 52962 FIXPATH=
52978 52963 if test "x$OPENJDK_BUILD_OS" = xwindows; then
52979 52964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52980 52965 $as_echo_n "checking if fixpath can be created... " >&6; }
52981 52966 FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52982 52967 FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52983 52968 FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52984 52969 if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52985 52970 # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52986 52971 FIXPATH="$FIXPATH_BIN -c"
52987 52972 elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52988 52973 # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52989 52974 # @ was chosen as separator to minimize risk of other tools messing around with it
52990 52975 all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52991 52976 | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
52992 52977 fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
52993 52978 FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52994 52979 fi
52995 52980 FIXPATH_SRC_W="$FIXPATH_SRC"
52996 52981 FIXPATH_BIN_W="$FIXPATH_BIN"
52997 52982
52998 52983 unix_path="$FIXPATH_SRC_W"
52999 52984 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53000 52985 windows_path=`$CYGPATH -m "$unix_path"`
53001 52986 FIXPATH_SRC_W="$windows_path"
53002 52987 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53003 52988 windows_path=`cmd //c echo $unix_path`
53004 52989 FIXPATH_SRC_W="$windows_path"
53005 52990 fi
53006 52991
53007 52992
53008 52993 unix_path="$FIXPATH_BIN_W"
53009 52994 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53010 52995 windows_path=`$CYGPATH -m "$unix_path"`
53011 52996 FIXPATH_BIN_W="$windows_path"
53012 52997 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53013 52998 windows_path=`cmd //c echo $unix_path`
53014 52999 FIXPATH_BIN_W="$windows_path"
53015 53000 fi
53016 53001
53017 53002 $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53018 53003 $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53019 53004 cd $FIXPATH_DIR
53020 53005 $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53021 53006 cd $CURDIR
53022 53007
53023 53008 if test ! -x $FIXPATH_BIN; then
53024 53009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53025 53010 $as_echo "no" >&6; }
53026 53011 cat $FIXPATH_DIR/fixpath1.log
53027 53012 as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53028 53013 fi
53029 53014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53030 53015 $as_echo "yes" >&6; }
53031 53016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53032 53017 $as_echo_n "checking if fixpath.exe works... " >&6; }
53033 53018 cd $FIXPATH_DIR
53034 53019 $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53035 53020 > $FIXPATH_DIR/fixpath2.log 2>&1
53036 53021 cd $CURDIR
53037 53022 if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53038 53023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53039 53024 $as_echo "no" >&6; }
53040 53025 cat $FIXPATH_DIR/fixpath2.log
53041 53026 as_fn_error $? "fixpath did not work!" "$LINENO" 5
53042 53027 fi
53043 53028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53044 53029 $as_echo "yes" >&6; }
53045 53030
53046 53031 FIXPATH_DETACH_FLAG="--detach"
53047 53032 fi
53048 53033
53049 53034
53050 53035
53051 53036
53052 53037
53053 53038
53054 53039 # Check if X11 is needed
53055 53040 if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53056 53041 # No X11 support on windows or macosx
53057 53042 NEEDS_LIB_X11=false
53058 53043 else
53059 53044 if test "x$SUPPORT_HEADFUL" = xno; then
53060 53045 # No X11 support if building headless-only
53061 53046 NEEDS_LIB_X11=false
53062 53047 else
53063 53048 # All other instances need X11
53064 53049 NEEDS_LIB_X11=true
53065 53050 fi
53066 53051 fi
53067 53052
53068 53053 # Check if cups is needed
53069 53054 if test "x$OPENJDK_TARGET_OS" = xwindows; then
53070 53055 # Windows have a separate print system
53071 53056 NEEDS_LIB_CUPS=false
53072 53057 else
53073 53058 NEEDS_LIB_CUPS=true
53074 53059 fi
53075 53060
53076 53061 # A custom hook may have set this already
53077 53062 if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53078 53063 NEEDS_LIB_FREETYPE=true
53079 53064 fi
53080 53065
53081 53066 # Check if alsa is needed
53082 53067 if test "x$OPENJDK_TARGET_OS" = xlinux; then
53083 53068 NEEDS_LIB_ALSA=true
53084 53069 else
53085 53070 NEEDS_LIB_ALSA=false
53086 53071 fi
53087 53072
53088 53073 # Check if ffi is needed
53089 53074 if [[ " $JVM_VARIANTS " =~ " zero " ]] || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
53090 53075 NEEDS_LIB_FFI=true
53091 53076 else
53092 53077 NEEDS_LIB_FFI=false
53093 53078 fi
53094 53079
53095 53080
53096 53081 # statically link libstdc++ before C++ ABI is stablized on Linux unless
53097 53082 # dynamic build is configured on command line.
53098 53083
53099 53084 # Check whether --with-stdc++lib was given.
53100 53085 if test "${with_stdc__lib+set}" = set; then :
53101 53086 withval=$with_stdc__lib;
53102 53087 if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53103 53088 && test "x$with_stdc__lib" != xdefault; then
53104 53089 as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53105 53090 fi
53106 53091
53107 53092 else
53108 53093 with_stdc__lib=default
53109 53094
53110 53095 fi
53111 53096
53112 53097
53113 53098 if test "x$OPENJDK_TARGET_OS" = xlinux; then
53114 53099 # Test if -lstdc++ works.
53115 53100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53116 53101 $as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53117 53102 ac_ext=cpp
53118 53103 ac_cpp='$CXXCPP $CPPFLAGS'
53119 53104 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53120 53105 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53121 53106 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53122 53107
53123 53108 OLD_CXXFLAGS="$CXXFLAGS"
53124 53109 CXXFLAGS="$CXXFLAGS -lstdc++"
53125 53110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53126 53111 /* end confdefs.h. */
53127 53112
53128 53113 int
53129 53114 main ()
53130 53115 {
53131 53116 return 0;
53132 53117 ;
53133 53118 return 0;
53134 53119 }
53135 53120 _ACEOF
53136 53121 if ac_fn_cxx_try_link "$LINENO"; then :
53137 53122 has_dynamic_libstdcxx=yes
53138 53123 else
53139 53124 has_dynamic_libstdcxx=no
53140 53125 fi
53141 53126 rm -f core conftest.err conftest.$ac_objext \
53142 53127 conftest$ac_exeext conftest.$ac_ext
53143 53128 CXXFLAGS="$OLD_CXXFLAGS"
53144 53129 ac_ext=cpp
53145 53130 ac_cpp='$CXXCPP $CPPFLAGS'
53146 53131 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53147 53132 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53148 53133 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53149 53134
53150 53135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53151 53136 $as_echo "$has_dynamic_libstdcxx" >&6; }
53152 53137
53153 53138 # Test if stdc++ can be linked statically.
53154 53139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53155 53140 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53156 53141 STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53157 53142 ac_ext=cpp
53158 53143 ac_cpp='$CXXCPP $CPPFLAGS'
53159 53144 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53160 53145 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53161 53146 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53162 53147
53163 53148 OLD_LIBS="$LIBS"
53164 53149 OLD_CXX="$CXX"
53165 53150 LIBS="$STATIC_STDCXX_FLAGS"
53166 53151 CXX="$CC"
53167 53152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53168 53153 /* end confdefs.h. */
53169 53154
53170 53155 int
53171 53156 main ()
53172 53157 {
53173 53158 return 0;
53174 53159 ;
53175 53160 return 0;
53176 53161 }
53177 53162 _ACEOF
53178 53163 if ac_fn_cxx_try_link "$LINENO"; then :
53179 53164 has_static_libstdcxx=yes
53180 53165 else
53181 53166 has_static_libstdcxx=no
53182 53167 fi
53183 53168 rm -f core conftest.err conftest.$ac_objext \
53184 53169 conftest$ac_exeext conftest.$ac_ext
53185 53170 LIBS="$OLD_LIBS"
53186 53171 CXX="$OLD_CXX"
53187 53172 ac_ext=cpp
53188 53173 ac_cpp='$CXXCPP $CPPFLAGS'
53189 53174 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53190 53175 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53191 53176 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53192 53177
53193 53178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53194 53179 $as_echo "$has_static_libstdcxx" >&6; }
53195 53180
53196 53181 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53197 53182 as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53198 53183 fi
53199 53184
53200 53185 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53201 53186 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53202 53187 fi
53203 53188
53204 53189 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53205 53190 as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53206 53191 fi
53207 53192
53208 53193 # If dynamic was requested, it's available since it would fail above otherwise.
53209 53194 # If dynamic wasn't requested, go with static unless it isn't available.
53210 53195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53211 53196 $as_echo_n "checking how to link with libstdc++... " >&6; }
53212 53197 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
53213 53198 LIBCXX="$LIBCXX -lstdc++"
53214 53199 # To help comparisons with old build, put stdc++ first in JVM_LIBS
53215 53200 JVM_LIBS="-lstdc++ $JVM_LIBS"
53216 53201 # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53217 53202 # just use the same setting as for the TARGET toolchain.
53218 53203 OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53219 53204 LDCXX="$CXX"
53220 53205 STATIC_CXX_SETTING="STATIC_CXX=false"
53221 53206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53222 53207 $as_echo "dynamic" >&6; }
53223 53208 else
53224 53209 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53225 53210 JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53226 53211 # To help comparisons with old build, put stdc++ first in JVM_LIBS
53227 53212 JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53228 53213 # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53229 53214 # just use the same setting as for the TARGET toolchain.
53230 53215 OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53231 53216 OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53232 53217 LDCXX="$CC"
53233 53218 STATIC_CXX_SETTING="STATIC_CXX=true"
53234 53219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53235 53220 $as_echo "static" >&6; }
53236 53221 fi
53237 53222 fi
53238 53223
53239 53224
53240 53225 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53241 53226 if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53242 53227 LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53243 53228 fi
53244 53229
53245 53230 # TODO better (platform agnostic) test
53246 53231 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53247 53232 LIBCXX="-lstdc++"
53248 53233 fi
53249 53234
53250 53235
53251 53236 # Setup Windows runtime dlls
53252 53237 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53253 53238
53254 53239
53255 53240 # Check whether --with-msvcr-dll was given.
53256 53241 if test "${with_msvcr_dll+set}" = set; then :
53257 53242 withval=$with_msvcr_dll;
53258 53243 fi
53259 53244
53260 53245
53261 53246 if test "x$with_msvcr_dll" != x; then
53262 53247 # If given explicitely by user, do not probe. If not present, fail directly.
53263 53248
53264 53249 DLL_NAME="$MSVCR_NAME"
53265 53250 POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53266 53251 METHOD="--with-msvcr-dll"
53267 53252 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53268 53253 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53269 53254 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53270 53255
53271 53256 # Need to check if the found msvcr is correct architecture
53272 53257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53273 53258 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53274 53259 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53275 53260 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53276 53261 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53277 53262 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53278 53263 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53279 53264 CORRECT_MSVCR_ARCH="PE32 executable"
53280 53265 else
53281 53266 CORRECT_MSVCR_ARCH="PE32+ executable"
53282 53267 fi
53283 53268 else
53284 53269 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53285 53270 CORRECT_MSVCR_ARCH=386
53286 53271 else
53287 53272 CORRECT_MSVCR_ARCH=x86-64
53288 53273 fi
53289 53274 fi
53290 53275 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53291 53276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53292 53277 $as_echo "ok" >&6; }
53293 53278 MSVC_DLL="$POSSIBLE_MSVC_DLL"
53294 53279
53295 53280 # Only process if variable expands to non-empty
53296 53281
53297 53282 if test "x$MSVC_DLL" != x; then
53298 53283 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53299 53284
53300 53285 # Input might be given as Windows format, start by converting to
53301 53286 # unix format.
53302 53287 path="$MSVC_DLL"
53303 53288 new_path=`$CYGPATH -u "$path"`
53304 53289
53305 53290 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53306 53291 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53307 53292 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53308 53293 # "foo.exe" is OK but "foo" is an error.
53309 53294 #
53310 53295 # This test is therefore slightly more accurate than "test -f" to check for file precense.
53311 53296 # It is also a way to make sure we got the proper file name for the real test later on.
53312 53297 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53313 53298 if test "x$test_shortpath" = x; then
53314 53299 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53315 53300 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53316 53301 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53317 53302 fi
53318 53303
53319 53304 # Call helper function which possibly converts this using DOS-style short mode.
53320 53305 # If so, the updated path is stored in $new_path.
53321 53306
53322 53307 input_path="$new_path"
53323 53308 # Check if we need to convert this using DOS-style short mode. If the path
53324 53309 # contains just simple characters, use it. Otherwise (spaces, weird characters),
53325 53310 # take no chances and rewrite it.
53326 53311 # Note: m4 eats our [], so we need to use [ and ] instead.
53327 53312 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53328 53313 if test "x$has_forbidden_chars" != x; then
53329 53314 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53330 53315 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53331 53316 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53332 53317 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53333 53318 # Going to short mode and back again did indeed matter. Since short mode is
53334 53319 # case insensitive, let's make it lowercase to improve readability.
53335 53320 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53336 53321 # Now convert it back to Unix-style (cygpath)
53337 53322 input_path=`$CYGPATH -u "$shortmode_path"`
53338 53323 new_path="$input_path"
53339 53324 fi
53340 53325 fi
53341 53326
53342 53327 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53343 53328 if test "x$test_cygdrive_prefix" = x; then
53344 53329 # As a simple fix, exclude /usr/bin since it's not a real path.
53345 53330 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53346 53331 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53347 53332 # a path prefixed by /cygdrive for fixpath to work.
53348 53333 new_path="$CYGWIN_ROOT_PATH$input_path"
53349 53334 fi
53350 53335 fi
53351 53336
53352 53337
53353 53338 if test "x$path" != "x$new_path"; then
53354 53339 MSVC_DLL="$new_path"
53355 53340 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53356 53341 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53357 53342 fi
53358 53343
53359 53344 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53360 53345
53361 53346 path="$MSVC_DLL"
53362 53347 has_colon=`$ECHO $path | $GREP ^.:`
53363 53348 new_path="$path"
53364 53349 if test "x$has_colon" = x; then
53365 53350 # Not in mixed or Windows style, start by that.
53366 53351 new_path=`cmd //c echo $path`
53367 53352 fi
53368 53353
53369 53354
53370 53355 input_path="$new_path"
53371 53356 # Check if we need to convert this using DOS-style short mode. If the path
53372 53357 # contains just simple characters, use it. Otherwise (spaces, weird characters),
53373 53358 # take no chances and rewrite it.
53374 53359 # Note: m4 eats our [], so we need to use [ and ] instead.
53375 53360 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53376 53361 if test "x$has_forbidden_chars" != x; then
53377 53362 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53378 53363 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53379 53364 fi
53380 53365
53381 53366
53382 53367 windows_path="$new_path"
53383 53368 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53384 53369 unix_path=`$CYGPATH -u "$windows_path"`
53385 53370 new_path="$unix_path"
53386 53371 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53387 53372 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53388 53373 new_path="$unix_path"
53389 53374 fi
53390 53375
53391 53376 if test "x$path" != "x$new_path"; then
53392 53377 MSVC_DLL="$new_path"
53393 53378 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53394 53379 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53395 53380 fi
53396 53381
53397 53382 # Save the first 10 bytes of this path to the storage, so fixpath can work.
53398 53383 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53399 53384
53400 53385 else
53401 53386 # We're on a unix platform. Hooray! :)
53402 53387 path="$MSVC_DLL"
53403 53388 has_space=`$ECHO "$path" | $GREP " "`
53404 53389 if test "x$has_space" != x; then
53405 53390 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53406 53391 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53407 53392 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53408 53393 fi
53409 53394
53410 53395 # Use eval to expand a potential ~
53411 53396 eval path="$path"
53412 53397 if test ! -f "$path" && test ! -d "$path"; then
53413 53398 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53414 53399 fi
53415 53400
53416 53401 if test -d "$path"; then
53417 53402 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53418 53403 else
53419 53404 dir="`$DIRNAME "$path"`"
53420 53405 base="`$BASENAME "$path"`"
53421 53406 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53422 53407 fi
53423 53408 fi
53424 53409 fi
53425 53410
53426 53411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53427 53412 $as_echo_n "checking for $DLL_NAME... " >&6; }
53428 53413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53429 53414 $as_echo "$MSVC_DLL" >&6; }
53430 53415 else
53431 53416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53432 53417 $as_echo "incorrect, ignoring" >&6; }
53433 53418 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53434 53419 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53435 53420 fi
53436 53421 fi
53437 53422
53438 53423 if test "x$MSVC_DLL" = x; then
53439 53424 as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53440 53425 fi
53441 53426 MSVCR_DLL="$MSVC_DLL"
53442 53427 elif test "x$DEVKIT_MSVCR_DLL" != x; then
53443 53428
53444 53429 DLL_NAME="$MSVCR_NAME"
53445 53430 POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53446 53431 METHOD="devkit"
53447 53432 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53448 53433 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53449 53434 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53450 53435
53451 53436 # Need to check if the found msvcr is correct architecture
53452 53437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53453 53438 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53454 53439 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53455 53440 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53456 53441 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53457 53442 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53458 53443 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53459 53444 CORRECT_MSVCR_ARCH="PE32 executable"
53460 53445 else
53461 53446 CORRECT_MSVCR_ARCH="PE32+ executable"
53462 53447 fi
53463 53448 else
53464 53449 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53465 53450 CORRECT_MSVCR_ARCH=386
53466 53451 else
53467 53452 CORRECT_MSVCR_ARCH=x86-64
53468 53453 fi
53469 53454 fi
53470 53455 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53471 53456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53472 53457 $as_echo "ok" >&6; }
53473 53458 MSVC_DLL="$POSSIBLE_MSVC_DLL"
53474 53459
53475 53460 # Only process if variable expands to non-empty
53476 53461
53477 53462 if test "x$MSVC_DLL" != x; then
53478 53463 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53479 53464
53480 53465 # Input might be given as Windows format, start by converting to
53481 53466 # unix format.
53482 53467 path="$MSVC_DLL"
53483 53468 new_path=`$CYGPATH -u "$path"`
53484 53469
53485 53470 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53486 53471 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53487 53472 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53488 53473 # "foo.exe" is OK but "foo" is an error.
53489 53474 #
53490 53475 # This test is therefore slightly more accurate than "test -f" to check for file precense.
53491 53476 # It is also a way to make sure we got the proper file name for the real test later on.
53492 53477 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53493 53478 if test "x$test_shortpath" = x; then
53494 53479 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53495 53480 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53496 53481 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53497 53482 fi
53498 53483
53499 53484 # Call helper function which possibly converts this using DOS-style short mode.
53500 53485 # If so, the updated path is stored in $new_path.
53501 53486
53502 53487 input_path="$new_path"
53503 53488 # Check if we need to convert this using DOS-style short mode. If the path
53504 53489 # contains just simple characters, use it. Otherwise (spaces, weird characters),
53505 53490 # take no chances and rewrite it.
53506 53491 # Note: m4 eats our [], so we need to use [ and ] instead.
53507 53492 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53508 53493 if test "x$has_forbidden_chars" != x; then
53509 53494 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53510 53495 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53511 53496 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53512 53497 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53513 53498 # Going to short mode and back again did indeed matter. Since short mode is
53514 53499 # case insensitive, let's make it lowercase to improve readability.
53515 53500 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53516 53501 # Now convert it back to Unix-style (cygpath)
53517 53502 input_path=`$CYGPATH -u "$shortmode_path"`
53518 53503 new_path="$input_path"
53519 53504 fi
53520 53505 fi
53521 53506
53522 53507 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53523 53508 if test "x$test_cygdrive_prefix" = x; then
53524 53509 # As a simple fix, exclude /usr/bin since it's not a real path.
53525 53510 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53526 53511 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53527 53512 # a path prefixed by /cygdrive for fixpath to work.
53528 53513 new_path="$CYGWIN_ROOT_PATH$input_path"
53529 53514 fi
53530 53515 fi
53531 53516
53532 53517
53533 53518 if test "x$path" != "x$new_path"; then
53534 53519 MSVC_DLL="$new_path"
53535 53520 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53536 53521 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53537 53522 fi
53538 53523
53539 53524 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53540 53525
53541 53526 path="$MSVC_DLL"
53542 53527 has_colon=`$ECHO $path | $GREP ^.:`
53543 53528 new_path="$path"
53544 53529 if test "x$has_colon" = x; then
53545 53530 # Not in mixed or Windows style, start by that.
53546 53531 new_path=`cmd //c echo $path`
53547 53532 fi
53548 53533
53549 53534
53550 53535 input_path="$new_path"
53551 53536 # Check if we need to convert this using DOS-style short mode. If the path
53552 53537 # contains just simple characters, use it. Otherwise (spaces, weird characters),
53553 53538 # take no chances and rewrite it.
53554 53539 # Note: m4 eats our [], so we need to use [ and ] instead.
53555 53540 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53556 53541 if test "x$has_forbidden_chars" != x; then
53557 53542 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53558 53543 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53559 53544 fi
53560 53545
53561 53546
53562 53547 windows_path="$new_path"
53563 53548 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53564 53549 unix_path=`$CYGPATH -u "$windows_path"`
53565 53550 new_path="$unix_path"
53566 53551 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53567 53552 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53568 53553 new_path="$unix_path"
53569 53554 fi
53570 53555
53571 53556 if test "x$path" != "x$new_path"; then
53572 53557 MSVC_DLL="$new_path"
53573 53558 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53574 53559 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53575 53560 fi
53576 53561
53577 53562 # Save the first 10 bytes of this path to the storage, so fixpath can work.
53578 53563 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53579 53564
53580 53565 else
53581 53566 # We're on a unix platform. Hooray! :)
53582 53567 path="$MSVC_DLL"
53583 53568 has_space=`$ECHO "$path" | $GREP " "`
53584 53569 if test "x$has_space" != x; then
53585 53570 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53586 53571 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53587 53572 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53588 53573 fi
53589 53574
53590 53575 # Use eval to expand a potential ~
53591 53576 eval path="$path"
53592 53577 if test ! -f "$path" && test ! -d "$path"; then
53593 53578 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53594 53579 fi
53595 53580
53596 53581 if test -d "$path"; then
53597 53582 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53598 53583 else
53599 53584 dir="`$DIRNAME "$path"`"
53600 53585 base="`$BASENAME "$path"`"
53601 53586 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53602 53587 fi
53603 53588 fi
53604 53589 fi
53605 53590
53606 53591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53607 53592 $as_echo_n "checking for $DLL_NAME... " >&6; }
53608 53593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53609 53594 $as_echo "$MSVC_DLL" >&6; }
53610 53595 else
53611 53596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53612 53597 $as_echo "incorrect, ignoring" >&6; }
53613 53598 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53614 53599 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53615 53600 fi
53616 53601 fi
53617 53602
53618 53603 if test "x$MSVC_DLL" = x; then
53619 53604 as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53620 53605 fi
53621 53606 MSVCR_DLL="$MSVC_DLL"
53622 53607 else
53623 53608
53624 53609 DLL_NAME="${MSVCR_NAME}"
53625 53610 MSVC_DLL=
53626 53611
53627 53612 if test "x$MSVC_DLL" = x; then
53628 53613 # Probe: Using well-known location from Visual Studio 10.0
53629 53614 if test "x$VCINSTALLDIR" != x; then
53630 53615 CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53631 53616
53632 53617 windows_path="$CYGWIN_VC_INSTALL_DIR"
53633 53618 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53634 53619 unix_path=`$CYGPATH -u "$windows_path"`
53635 53620 CYGWIN_VC_INSTALL_DIR="$unix_path"
53636 53621 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53637 53622 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53638 53623 CYGWIN_VC_INSTALL_DIR="$unix_path"
53639 53624 fi
53640 53625
53641 53626 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53642 53627 POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53643 53628 else
53644 53629 POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53645 53630 fi
53646 53631 $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53647 53632
53648 53633 DLL_NAME="$DLL_NAME"
53649 53634 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53650 53635 METHOD="well-known location in VCINSTALLDIR"
53651 53636 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53652 53637 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53653 53638 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53654 53639
53655 53640 # Need to check if the found msvcr is correct architecture
53656 53641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53657 53642 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53658 53643 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53659 53644 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53660 53645 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53661 53646 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53662 53647 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53663 53648 CORRECT_MSVCR_ARCH="PE32 executable"
53664 53649 else
53665 53650 CORRECT_MSVCR_ARCH="PE32+ executable"
53666 53651 fi
53667 53652 else
53668 53653 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53669 53654 CORRECT_MSVCR_ARCH=386
53670 53655 else
53671 53656 CORRECT_MSVCR_ARCH=x86-64
53672 53657 fi
53673 53658 fi
53674 53659 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53675 53660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53676 53661 $as_echo "ok" >&6; }
53677 53662 MSVC_DLL="$POSSIBLE_MSVC_DLL"
53678 53663
53679 53664 # Only process if variable expands to non-empty
53680 53665
53681 53666 if test "x$MSVC_DLL" != x; then
53682 53667 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53683 53668
53684 53669 # Input might be given as Windows format, start by converting to
53685 53670 # unix format.
53686 53671 path="$MSVC_DLL"
53687 53672 new_path=`$CYGPATH -u "$path"`
53688 53673
53689 53674 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53690 53675 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53691 53676 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53692 53677 # "foo.exe" is OK but "foo" is an error.
53693 53678 #
53694 53679 # This test is therefore slightly more accurate than "test -f" to check for file precense.
53695 53680 # It is also a way to make sure we got the proper file name for the real test later on.
53696 53681 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53697 53682 if test "x$test_shortpath" = x; then
53698 53683 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53699 53684 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53700 53685 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53701 53686 fi
53702 53687
53703 53688 # Call helper function which possibly converts this using DOS-style short mode.
53704 53689 # If so, the updated path is stored in $new_path.
53705 53690
53706 53691 input_path="$new_path"
53707 53692 # Check if we need to convert this using DOS-style short mode. If the path
53708 53693 # contains just simple characters, use it. Otherwise (spaces, weird characters),
53709 53694 # take no chances and rewrite it.
53710 53695 # Note: m4 eats our [], so we need to use [ and ] instead.
53711 53696 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53712 53697 if test "x$has_forbidden_chars" != x; then
53713 53698 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53714 53699 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53715 53700 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53716 53701 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53717 53702 # Going to short mode and back again did indeed matter. Since short mode is
53718 53703 # case insensitive, let's make it lowercase to improve readability.
53719 53704 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53720 53705 # Now convert it back to Unix-style (cygpath)
53721 53706 input_path=`$CYGPATH -u "$shortmode_path"`
53722 53707 new_path="$input_path"
53723 53708 fi
53724 53709 fi
53725 53710
53726 53711 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53727 53712 if test "x$test_cygdrive_prefix" = x; then
53728 53713 # As a simple fix, exclude /usr/bin since it's not a real path.
53729 53714 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53730 53715 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53731 53716 # a path prefixed by /cygdrive for fixpath to work.
53732 53717 new_path="$CYGWIN_ROOT_PATH$input_path"
53733 53718 fi
53734 53719 fi
53735 53720
53736 53721
53737 53722 if test "x$path" != "x$new_path"; then
53738 53723 MSVC_DLL="$new_path"
53739 53724 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53740 53725 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53741 53726 fi
53742 53727
53743 53728 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53744 53729
53745 53730 path="$MSVC_DLL"
53746 53731 has_colon=`$ECHO $path | $GREP ^.:`
53747 53732 new_path="$path"
53748 53733 if test "x$has_colon" = x; then
53749 53734 # Not in mixed or Windows style, start by that.
53750 53735 new_path=`cmd //c echo $path`
53751 53736 fi
53752 53737
53753 53738
53754 53739 input_path="$new_path"
53755 53740 # Check if we need to convert this using DOS-style short mode. If the path
53756 53741 # contains just simple characters, use it. Otherwise (spaces, weird characters),
53757 53742 # take no chances and rewrite it.
53758 53743 # Note: m4 eats our [], so we need to use [ and ] instead.
53759 53744 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53760 53745 if test "x$has_forbidden_chars" != x; then
53761 53746 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53762 53747 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53763 53748 fi
53764 53749
53765 53750
53766 53751 windows_path="$new_path"
53767 53752 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53768 53753 unix_path=`$CYGPATH -u "$windows_path"`
53769 53754 new_path="$unix_path"
53770 53755 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53771 53756 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53772 53757 new_path="$unix_path"
53773 53758 fi
53774 53759
53775 53760 if test "x$path" != "x$new_path"; then
53776 53761 MSVC_DLL="$new_path"
53777 53762 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53778 53763 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53779 53764 fi
53780 53765
53781 53766 # Save the first 10 bytes of this path to the storage, so fixpath can work.
53782 53767 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53783 53768
53784 53769 else
53785 53770 # We're on a unix platform. Hooray! :)
53786 53771 path="$MSVC_DLL"
53787 53772 has_space=`$ECHO "$path" | $GREP " "`
53788 53773 if test "x$has_space" != x; then
53789 53774 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53790 53775 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53791 53776 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53792 53777 fi
53793 53778
53794 53779 # Use eval to expand a potential ~
53795 53780 eval path="$path"
53796 53781 if test ! -f "$path" && test ! -d "$path"; then
53797 53782 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53798 53783 fi
53799 53784
53800 53785 if test -d "$path"; then
53801 53786 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53802 53787 else
53803 53788 dir="`$DIRNAME "$path"`"
53804 53789 base="`$BASENAME "$path"`"
53805 53790 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53806 53791 fi
53807 53792 fi
53808 53793 fi
53809 53794
53810 53795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53811 53796 $as_echo_n "checking for $DLL_NAME... " >&6; }
53812 53797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53813 53798 $as_echo "$MSVC_DLL" >&6; }
53814 53799 else
53815 53800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53816 53801 $as_echo "incorrect, ignoring" >&6; }
53817 53802 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53818 53803 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53819 53804 fi
53820 53805 fi
53821 53806
53822 53807 fi
53823 53808 fi
53824 53809
53825 53810 if test "x$MSVC_DLL" = x; then
53826 53811 # Probe: Check in the Boot JDK directory.
53827 53812 POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53828 53813
53829 53814 DLL_NAME="$DLL_NAME"
53830 53815 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53831 53816 METHOD="well-known location in Boot JDK"
53832 53817 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53833 53818 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53834 53819 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53835 53820
53836 53821 # Need to check if the found msvcr is correct architecture
53837 53822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53838 53823 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53839 53824 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53840 53825 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53841 53826 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53842 53827 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53843 53828 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53844 53829 CORRECT_MSVCR_ARCH="PE32 executable"
53845 53830 else
53846 53831 CORRECT_MSVCR_ARCH="PE32+ executable"
53847 53832 fi
53848 53833 else
53849 53834 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53850 53835 CORRECT_MSVCR_ARCH=386
53851 53836 else
53852 53837 CORRECT_MSVCR_ARCH=x86-64
53853 53838 fi
53854 53839 fi
53855 53840 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53856 53841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53857 53842 $as_echo "ok" >&6; }
53858 53843 MSVC_DLL="$POSSIBLE_MSVC_DLL"
53859 53844
53860 53845 # Only process if variable expands to non-empty
53861 53846
53862 53847 if test "x$MSVC_DLL" != x; then
53863 53848 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53864 53849
53865 53850 # Input might be given as Windows format, start by converting to
53866 53851 # unix format.
53867 53852 path="$MSVC_DLL"
53868 53853 new_path=`$CYGPATH -u "$path"`
53869 53854
53870 53855 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53871 53856 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53872 53857 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53873 53858 # "foo.exe" is OK but "foo" is an error.
53874 53859 #
53875 53860 # This test is therefore slightly more accurate than "test -f" to check for file precense.
53876 53861 # It is also a way to make sure we got the proper file name for the real test later on.
53877 53862 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53878 53863 if test "x$test_shortpath" = x; then
53879 53864 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53880 53865 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53881 53866 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53882 53867 fi
53883 53868
53884 53869 # Call helper function which possibly converts this using DOS-style short mode.
53885 53870 # If so, the updated path is stored in $new_path.
53886 53871
53887 53872 input_path="$new_path"
53888 53873 # Check if we need to convert this using DOS-style short mode. If the path
53889 53874 # contains just simple characters, use it. Otherwise (spaces, weird characters),
53890 53875 # take no chances and rewrite it.
53891 53876 # Note: m4 eats our [], so we need to use [ and ] instead.
53892 53877 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53893 53878 if test "x$has_forbidden_chars" != x; then
53894 53879 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53895 53880 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53896 53881 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53897 53882 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53898 53883 # Going to short mode and back again did indeed matter. Since short mode is
53899 53884 # case insensitive, let's make it lowercase to improve readability.
53900 53885 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53901 53886 # Now convert it back to Unix-style (cygpath)
53902 53887 input_path=`$CYGPATH -u "$shortmode_path"`
53903 53888 new_path="$input_path"
53904 53889 fi
53905 53890 fi
53906 53891
53907 53892 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53908 53893 if test "x$test_cygdrive_prefix" = x; then
53909 53894 # As a simple fix, exclude /usr/bin since it's not a real path.
53910 53895 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53911 53896 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53912 53897 # a path prefixed by /cygdrive for fixpath to work.
53913 53898 new_path="$CYGWIN_ROOT_PATH$input_path"
53914 53899 fi
53915 53900 fi
53916 53901
53917 53902
53918 53903 if test "x$path" != "x$new_path"; then
53919 53904 MSVC_DLL="$new_path"
53920 53905 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53921 53906 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53922 53907 fi
53923 53908
53924 53909 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53925 53910
53926 53911 path="$MSVC_DLL"
53927 53912 has_colon=`$ECHO $path | $GREP ^.:`
53928 53913 new_path="$path"
53929 53914 if test "x$has_colon" = x; then
53930 53915 # Not in mixed or Windows style, start by that.
53931 53916 new_path=`cmd //c echo $path`
53932 53917 fi
53933 53918
53934 53919
53935 53920 input_path="$new_path"
53936 53921 # Check if we need to convert this using DOS-style short mode. If the path
53937 53922 # contains just simple characters, use it. Otherwise (spaces, weird characters),
53938 53923 # take no chances and rewrite it.
53939 53924 # Note: m4 eats our [], so we need to use [ and ] instead.
53940 53925 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53941 53926 if test "x$has_forbidden_chars" != x; then
53942 53927 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53943 53928 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53944 53929 fi
53945 53930
53946 53931
53947 53932 windows_path="$new_path"
53948 53933 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53949 53934 unix_path=`$CYGPATH -u "$windows_path"`
53950 53935 new_path="$unix_path"
53951 53936 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53952 53937 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53953 53938 new_path="$unix_path"
53954 53939 fi
53955 53940
53956 53941 if test "x$path" != "x$new_path"; then
53957 53942 MSVC_DLL="$new_path"
53958 53943 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53959 53944 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53960 53945 fi
53961 53946
53962 53947 # Save the first 10 bytes of this path to the storage, so fixpath can work.
53963 53948 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53964 53949
53965 53950 else
53966 53951 # We're on a unix platform. Hooray! :)
53967 53952 path="$MSVC_DLL"
53968 53953 has_space=`$ECHO "$path" | $GREP " "`
53969 53954 if test "x$has_space" != x; then
53970 53955 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53971 53956 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53972 53957 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53973 53958 fi
53974 53959
53975 53960 # Use eval to expand a potential ~
53976 53961 eval path="$path"
53977 53962 if test ! -f "$path" && test ! -d "$path"; then
53978 53963 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53979 53964 fi
53980 53965
53981 53966 if test -d "$path"; then
53982 53967 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53983 53968 else
53984 53969 dir="`$DIRNAME "$path"`"
53985 53970 base="`$BASENAME "$path"`"
53986 53971 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53987 53972 fi
53988 53973 fi
53989 53974 fi
53990 53975
53991 53976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53992 53977 $as_echo_n "checking for $DLL_NAME... " >&6; }
53993 53978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53994 53979 $as_echo "$MSVC_DLL" >&6; }
53995 53980 else
53996 53981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53997 53982 $as_echo "incorrect, ignoring" >&6; }
53998 53983 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53999 53984 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54000 53985 fi
54001 53986 fi
54002 53987
54003 53988 fi
54004 53989
54005 53990 if test "x$MSVC_DLL" = x; then
54006 53991 # Probe: Look in the Windows system32 directory
54007 53992 CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54008 53993
54009 53994 windows_path="$CYGWIN_SYSTEMROOT"
54010 53995 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54011 53996 unix_path=`$CYGPATH -u "$windows_path"`
54012 53997 CYGWIN_SYSTEMROOT="$unix_path"
54013 53998 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54014 53999 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54015 54000 CYGWIN_SYSTEMROOT="$unix_path"
54016 54001 fi
54017 54002
54018 54003 POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54019 54004
54020 54005 DLL_NAME="$DLL_NAME"
54021 54006 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54022 54007 METHOD="well-known location in SYSTEMROOT"
54023 54008 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54024 54009 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54025 54010 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54026 54011
54027 54012 # Need to check if the found msvcr is correct architecture
54028 54013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54029 54014 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54030 54015 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54031 54016 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54032 54017 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54033 54018 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54034 54019 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54035 54020 CORRECT_MSVCR_ARCH="PE32 executable"
54036 54021 else
54037 54022 CORRECT_MSVCR_ARCH="PE32+ executable"
54038 54023 fi
54039 54024 else
54040 54025 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54041 54026 CORRECT_MSVCR_ARCH=386
54042 54027 else
54043 54028 CORRECT_MSVCR_ARCH=x86-64
54044 54029 fi
54045 54030 fi
54046 54031 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54047 54032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54048 54033 $as_echo "ok" >&6; }
54049 54034 MSVC_DLL="$POSSIBLE_MSVC_DLL"
54050 54035
54051 54036 # Only process if variable expands to non-empty
54052 54037
54053 54038 if test "x$MSVC_DLL" != x; then
54054 54039 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54055 54040
54056 54041 # Input might be given as Windows format, start by converting to
54057 54042 # unix format.
54058 54043 path="$MSVC_DLL"
54059 54044 new_path=`$CYGPATH -u "$path"`
54060 54045
54061 54046 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54062 54047 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54063 54048 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54064 54049 # "foo.exe" is OK but "foo" is an error.
54065 54050 #
54066 54051 # This test is therefore slightly more accurate than "test -f" to check for file precense.
54067 54052 # It is also a way to make sure we got the proper file name for the real test later on.
54068 54053 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54069 54054 if test "x$test_shortpath" = x; then
54070 54055 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54071 54056 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54072 54057 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54073 54058 fi
54074 54059
54075 54060 # Call helper function which possibly converts this using DOS-style short mode.
54076 54061 # If so, the updated path is stored in $new_path.
54077 54062
54078 54063 input_path="$new_path"
54079 54064 # Check if we need to convert this using DOS-style short mode. If the path
54080 54065 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54081 54066 # take no chances and rewrite it.
54082 54067 # Note: m4 eats our [], so we need to use [ and ] instead.
54083 54068 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54084 54069 if test "x$has_forbidden_chars" != x; then
54085 54070 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54086 54071 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54087 54072 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54088 54073 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54089 54074 # Going to short mode and back again did indeed matter. Since short mode is
54090 54075 # case insensitive, let's make it lowercase to improve readability.
54091 54076 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54092 54077 # Now convert it back to Unix-style (cygpath)
54093 54078 input_path=`$CYGPATH -u "$shortmode_path"`
54094 54079 new_path="$input_path"
54095 54080 fi
54096 54081 fi
54097 54082
54098 54083 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54099 54084 if test "x$test_cygdrive_prefix" = x; then
54100 54085 # As a simple fix, exclude /usr/bin since it's not a real path.
54101 54086 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54102 54087 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54103 54088 # a path prefixed by /cygdrive for fixpath to work.
54104 54089 new_path="$CYGWIN_ROOT_PATH$input_path"
54105 54090 fi
54106 54091 fi
54107 54092
54108 54093
54109 54094 if test "x$path" != "x$new_path"; then
54110 54095 MSVC_DLL="$new_path"
54111 54096 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54112 54097 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54113 54098 fi
54114 54099
54115 54100 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54116 54101
54117 54102 path="$MSVC_DLL"
54118 54103 has_colon=`$ECHO $path | $GREP ^.:`
54119 54104 new_path="$path"
54120 54105 if test "x$has_colon" = x; then
54121 54106 # Not in mixed or Windows style, start by that.
54122 54107 new_path=`cmd //c echo $path`
54123 54108 fi
54124 54109
54125 54110
54126 54111 input_path="$new_path"
54127 54112 # Check if we need to convert this using DOS-style short mode. If the path
54128 54113 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54129 54114 # take no chances and rewrite it.
54130 54115 # Note: m4 eats our [], so we need to use [ and ] instead.
54131 54116 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54132 54117 if test "x$has_forbidden_chars" != x; then
54133 54118 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54134 54119 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54135 54120 fi
54136 54121
54137 54122
54138 54123 windows_path="$new_path"
54139 54124 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54140 54125 unix_path=`$CYGPATH -u "$windows_path"`
54141 54126 new_path="$unix_path"
54142 54127 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54143 54128 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54144 54129 new_path="$unix_path"
54145 54130 fi
54146 54131
54147 54132 if test "x$path" != "x$new_path"; then
54148 54133 MSVC_DLL="$new_path"
54149 54134 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54150 54135 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54151 54136 fi
54152 54137
54153 54138 # Save the first 10 bytes of this path to the storage, so fixpath can work.
54154 54139 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54155 54140
54156 54141 else
54157 54142 # We're on a unix platform. Hooray! :)
54158 54143 path="$MSVC_DLL"
54159 54144 has_space=`$ECHO "$path" | $GREP " "`
54160 54145 if test "x$has_space" != x; then
54161 54146 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54162 54147 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54163 54148 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54164 54149 fi
54165 54150
54166 54151 # Use eval to expand a potential ~
54167 54152 eval path="$path"
54168 54153 if test ! -f "$path" && test ! -d "$path"; then
54169 54154 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54170 54155 fi
54171 54156
54172 54157 if test -d "$path"; then
54173 54158 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54174 54159 else
54175 54160 dir="`$DIRNAME "$path"`"
54176 54161 base="`$BASENAME "$path"`"
54177 54162 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54178 54163 fi
54179 54164 fi
54180 54165 fi
54181 54166
54182 54167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54183 54168 $as_echo_n "checking for $DLL_NAME... " >&6; }
54184 54169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54185 54170 $as_echo "$MSVC_DLL" >&6; }
54186 54171 else
54187 54172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54188 54173 $as_echo "incorrect, ignoring" >&6; }
54189 54174 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54190 54175 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54191 54176 fi
54192 54177 fi
54193 54178
54194 54179 fi
54195 54180
54196 54181 if test "x$MSVC_DLL" = x; then
54197 54182 # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54198 54183 if test "x$VS100COMNTOOLS" != x; then
54199 54184 CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54200 54185
54201 54186 windows_path="$CYGWIN_VS_TOOLS_DIR"
54202 54187 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54203 54188 unix_path=`$CYGPATH -u "$windows_path"`
54204 54189 CYGWIN_VS_TOOLS_DIR="$unix_path"
54205 54190 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54206 54191 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54207 54192 CYGWIN_VS_TOOLS_DIR="$unix_path"
54208 54193 fi
54209 54194
54210 54195 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54211 54196 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54212 54197 | $GREP -i /x64/ | $HEAD --lines 1`
54213 54198 else
54214 54199 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54215 54200 | $GREP -i /x86/ | $HEAD --lines 1`
54216 54201 fi
54217 54202
54218 54203 DLL_NAME="$DLL_NAME"
54219 54204 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54220 54205 METHOD="search of VS100COMNTOOLS"
54221 54206 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54222 54207 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54223 54208 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54224 54209
54225 54210 # Need to check if the found msvcr is correct architecture
54226 54211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54227 54212 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54228 54213 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54229 54214 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54230 54215 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54231 54216 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54232 54217 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54233 54218 CORRECT_MSVCR_ARCH="PE32 executable"
54234 54219 else
54235 54220 CORRECT_MSVCR_ARCH="PE32+ executable"
54236 54221 fi
54237 54222 else
54238 54223 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54239 54224 CORRECT_MSVCR_ARCH=386
54240 54225 else
54241 54226 CORRECT_MSVCR_ARCH=x86-64
54242 54227 fi
54243 54228 fi
54244 54229 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54245 54230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54246 54231 $as_echo "ok" >&6; }
54247 54232 MSVC_DLL="$POSSIBLE_MSVC_DLL"
54248 54233
54249 54234 # Only process if variable expands to non-empty
54250 54235
54251 54236 if test "x$MSVC_DLL" != x; then
54252 54237 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54253 54238
54254 54239 # Input might be given as Windows format, start by converting to
54255 54240 # unix format.
54256 54241 path="$MSVC_DLL"
54257 54242 new_path=`$CYGPATH -u "$path"`
54258 54243
54259 54244 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54260 54245 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54261 54246 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54262 54247 # "foo.exe" is OK but "foo" is an error.
54263 54248 #
54264 54249 # This test is therefore slightly more accurate than "test -f" to check for file precense.
54265 54250 # It is also a way to make sure we got the proper file name for the real test later on.
54266 54251 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54267 54252 if test "x$test_shortpath" = x; then
54268 54253 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54269 54254 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54270 54255 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54271 54256 fi
54272 54257
54273 54258 # Call helper function which possibly converts this using DOS-style short mode.
54274 54259 # If so, the updated path is stored in $new_path.
54275 54260
54276 54261 input_path="$new_path"
54277 54262 # Check if we need to convert this using DOS-style short mode. If the path
54278 54263 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54279 54264 # take no chances and rewrite it.
54280 54265 # Note: m4 eats our [], so we need to use [ and ] instead.
54281 54266 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54282 54267 if test "x$has_forbidden_chars" != x; then
54283 54268 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54284 54269 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54285 54270 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54286 54271 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54287 54272 # Going to short mode and back again did indeed matter. Since short mode is
54288 54273 # case insensitive, let's make it lowercase to improve readability.
54289 54274 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54290 54275 # Now convert it back to Unix-style (cygpath)
54291 54276 input_path=`$CYGPATH -u "$shortmode_path"`
54292 54277 new_path="$input_path"
54293 54278 fi
54294 54279 fi
54295 54280
54296 54281 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54297 54282 if test "x$test_cygdrive_prefix" = x; then
54298 54283 # As a simple fix, exclude /usr/bin since it's not a real path.
54299 54284 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54300 54285 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54301 54286 # a path prefixed by /cygdrive for fixpath to work.
54302 54287 new_path="$CYGWIN_ROOT_PATH$input_path"
54303 54288 fi
54304 54289 fi
54305 54290
54306 54291
54307 54292 if test "x$path" != "x$new_path"; then
54308 54293 MSVC_DLL="$new_path"
54309 54294 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54310 54295 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54311 54296 fi
54312 54297
54313 54298 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54314 54299
54315 54300 path="$MSVC_DLL"
54316 54301 has_colon=`$ECHO $path | $GREP ^.:`
54317 54302 new_path="$path"
54318 54303 if test "x$has_colon" = x; then
54319 54304 # Not in mixed or Windows style, start by that.
54320 54305 new_path=`cmd //c echo $path`
54321 54306 fi
54322 54307
54323 54308
54324 54309 input_path="$new_path"
54325 54310 # Check if we need to convert this using DOS-style short mode. If the path
54326 54311 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54327 54312 # take no chances and rewrite it.
54328 54313 # Note: m4 eats our [], so we need to use [ and ] instead.
54329 54314 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54330 54315 if test "x$has_forbidden_chars" != x; then
54331 54316 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54332 54317 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54333 54318 fi
54334 54319
54335 54320
54336 54321 windows_path="$new_path"
54337 54322 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54338 54323 unix_path=`$CYGPATH -u "$windows_path"`
54339 54324 new_path="$unix_path"
54340 54325 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54341 54326 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54342 54327 new_path="$unix_path"
54343 54328 fi
54344 54329
54345 54330 if test "x$path" != "x$new_path"; then
54346 54331 MSVC_DLL="$new_path"
54347 54332 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54348 54333 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54349 54334 fi
54350 54335
54351 54336 # Save the first 10 bytes of this path to the storage, so fixpath can work.
54352 54337 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54353 54338
54354 54339 else
54355 54340 # We're on a unix platform. Hooray! :)
54356 54341 path="$MSVC_DLL"
54357 54342 has_space=`$ECHO "$path" | $GREP " "`
54358 54343 if test "x$has_space" != x; then
54359 54344 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54360 54345 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54361 54346 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54362 54347 fi
54363 54348
54364 54349 # Use eval to expand a potential ~
54365 54350 eval path="$path"
54366 54351 if test ! -f "$path" && test ! -d "$path"; then
54367 54352 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54368 54353 fi
54369 54354
54370 54355 if test -d "$path"; then
54371 54356 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54372 54357 else
54373 54358 dir="`$DIRNAME "$path"`"
54374 54359 base="`$BASENAME "$path"`"
54375 54360 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54376 54361 fi
54377 54362 fi
54378 54363 fi
54379 54364
54380 54365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54381 54366 $as_echo_n "checking for $DLL_NAME... " >&6; }
54382 54367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54383 54368 $as_echo "$MSVC_DLL" >&6; }
54384 54369 else
54385 54370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54386 54371 $as_echo "incorrect, ignoring" >&6; }
54387 54372 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54388 54373 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54389 54374 fi
54390 54375 fi
54391 54376
54392 54377 fi
54393 54378 fi
54394 54379
54395 54380 if test "x$MSVC_DLL" = x; then
54396 54381 # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54397 54382 # (This was the original behaviour; kept since it might turn something up)
54398 54383 if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54399 54384 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54400 54385 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54401 54386 | $GREP x64 | $HEAD --lines 1`
54402 54387 else
54403 54388 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54404 54389 | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54405 54390 if test "x$POSSIBLE_MSVC_DLL" = x; then
54406 54391 # We're grasping at straws now...
54407 54392 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54408 54393 | $HEAD --lines 1`
54409 54394 fi
54410 54395 fi
54411 54396
54412 54397
54413 54398 DLL_NAME="$DLL_NAME"
54414 54399 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54415 54400 METHOD="search of VCINSTALLDIR"
54416 54401 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54417 54402 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54418 54403 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54419 54404
54420 54405 # Need to check if the found msvcr is correct architecture
54421 54406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54422 54407 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54423 54408 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54424 54409 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54425 54410 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54426 54411 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54427 54412 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54428 54413 CORRECT_MSVCR_ARCH="PE32 executable"
54429 54414 else
54430 54415 CORRECT_MSVCR_ARCH="PE32+ executable"
54431 54416 fi
54432 54417 else
54433 54418 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54434 54419 CORRECT_MSVCR_ARCH=386
54435 54420 else
54436 54421 CORRECT_MSVCR_ARCH=x86-64
54437 54422 fi
54438 54423 fi
54439 54424 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54440 54425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54441 54426 $as_echo "ok" >&6; }
54442 54427 MSVC_DLL="$POSSIBLE_MSVC_DLL"
54443 54428
54444 54429 # Only process if variable expands to non-empty
54445 54430
54446 54431 if test "x$MSVC_DLL" != x; then
54447 54432 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54448 54433
54449 54434 # Input might be given as Windows format, start by converting to
54450 54435 # unix format.
54451 54436 path="$MSVC_DLL"
54452 54437 new_path=`$CYGPATH -u "$path"`
54453 54438
54454 54439 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54455 54440 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54456 54441 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54457 54442 # "foo.exe" is OK but "foo" is an error.
54458 54443 #
54459 54444 # This test is therefore slightly more accurate than "test -f" to check for file precense.
54460 54445 # It is also a way to make sure we got the proper file name for the real test later on.
54461 54446 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54462 54447 if test "x$test_shortpath" = x; then
54463 54448 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54464 54449 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54465 54450 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54466 54451 fi
54467 54452
54468 54453 # Call helper function which possibly converts this using DOS-style short mode.
54469 54454 # If so, the updated path is stored in $new_path.
54470 54455
54471 54456 input_path="$new_path"
54472 54457 # Check if we need to convert this using DOS-style short mode. If the path
54473 54458 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54474 54459 # take no chances and rewrite it.
54475 54460 # Note: m4 eats our [], so we need to use [ and ] instead.
54476 54461 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54477 54462 if test "x$has_forbidden_chars" != x; then
54478 54463 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54479 54464 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54480 54465 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54481 54466 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54482 54467 # Going to short mode and back again did indeed matter. Since short mode is
54483 54468 # case insensitive, let's make it lowercase to improve readability.
54484 54469 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54485 54470 # Now convert it back to Unix-style (cygpath)
54486 54471 input_path=`$CYGPATH -u "$shortmode_path"`
54487 54472 new_path="$input_path"
54488 54473 fi
54489 54474 fi
54490 54475
54491 54476 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54492 54477 if test "x$test_cygdrive_prefix" = x; then
54493 54478 # As a simple fix, exclude /usr/bin since it's not a real path.
54494 54479 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54495 54480 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54496 54481 # a path prefixed by /cygdrive for fixpath to work.
54497 54482 new_path="$CYGWIN_ROOT_PATH$input_path"
54498 54483 fi
54499 54484 fi
54500 54485
54501 54486
54502 54487 if test "x$path" != "x$new_path"; then
54503 54488 MSVC_DLL="$new_path"
54504 54489 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54505 54490 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54506 54491 fi
54507 54492
54508 54493 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54509 54494
54510 54495 path="$MSVC_DLL"
54511 54496 has_colon=`$ECHO $path | $GREP ^.:`
54512 54497 new_path="$path"
54513 54498 if test "x$has_colon" = x; then
54514 54499 # Not in mixed or Windows style, start by that.
54515 54500 new_path=`cmd //c echo $path`
54516 54501 fi
54517 54502
54518 54503
54519 54504 input_path="$new_path"
54520 54505 # Check if we need to convert this using DOS-style short mode. If the path
54521 54506 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54522 54507 # take no chances and rewrite it.
54523 54508 # Note: m4 eats our [], so we need to use [ and ] instead.
54524 54509 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54525 54510 if test "x$has_forbidden_chars" != x; then
54526 54511 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54527 54512 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54528 54513 fi
54529 54514
54530 54515
54531 54516 windows_path="$new_path"
54532 54517 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54533 54518 unix_path=`$CYGPATH -u "$windows_path"`
54534 54519 new_path="$unix_path"
54535 54520 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54536 54521 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54537 54522 new_path="$unix_path"
54538 54523 fi
54539 54524
54540 54525 if test "x$path" != "x$new_path"; then
54541 54526 MSVC_DLL="$new_path"
54542 54527 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54543 54528 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54544 54529 fi
54545 54530
54546 54531 # Save the first 10 bytes of this path to the storage, so fixpath can work.
54547 54532 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54548 54533
54549 54534 else
54550 54535 # We're on a unix platform. Hooray! :)
54551 54536 path="$MSVC_DLL"
54552 54537 has_space=`$ECHO "$path" | $GREP " "`
54553 54538 if test "x$has_space" != x; then
54554 54539 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54555 54540 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54556 54541 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54557 54542 fi
54558 54543
54559 54544 # Use eval to expand a potential ~
54560 54545 eval path="$path"
54561 54546 if test ! -f "$path" && test ! -d "$path"; then
54562 54547 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54563 54548 fi
54564 54549
54565 54550 if test -d "$path"; then
54566 54551 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54567 54552 else
54568 54553 dir="`$DIRNAME "$path"`"
54569 54554 base="`$BASENAME "$path"`"
54570 54555 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54571 54556 fi
54572 54557 fi
54573 54558 fi
54574 54559
54575 54560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54576 54561 $as_echo_n "checking for $DLL_NAME... " >&6; }
54577 54562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54578 54563 $as_echo "$MSVC_DLL" >&6; }
54579 54564 else
54580 54565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54581 54566 $as_echo "incorrect, ignoring" >&6; }
54582 54567 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54583 54568 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54584 54569 fi
54585 54570 fi
54586 54571
54587 54572 fi
54588 54573 fi
54589 54574
54590 54575 if test "x$MSVC_DLL" = x; then
54591 54576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54592 54577 $as_echo_n "checking for $DLL_NAME... " >&6; }
54593 54578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54594 54579 $as_echo "no" >&6; }
54595 54580 as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54596 54581 fi
54597 54582
54598 54583 MSVCR_DLL="$MSVC_DLL"
54599 54584 fi
54600 54585
54601 54586
54602 54587
54603 54588 # Check whether --with-msvcp-dll was given.
54604 54589 if test "${with_msvcp_dll+set}" = set; then :
54605 54590 withval=$with_msvcp_dll;
54606 54591 fi
54607 54592
54608 54593
54609 54594 if test "x$MSVCP_NAME" != "x"; then
54610 54595 if test "x$with_msvcp_dll" != x; then
54611 54596 # If given explicitely by user, do not probe. If not present, fail directly.
54612 54597
54613 54598 DLL_NAME="$MSVCP_NAME"
54614 54599 POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54615 54600 METHOD="--with-msvcp-dll"
54616 54601 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54617 54602 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54618 54603 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54619 54604
54620 54605 # Need to check if the found msvcr is correct architecture
54621 54606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54622 54607 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54623 54608 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54624 54609 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54625 54610 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54626 54611 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54627 54612 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54628 54613 CORRECT_MSVCR_ARCH="PE32 executable"
54629 54614 else
54630 54615 CORRECT_MSVCR_ARCH="PE32+ executable"
54631 54616 fi
54632 54617 else
54633 54618 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54634 54619 CORRECT_MSVCR_ARCH=386
54635 54620 else
54636 54621 CORRECT_MSVCR_ARCH=x86-64
54637 54622 fi
54638 54623 fi
54639 54624 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54640 54625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54641 54626 $as_echo "ok" >&6; }
54642 54627 MSVC_DLL="$POSSIBLE_MSVC_DLL"
54643 54628
54644 54629 # Only process if variable expands to non-empty
54645 54630
54646 54631 if test "x$MSVC_DLL" != x; then
54647 54632 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54648 54633
54649 54634 # Input might be given as Windows format, start by converting to
54650 54635 # unix format.
54651 54636 path="$MSVC_DLL"
54652 54637 new_path=`$CYGPATH -u "$path"`
54653 54638
54654 54639 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54655 54640 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54656 54641 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54657 54642 # "foo.exe" is OK but "foo" is an error.
54658 54643 #
54659 54644 # This test is therefore slightly more accurate than "test -f" to check for file precense.
54660 54645 # It is also a way to make sure we got the proper file name for the real test later on.
54661 54646 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54662 54647 if test "x$test_shortpath" = x; then
54663 54648 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54664 54649 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54665 54650 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54666 54651 fi
54667 54652
54668 54653 # Call helper function which possibly converts this using DOS-style short mode.
54669 54654 # If so, the updated path is stored in $new_path.
54670 54655
54671 54656 input_path="$new_path"
54672 54657 # Check if we need to convert this using DOS-style short mode. If the path
54673 54658 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54674 54659 # take no chances and rewrite it.
54675 54660 # Note: m4 eats our [], so we need to use [ and ] instead.
54676 54661 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54677 54662 if test "x$has_forbidden_chars" != x; then
54678 54663 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54679 54664 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54680 54665 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54681 54666 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54682 54667 # Going to short mode and back again did indeed matter. Since short mode is
54683 54668 # case insensitive, let's make it lowercase to improve readability.
54684 54669 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54685 54670 # Now convert it back to Unix-style (cygpath)
54686 54671 input_path=`$CYGPATH -u "$shortmode_path"`
54687 54672 new_path="$input_path"
54688 54673 fi
54689 54674 fi
54690 54675
54691 54676 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54692 54677 if test "x$test_cygdrive_prefix" = x; then
54693 54678 # As a simple fix, exclude /usr/bin since it's not a real path.
54694 54679 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54695 54680 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54696 54681 # a path prefixed by /cygdrive for fixpath to work.
54697 54682 new_path="$CYGWIN_ROOT_PATH$input_path"
54698 54683 fi
54699 54684 fi
54700 54685
54701 54686
54702 54687 if test "x$path" != "x$new_path"; then
54703 54688 MSVC_DLL="$new_path"
54704 54689 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54705 54690 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54706 54691 fi
54707 54692
54708 54693 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54709 54694
54710 54695 path="$MSVC_DLL"
54711 54696 has_colon=`$ECHO $path | $GREP ^.:`
54712 54697 new_path="$path"
54713 54698 if test "x$has_colon" = x; then
54714 54699 # Not in mixed or Windows style, start by that.
54715 54700 new_path=`cmd //c echo $path`
54716 54701 fi
54717 54702
54718 54703
54719 54704 input_path="$new_path"
54720 54705 # Check if we need to convert this using DOS-style short mode. If the path
54721 54706 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54722 54707 # take no chances and rewrite it.
54723 54708 # Note: m4 eats our [], so we need to use [ and ] instead.
54724 54709 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54725 54710 if test "x$has_forbidden_chars" != x; then
54726 54711 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54727 54712 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54728 54713 fi
54729 54714
54730 54715
54731 54716 windows_path="$new_path"
54732 54717 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54733 54718 unix_path=`$CYGPATH -u "$windows_path"`
54734 54719 new_path="$unix_path"
54735 54720 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54736 54721 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54737 54722 new_path="$unix_path"
54738 54723 fi
54739 54724
54740 54725 if test "x$path" != "x$new_path"; then
54741 54726 MSVC_DLL="$new_path"
54742 54727 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54743 54728 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54744 54729 fi
54745 54730
54746 54731 # Save the first 10 bytes of this path to the storage, so fixpath can work.
54747 54732 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54748 54733
54749 54734 else
54750 54735 # We're on a unix platform. Hooray! :)
54751 54736 path="$MSVC_DLL"
54752 54737 has_space=`$ECHO "$path" | $GREP " "`
54753 54738 if test "x$has_space" != x; then
54754 54739 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54755 54740 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54756 54741 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54757 54742 fi
54758 54743
54759 54744 # Use eval to expand a potential ~
54760 54745 eval path="$path"
54761 54746 if test ! -f "$path" && test ! -d "$path"; then
54762 54747 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54763 54748 fi
54764 54749
54765 54750 if test -d "$path"; then
54766 54751 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54767 54752 else
54768 54753 dir="`$DIRNAME "$path"`"
54769 54754 base="`$BASENAME "$path"`"
54770 54755 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54771 54756 fi
54772 54757 fi
54773 54758 fi
54774 54759
54775 54760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54776 54761 $as_echo_n "checking for $DLL_NAME... " >&6; }
54777 54762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54778 54763 $as_echo "$MSVC_DLL" >&6; }
54779 54764 else
54780 54765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54781 54766 $as_echo "incorrect, ignoring" >&6; }
54782 54767 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54783 54768 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54784 54769 fi
54785 54770 fi
54786 54771
54787 54772 if test "x$MSVC_DLL" = x; then
54788 54773 as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54789 54774 fi
54790 54775 MSVCP_DLL="$MSVC_DLL"
54791 54776 elif test "x$DEVKIT_MSVCP_DLL" != x; then
54792 54777
54793 54778 DLL_NAME="$MSVCP_NAME"
54794 54779 POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54795 54780 METHOD="devkit"
54796 54781 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54797 54782 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54798 54783 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54799 54784
54800 54785 # Need to check if the found msvcr is correct architecture
54801 54786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54802 54787 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54803 54788 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54804 54789 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54805 54790 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54806 54791 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54807 54792 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54808 54793 CORRECT_MSVCR_ARCH="PE32 executable"
54809 54794 else
54810 54795 CORRECT_MSVCR_ARCH="PE32+ executable"
54811 54796 fi
54812 54797 else
54813 54798 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54814 54799 CORRECT_MSVCR_ARCH=386
54815 54800 else
54816 54801 CORRECT_MSVCR_ARCH=x86-64
54817 54802 fi
54818 54803 fi
54819 54804 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54820 54805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54821 54806 $as_echo "ok" >&6; }
54822 54807 MSVC_DLL="$POSSIBLE_MSVC_DLL"
54823 54808
54824 54809 # Only process if variable expands to non-empty
54825 54810
54826 54811 if test "x$MSVC_DLL" != x; then
54827 54812 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54828 54813
54829 54814 # Input might be given as Windows format, start by converting to
54830 54815 # unix format.
54831 54816 path="$MSVC_DLL"
54832 54817 new_path=`$CYGPATH -u "$path"`
54833 54818
54834 54819 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54835 54820 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54836 54821 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54837 54822 # "foo.exe" is OK but "foo" is an error.
54838 54823 #
54839 54824 # This test is therefore slightly more accurate than "test -f" to check for file precense.
54840 54825 # It is also a way to make sure we got the proper file name for the real test later on.
54841 54826 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54842 54827 if test "x$test_shortpath" = x; then
54843 54828 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54844 54829 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54845 54830 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54846 54831 fi
54847 54832
54848 54833 # Call helper function which possibly converts this using DOS-style short mode.
54849 54834 # If so, the updated path is stored in $new_path.
54850 54835
54851 54836 input_path="$new_path"
54852 54837 # Check if we need to convert this using DOS-style short mode. If the path
54853 54838 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54854 54839 # take no chances and rewrite it.
54855 54840 # Note: m4 eats our [], so we need to use [ and ] instead.
54856 54841 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54857 54842 if test "x$has_forbidden_chars" != x; then
54858 54843 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54859 54844 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54860 54845 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54861 54846 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54862 54847 # Going to short mode and back again did indeed matter. Since short mode is
54863 54848 # case insensitive, let's make it lowercase to improve readability.
54864 54849 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54865 54850 # Now convert it back to Unix-style (cygpath)
54866 54851 input_path=`$CYGPATH -u "$shortmode_path"`
54867 54852 new_path="$input_path"
54868 54853 fi
54869 54854 fi
54870 54855
54871 54856 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54872 54857 if test "x$test_cygdrive_prefix" = x; then
54873 54858 # As a simple fix, exclude /usr/bin since it's not a real path.
54874 54859 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54875 54860 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54876 54861 # a path prefixed by /cygdrive for fixpath to work.
54877 54862 new_path="$CYGWIN_ROOT_PATH$input_path"
54878 54863 fi
54879 54864 fi
54880 54865
54881 54866
54882 54867 if test "x$path" != "x$new_path"; then
54883 54868 MSVC_DLL="$new_path"
54884 54869 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54885 54870 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54886 54871 fi
54887 54872
54888 54873 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54889 54874
54890 54875 path="$MSVC_DLL"
54891 54876 has_colon=`$ECHO $path | $GREP ^.:`
54892 54877 new_path="$path"
54893 54878 if test "x$has_colon" = x; then
54894 54879 # Not in mixed or Windows style, start by that.
54895 54880 new_path=`cmd //c echo $path`
54896 54881 fi
54897 54882
54898 54883
54899 54884 input_path="$new_path"
54900 54885 # Check if we need to convert this using DOS-style short mode. If the path
54901 54886 # contains just simple characters, use it. Otherwise (spaces, weird characters),
54902 54887 # take no chances and rewrite it.
54903 54888 # Note: m4 eats our [], so we need to use [ and ] instead.
54904 54889 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54905 54890 if test "x$has_forbidden_chars" != x; then
54906 54891 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54907 54892 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54908 54893 fi
54909 54894
54910 54895
54911 54896 windows_path="$new_path"
54912 54897 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54913 54898 unix_path=`$CYGPATH -u "$windows_path"`
54914 54899 new_path="$unix_path"
54915 54900 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54916 54901 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54917 54902 new_path="$unix_path"
54918 54903 fi
54919 54904
54920 54905 if test "x$path" != "x$new_path"; then
54921 54906 MSVC_DLL="$new_path"
54922 54907 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54923 54908 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54924 54909 fi
54925 54910
54926 54911 # Save the first 10 bytes of this path to the storage, so fixpath can work.
54927 54912 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54928 54913
54929 54914 else
54930 54915 # We're on a unix platform. Hooray! :)
54931 54916 path="$MSVC_DLL"
54932 54917 has_space=`$ECHO "$path" | $GREP " "`
54933 54918 if test "x$has_space" != x; then
54934 54919 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54935 54920 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54936 54921 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54937 54922 fi
54938 54923
54939 54924 # Use eval to expand a potential ~
54940 54925 eval path="$path"
54941 54926 if test ! -f "$path" && test ! -d "$path"; then
54942 54927 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54943 54928 fi
54944 54929
54945 54930 if test -d "$path"; then
54946 54931 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54947 54932 else
54948 54933 dir="`$DIRNAME "$path"`"
54949 54934 base="`$BASENAME "$path"`"
54950 54935 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54951 54936 fi
54952 54937 fi
54953 54938 fi
54954 54939
54955 54940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54956 54941 $as_echo_n "checking for $DLL_NAME... " >&6; }
54957 54942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54958 54943 $as_echo "$MSVC_DLL" >&6; }
54959 54944 else
54960 54945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54961 54946 $as_echo "incorrect, ignoring" >&6; }
54962 54947 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54963 54948 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54964 54949 fi
54965 54950 fi
54966 54951
54967 54952 if test "x$MSVC_DLL" = x; then
54968 54953 as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54969 54954 fi
54970 54955 MSVCP_DLL="$MSVC_DLL"
54971 54956 else
54972 54957
54973 54958 DLL_NAME="${MSVCP_NAME}"
54974 54959 MSVC_DLL=
54975 54960
54976 54961 if test "x$MSVC_DLL" = x; then
54977 54962 # Probe: Using well-known location from Visual Studio 10.0
54978 54963 if test "x$VCINSTALLDIR" != x; then
54979 54964 CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54980 54965
54981 54966 windows_path="$CYGWIN_VC_INSTALL_DIR"
54982 54967 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54983 54968 unix_path=`$CYGPATH -u "$windows_path"`
54984 54969 CYGWIN_VC_INSTALL_DIR="$unix_path"
54985 54970 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54986 54971 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54987 54972 CYGWIN_VC_INSTALL_DIR="$unix_path"
54988 54973 fi
54989 54974
54990 54975 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54991 54976 POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54992 54977 else
54993 54978 POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54994 54979 fi
54995 54980 $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54996 54981
54997 54982 DLL_NAME="$DLL_NAME"
54998 54983 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54999 54984 METHOD="well-known location in VCINSTALLDIR"
55000 54985 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55001 54986 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55002 54987 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55003 54988
55004 54989 # Need to check if the found msvcr is correct architecture
55005 54990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55006 54991 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55007 54992 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55008 54993 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55009 54994 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55010 54995 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55011 54996 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55012 54997 CORRECT_MSVCR_ARCH="PE32 executable"
55013 54998 else
55014 54999 CORRECT_MSVCR_ARCH="PE32+ executable"
55015 55000 fi
55016 55001 else
55017 55002 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55018 55003 CORRECT_MSVCR_ARCH=386
55019 55004 else
55020 55005 CORRECT_MSVCR_ARCH=x86-64
55021 55006 fi
55022 55007 fi
55023 55008 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55024 55009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55025 55010 $as_echo "ok" >&6; }
55026 55011 MSVC_DLL="$POSSIBLE_MSVC_DLL"
55027 55012
55028 55013 # Only process if variable expands to non-empty
55029 55014
55030 55015 if test "x$MSVC_DLL" != x; then
55031 55016 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55032 55017
55033 55018 # Input might be given as Windows format, start by converting to
55034 55019 # unix format.
55035 55020 path="$MSVC_DLL"
55036 55021 new_path=`$CYGPATH -u "$path"`
55037 55022
55038 55023 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55039 55024 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55040 55025 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55041 55026 # "foo.exe" is OK but "foo" is an error.
55042 55027 #
55043 55028 # This test is therefore slightly more accurate than "test -f" to check for file precense.
55044 55029 # It is also a way to make sure we got the proper file name for the real test later on.
55045 55030 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55046 55031 if test "x$test_shortpath" = x; then
55047 55032 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55048 55033 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55049 55034 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55050 55035 fi
55051 55036
55052 55037 # Call helper function which possibly converts this using DOS-style short mode.
55053 55038 # If so, the updated path is stored in $new_path.
55054 55039
55055 55040 input_path="$new_path"
55056 55041 # Check if we need to convert this using DOS-style short mode. If the path
55057 55042 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55058 55043 # take no chances and rewrite it.
55059 55044 # Note: m4 eats our [], so we need to use [ and ] instead.
55060 55045 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55061 55046 if test "x$has_forbidden_chars" != x; then
55062 55047 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55063 55048 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55064 55049 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55065 55050 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55066 55051 # Going to short mode and back again did indeed matter. Since short mode is
55067 55052 # case insensitive, let's make it lowercase to improve readability.
55068 55053 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55069 55054 # Now convert it back to Unix-style (cygpath)
55070 55055 input_path=`$CYGPATH -u "$shortmode_path"`
55071 55056 new_path="$input_path"
55072 55057 fi
55073 55058 fi
55074 55059
55075 55060 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55076 55061 if test "x$test_cygdrive_prefix" = x; then
55077 55062 # As a simple fix, exclude /usr/bin since it's not a real path.
55078 55063 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55079 55064 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55080 55065 # a path prefixed by /cygdrive for fixpath to work.
55081 55066 new_path="$CYGWIN_ROOT_PATH$input_path"
55082 55067 fi
55083 55068 fi
55084 55069
55085 55070
55086 55071 if test "x$path" != "x$new_path"; then
55087 55072 MSVC_DLL="$new_path"
55088 55073 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55089 55074 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55090 55075 fi
55091 55076
55092 55077 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55093 55078
55094 55079 path="$MSVC_DLL"
55095 55080 has_colon=`$ECHO $path | $GREP ^.:`
55096 55081 new_path="$path"
55097 55082 if test "x$has_colon" = x; then
55098 55083 # Not in mixed or Windows style, start by that.
55099 55084 new_path=`cmd //c echo $path`
55100 55085 fi
55101 55086
55102 55087
55103 55088 input_path="$new_path"
55104 55089 # Check if we need to convert this using DOS-style short mode. If the path
55105 55090 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55106 55091 # take no chances and rewrite it.
55107 55092 # Note: m4 eats our [], so we need to use [ and ] instead.
55108 55093 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55109 55094 if test "x$has_forbidden_chars" != x; then
55110 55095 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55111 55096 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55112 55097 fi
55113 55098
55114 55099
55115 55100 windows_path="$new_path"
55116 55101 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55117 55102 unix_path=`$CYGPATH -u "$windows_path"`
55118 55103 new_path="$unix_path"
55119 55104 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55120 55105 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55121 55106 new_path="$unix_path"
55122 55107 fi
55123 55108
55124 55109 if test "x$path" != "x$new_path"; then
55125 55110 MSVC_DLL="$new_path"
55126 55111 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55127 55112 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55128 55113 fi
55129 55114
55130 55115 # Save the first 10 bytes of this path to the storage, so fixpath can work.
55131 55116 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55132 55117
55133 55118 else
55134 55119 # We're on a unix platform. Hooray! :)
55135 55120 path="$MSVC_DLL"
55136 55121 has_space=`$ECHO "$path" | $GREP " "`
55137 55122 if test "x$has_space" != x; then
55138 55123 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55139 55124 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55140 55125 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55141 55126 fi
55142 55127
55143 55128 # Use eval to expand a potential ~
55144 55129 eval path="$path"
55145 55130 if test ! -f "$path" && test ! -d "$path"; then
55146 55131 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55147 55132 fi
55148 55133
55149 55134 if test -d "$path"; then
55150 55135 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55151 55136 else
55152 55137 dir="`$DIRNAME "$path"`"
55153 55138 base="`$BASENAME "$path"`"
55154 55139 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55155 55140 fi
55156 55141 fi
55157 55142 fi
55158 55143
55159 55144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55160 55145 $as_echo_n "checking for $DLL_NAME... " >&6; }
55161 55146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55162 55147 $as_echo "$MSVC_DLL" >&6; }
55163 55148 else
55164 55149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55165 55150 $as_echo "incorrect, ignoring" >&6; }
55166 55151 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55167 55152 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55168 55153 fi
55169 55154 fi
55170 55155
55171 55156 fi
55172 55157 fi
55173 55158
55174 55159 if test "x$MSVC_DLL" = x; then
55175 55160 # Probe: Check in the Boot JDK directory.
55176 55161 POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55177 55162
55178 55163 DLL_NAME="$DLL_NAME"
55179 55164 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55180 55165 METHOD="well-known location in Boot JDK"
55181 55166 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55182 55167 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55183 55168 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55184 55169
55185 55170 # Need to check if the found msvcr is correct architecture
55186 55171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55187 55172 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55188 55173 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55189 55174 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55190 55175 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55191 55176 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55192 55177 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55193 55178 CORRECT_MSVCR_ARCH="PE32 executable"
55194 55179 else
55195 55180 CORRECT_MSVCR_ARCH="PE32+ executable"
55196 55181 fi
55197 55182 else
55198 55183 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55199 55184 CORRECT_MSVCR_ARCH=386
55200 55185 else
55201 55186 CORRECT_MSVCR_ARCH=x86-64
55202 55187 fi
55203 55188 fi
55204 55189 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55205 55190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55206 55191 $as_echo "ok" >&6; }
55207 55192 MSVC_DLL="$POSSIBLE_MSVC_DLL"
55208 55193
55209 55194 # Only process if variable expands to non-empty
55210 55195
55211 55196 if test "x$MSVC_DLL" != x; then
55212 55197 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55213 55198
55214 55199 # Input might be given as Windows format, start by converting to
55215 55200 # unix format.
55216 55201 path="$MSVC_DLL"
55217 55202 new_path=`$CYGPATH -u "$path"`
55218 55203
55219 55204 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55220 55205 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55221 55206 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55222 55207 # "foo.exe" is OK but "foo" is an error.
55223 55208 #
55224 55209 # This test is therefore slightly more accurate than "test -f" to check for file precense.
55225 55210 # It is also a way to make sure we got the proper file name for the real test later on.
55226 55211 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55227 55212 if test "x$test_shortpath" = x; then
55228 55213 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55229 55214 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55230 55215 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55231 55216 fi
55232 55217
55233 55218 # Call helper function which possibly converts this using DOS-style short mode.
55234 55219 # If so, the updated path is stored in $new_path.
55235 55220
55236 55221 input_path="$new_path"
55237 55222 # Check if we need to convert this using DOS-style short mode. If the path
55238 55223 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55239 55224 # take no chances and rewrite it.
55240 55225 # Note: m4 eats our [], so we need to use [ and ] instead.
55241 55226 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55242 55227 if test "x$has_forbidden_chars" != x; then
55243 55228 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55244 55229 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55245 55230 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55246 55231 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55247 55232 # Going to short mode and back again did indeed matter. Since short mode is
55248 55233 # case insensitive, let's make it lowercase to improve readability.
55249 55234 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55250 55235 # Now convert it back to Unix-style (cygpath)
55251 55236 input_path=`$CYGPATH -u "$shortmode_path"`
55252 55237 new_path="$input_path"
55253 55238 fi
55254 55239 fi
55255 55240
55256 55241 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55257 55242 if test "x$test_cygdrive_prefix" = x; then
55258 55243 # As a simple fix, exclude /usr/bin since it's not a real path.
55259 55244 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55260 55245 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55261 55246 # a path prefixed by /cygdrive for fixpath to work.
55262 55247 new_path="$CYGWIN_ROOT_PATH$input_path"
55263 55248 fi
55264 55249 fi
55265 55250
55266 55251
55267 55252 if test "x$path" != "x$new_path"; then
55268 55253 MSVC_DLL="$new_path"
55269 55254 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55270 55255 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55271 55256 fi
55272 55257
55273 55258 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55274 55259
55275 55260 path="$MSVC_DLL"
55276 55261 has_colon=`$ECHO $path | $GREP ^.:`
55277 55262 new_path="$path"
55278 55263 if test "x$has_colon" = x; then
55279 55264 # Not in mixed or Windows style, start by that.
55280 55265 new_path=`cmd //c echo $path`
55281 55266 fi
55282 55267
55283 55268
55284 55269 input_path="$new_path"
55285 55270 # Check if we need to convert this using DOS-style short mode. If the path
55286 55271 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55287 55272 # take no chances and rewrite it.
55288 55273 # Note: m4 eats our [], so we need to use [ and ] instead.
55289 55274 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55290 55275 if test "x$has_forbidden_chars" != x; then
55291 55276 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55292 55277 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55293 55278 fi
55294 55279
55295 55280
55296 55281 windows_path="$new_path"
55297 55282 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55298 55283 unix_path=`$CYGPATH -u "$windows_path"`
55299 55284 new_path="$unix_path"
55300 55285 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55301 55286 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55302 55287 new_path="$unix_path"
55303 55288 fi
55304 55289
55305 55290 if test "x$path" != "x$new_path"; then
55306 55291 MSVC_DLL="$new_path"
55307 55292 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55308 55293 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55309 55294 fi
55310 55295
55311 55296 # Save the first 10 bytes of this path to the storage, so fixpath can work.
55312 55297 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55313 55298
55314 55299 else
55315 55300 # We're on a unix platform. Hooray! :)
55316 55301 path="$MSVC_DLL"
55317 55302 has_space=`$ECHO "$path" | $GREP " "`
55318 55303 if test "x$has_space" != x; then
55319 55304 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55320 55305 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55321 55306 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55322 55307 fi
55323 55308
55324 55309 # Use eval to expand a potential ~
55325 55310 eval path="$path"
55326 55311 if test ! -f "$path" && test ! -d "$path"; then
55327 55312 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55328 55313 fi
55329 55314
55330 55315 if test -d "$path"; then
55331 55316 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55332 55317 else
55333 55318 dir="`$DIRNAME "$path"`"
55334 55319 base="`$BASENAME "$path"`"
55335 55320 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55336 55321 fi
55337 55322 fi
55338 55323 fi
55339 55324
55340 55325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55341 55326 $as_echo_n "checking for $DLL_NAME... " >&6; }
55342 55327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55343 55328 $as_echo "$MSVC_DLL" >&6; }
55344 55329 else
55345 55330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55346 55331 $as_echo "incorrect, ignoring" >&6; }
55347 55332 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55348 55333 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55349 55334 fi
55350 55335 fi
55351 55336
55352 55337 fi
55353 55338
55354 55339 if test "x$MSVC_DLL" = x; then
55355 55340 # Probe: Look in the Windows system32 directory
55356 55341 CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55357 55342
55358 55343 windows_path="$CYGWIN_SYSTEMROOT"
55359 55344 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55360 55345 unix_path=`$CYGPATH -u "$windows_path"`
55361 55346 CYGWIN_SYSTEMROOT="$unix_path"
55362 55347 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55363 55348 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55364 55349 CYGWIN_SYSTEMROOT="$unix_path"
55365 55350 fi
55366 55351
55367 55352 POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55368 55353
55369 55354 DLL_NAME="$DLL_NAME"
55370 55355 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55371 55356 METHOD="well-known location in SYSTEMROOT"
55372 55357 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55373 55358 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55374 55359 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55375 55360
55376 55361 # Need to check if the found msvcr is correct architecture
55377 55362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55378 55363 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55379 55364 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55380 55365 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55381 55366 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55382 55367 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55383 55368 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55384 55369 CORRECT_MSVCR_ARCH="PE32 executable"
55385 55370 else
55386 55371 CORRECT_MSVCR_ARCH="PE32+ executable"
55387 55372 fi
55388 55373 else
55389 55374 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55390 55375 CORRECT_MSVCR_ARCH=386
55391 55376 else
55392 55377 CORRECT_MSVCR_ARCH=x86-64
55393 55378 fi
55394 55379 fi
55395 55380 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55396 55381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55397 55382 $as_echo "ok" >&6; }
55398 55383 MSVC_DLL="$POSSIBLE_MSVC_DLL"
55399 55384
55400 55385 # Only process if variable expands to non-empty
55401 55386
55402 55387 if test "x$MSVC_DLL" != x; then
55403 55388 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55404 55389
55405 55390 # Input might be given as Windows format, start by converting to
55406 55391 # unix format.
55407 55392 path="$MSVC_DLL"
55408 55393 new_path=`$CYGPATH -u "$path"`
55409 55394
55410 55395 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55411 55396 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55412 55397 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55413 55398 # "foo.exe" is OK but "foo" is an error.
55414 55399 #
55415 55400 # This test is therefore slightly more accurate than "test -f" to check for file precense.
55416 55401 # It is also a way to make sure we got the proper file name for the real test later on.
55417 55402 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55418 55403 if test "x$test_shortpath" = x; then
55419 55404 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55420 55405 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55421 55406 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55422 55407 fi
55423 55408
55424 55409 # Call helper function which possibly converts this using DOS-style short mode.
55425 55410 # If so, the updated path is stored in $new_path.
55426 55411
55427 55412 input_path="$new_path"
55428 55413 # Check if we need to convert this using DOS-style short mode. If the path
55429 55414 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55430 55415 # take no chances and rewrite it.
55431 55416 # Note: m4 eats our [], so we need to use [ and ] instead.
55432 55417 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55433 55418 if test "x$has_forbidden_chars" != x; then
55434 55419 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55435 55420 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55436 55421 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55437 55422 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55438 55423 # Going to short mode and back again did indeed matter. Since short mode is
55439 55424 # case insensitive, let's make it lowercase to improve readability.
55440 55425 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55441 55426 # Now convert it back to Unix-style (cygpath)
55442 55427 input_path=`$CYGPATH -u "$shortmode_path"`
55443 55428 new_path="$input_path"
55444 55429 fi
55445 55430 fi
55446 55431
55447 55432 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55448 55433 if test "x$test_cygdrive_prefix" = x; then
55449 55434 # As a simple fix, exclude /usr/bin since it's not a real path.
55450 55435 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55451 55436 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55452 55437 # a path prefixed by /cygdrive for fixpath to work.
55453 55438 new_path="$CYGWIN_ROOT_PATH$input_path"
55454 55439 fi
55455 55440 fi
55456 55441
55457 55442
55458 55443 if test "x$path" != "x$new_path"; then
55459 55444 MSVC_DLL="$new_path"
55460 55445 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55461 55446 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55462 55447 fi
55463 55448
55464 55449 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55465 55450
55466 55451 path="$MSVC_DLL"
55467 55452 has_colon=`$ECHO $path | $GREP ^.:`
55468 55453 new_path="$path"
55469 55454 if test "x$has_colon" = x; then
55470 55455 # Not in mixed or Windows style, start by that.
55471 55456 new_path=`cmd //c echo $path`
55472 55457 fi
55473 55458
55474 55459
55475 55460 input_path="$new_path"
55476 55461 # Check if we need to convert this using DOS-style short mode. If the path
55477 55462 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55478 55463 # take no chances and rewrite it.
55479 55464 # Note: m4 eats our [], so we need to use [ and ] instead.
55480 55465 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55481 55466 if test "x$has_forbidden_chars" != x; then
55482 55467 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55483 55468 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55484 55469 fi
55485 55470
55486 55471
55487 55472 windows_path="$new_path"
55488 55473 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55489 55474 unix_path=`$CYGPATH -u "$windows_path"`
55490 55475 new_path="$unix_path"
55491 55476 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55492 55477 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55493 55478 new_path="$unix_path"
55494 55479 fi
55495 55480
55496 55481 if test "x$path" != "x$new_path"; then
55497 55482 MSVC_DLL="$new_path"
55498 55483 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55499 55484 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55500 55485 fi
55501 55486
55502 55487 # Save the first 10 bytes of this path to the storage, so fixpath can work.
55503 55488 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55504 55489
55505 55490 else
55506 55491 # We're on a unix platform. Hooray! :)
55507 55492 path="$MSVC_DLL"
55508 55493 has_space=`$ECHO "$path" | $GREP " "`
55509 55494 if test "x$has_space" != x; then
55510 55495 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55511 55496 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55512 55497 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55513 55498 fi
55514 55499
55515 55500 # Use eval to expand a potential ~
55516 55501 eval path="$path"
55517 55502 if test ! -f "$path" && test ! -d "$path"; then
55518 55503 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55519 55504 fi
55520 55505
55521 55506 if test -d "$path"; then
55522 55507 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55523 55508 else
55524 55509 dir="`$DIRNAME "$path"`"
55525 55510 base="`$BASENAME "$path"`"
55526 55511 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55527 55512 fi
55528 55513 fi
55529 55514 fi
55530 55515
55531 55516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55532 55517 $as_echo_n "checking for $DLL_NAME... " >&6; }
55533 55518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55534 55519 $as_echo "$MSVC_DLL" >&6; }
55535 55520 else
55536 55521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55537 55522 $as_echo "incorrect, ignoring" >&6; }
55538 55523 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55539 55524 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55540 55525 fi
55541 55526 fi
55542 55527
55543 55528 fi
55544 55529
55545 55530 if test "x$MSVC_DLL" = x; then
55546 55531 # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55547 55532 if test "x$VS100COMNTOOLS" != x; then
55548 55533 CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55549 55534
55550 55535 windows_path="$CYGWIN_VS_TOOLS_DIR"
55551 55536 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55552 55537 unix_path=`$CYGPATH -u "$windows_path"`
55553 55538 CYGWIN_VS_TOOLS_DIR="$unix_path"
55554 55539 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55555 55540 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55556 55541 CYGWIN_VS_TOOLS_DIR="$unix_path"
55557 55542 fi
55558 55543
55559 55544 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55560 55545 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55561 55546 | $GREP -i /x64/ | $HEAD --lines 1`
55562 55547 else
55563 55548 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55564 55549 | $GREP -i /x86/ | $HEAD --lines 1`
55565 55550 fi
55566 55551
55567 55552 DLL_NAME="$DLL_NAME"
55568 55553 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55569 55554 METHOD="search of VS100COMNTOOLS"
55570 55555 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55571 55556 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55572 55557 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55573 55558
55574 55559 # Need to check if the found msvcr is correct architecture
55575 55560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55576 55561 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55577 55562 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55578 55563 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55579 55564 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55580 55565 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55581 55566 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55582 55567 CORRECT_MSVCR_ARCH="PE32 executable"
55583 55568 else
55584 55569 CORRECT_MSVCR_ARCH="PE32+ executable"
55585 55570 fi
55586 55571 else
55587 55572 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55588 55573 CORRECT_MSVCR_ARCH=386
55589 55574 else
55590 55575 CORRECT_MSVCR_ARCH=x86-64
55591 55576 fi
55592 55577 fi
55593 55578 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55594 55579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55595 55580 $as_echo "ok" >&6; }
55596 55581 MSVC_DLL="$POSSIBLE_MSVC_DLL"
55597 55582
55598 55583 # Only process if variable expands to non-empty
55599 55584
55600 55585 if test "x$MSVC_DLL" != x; then
55601 55586 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55602 55587
55603 55588 # Input might be given as Windows format, start by converting to
55604 55589 # unix format.
55605 55590 path="$MSVC_DLL"
55606 55591 new_path=`$CYGPATH -u "$path"`
55607 55592
55608 55593 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55609 55594 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55610 55595 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55611 55596 # "foo.exe" is OK but "foo" is an error.
55612 55597 #
55613 55598 # This test is therefore slightly more accurate than "test -f" to check for file precense.
55614 55599 # It is also a way to make sure we got the proper file name for the real test later on.
55615 55600 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55616 55601 if test "x$test_shortpath" = x; then
55617 55602 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55618 55603 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55619 55604 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55620 55605 fi
55621 55606
55622 55607 # Call helper function which possibly converts this using DOS-style short mode.
55623 55608 # If so, the updated path is stored in $new_path.
55624 55609
55625 55610 input_path="$new_path"
55626 55611 # Check if we need to convert this using DOS-style short mode. If the path
55627 55612 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55628 55613 # take no chances and rewrite it.
55629 55614 # Note: m4 eats our [], so we need to use [ and ] instead.
55630 55615 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55631 55616 if test "x$has_forbidden_chars" != x; then
55632 55617 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55633 55618 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55634 55619 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55635 55620 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55636 55621 # Going to short mode and back again did indeed matter. Since short mode is
55637 55622 # case insensitive, let's make it lowercase to improve readability.
55638 55623 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55639 55624 # Now convert it back to Unix-style (cygpath)
55640 55625 input_path=`$CYGPATH -u "$shortmode_path"`
55641 55626 new_path="$input_path"
55642 55627 fi
55643 55628 fi
55644 55629
55645 55630 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55646 55631 if test "x$test_cygdrive_prefix" = x; then
55647 55632 # As a simple fix, exclude /usr/bin since it's not a real path.
55648 55633 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55649 55634 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55650 55635 # a path prefixed by /cygdrive for fixpath to work.
55651 55636 new_path="$CYGWIN_ROOT_PATH$input_path"
55652 55637 fi
55653 55638 fi
55654 55639
55655 55640
55656 55641 if test "x$path" != "x$new_path"; then
55657 55642 MSVC_DLL="$new_path"
55658 55643 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55659 55644 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55660 55645 fi
55661 55646
55662 55647 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55663 55648
55664 55649 path="$MSVC_DLL"
55665 55650 has_colon=`$ECHO $path | $GREP ^.:`
55666 55651 new_path="$path"
55667 55652 if test "x$has_colon" = x; then
55668 55653 # Not in mixed or Windows style, start by that.
55669 55654 new_path=`cmd //c echo $path`
55670 55655 fi
55671 55656
55672 55657
55673 55658 input_path="$new_path"
55674 55659 # Check if we need to convert this using DOS-style short mode. If the path
55675 55660 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55676 55661 # take no chances and rewrite it.
55677 55662 # Note: m4 eats our [], so we need to use [ and ] instead.
55678 55663 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55679 55664 if test "x$has_forbidden_chars" != x; then
55680 55665 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55681 55666 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55682 55667 fi
55683 55668
55684 55669
55685 55670 windows_path="$new_path"
55686 55671 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55687 55672 unix_path=`$CYGPATH -u "$windows_path"`
55688 55673 new_path="$unix_path"
55689 55674 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55690 55675 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55691 55676 new_path="$unix_path"
55692 55677 fi
55693 55678
55694 55679 if test "x$path" != "x$new_path"; then
55695 55680 MSVC_DLL="$new_path"
55696 55681 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55697 55682 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55698 55683 fi
55699 55684
55700 55685 # Save the first 10 bytes of this path to the storage, so fixpath can work.
55701 55686 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55702 55687
55703 55688 else
55704 55689 # We're on a unix platform. Hooray! :)
55705 55690 path="$MSVC_DLL"
55706 55691 has_space=`$ECHO "$path" | $GREP " "`
55707 55692 if test "x$has_space" != x; then
55708 55693 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55709 55694 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55710 55695 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55711 55696 fi
55712 55697
55713 55698 # Use eval to expand a potential ~
55714 55699 eval path="$path"
55715 55700 if test ! -f "$path" && test ! -d "$path"; then
55716 55701 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55717 55702 fi
55718 55703
55719 55704 if test -d "$path"; then
55720 55705 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55721 55706 else
55722 55707 dir="`$DIRNAME "$path"`"
55723 55708 base="`$BASENAME "$path"`"
55724 55709 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55725 55710 fi
55726 55711 fi
55727 55712 fi
55728 55713
55729 55714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55730 55715 $as_echo_n "checking for $DLL_NAME... " >&6; }
55731 55716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55732 55717 $as_echo "$MSVC_DLL" >&6; }
55733 55718 else
55734 55719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55735 55720 $as_echo "incorrect, ignoring" >&6; }
55736 55721 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55737 55722 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55738 55723 fi
55739 55724 fi
55740 55725
55741 55726 fi
55742 55727 fi
55743 55728
55744 55729 if test "x$MSVC_DLL" = x; then
55745 55730 # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55746 55731 # (This was the original behaviour; kept since it might turn something up)
55747 55732 if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55748 55733 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55749 55734 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55750 55735 | $GREP x64 | $HEAD --lines 1`
55751 55736 else
55752 55737 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55753 55738 | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55754 55739 if test "x$POSSIBLE_MSVC_DLL" = x; then
55755 55740 # We're grasping at straws now...
55756 55741 POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55757 55742 | $HEAD --lines 1`
55758 55743 fi
55759 55744 fi
55760 55745
55761 55746
55762 55747 DLL_NAME="$DLL_NAME"
55763 55748 POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55764 55749 METHOD="search of VCINSTALLDIR"
55765 55750 if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55766 55751 { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55767 55752 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55768 55753
55769 55754 # Need to check if the found msvcr is correct architecture
55770 55755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55771 55756 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55772 55757 MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55773 55758 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55774 55759 # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55775 55760 # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55776 55761 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55777 55762 CORRECT_MSVCR_ARCH="PE32 executable"
55778 55763 else
55779 55764 CORRECT_MSVCR_ARCH="PE32+ executable"
55780 55765 fi
55781 55766 else
55782 55767 if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55783 55768 CORRECT_MSVCR_ARCH=386
55784 55769 else
55785 55770 CORRECT_MSVCR_ARCH=x86-64
55786 55771 fi
55787 55772 fi
55788 55773 if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55789 55774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55790 55775 $as_echo "ok" >&6; }
55791 55776 MSVC_DLL="$POSSIBLE_MSVC_DLL"
55792 55777
55793 55778 # Only process if variable expands to non-empty
55794 55779
55795 55780 if test "x$MSVC_DLL" != x; then
55796 55781 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55797 55782
55798 55783 # Input might be given as Windows format, start by converting to
55799 55784 # unix format.
55800 55785 path="$MSVC_DLL"
55801 55786 new_path=`$CYGPATH -u "$path"`
55802 55787
55803 55788 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55804 55789 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55805 55790 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55806 55791 # "foo.exe" is OK but "foo" is an error.
55807 55792 #
55808 55793 # This test is therefore slightly more accurate than "test -f" to check for file precense.
55809 55794 # It is also a way to make sure we got the proper file name for the real test later on.
55810 55795 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55811 55796 if test "x$test_shortpath" = x; then
55812 55797 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55813 55798 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55814 55799 as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55815 55800 fi
55816 55801
55817 55802 # Call helper function which possibly converts this using DOS-style short mode.
55818 55803 # If so, the updated path is stored in $new_path.
55819 55804
55820 55805 input_path="$new_path"
55821 55806 # Check if we need to convert this using DOS-style short mode. If the path
55822 55807 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55823 55808 # take no chances and rewrite it.
55824 55809 # Note: m4 eats our [], so we need to use [ and ] instead.
55825 55810 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55826 55811 if test "x$has_forbidden_chars" != x; then
55827 55812 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55828 55813 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55829 55814 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55830 55815 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55831 55816 # Going to short mode and back again did indeed matter. Since short mode is
55832 55817 # case insensitive, let's make it lowercase to improve readability.
55833 55818 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55834 55819 # Now convert it back to Unix-style (cygpath)
55835 55820 input_path=`$CYGPATH -u "$shortmode_path"`
55836 55821 new_path="$input_path"
55837 55822 fi
55838 55823 fi
55839 55824
55840 55825 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55841 55826 if test "x$test_cygdrive_prefix" = x; then
55842 55827 # As a simple fix, exclude /usr/bin since it's not a real path.
55843 55828 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55844 55829 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55845 55830 # a path prefixed by /cygdrive for fixpath to work.
55846 55831 new_path="$CYGWIN_ROOT_PATH$input_path"
55847 55832 fi
55848 55833 fi
55849 55834
55850 55835
55851 55836 if test "x$path" != "x$new_path"; then
55852 55837 MSVC_DLL="$new_path"
55853 55838 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55854 55839 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55855 55840 fi
55856 55841
55857 55842 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55858 55843
55859 55844 path="$MSVC_DLL"
55860 55845 has_colon=`$ECHO $path | $GREP ^.:`
55861 55846 new_path="$path"
55862 55847 if test "x$has_colon" = x; then
55863 55848 # Not in mixed or Windows style, start by that.
55864 55849 new_path=`cmd //c echo $path`
55865 55850 fi
55866 55851
55867 55852
55868 55853 input_path="$new_path"
55869 55854 # Check if we need to convert this using DOS-style short mode. If the path
55870 55855 # contains just simple characters, use it. Otherwise (spaces, weird characters),
55871 55856 # take no chances and rewrite it.
55872 55857 # Note: m4 eats our [], so we need to use [ and ] instead.
55873 55858 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55874 55859 if test "x$has_forbidden_chars" != x; then
55875 55860 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55876 55861 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55877 55862 fi
55878 55863
55879 55864
55880 55865 windows_path="$new_path"
55881 55866 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55882 55867 unix_path=`$CYGPATH -u "$windows_path"`
55883 55868 new_path="$unix_path"
55884 55869 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55885 55870 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55886 55871 new_path="$unix_path"
55887 55872 fi
55888 55873
55889 55874 if test "x$path" != "x$new_path"; then
55890 55875 MSVC_DLL="$new_path"
55891 55876 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55892 55877 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55893 55878 fi
55894 55879
55895 55880 # Save the first 10 bytes of this path to the storage, so fixpath can work.
55896 55881 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55897 55882
55898 55883 else
55899 55884 # We're on a unix platform. Hooray! :)
55900 55885 path="$MSVC_DLL"
55901 55886 has_space=`$ECHO "$path" | $GREP " "`
55902 55887 if test "x$has_space" != x; then
55903 55888 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55904 55889 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55905 55890 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55906 55891 fi
55907 55892
55908 55893 # Use eval to expand a potential ~
55909 55894 eval path="$path"
55910 55895 if test ! -f "$path" && test ! -d "$path"; then
55911 55896 as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55912 55897 fi
55913 55898
55914 55899 if test -d "$path"; then
55915 55900 MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55916 55901 else
55917 55902 dir="`$DIRNAME "$path"`"
55918 55903 base="`$BASENAME "$path"`"
55919 55904 MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55920 55905 fi
55921 55906 fi
55922 55907 fi
55923 55908
55924 55909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55925 55910 $as_echo_n "checking for $DLL_NAME... " >&6; }
55926 55911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55927 55912 $as_echo "$MSVC_DLL" >&6; }
55928 55913 else
55929 55914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55930 55915 $as_echo "incorrect, ignoring" >&6; }
55931 55916 { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55932 55917 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55933 55918 fi
55934 55919 fi
55935 55920
55936 55921 fi
55937 55922 fi
55938 55923
55939 55924 if test "x$MSVC_DLL" = x; then
55940 55925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55941 55926 $as_echo_n "checking for $DLL_NAME... " >&6; }
55942 55927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55943 55928 $as_echo "no" >&6; }
55944 55929 as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55945 55930 fi
55946 55931
55947 55932 MSVCP_DLL="$MSVC_DLL"
55948 55933 fi
55949 55934
55950 55935 fi
55951 55936
55952 55937 fi
55953 55938
55954 55939
55955 55940 if test "x$NEEDS_LIB_X11" = xfalse; then
55956 55941 if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55957 55942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55958 55943 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55959 55944 fi
55960 55945 X_CFLAGS=
55961 55946 X_LIBS=
55962 55947 else
55963 55948
55964 55949 if test "x${with_x}" = xno; then
55965 55950 as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55966 55951 fi
55967 55952
55968 55953 if test "x${with_x}" != x && test "x${with_x}" != xyes; then
55969 55954 # The user has specified a X11 base directory. Use it for includes and
55970 55955 # libraries, unless explicitely overridden.
55971 55956 if test "x$x_includes" = xNONE; then
55972 55957 x_includes="${with_x}/include"
55973 55958 fi
55974 55959 if test "x$x_libraries" = xNONE; then
55975 55960 x_libraries="${with_x}/lib"
55976 55961 fi
55977 55962 else
55978 55963 # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55979 55964 # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55980 55965 # --x-libraries for the sysroot, if that seems to be correct.
55981 55966 if test "x$SYSROOT" != "x"; then
55982 55967 if test "x$x_includes" = xNONE; then
55983 55968 if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55984 55969 x_includes="$SYSROOT/usr/X11R6/include"
55985 55970 elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55986 55971 x_includes="$SYSROOT/usr/include"
55987 55972 fi
55988 55973 fi
55989 55974 if test "x$x_libraries" = xNONE; then
55990 55975 if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55991 55976 x_libraries="$SYSROOT/usr/X11R6/lib"
55992 55977 elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55993 55978 x_libraries="$SYSROOT/usr/lib64"
55994 55979 elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55995 55980 x_libraries="$SYSROOT/usr/lib"
55996 55981 fi
55997 55982 fi
55998 55983 fi
55999 55984 fi
56000 55985
56001 55986 # Now let autoconf do it's magic
56002 55987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56003 55988 $as_echo_n "checking for X... " >&6; }
56004 55989
56005 55990
56006 55991 # Check whether --with-x was given.
56007 55992 if test "${with_x+set}" = set; then :
56008 55993 withval=$with_x;
56009 55994 fi
56010 55995
56011 55996 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56012 55997 if test "x$with_x" = xno; then
56013 55998 # The user explicitly disabled X.
56014 55999 have_x=disabled
56015 56000 else
56016 56001 case $x_includes,$x_libraries in #(
56017 56002 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56018 56003 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56019 56004 $as_echo_n "(cached) " >&6
56020 56005 else
56021 56006 # One or both of the vars are not set, and there is no cached value.
56022 56007 ac_x_includes=no ac_x_libraries=no
56023 56008 rm -f -r conftest.dir
56024 56009 if mkdir conftest.dir; then
56025 56010 cd conftest.dir
56026 56011 cat >Imakefile <<'_ACEOF'
56027 56012 incroot:
56028 56013 @echo incroot='${INCROOT}'
56029 56014 usrlibdir:
56030 56015 @echo usrlibdir='${USRLIBDIR}'
56031 56016 libdir:
56032 56017 @echo libdir='${LIBDIR}'
56033 56018 _ACEOF
56034 56019 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56035 56020 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56036 56021 for ac_var in incroot usrlibdir libdir; do
56037 56022 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56038 56023 done
56039 56024 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56040 56025 for ac_extension in a so sl dylib la dll; do
56041 56026 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56042 56027 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56043 56028 ac_im_usrlibdir=$ac_im_libdir; break
56044 56029 fi
56045 56030 done
56046 56031 # Screen out bogus values from the imake configuration. They are
56047 56032 # bogus both because they are the default anyway, and because
56048 56033 # using them would break gcc on systems where it needs fixed includes.
56049 56034 case $ac_im_incroot in
56050 56035 /usr/include) ac_x_includes= ;;
56051 56036 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56052 56037 esac
56053 56038 case $ac_im_usrlibdir in
56054 56039 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
56055 56040 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56056 56041 esac
56057 56042 fi
56058 56043 cd ..
56059 56044 rm -f -r conftest.dir
56060 56045 fi
56061 56046
56062 56047 # Standard set of common directories for X headers.
56063 56048 # Check X11 before X11Rn because it is often a symlink to the current release.
56064 56049 ac_x_header_dirs='
56065 56050 /usr/X11/include
56066 56051 /usr/X11R7/include
56067 56052 /usr/X11R6/include
56068 56053 /usr/X11R5/include
56069 56054 /usr/X11R4/include
56070 56055
56071 56056 /usr/include/X11
56072 56057 /usr/include/X11R7
56073 56058 /usr/include/X11R6
56074 56059 /usr/include/X11R5
56075 56060 /usr/include/X11R4
56076 56061
56077 56062 /usr/local/X11/include
56078 56063 /usr/local/X11R7/include
56079 56064 /usr/local/X11R6/include
56080 56065 /usr/local/X11R5/include
56081 56066 /usr/local/X11R4/include
56082 56067
56083 56068 /usr/local/include/X11
56084 56069 /usr/local/include/X11R7
56085 56070 /usr/local/include/X11R6
56086 56071 /usr/local/include/X11R5
56087 56072 /usr/local/include/X11R4
56088 56073
56089 56074 /usr/X386/include
56090 56075 /usr/x386/include
56091 56076 /usr/XFree86/include/X11
56092 56077
56093 56078 /usr/include
56094 56079 /usr/local/include
56095 56080 /usr/unsupported/include
56096 56081 /usr/athena/include
56097 56082 /usr/local/x11r5/include
56098 56083 /usr/lpp/Xamples/include
56099 56084
56100 56085 /usr/openwin/include
56101 56086 /usr/openwin/share/include'
56102 56087
56103 56088 if test "$ac_x_includes" = no; then
56104 56089 # Guess where to find include files, by looking for Xlib.h.
56105 56090 # First, try using that file with no special directory specified.
56106 56091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56107 56092 /* end confdefs.h. */
56108 56093 #include <X11/Xlib.h>
56109 56094 _ACEOF
56110 56095 if ac_fn_cxx_try_cpp "$LINENO"; then :
56111 56096 # We can compile using X headers with no special include directory.
56112 56097 ac_x_includes=
56113 56098 else
56114 56099 for ac_dir in $ac_x_header_dirs; do
56115 56100 if test -r "$ac_dir/X11/Xlib.h"; then
56116 56101 ac_x_includes=$ac_dir
56117 56102 break
56118 56103 fi
56119 56104 done
56120 56105 fi
56121 56106 rm -f conftest.err conftest.i conftest.$ac_ext
56122 56107 fi # $ac_x_includes = no
56123 56108
56124 56109 if test "$ac_x_libraries" = no; then
56125 56110 # Check for the libraries.
56126 56111 # See if we find them without any special options.
56127 56112 # Don't add to $LIBS permanently.
56128 56113 ac_save_LIBS=$LIBS
56129 56114 LIBS="-lX11 $LIBS"
56130 56115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56131 56116 /* end confdefs.h. */
56132 56117 #include <X11/Xlib.h>
56133 56118 int
56134 56119 main ()
56135 56120 {
56136 56121 XrmInitialize ()
56137 56122 ;
56138 56123 return 0;
56139 56124 }
56140 56125 _ACEOF
56141 56126 if ac_fn_cxx_try_link "$LINENO"; then :
56142 56127 LIBS=$ac_save_LIBS
56143 56128 # We can link X programs with no special library path.
56144 56129 ac_x_libraries=
56145 56130 else
56146 56131 LIBS=$ac_save_LIBS
56147 56132 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56148 56133 do
56149 56134 # Don't even attempt the hair of trying to link an X program!
56150 56135 for ac_extension in a so sl dylib la dll; do
56151 56136 if test -r "$ac_dir/libX11.$ac_extension"; then
56152 56137 ac_x_libraries=$ac_dir
56153 56138 break 2
56154 56139 fi
56155 56140 done
56156 56141 done
56157 56142 fi
56158 56143 rm -f core conftest.err conftest.$ac_objext \
56159 56144 conftest$ac_exeext conftest.$ac_ext
56160 56145 fi # $ac_x_libraries = no
56161 56146
56162 56147 case $ac_x_includes,$ac_x_libraries in #(
56163 56148 no,* | *,no | *\'*)
56164 56149 # Didn't find X, or a directory has "'" in its name.
56165 56150 ac_cv_have_x="have_x=no";; #(
56166 56151 *)
56167 56152 # Record where we found X for the cache.
56168 56153 ac_cv_have_x="have_x=yes\
56169 56154 ac_x_includes='$ac_x_includes'\
56170 56155 ac_x_libraries='$ac_x_libraries'"
56171 56156 esac
56172 56157 fi
56173 56158 ;; #(
56174 56159 *) have_x=yes;;
56175 56160 esac
56176 56161 eval "$ac_cv_have_x"
56177 56162 fi # $with_x != no
56178 56163
56179 56164 if test "$have_x" != yes; then
56180 56165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56181 56166 $as_echo "$have_x" >&6; }
56182 56167 no_x=yes
56183 56168 else
56184 56169 # If each of the values was on the command line, it overrides each guess.
56185 56170 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56186 56171 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56187 56172 # Update the cache value to reflect the command line values.
56188 56173 ac_cv_have_x="have_x=yes\
56189 56174 ac_x_includes='$x_includes'\
56190 56175 ac_x_libraries='$x_libraries'"
56191 56176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56192 56177 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56193 56178 fi
56194 56179
56195 56180 if test "$no_x" = yes; then
56196 56181 # Not all programs may use this symbol, but it does not hurt to define it.
56197 56182
56198 56183 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56199 56184
56200 56185 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56201 56186 else
56202 56187 if test -n "$x_includes"; then
56203 56188 X_CFLAGS="$X_CFLAGS -I$x_includes"
56204 56189 fi
56205 56190
56206 56191 # It would also be nice to do this for all -L options, not just this one.
56207 56192 if test -n "$x_libraries"; then
56208 56193 X_LIBS="$X_LIBS -L$x_libraries"
56209 56194 # For Solaris; some versions of Sun CC require a space after -R and
56210 56195 # others require no space. Words are not sufficient . . . .
56211 56196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56212 56197 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
56213 56198 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56214 56199 ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56215 56200 ac_cxx_werror_flag=yes
56216 56201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56217 56202 /* end confdefs.h. */
56218 56203
56219 56204 int
56220 56205 main ()
56221 56206 {
56222 56207
56223 56208 ;
56224 56209 return 0;
56225 56210 }
56226 56211 _ACEOF
56227 56212 if ac_fn_cxx_try_link "$LINENO"; then :
56228 56213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56229 56214 $as_echo "no" >&6; }
56230 56215 X_LIBS="$X_LIBS -R$x_libraries"
56231 56216 else
56232 56217 LIBS="$ac_xsave_LIBS -R $x_libraries"
56233 56218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56234 56219 /* end confdefs.h. */
56235 56220
56236 56221 int
56237 56222 main ()
56238 56223 {
56239 56224
56240 56225 ;
56241 56226 return 0;
56242 56227 }
56243 56228 _ACEOF
56244 56229 if ac_fn_cxx_try_link "$LINENO"; then :
56245 56230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56246 56231 $as_echo "yes" >&6; }
56247 56232 X_LIBS="$X_LIBS -R $x_libraries"
56248 56233 else
56249 56234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56250 56235 $as_echo "neither works" >&6; }
56251 56236 fi
56252 56237 rm -f core conftest.err conftest.$ac_objext \
56253 56238 conftest$ac_exeext conftest.$ac_ext
56254 56239 fi
56255 56240 rm -f core conftest.err conftest.$ac_objext \
56256 56241 conftest$ac_exeext conftest.$ac_ext
56257 56242 ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56258 56243 LIBS=$ac_xsave_LIBS
56259 56244 fi
56260 56245
56261 56246 # Check for system-dependent libraries X programs must link with.
56262 56247 # Do this before checking for the system-independent R6 libraries
56263 56248 # (-lICE), since we may need -lsocket or whatever for X linking.
56264 56249
56265 56250 if test "$ISC" = yes; then
56266 56251 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56267 56252 else
56268 56253 # Martyn Johnson says this is needed for Ultrix, if the X
56269 56254 # libraries were built with DECnet support. And Karl Berry says
56270 56255 # the Alpha needs dnet_stub (dnet does not exist).
56271 56256 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56272 56257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56273 56258 /* end confdefs.h. */
56274 56259
56275 56260 /* Override any GCC internal prototype to avoid an error.
56276 56261 Use char because int might match the return type of a GCC
56277 56262 builtin and then its argument prototype would still apply. */
56278 56263 #ifdef __cplusplus
56279 56264 extern "C"
56280 56265 #endif
56281 56266 char XOpenDisplay ();
56282 56267 int
56283 56268 main ()
56284 56269 {
56285 56270 return XOpenDisplay ();
56286 56271 ;
56287 56272 return 0;
56288 56273 }
56289 56274 _ACEOF
56290 56275 if ac_fn_cxx_try_link "$LINENO"; then :
56291 56276
56292 56277 else
56293 56278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56294 56279 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56295 56280 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56296 56281 $as_echo_n "(cached) " >&6
56297 56282 else
56298 56283 ac_check_lib_save_LIBS=$LIBS
56299 56284 LIBS="-ldnet $LIBS"
56300 56285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56301 56286 /* end confdefs.h. */
56302 56287
56303 56288 /* Override any GCC internal prototype to avoid an error.
56304 56289 Use char because int might match the return type of a GCC
56305 56290 builtin and then its argument prototype would still apply. */
56306 56291 #ifdef __cplusplus
56307 56292 extern "C"
56308 56293 #endif
56309 56294 char dnet_ntoa ();
56310 56295 int
56311 56296 main ()
56312 56297 {
56313 56298 return dnet_ntoa ();
56314 56299 ;
56315 56300 return 0;
56316 56301 }
56317 56302 _ACEOF
56318 56303 if ac_fn_cxx_try_link "$LINENO"; then :
56319 56304 ac_cv_lib_dnet_dnet_ntoa=yes
56320 56305 else
56321 56306 ac_cv_lib_dnet_dnet_ntoa=no
56322 56307 fi
56323 56308 rm -f core conftest.err conftest.$ac_objext \
56324 56309 conftest$ac_exeext conftest.$ac_ext
56325 56310 LIBS=$ac_check_lib_save_LIBS
56326 56311 fi
56327 56312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56328 56313 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56329 56314 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56330 56315 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56331 56316 fi
56332 56317
56333 56318 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56334 56319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56335 56320 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56336 56321 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56337 56322 $as_echo_n "(cached) " >&6
56338 56323 else
56339 56324 ac_check_lib_save_LIBS=$LIBS
56340 56325 LIBS="-ldnet_stub $LIBS"
56341 56326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56342 56327 /* end confdefs.h. */
56343 56328
56344 56329 /* Override any GCC internal prototype to avoid an error.
56345 56330 Use char because int might match the return type of a GCC
56346 56331 builtin and then its argument prototype would still apply. */
56347 56332 #ifdef __cplusplus
56348 56333 extern "C"
56349 56334 #endif
56350 56335 char dnet_ntoa ();
56351 56336 int
56352 56337 main ()
56353 56338 {
56354 56339 return dnet_ntoa ();
56355 56340 ;
56356 56341 return 0;
56357 56342 }
56358 56343 _ACEOF
56359 56344 if ac_fn_cxx_try_link "$LINENO"; then :
56360 56345 ac_cv_lib_dnet_stub_dnet_ntoa=yes
56361 56346 else
56362 56347 ac_cv_lib_dnet_stub_dnet_ntoa=no
56363 56348 fi
56364 56349 rm -f core conftest.err conftest.$ac_objext \
56365 56350 conftest$ac_exeext conftest.$ac_ext
56366 56351 LIBS=$ac_check_lib_save_LIBS
56367 56352 fi
56368 56353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56369 56354 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56370 56355 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56371 56356 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56372 56357 fi
56373 56358
56374 56359 fi
56375 56360 fi
56376 56361 rm -f core conftest.err conftest.$ac_objext \
56377 56362 conftest$ac_exeext conftest.$ac_ext
56378 56363 LIBS="$ac_xsave_LIBS"
56379 56364
56380 56365 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56381 56366 # to get the SysV transport functions.
56382 56367 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56383 56368 # needs -lnsl.
56384 56369 # The nsl library prevents programs from opening the X display
56385 56370 # on Irix 5.2, according to T.E. Dickey.
56386 56371 # The functions gethostbyname, getservbyname, and inet_addr are
56387 56372 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56388 56373 ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56389 56374 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56390 56375
56391 56376 fi
56392 56377
56393 56378 if test $ac_cv_func_gethostbyname = no; then
56394 56379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56395 56380 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56396 56381 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56397 56382 $as_echo_n "(cached) " >&6
56398 56383 else
56399 56384 ac_check_lib_save_LIBS=$LIBS
56400 56385 LIBS="-lnsl $LIBS"
56401 56386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56402 56387 /* end confdefs.h. */
56403 56388
56404 56389 /* Override any GCC internal prototype to avoid an error.
56405 56390 Use char because int might match the return type of a GCC
56406 56391 builtin and then its argument prototype would still apply. */
56407 56392 #ifdef __cplusplus
56408 56393 extern "C"
56409 56394 #endif
56410 56395 char gethostbyname ();
56411 56396 int
56412 56397 main ()
56413 56398 {
56414 56399 return gethostbyname ();
56415 56400 ;
56416 56401 return 0;
56417 56402 }
56418 56403 _ACEOF
56419 56404 if ac_fn_cxx_try_link "$LINENO"; then :
56420 56405 ac_cv_lib_nsl_gethostbyname=yes
56421 56406 else
56422 56407 ac_cv_lib_nsl_gethostbyname=no
56423 56408 fi
56424 56409 rm -f core conftest.err conftest.$ac_objext \
56425 56410 conftest$ac_exeext conftest.$ac_ext
56426 56411 LIBS=$ac_check_lib_save_LIBS
56427 56412 fi
56428 56413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56429 56414 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56430 56415 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56431 56416 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56432 56417 fi
56433 56418
56434 56419 if test $ac_cv_lib_nsl_gethostbyname = no; then
56435 56420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56436 56421 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56437 56422 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56438 56423 $as_echo_n "(cached) " >&6
56439 56424 else
56440 56425 ac_check_lib_save_LIBS=$LIBS
56441 56426 LIBS="-lbsd $LIBS"
56442 56427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56443 56428 /* end confdefs.h. */
56444 56429
56445 56430 /* Override any GCC internal prototype to avoid an error.
56446 56431 Use char because int might match the return type of a GCC
56447 56432 builtin and then its argument prototype would still apply. */
56448 56433 #ifdef __cplusplus
56449 56434 extern "C"
56450 56435 #endif
56451 56436 char gethostbyname ();
56452 56437 int
56453 56438 main ()
56454 56439 {
56455 56440 return gethostbyname ();
56456 56441 ;
56457 56442 return 0;
56458 56443 }
56459 56444 _ACEOF
56460 56445 if ac_fn_cxx_try_link "$LINENO"; then :
56461 56446 ac_cv_lib_bsd_gethostbyname=yes
56462 56447 else
56463 56448 ac_cv_lib_bsd_gethostbyname=no
56464 56449 fi
56465 56450 rm -f core conftest.err conftest.$ac_objext \
56466 56451 conftest$ac_exeext conftest.$ac_ext
56467 56452 LIBS=$ac_check_lib_save_LIBS
56468 56453 fi
56469 56454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56470 56455 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56471 56456 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56472 56457 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56473 56458 fi
56474 56459
56475 56460 fi
56476 56461 fi
56477 56462
56478 56463 # lieder@skyler.mavd.honeywell.com says without -lsocket,
56479 56464 # socket/setsockopt and other routines are undefined under SCO ODT
56480 56465 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
56481 56466 # on later versions), says Simon Leinen: it contains gethostby*
56482 56467 # variants that don't use the name server (or something). -lsocket
56483 56468 # must be given before -lnsl if both are needed. We assume that
56484 56469 # if connect needs -lnsl, so does gethostbyname.
56485 56470 ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56486 56471 if test "x$ac_cv_func_connect" = xyes; then :
56487 56472
56488 56473 fi
56489 56474
56490 56475 if test $ac_cv_func_connect = no; then
56491 56476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56492 56477 $as_echo_n "checking for connect in -lsocket... " >&6; }
56493 56478 if ${ac_cv_lib_socket_connect+:} false; then :
56494 56479 $as_echo_n "(cached) " >&6
56495 56480 else
56496 56481 ac_check_lib_save_LIBS=$LIBS
56497 56482 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56498 56483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56499 56484 /* end confdefs.h. */
56500 56485
56501 56486 /* Override any GCC internal prototype to avoid an error.
56502 56487 Use char because int might match the return type of a GCC
56503 56488 builtin and then its argument prototype would still apply. */
56504 56489 #ifdef __cplusplus
56505 56490 extern "C"
56506 56491 #endif
56507 56492 char connect ();
56508 56493 int
56509 56494 main ()
56510 56495 {
56511 56496 return connect ();
56512 56497 ;
56513 56498 return 0;
56514 56499 }
56515 56500 _ACEOF
56516 56501 if ac_fn_cxx_try_link "$LINENO"; then :
56517 56502 ac_cv_lib_socket_connect=yes
56518 56503 else
56519 56504 ac_cv_lib_socket_connect=no
56520 56505 fi
56521 56506 rm -f core conftest.err conftest.$ac_objext \
56522 56507 conftest$ac_exeext conftest.$ac_ext
56523 56508 LIBS=$ac_check_lib_save_LIBS
56524 56509 fi
56525 56510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56526 56511 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56527 56512 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56528 56513 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56529 56514 fi
56530 56515
56531 56516 fi
56532 56517
56533 56518 # Guillermo Gomez says -lposix is necessary on A/UX.
56534 56519 ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56535 56520 if test "x$ac_cv_func_remove" = xyes; then :
56536 56521
56537 56522 fi
56538 56523
56539 56524 if test $ac_cv_func_remove = no; then
56540 56525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56541 56526 $as_echo_n "checking for remove in -lposix... " >&6; }
56542 56527 if ${ac_cv_lib_posix_remove+:} false; then :
56543 56528 $as_echo_n "(cached) " >&6
56544 56529 else
56545 56530 ac_check_lib_save_LIBS=$LIBS
56546 56531 LIBS="-lposix $LIBS"
56547 56532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56548 56533 /* end confdefs.h. */
56549 56534
56550 56535 /* Override any GCC internal prototype to avoid an error.
56551 56536 Use char because int might match the return type of a GCC
56552 56537 builtin and then its argument prototype would still apply. */
56553 56538 #ifdef __cplusplus
56554 56539 extern "C"
56555 56540 #endif
56556 56541 char remove ();
56557 56542 int
56558 56543 main ()
56559 56544 {
56560 56545 return remove ();
56561 56546 ;
56562 56547 return 0;
56563 56548 }
56564 56549 _ACEOF
56565 56550 if ac_fn_cxx_try_link "$LINENO"; then :
56566 56551 ac_cv_lib_posix_remove=yes
56567 56552 else
56568 56553 ac_cv_lib_posix_remove=no
56569 56554 fi
56570 56555 rm -f core conftest.err conftest.$ac_objext \
56571 56556 conftest$ac_exeext conftest.$ac_ext
56572 56557 LIBS=$ac_check_lib_save_LIBS
56573 56558 fi
56574 56559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56575 56560 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56576 56561 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56577 56562 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56578 56563 fi
56579 56564
56580 56565 fi
56581 56566
56582 56567 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56583 56568 ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56584 56569 if test "x$ac_cv_func_shmat" = xyes; then :
56585 56570
56586 56571 fi
56587 56572
56588 56573 if test $ac_cv_func_shmat = no; then
56589 56574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56590 56575 $as_echo_n "checking for shmat in -lipc... " >&6; }
56591 56576 if ${ac_cv_lib_ipc_shmat+:} false; then :
56592 56577 $as_echo_n "(cached) " >&6
56593 56578 else
56594 56579 ac_check_lib_save_LIBS=$LIBS
56595 56580 LIBS="-lipc $LIBS"
56596 56581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56597 56582 /* end confdefs.h. */
56598 56583
56599 56584 /* Override any GCC internal prototype to avoid an error.
56600 56585 Use char because int might match the return type of a GCC
56601 56586 builtin and then its argument prototype would still apply. */
56602 56587 #ifdef __cplusplus
56603 56588 extern "C"
56604 56589 #endif
56605 56590 char shmat ();
56606 56591 int
56607 56592 main ()
56608 56593 {
56609 56594 return shmat ();
56610 56595 ;
56611 56596 return 0;
56612 56597 }
56613 56598 _ACEOF
56614 56599 if ac_fn_cxx_try_link "$LINENO"; then :
56615 56600 ac_cv_lib_ipc_shmat=yes
56616 56601 else
56617 56602 ac_cv_lib_ipc_shmat=no
56618 56603 fi
56619 56604 rm -f core conftest.err conftest.$ac_objext \
56620 56605 conftest$ac_exeext conftest.$ac_ext
56621 56606 LIBS=$ac_check_lib_save_LIBS
56622 56607 fi
56623 56608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56624 56609 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56625 56610 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56626 56611 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56627 56612 fi
56628 56613
56629 56614 fi
56630 56615 fi
56631 56616
56632 56617 # Check for libraries that X11R6 Xt/Xaw programs need.
56633 56618 ac_save_LDFLAGS=$LDFLAGS
56634 56619 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56635 56620 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56636 56621 # check for ICE first), but we must link in the order -lSM -lICE or
56637 56622 # we get undefined symbols. So assume we have SM if we have ICE.
56638 56623 # These have to be linked with before -lX11, unlike the other
56639 56624 # libraries we check for below, so use a different variable.
56640 56625 # John Interrante, Karl Berry
56641 56626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56642 56627 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56643 56628 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56644 56629 $as_echo_n "(cached) " >&6
56645 56630 else
56646 56631 ac_check_lib_save_LIBS=$LIBS
56647 56632 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56648 56633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56649 56634 /* end confdefs.h. */
56650 56635
56651 56636 /* Override any GCC internal prototype to avoid an error.
56652 56637 Use char because int might match the return type of a GCC
56653 56638 builtin and then its argument prototype would still apply. */
56654 56639 #ifdef __cplusplus
56655 56640 extern "C"
56656 56641 #endif
56657 56642 char IceConnectionNumber ();
56658 56643 int
56659 56644 main ()
56660 56645 {
56661 56646 return IceConnectionNumber ();
56662 56647 ;
56663 56648 return 0;
56664 56649 }
56665 56650 _ACEOF
56666 56651 if ac_fn_cxx_try_link "$LINENO"; then :
56667 56652 ac_cv_lib_ICE_IceConnectionNumber=yes
56668 56653 else
56669 56654 ac_cv_lib_ICE_IceConnectionNumber=no
56670 56655 fi
56671 56656 rm -f core conftest.err conftest.$ac_objext \
56672 56657 conftest$ac_exeext conftest.$ac_ext
56673 56658 LIBS=$ac_check_lib_save_LIBS
56674 56659 fi
56675 56660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56676 56661 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56677 56662 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56678 56663 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56679 56664 fi
56680 56665
56681 56666 LDFLAGS=$ac_save_LDFLAGS
56682 56667
56683 56668 fi
56684 56669
56685 56670
56686 56671 # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56687 56672 # this doesn't make sense so we remove it.
56688 56673 if test "x$COMPILE_TYPE" = xcross; then
56689 56674 X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56690 56675 fi
56691 56676
56692 56677 if test "x$no_x" = xyes; then
56693 56678
56694 56679 # Print a helpful message on how to acquire the necessary build dependency.
56695 56680 # x11 is the help tag: freetype, cups, alsa etc
56696 56681 MISSING_DEPENDENCY=x11
56697 56682
56698 56683 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56699 56684 cygwin_help $MISSING_DEPENDENCY
56700 56685 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56701 56686 msys_help $MISSING_DEPENDENCY
56702 56687 else
56703 56688 PKGHANDLER_COMMAND=
56704 56689
56705 56690 case $PKGHANDLER in
56706 56691 apt-get)
56707 56692 apt_help $MISSING_DEPENDENCY ;;
56708 56693 yum)
56709 56694 yum_help $MISSING_DEPENDENCY ;;
56710 56695 port)
56711 56696 port_help $MISSING_DEPENDENCY ;;
56712 56697 pkgutil)
56713 56698 pkgutil_help $MISSING_DEPENDENCY ;;
56714 56699 pkgadd)
56715 56700 pkgadd_help $MISSING_DEPENDENCY ;;
56716 56701 esac
56717 56702
56718 56703 if test "x$PKGHANDLER_COMMAND" != x; then
↓ open down ↓ |
12708 lines elided |
↑ open up ↑ |
56719 56704 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56720 56705 fi
56721 56706 fi
56722 56707
56723 56708 as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56724 56709 fi
56725 56710
56726 56711 if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56727 56712 OPENWIN_HOME="/usr/openwin"
56728 56713 X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56729 - X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56730 - -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56731 - -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56714 + X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56732 56715 -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56733 56716 fi
56734 56717
56735 56718 ac_ext=c
56736 56719 ac_cpp='$CPP $CPPFLAGS'
56737 56720 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56738 56721 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56739 56722 ac_compiler_gnu=$ac_cv_c_compiler_gnu
56740 56723
56741 56724 OLD_CFLAGS="$CFLAGS"
56742 56725 CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56743 56726
56744 56727 # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56745 56728 for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56746 56729 do :
56747 56730 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56748 56731 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56749 56732 # include <X11/Xlib.h>
56750 56733 # include <X11/Xutil.h>
56751 56734
56752 56735
56753 56736 "
56754 56737 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56755 56738 cat >>confdefs.h <<_ACEOF
56756 56739 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56757 56740 _ACEOF
56758 56741 X11_HEADERS_OK=yes
56759 56742 else
56760 56743 X11_HEADERS_OK=no; break
56761 56744 fi
56762 56745
56763 56746 done
56764 56747
56765 56748
56766 56749 if test "x$X11_HEADERS_OK" = xno; then
56767 56750
56768 56751 # Print a helpful message on how to acquire the necessary build dependency.
56769 56752 # x11 is the help tag: freetype, cups, alsa etc
56770 56753 MISSING_DEPENDENCY=x11
56771 56754
56772 56755 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56773 56756 cygwin_help $MISSING_DEPENDENCY
56774 56757 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56775 56758 msys_help $MISSING_DEPENDENCY
56776 56759 else
56777 56760 PKGHANDLER_COMMAND=
56778 56761
56779 56762 case $PKGHANDLER in
56780 56763 apt-get)
56781 56764 apt_help $MISSING_DEPENDENCY ;;
56782 56765 yum)
56783 56766 yum_help $MISSING_DEPENDENCY ;;
56784 56767 port)
56785 56768 port_help $MISSING_DEPENDENCY ;;
56786 56769 pkgutil)
56787 56770 pkgutil_help $MISSING_DEPENDENCY ;;
56788 56771 pkgadd)
56789 56772 pkgadd_help $MISSING_DEPENDENCY ;;
56790 56773 esac
56791 56774
56792 56775 if test "x$PKGHANDLER_COMMAND" != x; then
56793 56776 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56794 56777 fi
56795 56778 fi
56796 56779
56797 56780 as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56798 56781 fi
56799 56782
56800 56783 # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56801 56784 # defined in libawt_xawt.
56802 56785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56803 56786 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56804 56787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56805 56788 /* end confdefs.h. */
56806 56789 #include <X11/extensions/Xrender.h>
56807 56790 int
56808 56791 main ()
56809 56792 {
56810 56793 XLinearGradient x;
56811 56794 ;
56812 56795 return 0;
56813 56796 }
56814 56797 _ACEOF
56815 56798 if ac_fn_c_try_compile "$LINENO"; then :
56816 56799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56817 56800 $as_echo "yes" >&6; }
56818 56801 else
56819 56802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56820 56803 $as_echo "no" >&6; }
56821 56804 X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56822 56805 fi
56823 56806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56824 56807
56825 56808 CFLAGS="$OLD_CFLAGS"
56826 56809 ac_ext=cpp
56827 56810 ac_cpp='$CXXCPP $CPPFLAGS'
56828 56811 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56829 56812 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56830 56813 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56831 56814
56832 56815 fi # NEEDS_LIB_X11
56833 56816
56834 56817
56835 56818
56836 56819
56837 56820
56838 56821
56839 56822 # Check whether --with-cups was given.
56840 56823 if test "${with_cups+set}" = set; then :
56841 56824 withval=$with_cups;
56842 56825 fi
56843 56826
56844 56827
56845 56828 # Check whether --with-cups-include was given.
56846 56829 if test "${with_cups_include+set}" = set; then :
56847 56830 withval=$with_cups_include;
56848 56831 fi
56849 56832
56850 56833
56851 56834 if test "x$NEEDS_LIB_CUPS" = xfalse; then
56852 56835 if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56853 56836 (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56854 56837 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56855 56838 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56856 56839 fi
56857 56840 CUPS_CFLAGS=
56858 56841 else
56859 56842 CUPS_FOUND=no
56860 56843
56861 56844 if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56862 56845 as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56863 56846 fi
56864 56847
56865 56848 if test "x${with_cups}" != x; then
56866 56849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56867 56850 $as_echo_n "checking for cups headers... " >&6; }
56868 56851 if test -s "${with_cups}/include/cups/cups.h"; then
56869 56852 CUPS_CFLAGS="-I${with_cups}/include"
56870 56853 CUPS_FOUND=yes
56871 56854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56872 56855 $as_echo "$CUPS_FOUND" >&6; }
56873 56856 else
56874 56857 as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56875 56858 fi
56876 56859 fi
56877 56860 if test "x${with_cups_include}" != x; then
56878 56861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56879 56862 $as_echo_n "checking for cups headers... " >&6; }
56880 56863 if test -s "${with_cups_include}/cups/cups.h"; then
56881 56864 CUPS_CFLAGS="-I${with_cups_include}"
56882 56865 CUPS_FOUND=yes
56883 56866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56884 56867 $as_echo "$CUPS_FOUND" >&6; }
56885 56868 else
56886 56869 as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56887 56870 fi
56888 56871 fi
56889 56872 if test "x$CUPS_FOUND" = xno; then
56890 56873 # Are the cups headers installed in the default /usr/include location?
56891 56874 for ac_header in cups/cups.h cups/ppd.h
56892 56875 do :
56893 56876 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56894 56877 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56895 56878 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56896 56879 cat >>confdefs.h <<_ACEOF
56897 56880 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56898 56881 _ACEOF
56899 56882
56900 56883 CUPS_FOUND=yes
56901 56884 CUPS_CFLAGS=
56902 56885 DEFAULT_CUPS=yes
56903 56886
56904 56887 fi
56905 56888
56906 56889 done
56907 56890
56908 56891 fi
56909 56892 if test "x$CUPS_FOUND" = xno; then
56910 56893 # Getting nervous now? Lets poke around for standard Solaris third-party
56911 56894 # package installation locations.
56912 56895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56913 56896 $as_echo_n "checking for cups headers... " >&6; }
56914 56897 if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56915 56898 # An SFW package seems to be installed!
56916 56899 CUPS_FOUND=yes
56917 56900 CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56918 56901 elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56919 56902 # A CSW package seems to be installed!
56920 56903 CUPS_FOUND=yes
56921 56904 CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56922 56905 fi
56923 56906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56924 56907 $as_echo "$CUPS_FOUND" >&6; }
56925 56908 fi
56926 56909 if test "x$CUPS_FOUND" = xno; then
56927 56910
56928 56911 # Print a helpful message on how to acquire the necessary build dependency.
56929 56912 # cups is the help tag: freetype, cups, alsa etc
56930 56913 MISSING_DEPENDENCY=cups
56931 56914
56932 56915 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56933 56916 cygwin_help $MISSING_DEPENDENCY
56934 56917 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56935 56918 msys_help $MISSING_DEPENDENCY
56936 56919 else
56937 56920 PKGHANDLER_COMMAND=
56938 56921
56939 56922 case $PKGHANDLER in
56940 56923 apt-get)
56941 56924 apt_help $MISSING_DEPENDENCY ;;
56942 56925 yum)
56943 56926 yum_help $MISSING_DEPENDENCY ;;
56944 56927 port)
56945 56928 port_help $MISSING_DEPENDENCY ;;
56946 56929 pkgutil)
56947 56930 pkgutil_help $MISSING_DEPENDENCY ;;
56948 56931 pkgadd)
56949 56932 pkgadd_help $MISSING_DEPENDENCY ;;
56950 56933 esac
56951 56934
56952 56935 if test "x$PKGHANDLER_COMMAND" != x; then
56953 56936 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56954 56937 fi
56955 56938 fi
56956 56939
56957 56940 as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56958 56941 fi
56959 56942 fi
56960 56943
56961 56944
56962 56945
56963 56946
56964 56947
56965 56948 # Check whether --with-freetype was given.
56966 56949 if test "${with_freetype+set}" = set; then :
56967 56950 withval=$with_freetype;
56968 56951 fi
56969 56952
56970 56953
56971 56954 # Check whether --with-freetype-include was given.
56972 56955 if test "${with_freetype_include+set}" = set; then :
56973 56956 withval=$with_freetype_include;
56974 56957 fi
56975 56958
56976 56959
56977 56960 # Check whether --with-freetype-lib was given.
56978 56961 if test "${with_freetype_lib+set}" = set; then :
56979 56962 withval=$with_freetype_lib;
56980 56963 fi
56981 56964
56982 56965
56983 56966 # Check whether --with-freetype-src was given.
56984 56967 if test "${with_freetype_src+set}" = set; then :
56985 56968 withval=$with_freetype_src;
56986 56969 fi
56987 56970
56988 56971 # Check whether --enable-freetype-bundling was given.
56989 56972 if test "${enable_freetype_bundling+set}" = set; then :
56990 56973 enableval=$enable_freetype_bundling;
56991 56974 fi
56992 56975
56993 56976
56994 56977 # Need to specify explicitly since it needs to be overridden on some versions of macosx
56995 56978 FREETYPE_BASE_NAME=freetype
56996 56979 FREETYPE_CFLAGS=
56997 56980 FREETYPE_LIBS=
56998 56981 FREETYPE_BUNDLE_LIB_PATH=
56999 56982
57000 56983 if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57001 56984 if (test "x$with_freetype" != x && test "x$with_freetype" != xno) || \
57002 56985 (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57003 56986 (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57004 56987 (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57005 56988 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57006 56989 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57007 56990 fi
57008 56991 if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57009 56992 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57010 56993 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57011 56994 fi
57012 56995 else
57013 56996 # freetype is needed to build; go get it!
57014 56997
57015 56998 BUNDLE_FREETYPE="$enable_freetype_bundling"
57016 56999
57017 57000 if test "x$with_freetype_src" != x; then
57018 57001 if test "x$OPENJDK_TARGET_OS" = xwindows; then
57019 57002 # Try to build freetype if --with-freetype-src was given on Windows
57020 57003
57021 57004 FREETYPE_SRC_PATH="$with_freetype_src"
57022 57005 BUILD_FREETYPE=yes
57023 57006
57024 57007 # Check if the freetype sources are acessible..
57025 57008 if ! test -d $FREETYPE_SRC_PATH; then
57026 57009 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
57027 57010 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57028 57011 BUILD_FREETYPE=no
57029 57012 fi
57030 57013 # ..and contain a vc2010 project file
57031 57014 vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57032 57015 if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57033 57016 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
57034 57017 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57035 57018 BUILD_FREETYPE=no
57036 57019 fi
57037 57020 # Now check if configure found a version of 'msbuild.exe'
57038 57021 if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57039 57022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
57040 57023 $as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
57041 57024 BUILD_FREETYPE=no
57042 57025 fi
57043 57026
57044 57027 # Ready to go..
57045 57028 if test "x$BUILD_FREETYPE" = xyes; then
57046 57029 # msbuild requires trailing slashes for output directories
57047 57030 freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57048 57031 freetype_lib_path_unix="$freetype_lib_path"
57049 57032 freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57050 57033
57051 57034 unix_path="$vcxproj_path"
57052 57035 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57053 57036 windows_path=`$CYGPATH -m "$unix_path"`
57054 57037 vcxproj_path="$windows_path"
57055 57038 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57056 57039 windows_path=`cmd //c echo $unix_path`
57057 57040 vcxproj_path="$windows_path"
57058 57041 fi
57059 57042
57060 57043
57061 57044 unix_path="$freetype_lib_path"
57062 57045 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57063 57046 windows_path=`$CYGPATH -m "$unix_path"`
57064 57047 freetype_lib_path="$windows_path"
57065 57048 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57066 57049 windows_path=`cmd //c echo $unix_path`
57067 57050 freetype_lib_path="$windows_path"
57068 57051 fi
57069 57052
57070 57053
57071 57054 unix_path="$freetype_obj_path"
57072 57055 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57073 57056 windows_path=`$CYGPATH -m "$unix_path"`
57074 57057 freetype_obj_path="$windows_path"
57075 57058 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57076 57059 windows_path=`cmd //c echo $unix_path`
57077 57060 freetype_obj_path="$windows_path"
57078 57061 fi
57079 57062
57080 57063 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57081 57064 freetype_platform=x64
57082 57065 else
57083 57066 freetype_platform=win32
57084 57067 fi
57085 57068
57086 57069 # The original freetype project file is for VS 2010 (i.e. 'v100'),
57087 57070 # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57088 57071 # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57089 57072 # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57090 57073 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57091 57074 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57092 57075
57093 57076 # First we try to build the freetype.dll
57094 57077 $ECHO -e "@echo off\n"\
57095 57078 "$MSBUILD $vcxproj_path "\
57096 57079 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57097 57080 "/p:Configuration=\"Release Multithreaded\" "\
57098 57081 "/p:Platform=$freetype_platform "\
57099 57082 "/p:ConfigurationType=DynamicLibrary "\
57100 57083 "/p:TargetName=freetype "\
57101 57084 "/p:OutDir=\"$freetype_lib_path\" "\
57102 57085 "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57103 57086 cmd /c freetype.bat
57104 57087
57105 57088 if test -s "$freetype_lib_path_unix/freetype.dll"; then
57106 57089 # If that succeeds we also build freetype.lib
57107 57090 $ECHO -e "@echo off\n"\
57108 57091 "$MSBUILD $vcxproj_path "\
57109 57092 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57110 57093 "/p:Configuration=\"Release Multithreaded\" "\
57111 57094 "/p:Platform=$freetype_platform "\
57112 57095 "/p:ConfigurationType=StaticLibrary "\
57113 57096 "/p:TargetName=freetype "\
57114 57097 "/p:OutDir=\"$freetype_lib_path\" "\
57115 57098 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57116 57099 cmd /c freetype.bat
57117 57100
57118 57101 if test -s "$freetype_lib_path_unix/freetype.lib"; then
57119 57102 # Once we build both, lib and dll, set freetype lib and include path appropriately
57120 57103 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57121 57104 POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57122 57105 { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57123 57106 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57124 57107 else
57125 57108 BUILD_FREETYPE=no
57126 57109 fi
57127 57110 else
57128 57111 BUILD_FREETYPE=no
57129 57112 fi
57130 57113 fi
57131 57114
57132 57115 if test "x$BUILD_FREETYPE" = xyes; then
57133 57116 # Okay, we built it. Check that it works.
57134 57117
57135 57118 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57136 57119 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57137 57120 METHOD="--with-freetype-src"
57138 57121
57139 57122 # Let's start with an optimistic view of the world :-)
57140 57123 FOUND_FREETYPE=yes
57141 57124
57142 57125 # First look for the canonical freetype main include file ft2build.h.
57143 57126 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57144 57127 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57145 57128 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57146 57129 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57147 57130 # Fail.
57148 57131 FOUND_FREETYPE=no
57149 57132 fi
57150 57133 fi
57151 57134
57152 57135 if test "x$FOUND_FREETYPE" = xyes; then
57153 57136 # Include file found, let's continue the sanity check.
57154 57137 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57155 57138 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57156 57139
57157 57140 # Reset to default value
57158 57141 FREETYPE_BASE_NAME=freetype
57159 57142 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57160 57143 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57161 57144 if test "x$OPENJDK_TARGET_OS" = xmacosx \
57162 57145 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57163 57146 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57164 57147 # for the .6 version explicitly.
57165 57148 FREETYPE_BASE_NAME=freetype.6
57166 57149 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57167 57150 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57168 57151 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57169 57152 else
57170 57153 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57171 57154 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57172 57155 FOUND_FREETYPE=no
57173 57156 fi
57174 57157 else
57175 57158 if test "x$OPENJDK_TARGET_OS" = xwindows; then
57176 57159 # On Windows, we will need both .lib and .dll file.
57177 57160 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57178 57161 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57179 57162 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57180 57163 FOUND_FREETYPE=no
57181 57164 fi
57182 57165 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57183 57166 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57184 57167 # Found lib in isa dir, use that instead.
57185 57168 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57186 57169 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57187 57170 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57188 57171 fi
57189 57172 fi
57190 57173 fi
57191 57174
57192 57175 if test "x$FOUND_FREETYPE" = xyes; then
57193 57176
57194 57177 # Only process if variable expands to non-empty
57195 57178
57196 57179 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57197 57180 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57198 57181
57199 57182 # Input might be given as Windows format, start by converting to
57200 57183 # unix format.
57201 57184 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57202 57185 new_path=`$CYGPATH -u "$path"`
57203 57186
57204 57187 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57205 57188 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57206 57189 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57207 57190 # "foo.exe" is OK but "foo" is an error.
57208 57191 #
57209 57192 # This test is therefore slightly more accurate than "test -f" to check for file precense.
57210 57193 # It is also a way to make sure we got the proper file name for the real test later on.
57211 57194 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57212 57195 if test "x$test_shortpath" = x; then
57213 57196 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57214 57197 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57215 57198 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57216 57199 fi
57217 57200
57218 57201 # Call helper function which possibly converts this using DOS-style short mode.
57219 57202 # If so, the updated path is stored in $new_path.
57220 57203
57221 57204 input_path="$new_path"
57222 57205 # Check if we need to convert this using DOS-style short mode. If the path
57223 57206 # contains just simple characters, use it. Otherwise (spaces, weird characters),
57224 57207 # take no chances and rewrite it.
57225 57208 # Note: m4 eats our [], so we need to use [ and ] instead.
57226 57209 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57227 57210 if test "x$has_forbidden_chars" != x; then
57228 57211 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57229 57212 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57230 57213 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57231 57214 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57232 57215 # Going to short mode and back again did indeed matter. Since short mode is
57233 57216 # case insensitive, let's make it lowercase to improve readability.
57234 57217 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57235 57218 # Now convert it back to Unix-style (cygpath)
57236 57219 input_path=`$CYGPATH -u "$shortmode_path"`
57237 57220 new_path="$input_path"
57238 57221 fi
57239 57222 fi
57240 57223
57241 57224 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57242 57225 if test "x$test_cygdrive_prefix" = x; then
57243 57226 # As a simple fix, exclude /usr/bin since it's not a real path.
57244 57227 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57245 57228 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57246 57229 # a path prefixed by /cygdrive for fixpath to work.
57247 57230 new_path="$CYGWIN_ROOT_PATH$input_path"
57248 57231 fi
57249 57232 fi
57250 57233
57251 57234
57252 57235 if test "x$path" != "x$new_path"; then
57253 57236 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57254 57237 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57255 57238 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57256 57239 fi
57257 57240
57258 57241 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57259 57242
57260 57243 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57261 57244 has_colon=`$ECHO $path | $GREP ^.:`
57262 57245 new_path="$path"
57263 57246 if test "x$has_colon" = x; then
57264 57247 # Not in mixed or Windows style, start by that.
57265 57248 new_path=`cmd //c echo $path`
57266 57249 fi
57267 57250
57268 57251
57269 57252 input_path="$new_path"
57270 57253 # Check if we need to convert this using DOS-style short mode. If the path
57271 57254 # contains just simple characters, use it. Otherwise (spaces, weird characters),
57272 57255 # take no chances and rewrite it.
57273 57256 # Note: m4 eats our [], so we need to use [ and ] instead.
57274 57257 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57275 57258 if test "x$has_forbidden_chars" != x; then
57276 57259 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57277 57260 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57278 57261 fi
57279 57262
57280 57263
57281 57264 windows_path="$new_path"
57282 57265 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57283 57266 unix_path=`$CYGPATH -u "$windows_path"`
57284 57267 new_path="$unix_path"
57285 57268 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57286 57269 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57287 57270 new_path="$unix_path"
57288 57271 fi
57289 57272
57290 57273 if test "x$path" != "x$new_path"; then
57291 57274 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57292 57275 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57293 57276 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57294 57277 fi
57295 57278
57296 57279 # Save the first 10 bytes of this path to the storage, so fixpath can work.
57297 57280 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57298 57281
57299 57282 else
57300 57283 # We're on a unix platform. Hooray! :)
57301 57284 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57302 57285 has_space=`$ECHO "$path" | $GREP " "`
57303 57286 if test "x$has_space" != x; then
57304 57287 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57305 57288 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57306 57289 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57307 57290 fi
57308 57291
57309 57292 # Use eval to expand a potential ~
57310 57293 eval path="$path"
57311 57294 if test ! -f "$path" && test ! -d "$path"; then
57312 57295 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57313 57296 fi
57314 57297
57315 57298 if test -d "$path"; then
57316 57299 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57317 57300 else
57318 57301 dir="`$DIRNAME "$path"`"
57319 57302 base="`$BASENAME "$path"`"
57320 57303 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57321 57304 fi
57322 57305 fi
57323 57306 fi
57324 57307
57325 57308
57326 57309 # Only process if variable expands to non-empty
57327 57310
57328 57311 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57329 57312 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57330 57313
57331 57314 # Input might be given as Windows format, start by converting to
57332 57315 # unix format.
57333 57316 path="$POTENTIAL_FREETYPE_LIB_PATH"
57334 57317 new_path=`$CYGPATH -u "$path"`
57335 57318
57336 57319 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57337 57320 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57338 57321 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57339 57322 # "foo.exe" is OK but "foo" is an error.
57340 57323 #
57341 57324 # This test is therefore slightly more accurate than "test -f" to check for file precense.
57342 57325 # It is also a way to make sure we got the proper file name for the real test later on.
57343 57326 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57344 57327 if test "x$test_shortpath" = x; then
57345 57328 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57346 57329 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57347 57330 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57348 57331 fi
57349 57332
57350 57333 # Call helper function which possibly converts this using DOS-style short mode.
57351 57334 # If so, the updated path is stored in $new_path.
57352 57335
57353 57336 input_path="$new_path"
57354 57337 # Check if we need to convert this using DOS-style short mode. If the path
57355 57338 # contains just simple characters, use it. Otherwise (spaces, weird characters),
57356 57339 # take no chances and rewrite it.
57357 57340 # Note: m4 eats our [], so we need to use [ and ] instead.
57358 57341 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57359 57342 if test "x$has_forbidden_chars" != x; then
57360 57343 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57361 57344 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57362 57345 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57363 57346 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57364 57347 # Going to short mode and back again did indeed matter. Since short mode is
57365 57348 # case insensitive, let's make it lowercase to improve readability.
57366 57349 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57367 57350 # Now convert it back to Unix-style (cygpath)
57368 57351 input_path=`$CYGPATH -u "$shortmode_path"`
57369 57352 new_path="$input_path"
57370 57353 fi
57371 57354 fi
57372 57355
57373 57356 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57374 57357 if test "x$test_cygdrive_prefix" = x; then
57375 57358 # As a simple fix, exclude /usr/bin since it's not a real path.
57376 57359 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57377 57360 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57378 57361 # a path prefixed by /cygdrive for fixpath to work.
57379 57362 new_path="$CYGWIN_ROOT_PATH$input_path"
57380 57363 fi
57381 57364 fi
57382 57365
57383 57366
57384 57367 if test "x$path" != "x$new_path"; then
57385 57368 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57386 57369 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57387 57370 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57388 57371 fi
57389 57372
57390 57373 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57391 57374
57392 57375 path="$POTENTIAL_FREETYPE_LIB_PATH"
57393 57376 has_colon=`$ECHO $path | $GREP ^.:`
57394 57377 new_path="$path"
57395 57378 if test "x$has_colon" = x; then
57396 57379 # Not in mixed or Windows style, start by that.
57397 57380 new_path=`cmd //c echo $path`
57398 57381 fi
57399 57382
57400 57383
57401 57384 input_path="$new_path"
57402 57385 # Check if we need to convert this using DOS-style short mode. If the path
57403 57386 # contains just simple characters, use it. Otherwise (spaces, weird characters),
57404 57387 # take no chances and rewrite it.
57405 57388 # Note: m4 eats our [], so we need to use [ and ] instead.
57406 57389 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57407 57390 if test "x$has_forbidden_chars" != x; then
57408 57391 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57409 57392 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57410 57393 fi
57411 57394
57412 57395
57413 57396 windows_path="$new_path"
57414 57397 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57415 57398 unix_path=`$CYGPATH -u "$windows_path"`
57416 57399 new_path="$unix_path"
57417 57400 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57418 57401 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57419 57402 new_path="$unix_path"
57420 57403 fi
57421 57404
57422 57405 if test "x$path" != "x$new_path"; then
57423 57406 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57424 57407 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57425 57408 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57426 57409 fi
57427 57410
57428 57411 # Save the first 10 bytes of this path to the storage, so fixpath can work.
57429 57412 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57430 57413
57431 57414 else
57432 57415 # We're on a unix platform. Hooray! :)
57433 57416 path="$POTENTIAL_FREETYPE_LIB_PATH"
57434 57417 has_space=`$ECHO "$path" | $GREP " "`
57435 57418 if test "x$has_space" != x; then
57436 57419 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57437 57420 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57438 57421 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57439 57422 fi
57440 57423
57441 57424 # Use eval to expand a potential ~
57442 57425 eval path="$path"
57443 57426 if test ! -f "$path" && test ! -d "$path"; then
57444 57427 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57445 57428 fi
57446 57429
57447 57430 if test -d "$path"; then
57448 57431 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57449 57432 else
57450 57433 dir="`$DIRNAME "$path"`"
57451 57434 base="`$BASENAME "$path"`"
57452 57435 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57453 57436 fi
57454 57437 fi
57455 57438 fi
57456 57439
57457 57440
57458 57441 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57459 57442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57460 57443 $as_echo_n "checking for freetype includes... " >&6; }
57461 57444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57462 57445 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57463 57446 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57464 57447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57465 57448 $as_echo_n "checking for freetype libraries... " >&6; }
57466 57449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57467 57450 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57468 57451 fi
57469 57452
57470 57453 if test "x$FOUND_FREETYPE" != xyes; then
57471 57454 as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57472 57455 fi
57473 57456 else
57474 57457 { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57475 57458 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57476 57459 as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57477 57460 fi
57478 57461 else
57479 57462 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57480 57463 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57481 57464 fi
57482 57465 fi
57483 57466
57484 57467 if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57485 57468 # User has specified settings
57486 57469
57487 57470 if test "x$BUNDLE_FREETYPE" = x; then
57488 57471 # If not specified, default is to bundle freetype
57489 57472 BUNDLE_FREETYPE=yes
57490 57473 fi
57491 57474
57492 57475 if test "x$with_freetype" != x; then
57493 57476 POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57494 57477 POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57495 57478 fi
57496 57479
57497 57480 # Allow --with-freetype-lib and --with-freetype-include to override
57498 57481 if test "x$with_freetype_include" != x; then
57499 57482 POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57500 57483 fi
57501 57484 if test "x$with_freetype_lib" != x; then
57502 57485 POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57503 57486 fi
57504 57487
57505 57488 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57506 57489 # Okay, we got it. Check that it works.
57507 57490
57508 57491 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57509 57492 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57510 57493 METHOD="--with-freetype"
57511 57494
57512 57495 # Let's start with an optimistic view of the world :-)
57513 57496 FOUND_FREETYPE=yes
57514 57497
57515 57498 # First look for the canonical freetype main include file ft2build.h.
57516 57499 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57517 57500 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57518 57501 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57519 57502 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57520 57503 # Fail.
57521 57504 FOUND_FREETYPE=no
57522 57505 fi
57523 57506 fi
57524 57507
57525 57508 if test "x$FOUND_FREETYPE" = xyes; then
57526 57509 # Include file found, let's continue the sanity check.
57527 57510 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57528 57511 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57529 57512
57530 57513 # Reset to default value
57531 57514 FREETYPE_BASE_NAME=freetype
57532 57515 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57533 57516 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57534 57517 if test "x$OPENJDK_TARGET_OS" = xmacosx \
57535 57518 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57536 57519 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57537 57520 # for the .6 version explicitly.
57538 57521 FREETYPE_BASE_NAME=freetype.6
57539 57522 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57540 57523 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57541 57524 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57542 57525 else
57543 57526 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57544 57527 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57545 57528 FOUND_FREETYPE=no
57546 57529 fi
57547 57530 else
57548 57531 if test "x$OPENJDK_TARGET_OS" = xwindows; then
57549 57532 # On Windows, we will need both .lib and .dll file.
57550 57533 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57551 57534 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57552 57535 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57553 57536 FOUND_FREETYPE=no
57554 57537 fi
57555 57538 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57556 57539 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57557 57540 # Found lib in isa dir, use that instead.
57558 57541 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57559 57542 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57560 57543 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57561 57544 fi
57562 57545 fi
57563 57546 fi
57564 57547
57565 57548 if test "x$FOUND_FREETYPE" = xyes; then
57566 57549
57567 57550 # Only process if variable expands to non-empty
57568 57551
57569 57552 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57570 57553 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57571 57554
57572 57555 # Input might be given as Windows format, start by converting to
57573 57556 # unix format.
57574 57557 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57575 57558 new_path=`$CYGPATH -u "$path"`
57576 57559
57577 57560 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57578 57561 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57579 57562 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57580 57563 # "foo.exe" is OK but "foo" is an error.
57581 57564 #
57582 57565 # This test is therefore slightly more accurate than "test -f" to check for file precense.
57583 57566 # It is also a way to make sure we got the proper file name for the real test later on.
57584 57567 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57585 57568 if test "x$test_shortpath" = x; then
57586 57569 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57587 57570 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57588 57571 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57589 57572 fi
57590 57573
57591 57574 # Call helper function which possibly converts this using DOS-style short mode.
57592 57575 # If so, the updated path is stored in $new_path.
57593 57576
57594 57577 input_path="$new_path"
57595 57578 # Check if we need to convert this using DOS-style short mode. If the path
57596 57579 # contains just simple characters, use it. Otherwise (spaces, weird characters),
57597 57580 # take no chances and rewrite it.
57598 57581 # Note: m4 eats our [], so we need to use [ and ] instead.
57599 57582 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57600 57583 if test "x$has_forbidden_chars" != x; then
57601 57584 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57602 57585 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57603 57586 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57604 57587 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57605 57588 # Going to short mode and back again did indeed matter. Since short mode is
57606 57589 # case insensitive, let's make it lowercase to improve readability.
57607 57590 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57608 57591 # Now convert it back to Unix-style (cygpath)
57609 57592 input_path=`$CYGPATH -u "$shortmode_path"`
57610 57593 new_path="$input_path"
57611 57594 fi
57612 57595 fi
57613 57596
57614 57597 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57615 57598 if test "x$test_cygdrive_prefix" = x; then
57616 57599 # As a simple fix, exclude /usr/bin since it's not a real path.
57617 57600 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57618 57601 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57619 57602 # a path prefixed by /cygdrive for fixpath to work.
57620 57603 new_path="$CYGWIN_ROOT_PATH$input_path"
57621 57604 fi
57622 57605 fi
57623 57606
57624 57607
57625 57608 if test "x$path" != "x$new_path"; then
57626 57609 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57627 57610 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57628 57611 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57629 57612 fi
57630 57613
57631 57614 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57632 57615
57633 57616 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57634 57617 has_colon=`$ECHO $path | $GREP ^.:`
57635 57618 new_path="$path"
57636 57619 if test "x$has_colon" = x; then
57637 57620 # Not in mixed or Windows style, start by that.
57638 57621 new_path=`cmd //c echo $path`
57639 57622 fi
57640 57623
57641 57624
57642 57625 input_path="$new_path"
57643 57626 # Check if we need to convert this using DOS-style short mode. If the path
57644 57627 # contains just simple characters, use it. Otherwise (spaces, weird characters),
57645 57628 # take no chances and rewrite it.
57646 57629 # Note: m4 eats our [], so we need to use [ and ] instead.
57647 57630 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57648 57631 if test "x$has_forbidden_chars" != x; then
57649 57632 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57650 57633 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57651 57634 fi
57652 57635
57653 57636
57654 57637 windows_path="$new_path"
57655 57638 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57656 57639 unix_path=`$CYGPATH -u "$windows_path"`
57657 57640 new_path="$unix_path"
57658 57641 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57659 57642 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57660 57643 new_path="$unix_path"
57661 57644 fi
57662 57645
57663 57646 if test "x$path" != "x$new_path"; then
57664 57647 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57665 57648 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57666 57649 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57667 57650 fi
57668 57651
57669 57652 # Save the first 10 bytes of this path to the storage, so fixpath can work.
57670 57653 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57671 57654
57672 57655 else
57673 57656 # We're on a unix platform. Hooray! :)
57674 57657 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57675 57658 has_space=`$ECHO "$path" | $GREP " "`
57676 57659 if test "x$has_space" != x; then
57677 57660 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57678 57661 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57679 57662 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57680 57663 fi
57681 57664
57682 57665 # Use eval to expand a potential ~
57683 57666 eval path="$path"
57684 57667 if test ! -f "$path" && test ! -d "$path"; then
57685 57668 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57686 57669 fi
57687 57670
57688 57671 if test -d "$path"; then
57689 57672 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57690 57673 else
57691 57674 dir="`$DIRNAME "$path"`"
57692 57675 base="`$BASENAME "$path"`"
57693 57676 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57694 57677 fi
57695 57678 fi
57696 57679 fi
57697 57680
57698 57681
57699 57682 # Only process if variable expands to non-empty
57700 57683
57701 57684 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57702 57685 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57703 57686
57704 57687 # Input might be given as Windows format, start by converting to
57705 57688 # unix format.
57706 57689 path="$POTENTIAL_FREETYPE_LIB_PATH"
57707 57690 new_path=`$CYGPATH -u "$path"`
57708 57691
57709 57692 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57710 57693 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57711 57694 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57712 57695 # "foo.exe" is OK but "foo" is an error.
57713 57696 #
57714 57697 # This test is therefore slightly more accurate than "test -f" to check for file precense.
57715 57698 # It is also a way to make sure we got the proper file name for the real test later on.
57716 57699 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57717 57700 if test "x$test_shortpath" = x; then
57718 57701 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57719 57702 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57720 57703 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57721 57704 fi
57722 57705
57723 57706 # Call helper function which possibly converts this using DOS-style short mode.
57724 57707 # If so, the updated path is stored in $new_path.
57725 57708
57726 57709 input_path="$new_path"
57727 57710 # Check if we need to convert this using DOS-style short mode. If the path
57728 57711 # contains just simple characters, use it. Otherwise (spaces, weird characters),
57729 57712 # take no chances and rewrite it.
57730 57713 # Note: m4 eats our [], so we need to use [ and ] instead.
57731 57714 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57732 57715 if test "x$has_forbidden_chars" != x; then
57733 57716 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57734 57717 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57735 57718 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57736 57719 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57737 57720 # Going to short mode and back again did indeed matter. Since short mode is
57738 57721 # case insensitive, let's make it lowercase to improve readability.
57739 57722 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57740 57723 # Now convert it back to Unix-style (cygpath)
57741 57724 input_path=`$CYGPATH -u "$shortmode_path"`
57742 57725 new_path="$input_path"
57743 57726 fi
57744 57727 fi
57745 57728
57746 57729 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57747 57730 if test "x$test_cygdrive_prefix" = x; then
57748 57731 # As a simple fix, exclude /usr/bin since it's not a real path.
57749 57732 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57750 57733 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57751 57734 # a path prefixed by /cygdrive for fixpath to work.
57752 57735 new_path="$CYGWIN_ROOT_PATH$input_path"
57753 57736 fi
57754 57737 fi
57755 57738
57756 57739
57757 57740 if test "x$path" != "x$new_path"; then
57758 57741 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57759 57742 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57760 57743 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57761 57744 fi
57762 57745
57763 57746 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57764 57747
57765 57748 path="$POTENTIAL_FREETYPE_LIB_PATH"
57766 57749 has_colon=`$ECHO $path | $GREP ^.:`
57767 57750 new_path="$path"
57768 57751 if test "x$has_colon" = x; then
57769 57752 # Not in mixed or Windows style, start by that.
57770 57753 new_path=`cmd //c echo $path`
57771 57754 fi
57772 57755
57773 57756
57774 57757 input_path="$new_path"
57775 57758 # Check if we need to convert this using DOS-style short mode. If the path
57776 57759 # contains just simple characters, use it. Otherwise (spaces, weird characters),
57777 57760 # take no chances and rewrite it.
57778 57761 # Note: m4 eats our [], so we need to use [ and ] instead.
57779 57762 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57780 57763 if test "x$has_forbidden_chars" != x; then
57781 57764 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57782 57765 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57783 57766 fi
57784 57767
57785 57768
57786 57769 windows_path="$new_path"
57787 57770 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57788 57771 unix_path=`$CYGPATH -u "$windows_path"`
57789 57772 new_path="$unix_path"
57790 57773 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57791 57774 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57792 57775 new_path="$unix_path"
57793 57776 fi
57794 57777
57795 57778 if test "x$path" != "x$new_path"; then
57796 57779 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57797 57780 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57798 57781 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57799 57782 fi
57800 57783
57801 57784 # Save the first 10 bytes of this path to the storage, so fixpath can work.
57802 57785 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57803 57786
57804 57787 else
57805 57788 # We're on a unix platform. Hooray! :)
57806 57789 path="$POTENTIAL_FREETYPE_LIB_PATH"
57807 57790 has_space=`$ECHO "$path" | $GREP " "`
57808 57791 if test "x$has_space" != x; then
57809 57792 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57810 57793 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57811 57794 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57812 57795 fi
57813 57796
57814 57797 # Use eval to expand a potential ~
57815 57798 eval path="$path"
57816 57799 if test ! -f "$path" && test ! -d "$path"; then
57817 57800 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57818 57801 fi
57819 57802
57820 57803 if test -d "$path"; then
57821 57804 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57822 57805 else
57823 57806 dir="`$DIRNAME "$path"`"
57824 57807 base="`$BASENAME "$path"`"
57825 57808 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57826 57809 fi
57827 57810 fi
57828 57811 fi
57829 57812
57830 57813
57831 57814 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57832 57815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57833 57816 $as_echo_n "checking for freetype includes... " >&6; }
57834 57817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57835 57818 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57836 57819 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57837 57820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57838 57821 $as_echo_n "checking for freetype libraries... " >&6; }
57839 57822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57840 57823 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57841 57824 fi
57842 57825
57843 57826 if test "x$FOUND_FREETYPE" != xyes; then
57844 57827 as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57845 57828 fi
57846 57829 else
57847 57830 # User specified only one of lib or include. This is an error.
57848 57831 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57849 57832 { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57850 57833 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57851 57834 as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57852 57835 else
57853 57836 { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57854 57837 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57855 57838 as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57856 57839 fi
57857 57840 fi
57858 57841 else
57859 57842 # User did not specify settings, but we need freetype. Try to locate it.
57860 57843
57861 57844 if test "x$BUNDLE_FREETYPE" = x; then
57862 57845 # If not specified, default is to bundle freetype only on windows
57863 57846 if test "x$OPENJDK_TARGET_OS" = xwindows; then
57864 57847 BUNDLE_FREETYPE=yes
57865 57848 else
57866 57849 BUNDLE_FREETYPE=no
57867 57850 fi
57868 57851 fi
57869 57852
57870 57853 # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57871 57854 if test "x$SYSROOT" = x; then
57872 57855 if test "x$FOUND_FREETYPE" != xyes; then
57873 57856 # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57874 57857 if test "x$PKG_CONFIG" != x; then
57875 57858
57876 57859 pkg_failed=no
57877 57860 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57878 57861 $as_echo_n "checking for FREETYPE... " >&6; }
57879 57862
57880 57863 if test -n "$FREETYPE_CFLAGS"; then
57881 57864 pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57882 57865 elif test -n "$PKG_CONFIG"; then
57883 57866 if test -n "$PKG_CONFIG" && \
57884 57867 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57885 57868 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57886 57869 ac_status=$?
57887 57870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57888 57871 test $ac_status = 0; }; then
57889 57872 pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57890 57873 else
57891 57874 pkg_failed=yes
57892 57875 fi
57893 57876 else
57894 57877 pkg_failed=untried
57895 57878 fi
57896 57879 if test -n "$FREETYPE_LIBS"; then
57897 57880 pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57898 57881 elif test -n "$PKG_CONFIG"; then
57899 57882 if test -n "$PKG_CONFIG" && \
57900 57883 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57901 57884 ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57902 57885 ac_status=$?
57903 57886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57904 57887 test $ac_status = 0; }; then
57905 57888 pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57906 57889 else
57907 57890 pkg_failed=yes
57908 57891 fi
57909 57892 else
57910 57893 pkg_failed=untried
57911 57894 fi
57912 57895
57913 57896
57914 57897
57915 57898 if test $pkg_failed = yes; then
57916 57899
57917 57900 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57918 57901 _pkg_short_errors_supported=yes
57919 57902 else
57920 57903 _pkg_short_errors_supported=no
57921 57904 fi
57922 57905 if test $_pkg_short_errors_supported = yes; then
57923 57906 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57924 57907 else
57925 57908 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57926 57909 fi
57927 57910 # Put the nasty error message in config.log where it belongs
57928 57911 echo "$FREETYPE_PKG_ERRORS" >&5
57929 57912
57930 57913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57931 57914 $as_echo "no" >&6; }
57932 57915 FOUND_FREETYPE=no
57933 57916 elif test $pkg_failed = untried; then
57934 57917 FOUND_FREETYPE=no
57935 57918 else
57936 57919 FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57937 57920 FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57938 57921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57939 57922 $as_echo "yes" >&6; }
57940 57923 FOUND_FREETYPE=yes
57941 57924 fi
57942 57925 if test "x$FOUND_FREETYPE" = xyes; then
57943 57926 # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57944 57927 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57945 57928 # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57946 57929 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57947 57930 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57948 57931 fi
57949 57932 # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57950 57933 if test "x$BUNDLE_FREETYPE" = xyes; then
57951 57934 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57952 57935 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57953 57936 FOUND_FREETYPE=no
57954 57937 else
57955 57938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57956 57939 $as_echo_n "checking for freetype... " >&6; }
57957 57940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57958 57941 $as_echo "yes (using pkg-config)" >&6; }
57959 57942 fi
57960 57943 fi
57961 57944 fi
57962 57945 fi
57963 57946 fi
57964 57947
57965 57948 if test "x$FOUND_FREETYPE" != xyes; then
57966 57949 # Check in well-known locations
57967 57950 if test "x$OPENJDK_TARGET_OS" = xwindows; then
57968 57951 FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57969 57952
57970 57953 windows_path="$FREETYPE_BASE_DIR"
57971 57954 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57972 57955 unix_path=`$CYGPATH -u "$windows_path"`
57973 57956 FREETYPE_BASE_DIR="$unix_path"
57974 57957 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57975 57958 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57976 57959 FREETYPE_BASE_DIR="$unix_path"
57977 57960 fi
57978 57961
57979 57962
57980 57963 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57981 57964 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57982 57965 METHOD="well-known location"
57983 57966
57984 57967 # Let's start with an optimistic view of the world :-)
57985 57968 FOUND_FREETYPE=yes
57986 57969
57987 57970 # First look for the canonical freetype main include file ft2build.h.
57988 57971 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57989 57972 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57990 57973 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57991 57974 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57992 57975 # Fail.
57993 57976 FOUND_FREETYPE=no
57994 57977 fi
57995 57978 fi
57996 57979
57997 57980 if test "x$FOUND_FREETYPE" = xyes; then
57998 57981 # Include file found, let's continue the sanity check.
57999 57982 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58000 57983 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58001 57984
58002 57985 # Reset to default value
58003 57986 FREETYPE_BASE_NAME=freetype
58004 57987 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58005 57988 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58006 57989 if test "x$OPENJDK_TARGET_OS" = xmacosx \
58007 57990 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58008 57991 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58009 57992 # for the .6 version explicitly.
58010 57993 FREETYPE_BASE_NAME=freetype.6
58011 57994 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58012 57995 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58013 57996 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58014 57997 else
58015 57998 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58016 57999 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58017 58000 FOUND_FREETYPE=no
58018 58001 fi
58019 58002 else
58020 58003 if test "x$OPENJDK_TARGET_OS" = xwindows; then
58021 58004 # On Windows, we will need both .lib and .dll file.
58022 58005 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58023 58006 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58024 58007 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58025 58008 FOUND_FREETYPE=no
58026 58009 fi
58027 58010 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58028 58011 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58029 58012 # Found lib in isa dir, use that instead.
58030 58013 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58031 58014 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58032 58015 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58033 58016 fi
58034 58017 fi
58035 58018 fi
58036 58019
58037 58020 if test "x$FOUND_FREETYPE" = xyes; then
58038 58021
58039 58022 # Only process if variable expands to non-empty
58040 58023
58041 58024 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58042 58025 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58043 58026
58044 58027 # Input might be given as Windows format, start by converting to
58045 58028 # unix format.
58046 58029 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58047 58030 new_path=`$CYGPATH -u "$path"`
58048 58031
58049 58032 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58050 58033 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58051 58034 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58052 58035 # "foo.exe" is OK but "foo" is an error.
58053 58036 #
58054 58037 # This test is therefore slightly more accurate than "test -f" to check for file precense.
58055 58038 # It is also a way to make sure we got the proper file name for the real test later on.
58056 58039 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58057 58040 if test "x$test_shortpath" = x; then
58058 58041 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58059 58042 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58060 58043 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58061 58044 fi
58062 58045
58063 58046 # Call helper function which possibly converts this using DOS-style short mode.
58064 58047 # If so, the updated path is stored in $new_path.
58065 58048
58066 58049 input_path="$new_path"
58067 58050 # Check if we need to convert this using DOS-style short mode. If the path
58068 58051 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58069 58052 # take no chances and rewrite it.
58070 58053 # Note: m4 eats our [], so we need to use [ and ] instead.
58071 58054 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58072 58055 if test "x$has_forbidden_chars" != x; then
58073 58056 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58074 58057 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58075 58058 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58076 58059 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58077 58060 # Going to short mode and back again did indeed matter. Since short mode is
58078 58061 # case insensitive, let's make it lowercase to improve readability.
58079 58062 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58080 58063 # Now convert it back to Unix-style (cygpath)
58081 58064 input_path=`$CYGPATH -u "$shortmode_path"`
58082 58065 new_path="$input_path"
58083 58066 fi
58084 58067 fi
58085 58068
58086 58069 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58087 58070 if test "x$test_cygdrive_prefix" = x; then
58088 58071 # As a simple fix, exclude /usr/bin since it's not a real path.
58089 58072 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58090 58073 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58091 58074 # a path prefixed by /cygdrive for fixpath to work.
58092 58075 new_path="$CYGWIN_ROOT_PATH$input_path"
58093 58076 fi
58094 58077 fi
58095 58078
58096 58079
58097 58080 if test "x$path" != "x$new_path"; then
58098 58081 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58099 58082 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58100 58083 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58101 58084 fi
58102 58085
58103 58086 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58104 58087
58105 58088 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58106 58089 has_colon=`$ECHO $path | $GREP ^.:`
58107 58090 new_path="$path"
58108 58091 if test "x$has_colon" = x; then
58109 58092 # Not in mixed or Windows style, start by that.
58110 58093 new_path=`cmd //c echo $path`
58111 58094 fi
58112 58095
58113 58096
58114 58097 input_path="$new_path"
58115 58098 # Check if we need to convert this using DOS-style short mode. If the path
58116 58099 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58117 58100 # take no chances and rewrite it.
58118 58101 # Note: m4 eats our [], so we need to use [ and ] instead.
58119 58102 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58120 58103 if test "x$has_forbidden_chars" != x; then
58121 58104 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58122 58105 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58123 58106 fi
58124 58107
58125 58108
58126 58109 windows_path="$new_path"
58127 58110 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58128 58111 unix_path=`$CYGPATH -u "$windows_path"`
58129 58112 new_path="$unix_path"
58130 58113 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58131 58114 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58132 58115 new_path="$unix_path"
58133 58116 fi
58134 58117
58135 58118 if test "x$path" != "x$new_path"; then
58136 58119 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58137 58120 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58138 58121 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58139 58122 fi
58140 58123
58141 58124 # Save the first 10 bytes of this path to the storage, so fixpath can work.
58142 58125 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58143 58126
58144 58127 else
58145 58128 # We're on a unix platform. Hooray! :)
58146 58129 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58147 58130 has_space=`$ECHO "$path" | $GREP " "`
58148 58131 if test "x$has_space" != x; then
58149 58132 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58150 58133 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58151 58134 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58152 58135 fi
58153 58136
58154 58137 # Use eval to expand a potential ~
58155 58138 eval path="$path"
58156 58139 if test ! -f "$path" && test ! -d "$path"; then
58157 58140 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58158 58141 fi
58159 58142
58160 58143 if test -d "$path"; then
58161 58144 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58162 58145 else
58163 58146 dir="`$DIRNAME "$path"`"
58164 58147 base="`$BASENAME "$path"`"
58165 58148 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58166 58149 fi
58167 58150 fi
58168 58151 fi
58169 58152
58170 58153
58171 58154 # Only process if variable expands to non-empty
58172 58155
58173 58156 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58174 58157 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58175 58158
58176 58159 # Input might be given as Windows format, start by converting to
58177 58160 # unix format.
58178 58161 path="$POTENTIAL_FREETYPE_LIB_PATH"
58179 58162 new_path=`$CYGPATH -u "$path"`
58180 58163
58181 58164 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58182 58165 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58183 58166 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58184 58167 # "foo.exe" is OK but "foo" is an error.
58185 58168 #
58186 58169 # This test is therefore slightly more accurate than "test -f" to check for file precense.
58187 58170 # It is also a way to make sure we got the proper file name for the real test later on.
58188 58171 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58189 58172 if test "x$test_shortpath" = x; then
58190 58173 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58191 58174 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58192 58175 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58193 58176 fi
58194 58177
58195 58178 # Call helper function which possibly converts this using DOS-style short mode.
58196 58179 # If so, the updated path is stored in $new_path.
58197 58180
58198 58181 input_path="$new_path"
58199 58182 # Check if we need to convert this using DOS-style short mode. If the path
58200 58183 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58201 58184 # take no chances and rewrite it.
58202 58185 # Note: m4 eats our [], so we need to use [ and ] instead.
58203 58186 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58204 58187 if test "x$has_forbidden_chars" != x; then
58205 58188 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58206 58189 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58207 58190 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58208 58191 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58209 58192 # Going to short mode and back again did indeed matter. Since short mode is
58210 58193 # case insensitive, let's make it lowercase to improve readability.
58211 58194 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58212 58195 # Now convert it back to Unix-style (cygpath)
58213 58196 input_path=`$CYGPATH -u "$shortmode_path"`
58214 58197 new_path="$input_path"
58215 58198 fi
58216 58199 fi
58217 58200
58218 58201 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58219 58202 if test "x$test_cygdrive_prefix" = x; then
58220 58203 # As a simple fix, exclude /usr/bin since it's not a real path.
58221 58204 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58222 58205 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58223 58206 # a path prefixed by /cygdrive for fixpath to work.
58224 58207 new_path="$CYGWIN_ROOT_PATH$input_path"
58225 58208 fi
58226 58209 fi
58227 58210
58228 58211
58229 58212 if test "x$path" != "x$new_path"; then
58230 58213 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58231 58214 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58232 58215 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58233 58216 fi
58234 58217
58235 58218 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58236 58219
58237 58220 path="$POTENTIAL_FREETYPE_LIB_PATH"
58238 58221 has_colon=`$ECHO $path | $GREP ^.:`
58239 58222 new_path="$path"
58240 58223 if test "x$has_colon" = x; then
58241 58224 # Not in mixed or Windows style, start by that.
58242 58225 new_path=`cmd //c echo $path`
58243 58226 fi
58244 58227
58245 58228
58246 58229 input_path="$new_path"
58247 58230 # Check if we need to convert this using DOS-style short mode. If the path
58248 58231 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58249 58232 # take no chances and rewrite it.
58250 58233 # Note: m4 eats our [], so we need to use [ and ] instead.
58251 58234 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58252 58235 if test "x$has_forbidden_chars" != x; then
58253 58236 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58254 58237 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58255 58238 fi
58256 58239
58257 58240
58258 58241 windows_path="$new_path"
58259 58242 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58260 58243 unix_path=`$CYGPATH -u "$windows_path"`
58261 58244 new_path="$unix_path"
58262 58245 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58263 58246 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58264 58247 new_path="$unix_path"
58265 58248 fi
58266 58249
58267 58250 if test "x$path" != "x$new_path"; then
58268 58251 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58269 58252 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58270 58253 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58271 58254 fi
58272 58255
58273 58256 # Save the first 10 bytes of this path to the storage, so fixpath can work.
58274 58257 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58275 58258
58276 58259 else
58277 58260 # We're on a unix platform. Hooray! :)
58278 58261 path="$POTENTIAL_FREETYPE_LIB_PATH"
58279 58262 has_space=`$ECHO "$path" | $GREP " "`
58280 58263 if test "x$has_space" != x; then
58281 58264 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58282 58265 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58283 58266 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58284 58267 fi
58285 58268
58286 58269 # Use eval to expand a potential ~
58287 58270 eval path="$path"
58288 58271 if test ! -f "$path" && test ! -d "$path"; then
58289 58272 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58290 58273 fi
58291 58274
58292 58275 if test -d "$path"; then
58293 58276 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58294 58277 else
58295 58278 dir="`$DIRNAME "$path"`"
58296 58279 base="`$BASENAME "$path"`"
58297 58280 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58298 58281 fi
58299 58282 fi
58300 58283 fi
58301 58284
58302 58285
58303 58286 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58304 58287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58305 58288 $as_echo_n "checking for freetype includes... " >&6; }
58306 58289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58307 58290 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58308 58291 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58309 58292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58310 58293 $as_echo_n "checking for freetype libraries... " >&6; }
58311 58294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58312 58295 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58313 58296 fi
58314 58297
58315 58298 if test "x$FOUND_FREETYPE" != xyes; then
58316 58299 FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58317 58300
58318 58301 windows_path="$FREETYPE_BASE_DIR"
58319 58302 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58320 58303 unix_path=`$CYGPATH -u "$windows_path"`
58321 58304 FREETYPE_BASE_DIR="$unix_path"
58322 58305 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58323 58306 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58324 58307 FREETYPE_BASE_DIR="$unix_path"
58325 58308 fi
58326 58309
58327 58310
58328 58311 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58329 58312 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58330 58313 METHOD="well-known location"
58331 58314
58332 58315 # Let's start with an optimistic view of the world :-)
58333 58316 FOUND_FREETYPE=yes
58334 58317
58335 58318 # First look for the canonical freetype main include file ft2build.h.
58336 58319 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58337 58320 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58338 58321 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58339 58322 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58340 58323 # Fail.
58341 58324 FOUND_FREETYPE=no
58342 58325 fi
58343 58326 fi
58344 58327
58345 58328 if test "x$FOUND_FREETYPE" = xyes; then
58346 58329 # Include file found, let's continue the sanity check.
58347 58330 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58348 58331 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58349 58332
58350 58333 # Reset to default value
58351 58334 FREETYPE_BASE_NAME=freetype
58352 58335 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58353 58336 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58354 58337 if test "x$OPENJDK_TARGET_OS" = xmacosx \
58355 58338 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58356 58339 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58357 58340 # for the .6 version explicitly.
58358 58341 FREETYPE_BASE_NAME=freetype.6
58359 58342 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58360 58343 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58361 58344 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58362 58345 else
58363 58346 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58364 58347 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58365 58348 FOUND_FREETYPE=no
58366 58349 fi
58367 58350 else
58368 58351 if test "x$OPENJDK_TARGET_OS" = xwindows; then
58369 58352 # On Windows, we will need both .lib and .dll file.
58370 58353 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58371 58354 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58372 58355 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58373 58356 FOUND_FREETYPE=no
58374 58357 fi
58375 58358 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58376 58359 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58377 58360 # Found lib in isa dir, use that instead.
58378 58361 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58379 58362 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58380 58363 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58381 58364 fi
58382 58365 fi
58383 58366 fi
58384 58367
58385 58368 if test "x$FOUND_FREETYPE" = xyes; then
58386 58369
58387 58370 # Only process if variable expands to non-empty
58388 58371
58389 58372 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58390 58373 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58391 58374
58392 58375 # Input might be given as Windows format, start by converting to
58393 58376 # unix format.
58394 58377 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58395 58378 new_path=`$CYGPATH -u "$path"`
58396 58379
58397 58380 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58398 58381 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58399 58382 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58400 58383 # "foo.exe" is OK but "foo" is an error.
58401 58384 #
58402 58385 # This test is therefore slightly more accurate than "test -f" to check for file precense.
58403 58386 # It is also a way to make sure we got the proper file name for the real test later on.
58404 58387 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58405 58388 if test "x$test_shortpath" = x; then
58406 58389 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58407 58390 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58408 58391 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58409 58392 fi
58410 58393
58411 58394 # Call helper function which possibly converts this using DOS-style short mode.
58412 58395 # If so, the updated path is stored in $new_path.
58413 58396
58414 58397 input_path="$new_path"
58415 58398 # Check if we need to convert this using DOS-style short mode. If the path
58416 58399 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58417 58400 # take no chances and rewrite it.
58418 58401 # Note: m4 eats our [], so we need to use [ and ] instead.
58419 58402 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58420 58403 if test "x$has_forbidden_chars" != x; then
58421 58404 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58422 58405 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58423 58406 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58424 58407 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58425 58408 # Going to short mode and back again did indeed matter. Since short mode is
58426 58409 # case insensitive, let's make it lowercase to improve readability.
58427 58410 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58428 58411 # Now convert it back to Unix-style (cygpath)
58429 58412 input_path=`$CYGPATH -u "$shortmode_path"`
58430 58413 new_path="$input_path"
58431 58414 fi
58432 58415 fi
58433 58416
58434 58417 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58435 58418 if test "x$test_cygdrive_prefix" = x; then
58436 58419 # As a simple fix, exclude /usr/bin since it's not a real path.
58437 58420 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58438 58421 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58439 58422 # a path prefixed by /cygdrive for fixpath to work.
58440 58423 new_path="$CYGWIN_ROOT_PATH$input_path"
58441 58424 fi
58442 58425 fi
58443 58426
58444 58427
58445 58428 if test "x$path" != "x$new_path"; then
58446 58429 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58447 58430 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58448 58431 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58449 58432 fi
58450 58433
58451 58434 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58452 58435
58453 58436 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58454 58437 has_colon=`$ECHO $path | $GREP ^.:`
58455 58438 new_path="$path"
58456 58439 if test "x$has_colon" = x; then
58457 58440 # Not in mixed or Windows style, start by that.
58458 58441 new_path=`cmd //c echo $path`
58459 58442 fi
58460 58443
58461 58444
58462 58445 input_path="$new_path"
58463 58446 # Check if we need to convert this using DOS-style short mode. If the path
58464 58447 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58465 58448 # take no chances and rewrite it.
58466 58449 # Note: m4 eats our [], so we need to use [ and ] instead.
58467 58450 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58468 58451 if test "x$has_forbidden_chars" != x; then
58469 58452 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58470 58453 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58471 58454 fi
58472 58455
58473 58456
58474 58457 windows_path="$new_path"
58475 58458 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58476 58459 unix_path=`$CYGPATH -u "$windows_path"`
58477 58460 new_path="$unix_path"
58478 58461 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58479 58462 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58480 58463 new_path="$unix_path"
58481 58464 fi
58482 58465
58483 58466 if test "x$path" != "x$new_path"; then
58484 58467 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58485 58468 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58486 58469 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58487 58470 fi
58488 58471
58489 58472 # Save the first 10 bytes of this path to the storage, so fixpath can work.
58490 58473 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58491 58474
58492 58475 else
58493 58476 # We're on a unix platform. Hooray! :)
58494 58477 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58495 58478 has_space=`$ECHO "$path" | $GREP " "`
58496 58479 if test "x$has_space" != x; then
58497 58480 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58498 58481 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58499 58482 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58500 58483 fi
58501 58484
58502 58485 # Use eval to expand a potential ~
58503 58486 eval path="$path"
58504 58487 if test ! -f "$path" && test ! -d "$path"; then
58505 58488 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58506 58489 fi
58507 58490
58508 58491 if test -d "$path"; then
58509 58492 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58510 58493 else
58511 58494 dir="`$DIRNAME "$path"`"
58512 58495 base="`$BASENAME "$path"`"
58513 58496 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58514 58497 fi
58515 58498 fi
58516 58499 fi
58517 58500
58518 58501
58519 58502 # Only process if variable expands to non-empty
58520 58503
58521 58504 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58522 58505 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58523 58506
58524 58507 # Input might be given as Windows format, start by converting to
58525 58508 # unix format.
58526 58509 path="$POTENTIAL_FREETYPE_LIB_PATH"
58527 58510 new_path=`$CYGPATH -u "$path"`
58528 58511
58529 58512 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58530 58513 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58531 58514 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58532 58515 # "foo.exe" is OK but "foo" is an error.
58533 58516 #
58534 58517 # This test is therefore slightly more accurate than "test -f" to check for file precense.
58535 58518 # It is also a way to make sure we got the proper file name for the real test later on.
58536 58519 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58537 58520 if test "x$test_shortpath" = x; then
58538 58521 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58539 58522 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58540 58523 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58541 58524 fi
58542 58525
58543 58526 # Call helper function which possibly converts this using DOS-style short mode.
58544 58527 # If so, the updated path is stored in $new_path.
58545 58528
58546 58529 input_path="$new_path"
58547 58530 # Check if we need to convert this using DOS-style short mode. If the path
58548 58531 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58549 58532 # take no chances and rewrite it.
58550 58533 # Note: m4 eats our [], so we need to use [ and ] instead.
58551 58534 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58552 58535 if test "x$has_forbidden_chars" != x; then
58553 58536 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58554 58537 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58555 58538 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58556 58539 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58557 58540 # Going to short mode and back again did indeed matter. Since short mode is
58558 58541 # case insensitive, let's make it lowercase to improve readability.
58559 58542 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58560 58543 # Now convert it back to Unix-style (cygpath)
58561 58544 input_path=`$CYGPATH -u "$shortmode_path"`
58562 58545 new_path="$input_path"
58563 58546 fi
58564 58547 fi
58565 58548
58566 58549 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58567 58550 if test "x$test_cygdrive_prefix" = x; then
58568 58551 # As a simple fix, exclude /usr/bin since it's not a real path.
58569 58552 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58570 58553 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58571 58554 # a path prefixed by /cygdrive for fixpath to work.
58572 58555 new_path="$CYGWIN_ROOT_PATH$input_path"
58573 58556 fi
58574 58557 fi
58575 58558
58576 58559
58577 58560 if test "x$path" != "x$new_path"; then
58578 58561 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58579 58562 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58580 58563 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58581 58564 fi
58582 58565
58583 58566 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58584 58567
58585 58568 path="$POTENTIAL_FREETYPE_LIB_PATH"
58586 58569 has_colon=`$ECHO $path | $GREP ^.:`
58587 58570 new_path="$path"
58588 58571 if test "x$has_colon" = x; then
58589 58572 # Not in mixed or Windows style, start by that.
58590 58573 new_path=`cmd //c echo $path`
58591 58574 fi
58592 58575
58593 58576
58594 58577 input_path="$new_path"
58595 58578 # Check if we need to convert this using DOS-style short mode. If the path
58596 58579 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58597 58580 # take no chances and rewrite it.
58598 58581 # Note: m4 eats our [], so we need to use [ and ] instead.
58599 58582 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58600 58583 if test "x$has_forbidden_chars" != x; then
58601 58584 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58602 58585 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58603 58586 fi
58604 58587
58605 58588
58606 58589 windows_path="$new_path"
58607 58590 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58608 58591 unix_path=`$CYGPATH -u "$windows_path"`
58609 58592 new_path="$unix_path"
58610 58593 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58611 58594 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58612 58595 new_path="$unix_path"
58613 58596 fi
58614 58597
58615 58598 if test "x$path" != "x$new_path"; then
58616 58599 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58617 58600 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58618 58601 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58619 58602 fi
58620 58603
58621 58604 # Save the first 10 bytes of this path to the storage, so fixpath can work.
58622 58605 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58623 58606
58624 58607 else
58625 58608 # We're on a unix platform. Hooray! :)
58626 58609 path="$POTENTIAL_FREETYPE_LIB_PATH"
58627 58610 has_space=`$ECHO "$path" | $GREP " "`
58628 58611 if test "x$has_space" != x; then
58629 58612 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58630 58613 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58631 58614 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58632 58615 fi
58633 58616
58634 58617 # Use eval to expand a potential ~
58635 58618 eval path="$path"
58636 58619 if test ! -f "$path" && test ! -d "$path"; then
58637 58620 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58638 58621 fi
58639 58622
58640 58623 if test -d "$path"; then
58641 58624 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58642 58625 else
58643 58626 dir="`$DIRNAME "$path"`"
58644 58627 base="`$BASENAME "$path"`"
58645 58628 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58646 58629 fi
58647 58630 fi
58648 58631 fi
58649 58632
58650 58633
58651 58634 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58652 58635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58653 58636 $as_echo_n "checking for freetype includes... " >&6; }
58654 58637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58655 58638 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58656 58639 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58657 58640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58658 58641 $as_echo_n "checking for freetype libraries... " >&6; }
58659 58642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58660 58643 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58661 58644 fi
58662 58645
58663 58646 fi
58664 58647 if test "x$FOUND_FREETYPE" != xyes; then
58665 58648 FREETYPE_BASE_DIR="$HOME/freetype"
58666 58649
58667 58650 windows_path="$FREETYPE_BASE_DIR"
58668 58651 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58669 58652 unix_path=`$CYGPATH -u "$windows_path"`
58670 58653 FREETYPE_BASE_DIR="$unix_path"
58671 58654 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58672 58655 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58673 58656 FREETYPE_BASE_DIR="$unix_path"
58674 58657 fi
58675 58658
58676 58659 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58677 58660
58678 58661 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58679 58662 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58680 58663 METHOD="well-known location"
58681 58664
58682 58665 # Let's start with an optimistic view of the world :-)
58683 58666 FOUND_FREETYPE=yes
58684 58667
58685 58668 # First look for the canonical freetype main include file ft2build.h.
58686 58669 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58687 58670 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58688 58671 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58689 58672 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58690 58673 # Fail.
58691 58674 FOUND_FREETYPE=no
58692 58675 fi
58693 58676 fi
58694 58677
58695 58678 if test "x$FOUND_FREETYPE" = xyes; then
58696 58679 # Include file found, let's continue the sanity check.
58697 58680 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58698 58681 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58699 58682
58700 58683 # Reset to default value
58701 58684 FREETYPE_BASE_NAME=freetype
58702 58685 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58703 58686 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58704 58687 if test "x$OPENJDK_TARGET_OS" = xmacosx \
58705 58688 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58706 58689 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58707 58690 # for the .6 version explicitly.
58708 58691 FREETYPE_BASE_NAME=freetype.6
58709 58692 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58710 58693 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58711 58694 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58712 58695 else
58713 58696 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58714 58697 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58715 58698 FOUND_FREETYPE=no
58716 58699 fi
58717 58700 else
58718 58701 if test "x$OPENJDK_TARGET_OS" = xwindows; then
58719 58702 # On Windows, we will need both .lib and .dll file.
58720 58703 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58721 58704 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58722 58705 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58723 58706 FOUND_FREETYPE=no
58724 58707 fi
58725 58708 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58726 58709 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58727 58710 # Found lib in isa dir, use that instead.
58728 58711 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58729 58712 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58730 58713 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58731 58714 fi
58732 58715 fi
58733 58716 fi
58734 58717
58735 58718 if test "x$FOUND_FREETYPE" = xyes; then
58736 58719
58737 58720 # Only process if variable expands to non-empty
58738 58721
58739 58722 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58740 58723 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58741 58724
58742 58725 # Input might be given as Windows format, start by converting to
58743 58726 # unix format.
58744 58727 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58745 58728 new_path=`$CYGPATH -u "$path"`
58746 58729
58747 58730 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58748 58731 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58749 58732 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58750 58733 # "foo.exe" is OK but "foo" is an error.
58751 58734 #
58752 58735 # This test is therefore slightly more accurate than "test -f" to check for file precense.
58753 58736 # It is also a way to make sure we got the proper file name for the real test later on.
58754 58737 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58755 58738 if test "x$test_shortpath" = x; then
58756 58739 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58757 58740 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58758 58741 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58759 58742 fi
58760 58743
58761 58744 # Call helper function which possibly converts this using DOS-style short mode.
58762 58745 # If so, the updated path is stored in $new_path.
58763 58746
58764 58747 input_path="$new_path"
58765 58748 # Check if we need to convert this using DOS-style short mode. If the path
58766 58749 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58767 58750 # take no chances and rewrite it.
58768 58751 # Note: m4 eats our [], so we need to use [ and ] instead.
58769 58752 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58770 58753 if test "x$has_forbidden_chars" != x; then
58771 58754 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58772 58755 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58773 58756 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58774 58757 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58775 58758 # Going to short mode and back again did indeed matter. Since short mode is
58776 58759 # case insensitive, let's make it lowercase to improve readability.
58777 58760 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58778 58761 # Now convert it back to Unix-style (cygpath)
58779 58762 input_path=`$CYGPATH -u "$shortmode_path"`
58780 58763 new_path="$input_path"
58781 58764 fi
58782 58765 fi
58783 58766
58784 58767 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58785 58768 if test "x$test_cygdrive_prefix" = x; then
58786 58769 # As a simple fix, exclude /usr/bin since it's not a real path.
58787 58770 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58788 58771 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58789 58772 # a path prefixed by /cygdrive for fixpath to work.
58790 58773 new_path="$CYGWIN_ROOT_PATH$input_path"
58791 58774 fi
58792 58775 fi
58793 58776
58794 58777
58795 58778 if test "x$path" != "x$new_path"; then
58796 58779 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58797 58780 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58798 58781 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58799 58782 fi
58800 58783
58801 58784 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58802 58785
58803 58786 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58804 58787 has_colon=`$ECHO $path | $GREP ^.:`
58805 58788 new_path="$path"
58806 58789 if test "x$has_colon" = x; then
58807 58790 # Not in mixed or Windows style, start by that.
58808 58791 new_path=`cmd //c echo $path`
58809 58792 fi
58810 58793
58811 58794
58812 58795 input_path="$new_path"
58813 58796 # Check if we need to convert this using DOS-style short mode. If the path
58814 58797 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58815 58798 # take no chances and rewrite it.
58816 58799 # Note: m4 eats our [], so we need to use [ and ] instead.
58817 58800 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58818 58801 if test "x$has_forbidden_chars" != x; then
58819 58802 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58820 58803 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58821 58804 fi
58822 58805
58823 58806
58824 58807 windows_path="$new_path"
58825 58808 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58826 58809 unix_path=`$CYGPATH -u "$windows_path"`
58827 58810 new_path="$unix_path"
58828 58811 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58829 58812 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58830 58813 new_path="$unix_path"
58831 58814 fi
58832 58815
58833 58816 if test "x$path" != "x$new_path"; then
58834 58817 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58835 58818 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58836 58819 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58837 58820 fi
58838 58821
58839 58822 # Save the first 10 bytes of this path to the storage, so fixpath can work.
58840 58823 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58841 58824
58842 58825 else
58843 58826 # We're on a unix platform. Hooray! :)
58844 58827 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58845 58828 has_space=`$ECHO "$path" | $GREP " "`
58846 58829 if test "x$has_space" != x; then
58847 58830 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58848 58831 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58849 58832 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58850 58833 fi
58851 58834
58852 58835 # Use eval to expand a potential ~
58853 58836 eval path="$path"
58854 58837 if test ! -f "$path" && test ! -d "$path"; then
58855 58838 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58856 58839 fi
58857 58840
58858 58841 if test -d "$path"; then
58859 58842 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58860 58843 else
58861 58844 dir="`$DIRNAME "$path"`"
58862 58845 base="`$BASENAME "$path"`"
58863 58846 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58864 58847 fi
58865 58848 fi
58866 58849 fi
58867 58850
58868 58851
58869 58852 # Only process if variable expands to non-empty
58870 58853
58871 58854 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58872 58855 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58873 58856
58874 58857 # Input might be given as Windows format, start by converting to
58875 58858 # unix format.
58876 58859 path="$POTENTIAL_FREETYPE_LIB_PATH"
58877 58860 new_path=`$CYGPATH -u "$path"`
58878 58861
58879 58862 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58880 58863 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58881 58864 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58882 58865 # "foo.exe" is OK but "foo" is an error.
58883 58866 #
58884 58867 # This test is therefore slightly more accurate than "test -f" to check for file precense.
58885 58868 # It is also a way to make sure we got the proper file name for the real test later on.
58886 58869 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58887 58870 if test "x$test_shortpath" = x; then
58888 58871 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58889 58872 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58890 58873 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58891 58874 fi
58892 58875
58893 58876 # Call helper function which possibly converts this using DOS-style short mode.
58894 58877 # If so, the updated path is stored in $new_path.
58895 58878
58896 58879 input_path="$new_path"
58897 58880 # Check if we need to convert this using DOS-style short mode. If the path
58898 58881 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58899 58882 # take no chances and rewrite it.
58900 58883 # Note: m4 eats our [], so we need to use [ and ] instead.
58901 58884 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58902 58885 if test "x$has_forbidden_chars" != x; then
58903 58886 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58904 58887 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58905 58888 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58906 58889 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58907 58890 # Going to short mode and back again did indeed matter. Since short mode is
58908 58891 # case insensitive, let's make it lowercase to improve readability.
58909 58892 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58910 58893 # Now convert it back to Unix-style (cygpath)
58911 58894 input_path=`$CYGPATH -u "$shortmode_path"`
58912 58895 new_path="$input_path"
58913 58896 fi
58914 58897 fi
58915 58898
58916 58899 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58917 58900 if test "x$test_cygdrive_prefix" = x; then
58918 58901 # As a simple fix, exclude /usr/bin since it's not a real path.
58919 58902 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58920 58903 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58921 58904 # a path prefixed by /cygdrive for fixpath to work.
58922 58905 new_path="$CYGWIN_ROOT_PATH$input_path"
58923 58906 fi
58924 58907 fi
58925 58908
58926 58909
58927 58910 if test "x$path" != "x$new_path"; then
58928 58911 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58929 58912 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58930 58913 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58931 58914 fi
58932 58915
58933 58916 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58934 58917
58935 58918 path="$POTENTIAL_FREETYPE_LIB_PATH"
58936 58919 has_colon=`$ECHO $path | $GREP ^.:`
58937 58920 new_path="$path"
58938 58921 if test "x$has_colon" = x; then
58939 58922 # Not in mixed or Windows style, start by that.
58940 58923 new_path=`cmd //c echo $path`
58941 58924 fi
58942 58925
58943 58926
58944 58927 input_path="$new_path"
58945 58928 # Check if we need to convert this using DOS-style short mode. If the path
58946 58929 # contains just simple characters, use it. Otherwise (spaces, weird characters),
58947 58930 # take no chances and rewrite it.
58948 58931 # Note: m4 eats our [], so we need to use [ and ] instead.
58949 58932 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58950 58933 if test "x$has_forbidden_chars" != x; then
58951 58934 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58952 58935 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58953 58936 fi
58954 58937
58955 58938
58956 58939 windows_path="$new_path"
58957 58940 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58958 58941 unix_path=`$CYGPATH -u "$windows_path"`
58959 58942 new_path="$unix_path"
58960 58943 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58961 58944 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58962 58945 new_path="$unix_path"
58963 58946 fi
58964 58947
58965 58948 if test "x$path" != "x$new_path"; then
58966 58949 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58967 58950 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58968 58951 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58969 58952 fi
58970 58953
58971 58954 # Save the first 10 bytes of this path to the storage, so fixpath can work.
58972 58955 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58973 58956
58974 58957 else
58975 58958 # We're on a unix platform. Hooray! :)
58976 58959 path="$POTENTIAL_FREETYPE_LIB_PATH"
58977 58960 has_space=`$ECHO "$path" | $GREP " "`
58978 58961 if test "x$has_space" != x; then
58979 58962 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58980 58963 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58981 58964 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58982 58965 fi
58983 58966
58984 58967 # Use eval to expand a potential ~
58985 58968 eval path="$path"
58986 58969 if test ! -f "$path" && test ! -d "$path"; then
58987 58970 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58988 58971 fi
58989 58972
58990 58973 if test -d "$path"; then
58991 58974 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58992 58975 else
58993 58976 dir="`$DIRNAME "$path"`"
58994 58977 base="`$BASENAME "$path"`"
58995 58978 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58996 58979 fi
58997 58980 fi
58998 58981 fi
58999 58982
59000 58983
59001 58984 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59002 58985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59003 58986 $as_echo_n "checking for freetype includes... " >&6; }
59004 58987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59005 58988 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59006 58989 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59007 58990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59008 58991 $as_echo_n "checking for freetype libraries... " >&6; }
59009 58992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59010 58993 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59011 58994 fi
59012 58995
59013 58996 else
59014 58997
59015 58998 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59016 58999 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59017 59000 METHOD="well-known location"
59018 59001
59019 59002 # Let's start with an optimistic view of the world :-)
59020 59003 FOUND_FREETYPE=yes
59021 59004
59022 59005 # First look for the canonical freetype main include file ft2build.h.
59023 59006 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59024 59007 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59025 59008 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59026 59009 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59027 59010 # Fail.
59028 59011 FOUND_FREETYPE=no
59029 59012 fi
59030 59013 fi
59031 59014
59032 59015 if test "x$FOUND_FREETYPE" = xyes; then
59033 59016 # Include file found, let's continue the sanity check.
59034 59017 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59035 59018 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59036 59019
59037 59020 # Reset to default value
59038 59021 FREETYPE_BASE_NAME=freetype
59039 59022 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59040 59023 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59041 59024 if test "x$OPENJDK_TARGET_OS" = xmacosx \
59042 59025 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59043 59026 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59044 59027 # for the .6 version explicitly.
59045 59028 FREETYPE_BASE_NAME=freetype.6
59046 59029 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59047 59030 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59048 59031 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59049 59032 else
59050 59033 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59051 59034 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59052 59035 FOUND_FREETYPE=no
59053 59036 fi
59054 59037 else
59055 59038 if test "x$OPENJDK_TARGET_OS" = xwindows; then
59056 59039 # On Windows, we will need both .lib and .dll file.
59057 59040 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59058 59041 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59059 59042 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59060 59043 FOUND_FREETYPE=no
59061 59044 fi
59062 59045 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59063 59046 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59064 59047 # Found lib in isa dir, use that instead.
59065 59048 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59066 59049 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59067 59050 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59068 59051 fi
59069 59052 fi
59070 59053 fi
59071 59054
59072 59055 if test "x$FOUND_FREETYPE" = xyes; then
59073 59056
59074 59057 # Only process if variable expands to non-empty
59075 59058
59076 59059 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59077 59060 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59078 59061
59079 59062 # Input might be given as Windows format, start by converting to
59080 59063 # unix format.
59081 59064 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59082 59065 new_path=`$CYGPATH -u "$path"`
59083 59066
59084 59067 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59085 59068 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59086 59069 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59087 59070 # "foo.exe" is OK but "foo" is an error.
59088 59071 #
59089 59072 # This test is therefore slightly more accurate than "test -f" to check for file precense.
59090 59073 # It is also a way to make sure we got the proper file name for the real test later on.
59091 59074 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59092 59075 if test "x$test_shortpath" = x; then
59093 59076 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59094 59077 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59095 59078 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59096 59079 fi
59097 59080
59098 59081 # Call helper function which possibly converts this using DOS-style short mode.
59099 59082 # If so, the updated path is stored in $new_path.
59100 59083
59101 59084 input_path="$new_path"
59102 59085 # Check if we need to convert this using DOS-style short mode. If the path
59103 59086 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59104 59087 # take no chances and rewrite it.
59105 59088 # Note: m4 eats our [], so we need to use [ and ] instead.
59106 59089 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59107 59090 if test "x$has_forbidden_chars" != x; then
59108 59091 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59109 59092 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59110 59093 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59111 59094 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59112 59095 # Going to short mode and back again did indeed matter. Since short mode is
59113 59096 # case insensitive, let's make it lowercase to improve readability.
59114 59097 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59115 59098 # Now convert it back to Unix-style (cygpath)
59116 59099 input_path=`$CYGPATH -u "$shortmode_path"`
59117 59100 new_path="$input_path"
59118 59101 fi
59119 59102 fi
59120 59103
59121 59104 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59122 59105 if test "x$test_cygdrive_prefix" = x; then
59123 59106 # As a simple fix, exclude /usr/bin since it's not a real path.
59124 59107 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59125 59108 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59126 59109 # a path prefixed by /cygdrive for fixpath to work.
59127 59110 new_path="$CYGWIN_ROOT_PATH$input_path"
59128 59111 fi
59129 59112 fi
59130 59113
59131 59114
59132 59115 if test "x$path" != "x$new_path"; then
59133 59116 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59134 59117 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59135 59118 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59136 59119 fi
59137 59120
59138 59121 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59139 59122
59140 59123 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59141 59124 has_colon=`$ECHO $path | $GREP ^.:`
59142 59125 new_path="$path"
59143 59126 if test "x$has_colon" = x; then
59144 59127 # Not in mixed or Windows style, start by that.
59145 59128 new_path=`cmd //c echo $path`
59146 59129 fi
59147 59130
59148 59131
59149 59132 input_path="$new_path"
59150 59133 # Check if we need to convert this using DOS-style short mode. If the path
59151 59134 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59152 59135 # take no chances and rewrite it.
59153 59136 # Note: m4 eats our [], so we need to use [ and ] instead.
59154 59137 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59155 59138 if test "x$has_forbidden_chars" != x; then
59156 59139 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59157 59140 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59158 59141 fi
59159 59142
59160 59143
59161 59144 windows_path="$new_path"
59162 59145 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59163 59146 unix_path=`$CYGPATH -u "$windows_path"`
59164 59147 new_path="$unix_path"
59165 59148 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59166 59149 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59167 59150 new_path="$unix_path"
59168 59151 fi
59169 59152
59170 59153 if test "x$path" != "x$new_path"; then
59171 59154 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59172 59155 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59173 59156 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59174 59157 fi
59175 59158
59176 59159 # Save the first 10 bytes of this path to the storage, so fixpath can work.
59177 59160 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59178 59161
59179 59162 else
59180 59163 # We're on a unix platform. Hooray! :)
59181 59164 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59182 59165 has_space=`$ECHO "$path" | $GREP " "`
59183 59166 if test "x$has_space" != x; then
59184 59167 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59185 59168 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59186 59169 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59187 59170 fi
59188 59171
59189 59172 # Use eval to expand a potential ~
59190 59173 eval path="$path"
59191 59174 if test ! -f "$path" && test ! -d "$path"; then
59192 59175 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59193 59176 fi
59194 59177
59195 59178 if test -d "$path"; then
59196 59179 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59197 59180 else
59198 59181 dir="`$DIRNAME "$path"`"
59199 59182 base="`$BASENAME "$path"`"
59200 59183 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59201 59184 fi
59202 59185 fi
59203 59186 fi
59204 59187
59205 59188
59206 59189 # Only process if variable expands to non-empty
59207 59190
59208 59191 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59209 59192 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59210 59193
59211 59194 # Input might be given as Windows format, start by converting to
59212 59195 # unix format.
59213 59196 path="$POTENTIAL_FREETYPE_LIB_PATH"
59214 59197 new_path=`$CYGPATH -u "$path"`
59215 59198
59216 59199 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59217 59200 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59218 59201 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59219 59202 # "foo.exe" is OK but "foo" is an error.
59220 59203 #
59221 59204 # This test is therefore slightly more accurate than "test -f" to check for file precense.
59222 59205 # It is also a way to make sure we got the proper file name for the real test later on.
59223 59206 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59224 59207 if test "x$test_shortpath" = x; then
59225 59208 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59226 59209 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59227 59210 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59228 59211 fi
59229 59212
59230 59213 # Call helper function which possibly converts this using DOS-style short mode.
59231 59214 # If so, the updated path is stored in $new_path.
59232 59215
59233 59216 input_path="$new_path"
59234 59217 # Check if we need to convert this using DOS-style short mode. If the path
59235 59218 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59236 59219 # take no chances and rewrite it.
59237 59220 # Note: m4 eats our [], so we need to use [ and ] instead.
59238 59221 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59239 59222 if test "x$has_forbidden_chars" != x; then
59240 59223 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59241 59224 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59242 59225 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59243 59226 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59244 59227 # Going to short mode and back again did indeed matter. Since short mode is
59245 59228 # case insensitive, let's make it lowercase to improve readability.
59246 59229 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59247 59230 # Now convert it back to Unix-style (cygpath)
59248 59231 input_path=`$CYGPATH -u "$shortmode_path"`
59249 59232 new_path="$input_path"
59250 59233 fi
59251 59234 fi
59252 59235
59253 59236 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59254 59237 if test "x$test_cygdrive_prefix" = x; then
59255 59238 # As a simple fix, exclude /usr/bin since it's not a real path.
59256 59239 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59257 59240 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59258 59241 # a path prefixed by /cygdrive for fixpath to work.
59259 59242 new_path="$CYGWIN_ROOT_PATH$input_path"
59260 59243 fi
59261 59244 fi
59262 59245
59263 59246
59264 59247 if test "x$path" != "x$new_path"; then
59265 59248 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59266 59249 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59267 59250 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59268 59251 fi
59269 59252
59270 59253 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59271 59254
59272 59255 path="$POTENTIAL_FREETYPE_LIB_PATH"
59273 59256 has_colon=`$ECHO $path | $GREP ^.:`
59274 59257 new_path="$path"
59275 59258 if test "x$has_colon" = x; then
59276 59259 # Not in mixed or Windows style, start by that.
59277 59260 new_path=`cmd //c echo $path`
59278 59261 fi
59279 59262
59280 59263
59281 59264 input_path="$new_path"
59282 59265 # Check if we need to convert this using DOS-style short mode. If the path
59283 59266 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59284 59267 # take no chances and rewrite it.
59285 59268 # Note: m4 eats our [], so we need to use [ and ] instead.
59286 59269 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59287 59270 if test "x$has_forbidden_chars" != x; then
59288 59271 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59289 59272 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59290 59273 fi
59291 59274
59292 59275
59293 59276 windows_path="$new_path"
59294 59277 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59295 59278 unix_path=`$CYGPATH -u "$windows_path"`
59296 59279 new_path="$unix_path"
59297 59280 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59298 59281 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59299 59282 new_path="$unix_path"
59300 59283 fi
59301 59284
59302 59285 if test "x$path" != "x$new_path"; then
59303 59286 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59304 59287 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59305 59288 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59306 59289 fi
59307 59290
59308 59291 # Save the first 10 bytes of this path to the storage, so fixpath can work.
59309 59292 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59310 59293
59311 59294 else
59312 59295 # We're on a unix platform. Hooray! :)
59313 59296 path="$POTENTIAL_FREETYPE_LIB_PATH"
59314 59297 has_space=`$ECHO "$path" | $GREP " "`
59315 59298 if test "x$has_space" != x; then
59316 59299 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59317 59300 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59318 59301 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59319 59302 fi
59320 59303
59321 59304 # Use eval to expand a potential ~
59322 59305 eval path="$path"
59323 59306 if test ! -f "$path" && test ! -d "$path"; then
59324 59307 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59325 59308 fi
59326 59309
59327 59310 if test -d "$path"; then
59328 59311 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59329 59312 else
59330 59313 dir="`$DIRNAME "$path"`"
59331 59314 base="`$BASENAME "$path"`"
59332 59315 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59333 59316 fi
59334 59317 fi
59335 59318 fi
59336 59319
59337 59320
59338 59321 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59339 59322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59340 59323 $as_echo_n "checking for freetype includes... " >&6; }
59341 59324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59342 59325 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59343 59326 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59344 59327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59345 59328 $as_echo_n "checking for freetype libraries... " >&6; }
59346 59329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59347 59330 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59348 59331 fi
59349 59332
59350 59333 fi
59351 59334 if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59352 59335 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59353 59336 # Source is available, as a last resort try to build freetype in default location
59354 59337
59355 59338 FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59356 59339 BUILD_FREETYPE=yes
59357 59340
59358 59341 # Check if the freetype sources are acessible..
59359 59342 if ! test -d $FREETYPE_SRC_PATH; then
59360 59343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
59361 59344 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59362 59345 BUILD_FREETYPE=no
59363 59346 fi
59364 59347 # ..and contain a vc2010 project file
59365 59348 vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59366 59349 if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59367 59350 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
59368 59351 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59369 59352 BUILD_FREETYPE=no
59370 59353 fi
59371 59354 # Now check if configure found a version of 'msbuild.exe'
59372 59355 if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59373 59356 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&5
59374 59357 $as_echo "$as_me: WARNING: Can not find an msbuild.exe executable (you may try to install .NET 4.0) - ignoring --with-freetype-src" >&2;}
59375 59358 BUILD_FREETYPE=no
59376 59359 fi
59377 59360
59378 59361 # Ready to go..
59379 59362 if test "x$BUILD_FREETYPE" = xyes; then
59380 59363 # msbuild requires trailing slashes for output directories
59381 59364 freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59382 59365 freetype_lib_path_unix="$freetype_lib_path"
59383 59366 freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59384 59367
59385 59368 unix_path="$vcxproj_path"
59386 59369 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59387 59370 windows_path=`$CYGPATH -m "$unix_path"`
59388 59371 vcxproj_path="$windows_path"
59389 59372 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59390 59373 windows_path=`cmd //c echo $unix_path`
59391 59374 vcxproj_path="$windows_path"
59392 59375 fi
59393 59376
59394 59377
59395 59378 unix_path="$freetype_lib_path"
59396 59379 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59397 59380 windows_path=`$CYGPATH -m "$unix_path"`
59398 59381 freetype_lib_path="$windows_path"
59399 59382 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59400 59383 windows_path=`cmd //c echo $unix_path`
59401 59384 freetype_lib_path="$windows_path"
59402 59385 fi
59403 59386
59404 59387
59405 59388 unix_path="$freetype_obj_path"
59406 59389 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59407 59390 windows_path=`$CYGPATH -m "$unix_path"`
59408 59391 freetype_obj_path="$windows_path"
59409 59392 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59410 59393 windows_path=`cmd //c echo $unix_path`
59411 59394 freetype_obj_path="$windows_path"
59412 59395 fi
59413 59396
59414 59397 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59415 59398 freetype_platform=x64
59416 59399 else
59417 59400 freetype_platform=win32
59418 59401 fi
59419 59402
59420 59403 # The original freetype project file is for VS 2010 (i.e. 'v100'),
59421 59404 # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59422 59405 # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59423 59406 # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59424 59407 { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59425 59408 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59426 59409
59427 59410 # First we try to build the freetype.dll
59428 59411 $ECHO -e "@echo off\n"\
59429 59412 "$MSBUILD $vcxproj_path "\
59430 59413 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59431 59414 "/p:Configuration=\"Release Multithreaded\" "\
59432 59415 "/p:Platform=$freetype_platform "\
59433 59416 "/p:ConfigurationType=DynamicLibrary "\
59434 59417 "/p:TargetName=freetype "\
59435 59418 "/p:OutDir=\"$freetype_lib_path\" "\
59436 59419 "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59437 59420 cmd /c freetype.bat
59438 59421
59439 59422 if test -s "$freetype_lib_path_unix/freetype.dll"; then
59440 59423 # If that succeeds we also build freetype.lib
59441 59424 $ECHO -e "@echo off\n"\
59442 59425 "$MSBUILD $vcxproj_path "\
59443 59426 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59444 59427 "/p:Configuration=\"Release Multithreaded\" "\
59445 59428 "/p:Platform=$freetype_platform "\
59446 59429 "/p:ConfigurationType=StaticLibrary "\
59447 59430 "/p:TargetName=freetype "\
59448 59431 "/p:OutDir=\"$freetype_lib_path\" "\
59449 59432 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59450 59433 cmd /c freetype.bat
59451 59434
59452 59435 if test -s "$freetype_lib_path_unix/freetype.lib"; then
59453 59436 # Once we build both, lib and dll, set freetype lib and include path appropriately
59454 59437 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59455 59438 POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59456 59439 { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59457 59440 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59458 59441 else
59459 59442 BUILD_FREETYPE=no
59460 59443 fi
59461 59444 else
59462 59445 BUILD_FREETYPE=no
59463 59446 fi
59464 59447 fi
59465 59448
59466 59449 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59467 59450
59468 59451 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59469 59452 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59470 59453 METHOD="well-known location"
59471 59454
59472 59455 # Let's start with an optimistic view of the world :-)
59473 59456 FOUND_FREETYPE=yes
59474 59457
59475 59458 # First look for the canonical freetype main include file ft2build.h.
59476 59459 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59477 59460 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59478 59461 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59479 59462 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59480 59463 # Fail.
59481 59464 FOUND_FREETYPE=no
59482 59465 fi
59483 59466 fi
59484 59467
59485 59468 if test "x$FOUND_FREETYPE" = xyes; then
59486 59469 # Include file found, let's continue the sanity check.
59487 59470 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59488 59471 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59489 59472
59490 59473 # Reset to default value
59491 59474 FREETYPE_BASE_NAME=freetype
59492 59475 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59493 59476 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59494 59477 if test "x$OPENJDK_TARGET_OS" = xmacosx \
59495 59478 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59496 59479 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59497 59480 # for the .6 version explicitly.
59498 59481 FREETYPE_BASE_NAME=freetype.6
59499 59482 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59500 59483 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59501 59484 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59502 59485 else
59503 59486 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59504 59487 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59505 59488 FOUND_FREETYPE=no
59506 59489 fi
59507 59490 else
59508 59491 if test "x$OPENJDK_TARGET_OS" = xwindows; then
59509 59492 # On Windows, we will need both .lib and .dll file.
59510 59493 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59511 59494 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59512 59495 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59513 59496 FOUND_FREETYPE=no
59514 59497 fi
59515 59498 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59516 59499 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59517 59500 # Found lib in isa dir, use that instead.
59518 59501 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59519 59502 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59520 59503 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59521 59504 fi
59522 59505 fi
59523 59506 fi
59524 59507
59525 59508 if test "x$FOUND_FREETYPE" = xyes; then
59526 59509
59527 59510 # Only process if variable expands to non-empty
59528 59511
59529 59512 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59530 59513 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59531 59514
59532 59515 # Input might be given as Windows format, start by converting to
59533 59516 # unix format.
59534 59517 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59535 59518 new_path=`$CYGPATH -u "$path"`
59536 59519
59537 59520 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59538 59521 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59539 59522 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59540 59523 # "foo.exe" is OK but "foo" is an error.
59541 59524 #
59542 59525 # This test is therefore slightly more accurate than "test -f" to check for file precense.
59543 59526 # It is also a way to make sure we got the proper file name for the real test later on.
59544 59527 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59545 59528 if test "x$test_shortpath" = x; then
59546 59529 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59547 59530 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59548 59531 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59549 59532 fi
59550 59533
59551 59534 # Call helper function which possibly converts this using DOS-style short mode.
59552 59535 # If so, the updated path is stored in $new_path.
59553 59536
59554 59537 input_path="$new_path"
59555 59538 # Check if we need to convert this using DOS-style short mode. If the path
59556 59539 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59557 59540 # take no chances and rewrite it.
59558 59541 # Note: m4 eats our [], so we need to use [ and ] instead.
59559 59542 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59560 59543 if test "x$has_forbidden_chars" != x; then
59561 59544 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59562 59545 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59563 59546 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59564 59547 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59565 59548 # Going to short mode and back again did indeed matter. Since short mode is
59566 59549 # case insensitive, let's make it lowercase to improve readability.
59567 59550 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59568 59551 # Now convert it back to Unix-style (cygpath)
59569 59552 input_path=`$CYGPATH -u "$shortmode_path"`
59570 59553 new_path="$input_path"
59571 59554 fi
59572 59555 fi
59573 59556
59574 59557 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59575 59558 if test "x$test_cygdrive_prefix" = x; then
59576 59559 # As a simple fix, exclude /usr/bin since it's not a real path.
59577 59560 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59578 59561 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59579 59562 # a path prefixed by /cygdrive for fixpath to work.
59580 59563 new_path="$CYGWIN_ROOT_PATH$input_path"
59581 59564 fi
59582 59565 fi
59583 59566
59584 59567
59585 59568 if test "x$path" != "x$new_path"; then
59586 59569 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59587 59570 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59588 59571 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59589 59572 fi
59590 59573
59591 59574 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59592 59575
59593 59576 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59594 59577 has_colon=`$ECHO $path | $GREP ^.:`
59595 59578 new_path="$path"
59596 59579 if test "x$has_colon" = x; then
59597 59580 # Not in mixed or Windows style, start by that.
59598 59581 new_path=`cmd //c echo $path`
59599 59582 fi
59600 59583
59601 59584
59602 59585 input_path="$new_path"
59603 59586 # Check if we need to convert this using DOS-style short mode. If the path
59604 59587 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59605 59588 # take no chances and rewrite it.
59606 59589 # Note: m4 eats our [], so we need to use [ and ] instead.
59607 59590 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59608 59591 if test "x$has_forbidden_chars" != x; then
59609 59592 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59610 59593 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59611 59594 fi
59612 59595
59613 59596
59614 59597 windows_path="$new_path"
59615 59598 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59616 59599 unix_path=`$CYGPATH -u "$windows_path"`
59617 59600 new_path="$unix_path"
59618 59601 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59619 59602 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59620 59603 new_path="$unix_path"
59621 59604 fi
59622 59605
59623 59606 if test "x$path" != "x$new_path"; then
59624 59607 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59625 59608 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59626 59609 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59627 59610 fi
59628 59611
59629 59612 # Save the first 10 bytes of this path to the storage, so fixpath can work.
59630 59613 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59631 59614
59632 59615 else
59633 59616 # We're on a unix platform. Hooray! :)
59634 59617 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59635 59618 has_space=`$ECHO "$path" | $GREP " "`
59636 59619 if test "x$has_space" != x; then
59637 59620 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59638 59621 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59639 59622 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59640 59623 fi
59641 59624
59642 59625 # Use eval to expand a potential ~
59643 59626 eval path="$path"
59644 59627 if test ! -f "$path" && test ! -d "$path"; then
59645 59628 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59646 59629 fi
59647 59630
59648 59631 if test -d "$path"; then
59649 59632 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59650 59633 else
59651 59634 dir="`$DIRNAME "$path"`"
59652 59635 base="`$BASENAME "$path"`"
59653 59636 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59654 59637 fi
59655 59638 fi
59656 59639 fi
59657 59640
59658 59641
59659 59642 # Only process if variable expands to non-empty
59660 59643
59661 59644 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59662 59645 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59663 59646
59664 59647 # Input might be given as Windows format, start by converting to
59665 59648 # unix format.
59666 59649 path="$POTENTIAL_FREETYPE_LIB_PATH"
59667 59650 new_path=`$CYGPATH -u "$path"`
59668 59651
59669 59652 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59670 59653 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59671 59654 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59672 59655 # "foo.exe" is OK but "foo" is an error.
59673 59656 #
59674 59657 # This test is therefore slightly more accurate than "test -f" to check for file precense.
59675 59658 # It is also a way to make sure we got the proper file name for the real test later on.
59676 59659 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59677 59660 if test "x$test_shortpath" = x; then
59678 59661 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59679 59662 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59680 59663 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59681 59664 fi
59682 59665
59683 59666 # Call helper function which possibly converts this using DOS-style short mode.
59684 59667 # If so, the updated path is stored in $new_path.
59685 59668
59686 59669 input_path="$new_path"
59687 59670 # Check if we need to convert this using DOS-style short mode. If the path
59688 59671 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59689 59672 # take no chances and rewrite it.
59690 59673 # Note: m4 eats our [], so we need to use [ and ] instead.
59691 59674 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59692 59675 if test "x$has_forbidden_chars" != x; then
59693 59676 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59694 59677 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59695 59678 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59696 59679 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59697 59680 # Going to short mode and back again did indeed matter. Since short mode is
59698 59681 # case insensitive, let's make it lowercase to improve readability.
59699 59682 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59700 59683 # Now convert it back to Unix-style (cygpath)
59701 59684 input_path=`$CYGPATH -u "$shortmode_path"`
59702 59685 new_path="$input_path"
59703 59686 fi
59704 59687 fi
59705 59688
59706 59689 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59707 59690 if test "x$test_cygdrive_prefix" = x; then
59708 59691 # As a simple fix, exclude /usr/bin since it's not a real path.
59709 59692 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59710 59693 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59711 59694 # a path prefixed by /cygdrive for fixpath to work.
59712 59695 new_path="$CYGWIN_ROOT_PATH$input_path"
59713 59696 fi
59714 59697 fi
59715 59698
59716 59699
59717 59700 if test "x$path" != "x$new_path"; then
59718 59701 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59719 59702 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59720 59703 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59721 59704 fi
59722 59705
59723 59706 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59724 59707
59725 59708 path="$POTENTIAL_FREETYPE_LIB_PATH"
59726 59709 has_colon=`$ECHO $path | $GREP ^.:`
59727 59710 new_path="$path"
59728 59711 if test "x$has_colon" = x; then
59729 59712 # Not in mixed or Windows style, start by that.
59730 59713 new_path=`cmd //c echo $path`
59731 59714 fi
59732 59715
59733 59716
59734 59717 input_path="$new_path"
59735 59718 # Check if we need to convert this using DOS-style short mode. If the path
59736 59719 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59737 59720 # take no chances and rewrite it.
59738 59721 # Note: m4 eats our [], so we need to use [ and ] instead.
59739 59722 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59740 59723 if test "x$has_forbidden_chars" != x; then
59741 59724 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59742 59725 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59743 59726 fi
59744 59727
59745 59728
59746 59729 windows_path="$new_path"
59747 59730 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59748 59731 unix_path=`$CYGPATH -u "$windows_path"`
59749 59732 new_path="$unix_path"
59750 59733 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59751 59734 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59752 59735 new_path="$unix_path"
59753 59736 fi
59754 59737
59755 59738 if test "x$path" != "x$new_path"; then
59756 59739 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59757 59740 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59758 59741 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59759 59742 fi
59760 59743
59761 59744 # Save the first 10 bytes of this path to the storage, so fixpath can work.
59762 59745 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59763 59746
59764 59747 else
59765 59748 # We're on a unix platform. Hooray! :)
59766 59749 path="$POTENTIAL_FREETYPE_LIB_PATH"
59767 59750 has_space=`$ECHO "$path" | $GREP " "`
59768 59751 if test "x$has_space" != x; then
59769 59752 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59770 59753 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59771 59754 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59772 59755 fi
59773 59756
59774 59757 # Use eval to expand a potential ~
59775 59758 eval path="$path"
59776 59759 if test ! -f "$path" && test ! -d "$path"; then
59777 59760 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59778 59761 fi
59779 59762
59780 59763 if test -d "$path"; then
59781 59764 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59782 59765 else
59783 59766 dir="`$DIRNAME "$path"`"
59784 59767 base="`$BASENAME "$path"`"
59785 59768 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59786 59769 fi
59787 59770 fi
59788 59771 fi
59789 59772
59790 59773
59791 59774 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59792 59775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59793 59776 $as_echo_n "checking for freetype includes... " >&6; }
59794 59777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59795 59778 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59796 59779 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59797 59780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59798 59781 $as_echo_n "checking for freetype libraries... " >&6; }
59799 59782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59800 59783 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59801 59784 fi
59802 59785
59803 59786 else
59804 59787
59805 59788 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59806 59789 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59807 59790 METHOD="well-known location"
59808 59791
59809 59792 # Let's start with an optimistic view of the world :-)
59810 59793 FOUND_FREETYPE=yes
59811 59794
59812 59795 # First look for the canonical freetype main include file ft2build.h.
59813 59796 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59814 59797 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59815 59798 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59816 59799 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59817 59800 # Fail.
59818 59801 FOUND_FREETYPE=no
59819 59802 fi
59820 59803 fi
59821 59804
59822 59805 if test "x$FOUND_FREETYPE" = xyes; then
59823 59806 # Include file found, let's continue the sanity check.
59824 59807 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59825 59808 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59826 59809
59827 59810 # Reset to default value
59828 59811 FREETYPE_BASE_NAME=freetype
59829 59812 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59830 59813 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59831 59814 if test "x$OPENJDK_TARGET_OS" = xmacosx \
59832 59815 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59833 59816 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59834 59817 # for the .6 version explicitly.
59835 59818 FREETYPE_BASE_NAME=freetype.6
59836 59819 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59837 59820 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59838 59821 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59839 59822 else
59840 59823 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59841 59824 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59842 59825 FOUND_FREETYPE=no
59843 59826 fi
59844 59827 else
59845 59828 if test "x$OPENJDK_TARGET_OS" = xwindows; then
59846 59829 # On Windows, we will need both .lib and .dll file.
59847 59830 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59848 59831 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59849 59832 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59850 59833 FOUND_FREETYPE=no
59851 59834 fi
59852 59835 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59853 59836 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59854 59837 # Found lib in isa dir, use that instead.
59855 59838 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59856 59839 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59857 59840 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59858 59841 fi
59859 59842 fi
59860 59843 fi
59861 59844
59862 59845 if test "x$FOUND_FREETYPE" = xyes; then
59863 59846
59864 59847 # Only process if variable expands to non-empty
59865 59848
59866 59849 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59867 59850 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59868 59851
59869 59852 # Input might be given as Windows format, start by converting to
59870 59853 # unix format.
59871 59854 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59872 59855 new_path=`$CYGPATH -u "$path"`
59873 59856
59874 59857 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59875 59858 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59876 59859 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59877 59860 # "foo.exe" is OK but "foo" is an error.
59878 59861 #
59879 59862 # This test is therefore slightly more accurate than "test -f" to check for file precense.
59880 59863 # It is also a way to make sure we got the proper file name for the real test later on.
59881 59864 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59882 59865 if test "x$test_shortpath" = x; then
59883 59866 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59884 59867 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59885 59868 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59886 59869 fi
59887 59870
59888 59871 # Call helper function which possibly converts this using DOS-style short mode.
59889 59872 # If so, the updated path is stored in $new_path.
59890 59873
59891 59874 input_path="$new_path"
59892 59875 # Check if we need to convert this using DOS-style short mode. If the path
59893 59876 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59894 59877 # take no chances and rewrite it.
59895 59878 # Note: m4 eats our [], so we need to use [ and ] instead.
59896 59879 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59897 59880 if test "x$has_forbidden_chars" != x; then
59898 59881 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59899 59882 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59900 59883 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59901 59884 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59902 59885 # Going to short mode and back again did indeed matter. Since short mode is
59903 59886 # case insensitive, let's make it lowercase to improve readability.
59904 59887 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59905 59888 # Now convert it back to Unix-style (cygpath)
59906 59889 input_path=`$CYGPATH -u "$shortmode_path"`
59907 59890 new_path="$input_path"
59908 59891 fi
59909 59892 fi
59910 59893
59911 59894 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59912 59895 if test "x$test_cygdrive_prefix" = x; then
59913 59896 # As a simple fix, exclude /usr/bin since it's not a real path.
59914 59897 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59915 59898 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59916 59899 # a path prefixed by /cygdrive for fixpath to work.
59917 59900 new_path="$CYGWIN_ROOT_PATH$input_path"
59918 59901 fi
59919 59902 fi
59920 59903
59921 59904
59922 59905 if test "x$path" != "x$new_path"; then
59923 59906 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59924 59907 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59925 59908 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59926 59909 fi
59927 59910
59928 59911 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59929 59912
59930 59913 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59931 59914 has_colon=`$ECHO $path | $GREP ^.:`
59932 59915 new_path="$path"
59933 59916 if test "x$has_colon" = x; then
59934 59917 # Not in mixed or Windows style, start by that.
59935 59918 new_path=`cmd //c echo $path`
59936 59919 fi
59937 59920
59938 59921
59939 59922 input_path="$new_path"
59940 59923 # Check if we need to convert this using DOS-style short mode. If the path
59941 59924 # contains just simple characters, use it. Otherwise (spaces, weird characters),
59942 59925 # take no chances and rewrite it.
59943 59926 # Note: m4 eats our [], so we need to use [ and ] instead.
59944 59927 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59945 59928 if test "x$has_forbidden_chars" != x; then
59946 59929 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59947 59930 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59948 59931 fi
59949 59932
59950 59933
59951 59934 windows_path="$new_path"
59952 59935 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59953 59936 unix_path=`$CYGPATH -u "$windows_path"`
59954 59937 new_path="$unix_path"
59955 59938 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59956 59939 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59957 59940 new_path="$unix_path"
59958 59941 fi
59959 59942
59960 59943 if test "x$path" != "x$new_path"; then
59961 59944 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59962 59945 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59963 59946 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59964 59947 fi
59965 59948
59966 59949 # Save the first 10 bytes of this path to the storage, so fixpath can work.
59967 59950 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59968 59951
59969 59952 else
59970 59953 # We're on a unix platform. Hooray! :)
59971 59954 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59972 59955 has_space=`$ECHO "$path" | $GREP " "`
59973 59956 if test "x$has_space" != x; then
59974 59957 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59975 59958 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59976 59959 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59977 59960 fi
59978 59961
59979 59962 # Use eval to expand a potential ~
59980 59963 eval path="$path"
59981 59964 if test ! -f "$path" && test ! -d "$path"; then
59982 59965 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59983 59966 fi
59984 59967
59985 59968 if test -d "$path"; then
59986 59969 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59987 59970 else
59988 59971 dir="`$DIRNAME "$path"`"
59989 59972 base="`$BASENAME "$path"`"
59990 59973 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59991 59974 fi
59992 59975 fi
59993 59976 fi
59994 59977
59995 59978
59996 59979 # Only process if variable expands to non-empty
59997 59980
59998 59981 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59999 59982 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60000 59983
60001 59984 # Input might be given as Windows format, start by converting to
60002 59985 # unix format.
60003 59986 path="$POTENTIAL_FREETYPE_LIB_PATH"
60004 59987 new_path=`$CYGPATH -u "$path"`
60005 59988
60006 59989 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60007 59990 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60008 59991 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60009 59992 # "foo.exe" is OK but "foo" is an error.
60010 59993 #
60011 59994 # This test is therefore slightly more accurate than "test -f" to check for file precense.
60012 59995 # It is also a way to make sure we got the proper file name for the real test later on.
60013 59996 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60014 59997 if test "x$test_shortpath" = x; then
60015 59998 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60016 59999 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60017 60000 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60018 60001 fi
60019 60002
60020 60003 # Call helper function which possibly converts this using DOS-style short mode.
60021 60004 # If so, the updated path is stored in $new_path.
60022 60005
60023 60006 input_path="$new_path"
60024 60007 # Check if we need to convert this using DOS-style short mode. If the path
60025 60008 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60026 60009 # take no chances and rewrite it.
60027 60010 # Note: m4 eats our [], so we need to use [ and ] instead.
60028 60011 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60029 60012 if test "x$has_forbidden_chars" != x; then
60030 60013 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60031 60014 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60032 60015 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60033 60016 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60034 60017 # Going to short mode and back again did indeed matter. Since short mode is
60035 60018 # case insensitive, let's make it lowercase to improve readability.
60036 60019 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60037 60020 # Now convert it back to Unix-style (cygpath)
60038 60021 input_path=`$CYGPATH -u "$shortmode_path"`
60039 60022 new_path="$input_path"
60040 60023 fi
60041 60024 fi
60042 60025
60043 60026 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60044 60027 if test "x$test_cygdrive_prefix" = x; then
60045 60028 # As a simple fix, exclude /usr/bin since it's not a real path.
60046 60029 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60047 60030 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60048 60031 # a path prefixed by /cygdrive for fixpath to work.
60049 60032 new_path="$CYGWIN_ROOT_PATH$input_path"
60050 60033 fi
60051 60034 fi
60052 60035
60053 60036
60054 60037 if test "x$path" != "x$new_path"; then
60055 60038 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60056 60039 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60057 60040 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60058 60041 fi
60059 60042
60060 60043 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60061 60044
60062 60045 path="$POTENTIAL_FREETYPE_LIB_PATH"
60063 60046 has_colon=`$ECHO $path | $GREP ^.:`
60064 60047 new_path="$path"
60065 60048 if test "x$has_colon" = x; then
60066 60049 # Not in mixed or Windows style, start by that.
60067 60050 new_path=`cmd //c echo $path`
60068 60051 fi
60069 60052
60070 60053
60071 60054 input_path="$new_path"
60072 60055 # Check if we need to convert this using DOS-style short mode. If the path
60073 60056 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60074 60057 # take no chances and rewrite it.
60075 60058 # Note: m4 eats our [], so we need to use [ and ] instead.
60076 60059 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60077 60060 if test "x$has_forbidden_chars" != x; then
60078 60061 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60079 60062 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60080 60063 fi
60081 60064
60082 60065
60083 60066 windows_path="$new_path"
60084 60067 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60085 60068 unix_path=`$CYGPATH -u "$windows_path"`
60086 60069 new_path="$unix_path"
60087 60070 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60088 60071 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60089 60072 new_path="$unix_path"
60090 60073 fi
60091 60074
60092 60075 if test "x$path" != "x$new_path"; then
60093 60076 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60094 60077 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60095 60078 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60096 60079 fi
60097 60080
60098 60081 # Save the first 10 bytes of this path to the storage, so fixpath can work.
60099 60082 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60100 60083
60101 60084 else
60102 60085 # We're on a unix platform. Hooray! :)
60103 60086 path="$POTENTIAL_FREETYPE_LIB_PATH"
60104 60087 has_space=`$ECHO "$path" | $GREP " "`
60105 60088 if test "x$has_space" != x; then
60106 60089 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60107 60090 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60108 60091 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60109 60092 fi
60110 60093
60111 60094 # Use eval to expand a potential ~
60112 60095 eval path="$path"
60113 60096 if test ! -f "$path" && test ! -d "$path"; then
60114 60097 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60115 60098 fi
60116 60099
60117 60100 if test -d "$path"; then
60118 60101 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60119 60102 else
60120 60103 dir="`$DIRNAME "$path"`"
60121 60104 base="`$BASENAME "$path"`"
60122 60105 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60123 60106 fi
60124 60107 fi
60125 60108 fi
60126 60109
60127 60110
60128 60111 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60129 60112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60130 60113 $as_echo_n "checking for freetype includes... " >&6; }
60131 60114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60132 60115 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60133 60116 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60134 60117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60135 60118 $as_echo_n "checking for freetype libraries... " >&6; }
60136 60119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60137 60120 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60138 60121 fi
60139 60122
60140 60123 fi
60141 60124 fi
60142 60125 fi
60143 60126 else
60144 60127 FREETYPE_BASE_DIR="$SYSROOT/usr"
60145 60128
60146 60129 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60147 60130 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60148 60131 METHOD="well-known location"
60149 60132
60150 60133 # Let's start with an optimistic view of the world :-)
60151 60134 FOUND_FREETYPE=yes
60152 60135
60153 60136 # First look for the canonical freetype main include file ft2build.h.
60154 60137 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60155 60138 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60156 60139 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60157 60140 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60158 60141 # Fail.
60159 60142 FOUND_FREETYPE=no
60160 60143 fi
60161 60144 fi
60162 60145
60163 60146 if test "x$FOUND_FREETYPE" = xyes; then
60164 60147 # Include file found, let's continue the sanity check.
60165 60148 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60166 60149 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60167 60150
60168 60151 # Reset to default value
60169 60152 FREETYPE_BASE_NAME=freetype
60170 60153 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60171 60154 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60172 60155 if test "x$OPENJDK_TARGET_OS" = xmacosx \
60173 60156 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60174 60157 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60175 60158 # for the .6 version explicitly.
60176 60159 FREETYPE_BASE_NAME=freetype.6
60177 60160 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60178 60161 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60179 60162 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60180 60163 else
60181 60164 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60182 60165 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60183 60166 FOUND_FREETYPE=no
60184 60167 fi
60185 60168 else
60186 60169 if test "x$OPENJDK_TARGET_OS" = xwindows; then
60187 60170 # On Windows, we will need both .lib and .dll file.
60188 60171 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60189 60172 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60190 60173 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60191 60174 FOUND_FREETYPE=no
60192 60175 fi
60193 60176 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60194 60177 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60195 60178 # Found lib in isa dir, use that instead.
60196 60179 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60197 60180 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60198 60181 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60199 60182 fi
60200 60183 fi
60201 60184 fi
60202 60185
60203 60186 if test "x$FOUND_FREETYPE" = xyes; then
60204 60187
60205 60188 # Only process if variable expands to non-empty
60206 60189
60207 60190 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60208 60191 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60209 60192
60210 60193 # Input might be given as Windows format, start by converting to
60211 60194 # unix format.
60212 60195 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60213 60196 new_path=`$CYGPATH -u "$path"`
60214 60197
60215 60198 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60216 60199 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60217 60200 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60218 60201 # "foo.exe" is OK but "foo" is an error.
60219 60202 #
60220 60203 # This test is therefore slightly more accurate than "test -f" to check for file precense.
60221 60204 # It is also a way to make sure we got the proper file name for the real test later on.
60222 60205 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60223 60206 if test "x$test_shortpath" = x; then
60224 60207 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60225 60208 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60226 60209 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60227 60210 fi
60228 60211
60229 60212 # Call helper function which possibly converts this using DOS-style short mode.
60230 60213 # If so, the updated path is stored in $new_path.
60231 60214
60232 60215 input_path="$new_path"
60233 60216 # Check if we need to convert this using DOS-style short mode. If the path
60234 60217 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60235 60218 # take no chances and rewrite it.
60236 60219 # Note: m4 eats our [], so we need to use [ and ] instead.
60237 60220 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60238 60221 if test "x$has_forbidden_chars" != x; then
60239 60222 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60240 60223 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60241 60224 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60242 60225 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60243 60226 # Going to short mode and back again did indeed matter. Since short mode is
60244 60227 # case insensitive, let's make it lowercase to improve readability.
60245 60228 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60246 60229 # Now convert it back to Unix-style (cygpath)
60247 60230 input_path=`$CYGPATH -u "$shortmode_path"`
60248 60231 new_path="$input_path"
60249 60232 fi
60250 60233 fi
60251 60234
60252 60235 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60253 60236 if test "x$test_cygdrive_prefix" = x; then
60254 60237 # As a simple fix, exclude /usr/bin since it's not a real path.
60255 60238 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60256 60239 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60257 60240 # a path prefixed by /cygdrive for fixpath to work.
60258 60241 new_path="$CYGWIN_ROOT_PATH$input_path"
60259 60242 fi
60260 60243 fi
60261 60244
60262 60245
60263 60246 if test "x$path" != "x$new_path"; then
60264 60247 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60265 60248 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60266 60249 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60267 60250 fi
60268 60251
60269 60252 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60270 60253
60271 60254 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60272 60255 has_colon=`$ECHO $path | $GREP ^.:`
60273 60256 new_path="$path"
60274 60257 if test "x$has_colon" = x; then
60275 60258 # Not in mixed or Windows style, start by that.
60276 60259 new_path=`cmd //c echo $path`
60277 60260 fi
60278 60261
60279 60262
60280 60263 input_path="$new_path"
60281 60264 # Check if we need to convert this using DOS-style short mode. If the path
60282 60265 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60283 60266 # take no chances and rewrite it.
60284 60267 # Note: m4 eats our [], so we need to use [ and ] instead.
60285 60268 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60286 60269 if test "x$has_forbidden_chars" != x; then
60287 60270 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60288 60271 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60289 60272 fi
60290 60273
60291 60274
60292 60275 windows_path="$new_path"
60293 60276 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60294 60277 unix_path=`$CYGPATH -u "$windows_path"`
60295 60278 new_path="$unix_path"
60296 60279 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60297 60280 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60298 60281 new_path="$unix_path"
60299 60282 fi
60300 60283
60301 60284 if test "x$path" != "x$new_path"; then
60302 60285 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60303 60286 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60304 60287 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60305 60288 fi
60306 60289
60307 60290 # Save the first 10 bytes of this path to the storage, so fixpath can work.
60308 60291 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60309 60292
60310 60293 else
60311 60294 # We're on a unix platform. Hooray! :)
60312 60295 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60313 60296 has_space=`$ECHO "$path" | $GREP " "`
60314 60297 if test "x$has_space" != x; then
60315 60298 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60316 60299 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60317 60300 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60318 60301 fi
60319 60302
60320 60303 # Use eval to expand a potential ~
60321 60304 eval path="$path"
60322 60305 if test ! -f "$path" && test ! -d "$path"; then
60323 60306 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60324 60307 fi
60325 60308
60326 60309 if test -d "$path"; then
60327 60310 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60328 60311 else
60329 60312 dir="`$DIRNAME "$path"`"
60330 60313 base="`$BASENAME "$path"`"
60331 60314 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60332 60315 fi
60333 60316 fi
60334 60317 fi
60335 60318
60336 60319
60337 60320 # Only process if variable expands to non-empty
60338 60321
60339 60322 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60340 60323 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60341 60324
60342 60325 # Input might be given as Windows format, start by converting to
60343 60326 # unix format.
60344 60327 path="$POTENTIAL_FREETYPE_LIB_PATH"
60345 60328 new_path=`$CYGPATH -u "$path"`
60346 60329
60347 60330 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60348 60331 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60349 60332 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60350 60333 # "foo.exe" is OK but "foo" is an error.
60351 60334 #
60352 60335 # This test is therefore slightly more accurate than "test -f" to check for file precense.
60353 60336 # It is also a way to make sure we got the proper file name for the real test later on.
60354 60337 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60355 60338 if test "x$test_shortpath" = x; then
60356 60339 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60357 60340 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60358 60341 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60359 60342 fi
60360 60343
60361 60344 # Call helper function which possibly converts this using DOS-style short mode.
60362 60345 # If so, the updated path is stored in $new_path.
60363 60346
60364 60347 input_path="$new_path"
60365 60348 # Check if we need to convert this using DOS-style short mode. If the path
60366 60349 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60367 60350 # take no chances and rewrite it.
60368 60351 # Note: m4 eats our [], so we need to use [ and ] instead.
60369 60352 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60370 60353 if test "x$has_forbidden_chars" != x; then
60371 60354 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60372 60355 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60373 60356 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60374 60357 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60375 60358 # Going to short mode and back again did indeed matter. Since short mode is
60376 60359 # case insensitive, let's make it lowercase to improve readability.
60377 60360 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60378 60361 # Now convert it back to Unix-style (cygpath)
60379 60362 input_path=`$CYGPATH -u "$shortmode_path"`
60380 60363 new_path="$input_path"
60381 60364 fi
60382 60365 fi
60383 60366
60384 60367 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60385 60368 if test "x$test_cygdrive_prefix" = x; then
60386 60369 # As a simple fix, exclude /usr/bin since it's not a real path.
60387 60370 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60388 60371 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60389 60372 # a path prefixed by /cygdrive for fixpath to work.
60390 60373 new_path="$CYGWIN_ROOT_PATH$input_path"
60391 60374 fi
60392 60375 fi
60393 60376
60394 60377
60395 60378 if test "x$path" != "x$new_path"; then
60396 60379 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60397 60380 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60398 60381 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60399 60382 fi
60400 60383
60401 60384 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60402 60385
60403 60386 path="$POTENTIAL_FREETYPE_LIB_PATH"
60404 60387 has_colon=`$ECHO $path | $GREP ^.:`
60405 60388 new_path="$path"
60406 60389 if test "x$has_colon" = x; then
60407 60390 # Not in mixed or Windows style, start by that.
60408 60391 new_path=`cmd //c echo $path`
60409 60392 fi
60410 60393
60411 60394
60412 60395 input_path="$new_path"
60413 60396 # Check if we need to convert this using DOS-style short mode. If the path
60414 60397 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60415 60398 # take no chances and rewrite it.
60416 60399 # Note: m4 eats our [], so we need to use [ and ] instead.
60417 60400 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60418 60401 if test "x$has_forbidden_chars" != x; then
60419 60402 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60420 60403 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60421 60404 fi
60422 60405
60423 60406
60424 60407 windows_path="$new_path"
60425 60408 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60426 60409 unix_path=`$CYGPATH -u "$windows_path"`
60427 60410 new_path="$unix_path"
60428 60411 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60429 60412 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60430 60413 new_path="$unix_path"
60431 60414 fi
60432 60415
60433 60416 if test "x$path" != "x$new_path"; then
60434 60417 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60435 60418 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60436 60419 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60437 60420 fi
60438 60421
60439 60422 # Save the first 10 bytes of this path to the storage, so fixpath can work.
60440 60423 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60441 60424
60442 60425 else
60443 60426 # We're on a unix platform. Hooray! :)
60444 60427 path="$POTENTIAL_FREETYPE_LIB_PATH"
60445 60428 has_space=`$ECHO "$path" | $GREP " "`
60446 60429 if test "x$has_space" != x; then
60447 60430 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60448 60431 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60449 60432 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60450 60433 fi
60451 60434
60452 60435 # Use eval to expand a potential ~
60453 60436 eval path="$path"
60454 60437 if test ! -f "$path" && test ! -d "$path"; then
60455 60438 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60456 60439 fi
60457 60440
60458 60441 if test -d "$path"; then
60459 60442 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60460 60443 else
60461 60444 dir="`$DIRNAME "$path"`"
60462 60445 base="`$BASENAME "$path"`"
60463 60446 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60464 60447 fi
60465 60448 fi
60466 60449 fi
60467 60450
60468 60451
60469 60452 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60470 60453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60471 60454 $as_echo_n "checking for freetype includes... " >&6; }
60472 60455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60473 60456 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60474 60457 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60475 60458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60476 60459 $as_echo_n "checking for freetype libraries... " >&6; }
60477 60460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60478 60461 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60479 60462 fi
60480 60463
60481 60464
60482 60465 if test "x$FOUND_FREETYPE" != xyes; then
60483 60466 FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60484 60467
60485 60468 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60486 60469 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60487 60470 METHOD="well-known location"
60488 60471
60489 60472 # Let's start with an optimistic view of the world :-)
60490 60473 FOUND_FREETYPE=yes
60491 60474
60492 60475 # First look for the canonical freetype main include file ft2build.h.
60493 60476 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60494 60477 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60495 60478 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60496 60479 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60497 60480 # Fail.
60498 60481 FOUND_FREETYPE=no
60499 60482 fi
60500 60483 fi
60501 60484
60502 60485 if test "x$FOUND_FREETYPE" = xyes; then
60503 60486 # Include file found, let's continue the sanity check.
60504 60487 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60505 60488 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60506 60489
60507 60490 # Reset to default value
60508 60491 FREETYPE_BASE_NAME=freetype
60509 60492 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60510 60493 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60511 60494 if test "x$OPENJDK_TARGET_OS" = xmacosx \
60512 60495 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60513 60496 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60514 60497 # for the .6 version explicitly.
60515 60498 FREETYPE_BASE_NAME=freetype.6
60516 60499 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60517 60500 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60518 60501 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60519 60502 else
60520 60503 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60521 60504 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60522 60505 FOUND_FREETYPE=no
60523 60506 fi
60524 60507 else
60525 60508 if test "x$OPENJDK_TARGET_OS" = xwindows; then
60526 60509 # On Windows, we will need both .lib and .dll file.
60527 60510 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60528 60511 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60529 60512 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60530 60513 FOUND_FREETYPE=no
60531 60514 fi
60532 60515 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60533 60516 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60534 60517 # Found lib in isa dir, use that instead.
60535 60518 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60536 60519 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60537 60520 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60538 60521 fi
60539 60522 fi
60540 60523 fi
60541 60524
60542 60525 if test "x$FOUND_FREETYPE" = xyes; then
60543 60526
60544 60527 # Only process if variable expands to non-empty
60545 60528
60546 60529 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60547 60530 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60548 60531
60549 60532 # Input might be given as Windows format, start by converting to
60550 60533 # unix format.
60551 60534 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60552 60535 new_path=`$CYGPATH -u "$path"`
60553 60536
60554 60537 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60555 60538 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60556 60539 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60557 60540 # "foo.exe" is OK but "foo" is an error.
60558 60541 #
60559 60542 # This test is therefore slightly more accurate than "test -f" to check for file precense.
60560 60543 # It is also a way to make sure we got the proper file name for the real test later on.
60561 60544 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60562 60545 if test "x$test_shortpath" = x; then
60563 60546 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60564 60547 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60565 60548 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60566 60549 fi
60567 60550
60568 60551 # Call helper function which possibly converts this using DOS-style short mode.
60569 60552 # If so, the updated path is stored in $new_path.
60570 60553
60571 60554 input_path="$new_path"
60572 60555 # Check if we need to convert this using DOS-style short mode. If the path
60573 60556 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60574 60557 # take no chances and rewrite it.
60575 60558 # Note: m4 eats our [], so we need to use [ and ] instead.
60576 60559 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60577 60560 if test "x$has_forbidden_chars" != x; then
60578 60561 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60579 60562 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60580 60563 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60581 60564 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60582 60565 # Going to short mode and back again did indeed matter. Since short mode is
60583 60566 # case insensitive, let's make it lowercase to improve readability.
60584 60567 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60585 60568 # Now convert it back to Unix-style (cygpath)
60586 60569 input_path=`$CYGPATH -u "$shortmode_path"`
60587 60570 new_path="$input_path"
60588 60571 fi
60589 60572 fi
60590 60573
60591 60574 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60592 60575 if test "x$test_cygdrive_prefix" = x; then
60593 60576 # As a simple fix, exclude /usr/bin since it's not a real path.
60594 60577 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60595 60578 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60596 60579 # a path prefixed by /cygdrive for fixpath to work.
60597 60580 new_path="$CYGWIN_ROOT_PATH$input_path"
60598 60581 fi
60599 60582 fi
60600 60583
60601 60584
60602 60585 if test "x$path" != "x$new_path"; then
60603 60586 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60604 60587 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60605 60588 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60606 60589 fi
60607 60590
60608 60591 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60609 60592
60610 60593 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60611 60594 has_colon=`$ECHO $path | $GREP ^.:`
60612 60595 new_path="$path"
60613 60596 if test "x$has_colon" = x; then
60614 60597 # Not in mixed or Windows style, start by that.
60615 60598 new_path=`cmd //c echo $path`
60616 60599 fi
60617 60600
60618 60601
60619 60602 input_path="$new_path"
60620 60603 # Check if we need to convert this using DOS-style short mode. If the path
60621 60604 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60622 60605 # take no chances and rewrite it.
60623 60606 # Note: m4 eats our [], so we need to use [ and ] instead.
60624 60607 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60625 60608 if test "x$has_forbidden_chars" != x; then
60626 60609 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60627 60610 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60628 60611 fi
60629 60612
60630 60613
60631 60614 windows_path="$new_path"
60632 60615 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60633 60616 unix_path=`$CYGPATH -u "$windows_path"`
60634 60617 new_path="$unix_path"
60635 60618 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60636 60619 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60637 60620 new_path="$unix_path"
60638 60621 fi
60639 60622
60640 60623 if test "x$path" != "x$new_path"; then
60641 60624 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60642 60625 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60643 60626 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60644 60627 fi
60645 60628
60646 60629 # Save the first 10 bytes of this path to the storage, so fixpath can work.
60647 60630 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60648 60631
60649 60632 else
60650 60633 # We're on a unix platform. Hooray! :)
60651 60634 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60652 60635 has_space=`$ECHO "$path" | $GREP " "`
60653 60636 if test "x$has_space" != x; then
60654 60637 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60655 60638 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60656 60639 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60657 60640 fi
60658 60641
60659 60642 # Use eval to expand a potential ~
60660 60643 eval path="$path"
60661 60644 if test ! -f "$path" && test ! -d "$path"; then
60662 60645 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60663 60646 fi
60664 60647
60665 60648 if test -d "$path"; then
60666 60649 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60667 60650 else
60668 60651 dir="`$DIRNAME "$path"`"
60669 60652 base="`$BASENAME "$path"`"
60670 60653 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60671 60654 fi
60672 60655 fi
60673 60656 fi
60674 60657
60675 60658
60676 60659 # Only process if variable expands to non-empty
60677 60660
60678 60661 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60679 60662 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60680 60663
60681 60664 # Input might be given as Windows format, start by converting to
60682 60665 # unix format.
60683 60666 path="$POTENTIAL_FREETYPE_LIB_PATH"
60684 60667 new_path=`$CYGPATH -u "$path"`
60685 60668
60686 60669 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60687 60670 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60688 60671 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60689 60672 # "foo.exe" is OK but "foo" is an error.
60690 60673 #
60691 60674 # This test is therefore slightly more accurate than "test -f" to check for file precense.
60692 60675 # It is also a way to make sure we got the proper file name for the real test later on.
60693 60676 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60694 60677 if test "x$test_shortpath" = x; then
60695 60678 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60696 60679 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60697 60680 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60698 60681 fi
60699 60682
60700 60683 # Call helper function which possibly converts this using DOS-style short mode.
60701 60684 # If so, the updated path is stored in $new_path.
60702 60685
60703 60686 input_path="$new_path"
60704 60687 # Check if we need to convert this using DOS-style short mode. If the path
60705 60688 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60706 60689 # take no chances and rewrite it.
60707 60690 # Note: m4 eats our [], so we need to use [ and ] instead.
60708 60691 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60709 60692 if test "x$has_forbidden_chars" != x; then
60710 60693 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60711 60694 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60712 60695 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60713 60696 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60714 60697 # Going to short mode and back again did indeed matter. Since short mode is
60715 60698 # case insensitive, let's make it lowercase to improve readability.
60716 60699 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60717 60700 # Now convert it back to Unix-style (cygpath)
60718 60701 input_path=`$CYGPATH -u "$shortmode_path"`
60719 60702 new_path="$input_path"
60720 60703 fi
60721 60704 fi
60722 60705
60723 60706 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60724 60707 if test "x$test_cygdrive_prefix" = x; then
60725 60708 # As a simple fix, exclude /usr/bin since it's not a real path.
60726 60709 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60727 60710 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60728 60711 # a path prefixed by /cygdrive for fixpath to work.
60729 60712 new_path="$CYGWIN_ROOT_PATH$input_path"
60730 60713 fi
60731 60714 fi
60732 60715
60733 60716
60734 60717 if test "x$path" != "x$new_path"; then
60735 60718 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60736 60719 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60737 60720 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60738 60721 fi
60739 60722
60740 60723 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60741 60724
60742 60725 path="$POTENTIAL_FREETYPE_LIB_PATH"
60743 60726 has_colon=`$ECHO $path | $GREP ^.:`
60744 60727 new_path="$path"
60745 60728 if test "x$has_colon" = x; then
60746 60729 # Not in mixed or Windows style, start by that.
60747 60730 new_path=`cmd //c echo $path`
60748 60731 fi
60749 60732
60750 60733
60751 60734 input_path="$new_path"
60752 60735 # Check if we need to convert this using DOS-style short mode. If the path
60753 60736 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60754 60737 # take no chances and rewrite it.
60755 60738 # Note: m4 eats our [], so we need to use [ and ] instead.
60756 60739 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60757 60740 if test "x$has_forbidden_chars" != x; then
60758 60741 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60759 60742 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60760 60743 fi
60761 60744
60762 60745
60763 60746 windows_path="$new_path"
60764 60747 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60765 60748 unix_path=`$CYGPATH -u "$windows_path"`
60766 60749 new_path="$unix_path"
60767 60750 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60768 60751 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60769 60752 new_path="$unix_path"
60770 60753 fi
60771 60754
60772 60755 if test "x$path" != "x$new_path"; then
60773 60756 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60774 60757 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60775 60758 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60776 60759 fi
60777 60760
60778 60761 # Save the first 10 bytes of this path to the storage, so fixpath can work.
60779 60762 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60780 60763
60781 60764 else
60782 60765 # We're on a unix platform. Hooray! :)
60783 60766 path="$POTENTIAL_FREETYPE_LIB_PATH"
60784 60767 has_space=`$ECHO "$path" | $GREP " "`
60785 60768 if test "x$has_space" != x; then
60786 60769 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60787 60770 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60788 60771 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60789 60772 fi
60790 60773
60791 60774 # Use eval to expand a potential ~
60792 60775 eval path="$path"
60793 60776 if test ! -f "$path" && test ! -d "$path"; then
60794 60777 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60795 60778 fi
60796 60779
60797 60780 if test -d "$path"; then
60798 60781 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60799 60782 else
60800 60783 dir="`$DIRNAME "$path"`"
60801 60784 base="`$BASENAME "$path"`"
60802 60785 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60803 60786 fi
60804 60787 fi
60805 60788 fi
60806 60789
60807 60790
60808 60791 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60809 60792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60810 60793 $as_echo_n "checking for freetype includes... " >&6; }
60811 60794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60812 60795 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60813 60796 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60814 60797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60815 60798 $as_echo_n "checking for freetype libraries... " >&6; }
60816 60799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60817 60800 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60818 60801 fi
60819 60802
60820 60803 fi
60821 60804
60822 60805 if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60823 60806 if test "x$FOUND_FREETYPE" != xyes; then
60824 60807 # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60825 60808 FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60826 60809
60827 60810 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60828 60811 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60829 60812 METHOD="well-known location"
60830 60813
60831 60814 # Let's start with an optimistic view of the world :-)
60832 60815 FOUND_FREETYPE=yes
60833 60816
60834 60817 # First look for the canonical freetype main include file ft2build.h.
60835 60818 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60836 60819 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60837 60820 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60838 60821 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60839 60822 # Fail.
60840 60823 FOUND_FREETYPE=no
60841 60824 fi
60842 60825 fi
60843 60826
60844 60827 if test "x$FOUND_FREETYPE" = xyes; then
60845 60828 # Include file found, let's continue the sanity check.
60846 60829 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60847 60830 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60848 60831
60849 60832 # Reset to default value
60850 60833 FREETYPE_BASE_NAME=freetype
60851 60834 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60852 60835 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60853 60836 if test "x$OPENJDK_TARGET_OS" = xmacosx \
60854 60837 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60855 60838 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60856 60839 # for the .6 version explicitly.
60857 60840 FREETYPE_BASE_NAME=freetype.6
60858 60841 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60859 60842 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60860 60843 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60861 60844 else
60862 60845 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60863 60846 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60864 60847 FOUND_FREETYPE=no
60865 60848 fi
60866 60849 else
60867 60850 if test "x$OPENJDK_TARGET_OS" = xwindows; then
60868 60851 # On Windows, we will need both .lib and .dll file.
60869 60852 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60870 60853 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60871 60854 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60872 60855 FOUND_FREETYPE=no
60873 60856 fi
60874 60857 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60875 60858 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60876 60859 # Found lib in isa dir, use that instead.
60877 60860 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60878 60861 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60879 60862 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60880 60863 fi
60881 60864 fi
60882 60865 fi
60883 60866
60884 60867 if test "x$FOUND_FREETYPE" = xyes; then
60885 60868
60886 60869 # Only process if variable expands to non-empty
60887 60870
60888 60871 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60889 60872 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60890 60873
60891 60874 # Input might be given as Windows format, start by converting to
60892 60875 # unix format.
60893 60876 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60894 60877 new_path=`$CYGPATH -u "$path"`
60895 60878
60896 60879 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60897 60880 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60898 60881 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60899 60882 # "foo.exe" is OK but "foo" is an error.
60900 60883 #
60901 60884 # This test is therefore slightly more accurate than "test -f" to check for file precense.
60902 60885 # It is also a way to make sure we got the proper file name for the real test later on.
60903 60886 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60904 60887 if test "x$test_shortpath" = x; then
60905 60888 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60906 60889 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60907 60890 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60908 60891 fi
60909 60892
60910 60893 # Call helper function which possibly converts this using DOS-style short mode.
60911 60894 # If so, the updated path is stored in $new_path.
60912 60895
60913 60896 input_path="$new_path"
60914 60897 # Check if we need to convert this using DOS-style short mode. If the path
60915 60898 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60916 60899 # take no chances and rewrite it.
60917 60900 # Note: m4 eats our [], so we need to use [ and ] instead.
60918 60901 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60919 60902 if test "x$has_forbidden_chars" != x; then
60920 60903 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60921 60904 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60922 60905 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60923 60906 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60924 60907 # Going to short mode and back again did indeed matter. Since short mode is
60925 60908 # case insensitive, let's make it lowercase to improve readability.
60926 60909 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60927 60910 # Now convert it back to Unix-style (cygpath)
60928 60911 input_path=`$CYGPATH -u "$shortmode_path"`
60929 60912 new_path="$input_path"
60930 60913 fi
60931 60914 fi
60932 60915
60933 60916 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60934 60917 if test "x$test_cygdrive_prefix" = x; then
60935 60918 # As a simple fix, exclude /usr/bin since it's not a real path.
60936 60919 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60937 60920 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60938 60921 # a path prefixed by /cygdrive for fixpath to work.
60939 60922 new_path="$CYGWIN_ROOT_PATH$input_path"
60940 60923 fi
60941 60924 fi
60942 60925
60943 60926
60944 60927 if test "x$path" != "x$new_path"; then
60945 60928 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60946 60929 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60947 60930 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60948 60931 fi
60949 60932
60950 60933 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60951 60934
60952 60935 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60953 60936 has_colon=`$ECHO $path | $GREP ^.:`
60954 60937 new_path="$path"
60955 60938 if test "x$has_colon" = x; then
60956 60939 # Not in mixed or Windows style, start by that.
60957 60940 new_path=`cmd //c echo $path`
60958 60941 fi
60959 60942
60960 60943
60961 60944 input_path="$new_path"
60962 60945 # Check if we need to convert this using DOS-style short mode. If the path
60963 60946 # contains just simple characters, use it. Otherwise (spaces, weird characters),
60964 60947 # take no chances and rewrite it.
60965 60948 # Note: m4 eats our [], so we need to use [ and ] instead.
60966 60949 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60967 60950 if test "x$has_forbidden_chars" != x; then
60968 60951 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60969 60952 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60970 60953 fi
60971 60954
60972 60955
60973 60956 windows_path="$new_path"
60974 60957 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60975 60958 unix_path=`$CYGPATH -u "$windows_path"`
60976 60959 new_path="$unix_path"
60977 60960 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60978 60961 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60979 60962 new_path="$unix_path"
60980 60963 fi
60981 60964
60982 60965 if test "x$path" != "x$new_path"; then
60983 60966 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60984 60967 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60985 60968 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60986 60969 fi
60987 60970
60988 60971 # Save the first 10 bytes of this path to the storage, so fixpath can work.
60989 60972 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60990 60973
60991 60974 else
60992 60975 # We're on a unix platform. Hooray! :)
60993 60976 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60994 60977 has_space=`$ECHO "$path" | $GREP " "`
60995 60978 if test "x$has_space" != x; then
60996 60979 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60997 60980 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60998 60981 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60999 60982 fi
61000 60983
61001 60984 # Use eval to expand a potential ~
61002 60985 eval path="$path"
61003 60986 if test ! -f "$path" && test ! -d "$path"; then
61004 60987 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61005 60988 fi
61006 60989
61007 60990 if test -d "$path"; then
61008 60991 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61009 60992 else
61010 60993 dir="`$DIRNAME "$path"`"
61011 60994 base="`$BASENAME "$path"`"
61012 60995 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61013 60996 fi
61014 60997 fi
61015 60998 fi
61016 60999
61017 61000
61018 61001 # Only process if variable expands to non-empty
61019 61002
61020 61003 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61021 61004 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61022 61005
61023 61006 # Input might be given as Windows format, start by converting to
61024 61007 # unix format.
61025 61008 path="$POTENTIAL_FREETYPE_LIB_PATH"
61026 61009 new_path=`$CYGPATH -u "$path"`
61027 61010
61028 61011 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61029 61012 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61030 61013 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61031 61014 # "foo.exe" is OK but "foo" is an error.
61032 61015 #
61033 61016 # This test is therefore slightly more accurate than "test -f" to check for file precense.
61034 61017 # It is also a way to make sure we got the proper file name for the real test later on.
61035 61018 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61036 61019 if test "x$test_shortpath" = x; then
61037 61020 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61038 61021 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61039 61022 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61040 61023 fi
61041 61024
61042 61025 # Call helper function which possibly converts this using DOS-style short mode.
61043 61026 # If so, the updated path is stored in $new_path.
61044 61027
61045 61028 input_path="$new_path"
61046 61029 # Check if we need to convert this using DOS-style short mode. If the path
61047 61030 # contains just simple characters, use it. Otherwise (spaces, weird characters),
61048 61031 # take no chances and rewrite it.
61049 61032 # Note: m4 eats our [], so we need to use [ and ] instead.
61050 61033 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61051 61034 if test "x$has_forbidden_chars" != x; then
61052 61035 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61053 61036 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61054 61037 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61055 61038 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61056 61039 # Going to short mode and back again did indeed matter. Since short mode is
61057 61040 # case insensitive, let's make it lowercase to improve readability.
61058 61041 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61059 61042 # Now convert it back to Unix-style (cygpath)
61060 61043 input_path=`$CYGPATH -u "$shortmode_path"`
61061 61044 new_path="$input_path"
61062 61045 fi
61063 61046 fi
61064 61047
61065 61048 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61066 61049 if test "x$test_cygdrive_prefix" = x; then
61067 61050 # As a simple fix, exclude /usr/bin since it's not a real path.
61068 61051 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61069 61052 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61070 61053 # a path prefixed by /cygdrive for fixpath to work.
61071 61054 new_path="$CYGWIN_ROOT_PATH$input_path"
61072 61055 fi
61073 61056 fi
61074 61057
61075 61058
61076 61059 if test "x$path" != "x$new_path"; then
61077 61060 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61078 61061 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61079 61062 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61080 61063 fi
61081 61064
61082 61065 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61083 61066
61084 61067 path="$POTENTIAL_FREETYPE_LIB_PATH"
61085 61068 has_colon=`$ECHO $path | $GREP ^.:`
61086 61069 new_path="$path"
61087 61070 if test "x$has_colon" = x; then
61088 61071 # Not in mixed or Windows style, start by that.
61089 61072 new_path=`cmd //c echo $path`
61090 61073 fi
61091 61074
61092 61075
61093 61076 input_path="$new_path"
61094 61077 # Check if we need to convert this using DOS-style short mode. If the path
61095 61078 # contains just simple characters, use it. Otherwise (spaces, weird characters),
61096 61079 # take no chances and rewrite it.
61097 61080 # Note: m4 eats our [], so we need to use [ and ] instead.
61098 61081 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61099 61082 if test "x$has_forbidden_chars" != x; then
61100 61083 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61101 61084 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61102 61085 fi
61103 61086
61104 61087
61105 61088 windows_path="$new_path"
61106 61089 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61107 61090 unix_path=`$CYGPATH -u "$windows_path"`
61108 61091 new_path="$unix_path"
61109 61092 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61110 61093 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61111 61094 new_path="$unix_path"
61112 61095 fi
61113 61096
61114 61097 if test "x$path" != "x$new_path"; then
61115 61098 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61116 61099 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61117 61100 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61118 61101 fi
61119 61102
61120 61103 # Save the first 10 bytes of this path to the storage, so fixpath can work.
61121 61104 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61122 61105
61123 61106 else
61124 61107 # We're on a unix platform. Hooray! :)
61125 61108 path="$POTENTIAL_FREETYPE_LIB_PATH"
61126 61109 has_space=`$ECHO "$path" | $GREP " "`
61127 61110 if test "x$has_space" != x; then
61128 61111 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61129 61112 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61130 61113 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61131 61114 fi
61132 61115
61133 61116 # Use eval to expand a potential ~
61134 61117 eval path="$path"
61135 61118 if test ! -f "$path" && test ! -d "$path"; then
61136 61119 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61137 61120 fi
61138 61121
61139 61122 if test -d "$path"; then
61140 61123 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61141 61124 else
61142 61125 dir="`$DIRNAME "$path"`"
61143 61126 base="`$BASENAME "$path"`"
61144 61127 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61145 61128 fi
61146 61129 fi
61147 61130 fi
61148 61131
61149 61132
61150 61133 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61151 61134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61152 61135 $as_echo_n "checking for freetype includes... " >&6; }
61153 61136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61154 61137 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
↓ open down ↓ |
4413 lines elided |
↑ open up ↑ |
61155 61138 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61156 61139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61157 61140 $as_echo_n "checking for freetype libraries... " >&6; }
61158 61141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61159 61142 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61160 61143 fi
61161 61144
61162 61145 fi
61163 61146 fi
61164 61147
61165 - if test "x$FOUND_FREETYPE" != xyes; then
61166 - FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61167 -
61168 - POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61169 - POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61170 - METHOD="well-known location"
61171 -
61172 - # Let's start with an optimistic view of the world :-)
61173 - FOUND_FREETYPE=yes
61174 -
61175 - # First look for the canonical freetype main include file ft2build.h.
61176 - if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61177 - # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61178 - POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61179 - if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61180 - # Fail.
61181 - FOUND_FREETYPE=no
61182 - fi
61183 - fi
61184 -
61185 - if test "x$FOUND_FREETYPE" = xyes; then
61186 - # Include file found, let's continue the sanity check.
61187 - { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61188 -$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61189 -
61190 - # Reset to default value
61191 - FREETYPE_BASE_NAME=freetype
61192 - FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61193 - if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61194 - if test "x$OPENJDK_TARGET_OS" = xmacosx \
61195 - && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61196 - # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61197 - # for the .6 version explicitly.
61198 - FREETYPE_BASE_NAME=freetype.6
61199 - FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61200 - { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61201 -$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61202 - else
61203 - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61204 -$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61205 - FOUND_FREETYPE=no
61206 - fi
61207 - else
61208 - if test "x$OPENJDK_TARGET_OS" = xwindows; then
61209 - # On Windows, we will need both .lib and .dll file.
61210 - if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61211 - { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61212 -$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61213 - FOUND_FREETYPE=no
61214 - fi
61215 - elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61216 - && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61217 - # Found lib in isa dir, use that instead.
61218 - POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61219 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61220 -$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61221 - fi
61222 - fi
61223 - fi
61224 -
61225 - if test "x$FOUND_FREETYPE" = xyes; then
61226 -
61227 - # Only process if variable expands to non-empty
61228 -
61229 - if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61230 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61231 -
61232 - # Input might be given as Windows format, start by converting to
61233 - # unix format.
61234 - path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61235 - new_path=`$CYGPATH -u "$path"`
61236 -
61237 - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61238 - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61239 - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61240 - # "foo.exe" is OK but "foo" is an error.
61241 - #
61242 - # This test is therefore slightly more accurate than "test -f" to check for file precense.
61243 - # It is also a way to make sure we got the proper file name for the real test later on.
61244 - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61245 - if test "x$test_shortpath" = x; then
61246 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61247 -$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61248 - as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61249 - fi
61250 -
61251 - # Call helper function which possibly converts this using DOS-style short mode.
61252 - # If so, the updated path is stored in $new_path.
61253 -
61254 - input_path="$new_path"
61255 - # Check if we need to convert this using DOS-style short mode. If the path
61256 - # contains just simple characters, use it. Otherwise (spaces, weird characters),
61257 - # take no chances and rewrite it.
61258 - # Note: m4 eats our [], so we need to use [ and ] instead.
61259 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61260 - if test "x$has_forbidden_chars" != x; then
61261 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61262 - shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61263 - path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61264 - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61265 - # Going to short mode and back again did indeed matter. Since short mode is
61266 - # case insensitive, let's make it lowercase to improve readability.
61267 - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61268 - # Now convert it back to Unix-style (cygpath)
61269 - input_path=`$CYGPATH -u "$shortmode_path"`
61270 - new_path="$input_path"
61271 - fi
61272 - fi
61273 -
61274 - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61275 - if test "x$test_cygdrive_prefix" = x; then
61276 - # As a simple fix, exclude /usr/bin since it's not a real path.
61277 - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61278 - # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61279 - # a path prefixed by /cygdrive for fixpath to work.
61280 - new_path="$CYGWIN_ROOT_PATH$input_path"
61281 - fi
61282 - fi
61283 -
61284 -
61285 - if test "x$path" != "x$new_path"; then
61286 - POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61287 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61288 -$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61289 - fi
61290 -
61291 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61292 -
61293 - path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61294 - has_colon=`$ECHO $path | $GREP ^.:`
61295 - new_path="$path"
61296 - if test "x$has_colon" = x; then
61297 - # Not in mixed or Windows style, start by that.
61298 - new_path=`cmd //c echo $path`
61299 - fi
61300 -
61301 -
61302 - input_path="$new_path"
61303 - # Check if we need to convert this using DOS-style short mode. If the path
61304 - # contains just simple characters, use it. Otherwise (spaces, weird characters),
61305 - # take no chances and rewrite it.
61306 - # Note: m4 eats our [], so we need to use [ and ] instead.
61307 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61308 - if test "x$has_forbidden_chars" != x; then
61309 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61310 - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61311 - fi
61312 -
61313 -
61314 - windows_path="$new_path"
61315 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61316 - unix_path=`$CYGPATH -u "$windows_path"`
61317 - new_path="$unix_path"
61318 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61319 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61320 - new_path="$unix_path"
61321 - fi
61322 -
61323 - if test "x$path" != "x$new_path"; then
61324 - POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61325 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61326 -$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61327 - fi
61328 -
61329 - # Save the first 10 bytes of this path to the storage, so fixpath can work.
61330 - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61331 -
61332 - else
61333 - # We're on a unix platform. Hooray! :)
61334 - path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61335 - has_space=`$ECHO "$path" | $GREP " "`
61336 - if test "x$has_space" != x; then
61337 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61338 -$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61339 - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61340 - fi
61341 -
61342 - # Use eval to expand a potential ~
61343 - eval path="$path"
61344 - if test ! -f "$path" && test ! -d "$path"; then
61345 - as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61346 - fi
61347 -
61348 - if test -d "$path"; then
61349 - POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61350 - else
61351 - dir="`$DIRNAME "$path"`"
61352 - base="`$BASENAME "$path"`"
61353 - POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61354 - fi
61355 - fi
61356 - fi
61357 -
61358 -
61359 - # Only process if variable expands to non-empty
61360 -
61361 - if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61362 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61363 -
61364 - # Input might be given as Windows format, start by converting to
61365 - # unix format.
61366 - path="$POTENTIAL_FREETYPE_LIB_PATH"
61367 - new_path=`$CYGPATH -u "$path"`
61368 -
61369 - # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61370 - # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61371 - # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61372 - # "foo.exe" is OK but "foo" is an error.
61373 - #
61374 - # This test is therefore slightly more accurate than "test -f" to check for file precense.
61375 - # It is also a way to make sure we got the proper file name for the real test later on.
61376 - test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61377 - if test "x$test_shortpath" = x; then
61378 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61379 -$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61380 - as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61381 - fi
61382 -
61383 - # Call helper function which possibly converts this using DOS-style short mode.
61384 - # If so, the updated path is stored in $new_path.
61385 -
61386 - input_path="$new_path"
61387 - # Check if we need to convert this using DOS-style short mode. If the path
61388 - # contains just simple characters, use it. Otherwise (spaces, weird characters),
61389 - # take no chances and rewrite it.
61390 - # Note: m4 eats our [], so we need to use [ and ] instead.
61391 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61392 - if test "x$has_forbidden_chars" != x; then
61393 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61394 - shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61395 - path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61396 - if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61397 - # Going to short mode and back again did indeed matter. Since short mode is
61398 - # case insensitive, let's make it lowercase to improve readability.
61399 - shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61400 - # Now convert it back to Unix-style (cygpath)
61401 - input_path=`$CYGPATH -u "$shortmode_path"`
61402 - new_path="$input_path"
61403 - fi
61404 - fi
61405 -
61406 - test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61407 - if test "x$test_cygdrive_prefix" = x; then
61408 - # As a simple fix, exclude /usr/bin since it's not a real path.
61409 - if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61410 - # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61411 - # a path prefixed by /cygdrive for fixpath to work.
61412 - new_path="$CYGWIN_ROOT_PATH$input_path"
61413 - fi
61414 - fi
61415 -
61416 -
61417 - if test "x$path" != "x$new_path"; then
61418 - POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61419 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61420 -$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61421 - fi
61422 -
61423 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61424 -
61425 - path="$POTENTIAL_FREETYPE_LIB_PATH"
61426 - has_colon=`$ECHO $path | $GREP ^.:`
61427 - new_path="$path"
61428 - if test "x$has_colon" = x; then
61429 - # Not in mixed or Windows style, start by that.
61430 - new_path=`cmd //c echo $path`
61431 - fi
61432 -
61433 -
61434 - input_path="$new_path"
61435 - # Check if we need to convert this using DOS-style short mode. If the path
61436 - # contains just simple characters, use it. Otherwise (spaces, weird characters),
61437 - # take no chances and rewrite it.
61438 - # Note: m4 eats our [], so we need to use [ and ] instead.
61439 - has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61440 - if test "x$has_forbidden_chars" != x; then
61441 - # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61442 - new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61443 - fi
61444 -
61445 -
61446 - windows_path="$new_path"
61447 - if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61448 - unix_path=`$CYGPATH -u "$windows_path"`
61449 - new_path="$unix_path"
61450 - elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61451 - unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61452 - new_path="$unix_path"
61453 - fi
61454 -
61455 - if test "x$path" != "x$new_path"; then
61456 - POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61457 - { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61458 -$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61459 - fi
61460 -
61461 - # Save the first 10 bytes of this path to the storage, so fixpath can work.
61462 - all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61463 -
61464 - else
61465 - # We're on a unix platform. Hooray! :)
61466 - path="$POTENTIAL_FREETYPE_LIB_PATH"
61467 - has_space=`$ECHO "$path" | $GREP " "`
61468 - if test "x$has_space" != x; then
61469 - { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61470 -$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61471 - as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61472 - fi
61473 -
61474 - # Use eval to expand a potential ~
61475 - eval path="$path"
61476 - if test ! -f "$path" && test ! -d "$path"; then
61477 - as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61478 - fi
61479 -
61480 - if test -d "$path"; then
61481 - POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61482 - else
61483 - dir="`$DIRNAME "$path"`"
61484 - base="`$BASENAME "$path"`"
61485 - POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61486 - fi
61487 - fi
61488 - fi
61489 -
61490 -
61491 - FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61492 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61493 -$as_echo_n "checking for freetype includes... " >&6; }
61494 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61495 -$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61496 - FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61497 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61498 -$as_echo_n "checking for freetype libraries... " >&6; }
61499 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61500 -$as_echo "$FREETYPE_LIB_PATH" >&6; }
61501 - fi
61502 -
61503 - fi
61504 -
61505 61148 if test "x$FOUND_FREETYPE" != xyes; then
61506 61149 FREETYPE_BASE_DIR="$SYSROOT/usr"
61507 61150 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61508 61151
61509 61152 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61510 61153 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61511 61154 METHOD="well-known location"
61512 61155
61513 61156 # Let's start with an optimistic view of the world :-)
61514 61157 FOUND_FREETYPE=yes
61515 61158
61516 61159 # First look for the canonical freetype main include file ft2build.h.
61517 61160 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61518 61161 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61519 61162 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61520 61163 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61521 61164 # Fail.
61522 61165 FOUND_FREETYPE=no
61523 61166 fi
61524 61167 fi
61525 61168
61526 61169 if test "x$FOUND_FREETYPE" = xyes; then
61527 61170 # Include file found, let's continue the sanity check.
61528 61171 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61529 61172 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61530 61173
61531 61174 # Reset to default value
61532 61175 FREETYPE_BASE_NAME=freetype
61533 61176 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61534 61177 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61535 61178 if test "x$OPENJDK_TARGET_OS" = xmacosx \
61536 61179 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61537 61180 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61538 61181 # for the .6 version explicitly.
61539 61182 FREETYPE_BASE_NAME=freetype.6
61540 61183 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61541 61184 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61542 61185 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61543 61186 else
61544 61187 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61545 61188 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61546 61189 FOUND_FREETYPE=no
61547 61190 fi
61548 61191 else
61549 61192 if test "x$OPENJDK_TARGET_OS" = xwindows; then
61550 61193 # On Windows, we will need both .lib and .dll file.
61551 61194 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61552 61195 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61553 61196 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61554 61197 FOUND_FREETYPE=no
61555 61198 fi
61556 61199 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61557 61200 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61558 61201 # Found lib in isa dir, use that instead.
61559 61202 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61560 61203 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61561 61204 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61562 61205 fi
61563 61206 fi
61564 61207 fi
61565 61208
61566 61209 if test "x$FOUND_FREETYPE" = xyes; then
61567 61210
61568 61211 # Only process if variable expands to non-empty
61569 61212
61570 61213 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61571 61214 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61572 61215
61573 61216 # Input might be given as Windows format, start by converting to
61574 61217 # unix format.
61575 61218 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61576 61219 new_path=`$CYGPATH -u "$path"`
61577 61220
61578 61221 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61579 61222 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61580 61223 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61581 61224 # "foo.exe" is OK but "foo" is an error.
61582 61225 #
61583 61226 # This test is therefore slightly more accurate than "test -f" to check for file precense.
61584 61227 # It is also a way to make sure we got the proper file name for the real test later on.
61585 61228 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61586 61229 if test "x$test_shortpath" = x; then
61587 61230 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61588 61231 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61589 61232 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61590 61233 fi
61591 61234
61592 61235 # Call helper function which possibly converts this using DOS-style short mode.
61593 61236 # If so, the updated path is stored in $new_path.
61594 61237
61595 61238 input_path="$new_path"
61596 61239 # Check if we need to convert this using DOS-style short mode. If the path
61597 61240 # contains just simple characters, use it. Otherwise (spaces, weird characters),
61598 61241 # take no chances and rewrite it.
61599 61242 # Note: m4 eats our [], so we need to use [ and ] instead.
61600 61243 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61601 61244 if test "x$has_forbidden_chars" != x; then
61602 61245 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61603 61246 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61604 61247 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61605 61248 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61606 61249 # Going to short mode and back again did indeed matter. Since short mode is
61607 61250 # case insensitive, let's make it lowercase to improve readability.
61608 61251 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61609 61252 # Now convert it back to Unix-style (cygpath)
61610 61253 input_path=`$CYGPATH -u "$shortmode_path"`
61611 61254 new_path="$input_path"
61612 61255 fi
61613 61256 fi
61614 61257
61615 61258 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61616 61259 if test "x$test_cygdrive_prefix" = x; then
61617 61260 # As a simple fix, exclude /usr/bin since it's not a real path.
61618 61261 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61619 61262 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61620 61263 # a path prefixed by /cygdrive for fixpath to work.
61621 61264 new_path="$CYGWIN_ROOT_PATH$input_path"
61622 61265 fi
61623 61266 fi
61624 61267
61625 61268
61626 61269 if test "x$path" != "x$new_path"; then
61627 61270 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61628 61271 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61629 61272 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61630 61273 fi
61631 61274
61632 61275 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61633 61276
61634 61277 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61635 61278 has_colon=`$ECHO $path | $GREP ^.:`
61636 61279 new_path="$path"
61637 61280 if test "x$has_colon" = x; then
61638 61281 # Not in mixed or Windows style, start by that.
61639 61282 new_path=`cmd //c echo $path`
61640 61283 fi
61641 61284
61642 61285
61643 61286 input_path="$new_path"
61644 61287 # Check if we need to convert this using DOS-style short mode. If the path
61645 61288 # contains just simple characters, use it. Otherwise (spaces, weird characters),
61646 61289 # take no chances and rewrite it.
61647 61290 # Note: m4 eats our [], so we need to use [ and ] instead.
61648 61291 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61649 61292 if test "x$has_forbidden_chars" != x; then
61650 61293 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61651 61294 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61652 61295 fi
61653 61296
61654 61297
61655 61298 windows_path="$new_path"
61656 61299 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61657 61300 unix_path=`$CYGPATH -u "$windows_path"`
61658 61301 new_path="$unix_path"
61659 61302 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61660 61303 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61661 61304 new_path="$unix_path"
61662 61305 fi
61663 61306
61664 61307 if test "x$path" != "x$new_path"; then
61665 61308 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61666 61309 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61667 61310 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61668 61311 fi
61669 61312
61670 61313 # Save the first 10 bytes of this path to the storage, so fixpath can work.
61671 61314 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61672 61315
61673 61316 else
61674 61317 # We're on a unix platform. Hooray! :)
61675 61318 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61676 61319 has_space=`$ECHO "$path" | $GREP " "`
61677 61320 if test "x$has_space" != x; then
61678 61321 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61679 61322 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61680 61323 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61681 61324 fi
61682 61325
61683 61326 # Use eval to expand a potential ~
61684 61327 eval path="$path"
61685 61328 if test ! -f "$path" && test ! -d "$path"; then
61686 61329 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61687 61330 fi
61688 61331
61689 61332 if test -d "$path"; then
61690 61333 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61691 61334 else
61692 61335 dir="`$DIRNAME "$path"`"
61693 61336 base="`$BASENAME "$path"`"
61694 61337 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61695 61338 fi
61696 61339 fi
61697 61340 fi
61698 61341
61699 61342
61700 61343 # Only process if variable expands to non-empty
61701 61344
61702 61345 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61703 61346 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61704 61347
61705 61348 # Input might be given as Windows format, start by converting to
61706 61349 # unix format.
61707 61350 path="$POTENTIAL_FREETYPE_LIB_PATH"
61708 61351 new_path=`$CYGPATH -u "$path"`
61709 61352
61710 61353 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61711 61354 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61712 61355 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61713 61356 # "foo.exe" is OK but "foo" is an error.
61714 61357 #
61715 61358 # This test is therefore slightly more accurate than "test -f" to check for file precense.
61716 61359 # It is also a way to make sure we got the proper file name for the real test later on.
61717 61360 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61718 61361 if test "x$test_shortpath" = x; then
61719 61362 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61720 61363 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61721 61364 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61722 61365 fi
61723 61366
61724 61367 # Call helper function which possibly converts this using DOS-style short mode.
61725 61368 # If so, the updated path is stored in $new_path.
61726 61369
61727 61370 input_path="$new_path"
61728 61371 # Check if we need to convert this using DOS-style short mode. If the path
61729 61372 # contains just simple characters, use it. Otherwise (spaces, weird characters),
61730 61373 # take no chances and rewrite it.
61731 61374 # Note: m4 eats our [], so we need to use [ and ] instead.
61732 61375 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61733 61376 if test "x$has_forbidden_chars" != x; then
61734 61377 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61735 61378 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61736 61379 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61737 61380 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61738 61381 # Going to short mode and back again did indeed matter. Since short mode is
61739 61382 # case insensitive, let's make it lowercase to improve readability.
61740 61383 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61741 61384 # Now convert it back to Unix-style (cygpath)
61742 61385 input_path=`$CYGPATH -u "$shortmode_path"`
61743 61386 new_path="$input_path"
61744 61387 fi
61745 61388 fi
61746 61389
61747 61390 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61748 61391 if test "x$test_cygdrive_prefix" = x; then
61749 61392 # As a simple fix, exclude /usr/bin since it's not a real path.
61750 61393 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61751 61394 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61752 61395 # a path prefixed by /cygdrive for fixpath to work.
61753 61396 new_path="$CYGWIN_ROOT_PATH$input_path"
61754 61397 fi
61755 61398 fi
61756 61399
61757 61400
61758 61401 if test "x$path" != "x$new_path"; then
61759 61402 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61760 61403 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61761 61404 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61762 61405 fi
61763 61406
61764 61407 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61765 61408
61766 61409 path="$POTENTIAL_FREETYPE_LIB_PATH"
61767 61410 has_colon=`$ECHO $path | $GREP ^.:`
61768 61411 new_path="$path"
61769 61412 if test "x$has_colon" = x; then
61770 61413 # Not in mixed or Windows style, start by that.
61771 61414 new_path=`cmd //c echo $path`
61772 61415 fi
61773 61416
61774 61417
61775 61418 input_path="$new_path"
61776 61419 # Check if we need to convert this using DOS-style short mode. If the path
61777 61420 # contains just simple characters, use it. Otherwise (spaces, weird characters),
61778 61421 # take no chances and rewrite it.
61779 61422 # Note: m4 eats our [], so we need to use [ and ] instead.
61780 61423 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61781 61424 if test "x$has_forbidden_chars" != x; then
61782 61425 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61783 61426 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61784 61427 fi
61785 61428
61786 61429
61787 61430 windows_path="$new_path"
61788 61431 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61789 61432 unix_path=`$CYGPATH -u "$windows_path"`
61790 61433 new_path="$unix_path"
61791 61434 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61792 61435 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61793 61436 new_path="$unix_path"
61794 61437 fi
61795 61438
61796 61439 if test "x$path" != "x$new_path"; then
61797 61440 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61798 61441 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61799 61442 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61800 61443 fi
61801 61444
61802 61445 # Save the first 10 bytes of this path to the storage, so fixpath can work.
61803 61446 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61804 61447
61805 61448 else
61806 61449 # We're on a unix platform. Hooray! :)
61807 61450 path="$POTENTIAL_FREETYPE_LIB_PATH"
61808 61451 has_space=`$ECHO "$path" | $GREP " "`
61809 61452 if test "x$has_space" != x; then
61810 61453 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61811 61454 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61812 61455 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61813 61456 fi
61814 61457
61815 61458 # Use eval to expand a potential ~
61816 61459 eval path="$path"
61817 61460 if test ! -f "$path" && test ! -d "$path"; then
61818 61461 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61819 61462 fi
61820 61463
61821 61464 if test -d "$path"; then
61822 61465 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61823 61466 else
61824 61467 dir="`$DIRNAME "$path"`"
61825 61468 base="`$BASENAME "$path"`"
61826 61469 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61827 61470 fi
61828 61471 fi
61829 61472 fi
61830 61473
61831 61474
61832 61475 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61833 61476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61834 61477 $as_echo_n "checking for freetype includes... " >&6; }
61835 61478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61836 61479 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61837 61480 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61838 61481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61839 61482 $as_echo_n "checking for freetype libraries... " >&6; }
61840 61483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61841 61484 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61842 61485 fi
61843 61486
61844 61487 else
61845 61488
61846 61489 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61847 61490 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61848 61491 METHOD="well-known location"
61849 61492
61850 61493 # Let's start with an optimistic view of the world :-)
61851 61494 FOUND_FREETYPE=yes
61852 61495
61853 61496 # First look for the canonical freetype main include file ft2build.h.
61854 61497 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61855 61498 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61856 61499 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61857 61500 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61858 61501 # Fail.
61859 61502 FOUND_FREETYPE=no
61860 61503 fi
61861 61504 fi
61862 61505
61863 61506 if test "x$FOUND_FREETYPE" = xyes; then
61864 61507 # Include file found, let's continue the sanity check.
61865 61508 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61866 61509 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61867 61510
61868 61511 # Reset to default value
61869 61512 FREETYPE_BASE_NAME=freetype
61870 61513 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61871 61514 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61872 61515 if test "x$OPENJDK_TARGET_OS" = xmacosx \
61873 61516 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61874 61517 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61875 61518 # for the .6 version explicitly.
61876 61519 FREETYPE_BASE_NAME=freetype.6
61877 61520 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61878 61521 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61879 61522 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61880 61523 else
61881 61524 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61882 61525 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61883 61526 FOUND_FREETYPE=no
61884 61527 fi
61885 61528 else
61886 61529 if test "x$OPENJDK_TARGET_OS" = xwindows; then
61887 61530 # On Windows, we will need both .lib and .dll file.
61888 61531 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61889 61532 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61890 61533 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61891 61534 FOUND_FREETYPE=no
61892 61535 fi
61893 61536 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61894 61537 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61895 61538 # Found lib in isa dir, use that instead.
61896 61539 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61897 61540 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61898 61541 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61899 61542 fi
61900 61543 fi
61901 61544 fi
61902 61545
61903 61546 if test "x$FOUND_FREETYPE" = xyes; then
61904 61547
61905 61548 # Only process if variable expands to non-empty
61906 61549
61907 61550 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61908 61551 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61909 61552
61910 61553 # Input might be given as Windows format, start by converting to
61911 61554 # unix format.
61912 61555 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61913 61556 new_path=`$CYGPATH -u "$path"`
61914 61557
61915 61558 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61916 61559 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61917 61560 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61918 61561 # "foo.exe" is OK but "foo" is an error.
61919 61562 #
61920 61563 # This test is therefore slightly more accurate than "test -f" to check for file precense.
61921 61564 # It is also a way to make sure we got the proper file name for the real test later on.
61922 61565 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61923 61566 if test "x$test_shortpath" = x; then
61924 61567 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61925 61568 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61926 61569 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61927 61570 fi
61928 61571
61929 61572 # Call helper function which possibly converts this using DOS-style short mode.
61930 61573 # If so, the updated path is stored in $new_path.
61931 61574
61932 61575 input_path="$new_path"
61933 61576 # Check if we need to convert this using DOS-style short mode. If the path
61934 61577 # contains just simple characters, use it. Otherwise (spaces, weird characters),
61935 61578 # take no chances and rewrite it.
61936 61579 # Note: m4 eats our [], so we need to use [ and ] instead.
61937 61580 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61938 61581 if test "x$has_forbidden_chars" != x; then
61939 61582 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61940 61583 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61941 61584 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61942 61585 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61943 61586 # Going to short mode and back again did indeed matter. Since short mode is
61944 61587 # case insensitive, let's make it lowercase to improve readability.
61945 61588 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61946 61589 # Now convert it back to Unix-style (cygpath)
61947 61590 input_path=`$CYGPATH -u "$shortmode_path"`
61948 61591 new_path="$input_path"
61949 61592 fi
61950 61593 fi
61951 61594
61952 61595 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61953 61596 if test "x$test_cygdrive_prefix" = x; then
61954 61597 # As a simple fix, exclude /usr/bin since it's not a real path.
61955 61598 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61956 61599 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61957 61600 # a path prefixed by /cygdrive for fixpath to work.
61958 61601 new_path="$CYGWIN_ROOT_PATH$input_path"
61959 61602 fi
61960 61603 fi
61961 61604
61962 61605
61963 61606 if test "x$path" != "x$new_path"; then
61964 61607 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61965 61608 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61966 61609 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61967 61610 fi
61968 61611
61969 61612 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61970 61613
61971 61614 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61972 61615 has_colon=`$ECHO $path | $GREP ^.:`
61973 61616 new_path="$path"
61974 61617 if test "x$has_colon" = x; then
61975 61618 # Not in mixed or Windows style, start by that.
61976 61619 new_path=`cmd //c echo $path`
61977 61620 fi
61978 61621
61979 61622
61980 61623 input_path="$new_path"
61981 61624 # Check if we need to convert this using DOS-style short mode. If the path
61982 61625 # contains just simple characters, use it. Otherwise (spaces, weird characters),
61983 61626 # take no chances and rewrite it.
61984 61627 # Note: m4 eats our [], so we need to use [ and ] instead.
61985 61628 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61986 61629 if test "x$has_forbidden_chars" != x; then
61987 61630 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61988 61631 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61989 61632 fi
61990 61633
61991 61634
61992 61635 windows_path="$new_path"
61993 61636 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61994 61637 unix_path=`$CYGPATH -u "$windows_path"`
61995 61638 new_path="$unix_path"
61996 61639 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61997 61640 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61998 61641 new_path="$unix_path"
61999 61642 fi
62000 61643
62001 61644 if test "x$path" != "x$new_path"; then
62002 61645 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62003 61646 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62004 61647 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62005 61648 fi
62006 61649
62007 61650 # Save the first 10 bytes of this path to the storage, so fixpath can work.
62008 61651 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62009 61652
62010 61653 else
62011 61654 # We're on a unix platform. Hooray! :)
62012 61655 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62013 61656 has_space=`$ECHO "$path" | $GREP " "`
62014 61657 if test "x$has_space" != x; then
62015 61658 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62016 61659 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62017 61660 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62018 61661 fi
62019 61662
62020 61663 # Use eval to expand a potential ~
62021 61664 eval path="$path"
62022 61665 if test ! -f "$path" && test ! -d "$path"; then
62023 61666 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62024 61667 fi
62025 61668
62026 61669 if test -d "$path"; then
62027 61670 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62028 61671 else
62029 61672 dir="`$DIRNAME "$path"`"
62030 61673 base="`$BASENAME "$path"`"
62031 61674 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62032 61675 fi
62033 61676 fi
62034 61677 fi
62035 61678
62036 61679
62037 61680 # Only process if variable expands to non-empty
62038 61681
62039 61682 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62040 61683 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62041 61684
62042 61685 # Input might be given as Windows format, start by converting to
62043 61686 # unix format.
62044 61687 path="$POTENTIAL_FREETYPE_LIB_PATH"
62045 61688 new_path=`$CYGPATH -u "$path"`
62046 61689
62047 61690 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62048 61691 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62049 61692 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62050 61693 # "foo.exe" is OK but "foo" is an error.
62051 61694 #
62052 61695 # This test is therefore slightly more accurate than "test -f" to check for file precense.
62053 61696 # It is also a way to make sure we got the proper file name for the real test later on.
62054 61697 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62055 61698 if test "x$test_shortpath" = x; then
62056 61699 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62057 61700 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62058 61701 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62059 61702 fi
62060 61703
62061 61704 # Call helper function which possibly converts this using DOS-style short mode.
62062 61705 # If so, the updated path is stored in $new_path.
62063 61706
62064 61707 input_path="$new_path"
62065 61708 # Check if we need to convert this using DOS-style short mode. If the path
62066 61709 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62067 61710 # take no chances and rewrite it.
62068 61711 # Note: m4 eats our [], so we need to use [ and ] instead.
62069 61712 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62070 61713 if test "x$has_forbidden_chars" != x; then
62071 61714 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62072 61715 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62073 61716 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62074 61717 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62075 61718 # Going to short mode and back again did indeed matter. Since short mode is
62076 61719 # case insensitive, let's make it lowercase to improve readability.
62077 61720 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62078 61721 # Now convert it back to Unix-style (cygpath)
62079 61722 input_path=`$CYGPATH -u "$shortmode_path"`
62080 61723 new_path="$input_path"
62081 61724 fi
62082 61725 fi
62083 61726
62084 61727 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62085 61728 if test "x$test_cygdrive_prefix" = x; then
62086 61729 # As a simple fix, exclude /usr/bin since it's not a real path.
62087 61730 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62088 61731 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62089 61732 # a path prefixed by /cygdrive for fixpath to work.
62090 61733 new_path="$CYGWIN_ROOT_PATH$input_path"
62091 61734 fi
62092 61735 fi
62093 61736
62094 61737
62095 61738 if test "x$path" != "x$new_path"; then
62096 61739 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62097 61740 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62098 61741 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62099 61742 fi
62100 61743
62101 61744 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62102 61745
62103 61746 path="$POTENTIAL_FREETYPE_LIB_PATH"
62104 61747 has_colon=`$ECHO $path | $GREP ^.:`
62105 61748 new_path="$path"
62106 61749 if test "x$has_colon" = x; then
62107 61750 # Not in mixed or Windows style, start by that.
62108 61751 new_path=`cmd //c echo $path`
62109 61752 fi
62110 61753
62111 61754
62112 61755 input_path="$new_path"
62113 61756 # Check if we need to convert this using DOS-style short mode. If the path
62114 61757 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62115 61758 # take no chances and rewrite it.
62116 61759 # Note: m4 eats our [], so we need to use [ and ] instead.
62117 61760 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62118 61761 if test "x$has_forbidden_chars" != x; then
62119 61762 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62120 61763 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62121 61764 fi
62122 61765
62123 61766
62124 61767 windows_path="$new_path"
62125 61768 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62126 61769 unix_path=`$CYGPATH -u "$windows_path"`
62127 61770 new_path="$unix_path"
62128 61771 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62129 61772 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62130 61773 new_path="$unix_path"
62131 61774 fi
62132 61775
62133 61776 if test "x$path" != "x$new_path"; then
62134 61777 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62135 61778 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62136 61779 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62137 61780 fi
62138 61781
62139 61782 # Save the first 10 bytes of this path to the storage, so fixpath can work.
62140 61783 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62141 61784
62142 61785 else
62143 61786 # We're on a unix platform. Hooray! :)
62144 61787 path="$POTENTIAL_FREETYPE_LIB_PATH"
62145 61788 has_space=`$ECHO "$path" | $GREP " "`
62146 61789 if test "x$has_space" != x; then
62147 61790 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62148 61791 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62149 61792 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62150 61793 fi
62151 61794
62152 61795 # Use eval to expand a potential ~
62153 61796 eval path="$path"
62154 61797 if test ! -f "$path" && test ! -d "$path"; then
62155 61798 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62156 61799 fi
62157 61800
62158 61801 if test -d "$path"; then
62159 61802 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62160 61803 else
62161 61804 dir="`$DIRNAME "$path"`"
62162 61805 base="`$BASENAME "$path"`"
62163 61806 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62164 61807 fi
62165 61808 fi
62166 61809 fi
62167 61810
62168 61811
62169 61812 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62170 61813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62171 61814 $as_echo_n "checking for freetype includes... " >&6; }
62172 61815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62173 61816 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62174 61817 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62175 61818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62176 61819 $as_echo_n "checking for freetype libraries... " >&6; }
62177 61820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62178 61821 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62179 61822 fi
62180 61823
62181 61824 if test "x$FOUND_FREETYPE" != xyes; then
62182 61825
62183 61826 POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62184 61827 POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62185 61828 METHOD="well-known location"
62186 61829
62187 61830 # Let's start with an optimistic view of the world :-)
62188 61831 FOUND_FREETYPE=yes
62189 61832
62190 61833 # First look for the canonical freetype main include file ft2build.h.
62191 61834 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62192 61835 # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62193 61836 POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62194 61837 if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62195 61838 # Fail.
62196 61839 FOUND_FREETYPE=no
62197 61840 fi
62198 61841 fi
62199 61842
62200 61843 if test "x$FOUND_FREETYPE" = xyes; then
62201 61844 # Include file found, let's continue the sanity check.
62202 61845 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62203 61846 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62204 61847
62205 61848 # Reset to default value
62206 61849 FREETYPE_BASE_NAME=freetype
62207 61850 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62208 61851 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62209 61852 if test "x$OPENJDK_TARGET_OS" = xmacosx \
62210 61853 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62211 61854 # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62212 61855 # for the .6 version explicitly.
62213 61856 FREETYPE_BASE_NAME=freetype.6
62214 61857 FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62215 61858 { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62216 61859 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62217 61860 else
62218 61861 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62219 61862 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62220 61863 FOUND_FREETYPE=no
62221 61864 fi
62222 61865 else
62223 61866 if test "x$OPENJDK_TARGET_OS" = xwindows; then
62224 61867 # On Windows, we will need both .lib and .dll file.
62225 61868 if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62226 61869 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62227 61870 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62228 61871 FOUND_FREETYPE=no
62229 61872 fi
62230 61873 elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62231 61874 && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62232 61875 # Found lib in isa dir, use that instead.
62233 61876 POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62234 61877 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62235 61878 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62236 61879 fi
62237 61880 fi
62238 61881 fi
62239 61882
62240 61883 if test "x$FOUND_FREETYPE" = xyes; then
62241 61884
62242 61885 # Only process if variable expands to non-empty
62243 61886
62244 61887 if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62245 61888 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62246 61889
62247 61890 # Input might be given as Windows format, start by converting to
62248 61891 # unix format.
62249 61892 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62250 61893 new_path=`$CYGPATH -u "$path"`
62251 61894
62252 61895 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62253 61896 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62254 61897 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62255 61898 # "foo.exe" is OK but "foo" is an error.
62256 61899 #
62257 61900 # This test is therefore slightly more accurate than "test -f" to check for file precense.
62258 61901 # It is also a way to make sure we got the proper file name for the real test later on.
62259 61902 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62260 61903 if test "x$test_shortpath" = x; then
62261 61904 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62262 61905 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62263 61906 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62264 61907 fi
62265 61908
62266 61909 # Call helper function which possibly converts this using DOS-style short mode.
62267 61910 # If so, the updated path is stored in $new_path.
62268 61911
62269 61912 input_path="$new_path"
62270 61913 # Check if we need to convert this using DOS-style short mode. If the path
62271 61914 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62272 61915 # take no chances and rewrite it.
62273 61916 # Note: m4 eats our [], so we need to use [ and ] instead.
62274 61917 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62275 61918 if test "x$has_forbidden_chars" != x; then
62276 61919 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62277 61920 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62278 61921 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62279 61922 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62280 61923 # Going to short mode and back again did indeed matter. Since short mode is
62281 61924 # case insensitive, let's make it lowercase to improve readability.
62282 61925 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62283 61926 # Now convert it back to Unix-style (cygpath)
62284 61927 input_path=`$CYGPATH -u "$shortmode_path"`
62285 61928 new_path="$input_path"
62286 61929 fi
62287 61930 fi
62288 61931
62289 61932 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62290 61933 if test "x$test_cygdrive_prefix" = x; then
62291 61934 # As a simple fix, exclude /usr/bin since it's not a real path.
62292 61935 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62293 61936 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62294 61937 # a path prefixed by /cygdrive for fixpath to work.
62295 61938 new_path="$CYGWIN_ROOT_PATH$input_path"
62296 61939 fi
62297 61940 fi
62298 61941
62299 61942
62300 61943 if test "x$path" != "x$new_path"; then
62301 61944 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62302 61945 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62303 61946 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62304 61947 fi
62305 61948
62306 61949 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62307 61950
62308 61951 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62309 61952 has_colon=`$ECHO $path | $GREP ^.:`
62310 61953 new_path="$path"
62311 61954 if test "x$has_colon" = x; then
62312 61955 # Not in mixed or Windows style, start by that.
62313 61956 new_path=`cmd //c echo $path`
62314 61957 fi
62315 61958
62316 61959
62317 61960 input_path="$new_path"
62318 61961 # Check if we need to convert this using DOS-style short mode. If the path
62319 61962 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62320 61963 # take no chances and rewrite it.
62321 61964 # Note: m4 eats our [], so we need to use [ and ] instead.
62322 61965 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62323 61966 if test "x$has_forbidden_chars" != x; then
62324 61967 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62325 61968 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62326 61969 fi
62327 61970
62328 61971
62329 61972 windows_path="$new_path"
62330 61973 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62331 61974 unix_path=`$CYGPATH -u "$windows_path"`
62332 61975 new_path="$unix_path"
62333 61976 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62334 61977 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62335 61978 new_path="$unix_path"
62336 61979 fi
62337 61980
62338 61981 if test "x$path" != "x$new_path"; then
62339 61982 POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62340 61983 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62341 61984 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62342 61985 fi
62343 61986
62344 61987 # Save the first 10 bytes of this path to the storage, so fixpath can work.
62345 61988 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62346 61989
62347 61990 else
62348 61991 # We're on a unix platform. Hooray! :)
62349 61992 path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62350 61993 has_space=`$ECHO "$path" | $GREP " "`
62351 61994 if test "x$has_space" != x; then
62352 61995 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62353 61996 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62354 61997 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62355 61998 fi
62356 61999
62357 62000 # Use eval to expand a potential ~
62358 62001 eval path="$path"
62359 62002 if test ! -f "$path" && test ! -d "$path"; then
62360 62003 as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62361 62004 fi
62362 62005
62363 62006 if test -d "$path"; then
62364 62007 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62365 62008 else
62366 62009 dir="`$DIRNAME "$path"`"
62367 62010 base="`$BASENAME "$path"`"
62368 62011 POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62369 62012 fi
62370 62013 fi
62371 62014 fi
62372 62015
62373 62016
62374 62017 # Only process if variable expands to non-empty
62375 62018
62376 62019 if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62377 62020 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62378 62021
62379 62022 # Input might be given as Windows format, start by converting to
62380 62023 # unix format.
62381 62024 path="$POTENTIAL_FREETYPE_LIB_PATH"
62382 62025 new_path=`$CYGPATH -u "$path"`
62383 62026
62384 62027 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62385 62028 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62386 62029 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62387 62030 # "foo.exe" is OK but "foo" is an error.
62388 62031 #
62389 62032 # This test is therefore slightly more accurate than "test -f" to check for file precense.
62390 62033 # It is also a way to make sure we got the proper file name for the real test later on.
62391 62034 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62392 62035 if test "x$test_shortpath" = x; then
62393 62036 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62394 62037 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62395 62038 as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62396 62039 fi
62397 62040
62398 62041 # Call helper function which possibly converts this using DOS-style short mode.
62399 62042 # If so, the updated path is stored in $new_path.
62400 62043
62401 62044 input_path="$new_path"
62402 62045 # Check if we need to convert this using DOS-style short mode. If the path
62403 62046 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62404 62047 # take no chances and rewrite it.
62405 62048 # Note: m4 eats our [], so we need to use [ and ] instead.
62406 62049 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62407 62050 if test "x$has_forbidden_chars" != x; then
62408 62051 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62409 62052 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62410 62053 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62411 62054 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62412 62055 # Going to short mode and back again did indeed matter. Since short mode is
62413 62056 # case insensitive, let's make it lowercase to improve readability.
62414 62057 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62415 62058 # Now convert it back to Unix-style (cygpath)
62416 62059 input_path=`$CYGPATH -u "$shortmode_path"`
62417 62060 new_path="$input_path"
62418 62061 fi
62419 62062 fi
62420 62063
62421 62064 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62422 62065 if test "x$test_cygdrive_prefix" = x; then
62423 62066 # As a simple fix, exclude /usr/bin since it's not a real path.
62424 62067 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62425 62068 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62426 62069 # a path prefixed by /cygdrive for fixpath to work.
62427 62070 new_path="$CYGWIN_ROOT_PATH$input_path"
62428 62071 fi
62429 62072 fi
62430 62073
62431 62074
62432 62075 if test "x$path" != "x$new_path"; then
62433 62076 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62434 62077 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62435 62078 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62436 62079 fi
62437 62080
62438 62081 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62439 62082
62440 62083 path="$POTENTIAL_FREETYPE_LIB_PATH"
62441 62084 has_colon=`$ECHO $path | $GREP ^.:`
62442 62085 new_path="$path"
62443 62086 if test "x$has_colon" = x; then
62444 62087 # Not in mixed or Windows style, start by that.
62445 62088 new_path=`cmd //c echo $path`
62446 62089 fi
62447 62090
62448 62091
62449 62092 input_path="$new_path"
62450 62093 # Check if we need to convert this using DOS-style short mode. If the path
62451 62094 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62452 62095 # take no chances and rewrite it.
62453 62096 # Note: m4 eats our [], so we need to use [ and ] instead.
62454 62097 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62455 62098 if test "x$has_forbidden_chars" != x; then
62456 62099 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62457 62100 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62458 62101 fi
62459 62102
62460 62103
62461 62104 windows_path="$new_path"
62462 62105 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62463 62106 unix_path=`$CYGPATH -u "$windows_path"`
62464 62107 new_path="$unix_path"
62465 62108 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62466 62109 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62467 62110 new_path="$unix_path"
62468 62111 fi
62469 62112
62470 62113 if test "x$path" != "x$new_path"; then
62471 62114 POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62472 62115 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62473 62116 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62474 62117 fi
62475 62118
62476 62119 # Save the first 10 bytes of this path to the storage, so fixpath can work.
62477 62120 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62478 62121
62479 62122 else
62480 62123 # We're on a unix platform. Hooray! :)
62481 62124 path="$POTENTIAL_FREETYPE_LIB_PATH"
62482 62125 has_space=`$ECHO "$path" | $GREP " "`
62483 62126 if test "x$has_space" != x; then
62484 62127 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62485 62128 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62486 62129 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62487 62130 fi
62488 62131
62489 62132 # Use eval to expand a potential ~
62490 62133 eval path="$path"
62491 62134 if test ! -f "$path" && test ! -d "$path"; then
62492 62135 as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62493 62136 fi
62494 62137
62495 62138 if test -d "$path"; then
62496 62139 POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62497 62140 else
62498 62141 dir="`$DIRNAME "$path"`"
62499 62142 base="`$BASENAME "$path"`"
62500 62143 POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62501 62144 fi
62502 62145 fi
62503 62146 fi
62504 62147
62505 62148
62506 62149 FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62507 62150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62508 62151 $as_echo_n "checking for freetype includes... " >&6; }
62509 62152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62510 62153 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62511 62154 FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62512 62155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62513 62156 $as_echo_n "checking for freetype libraries... " >&6; }
62514 62157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62515 62158 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62516 62159 fi
62517 62160
62518 62161 fi
62519 62162 fi
62520 62163 fi
62521 62164 fi
62522 62165 fi # end check in well-known locations
62523 62166
62524 62167 if test "x$FOUND_FREETYPE" != xyes; then
62525 62168
62526 62169 # Print a helpful message on how to acquire the necessary build dependency.
62527 62170 # freetype is the help tag: freetype, cups, alsa etc
62528 62171 MISSING_DEPENDENCY=freetype
62529 62172
62530 62173 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62531 62174 cygwin_help $MISSING_DEPENDENCY
62532 62175 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62533 62176 msys_help $MISSING_DEPENDENCY
62534 62177 else
62535 62178 PKGHANDLER_COMMAND=
62536 62179
62537 62180 case $PKGHANDLER in
62538 62181 apt-get)
62539 62182 apt_help $MISSING_DEPENDENCY ;;
62540 62183 yum)
62541 62184 yum_help $MISSING_DEPENDENCY ;;
62542 62185 port)
62543 62186 port_help $MISSING_DEPENDENCY ;;
62544 62187 pkgutil)
62545 62188 pkgutil_help $MISSING_DEPENDENCY ;;
62546 62189 pkgadd)
62547 62190 pkgadd_help $MISSING_DEPENDENCY ;;
62548 62191 esac
62549 62192
62550 62193 if test "x$PKGHANDLER_COMMAND" != x; then
62551 62194 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62552 62195 fi
62553 62196 fi
62554 62197
62555 62198 as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62556 62199 fi
62557 62200 fi # end user specified settings
62558 62201
62559 62202 # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62560 62203 if test "x$FREETYPE_CFLAGS" = x; then
62561 62204
62562 62205 # Only process if variable expands to non-empty
62563 62206
62564 62207 if test "x$FREETYPE_INCLUDE_PATH" != x; then
62565 62208 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62566 62209
62567 62210 # Input might be given as Windows format, start by converting to
62568 62211 # unix format.
62569 62212 path="$FREETYPE_INCLUDE_PATH"
62570 62213 new_path=`$CYGPATH -u "$path"`
62571 62214
62572 62215 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62573 62216 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62574 62217 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62575 62218 # "foo.exe" is OK but "foo" is an error.
62576 62219 #
62577 62220 # This test is therefore slightly more accurate than "test -f" to check for file precense.
62578 62221 # It is also a way to make sure we got the proper file name for the real test later on.
62579 62222 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62580 62223 if test "x$test_shortpath" = x; then
62581 62224 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62582 62225 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62583 62226 as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62584 62227 fi
62585 62228
62586 62229 # Call helper function which possibly converts this using DOS-style short mode.
62587 62230 # If so, the updated path is stored in $new_path.
62588 62231
62589 62232 input_path="$new_path"
62590 62233 # Check if we need to convert this using DOS-style short mode. If the path
62591 62234 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62592 62235 # take no chances and rewrite it.
62593 62236 # Note: m4 eats our [], so we need to use [ and ] instead.
62594 62237 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62595 62238 if test "x$has_forbidden_chars" != x; then
62596 62239 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62597 62240 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62598 62241 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62599 62242 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62600 62243 # Going to short mode and back again did indeed matter. Since short mode is
62601 62244 # case insensitive, let's make it lowercase to improve readability.
62602 62245 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62603 62246 # Now convert it back to Unix-style (cygpath)
62604 62247 input_path=`$CYGPATH -u "$shortmode_path"`
62605 62248 new_path="$input_path"
62606 62249 fi
62607 62250 fi
62608 62251
62609 62252 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62610 62253 if test "x$test_cygdrive_prefix" = x; then
62611 62254 # As a simple fix, exclude /usr/bin since it's not a real path.
62612 62255 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62613 62256 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62614 62257 # a path prefixed by /cygdrive for fixpath to work.
62615 62258 new_path="$CYGWIN_ROOT_PATH$input_path"
62616 62259 fi
62617 62260 fi
62618 62261
62619 62262
62620 62263 if test "x$path" != "x$new_path"; then
62621 62264 FREETYPE_INCLUDE_PATH="$new_path"
62622 62265 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62623 62266 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62624 62267 fi
62625 62268
62626 62269 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62627 62270
62628 62271 path="$FREETYPE_INCLUDE_PATH"
62629 62272 has_colon=`$ECHO $path | $GREP ^.:`
62630 62273 new_path="$path"
62631 62274 if test "x$has_colon" = x; then
62632 62275 # Not in mixed or Windows style, start by that.
62633 62276 new_path=`cmd //c echo $path`
62634 62277 fi
62635 62278
62636 62279
62637 62280 input_path="$new_path"
62638 62281 # Check if we need to convert this using DOS-style short mode. If the path
62639 62282 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62640 62283 # take no chances and rewrite it.
62641 62284 # Note: m4 eats our [], so we need to use [ and ] instead.
62642 62285 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62643 62286 if test "x$has_forbidden_chars" != x; then
62644 62287 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62645 62288 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62646 62289 fi
62647 62290
62648 62291
62649 62292 windows_path="$new_path"
62650 62293 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62651 62294 unix_path=`$CYGPATH -u "$windows_path"`
62652 62295 new_path="$unix_path"
62653 62296 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62654 62297 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62655 62298 new_path="$unix_path"
62656 62299 fi
62657 62300
62658 62301 if test "x$path" != "x$new_path"; then
62659 62302 FREETYPE_INCLUDE_PATH="$new_path"
62660 62303 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62661 62304 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62662 62305 fi
62663 62306
62664 62307 # Save the first 10 bytes of this path to the storage, so fixpath can work.
62665 62308 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62666 62309
62667 62310 else
62668 62311 # We're on a unix platform. Hooray! :)
62669 62312 path="$FREETYPE_INCLUDE_PATH"
62670 62313 has_space=`$ECHO "$path" | $GREP " "`
62671 62314 if test "x$has_space" != x; then
62672 62315 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62673 62316 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62674 62317 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62675 62318 fi
62676 62319
62677 62320 # Use eval to expand a potential ~
62678 62321 eval path="$path"
62679 62322 if test ! -f "$path" && test ! -d "$path"; then
62680 62323 as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62681 62324 fi
62682 62325
62683 62326 if test -d "$path"; then
62684 62327 FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62685 62328 else
62686 62329 dir="`$DIRNAME "$path"`"
62687 62330 base="`$BASENAME "$path"`"
62688 62331 FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62689 62332 fi
62690 62333 fi
62691 62334 fi
62692 62335
62693 62336 if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62694 62337 FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62695 62338 else
62696 62339 FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62697 62340 fi
62698 62341 fi
62699 62342
62700 62343 if test "x$FREETYPE_LIBS" = x; then
62701 62344
62702 62345 # Only process if variable expands to non-empty
62703 62346
62704 62347 if test "x$FREETYPE_LIB_PATH" != x; then
62705 62348 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62706 62349
62707 62350 # Input might be given as Windows format, start by converting to
62708 62351 # unix format.
62709 62352 path="$FREETYPE_LIB_PATH"
62710 62353 new_path=`$CYGPATH -u "$path"`
62711 62354
62712 62355 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62713 62356 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62714 62357 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62715 62358 # "foo.exe" is OK but "foo" is an error.
62716 62359 #
62717 62360 # This test is therefore slightly more accurate than "test -f" to check for file precense.
62718 62361 # It is also a way to make sure we got the proper file name for the real test later on.
62719 62362 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62720 62363 if test "x$test_shortpath" = x; then
62721 62364 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62722 62365 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62723 62366 as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62724 62367 fi
62725 62368
62726 62369 # Call helper function which possibly converts this using DOS-style short mode.
62727 62370 # If so, the updated path is stored in $new_path.
62728 62371
62729 62372 input_path="$new_path"
62730 62373 # Check if we need to convert this using DOS-style short mode. If the path
62731 62374 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62732 62375 # take no chances and rewrite it.
62733 62376 # Note: m4 eats our [], so we need to use [ and ] instead.
62734 62377 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62735 62378 if test "x$has_forbidden_chars" != x; then
62736 62379 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62737 62380 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62738 62381 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62739 62382 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62740 62383 # Going to short mode and back again did indeed matter. Since short mode is
62741 62384 # case insensitive, let's make it lowercase to improve readability.
62742 62385 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62743 62386 # Now convert it back to Unix-style (cygpath)
62744 62387 input_path=`$CYGPATH -u "$shortmode_path"`
62745 62388 new_path="$input_path"
62746 62389 fi
62747 62390 fi
62748 62391
62749 62392 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62750 62393 if test "x$test_cygdrive_prefix" = x; then
62751 62394 # As a simple fix, exclude /usr/bin since it's not a real path.
62752 62395 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62753 62396 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62754 62397 # a path prefixed by /cygdrive for fixpath to work.
62755 62398 new_path="$CYGWIN_ROOT_PATH$input_path"
62756 62399 fi
62757 62400 fi
62758 62401
62759 62402
62760 62403 if test "x$path" != "x$new_path"; then
62761 62404 FREETYPE_LIB_PATH="$new_path"
62762 62405 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62763 62406 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62764 62407 fi
62765 62408
62766 62409 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62767 62410
62768 62411 path="$FREETYPE_LIB_PATH"
62769 62412 has_colon=`$ECHO $path | $GREP ^.:`
62770 62413 new_path="$path"
62771 62414 if test "x$has_colon" = x; then
62772 62415 # Not in mixed or Windows style, start by that.
62773 62416 new_path=`cmd //c echo $path`
62774 62417 fi
62775 62418
62776 62419
62777 62420 input_path="$new_path"
62778 62421 # Check if we need to convert this using DOS-style short mode. If the path
62779 62422 # contains just simple characters, use it. Otherwise (spaces, weird characters),
62780 62423 # take no chances and rewrite it.
62781 62424 # Note: m4 eats our [], so we need to use [ and ] instead.
62782 62425 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62783 62426 if test "x$has_forbidden_chars" != x; then
62784 62427 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62785 62428 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62786 62429 fi
62787 62430
62788 62431
62789 62432 windows_path="$new_path"
62790 62433 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62791 62434 unix_path=`$CYGPATH -u "$windows_path"`
62792 62435 new_path="$unix_path"
62793 62436 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62794 62437 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62795 62438 new_path="$unix_path"
62796 62439 fi
62797 62440
62798 62441 if test "x$path" != "x$new_path"; then
62799 62442 FREETYPE_LIB_PATH="$new_path"
62800 62443 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62801 62444 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62802 62445 fi
62803 62446
62804 62447 # Save the first 10 bytes of this path to the storage, so fixpath can work.
62805 62448 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62806 62449
62807 62450 else
62808 62451 # We're on a unix platform. Hooray! :)
62809 62452 path="$FREETYPE_LIB_PATH"
62810 62453 has_space=`$ECHO "$path" | $GREP " "`
62811 62454 if test "x$has_space" != x; then
62812 62455 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62813 62456 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62814 62457 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62815 62458 fi
62816 62459
62817 62460 # Use eval to expand a potential ~
62818 62461 eval path="$path"
62819 62462 if test ! -f "$path" && test ! -d "$path"; then
62820 62463 as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62821 62464 fi
62822 62465
62823 62466 if test -d "$path"; then
62824 62467 FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62825 62468 else
62826 62469 dir="`$DIRNAME "$path"`"
62827 62470 base="`$BASENAME "$path"`"
62828 62471 FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62829 62472 fi
62830 62473 fi
62831 62474 fi
62832 62475
62833 62476 if test "x$OPENJDK_TARGET_OS" = xwindows; then
62834 62477 FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62835 62478 else
62836 62479 FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62837 62480 fi
62838 62481 fi
62839 62482
62840 62483 # Try to compile it
62841 62484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62842 62485 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
62843 62486 ac_ext=cpp
62844 62487 ac_cpp='$CXXCPP $CPPFLAGS'
62845 62488 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62846 62489 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62847 62490 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62848 62491
62849 62492 PREV_CXXCFLAGS="$CXXFLAGS"
62850 62493 PREV_LIBS="$LIBS"
62851 62494 PREV_CXX="$CXX"
62852 62495 CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62853 62496 LIBS="$LIBS $FREETYPE_LIBS"
62854 62497 CXX="$FIXPATH $CXX"
62855 62498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62856 62499 /* end confdefs.h. */
62857 62500
62858 62501 #include<ft2build.h>
62859 62502 #include FT_FREETYPE_H
62860 62503 int main () {
62861 62504 FT_Init_FreeType(NULL);
62862 62505 return 0;
62863 62506 }
62864 62507
62865 62508 _ACEOF
62866 62509 if ac_fn_cxx_try_link "$LINENO"; then :
62867 62510
62868 62511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62869 62512 $as_echo "yes" >&6; }
62870 62513
62871 62514 else
62872 62515
62873 62516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62874 62517 $as_echo "no" >&6; }
62875 62518 { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62876 62519 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62877 62520 { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62878 62521 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62879 62522
62880 62523
62881 62524 # Print a helpful message on how to acquire the necessary build dependency.
62882 62525 # freetype is the help tag: freetype, cups, alsa etc
62883 62526 MISSING_DEPENDENCY=freetype
62884 62527
62885 62528 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62886 62529 cygwin_help $MISSING_DEPENDENCY
62887 62530 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62888 62531 msys_help $MISSING_DEPENDENCY
62889 62532 else
62890 62533 PKGHANDLER_COMMAND=
62891 62534
62892 62535 case $PKGHANDLER in
62893 62536 apt-get)
62894 62537 apt_help $MISSING_DEPENDENCY ;;
62895 62538 yum)
62896 62539 yum_help $MISSING_DEPENDENCY ;;
62897 62540 port)
62898 62541 port_help $MISSING_DEPENDENCY ;;
62899 62542 pkgutil)
62900 62543 pkgutil_help $MISSING_DEPENDENCY ;;
62901 62544 pkgadd)
62902 62545 pkgadd_help $MISSING_DEPENDENCY ;;
62903 62546 esac
62904 62547
62905 62548 if test "x$PKGHANDLER_COMMAND" != x; then
62906 62549 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62907 62550 fi
62908 62551 fi
62909 62552
62910 62553
62911 62554 as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62912 62555
62913 62556
62914 62557 fi
62915 62558 rm -f core conftest.err conftest.$ac_objext \
62916 62559 conftest$ac_exeext conftest.$ac_ext
62917 62560 CXXCFLAGS="$PREV_CXXFLAGS"
62918 62561 LIBS="$PREV_LIBS"
62919 62562 CXX="$PREV_CXX"
62920 62563 ac_ext=cpp
62921 62564 ac_cpp='$CXXCPP $CPPFLAGS'
62922 62565 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62923 62566 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62924 62567 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62925 62568
62926 62569
62927 62570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62928 62571 $as_echo_n "checking if we should bundle freetype... " >&6; }
62929 62572 if test "x$BUNDLE_FREETYPE" = xyes; then
62930 62573 FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62931 62574 fi
62932 62575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62933 62576 $as_echo "$BUNDLE_FREETYPE" >&6; }
62934 62577
62935 62578 fi # end freetype needed
62936 62579
62937 62580
62938 62581
62939 62582
62940 62583
62941 62584
62942 62585
62943 62586 # Check whether --with-alsa was given.
62944 62587 if test "${with_alsa+set}" = set; then :
62945 62588 withval=$with_alsa;
62946 62589 fi
62947 62590
62948 62591
62949 62592 # Check whether --with-alsa-include was given.
62950 62593 if test "${with_alsa_include+set}" = set; then :
62951 62594 withval=$with_alsa_include;
62952 62595 fi
62953 62596
62954 62597
62955 62598 # Check whether --with-alsa-lib was given.
62956 62599 if test "${with_alsa_lib+set}" = set; then :
62957 62600 withval=$with_alsa_lib;
62958 62601 fi
62959 62602
62960 62603
62961 62604 if test "x$NEEDS_LIB_ALSA" = xfalse; then
62962 62605 if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62963 62606 (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62964 62607 (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62965 62608 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62966 62609 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62967 62610 fi
62968 62611 ALSA_CFLAGS=
62969 62612 ALSA_LIBS=
62970 62613 else
62971 62614 ALSA_FOUND=no
62972 62615
62973 62616 if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62974 62617 as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62975 62618 fi
62976 62619
62977 62620 if test "x${with_alsa}" != x; then
62978 62621 ALSA_LIBS="-L${with_alsa}/lib -lasound"
62979 62622 ALSA_CFLAGS="-I${with_alsa}/include"
62980 62623 ALSA_FOUND=yes
62981 62624 fi
62982 62625 if test "x${with_alsa_include}" != x; then
62983 62626 ALSA_CFLAGS="-I${with_alsa_include}"
62984 62627 ALSA_FOUND=yes
62985 62628 fi
62986 62629 if test "x${with_alsa_lib}" != x; then
62987 62630 ALSA_LIBS="-L${with_alsa_lib} -lasound"
62988 62631 ALSA_FOUND=yes
62989 62632 fi
62990 62633 # Do not try pkg-config if we have a sysroot set.
62991 62634 if test "x$SYSROOT" = x; then
62992 62635 if test "x$ALSA_FOUND" = xno; then
62993 62636
62994 62637 pkg_failed=no
62995 62638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62996 62639 $as_echo_n "checking for ALSA... " >&6; }
62997 62640
62998 62641 if test -n "$ALSA_CFLAGS"; then
62999 62642 pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63000 62643 elif test -n "$PKG_CONFIG"; then
63001 62644 if test -n "$PKG_CONFIG" && \
63002 62645 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63003 62646 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63004 62647 ac_status=$?
63005 62648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63006 62649 test $ac_status = 0; }; then
63007 62650 pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63008 62651 else
63009 62652 pkg_failed=yes
63010 62653 fi
63011 62654 else
63012 62655 pkg_failed=untried
63013 62656 fi
63014 62657 if test -n "$ALSA_LIBS"; then
63015 62658 pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63016 62659 elif test -n "$PKG_CONFIG"; then
63017 62660 if test -n "$PKG_CONFIG" && \
63018 62661 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63019 62662 ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63020 62663 ac_status=$?
63021 62664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63022 62665 test $ac_status = 0; }; then
63023 62666 pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63024 62667 else
63025 62668 pkg_failed=yes
63026 62669 fi
63027 62670 else
63028 62671 pkg_failed=untried
63029 62672 fi
63030 62673
63031 62674
63032 62675
63033 62676 if test $pkg_failed = yes; then
63034 62677
63035 62678 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63036 62679 _pkg_short_errors_supported=yes
63037 62680 else
63038 62681 _pkg_short_errors_supported=no
63039 62682 fi
63040 62683 if test $_pkg_short_errors_supported = yes; then
63041 62684 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63042 62685 else
63043 62686 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63044 62687 fi
63045 62688 # Put the nasty error message in config.log where it belongs
63046 62689 echo "$ALSA_PKG_ERRORS" >&5
63047 62690
63048 62691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63049 62692 $as_echo "no" >&6; }
63050 62693 ALSA_FOUND=no
63051 62694 elif test $pkg_failed = untried; then
63052 62695 ALSA_FOUND=no
63053 62696 else
63054 62697 ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63055 62698 ALSA_LIBS=$pkg_cv_ALSA_LIBS
63056 62699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63057 62700 $as_echo "yes" >&6; }
63058 62701 ALSA_FOUND=yes
63059 62702 fi
63060 62703 fi
63061 62704 fi
63062 62705 if test "x$ALSA_FOUND" = xno; then
63063 62706 for ac_header in alsa/asoundlib.h
63064 62707 do :
63065 62708 ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63066 62709 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63067 62710 cat >>confdefs.h <<_ACEOF
63068 62711 #define HAVE_ALSA_ASOUNDLIB_H 1
63069 62712 _ACEOF
63070 62713
63071 62714 ALSA_FOUND=yes
63072 62715 ALSA_CFLAGS=-Iignoreme
63073 62716 ALSA_LIBS=-lasound
63074 62717 DEFAULT_ALSA=yes
63075 62718
63076 62719 else
63077 62720 ALSA_FOUND=no
63078 62721
63079 62722 fi
63080 62723
63081 62724 done
63082 62725
63083 62726 fi
63084 62727 if test "x$ALSA_FOUND" = xno; then
63085 62728
63086 62729 # Print a helpful message on how to acquire the necessary build dependency.
63087 62730 # alsa is the help tag: freetype, cups, alsa etc
63088 62731 MISSING_DEPENDENCY=alsa
63089 62732
63090 62733 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63091 62734 cygwin_help $MISSING_DEPENDENCY
63092 62735 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63093 62736 msys_help $MISSING_DEPENDENCY
63094 62737 else
63095 62738 PKGHANDLER_COMMAND=
63096 62739
63097 62740 case $PKGHANDLER in
63098 62741 apt-get)
63099 62742 apt_help $MISSING_DEPENDENCY ;;
63100 62743 yum)
63101 62744 yum_help $MISSING_DEPENDENCY ;;
63102 62745 port)
63103 62746 port_help $MISSING_DEPENDENCY ;;
63104 62747 pkgutil)
63105 62748 pkgutil_help $MISSING_DEPENDENCY ;;
63106 62749 pkgadd)
63107 62750 pkgadd_help $MISSING_DEPENDENCY ;;
63108 62751 esac
63109 62752
63110 62753 if test "x$PKGHANDLER_COMMAND" != x; then
63111 62754 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63112 62755 fi
63113 62756 fi
63114 62757
63115 62758 as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63116 62759 fi
63117 62760 fi
63118 62761
63119 62762
63120 62763
63121 62764
63122 62765
63123 62766
63124 62767 # Check whether --with-libffi was given.
63125 62768 if test "${with_libffi+set}" = set; then :
63126 62769 withval=$with_libffi;
63127 62770 fi
63128 62771
63129 62772
63130 62773 # Check whether --with-libffi-include was given.
63131 62774 if test "${with_libffi_include+set}" = set; then :
63132 62775 withval=$with_libffi_include;
63133 62776 fi
63134 62777
63135 62778
63136 62779 # Check whether --with-libffi-lib was given.
63137 62780 if test "${with_libffi_lib+set}" = set; then :
63138 62781 withval=$with_libffi_lib;
63139 62782 fi
63140 62783
63141 62784
63142 62785 if test "x$NEEDS_LIB_FFI" = xfalse; then
63143 62786 if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63144 62787 (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63145 62788 (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63146 62789 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63147 62790 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63148 62791 fi
63149 62792 LIBFFI_CFLAGS=
63150 62793 LIBFFI_LIBS=
63151 62794 else
63152 62795 LIBFFI_FOUND=no
63153 62796
63154 62797 if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63155 62798 as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63156 62799 fi
63157 62800
63158 62801 if test "x${with_libffi}" != x; then
63159 62802 LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63160 62803 LIBFFI_CFLAGS="-I${with_libffi}/include"
63161 62804 LIBFFI_FOUND=yes
63162 62805 fi
63163 62806 if test "x${with_libffi_include}" != x; then
63164 62807 LIBFFI_CFLAGS="-I${with_libffi_include}"
63165 62808 LIBFFI_FOUND=yes
63166 62809 fi
63167 62810 if test "x${with_libffi_lib}" != x; then
63168 62811 LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63169 62812 LIBFFI_FOUND=yes
63170 62813 fi
63171 62814 # Do not try pkg-config if we have a sysroot set.
63172 62815 if test "x$SYSROOT" = x; then
63173 62816 if test "x$LIBFFI_FOUND" = xno; then
63174 62817 # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63175 62818
63176 62819 pkg_failed=no
63177 62820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63178 62821 $as_echo_n "checking for LIBFFI... " >&6; }
63179 62822
63180 62823 if test -n "$LIBFFI_CFLAGS"; then
63181 62824 pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63182 62825 elif test -n "$PKG_CONFIG"; then
63183 62826 if test -n "$PKG_CONFIG" && \
63184 62827 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63185 62828 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63186 62829 ac_status=$?
63187 62830 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63188 62831 test $ac_status = 0; }; then
63189 62832 pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63190 62833 else
63191 62834 pkg_failed=yes
63192 62835 fi
63193 62836 else
63194 62837 pkg_failed=untried
63195 62838 fi
63196 62839 if test -n "$LIBFFI_LIBS"; then
63197 62840 pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63198 62841 elif test -n "$PKG_CONFIG"; then
63199 62842 if test -n "$PKG_CONFIG" && \
63200 62843 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63201 62844 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63202 62845 ac_status=$?
63203 62846 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63204 62847 test $ac_status = 0; }; then
63205 62848 pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63206 62849 else
63207 62850 pkg_failed=yes
63208 62851 fi
63209 62852 else
63210 62853 pkg_failed=untried
63211 62854 fi
63212 62855
63213 62856
63214 62857
63215 62858 if test $pkg_failed = yes; then
63216 62859
63217 62860 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63218 62861 _pkg_short_errors_supported=yes
63219 62862 else
63220 62863 _pkg_short_errors_supported=no
63221 62864 fi
63222 62865 if test $_pkg_short_errors_supported = yes; then
63223 62866 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63224 62867 else
63225 62868 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63226 62869 fi
63227 62870 # Put the nasty error message in config.log where it belongs
63228 62871 echo "$LIBFFI_PKG_ERRORS" >&5
63229 62872
63230 62873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63231 62874 $as_echo "no" >&6; }
63232 62875 LIBFFI_FOUND=no
63233 62876 elif test $pkg_failed = untried; then
63234 62877 LIBFFI_FOUND=no
63235 62878 else
63236 62879 LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63237 62880 LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63238 62881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63239 62882 $as_echo "yes" >&6; }
63240 62883 LIBFFI_FOUND=yes
63241 62884 fi
63242 62885 fi
63243 62886 fi
63244 62887 if test "x$LIBFFI_FOUND" = xno; then
63245 62888 for ac_header in ffi.h
63246 62889 do :
63247 62890 ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63248 62891 if test "x$ac_cv_header_ffi_h" = xyes; then :
63249 62892 cat >>confdefs.h <<_ACEOF
63250 62893 #define HAVE_FFI_H 1
63251 62894 _ACEOF
63252 62895
63253 62896 LIBFFI_FOUND=yes
63254 62897 LIBFFI_CFLAGS=
63255 62898 LIBFFI_LIBS=-lffi
63256 62899
63257 62900 else
63258 62901 LIBFFI_FOUND=no
63259 62902
63260 62903 fi
63261 62904
63262 62905 done
63263 62906
63264 62907 fi
63265 62908 if test "x$LIBFFI_FOUND" = xno; then
63266 62909
63267 62910 # Print a helpful message on how to acquire the necessary build dependency.
63268 62911 # ffi is the help tag: freetype, cups, alsa etc
63269 62912 MISSING_DEPENDENCY=ffi
63270 62913
63271 62914 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63272 62915 cygwin_help $MISSING_DEPENDENCY
63273 62916 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63274 62917 msys_help $MISSING_DEPENDENCY
63275 62918 else
63276 62919 PKGHANDLER_COMMAND=
63277 62920
63278 62921 case $PKGHANDLER in
63279 62922 apt-get)
63280 62923 apt_help $MISSING_DEPENDENCY ;;
63281 62924 yum)
63282 62925 yum_help $MISSING_DEPENDENCY ;;
63283 62926 port)
63284 62927 port_help $MISSING_DEPENDENCY ;;
63285 62928 pkgutil)
63286 62929 pkgutil_help $MISSING_DEPENDENCY ;;
63287 62930 pkgadd)
63288 62931 pkgadd_help $MISSING_DEPENDENCY ;;
63289 62932 esac
63290 62933
63291 62934 if test "x$PKGHANDLER_COMMAND" != x; then
63292 62935 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63293 62936 fi
63294 62937 fi
63295 62938
63296 62939 as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63297 62940 fi
63298 62941
63299 62942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63300 62943 $as_echo_n "checking if libffi works... " >&6; }
63301 62944 ac_ext=c
63302 62945 ac_cpp='$CPP $CPPFLAGS'
63303 62946 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63304 62947 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63305 62948 ac_compiler_gnu=$ac_cv_c_compiler_gnu
63306 62949
63307 62950 OLD_CFLAGS="$CFLAGS"
63308 62951 CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63309 62952 OLD_LIBS="$LIBS"
63310 62953 LIBS="$LIBS $LIBFFI_LIBS"
63311 62954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63312 62955 /* end confdefs.h. */
63313 62956 #include <ffi.h>
63314 62957 int
63315 62958 main ()
63316 62959 {
63317 62960
63318 62961 ffi_call(NULL, NULL, NULL, NULL);
63319 62962 return 0;
63320 62963
63321 62964 ;
63322 62965 return 0;
63323 62966 }
63324 62967 _ACEOF
63325 62968 if ac_fn_c_try_link "$LINENO"; then :
63326 62969 LIBFFI_WORKS=yes
63327 62970 else
63328 62971 LIBFFI_WORKS=no
63329 62972
63330 62973 fi
63331 62974 rm -f core conftest.err conftest.$ac_objext \
63332 62975 conftest$ac_exeext conftest.$ac_ext
63333 62976 CFLAGS="$OLD_CFLAGS"
63334 62977 LIBS="$OLD_LIBS"
63335 62978 ac_ext=cpp
63336 62979 ac_cpp='$CXXCPP $CPPFLAGS'
63337 62980 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63338 62981 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63339 62982 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63340 62983
63341 62984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63342 62985 $as_echo "$LIBFFI_WORKS" >&6; }
63343 62986
63344 62987 if test "x$LIBFFI_WORKS" = xno; then
63345 62988
63346 62989 # Print a helpful message on how to acquire the necessary build dependency.
63347 62990 # ffi is the help tag: freetype, cups, alsa etc
63348 62991 MISSING_DEPENDENCY=ffi
63349 62992
63350 62993 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63351 62994 cygwin_help $MISSING_DEPENDENCY
63352 62995 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63353 62996 msys_help $MISSING_DEPENDENCY
63354 62997 else
63355 62998 PKGHANDLER_COMMAND=
63356 62999
63357 63000 case $PKGHANDLER in
63358 63001 apt-get)
63359 63002 apt_help $MISSING_DEPENDENCY ;;
63360 63003 yum)
63361 63004 yum_help $MISSING_DEPENDENCY ;;
63362 63005 port)
63363 63006 port_help $MISSING_DEPENDENCY ;;
63364 63007 pkgutil)
63365 63008 pkgutil_help $MISSING_DEPENDENCY ;;
63366 63009 pkgadd)
63367 63010 pkgadd_help $MISSING_DEPENDENCY ;;
63368 63011 esac
63369 63012
63370 63013 if test "x$PKGHANDLER_COMMAND" != x; then
63371 63014 HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63372 63015 fi
63373 63016 fi
63374 63017
63375 63018 as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63376 63019 fi
63377 63020 fi
63378 63021
63379 63022
63380 63023
63381 63024
63382 63025
63383 63026 if [[ " $JVM_VARIANTS " =~ " zeroshark " ]] ; then
63384 63027 # Extract the first word of "llvm-config", so it can be a program name with args.
63385 63028 set dummy llvm-config; ac_word=$2
63386 63029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63387 63030 $as_echo_n "checking for $ac_word... " >&6; }
63388 63031 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63389 63032 $as_echo_n "(cached) " >&6
63390 63033 else
63391 63034 if test -n "$LLVM_CONFIG"; then
63392 63035 ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63393 63036 else
63394 63037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63395 63038 for as_dir in $PATH
63396 63039 do
63397 63040 IFS=$as_save_IFS
63398 63041 test -z "$as_dir" && as_dir=.
63399 63042 for ac_exec_ext in '' $ac_executable_extensions; do
63400 63043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63401 63044 ac_cv_prog_LLVM_CONFIG="llvm-config"
63402 63045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63403 63046 break 2
63404 63047 fi
63405 63048 done
63406 63049 done
63407 63050 IFS=$as_save_IFS
63408 63051
63409 63052 fi
63410 63053 fi
63411 63054 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63412 63055 if test -n "$LLVM_CONFIG"; then
63413 63056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63414 63057 $as_echo "$LLVM_CONFIG" >&6; }
63415 63058 else
63416 63059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63417 63060 $as_echo "no" >&6; }
63418 63061 fi
63419 63062
63420 63063
63421 63064
63422 63065 if test "x$LLVM_CONFIG" != xllvm-config; then
63423 63066 as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63424 63067 fi
63425 63068
63426 63069 llvm_components="jit mcjit engine nativecodegen native"
63427 63070 unset LLVM_CFLAGS
63428 63071 for flag in $("$LLVM_CONFIG" --cxxflags); do
63429 63072 if echo "${flag}" | grep -q '^-[ID]'; then
63430 63073 if test "${flag}" != "-D_DEBUG" ; then
63431 63074 if test "${LLVM_CFLAGS}" != "" ; then
63432 63075 LLVM_CFLAGS="${LLVM_CFLAGS} "
63433 63076 fi
63434 63077 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63435 63078 fi
63436 63079 fi
63437 63080 done
63438 63081 llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63439 63082 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63440 63083
63441 63084 unset LLVM_LDFLAGS
63442 63085 for flag in $("${LLVM_CONFIG}" --ldflags); do
63443 63086 if echo "${flag}" | grep -q '^-L'; then
63444 63087 if test "${LLVM_LDFLAGS}" != ""; then
63445 63088 LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63446 63089 fi
63447 63090 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63448 63091 fi
63449 63092 done
63450 63093
63451 63094 unset LLVM_LIBS
63452 63095 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63453 63096 if echo "${flag}" | grep -q '^-l'; then
63454 63097 if test "${LLVM_LIBS}" != ""; then
63455 63098 LLVM_LIBS="${LLVM_LIBS} "
63456 63099 fi
63457 63100 LLVM_LIBS="${LLVM_LIBS}${flag}"
63458 63101 fi
63459 63102 done
63460 63103
63461 63104 # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63462 63105 # always properly detect -ltinfo
63463 63106 LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63464 63107
63465 63108
63466 63109
63467 63110
63468 63111 fi
63469 63112
63470 63113
63471 63114
63472 63115 # Check whether --with-libjpeg was given.
63473 63116 if test "${with_libjpeg+set}" = set; then :
63474 63117 withval=$with_libjpeg;
63475 63118 fi
63476 63119
63477 63120
63478 63121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63479 63122 $as_echo_n "checking for which libjpeg to use... " >&6; }
63480 63123 # default is bundled
63481 63124 DEFAULT_LIBJPEG=bundled
63482 63125 # if user didn't specify, use DEFAULT_LIBJPEG
63483 63126 if test "x${with_libjpeg}" = "x"; then
63484 63127 with_libjpeg=${DEFAULT_LIBJPEG}
63485 63128 fi
63486 63129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63487 63130 $as_echo "${with_libjpeg}" >&6; }
63488 63131
63489 63132 if test "x${with_libjpeg}" = "xbundled"; then
63490 63133 USE_EXTERNAL_LIBJPEG=false
63491 63134 elif test "x${with_libjpeg}" = "xsystem"; then
63492 63135 ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63493 63136 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63494 63137
63495 63138 else
63496 63139 as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63497 63140 fi
63498 63141
63499 63142
63500 63143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63501 63144 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63502 63145 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63503 63146 $as_echo_n "(cached) " >&6
63504 63147 else
63505 63148 ac_check_lib_save_LIBS=$LIBS
63506 63149 LIBS="-ljpeg $LIBS"
63507 63150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63508 63151 /* end confdefs.h. */
63509 63152
63510 63153 /* Override any GCC internal prototype to avoid an error.
63511 63154 Use char because int might match the return type of a GCC
63512 63155 builtin and then its argument prototype would still apply. */
63513 63156 #ifdef __cplusplus
63514 63157 extern "C"
63515 63158 #endif
63516 63159 char jpeg_CreateDecompress ();
63517 63160 int
63518 63161 main ()
63519 63162 {
63520 63163 return jpeg_CreateDecompress ();
63521 63164 ;
63522 63165 return 0;
63523 63166 }
63524 63167 _ACEOF
63525 63168 if ac_fn_cxx_try_link "$LINENO"; then :
63526 63169 ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63527 63170 else
63528 63171 ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63529 63172 fi
63530 63173 rm -f core conftest.err conftest.$ac_objext \
63531 63174 conftest$ac_exeext conftest.$ac_ext
63532 63175 LIBS=$ac_check_lib_save_LIBS
63533 63176 fi
63534 63177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63535 63178 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63536 63179 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63537 63180 cat >>confdefs.h <<_ACEOF
63538 63181 #define HAVE_LIBJPEG 1
63539 63182 _ACEOF
63540 63183
63541 63184 LIBS="-ljpeg $LIBS"
63542 63185
63543 63186 else
63544 63187 as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63545 63188 fi
63546 63189
63547 63190
63548 63191 USE_EXTERNAL_LIBJPEG=true
63549 63192 else
63550 63193 as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63551 63194 fi
63552 63195
63553 63196
63554 63197
63555 63198
63556 63199
63557 63200 # Check whether --with-giflib was given.
63558 63201 if test "${with_giflib+set}" = set; then :
63559 63202 withval=$with_giflib;
63560 63203 fi
63561 63204
63562 63205
63563 63206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63564 63207 $as_echo_n "checking for which giflib to use... " >&6; }
63565 63208 # default is bundled
63566 63209 DEFAULT_GIFLIB=bundled
63567 63210 # if user didn't specify, use DEFAULT_GIFLIB
63568 63211 if test "x${with_giflib}" = "x"; then
63569 63212 with_giflib=${DEFAULT_GIFLIB}
63570 63213 fi
63571 63214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63572 63215 $as_echo "${with_giflib}" >&6; }
63573 63216
63574 63217 if test "x${with_giflib}" = "xbundled"; then
63575 63218 USE_EXTERNAL_LIBGIF=false
63576 63219 elif test "x${with_giflib}" = "xsystem"; then
63577 63220 ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63578 63221 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63579 63222
63580 63223 else
63581 63224 as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63582 63225 fi
63583 63226
63584 63227
63585 63228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63586 63229 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63587 63230 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63588 63231 $as_echo_n "(cached) " >&6
63589 63232 else
63590 63233 ac_check_lib_save_LIBS=$LIBS
63591 63234 LIBS="-lgif $LIBS"
63592 63235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63593 63236 /* end confdefs.h. */
63594 63237
63595 63238 /* Override any GCC internal prototype to avoid an error.
63596 63239 Use char because int might match the return type of a GCC
63597 63240 builtin and then its argument prototype would still apply. */
63598 63241 #ifdef __cplusplus
63599 63242 extern "C"
63600 63243 #endif
63601 63244 char DGifGetCode ();
63602 63245 int
63603 63246 main ()
63604 63247 {
63605 63248 return DGifGetCode ();
63606 63249 ;
63607 63250 return 0;
63608 63251 }
63609 63252 _ACEOF
63610 63253 if ac_fn_cxx_try_link "$LINENO"; then :
63611 63254 ac_cv_lib_gif_DGifGetCode=yes
63612 63255 else
63613 63256 ac_cv_lib_gif_DGifGetCode=no
63614 63257 fi
63615 63258 rm -f core conftest.err conftest.$ac_objext \
63616 63259 conftest$ac_exeext conftest.$ac_ext
63617 63260 LIBS=$ac_check_lib_save_LIBS
63618 63261 fi
63619 63262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63620 63263 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63621 63264 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63622 63265 cat >>confdefs.h <<_ACEOF
63623 63266 #define HAVE_LIBGIF 1
63624 63267 _ACEOF
63625 63268
63626 63269 LIBS="-lgif $LIBS"
63627 63270
63628 63271 else
63629 63272 as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63630 63273 fi
63631 63274
63632 63275
63633 63276 USE_EXTERNAL_LIBGIF=true
63634 63277 else
63635 63278 as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63636 63279 fi
63637 63280
63638 63281
63639 63282
63640 63283
63641 63284
63642 63285 # Check whether --with-libpng was given.
63643 63286 if test "${with_libpng+set}" = set; then :
63644 63287 withval=$with_libpng;
63645 63288 fi
63646 63289
63647 63290
63648 63291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63649 63292 $as_echo_n "checking for which libpng to use... " >&6; }
63650 63293
63651 63294 # default is bundled
63652 63295 DEFAULT_LIBPNG=bundled
63653 63296 # if user didn't specify, use DEFAULT_LIBPNG
63654 63297 if test "x${with_libpng}" = "x"; then
63655 63298 with_libpng=${DEFAULT_LIBPNG}
63656 63299 fi
63657 63300
63658 63301 if test "x${with_libpng}" = "xbundled"; then
63659 63302 USE_EXTERNAL_LIBPNG=false
63660 63303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63661 63304 $as_echo "bundled" >&6; }
63662 63305 elif test "x${with_libpng}" = "xsystem"; then
63663 63306
63664 63307 pkg_failed=no
63665 63308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63666 63309 $as_echo_n "checking for PNG... " >&6; }
63667 63310
63668 63311 if test -n "$PNG_CFLAGS"; then
63669 63312 pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63670 63313 elif test -n "$PKG_CONFIG"; then
63671 63314 if test -n "$PKG_CONFIG" && \
63672 63315 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63673 63316 ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63674 63317 ac_status=$?
63675 63318 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63676 63319 test $ac_status = 0; }; then
63677 63320 pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63678 63321 else
63679 63322 pkg_failed=yes
63680 63323 fi
63681 63324 else
63682 63325 pkg_failed=untried
63683 63326 fi
63684 63327 if test -n "$PNG_LIBS"; then
63685 63328 pkg_cv_PNG_LIBS="$PNG_LIBS"
63686 63329 elif test -n "$PKG_CONFIG"; then
63687 63330 if test -n "$PKG_CONFIG" && \
63688 63331 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63689 63332 ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63690 63333 ac_status=$?
63691 63334 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63692 63335 test $ac_status = 0; }; then
63693 63336 pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63694 63337 else
63695 63338 pkg_failed=yes
63696 63339 fi
63697 63340 else
63698 63341 pkg_failed=untried
63699 63342 fi
63700 63343
63701 63344
63702 63345
63703 63346 if test $pkg_failed = yes; then
63704 63347
63705 63348 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63706 63349 _pkg_short_errors_supported=yes
63707 63350 else
63708 63351 _pkg_short_errors_supported=no
63709 63352 fi
63710 63353 if test $_pkg_short_errors_supported = yes; then
63711 63354 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63712 63355 else
63713 63356 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63714 63357 fi
63715 63358 # Put the nasty error message in config.log where it belongs
63716 63359 echo "$PNG_PKG_ERRORS" >&5
63717 63360
63718 63361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63719 63362 $as_echo "no" >&6; }
63720 63363 LIBPNG_FOUND=no
63721 63364 elif test $pkg_failed = untried; then
63722 63365 LIBPNG_FOUND=no
63723 63366 else
63724 63367 PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63725 63368 PNG_LIBS=$pkg_cv_PNG_LIBS
63726 63369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63727 63370 $as_echo "yes" >&6; }
63728 63371 LIBPNG_FOUND=yes
63729 63372 fi
63730 63373 if test "x${LIBPNG_FOUND}" = "xyes"; then
63731 63374 USE_EXTERNAL_LIBPNG=true
63732 63375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63733 63376 $as_echo "system" >&6; }
63734 63377 else
63735 63378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63736 63379 $as_echo "system not found" >&6; }
63737 63380 as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63738 63381 fi
63739 63382 else
63740 63383 as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63741 63384 fi
63742 63385
63743 63386
63744 63387
63745 63388
63746 63389
63747 63390 # Check whether --with-zlib was given.
63748 63391 if test "${with_zlib+set}" = set; then :
63749 63392 withval=$with_zlib;
63750 63393 fi
63751 63394
63752 63395
63753 63396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63754 63397 $as_echo_n "checking for compress in -lz... " >&6; }
63755 63398 if ${ac_cv_lib_z_compress+:} false; then :
63756 63399 $as_echo_n "(cached) " >&6
63757 63400 else
63758 63401 ac_check_lib_save_LIBS=$LIBS
63759 63402 LIBS="-lz $LIBS"
63760 63403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63761 63404 /* end confdefs.h. */
63762 63405
63763 63406 /* Override any GCC internal prototype to avoid an error.
63764 63407 Use char because int might match the return type of a GCC
63765 63408 builtin and then its argument prototype would still apply. */
63766 63409 #ifdef __cplusplus
63767 63410 extern "C"
63768 63411 #endif
63769 63412 char compress ();
63770 63413 int
63771 63414 main ()
63772 63415 {
63773 63416 return compress ();
63774 63417 ;
63775 63418 return 0;
63776 63419 }
63777 63420 _ACEOF
63778 63421 if ac_fn_cxx_try_link "$LINENO"; then :
63779 63422 ac_cv_lib_z_compress=yes
63780 63423 else
63781 63424 ac_cv_lib_z_compress=no
63782 63425 fi
63783 63426 rm -f core conftest.err conftest.$ac_objext \
63784 63427 conftest$ac_exeext conftest.$ac_ext
63785 63428 LIBS=$ac_check_lib_save_LIBS
63786 63429 fi
63787 63430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63788 63431 $as_echo "$ac_cv_lib_z_compress" >&6; }
63789 63432 if test "x$ac_cv_lib_z_compress" = xyes; then :
63790 63433 ZLIB_FOUND=yes
63791 63434 else
63792 63435 ZLIB_FOUND=no
63793 63436 fi
63794 63437
63795 63438
63796 63439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63797 63440 $as_echo_n "checking for which zlib to use... " >&6; }
63798 63441
63799 63442 DEFAULT_ZLIB=system
63800 63443 if test "x$OPENJDK_TARGET_OS" = xwindows; then
63801 63444 # On windows default is bundled...on others default is system
63802 63445 DEFAULT_ZLIB=bundled
63803 63446 fi
63804 63447
63805 63448 if test "x${ZLIB_FOUND}" != "xyes"; then
63806 63449 # If we don't find any system...set default to bundled
63807 63450 DEFAULT_ZLIB=bundled
63808 63451 fi
63809 63452
63810 63453 # If user didn't specify, use DEFAULT_ZLIB
63811 63454 if test "x${with_zlib}" = "x"; then
63812 63455 with_zlib=${DEFAULT_ZLIB}
63813 63456 fi
63814 63457
63815 63458 if test "x${with_zlib}" = "xbundled"; then
63816 63459 USE_EXTERNAL_LIBZ=false
63817 63460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63818 63461 $as_echo "bundled" >&6; }
63819 63462 elif test "x${with_zlib}" = "xsystem"; then
63820 63463 if test "x${ZLIB_FOUND}" = "xyes"; then
63821 63464 USE_EXTERNAL_LIBZ=true
63822 63465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63823 63466 $as_echo "system" >&6; }
63824 63467 else
63825 63468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63826 63469 $as_echo "system not found" >&6; }
63827 63470 as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63828 63471 fi
63829 63472 else
63830 63473 as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63831 63474 fi
63832 63475
63833 63476
63834 63477
63835 63478
63836 63479
63837 63480 # Check whether --with-lcms was given.
63838 63481 if test "${with_lcms+set}" = set; then :
63839 63482 withval=$with_lcms;
63840 63483 fi
63841 63484
63842 63485
63843 63486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63844 63487 $as_echo_n "checking for which lcms to use... " >&6; }
63845 63488
63846 63489 DEFAULT_LCMS=bundled
63847 63490 # If user didn't specify, use DEFAULT_LCMS
63848 63491 if test "x${with_lcms}" = "x"; then
63849 63492 with_lcms=${DEFAULT_LCMS}
63850 63493 fi
63851 63494
63852 63495 if test "x${with_lcms}" = "xbundled"; then
63853 63496 USE_EXTERNAL_LCMS=false
63854 63497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63855 63498 $as_echo "bundled" >&6; }
63856 63499 elif test "x${with_lcms}" = "xsystem"; then
63857 63500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63858 63501 $as_echo "system" >&6; }
63859 63502
63860 63503 pkg_failed=no
63861 63504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63862 63505 $as_echo_n "checking for LCMS... " >&6; }
63863 63506
63864 63507 if test -n "$LCMS_CFLAGS"; then
63865 63508 pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63866 63509 elif test -n "$PKG_CONFIG"; then
63867 63510 if test -n "$PKG_CONFIG" && \
63868 63511 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63869 63512 ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63870 63513 ac_status=$?
63871 63514 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63872 63515 test $ac_status = 0; }; then
63873 63516 pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63874 63517 else
63875 63518 pkg_failed=yes
63876 63519 fi
63877 63520 else
63878 63521 pkg_failed=untried
63879 63522 fi
63880 63523 if test -n "$LCMS_LIBS"; then
63881 63524 pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63882 63525 elif test -n "$PKG_CONFIG"; then
63883 63526 if test -n "$PKG_CONFIG" && \
63884 63527 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63885 63528 ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63886 63529 ac_status=$?
63887 63530 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63888 63531 test $ac_status = 0; }; then
63889 63532 pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63890 63533 else
63891 63534 pkg_failed=yes
63892 63535 fi
63893 63536 else
63894 63537 pkg_failed=untried
63895 63538 fi
63896 63539
63897 63540
63898 63541
63899 63542 if test $pkg_failed = yes; then
63900 63543
63901 63544 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63902 63545 _pkg_short_errors_supported=yes
63903 63546 else
63904 63547 _pkg_short_errors_supported=no
63905 63548 fi
63906 63549 if test $_pkg_short_errors_supported = yes; then
63907 63550 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63908 63551 else
63909 63552 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63910 63553 fi
63911 63554 # Put the nasty error message in config.log where it belongs
63912 63555 echo "$LCMS_PKG_ERRORS" >&5
63913 63556
63914 63557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63915 63558 $as_echo "no" >&6; }
63916 63559 LCMS_FOUND=no
63917 63560 elif test $pkg_failed = untried; then
63918 63561 LCMS_FOUND=no
63919 63562 else
63920 63563 LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63921 63564 LCMS_LIBS=$pkg_cv_LCMS_LIBS
63922 63565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63923 63566 $as_echo "yes" >&6; }
63924 63567 LCMS_FOUND=yes
63925 63568 fi
63926 63569 if test "x${LCMS_FOUND}" = "xyes"; then
63927 63570 USE_EXTERNAL_LCMS=true
63928 63571 else
63929 63572 as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63930 63573 fi
63931 63574 else
63932 63575 as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63933 63576 fi
63934 63577
63935 63578
63936 63579
63937 63580
63938 63581
63939 63582
63940 63583
63941 63584
63942 63585
63943 63586
63944 63587
63945 63588 # Setup libm (the maths library)
63946 63589 if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63947 63590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63948 63591 $as_echo_n "checking for cos in -lm... " >&6; }
63949 63592 if ${ac_cv_lib_m_cos+:} false; then :
63950 63593 $as_echo_n "(cached) " >&6
63951 63594 else
63952 63595 ac_check_lib_save_LIBS=$LIBS
63953 63596 LIBS="-lm $LIBS"
63954 63597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63955 63598 /* end confdefs.h. */
63956 63599
63957 63600 /* Override any GCC internal prototype to avoid an error.
63958 63601 Use char because int might match the return type of a GCC
63959 63602 builtin and then its argument prototype would still apply. */
63960 63603 #ifdef __cplusplus
63961 63604 extern "C"
63962 63605 #endif
63963 63606 char cos ();
63964 63607 int
63965 63608 main ()
63966 63609 {
63967 63610 return cos ();
63968 63611 ;
63969 63612 return 0;
63970 63613 }
63971 63614 _ACEOF
63972 63615 if ac_fn_cxx_try_link "$LINENO"; then :
63973 63616 ac_cv_lib_m_cos=yes
63974 63617 else
63975 63618 ac_cv_lib_m_cos=no
63976 63619 fi
63977 63620 rm -f core conftest.err conftest.$ac_objext \
63978 63621 conftest$ac_exeext conftest.$ac_ext
63979 63622 LIBS=$ac_check_lib_save_LIBS
63980 63623 fi
63981 63624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63982 63625 $as_echo "$ac_cv_lib_m_cos" >&6; }
63983 63626 if test "x$ac_cv_lib_m_cos" = xyes; then :
63984 63627 cat >>confdefs.h <<_ACEOF
63985 63628 #define HAVE_LIBM 1
63986 63629 _ACEOF
63987 63630
63988 63631 LIBS="-lm $LIBS"
63989 63632
63990 63633 else
63991 63634
63992 63635 { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63993 63636 $as_echo "$as_me: Maths library was not found" >&6;}
63994 63637
63995 63638 fi
63996 63639
63997 63640 LIBM="-lm"
63998 63641 else
63999 63642 LIBM=""
64000 63643 fi
64001 63644
64002 63645
64003 63646 # Setup libdl (for dynamic library loading)
64004 63647 save_LIBS="$LIBS"
64005 63648 LIBS=""
64006 63649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64007 63650 $as_echo_n "checking for dlopen in -ldl... " >&6; }
64008 63651 if ${ac_cv_lib_dl_dlopen+:} false; then :
64009 63652 $as_echo_n "(cached) " >&6
64010 63653 else
64011 63654 ac_check_lib_save_LIBS=$LIBS
64012 63655 LIBS="-ldl $LIBS"
64013 63656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64014 63657 /* end confdefs.h. */
64015 63658
64016 63659 /* Override any GCC internal prototype to avoid an error.
64017 63660 Use char because int might match the return type of a GCC
64018 63661 builtin and then its argument prototype would still apply. */
64019 63662 #ifdef __cplusplus
64020 63663 extern "C"
64021 63664 #endif
64022 63665 char dlopen ();
64023 63666 int
64024 63667 main ()
64025 63668 {
64026 63669 return dlopen ();
64027 63670 ;
64028 63671 return 0;
64029 63672 }
64030 63673 _ACEOF
64031 63674 if ac_fn_cxx_try_link "$LINENO"; then :
64032 63675 ac_cv_lib_dl_dlopen=yes
64033 63676 else
64034 63677 ac_cv_lib_dl_dlopen=no
64035 63678 fi
64036 63679 rm -f core conftest.err conftest.$ac_objext \
64037 63680 conftest$ac_exeext conftest.$ac_ext
64038 63681 LIBS=$ac_check_lib_save_LIBS
64039 63682 fi
64040 63683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64041 63684 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64042 63685 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64043 63686 cat >>confdefs.h <<_ACEOF
64044 63687 #define HAVE_LIBDL 1
64045 63688 _ACEOF
64046 63689
64047 63690 LIBS="-ldl $LIBS"
64048 63691
64049 63692 fi
64050 63693
64051 63694 LIBDL="$LIBS"
64052 63695
64053 63696 LIBS="$save_LIBS"
64054 63697
64055 63698 # Deprecated libraries, keep the flags for backwards compatibility
64056 63699 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64057 63700
64058 63701
64059 63702 # Check whether --with-dxsdk was given.
64060 63703 if test "${with_dxsdk+set}" = set; then :
64061 63704 withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64062 63705 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64063 63706 fi
64064 63707
64065 63708
64066 63709
64067 63710
64068 63711 # Check whether --with-dxsdk-lib was given.
64069 63712 if test "${with_dxsdk_lib+set}" = set; then :
64070 63713 withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64071 63714 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64072 63715 fi
64073 63716
64074 63717
64075 63718
64076 63719
64077 63720 # Check whether --with-dxsdk-include was given.
64078 63721 if test "${with_dxsdk_include+set}" = set; then :
64079 63722 withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64080 63723 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64081 63724 fi
64082 63725
64083 63726
64084 63727 fi
64085 63728
64086 63729 # Control if libzip can use mmap. Available for purposes of overriding.
64087 63730 LIBZIP_CAN_USE_MMAP=true
64088 63731
64089 63732
64090 63733
64091 63734 if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64092 63735 # Find the root of the Solaris Studio installation from the compiler path
64093 63736 SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64094 63737 STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64095 63738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64096 63739 $as_echo_n "checking for libstlport.so.1... " >&6; }
64097 63740 if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64098 63741 # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64099 63742 STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64100 63743 fi
64101 63744 if test -f "$STLPORT_LIB"; then
64102 63745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64103 63746 $as_echo "yes, $STLPORT_LIB" >&6; }
64104 63747
64105 63748 # Only process if variable expands to non-empty
64106 63749
64107 63750 if test "x$STLPORT_LIB" != x; then
64108 63751 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64109 63752
64110 63753 # Input might be given as Windows format, start by converting to
64111 63754 # unix format.
64112 63755 path="$STLPORT_LIB"
64113 63756 new_path=`$CYGPATH -u "$path"`
64114 63757
64115 63758 # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64116 63759 # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64117 63760 # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64118 63761 # "foo.exe" is OK but "foo" is an error.
64119 63762 #
64120 63763 # This test is therefore slightly more accurate than "test -f" to check for file precense.
64121 63764 # It is also a way to make sure we got the proper file name for the real test later on.
64122 63765 test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64123 63766 if test "x$test_shortpath" = x; then
64124 63767 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64125 63768 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64126 63769 as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64127 63770 fi
64128 63771
64129 63772 # Call helper function which possibly converts this using DOS-style short mode.
64130 63773 # If so, the updated path is stored in $new_path.
64131 63774
64132 63775 input_path="$new_path"
64133 63776 # Check if we need to convert this using DOS-style short mode. If the path
64134 63777 # contains just simple characters, use it. Otherwise (spaces, weird characters),
64135 63778 # take no chances and rewrite it.
64136 63779 # Note: m4 eats our [], so we need to use [ and ] instead.
64137 63780 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64138 63781 if test "x$has_forbidden_chars" != x; then
64139 63782 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64140 63783 shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64141 63784 path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64142 63785 if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64143 63786 # Going to short mode and back again did indeed matter. Since short mode is
64144 63787 # case insensitive, let's make it lowercase to improve readability.
64145 63788 shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64146 63789 # Now convert it back to Unix-style (cygpath)
64147 63790 input_path=`$CYGPATH -u "$shortmode_path"`
64148 63791 new_path="$input_path"
64149 63792 fi
64150 63793 fi
64151 63794
64152 63795 test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64153 63796 if test "x$test_cygdrive_prefix" = x; then
64154 63797 # As a simple fix, exclude /usr/bin since it's not a real path.
64155 63798 if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64156 63799 # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64157 63800 # a path prefixed by /cygdrive for fixpath to work.
64158 63801 new_path="$CYGWIN_ROOT_PATH$input_path"
64159 63802 fi
64160 63803 fi
64161 63804
64162 63805
64163 63806 if test "x$path" != "x$new_path"; then
64164 63807 STLPORT_LIB="$new_path"
64165 63808 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64166 63809 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64167 63810 fi
64168 63811
64169 63812 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64170 63813
64171 63814 path="$STLPORT_LIB"
64172 63815 has_colon=`$ECHO $path | $GREP ^.:`
64173 63816 new_path="$path"
64174 63817 if test "x$has_colon" = x; then
64175 63818 # Not in mixed or Windows style, start by that.
64176 63819 new_path=`cmd //c echo $path`
64177 63820 fi
64178 63821
64179 63822
64180 63823 input_path="$new_path"
64181 63824 # Check if we need to convert this using DOS-style short mode. If the path
64182 63825 # contains just simple characters, use it. Otherwise (spaces, weird characters),
64183 63826 # take no chances and rewrite it.
64184 63827 # Note: m4 eats our [], so we need to use [ and ] instead.
64185 63828 has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64186 63829 if test "x$has_forbidden_chars" != x; then
64187 63830 # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64188 63831 new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64189 63832 fi
64190 63833
64191 63834
64192 63835 windows_path="$new_path"
64193 63836 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64194 63837 unix_path=`$CYGPATH -u "$windows_path"`
64195 63838 new_path="$unix_path"
64196 63839 elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64197 63840 unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64198 63841 new_path="$unix_path"
64199 63842 fi
64200 63843
64201 63844 if test "x$path" != "x$new_path"; then
64202 63845 STLPORT_LIB="$new_path"
64203 63846 { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64204 63847 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64205 63848 fi
64206 63849
64207 63850 # Save the first 10 bytes of this path to the storage, so fixpath can work.
64208 63851 all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64209 63852
64210 63853 else
64211 63854 # We're on a unix platform. Hooray! :)
64212 63855 path="$STLPORT_LIB"
64213 63856 has_space=`$ECHO "$path" | $GREP " "`
64214 63857 if test "x$has_space" != x; then
64215 63858 { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64216 63859 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64217 63860 as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64218 63861 fi
64219 63862
64220 63863 # Use eval to expand a potential ~
64221 63864 eval path="$path"
64222 63865 if test ! -f "$path" && test ! -d "$path"; then
64223 63866 as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64224 63867 fi
64225 63868
64226 63869 if test -d "$path"; then
64227 63870 STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64228 63871 else
64229 63872 dir="`$DIRNAME "$path"`"
64230 63873 base="`$BASENAME "$path"`"
64231 63874 STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64232 63875 fi
64233 63876 fi
64234 63877 fi
64235 63878
64236 63879 else
64237 63880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64238 63881 $as_echo "no, not found at $STLPORT_LIB" >&6; }
64239 63882 as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64240 63883 fi
64241 63884
64242 63885 fi
64243 63886
64244 63887
64245 63888
64246 63889
64247 63890
64248 63891
64249 63892
64250 63893
64251 63894
64252 63895
64253 63896
64254 63897
64255 63898
64256 63899
64257 63900 ###############################################################################
64258 63901 #
64259 63902 # We need to do some final tweaking, when everything else is done.
64260 63903 #
64261 63904 ###############################################################################
64262 63905
64263 63906
64264 63907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64265 63908 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64266 63909
64267 63910 if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64268 63911 ENABLE_INTREE_EC=yes
64269 63912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64270 63913 $as_echo "yes" >&6; }
64271 63914 else
64272 63915 ENABLE_INTREE_EC=no
64273 63916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64274 63917 $as_echo "no" >&6; }
64275 63918 fi
64276 63919
64277 63920
64278 63921
64279 63922
64280 63923 # Check whether --enable-jtreg-failure-handler was given.
64281 63924 if test "${enable_jtreg_failure_handler+set}" = set; then :
64282 63925 enableval=$enable_jtreg_failure_handler;
64283 63926 fi
64284 63927
64285 63928
64286 63929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64287 63930 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64288 63931
64289 63932 if test "x$enable_jtreg_failure_handler" = "xyes"; then
64290 63933 if test "x$JT_HOME" = "x"; then
64291 63934 as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64292 63935 else
64293 63936 BUILD_FAILURE_HANDLER=true
64294 63937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64295 63938 $as_echo "yes, forced" >&6; }
64296 63939 fi
64297 63940 elif test "x$enable_jtreg_failure_handler" = "xno"; then
64298 63941 BUILD_FAILURE_HANDLER=false
64299 63942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64300 63943 $as_echo "no, forced" >&6; }
64301 63944 elif test "x$enable_jtreg_failure_handler" = "xauto" \
64302 63945 || test "x$enable_jtreg_failure_handler" = "x"; then
64303 63946 if test "x$JT_HOME" = "x"; then
64304 63947 BUILD_FAILURE_HANDLER=false
64305 63948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64306 63949 $as_echo "no, missing jtreg" >&6; }
64307 63950 else
64308 63951 BUILD_FAILURE_HANDLER=true
64309 63952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64310 63953 $as_echo "yes, jtreg present" >&6; }
64311 63954 fi
64312 63955 else
64313 63956 as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64314 63957 fi
64315 63958
64316 63959
64317 63960
64318 63961
64319 63962 # Check whether --enable-generate-classlist was given.
64320 63963 if test "${enable_generate_classlist+set}" = set; then :
64321 63964 enableval=$enable_generate_classlist;
64322 63965 fi
64323 63966
64324 63967
64325 63968 # Check if it's likely that it's possible to generate the classlist. Depending
64326 63969 # on exact jvm configuration it could be possible anyway.
64327 63970 if [[ " $JVM_VARIANTS " =~ " server " ]] || [[ " $JVM_VARIANTS " =~ " client " ]] ; then
64328 63971 ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64329 63972 else
64330 63973 ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64331 63974 fi
64332 63975
64333 63976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64334 63977 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64335 63978 if test "x$enable_generate_classlist" = "xyes"; then
64336 63979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64337 63980 $as_echo "yes, forced" >&6; }
64338 63981 ENABLE_GENERATE_CLASSLIST="true"
64339 63982 if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64340 63983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64341 63984 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64342 63985 fi
64343 63986 elif test "x$enable_generate_classlist" = "xno"; then
64344 63987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64345 63988 $as_echo "no, forced" >&6; }
64346 63989 ENABLE_GENERATE_CLASSLIST="false"
64347 63990 elif test "x$enable_generate_classlist" = "x"; then
64348 63991 if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64349 63992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64350 63993 $as_echo "yes" >&6; }
64351 63994 ENABLE_GENERATE_CLASSLIST="true"
64352 63995 else
64353 63996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64354 63997 $as_echo "no" >&6; }
64355 63998 ENABLE_GENERATE_CLASSLIST="false"
64356 63999 fi
64357 64000 else
64358 64001 as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64359 64002 fi
64360 64003
64361 64004
64362 64005
64363 64006
64364 64007 ###############################################################################
64365 64008 #
64366 64009 # Configure parts of the build that only affect the build performance,
64367 64010 # not the result.
64368 64011 #
64369 64012 ###############################################################################
64370 64013
64371 64014
64372 64015 # How many cores do we have on this build system?
64373 64016
64374 64017 # Check whether --with-num-cores was given.
64375 64018 if test "${with_num_cores+set}" = set; then :
64376 64019 withval=$with_num_cores;
64377 64020 fi
64378 64021
64379 64022 if test "x$with_num_cores" = x; then
64380 64023 # The number of cores were not specified, try to probe them.
64381 64024
64382 64025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64383 64026 $as_echo_n "checking for number of cores... " >&6; }
64384 64027 NUM_CORES=1
64385 64028 FOUND_CORES=no
64386 64029
64387 64030 if test -f /proc/cpuinfo; then
64388 64031 # Looks like a Linux (or cygwin) system
64389 64032 NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
64390 64033 FOUND_CORES=yes
64391 64034 elif test -x /usr/sbin/psrinfo; then
64392 64035 # Looks like a Solaris system
64393 64036 NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64394 64037 FOUND_CORES=yes
64395 64038 elif test -x /usr/sbin/sysctl; then
64396 64039 # Looks like a MacOSX system
64397 64040 NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64398 64041 FOUND_CORES=yes
64399 64042 elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64400 64043 NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64401 64044 FOUND_CORES=yes
64402 64045 elif test -n "$NUMBER_OF_PROCESSORS"; then
64403 64046 # On windows, look in the env
64404 64047 NUM_CORES=$NUMBER_OF_PROCESSORS
64405 64048 FOUND_CORES=yes
64406 64049 fi
64407 64050
64408 64051 if test "x$FOUND_CORES" = xyes; then
64409 64052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64410 64053 $as_echo "$NUM_CORES" >&6; }
64411 64054 else
64412 64055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64413 64056 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
64414 64057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64415 64058 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64416 64059 fi
64417 64060
64418 64061 else
64419 64062 NUM_CORES=$with_num_cores
64420 64063 fi
64421 64064
64422 64065
64423 64066
64424 64067 # How much memory do we have on this build system?
64425 64068
64426 64069 # Check whether --with-memory-size was given.
64427 64070 if test "${with_memory_size+set}" = set; then :
64428 64071 withval=$with_memory_size;
64429 64072 fi
64430 64073
64431 64074 if test "x$with_memory_size" = x; then
64432 64075 # The memory size was not specified, try to probe it.
64433 64076
64434 64077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64435 64078 $as_echo_n "checking for memory size... " >&6; }
64436 64079 # Default to 1024 MB
64437 64080 MEMORY_SIZE=1024
64438 64081 FOUND_MEM=no
64439 64082
64440 64083 if test -f /proc/meminfo; then
64441 64084 # Looks like a Linux (or cygwin) system
64442 64085 MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64443 64086 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64444 64087 FOUND_MEM=yes
64445 64088 elif test -x /usr/sbin/prtconf; then
64446 64089 # Looks like a Solaris or AIX system
64447 64090 MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64448 64091 FOUND_MEM=yes
64449 64092 elif test -x /usr/sbin/sysctl; then
64450 64093 # Looks like a MacOSX system
64451 64094 MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64452 64095 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64453 64096 FOUND_MEM=yes
64454 64097 elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64455 64098 # Windows, but without cygwin
64456 64099 MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64457 64100 MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64458 64101 FOUND_MEM=yes
64459 64102 fi
64460 64103
64461 64104 if test "x$FOUND_MEM" = xyes; then
64462 64105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64463 64106 $as_echo "$MEMORY_SIZE MB" >&6; }
64464 64107 else
64465 64108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64466 64109 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64467 64110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64468 64111 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64469 64112 fi
64470 64113
64471 64114 else
64472 64115 MEMORY_SIZE=$with_memory_size
64473 64116 fi
64474 64117
64475 64118
64476 64119
64477 64120 # Provide a decent default number of parallel jobs for make depending on
64478 64121 # number of cores, amount of memory and machine architecture.
64479 64122
64480 64123 # Check whether --with-jobs was given.
64481 64124 if test "${with_jobs+set}" = set; then :
64482 64125 withval=$with_jobs;
64483 64126 fi
64484 64127
64485 64128 if test "x$with_jobs" = x; then
64486 64129 # Number of jobs was not specified, calculate.
64487 64130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64488 64131 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64489 64132 # Approximate memory in GB.
64490 64133 memory_gb=`expr $MEMORY_SIZE / 1024`
64491 64134 # Pick the lowest of memory in gb and number of cores.
64492 64135 if test "$memory_gb" -lt "$NUM_CORES"; then
64493 64136 JOBS="$memory_gb"
64494 64137 else
64495 64138 JOBS="$NUM_CORES"
64496 64139 fi
64497 64140 if test "$JOBS" -eq "0"; then
64498 64141 JOBS=1
64499 64142 fi
64500 64143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64501 64144 $as_echo "$JOBS" >&6; }
64502 64145 else
64503 64146 JOBS=$with_jobs
64504 64147 fi
64505 64148
64506 64149
64507 64150
64508 64151 # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64509 64152
64510 64153 # Check whether --with-test-jobs was given.
64511 64154 if test "${with_test_jobs+set}" = set; then :
64512 64155 withval=$with_test_jobs;
64513 64156 fi
64514 64157
64515 64158 if test "x$with_test_jobs" = x; then
64516 64159 TEST_JOBS=0
64517 64160 else
64518 64161 TEST_JOBS=$with_test_jobs
64519 64162 fi
64520 64163
64521 64164
64522 64165
64523 64166 # Setup arguments for the boot jdk (after cores and memory have been setup)
64524 64167
64525 64168 ##############################################################################
64526 64169 #
64527 64170 # Specify jvm options for anything that is run with the Boot JDK.
64528 64171 # Not all JVM:s accept the same arguments on the command line.
64529 64172 #
64530 64173
64531 64174 # Check whether --with-boot-jdk-jvmargs was given.
64532 64175 if test "${with_boot_jdk_jvmargs+set}" = set; then :
64533 64176 withval=$with_boot_jdk_jvmargs;
64534 64177 fi
64535 64178
64536 64179
64537 64180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64538 64181 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
64539 64182
64540 64183 # Disable special log output when a debug build is used as Boot JDK...
64541 64184
64542 64185 $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64543 64186 $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64544 64187 OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64545 64188 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64546 64189 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64547 64190 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64548 64191 boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64549 64192 JVM_ARG_OK=true
64550 64193 else
64551 64194 $ECHO "Arg failed:" >&5
64552 64195 $ECHO "$OUTPUT" >&5
64553 64196 JVM_ARG_OK=false
64554 64197 fi
64555 64198
64556 64199
64557 64200 # Force en-US environment
64558 64201
64559 64202 $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64560 64203 $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64561 64204 OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64562 64205 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64563 64206 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64564 64207 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64565 64208 boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64566 64209 JVM_ARG_OK=true
64567 64210 else
64568 64211 $ECHO "Arg failed:" >&5
64569 64212 $ECHO "$OUTPUT" >&5
64570 64213 JVM_ARG_OK=false
64571 64214 fi
64572 64215
64573 64216
64574 64217 # Apply user provided options.
64575 64218
64576 64219 $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64577 64220 $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64578 64221 OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64579 64222 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64580 64223 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64581 64224 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64582 64225 boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64583 64226 JVM_ARG_OK=true
64584 64227 else
64585 64228 $ECHO "Arg failed:" >&5
64586 64229 $ECHO "$OUTPUT" >&5
64587 64230 JVM_ARG_OK=false
64588 64231 fi
64589 64232
64590 64233
64591 64234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64592 64235 $as_echo "$boot_jdk_jvmargs" >&6; }
64593 64236
64594 64237 # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64595 64238 JAVA_FLAGS=$boot_jdk_jvmargs
64596 64239
64597 64240
64598 64241
64599 64242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64600 64243 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64601 64244
64602 64245 # Starting amount of heap memory.
64603 64246
64604 64247 $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64605 64248 $ECHO "Command: $JAVA -Xms64M -version" >&5
64606 64249 OUTPUT=`$JAVA -Xms64M -version 2>&1`
64607 64250 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64608 64251 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64609 64252 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64610 64253 boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64611 64254 JVM_ARG_OK=true
64612 64255 else
64613 64256 $ECHO "Arg failed:" >&5
64614 64257 $ECHO "$OUTPUT" >&5
64615 64258 JVM_ARG_OK=false
64616 64259 fi
64617 64260
64618 64261 BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64619 64262
64620 64263 # Maximum amount of heap memory and stack size.
64621 64264 JVM_HEAP_LIMIT_32="1024"
64622 64265 # Running a 64 bit JVM allows for and requires a bigger heap
64623 64266 JVM_HEAP_LIMIT_64="1600"
64624 64267 STACK_SIZE_32=768
64625 64268 STACK_SIZE_64=1536
64626 64269 JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64627 64270 if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64628 64271 JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64629 64272 fi
64630 64273 if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64631 64274 JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64632 64275 fi
64633 64276 if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64634 64277 JVM_HEAP_LIMIT_32=512
64635 64278 JVM_HEAP_LIMIT_64=512
64636 64279 fi
64637 64280
64638 64281 if test "x$BOOT_JDK_BITS" = "x32"; then
64639 64282 STACK_SIZE=$STACK_SIZE_32
64640 64283 JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64641 64284 else
64642 64285 STACK_SIZE=$STACK_SIZE_64
64643 64286 JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64644 64287 fi
64645 64288
64646 64289 $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64647 64290 $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64648 64291 OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64649 64292 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64650 64293 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64651 64294 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64652 64295 boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64653 64296 JVM_ARG_OK=true
64654 64297 else
64655 64298 $ECHO "Arg failed:" >&5
64656 64299 $ECHO "$OUTPUT" >&5
64657 64300 JVM_ARG_OK=false
64658 64301 fi
64659 64302
64660 64303
64661 64304 $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64662 64305 $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64663 64306 OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64664 64307 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64665 64308 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64666 64309 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64667 64310 boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64668 64311 JVM_ARG_OK=true
64669 64312 else
64670 64313 $ECHO "Arg failed:" >&5
64671 64314 $ECHO "$OUTPUT" >&5
64672 64315 JVM_ARG_OK=false
64673 64316 fi
64674 64317
64675 64318
64676 64319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64677 64320 $as_echo "$boot_jdk_jvmargs_big" >&6; }
64678 64321
64679 64322 JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64680 64323
64681 64324
64682 64325 if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
64683 64326 BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
64684 64327 BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
64685 64328 else
64686 64329 BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
64687 64330 BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
64688 64331 fi
64689 64332 BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
64690 64333 BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
64691 64334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
64692 64335 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
64693 64336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
64694 64337 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
64695 64338
64696 64339
64697 64340 # By default, the main javac compilations use big
64698 64341 JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64699 64342
64700 64343
64701 64344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64702 64345 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64703 64346
64704 64347 # Use serial gc for small short lived tools if possible
64705 64348
64706 64349 $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64707 64350 $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64708 64351 OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64709 64352 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64710 64353 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64711 64354 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64712 64355 boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64713 64356 JVM_ARG_OK=true
64714 64357 else
64715 64358 $ECHO "Arg failed:" >&5
64716 64359 $ECHO "$OUTPUT" >&5
64717 64360 JVM_ARG_OK=false
64718 64361 fi
64719 64362
64720 64363
64721 64364 $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64722 64365 $ECHO "Command: $JAVA -Xms32M -version" >&5
64723 64366 OUTPUT=`$JAVA -Xms32M -version 2>&1`
64724 64367 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64725 64368 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64726 64369 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64727 64370 boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64728 64371 JVM_ARG_OK=true
64729 64372 else
64730 64373 $ECHO "Arg failed:" >&5
64731 64374 $ECHO "$OUTPUT" >&5
64732 64375 JVM_ARG_OK=false
64733 64376 fi
64734 64377
64735 64378
64736 64379 $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64737 64380 $ECHO "Command: $JAVA -Xmx512M -version" >&5
64738 64381 OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64739 64382 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64740 64383 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64741 64384 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64742 64385 boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64743 64386 JVM_ARG_OK=true
64744 64387 else
64745 64388 $ECHO "Arg failed:" >&5
64746 64389 $ECHO "$OUTPUT" >&5
64747 64390 JVM_ARG_OK=false
64748 64391 fi
64749 64392
64750 64393
64751 64394 $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64752 64395 $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64753 64396 OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64754 64397 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64755 64398 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64756 64399 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64757 64400 boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64758 64401 JVM_ARG_OK=true
64759 64402 else
64760 64403 $ECHO "Arg failed:" >&5
64761 64404 $ECHO "$OUTPUT" >&5
64762 64405 JVM_ARG_OK=false
64763 64406 fi
64764 64407
64765 64408
64766 64409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64767 64410 $as_echo "$boot_jdk_jvmargs_small" >&6; }
64768 64411
64769 64412 JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64770 64413
64771 64414
64772 64415 JAVA_TOOL_FLAGS_SMALL=""
64773 64416 for f in $JAVA_FLAGS_SMALL; do
64774 64417 JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64775 64418 done
64776 64419
64777 64420
64778 64421
64779 64422 # Setup smart javac (after cores and memory have been setup)
64780 64423
64781 64424
64782 64425 # Check whether --with-sjavac-server-java was given.
64783 64426 if test "${with_sjavac_server_java+set}" = set; then :
64784 64427 withval=$with_sjavac_server_java;
64785 64428 fi
64786 64429
64787 64430
64788 64431 if test "x$with_sjavac_server_java" != x; then
64789 64432 SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64790 64433 FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64791 64434 if test "x$FOUND_VERSION" = x; then
64792 64435 as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64793 64436 fi
64794 64437 else
64795 64438 SJAVAC_SERVER_JAVA="$JAVA"
64796 64439 fi
64797 64440
64798 64441
64799 64442 if test "$MEMORY_SIZE" -gt "3000"; then
64800 64443
64801 64444 $ECHO "Check if jvm arg is ok: -d64" >&5
64802 64445 $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64803 64446 OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64804 64447 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64805 64448 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64806 64449 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64807 64450 SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64808 64451 JVM_ARG_OK=true
64809 64452 else
64810 64453 $ECHO "Arg failed:" >&5
64811 64454 $ECHO "$OUTPUT" >&5
64812 64455 JVM_ARG_OK=false
64813 64456 fi
64814 64457
64815 64458 if test "$JVM_ARG_OK" = true; then
64816 64459 JVM_64BIT=true
64817 64460 JVM_ARG_OK=false
64818 64461 fi
64819 64462 fi
64820 64463
64821 64464 MX_VALUE=`expr $MEMORY_SIZE / 2`
64822 64465 if test "$JVM_64BIT" = true; then
64823 64466 # Set ms lower than mx since more than one instance of the server might
64824 64467 # get launched at the same time before they figure out which instance won.
64825 64468 MS_VALUE=512
64826 64469 if test "$MX_VALUE" -gt "2048"; then
64827 64470 MX_VALUE=2048
64828 64471 fi
64829 64472 else
64830 64473 MS_VALUE=256
64831 64474 if test "$MX_VALUE" -gt "1500"; then
64832 64475 MX_VALUE=1500
64833 64476 fi
64834 64477 fi
64835 64478 if test "$MX_VALUE" -lt "512"; then
64836 64479 MX_VALUE=512
64837 64480 fi
64838 64481
64839 64482 $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64840 64483 $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64841 64484 OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64842 64485 FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64843 64486 FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64844 64487 if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64845 64488 SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64846 64489 JVM_ARG_OK=true
64847 64490 else
64848 64491 $ECHO "Arg failed:" >&5
64849 64492 $ECHO "$OUTPUT" >&5
64850 64493 JVM_ARG_OK=false
64851 64494 fi
64852 64495
64853 64496
64854 64497
64855 64498 # Check whether --enable-sjavac was given.
64856 64499 if test "${enable_sjavac+set}" = set; then :
64857 64500 enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64858 64501 else
64859 64502 ENABLE_SJAVAC="no"
64860 64503 fi
64861 64504
64862 64505 if test "x$JVM_ARG_OK" = "xfalse"; then
64863 64506 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64864 64507 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64865 64508 ENABLE_SJAVAC="no"
64866 64509 fi
64867 64510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64868 64511 $as_echo_n "checking whether to use sjavac... " >&6; }
64869 64512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64870 64513 $as_echo "$ENABLE_SJAVAC" >&6; }
64871 64514
64872 64515
64873 64516 # Check whether --enable-javac-server was given.
64874 64517 if test "${enable_javac_server+set}" = set; then :
64875 64518 enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64876 64519 else
64877 64520 ENABLE_JAVAC_SERVER="yes"
64878 64521 fi
64879 64522
64880 64523 if test "x$JVM_ARG_OK" = "xfalse"; then
64881 64524 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64882 64525 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64883 64526 ENABLE_JAVAC_SERVER="no"
64884 64527 fi
64885 64528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64886 64529 $as_echo_n "checking whether to use javac server... " >&6; }
64887 64530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64888 64531 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64889 64532
64890 64533
64891 64534 if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64892 64535 # When using a server javac, the small client instances do not need much
64893 64536 # resources.
64894 64537 JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64895 64538 fi
64896 64539
64897 64540
64898 64541 # Setup use of icecc if requested
64899 64542
64900 64543 # Check whether --enable-icecc was given.
64901 64544 if test "${enable_icecc+set}" = set; then :
64902 64545 enableval=$enable_icecc;
64903 64546 fi
64904 64547
64905 64548
64906 64549 if test "x${enable_icecc}" = "xyes"; then
64907 64550
64908 64551
64909 64552
64910 64553 # Publish this variable in the help.
64911 64554
64912 64555
64913 64556 if [ -z "${ICECC_CMD+x}" ]; then
64914 64557 # The variable is not set by user, try to locate tool using the code snippet
64915 64558 for ac_prog in icecc
64916 64559 do
64917 64560 # Extract the first word of "$ac_prog", so it can be a program name with args.
64918 64561 set dummy $ac_prog; ac_word=$2
64919 64562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64920 64563 $as_echo_n "checking for $ac_word... " >&6; }
64921 64564 if ${ac_cv_path_ICECC_CMD+:} false; then :
64922 64565 $as_echo_n "(cached) " >&6
64923 64566 else
64924 64567 case $ICECC_CMD in
64925 64568 [\\/]* | ?:[\\/]*)
64926 64569 ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64927 64570 ;;
64928 64571 *)
64929 64572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64930 64573 for as_dir in $PATH
64931 64574 do
64932 64575 IFS=$as_save_IFS
64933 64576 test -z "$as_dir" && as_dir=.
64934 64577 for ac_exec_ext in '' $ac_executable_extensions; do
64935 64578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64936 64579 ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64937 64580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64938 64581 break 2
64939 64582 fi
64940 64583 done
64941 64584 done
64942 64585 IFS=$as_save_IFS
64943 64586
64944 64587 ;;
64945 64588 esac
64946 64589 fi
64947 64590 ICECC_CMD=$ac_cv_path_ICECC_CMD
64948 64591 if test -n "$ICECC_CMD"; then
64949 64592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64950 64593 $as_echo "$ICECC_CMD" >&6; }
64951 64594 else
64952 64595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64953 64596 $as_echo "no" >&6; }
64954 64597 fi
64955 64598
64956 64599
64957 64600 test -n "$ICECC_CMD" && break
64958 64601 done
64959 64602
64960 64603 else
64961 64604 # The variable is set, but is it from the command line or the environment?
64962 64605
64963 64606 # Try to remove the string !ICECC_CMD! from our list.
64964 64607 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64965 64608 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64966 64609 # If it failed, the variable was not from the command line. Ignore it,
64967 64610 # but warn the user (except for BASH, which is always set by the calling BASH).
64968 64611 if test "xICECC_CMD" != xBASH; then
64969 64612 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64970 64613 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64971 64614 fi
64972 64615 # Try to locate tool using the code snippet
64973 64616 for ac_prog in icecc
64974 64617 do
64975 64618 # Extract the first word of "$ac_prog", so it can be a program name with args.
64976 64619 set dummy $ac_prog; ac_word=$2
64977 64620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64978 64621 $as_echo_n "checking for $ac_word... " >&6; }
64979 64622 if ${ac_cv_path_ICECC_CMD+:} false; then :
64980 64623 $as_echo_n "(cached) " >&6
64981 64624 else
64982 64625 case $ICECC_CMD in
64983 64626 [\\/]* | ?:[\\/]*)
64984 64627 ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64985 64628 ;;
64986 64629 *)
64987 64630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64988 64631 for as_dir in $PATH
64989 64632 do
64990 64633 IFS=$as_save_IFS
64991 64634 test -z "$as_dir" && as_dir=.
64992 64635 for ac_exec_ext in '' $ac_executable_extensions; do
64993 64636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64994 64637 ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64995 64638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64996 64639 break 2
64997 64640 fi
64998 64641 done
64999 64642 done
65000 64643 IFS=$as_save_IFS
65001 64644
65002 64645 ;;
65003 64646 esac
65004 64647 fi
65005 64648 ICECC_CMD=$ac_cv_path_ICECC_CMD
65006 64649 if test -n "$ICECC_CMD"; then
65007 64650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65008 64651 $as_echo "$ICECC_CMD" >&6; }
65009 64652 else
65010 64653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65011 64654 $as_echo "no" >&6; }
65012 64655 fi
65013 64656
65014 64657
65015 64658 test -n "$ICECC_CMD" && break
65016 64659 done
65017 64660
65018 64661 else
65019 64662 # If it succeeded, then it was overridden by the user. We will use it
65020 64663 # for the tool.
65021 64664
65022 64665 # First remove it from the list of overridden variables, so we can test
65023 64666 # for unknown variables in the end.
65024 64667 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65025 64668
65026 64669 # Check if we try to supply an empty value
65027 64670 if test "x$ICECC_CMD" = x; then
65028 64671 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65029 64672 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65030 64673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65031 64674 $as_echo_n "checking for ICECC_CMD... " >&6; }
65032 64675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65033 64676 $as_echo "disabled" >&6; }
65034 64677 else
65035 64678 # Check if the provided tool contains a complete path.
65036 64679 tool_specified="$ICECC_CMD"
65037 64680 tool_basename="${tool_specified##*/}"
65038 64681 if test "x$tool_basename" = "x$tool_specified"; then
65039 64682 # A command without a complete path is provided, search $PATH.
65040 64683 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65041 64684 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65042 64685 # Extract the first word of "$tool_basename", so it can be a program name with args.
65043 64686 set dummy $tool_basename; ac_word=$2
65044 64687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65045 64688 $as_echo_n "checking for $ac_word... " >&6; }
65046 64689 if ${ac_cv_path_ICECC_CMD+:} false; then :
65047 64690 $as_echo_n "(cached) " >&6
65048 64691 else
65049 64692 case $ICECC_CMD in
65050 64693 [\\/]* | ?:[\\/]*)
65051 64694 ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65052 64695 ;;
65053 64696 *)
65054 64697 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65055 64698 for as_dir in $PATH
65056 64699 do
65057 64700 IFS=$as_save_IFS
65058 64701 test -z "$as_dir" && as_dir=.
65059 64702 for ac_exec_ext in '' $ac_executable_extensions; do
65060 64703 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65061 64704 ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65062 64705 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65063 64706 break 2
65064 64707 fi
65065 64708 done
65066 64709 done
65067 64710 IFS=$as_save_IFS
65068 64711
65069 64712 ;;
65070 64713 esac
65071 64714 fi
65072 64715 ICECC_CMD=$ac_cv_path_ICECC_CMD
65073 64716 if test -n "$ICECC_CMD"; then
65074 64717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65075 64718 $as_echo "$ICECC_CMD" >&6; }
65076 64719 else
65077 64720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65078 64721 $as_echo "no" >&6; }
65079 64722 fi
65080 64723
65081 64724
65082 64725 if test "x$ICECC_CMD" = x; then
65083 64726 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65084 64727 fi
65085 64728 else
65086 64729 # Otherwise we believe it is a complete path. Use it as it is.
65087 64730 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65088 64731 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65089 64732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65090 64733 $as_echo_n "checking for ICECC_CMD... " >&6; }
65091 64734 if test ! -x "$tool_specified"; then
65092 64735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65093 64736 $as_echo "not found" >&6; }
65094 64737 as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65095 64738 fi
65096 64739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65097 64740 $as_echo "$tool_specified" >&6; }
65098 64741 fi
65099 64742 fi
65100 64743 fi
65101 64744
65102 64745 fi
65103 64746
65104 64747
65105 64748
65106 64749 if test "x$ICECC_CMD" = x; then
65107 64750 as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65108 64751 fi
65109 64752
65110 64753
65111 64754 old_path="$PATH"
65112 64755
65113 64756 # Look for icecc-create-env in some known places
65114 64757 PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65115 64758
65116 64759
65117 64760
65118 64761 # Publish this variable in the help.
65119 64762
65120 64763
65121 64764 if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65122 64765 # The variable is not set by user, try to locate tool using the code snippet
65123 64766 for ac_prog in icecc-create-env
65124 64767 do
65125 64768 # Extract the first word of "$ac_prog", so it can be a program name with args.
65126 64769 set dummy $ac_prog; ac_word=$2
65127 64770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65128 64771 $as_echo_n "checking for $ac_word... " >&6; }
65129 64772 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65130 64773 $as_echo_n "(cached) " >&6
65131 64774 else
65132 64775 case $ICECC_CREATE_ENV in
65133 64776 [\\/]* | ?:[\\/]*)
65134 64777 ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65135 64778 ;;
65136 64779 *)
65137 64780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65138 64781 for as_dir in $PATH
65139 64782 do
65140 64783 IFS=$as_save_IFS
65141 64784 test -z "$as_dir" && as_dir=.
65142 64785 for ac_exec_ext in '' $ac_executable_extensions; do
65143 64786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65144 64787 ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65145 64788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65146 64789 break 2
65147 64790 fi
65148 64791 done
65149 64792 done
65150 64793 IFS=$as_save_IFS
65151 64794
65152 64795 ;;
65153 64796 esac
65154 64797 fi
65155 64798 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65156 64799 if test -n "$ICECC_CREATE_ENV"; then
65157 64800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65158 64801 $as_echo "$ICECC_CREATE_ENV" >&6; }
65159 64802 else
65160 64803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65161 64804 $as_echo "no" >&6; }
65162 64805 fi
65163 64806
65164 64807
65165 64808 test -n "$ICECC_CREATE_ENV" && break
65166 64809 done
65167 64810
65168 64811 else
65169 64812 # The variable is set, but is it from the command line or the environment?
65170 64813
65171 64814 # Try to remove the string !ICECC_CREATE_ENV! from our list.
65172 64815 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65173 64816 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65174 64817 # If it failed, the variable was not from the command line. Ignore it,
65175 64818 # but warn the user (except for BASH, which is always set by the calling BASH).
65176 64819 if test "xICECC_CREATE_ENV" != xBASH; then
65177 64820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65178 64821 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65179 64822 fi
65180 64823 # Try to locate tool using the code snippet
65181 64824 for ac_prog in icecc-create-env
65182 64825 do
65183 64826 # Extract the first word of "$ac_prog", so it can be a program name with args.
65184 64827 set dummy $ac_prog; ac_word=$2
65185 64828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65186 64829 $as_echo_n "checking for $ac_word... " >&6; }
65187 64830 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65188 64831 $as_echo_n "(cached) " >&6
65189 64832 else
65190 64833 case $ICECC_CREATE_ENV in
65191 64834 [\\/]* | ?:[\\/]*)
65192 64835 ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65193 64836 ;;
65194 64837 *)
65195 64838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65196 64839 for as_dir in $PATH
65197 64840 do
65198 64841 IFS=$as_save_IFS
65199 64842 test -z "$as_dir" && as_dir=.
65200 64843 for ac_exec_ext in '' $ac_executable_extensions; do
65201 64844 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65202 64845 ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65203 64846 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65204 64847 break 2
65205 64848 fi
65206 64849 done
65207 64850 done
65208 64851 IFS=$as_save_IFS
65209 64852
65210 64853 ;;
65211 64854 esac
65212 64855 fi
65213 64856 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65214 64857 if test -n "$ICECC_CREATE_ENV"; then
65215 64858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65216 64859 $as_echo "$ICECC_CREATE_ENV" >&6; }
65217 64860 else
65218 64861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65219 64862 $as_echo "no" >&6; }
65220 64863 fi
65221 64864
65222 64865
65223 64866 test -n "$ICECC_CREATE_ENV" && break
65224 64867 done
65225 64868
65226 64869 else
65227 64870 # If it succeeded, then it was overridden by the user. We will use it
65228 64871 # for the tool.
65229 64872
65230 64873 # First remove it from the list of overridden variables, so we can test
65231 64874 # for unknown variables in the end.
65232 64875 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65233 64876
65234 64877 # Check if we try to supply an empty value
65235 64878 if test "x$ICECC_CREATE_ENV" = x; then
65236 64879 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65237 64880 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65238 64881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65239 64882 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65240 64883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65241 64884 $as_echo "disabled" >&6; }
65242 64885 else
65243 64886 # Check if the provided tool contains a complete path.
65244 64887 tool_specified="$ICECC_CREATE_ENV"
65245 64888 tool_basename="${tool_specified##*/}"
65246 64889 if test "x$tool_basename" = "x$tool_specified"; then
65247 64890 # A command without a complete path is provided, search $PATH.
65248 64891 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65249 64892 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65250 64893 # Extract the first word of "$tool_basename", so it can be a program name with args.
65251 64894 set dummy $tool_basename; ac_word=$2
65252 64895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65253 64896 $as_echo_n "checking for $ac_word... " >&6; }
65254 64897 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65255 64898 $as_echo_n "(cached) " >&6
65256 64899 else
65257 64900 case $ICECC_CREATE_ENV in
65258 64901 [\\/]* | ?:[\\/]*)
65259 64902 ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65260 64903 ;;
65261 64904 *)
65262 64905 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65263 64906 for as_dir in $PATH
65264 64907 do
65265 64908 IFS=$as_save_IFS
65266 64909 test -z "$as_dir" && as_dir=.
65267 64910 for ac_exec_ext in '' $ac_executable_extensions; do
65268 64911 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65269 64912 ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65270 64913 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65271 64914 break 2
65272 64915 fi
65273 64916 done
65274 64917 done
65275 64918 IFS=$as_save_IFS
65276 64919
65277 64920 ;;
65278 64921 esac
65279 64922 fi
65280 64923 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65281 64924 if test -n "$ICECC_CREATE_ENV"; then
65282 64925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65283 64926 $as_echo "$ICECC_CREATE_ENV" >&6; }
65284 64927 else
65285 64928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65286 64929 $as_echo "no" >&6; }
65287 64930 fi
65288 64931
65289 64932
65290 64933 if test "x$ICECC_CREATE_ENV" = x; then
65291 64934 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65292 64935 fi
65293 64936 else
65294 64937 # Otherwise we believe it is a complete path. Use it as it is.
65295 64938 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65296 64939 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65297 64940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65298 64941 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65299 64942 if test ! -x "$tool_specified"; then
65300 64943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65301 64944 $as_echo "not found" >&6; }
65302 64945 as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65303 64946 fi
65304 64947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65305 64948 $as_echo "$tool_specified" >&6; }
65306 64949 fi
65307 64950 fi
65308 64951 fi
65309 64952
65310 64953 fi
65311 64954
65312 64955
65313 64956
65314 64957 if test "x$ICECC_CREATE_ENV" = x; then
65315 64958 as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65316 64959 fi
65317 64960
65318 64961
65319 64962 # Use icecc-create-env to create a minimal compilation environment that can
65320 64963 # be sent to the other hosts in the icecream cluster.
65321 64964 icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65322 64965 ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65323 64966 # Older versions of icecc does not have the --gcc parameter
65324 64967 if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65325 64968 icecc_gcc_arg="--gcc"
65326 64969 fi
65327 64970 if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65328 64971
65329 64972 ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65330 64973 && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65331 64974 ${icecc_create_env_log} 2>&1 )
65332 64975 if test "$?" != "0"; then
65333 64976 { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65334 64977 $as_echo "$as_me: icecc-create-env output:" >&6;}
65335 64978 cat \
65336 64979 ${icecc_create_env_log}
65337 64980 as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65338 64981 fi
65339 64982
65340 64983 elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65341 64984 # For clang, the icecc compilerwrapper is needed. It usually resides next
65342 64985 # to icecc-create-env.
65343 64986
65344 64987
65345 64988
65346 64989 # Publish this variable in the help.
65347 64990
65348 64991
65349 64992 if [ -z "${ICECC_WRAPPER+x}" ]; then
65350 64993 # The variable is not set by user, try to locate tool using the code snippet
65351 64994 for ac_prog in compilerwrapper
65352 64995 do
65353 64996 # Extract the first word of "$ac_prog", so it can be a program name with args.
65354 64997 set dummy $ac_prog; ac_word=$2
65355 64998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65356 64999 $as_echo_n "checking for $ac_word... " >&6; }
65357 65000 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65358 65001 $as_echo_n "(cached) " >&6
65359 65002 else
65360 65003 case $ICECC_WRAPPER in
65361 65004 [\\/]* | ?:[\\/]*)
65362 65005 ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65363 65006 ;;
65364 65007 *)
65365 65008 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65366 65009 for as_dir in $PATH
65367 65010 do
65368 65011 IFS=$as_save_IFS
65369 65012 test -z "$as_dir" && as_dir=.
65370 65013 for ac_exec_ext in '' $ac_executable_extensions; do
65371 65014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65372 65015 ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65373 65016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65374 65017 break 2
65375 65018 fi
65376 65019 done
65377 65020 done
65378 65021 IFS=$as_save_IFS
65379 65022
65380 65023 ;;
65381 65024 esac
65382 65025 fi
65383 65026 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65384 65027 if test -n "$ICECC_WRAPPER"; then
65385 65028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65386 65029 $as_echo "$ICECC_WRAPPER" >&6; }
65387 65030 else
65388 65031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65389 65032 $as_echo "no" >&6; }
65390 65033 fi
65391 65034
65392 65035
65393 65036 test -n "$ICECC_WRAPPER" && break
65394 65037 done
65395 65038
65396 65039 else
65397 65040 # The variable is set, but is it from the command line or the environment?
65398 65041
65399 65042 # Try to remove the string !ICECC_WRAPPER! from our list.
65400 65043 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65401 65044 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65402 65045 # If it failed, the variable was not from the command line. Ignore it,
65403 65046 # but warn the user (except for BASH, which is always set by the calling BASH).
65404 65047 if test "xICECC_WRAPPER" != xBASH; then
65405 65048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65406 65049 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65407 65050 fi
65408 65051 # Try to locate tool using the code snippet
65409 65052 for ac_prog in compilerwrapper
65410 65053 do
65411 65054 # Extract the first word of "$ac_prog", so it can be a program name with args.
65412 65055 set dummy $ac_prog; ac_word=$2
65413 65056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65414 65057 $as_echo_n "checking for $ac_word... " >&6; }
65415 65058 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65416 65059 $as_echo_n "(cached) " >&6
65417 65060 else
65418 65061 case $ICECC_WRAPPER in
65419 65062 [\\/]* | ?:[\\/]*)
65420 65063 ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65421 65064 ;;
65422 65065 *)
65423 65066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65424 65067 for as_dir in $PATH
65425 65068 do
65426 65069 IFS=$as_save_IFS
65427 65070 test -z "$as_dir" && as_dir=.
65428 65071 for ac_exec_ext in '' $ac_executable_extensions; do
65429 65072 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65430 65073 ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65431 65074 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65432 65075 break 2
65433 65076 fi
65434 65077 done
65435 65078 done
65436 65079 IFS=$as_save_IFS
65437 65080
65438 65081 ;;
65439 65082 esac
65440 65083 fi
65441 65084 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65442 65085 if test -n "$ICECC_WRAPPER"; then
65443 65086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65444 65087 $as_echo "$ICECC_WRAPPER" >&6; }
65445 65088 else
65446 65089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65447 65090 $as_echo "no" >&6; }
65448 65091 fi
65449 65092
65450 65093
65451 65094 test -n "$ICECC_WRAPPER" && break
65452 65095 done
65453 65096
65454 65097 else
65455 65098 # If it succeeded, then it was overridden by the user. We will use it
65456 65099 # for the tool.
65457 65100
65458 65101 # First remove it from the list of overridden variables, so we can test
65459 65102 # for unknown variables in the end.
65460 65103 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65461 65104
65462 65105 # Check if we try to supply an empty value
65463 65106 if test "x$ICECC_WRAPPER" = x; then
65464 65107 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65465 65108 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65466 65109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65467 65110 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65468 65111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65469 65112 $as_echo "disabled" >&6; }
65470 65113 else
65471 65114 # Check if the provided tool contains a complete path.
65472 65115 tool_specified="$ICECC_WRAPPER"
65473 65116 tool_basename="${tool_specified##*/}"
65474 65117 if test "x$tool_basename" = "x$tool_specified"; then
65475 65118 # A command without a complete path is provided, search $PATH.
65476 65119 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65477 65120 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65478 65121 # Extract the first word of "$tool_basename", so it can be a program name with args.
65479 65122 set dummy $tool_basename; ac_word=$2
65480 65123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65481 65124 $as_echo_n "checking for $ac_word... " >&6; }
65482 65125 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65483 65126 $as_echo_n "(cached) " >&6
65484 65127 else
65485 65128 case $ICECC_WRAPPER in
65486 65129 [\\/]* | ?:[\\/]*)
65487 65130 ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65488 65131 ;;
65489 65132 *)
65490 65133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65491 65134 for as_dir in $PATH
65492 65135 do
65493 65136 IFS=$as_save_IFS
65494 65137 test -z "$as_dir" && as_dir=.
65495 65138 for ac_exec_ext in '' $ac_executable_extensions; do
65496 65139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65497 65140 ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65498 65141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65499 65142 break 2
65500 65143 fi
65501 65144 done
65502 65145 done
65503 65146 IFS=$as_save_IFS
65504 65147
65505 65148 ;;
65506 65149 esac
65507 65150 fi
65508 65151 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65509 65152 if test -n "$ICECC_WRAPPER"; then
65510 65153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65511 65154 $as_echo "$ICECC_WRAPPER" >&6; }
65512 65155 else
65513 65156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65514 65157 $as_echo "no" >&6; }
65515 65158 fi
65516 65159
65517 65160
65518 65161 if test "x$ICECC_WRAPPER" = x; then
65519 65162 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65520 65163 fi
65521 65164 else
65522 65165 # Otherwise we believe it is a complete path. Use it as it is.
65523 65166 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65524 65167 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65525 65168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65526 65169 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65527 65170 if test ! -x "$tool_specified"; then
65528 65171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65529 65172 $as_echo "not found" >&6; }
65530 65173 as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65531 65174 fi
65532 65175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65533 65176 $as_echo "$tool_specified" >&6; }
65534 65177 fi
65535 65178 fi
65536 65179 fi
65537 65180
65538 65181 fi
65539 65182
65540 65183
65541 65184
65542 65185 if test "x$ICECC_WRAPPER" = x; then
65543 65186 as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65544 65187 fi
65545 65188
65546 65189
65547 65190
65548 65191 ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65549 65192 && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65550 65193 if test "$?" != "0"; then
65551 65194 { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65552 65195 $as_echo "$as_me: icecc-create-env output:" >&6;}
65553 65196 cat ${icecc_create_env_log}
65554 65197 as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65555 65198 fi
65556 65199
65557 65200 else
65558 65201 as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65559 65202 fi
65560 65203 PATH="$old_path"
65561 65204 # The bundle with the compiler gets a name based on checksums. Parse log file
65562 65205 # to find it.
65563 65206 ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65564 65207 ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65565 65208 if test ! -f ${ICECC_ENV_BUNDLE}; then
65566 65209 as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65567 65210 fi
65568 65211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65569 65212 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65570 65213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65571 65214 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65572 65215 ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65573 65216
65574 65217 if test "x${COMPILE_TYPE}" = "xcross"; then
65575 65218 # If cross compiling, create a separate env package for the build compiler
65576 65219 # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65577 65220 icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65578 65221 if test "x${BUILD_CC##*/}" = "xgcc" || test "x${BUILD_CC##*/}" = "xcc"; then
65579 65222
65580 65223 ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65581 65224 && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65582 65225 ${icecc_create_env_log_build} 2>&1 )
65583 65226 if test "$?" != "0"; then
65584 65227 { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65585 65228 $as_echo "$as_me: icecc-create-env output:" >&6;}
65586 65229 cat \
65587 65230 ${icecc_create_env_log_build}
65588 65231 as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65589 65232 fi
65590 65233
65591 65234 elif test "x${BUILD_CC##*/}" = "xclang"; then
65592 65235
65593 65236 ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65594 65237 && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65595 65238 if test "$?" != "0"; then
65596 65239 { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65597 65240 $as_echo "$as_me: icecc-create-env output:" >&6;}
65598 65241 cat ${icecc_create_env_log_build}
65599 65242 as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65600 65243 fi
65601 65244
65602 65245 else
65603 65246 as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65604 65247 fi
65605 65248 ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65606 65249 ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65607 65250 if test ! -f ${ICECC_ENV_BUNDLE}; then
65608 65251 as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65609 65252 fi
65610 65253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65611 65254 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65612 65255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65613 65256 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65614 65257 BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65615 65258 ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65616 65259 else
65617 65260 BUILD_ICECC="${ICECC}"
65618 65261 fi
65619 65262
65620 65263
65621 65264 fi
65622 65265
65623 65266
65624 65267 # Can the C/C++ compiler use precompiled headers?
65625 65268
65626 65269
65627 65270 ###############################################################################
65628 65271 #
65629 65272 # Can the C/C++ compiler use precompiled headers?
65630 65273 #
65631 65274 # Check whether --enable-precompiled-headers was given.
65632 65275 if test "${enable_precompiled_headers+set}" = set; then :
65633 65276 enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65634 65277 else
65635 65278 ENABLE_PRECOMPH=yes
65636 65279 fi
65637 65280
65638 65281
65639 65282 USE_PRECOMPILED_HEADER=1
65640 65283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65641 65284 $as_echo_n "checking If precompiled header is enabled... " >&6; }
65642 65285 if test "x$ENABLE_PRECOMPH" = xno; then
65643 65286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65644 65287 $as_echo "no, forced" >&6; }
65645 65288 USE_PRECOMPILED_HEADER=0
65646 65289 elif test "x$ICECC" != "x"; then
65647 65290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65648 65291 $as_echo "no, does not work effectively with icecc" >&6; }
65649 65292 USE_PRECOMPILED_HEADER=0
65650 65293 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65651 65294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65652 65295 $as_echo "no, does not work with Solaris Studio" >&6; }
65653 65296 USE_PRECOMPILED_HEADER=0
65654 65297 elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65655 65298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
65656 65299 $as_echo "no, does not work with xlc" >&6; }
65657 65300 USE_PRECOMPILED_HEADER=0
65658 65301 else
65659 65302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65660 65303 $as_echo "yes" >&6; }
65661 65304 fi
65662 65305
65663 65306 if test "x$ENABLE_PRECOMPH" = xyes; then
65664 65307 # Check that the compiler actually supports precomp headers.
65665 65308 if test "x$TOOLCHAIN_TYPE" = xgcc; then
65666 65309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65667 65310 $as_echo_n "checking that precompiled headers work... " >&6; }
65668 65311 echo "int alfa();" > conftest.h
65669 65312 $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65670 65313 if test ! -f conftest.hpp.gch; then
65671 65314 USE_PRECOMPILED_HEADER=0
65672 65315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65673 65316 $as_echo "no" >&6; }
65674 65317 else
65675 65318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65676 65319 $as_echo "yes" >&6; }
65677 65320 fi
65678 65321 $RM conftest.h conftest.hpp.gch
65679 65322 fi
65680 65323 fi
65681 65324
65682 65325
65683 65326
65684 65327
65685 65328 # Setup use of ccache, if available
65686 65329
65687 65330 # Check whether --enable-ccache was given.
65688 65331 if test "${enable_ccache+set}" = set; then :
65689 65332 enableval=$enable_ccache;
65690 65333 fi
65691 65334
65692 65335
65693 65336 CCACHE=
65694 65337 CCACHE_STATUS=
65695 65338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65696 65339 $as_echo_n "checking is ccache enabled... " >&6; }
65697 65340 if test "x$enable_ccache" = xyes; then
65698 65341 if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65699 65342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65700 65343 $as_echo "yes" >&6; }
65701 65344 OLD_PATH="$PATH"
65702 65345 if test "x$TOOLCHAIN_PATH" != x; then
65703 65346 PATH=$TOOLCHAIN_PATH:$PATH
65704 65347 fi
65705 65348
65706 65349
65707 65350
65708 65351 # Publish this variable in the help.
65709 65352
65710 65353
65711 65354 if [ -z "${CCACHE+x}" ]; then
65712 65355 # The variable is not set by user, try to locate tool using the code snippet
65713 65356 for ac_prog in ccache
65714 65357 do
65715 65358 # Extract the first word of "$ac_prog", so it can be a program name with args.
65716 65359 set dummy $ac_prog; ac_word=$2
65717 65360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65718 65361 $as_echo_n "checking for $ac_word... " >&6; }
65719 65362 if ${ac_cv_path_CCACHE+:} false; then :
65720 65363 $as_echo_n "(cached) " >&6
65721 65364 else
65722 65365 case $CCACHE in
65723 65366 [\\/]* | ?:[\\/]*)
65724 65367 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65725 65368 ;;
65726 65369 *)
65727 65370 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65728 65371 for as_dir in $PATH
65729 65372 do
65730 65373 IFS=$as_save_IFS
65731 65374 test -z "$as_dir" && as_dir=.
65732 65375 for ac_exec_ext in '' $ac_executable_extensions; do
65733 65376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65734 65377 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65735 65378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65736 65379 break 2
65737 65380 fi
65738 65381 done
65739 65382 done
65740 65383 IFS=$as_save_IFS
65741 65384
65742 65385 ;;
65743 65386 esac
65744 65387 fi
65745 65388 CCACHE=$ac_cv_path_CCACHE
65746 65389 if test -n "$CCACHE"; then
65747 65390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65748 65391 $as_echo "$CCACHE" >&6; }
65749 65392 else
65750 65393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65751 65394 $as_echo "no" >&6; }
65752 65395 fi
65753 65396
65754 65397
65755 65398 test -n "$CCACHE" && break
65756 65399 done
65757 65400
65758 65401 else
65759 65402 # The variable is set, but is it from the command line or the environment?
65760 65403
65761 65404 # Try to remove the string !CCACHE! from our list.
65762 65405 try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65763 65406 if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65764 65407 # If it failed, the variable was not from the command line. Ignore it,
65765 65408 # but warn the user (except for BASH, which is always set by the calling BASH).
65766 65409 if test "xCCACHE" != xBASH; then
65767 65410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65768 65411 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65769 65412 fi
65770 65413 # Try to locate tool using the code snippet
65771 65414 for ac_prog in ccache
65772 65415 do
65773 65416 # Extract the first word of "$ac_prog", so it can be a program name with args.
65774 65417 set dummy $ac_prog; ac_word=$2
65775 65418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65776 65419 $as_echo_n "checking for $ac_word... " >&6; }
65777 65420 if ${ac_cv_path_CCACHE+:} false; then :
65778 65421 $as_echo_n "(cached) " >&6
65779 65422 else
65780 65423 case $CCACHE in
65781 65424 [\\/]* | ?:[\\/]*)
65782 65425 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65783 65426 ;;
65784 65427 *)
65785 65428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65786 65429 for as_dir in $PATH
65787 65430 do
65788 65431 IFS=$as_save_IFS
65789 65432 test -z "$as_dir" && as_dir=.
65790 65433 for ac_exec_ext in '' $ac_executable_extensions; do
65791 65434 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65792 65435 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65793 65436 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65794 65437 break 2
65795 65438 fi
65796 65439 done
65797 65440 done
65798 65441 IFS=$as_save_IFS
65799 65442
65800 65443 ;;
65801 65444 esac
65802 65445 fi
65803 65446 CCACHE=$ac_cv_path_CCACHE
65804 65447 if test -n "$CCACHE"; then
65805 65448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65806 65449 $as_echo "$CCACHE" >&6; }
65807 65450 else
65808 65451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65809 65452 $as_echo "no" >&6; }
65810 65453 fi
65811 65454
65812 65455
65813 65456 test -n "$CCACHE" && break
65814 65457 done
65815 65458
65816 65459 else
65817 65460 # If it succeeded, then it was overridden by the user. We will use it
65818 65461 # for the tool.
65819 65462
65820 65463 # First remove it from the list of overridden variables, so we can test
65821 65464 # for unknown variables in the end.
65822 65465 CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65823 65466
65824 65467 # Check if we try to supply an empty value
65825 65468 if test "x$CCACHE" = x; then
65826 65469 { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65827 65470 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65828 65471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65829 65472 $as_echo_n "checking for CCACHE... " >&6; }
65830 65473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65831 65474 $as_echo "disabled" >&6; }
65832 65475 else
65833 65476 # Check if the provided tool contains a complete path.
65834 65477 tool_specified="$CCACHE"
65835 65478 tool_basename="${tool_specified##*/}"
65836 65479 if test "x$tool_basename" = "x$tool_specified"; then
65837 65480 # A command without a complete path is provided, search $PATH.
65838 65481 { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65839 65482 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65840 65483 # Extract the first word of "$tool_basename", so it can be a program name with args.
65841 65484 set dummy $tool_basename; ac_word=$2
65842 65485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65843 65486 $as_echo_n "checking for $ac_word... " >&6; }
65844 65487 if ${ac_cv_path_CCACHE+:} false; then :
65845 65488 $as_echo_n "(cached) " >&6
65846 65489 else
65847 65490 case $CCACHE in
65848 65491 [\\/]* | ?:[\\/]*)
65849 65492 ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65850 65493 ;;
65851 65494 *)
65852 65495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65853 65496 for as_dir in $PATH
65854 65497 do
65855 65498 IFS=$as_save_IFS
65856 65499 test -z "$as_dir" && as_dir=.
65857 65500 for ac_exec_ext in '' $ac_executable_extensions; do
65858 65501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65859 65502 ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65860 65503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65861 65504 break 2
65862 65505 fi
65863 65506 done
65864 65507 done
65865 65508 IFS=$as_save_IFS
65866 65509
65867 65510 ;;
65868 65511 esac
65869 65512 fi
65870 65513 CCACHE=$ac_cv_path_CCACHE
65871 65514 if test -n "$CCACHE"; then
65872 65515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65873 65516 $as_echo "$CCACHE" >&6; }
65874 65517 else
65875 65518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65876 65519 $as_echo "no" >&6; }
65877 65520 fi
65878 65521
65879 65522
65880 65523 if test "x$CCACHE" = x; then
65881 65524 as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65882 65525 fi
65883 65526 else
65884 65527 # Otherwise we believe it is a complete path. Use it as it is.
65885 65528 { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65886 65529 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65887 65530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65888 65531 $as_echo_n "checking for CCACHE... " >&6; }
65889 65532 if test ! -x "$tool_specified"; then
65890 65533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65891 65534 $as_echo "not found" >&6; }
65892 65535 as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65893 65536 fi
65894 65537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65895 65538 $as_echo "$tool_specified" >&6; }
65896 65539 fi
65897 65540 fi
65898 65541 fi
65899 65542
65900 65543 fi
65901 65544
65902 65545
65903 65546
65904 65547 if test "x$CCACHE" = x; then
65905 65548 as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65906 65549 fi
65907 65550
65908 65551
65909 65552 PATH="$OLD_PATH"
65910 65553 CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65911 65554 CCACHE_STATUS="Active ($CCACHE_VERSION)"
65912 65555 else
65913 65556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65914 65557 $as_echo "no" >&6; }
65915 65558 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65916 65559 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65917 65560 fi
65918 65561 elif test "x$enable_ccache" = xno; then
65919 65562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65920 65563 $as_echo "no, explicitly disabled" >&6; }
65921 65564 CCACHE_STATUS="Disabled"
65922 65565 elif test "x$enable_ccache" = x; then
65923 65566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65924 65567 $as_echo "no" >&6; }
65925 65568 else
65926 65569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65927 65570 $as_echo "unknown" >&6; }
65928 65571 as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65929 65572 fi
65930 65573
65931 65574
65932 65575
65933 65576 # Check whether --with-ccache-dir was given.
65934 65577 if test "${with_ccache_dir+set}" = set; then :
65935 65578 withval=$with_ccache_dir;
65936 65579 fi
65937 65580
65938 65581
65939 65582 if test "x$with_ccache_dir" != x; then
65940 65583 # When using a non home ccache directory, assume the use is to share ccache files
65941 65584 # with other users. Thus change the umask.
65942 65585 SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65943 65586 if test "x$CCACHE" = x; then
65944 65587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65945 65588 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65946 65589 fi
65947 65590 fi
65948 65591
65949 65592 if test "x$CCACHE" != x; then
65950 65593
65951 65594 if test "x$CCACHE" != x; then
65952 65595 if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65953 65596 HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65954 65597 $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65955 65598 if test "x$HAS_BAD_CCACHE" != "x"; then
65956 65599 as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65957 65600 fi
65958 65601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65959 65602 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65960 65603 CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65961 65604 PUSHED_FLAGS="$CXXFLAGS"
65962 65605 CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65963 65606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65964 65607 /* end confdefs.h. */
65965 65608
65966 65609 int
65967 65610 main ()
65968 65611 {
65969 65612
65970 65613 ;
65971 65614 return 0;
65972 65615 }
65973 65616 _ACEOF
65974 65617 if ac_fn_cxx_try_compile "$LINENO"; then :
65975 65618 CC_KNOWS_CCACHE_TRICK=yes
65976 65619 else
65977 65620 CC_KNOWS_CCACHE_TRICK=no
65978 65621 fi
65979 65622 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65980 65623 CXXFLAGS="$PUSHED_FLAGS"
65981 65624 if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65982 65625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65983 65626 $as_echo "yes" >&6; }
65984 65627 CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65985 65628
65986 65629 CCACHE_SLOPPINESS=pch_defines,time_macros
65987 65630 else
65988 65631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65989 65632 $as_echo "no" >&6; }
65990 65633 as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65991 65634 fi
65992 65635 fi
65993 65636
65994 65637 CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65995 65638 CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65996 65639
65997 65640 if test "x$SET_CCACHE_DIR" != x; then
65998 65641 mkdir -p $CCACHE_DIR > /dev/null 2>&1
65999 65642 chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66000 65643 fi
66001 65644 fi
66002 65645
66003 65646 fi
66004 65647
66005 65648
66006 65649 ###############################################################################
66007 65650 #
66008 65651 # And now the finish...
66009 65652 #
66010 65653 ###############################################################################
66011 65654
66012 65655 # Check for some common pitfalls
66013 65656
66014 65657 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66015 65658 file_to_test="$SRC_ROOT/LICENSE"
66016 65659 if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66017 65660 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
66018 65661 fi
66019 65662 fi
66020 65663
66021 65664
66022 65665 # Did user specify any unknown variables?
66023 65666
66024 65667 if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66025 65668 # Replace the separating ! with spaces before presenting for end user.
66026 65669 unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66027 65670 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66028 65671 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66029 65672 fi
66030 65673
66031 65674
66032 65675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66033 65676 $as_echo_n "checking if build directory is on local disk... " >&6; }
66034 65677
66035 65678 # df -l lists only local disks; if the given directory is not found then
66036 65679 # a non-zero exit code is given
66037 65680 if test "x$DF" = x; then
66038 65681 if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66039 65682 # msys does not have df; use Windows "net use" instead.
66040 65683 IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66041 65684 if test "x$IS_NETWORK_DISK" = x; then
66042 65685 OUTPUT_DIR_IS_LOCAL="yes"
66043 65686 else
66044 65687 OUTPUT_DIR_IS_LOCAL="no"
66045 65688 fi
66046 65689 else
66047 65690 # No df here, say it's local
66048 65691 OUTPUT_DIR_IS_LOCAL="yes"
66049 65692 fi
66050 65693 else
66051 65694 if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66052 65695 OUTPUT_DIR_IS_LOCAL="yes"
66053 65696 else
66054 65697 OUTPUT_DIR_IS_LOCAL="no"
66055 65698 fi
66056 65699 fi
66057 65700
66058 65701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66059 65702 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66060 65703
66061 65704
66062 65705
66063 65706 # Check if the user has any old-style ALT_ variables set.
66064 65707 FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66065 65708
66066 65709 # Before generating output files, test if they exist. If they do, this is a reconfigure.
66067 65710 # Since we can't properly handle the dependencies for this, warn the user about the situation
66068 65711 if test -e $OUTPUT_ROOT/spec.gmk; then
66069 65712 IS_RECONFIGURE=yes
66070 65713 else
66071 65714 IS_RECONFIGURE=no
66072 65715 fi
66073 65716
66074 65717
66075 65718 # At the end, call the custom hook. (Dummy macro if no custom sources available)
66076 65719
66077 65720
66078 65721 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66079 65722
66080 65723 # Keep feature lists sorted and free of duplicates
66081 65724 JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66082 65725 JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66083 65726 JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66084 65727 JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66085 65728 JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66086 65729 JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66087 65730 JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66088 65731
66089 65732 # Validate features
66090 65733 for variant in $JVM_VARIANTS; do
66091 65734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66092 65735 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66093 65736 features_var_name=JVM_FEATURES_$variant
66094 65737 JVM_FEATURES_TO_TEST=${!features_var_name}
66095 65738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66096 65739 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66097 65740 NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66098 65741 STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66099 65742 INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66100 65743 if test "x$INVALID_FEATURES" != x; then
66101 65744 as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66102 65745 fi
66103 65746 done
66104 65747
66105 65748
66106 65749 # We're messing a bit with internal autoconf variables to put the config.status
66107 65750 # in the output directory instead of the current directory.
66108 65751 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66109 65752
66110 65753 # Create the actual output files. Now the main work of configure is done.
66111 65754 cat >confcache <<\_ACEOF
66112 65755 # This file is a shell script that caches the results of configure
66113 65756 # tests run on this system so they can be shared between configure
66114 65757 # scripts and configure runs, see configure's option --config-cache.
66115 65758 # It is not useful on other systems. If it contains results you don't
66116 65759 # want to keep, you may remove or edit it.
66117 65760 #
66118 65761 # config.status only pays attention to the cache file if you give it
66119 65762 # the --recheck option to rerun configure.
66120 65763 #
66121 65764 # `ac_cv_env_foo' variables (set or unset) will be overridden when
66122 65765 # loading this file, other *unset* `ac_cv_foo' will be assigned the
66123 65766 # following values.
66124 65767
66125 65768 _ACEOF
66126 65769
66127 65770 # The following way of writing the cache mishandles newlines in values,
66128 65771 # but we know of no workaround that is simple, portable, and efficient.
66129 65772 # So, we kill variables containing newlines.
66130 65773 # Ultrix sh set writes to stderr and can't be redirected directly,
66131 65774 # and sets the high bit in the cache file unless we assign to the vars.
66132 65775 (
66133 65776 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66134 65777 eval ac_val=\$$ac_var
66135 65778 case $ac_val in #(
66136 65779 *${as_nl}*)
66137 65780 case $ac_var in #(
66138 65781 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66139 65782 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66140 65783 esac
66141 65784 case $ac_var in #(
66142 65785 _ | IFS | as_nl) ;; #(
66143 65786 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66144 65787 *) { eval $ac_var=; unset $ac_var;} ;;
66145 65788 esac ;;
66146 65789 esac
66147 65790 done
66148 65791
66149 65792 (set) 2>&1 |
66150 65793 case $as_nl`(ac_space=' '; set) 2>&1` in #(
66151 65794 *${as_nl}ac_space=\ *)
66152 65795 # `set' does not quote correctly, so add quotes: double-quote
66153 65796 # substitution turns \\\\ into \\, and sed turns \\ into \.
66154 65797 sed -n \
66155 65798 "s/'/'\\\\''/g;
66156 65799 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66157 65800 ;; #(
66158 65801 *)
66159 65802 # `set' quotes correctly as required by POSIX, so do not add quotes.
66160 65803 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66161 65804 ;;
66162 65805 esac |
66163 65806 sort
66164 65807 ) |
66165 65808 sed '
66166 65809 /^ac_cv_env_/b end
66167 65810 t clear
66168 65811 :clear
66169 65812 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66170 65813 t end
66171 65814 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66172 65815 :end' >>confcache
66173 65816 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66174 65817 if test -w "$cache_file"; then
66175 65818 if test "x$cache_file" != "x/dev/null"; then
66176 65819 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66177 65820 $as_echo "$as_me: updating cache $cache_file" >&6;}
66178 65821 if test ! -f "$cache_file" || test -h "$cache_file"; then
66179 65822 cat confcache >"$cache_file"
66180 65823 else
66181 65824 case $cache_file in #(
66182 65825 */* | ?:*)
66183 65826 mv -f confcache "$cache_file"$$ &&
66184 65827 mv -f "$cache_file"$$ "$cache_file" ;; #(
66185 65828 *)
66186 65829 mv -f confcache "$cache_file" ;;
66187 65830 esac
66188 65831 fi
66189 65832 fi
66190 65833 else
66191 65834 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66192 65835 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66193 65836 fi
66194 65837 fi
66195 65838 rm -f confcache
66196 65839
66197 65840 test "x$prefix" = xNONE && prefix=$ac_default_prefix
66198 65841 # Let make expand exec_prefix.
66199 65842 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66200 65843
66201 65844 # Transform confdefs.h into DEFS.
66202 65845 # Protect against shell expansion while executing Makefile rules.
66203 65846 # Protect against Makefile macro expansion.
66204 65847 #
66205 65848 # If the first sed substitution is executed (which looks for macros that
66206 65849 # take arguments), then branch to the quote section. Otherwise,
66207 65850 # look for a macro that doesn't take arguments.
66208 65851 ac_script='
66209 65852 :mline
66210 65853 /\\$/{
66211 65854 N
66212 65855 s,\\\n,,
66213 65856 b mline
66214 65857 }
66215 65858 t clear
66216 65859 :clear
66217 65860 s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g
66218 65861 t quote
66219 65862 s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g
66220 65863 t quote
66221 65864 b any
66222 65865 :quote
66223 65866 s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66224 65867 s/\[/\\&/g
66225 65868 s/\]/\\&/g
66226 65869 s/\$/$$/g
66227 65870 H
66228 65871 :any
66229 65872 ${
66230 65873 g
66231 65874 s/^\n//
66232 65875 s/\n/ /g
66233 65876 p
66234 65877 }
66235 65878 '
66236 65879 DEFS=`sed -n "$ac_script" confdefs.h`
66237 65880
66238 65881
66239 65882 ac_libobjs=
66240 65883 ac_ltlibobjs=
66241 65884 U=
66242 65885 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66243 65886 # 1. Remove the extension, and $U if already installed.
66244 65887 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66245 65888 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66246 65889 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
66247 65890 # will be set to the directory where LIBOBJS objects are built.
66248 65891 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66249 65892 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66250 65893 done
66251 65894 LIBOBJS=$ac_libobjs
66252 65895
66253 65896 LTLIBOBJS=$ac_ltlibobjs
66254 65897
66255 65898
66256 65899
66257 65900 : "${CONFIG_STATUS=./config.status}"
66258 65901 ac_write_fail=0
66259 65902 ac_clean_files_save=$ac_clean_files
66260 65903 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66261 65904 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66262 65905 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66263 65906 as_write_fail=0
66264 65907 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66265 65908 #! $SHELL
66266 65909 # Generated by $as_me.
66267 65910 # Run this file to recreate the current configuration.
66268 65911 # Compiler output produced by configure, useful for debugging
66269 65912 # configure, is in config.log if it exists.
66270 65913
66271 65914 debug=false
66272 65915 ac_cs_recheck=false
66273 65916 ac_cs_silent=false
66274 65917
66275 65918 SHELL=\${CONFIG_SHELL-$SHELL}
66276 65919 export SHELL
66277 65920 _ASEOF
66278 65921 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66279 65922 ## -------------------- ##
66280 65923 ## M4sh Initialization. ##
66281 65924 ## -------------------- ##
66282 65925
66283 65926 # Be more Bourne compatible
66284 65927 DUALCASE=1; export DUALCASE # for MKS sh
66285 65928 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66286 65929 emulate sh
66287 65930 NULLCMD=:
66288 65931 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66289 65932 # is contrary to our usage. Disable this feature.
66290 65933 alias -g '${1+"$@"}'='"$@"'
66291 65934 setopt NO_GLOB_SUBST
66292 65935 else
66293 65936 case `(set -o) 2>/dev/null` in #(
66294 65937 *posix*) :
66295 65938 set -o posix ;; #(
66296 65939 *) :
66297 65940 ;;
66298 65941 esac
66299 65942 fi
66300 65943
66301 65944
66302 65945 as_nl='
66303 65946 '
66304 65947 export as_nl
66305 65948 # Printing a long string crashes Solaris 7 /usr/bin/printf.
66306 65949 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66307 65950 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66308 65951 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66309 65952 # Prefer a ksh shell builtin over an external printf program on Solaris,
66310 65953 # but without wasting forks for bash or zsh.
66311 65954 if test -z "$BASH_VERSION$ZSH_VERSION" \
66312 65955 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66313 65956 as_echo='print -r --'
66314 65957 as_echo_n='print -rn --'
66315 65958 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66316 65959 as_echo='printf %s\n'
66317 65960 as_echo_n='printf %s'
66318 65961 else
66319 65962 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66320 65963 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66321 65964 as_echo_n='/usr/ucb/echo -n'
66322 65965 else
66323 65966 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66324 65967 as_echo_n_body='eval
66325 65968 arg=$1;
66326 65969 case $arg in #(
66327 65970 *"$as_nl"*)
66328 65971 expr "X$arg" : "X\\(.*\\)$as_nl";
66329 65972 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66330 65973 esac;
66331 65974 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66332 65975 '
66333 65976 export as_echo_n_body
66334 65977 as_echo_n='sh -c $as_echo_n_body as_echo'
66335 65978 fi
66336 65979 export as_echo_body
66337 65980 as_echo='sh -c $as_echo_body as_echo'
66338 65981 fi
66339 65982
66340 65983 # The user is always right.
66341 65984 if test "${PATH_SEPARATOR+set}" != set; then
66342 65985 PATH_SEPARATOR=:
66343 65986 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66344 65987 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66345 65988 PATH_SEPARATOR=';'
66346 65989 }
66347 65990 fi
66348 65991
66349 65992
66350 65993 # IFS
66351 65994 # We need space, tab and new line, in precisely that order. Quoting is
66352 65995 # there to prevent editors from complaining about space-tab.
66353 65996 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
66354 65997 # splitting by setting IFS to empty value.)
66355 65998 IFS=" "" $as_nl"
66356 65999
66357 66000 # Find who we are. Look in the path if we contain no directory separator.
66358 66001 as_myself=
66359 66002 case $0 in #((
66360 66003 *[\\/]* ) as_myself=$0 ;;
66361 66004 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66362 66005 for as_dir in $PATH
66363 66006 do
66364 66007 IFS=$as_save_IFS
66365 66008 test -z "$as_dir" && as_dir=.
66366 66009 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66367 66010 done
66368 66011 IFS=$as_save_IFS
66369 66012
66370 66013 ;;
66371 66014 esac
66372 66015 # We did not find ourselves, most probably we were run as `sh COMMAND'
66373 66016 # in which case we are not to be found in the path.
66374 66017 if test "x$as_myself" = x; then
66375 66018 as_myself=$0
66376 66019 fi
66377 66020 if test ! -f "$as_myself"; then
66378 66021 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66379 66022 exit 1
66380 66023 fi
66381 66024
66382 66025 # Unset variables that we do not need and which cause bugs (e.g. in
66383 66026 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
66384 66027 # suppresses any "Segmentation fault" message there. '((' could
66385 66028 # trigger a bug in pdksh 5.2.14.
66386 66029 for as_var in BASH_ENV ENV MAIL MAILPATH
66387 66030 do eval test x\${$as_var+set} = xset \
66388 66031 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66389 66032 done
66390 66033 PS1='$ '
66391 66034 PS2='> '
66392 66035 PS4='+ '
66393 66036
66394 66037 # NLS nuisances.
66395 66038 LC_ALL=C
66396 66039 export LC_ALL
66397 66040 LANGUAGE=C
66398 66041 export LANGUAGE
66399 66042
66400 66043 # CDPATH.
66401 66044 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66402 66045
66403 66046
66404 66047 # as_fn_error STATUS ERROR [LINENO LOG_FD]
66405 66048 # ----------------------------------------
66406 66049 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66407 66050 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66408 66051 # script with STATUS, using 1 if that was 0.
66409 66052 as_fn_error ()
66410 66053 {
66411 66054 as_status=$1; test $as_status -eq 0 && as_status=1
66412 66055 if test "$4"; then
66413 66056 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66414 66057 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66415 66058 fi
66416 66059 $as_echo "$as_me: error: $2" >&2
66417 66060 as_fn_exit $as_status
66418 66061 } # as_fn_error
66419 66062
66420 66063
66421 66064 # as_fn_set_status STATUS
66422 66065 # -----------------------
66423 66066 # Set $? to STATUS, without forking.
66424 66067 as_fn_set_status ()
66425 66068 {
66426 66069 return $1
66427 66070 } # as_fn_set_status
66428 66071
66429 66072 # as_fn_exit STATUS
66430 66073 # -----------------
66431 66074 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66432 66075 as_fn_exit ()
66433 66076 {
66434 66077 set +e
66435 66078 as_fn_set_status $1
66436 66079 exit $1
66437 66080 } # as_fn_exit
66438 66081
66439 66082 # as_fn_unset VAR
66440 66083 # ---------------
66441 66084 # Portably unset VAR.
66442 66085 as_fn_unset ()
66443 66086 {
66444 66087 { eval $1=; unset $1;}
66445 66088 }
66446 66089 as_unset=as_fn_unset
66447 66090 # as_fn_append VAR VALUE
66448 66091 # ----------------------
66449 66092 # Append the text in VALUE to the end of the definition contained in VAR. Take
66450 66093 # advantage of any shell optimizations that allow amortized linear growth over
66451 66094 # repeated appends, instead of the typical quadratic growth present in naive
66452 66095 # implementations.
66453 66096 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66454 66097 eval 'as_fn_append ()
66455 66098 {
66456 66099 eval $1+=\$2
66457 66100 }'
66458 66101 else
66459 66102 as_fn_append ()
66460 66103 {
66461 66104 eval $1=\$$1\$2
66462 66105 }
66463 66106 fi # as_fn_append
66464 66107
66465 66108 # as_fn_arith ARG...
66466 66109 # ------------------
66467 66110 # Perform arithmetic evaluation on the ARGs, and store the result in the
66468 66111 # global $as_val. Take advantage of shells that can avoid forks. The arguments
66469 66112 # must be portable across $(()) and expr.
66470 66113 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66471 66114 eval 'as_fn_arith ()
66472 66115 {
66473 66116 as_val=$(( $* ))
66474 66117 }'
66475 66118 else
66476 66119 as_fn_arith ()
66477 66120 {
66478 66121 as_val=`expr "$@" || test $? -eq 1`
66479 66122 }
66480 66123 fi # as_fn_arith
66481 66124
66482 66125
66483 66126 if expr a : '\(a\)' >/dev/null 2>&1 &&
66484 66127 test "X`expr 00001 : '.*\(...\)'`" = X001; then
66485 66128 as_expr=expr
66486 66129 else
66487 66130 as_expr=false
66488 66131 fi
66489 66132
66490 66133 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66491 66134 as_basename=basename
66492 66135 else
66493 66136 as_basename=false
66494 66137 fi
66495 66138
66496 66139 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66497 66140 as_dirname=dirname
66498 66141 else
66499 66142 as_dirname=false
66500 66143 fi
66501 66144
66502 66145 as_me=`$as_basename -- "$0" ||
66503 66146 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66504 66147 X"$0" : 'X\(//\)$' \| \
66505 66148 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66506 66149 $as_echo X/"$0" |
66507 66150 sed '/^.*\/\([^/][^/]*\)\/*$/{
66508 66151 s//\1/
66509 66152 q
66510 66153 }
66511 66154 /^X\/\(\/\/\)$/{
66512 66155 s//\1/
66513 66156 q
66514 66157 }
66515 66158 /^X\/\(\/\).*/{
66516 66159 s//\1/
66517 66160 q
66518 66161 }
66519 66162 s/.*/./; q'`
66520 66163
66521 66164 # Avoid depending upon Character Ranges.
66522 66165 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66523 66166 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66524 66167 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66525 66168 as_cr_digits='0123456789'
66526 66169 as_cr_alnum=$as_cr_Letters$as_cr_digits
66527 66170
66528 66171 ECHO_C= ECHO_N= ECHO_T=
66529 66172 case `echo -n x` in #(((((
66530 66173 -n*)
66531 66174 case `echo 'xy\c'` in
66532 66175 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
66533 66176 xy) ECHO_C='\c';;
66534 66177 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
66535 66178 ECHO_T=' ';;
66536 66179 esac;;
66537 66180 *)
66538 66181 ECHO_N='-n';;
66539 66182 esac
66540 66183
66541 66184 rm -f conf$$ conf$$.exe conf$$.file
66542 66185 if test -d conf$$.dir; then
66543 66186 rm -f conf$$.dir/conf$$.file
66544 66187 else
66545 66188 rm -f conf$$.dir
66546 66189 mkdir conf$$.dir 2>/dev/null
66547 66190 fi
66548 66191 if (echo >conf$$.file) 2>/dev/null; then
66549 66192 if ln -s conf$$.file conf$$ 2>/dev/null; then
66550 66193 as_ln_s='ln -s'
66551 66194 # ... but there are two gotchas:
66552 66195 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66553 66196 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66554 66197 # In both cases, we have to default to `cp -pR'.
66555 66198 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66556 66199 as_ln_s='cp -pR'
66557 66200 elif ln conf$$.file conf$$ 2>/dev/null; then
66558 66201 as_ln_s=ln
66559 66202 else
66560 66203 as_ln_s='cp -pR'
66561 66204 fi
66562 66205 else
66563 66206 as_ln_s='cp -pR'
66564 66207 fi
66565 66208 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66566 66209 rmdir conf$$.dir 2>/dev/null
66567 66210
66568 66211
66569 66212 # as_fn_mkdir_p
66570 66213 # -------------
66571 66214 # Create "$as_dir" as a directory, including parents if necessary.
66572 66215 as_fn_mkdir_p ()
66573 66216 {
66574 66217
66575 66218 case $as_dir in #(
66576 66219 -*) as_dir=./$as_dir;;
66577 66220 esac
66578 66221 test -d "$as_dir" || eval $as_mkdir_p || {
66579 66222 as_dirs=
66580 66223 while :; do
66581 66224 case $as_dir in #(
66582 66225 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66583 66226 *) as_qdir=$as_dir;;
66584 66227 esac
66585 66228 as_dirs="'$as_qdir' $as_dirs"
66586 66229 as_dir=`$as_dirname -- "$as_dir" ||
66587 66230 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66588 66231 X"$as_dir" : 'X\(//\)[^/]' \| \
66589 66232 X"$as_dir" : 'X\(//\)$' \| \
66590 66233 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66591 66234 $as_echo X"$as_dir" |
66592 66235 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66593 66236 s//\1/
66594 66237 q
66595 66238 }
66596 66239 /^X\(\/\/\)[^/].*/{
66597 66240 s//\1/
66598 66241 q
66599 66242 }
66600 66243 /^X\(\/\/\)$/{
66601 66244 s//\1/
66602 66245 q
66603 66246 }
66604 66247 /^X\(\/\).*/{
66605 66248 s//\1/
66606 66249 q
66607 66250 }
66608 66251 s/.*/./; q'`
66609 66252 test -d "$as_dir" && break
66610 66253 done
66611 66254 test -z "$as_dirs" || eval "mkdir $as_dirs"
66612 66255 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66613 66256
66614 66257
66615 66258 } # as_fn_mkdir_p
66616 66259 if mkdir -p . 2>/dev/null; then
66617 66260 as_mkdir_p='mkdir -p "$as_dir"'
66618 66261 else
66619 66262 test -d ./-p && rmdir ./-p
66620 66263 as_mkdir_p=false
66621 66264 fi
66622 66265
66623 66266
66624 66267 # as_fn_executable_p FILE
66625 66268 # -----------------------
66626 66269 # Test if FILE is an executable regular file.
66627 66270 as_fn_executable_p ()
66628 66271 {
66629 66272 test -f "$1" && test -x "$1"
66630 66273 } # as_fn_executable_p
66631 66274 as_test_x='test -x'
66632 66275 as_executable_p=as_fn_executable_p
66633 66276
66634 66277 # Sed expression to map a string onto a valid CPP name.
66635 66278 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66636 66279
66637 66280 # Sed expression to map a string onto a valid variable name.
66638 66281 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66639 66282
66640 66283
66641 66284 exec 6>&1
66642 66285 ## ----------------------------------- ##
66643 66286 ## Main body of $CONFIG_STATUS script. ##
66644 66287 ## ----------------------------------- ##
66645 66288 _ASEOF
66646 66289 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66647 66290
66648 66291 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66649 66292 # Save the log message, to keep $0 and so on meaningful, and to
66650 66293 # report actual input values of CONFIG_FILES etc. instead of their
66651 66294 # values after options handling.
66652 66295 ac_log="
66653 66296 This file was extended by OpenJDK $as_me jdk9, which was
66654 66297 generated by GNU Autoconf 2.69. Invocation command line was
66655 66298
66656 66299 CONFIG_FILES = $CONFIG_FILES
66657 66300 CONFIG_HEADERS = $CONFIG_HEADERS
66658 66301 CONFIG_LINKS = $CONFIG_LINKS
66659 66302 CONFIG_COMMANDS = $CONFIG_COMMANDS
66660 66303 $ $0 $@
66661 66304
66662 66305 on `(hostname || uname -n) 2>/dev/null | sed 1q`
66663 66306 "
66664 66307
66665 66308 _ACEOF
66666 66309
66667 66310 case $ac_config_files in *"
66668 66311 "*) set x $ac_config_files; shift; ac_config_files=$*;;
66669 66312 esac
66670 66313
66671 66314
66672 66315
66673 66316 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66674 66317 # Files that config.status was made for.
66675 66318 config_files="$ac_config_files"
66676 66319
66677 66320 _ACEOF
66678 66321
66679 66322 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66680 66323 ac_cs_usage="\
66681 66324 \`$as_me' instantiates files and other configuration actions
66682 66325 from templates according to the current configuration. Unless the files
66683 66326 and actions are specified as TAGs, all are instantiated by default.
66684 66327
66685 66328 Usage: $0 [OPTION]... [TAG]...
66686 66329
66687 66330 -h, --help print this help, then exit
66688 66331 -V, --version print version number and configuration settings, then exit
66689 66332 --config print configuration, then exit
66690 66333 -q, --quiet, --silent
66691 66334 do not print progress messages
66692 66335 -d, --debug don't remove temporary files
66693 66336 --recheck update $as_me by reconfiguring in the same conditions
66694 66337 --file=FILE[:TEMPLATE]
66695 66338 instantiate the configuration file FILE
66696 66339
66697 66340 Configuration files:
66698 66341 $config_files
66699 66342
66700 66343 Report bugs to <build-dev@openjdk.java.net>.
66701 66344 OpenJDK home page: <http://openjdk.java.net>."
66702 66345
66703 66346 _ACEOF
66704 66347 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66705 66348 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66706 66349 ac_cs_version="\\
66707 66350 OpenJDK config.status jdk9
66708 66351 configured by $0, generated by GNU Autoconf 2.69,
66709 66352 with options \\"\$ac_cs_config\\"
66710 66353
66711 66354 Copyright (C) 2012 Free Software Foundation, Inc.
66712 66355 This config.status script is free software; the Free Software Foundation
66713 66356 gives unlimited permission to copy, distribute and modify it."
66714 66357
66715 66358 ac_pwd='$ac_pwd'
66716 66359 srcdir='$srcdir'
66717 66360 AWK='$AWK'
66718 66361 test -n "\$AWK" || AWK=awk
66719 66362 _ACEOF
66720 66363
66721 66364 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66722 66365 # The default lists apply if the user does not specify any file.
66723 66366 ac_need_defaults=:
66724 66367 while test $# != 0
66725 66368 do
66726 66369 case $1 in
66727 66370 --*=?*)
66728 66371 ac_option=`expr "X$1" : 'X\([^=]*\)='`
66729 66372 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66730 66373 ac_shift=:
66731 66374 ;;
66732 66375 --*=)
66733 66376 ac_option=`expr "X$1" : 'X\([^=]*\)='`
66734 66377 ac_optarg=
66735 66378 ac_shift=:
66736 66379 ;;
66737 66380 *)
66738 66381 ac_option=$1
66739 66382 ac_optarg=$2
66740 66383 ac_shift=shift
66741 66384 ;;
66742 66385 esac
66743 66386
66744 66387 case $ac_option in
66745 66388 # Handling of the options.
66746 66389 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66747 66390 ac_cs_recheck=: ;;
66748 66391 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66749 66392 $as_echo "$ac_cs_version"; exit ;;
66750 66393 --config | --confi | --conf | --con | --co | --c )
66751 66394 $as_echo "$ac_cs_config"; exit ;;
66752 66395 --debug | --debu | --deb | --de | --d | -d )
66753 66396 debug=: ;;
66754 66397 --file | --fil | --fi | --f )
66755 66398 $ac_shift
66756 66399 case $ac_optarg in
66757 66400 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66758 66401 '') as_fn_error $? "missing file argument" ;;
66759 66402 esac
66760 66403 as_fn_append CONFIG_FILES " '$ac_optarg'"
66761 66404 ac_need_defaults=false;;
66762 66405 --he | --h | --help | --hel | -h )
66763 66406 $as_echo "$ac_cs_usage"; exit ;;
66764 66407 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66765 66408 | -silent | --silent | --silen | --sile | --sil | --si | --s)
66766 66409 ac_cs_silent=: ;;
66767 66410
66768 66411 # This is an error.
66769 66412 -*) as_fn_error $? "unrecognized option: \`$1'
66770 66413 Try \`$0 --help' for more information." ;;
66771 66414
66772 66415 *) as_fn_append ac_config_targets " $1"
66773 66416 ac_need_defaults=false ;;
66774 66417
66775 66418 esac
66776 66419 shift
66777 66420 done
66778 66421
66779 66422 ac_configure_extra_args=
66780 66423
66781 66424 if $ac_cs_silent; then
66782 66425 exec 6>/dev/null
66783 66426 ac_configure_extra_args="$ac_configure_extra_args --silent"
66784 66427 fi
66785 66428
66786 66429 _ACEOF
66787 66430 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66788 66431 if \$ac_cs_recheck; then
66789 66432 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66790 66433 shift
66791 66434 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66792 66435 CONFIG_SHELL='$SHELL'
66793 66436 export CONFIG_SHELL
66794 66437 exec "\$@"
66795 66438 fi
66796 66439
66797 66440 _ACEOF
66798 66441 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66799 66442 exec 5>>config.log
66800 66443 {
66801 66444 echo
66802 66445 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66803 66446 ## Running $as_me. ##
66804 66447 _ASBOX
66805 66448 $as_echo "$ac_log"
66806 66449 } >&5
66807 66450
66808 66451 _ACEOF
66809 66452 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66810 66453 _ACEOF
66811 66454
66812 66455 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66813 66456
66814 66457 # Handling of arguments.
66815 66458 for ac_config_target in $ac_config_targets
66816 66459 do
66817 66460 case $ac_config_target in
66818 66461 "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66819 66462 "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66820 66463 "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66821 66464 "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66822 66465 "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66823 66466
66824 66467 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66825 66468 esac
66826 66469 done
66827 66470
66828 66471
66829 66472 # If the user did not use the arguments to specify the items to instantiate,
66830 66473 # then the envvar interface is used. Set only those that are not.
66831 66474 # We use the long form for the default assignment because of an extremely
66832 66475 # bizarre bug on SunOS 4.1.3.
66833 66476 if $ac_need_defaults; then
66834 66477 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66835 66478 fi
66836 66479
66837 66480 # Have a temporary directory for convenience. Make it in the build tree
66838 66481 # simply because there is no reason against having it here, and in addition,
66839 66482 # creating and moving files from /tmp can sometimes cause problems.
66840 66483 # Hook for its removal unless debugging.
66841 66484 # Note that there is a small window in which the directory will not be cleaned:
66842 66485 # after its creation but before its name has been assigned to `$tmp'.
66843 66486 $debug ||
66844 66487 {
66845 66488 tmp= ac_tmp=
66846 66489 trap 'exit_status=$?
66847 66490 : "${ac_tmp:=$tmp}"
66848 66491 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66849 66492 ' 0
66850 66493 trap 'as_fn_exit 1' 1 2 13 15
66851 66494 }
66852 66495 # Create a (secure) tmp directory for tmp files.
66853 66496
66854 66497 {
66855 66498 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66856 66499 test -d "$tmp"
66857 66500 } ||
66858 66501 {
66859 66502 tmp=./conf$$-$RANDOM
66860 66503 (umask 077 && mkdir "$tmp")
66861 66504 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66862 66505 ac_tmp=$tmp
66863 66506
66864 66507 # Set up the scripts for CONFIG_FILES section.
66865 66508 # No need to generate them if there are no CONFIG_FILES.
66866 66509 # This happens for instance with `./config.status config.h'.
66867 66510 if test -n "$CONFIG_FILES"; then
66868 66511
66869 66512
66870 66513 ac_cr=`echo X | tr X '\015'`
66871 66514 # On cygwin, bash can eat \r inside `` if the user requested igncr.
66872 66515 # But we know of no other shell where ac_cr would be empty at this
66873 66516 # point, so we can use a bashism as a fallback.
66874 66517 if test "x$ac_cr" = x; then
66875 66518 eval ac_cr=\$\'\\r\'
66876 66519 fi
66877 66520 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66878 66521 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66879 66522 ac_cs_awk_cr='\\r'
66880 66523 else
66881 66524 ac_cs_awk_cr=$ac_cr
66882 66525 fi
66883 66526
66884 66527 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66885 66528 _ACEOF
66886 66529
66887 66530
66888 66531 {
66889 66532 echo "cat >conf$$subs.awk <<_ACEOF" &&
66890 66533 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66891 66534 echo "_ACEOF"
66892 66535 } >conf$$subs.sh ||
66893 66536 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66894 66537 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66895 66538 ac_delim='%!_!# '
66896 66539 for ac_last_try in false false false false false :; do
66897 66540 . ./conf$$subs.sh ||
66898 66541 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66899 66542
66900 66543 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66901 66544 if test $ac_delim_n = $ac_delim_num; then
66902 66545 break
66903 66546 elif $ac_last_try; then
66904 66547 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66905 66548 else
66906 66549 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66907 66550 fi
66908 66551 done
66909 66552 rm -f conf$$subs.sh
66910 66553
66911 66554 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66912 66555 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66913 66556 _ACEOF
66914 66557 sed -n '
66915 66558 h
66916 66559 s/^/S["/; s/!.*/"]=/
66917 66560 p
66918 66561 g
66919 66562 s/^[^!]*!//
66920 66563 :repl
66921 66564 t repl
66922 66565 s/'"$ac_delim"'$//
66923 66566 t delim
66924 66567 :nl
66925 66568 h
66926 66569 s/\(.\{148\}\)..*/\1/
66927 66570 t more1
66928 66571 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66929 66572 p
66930 66573 n
66931 66574 b repl
66932 66575 :more1
66933 66576 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66934 66577 p
66935 66578 g
66936 66579 s/.\{148\}//
66937 66580 t nl
66938 66581 :delim
66939 66582 h
66940 66583 s/\(.\{148\}\)..*/\1/
66941 66584 t more2
66942 66585 s/["\\]/\\&/g; s/^/"/; s/$/"/
66943 66586 p
66944 66587 b
66945 66588 :more2
66946 66589 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66947 66590 p
66948 66591 g
66949 66592 s/.\{148\}//
66950 66593 t delim
66951 66594 ' <conf$$subs.awk | sed '
66952 66595 /^[^""]/{
66953 66596 N
66954 66597 s/\n//
66955 66598 }
66956 66599 ' >>$CONFIG_STATUS || ac_write_fail=1
66957 66600 rm -f conf$$subs.awk
66958 66601 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66959 66602 _ACAWK
66960 66603 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66961 66604 for (key in S) S_is_set[key] = 1
66962 66605 FS = ""
66963 66606
66964 66607 }
66965 66608 {
66966 66609 line = $ 0
66967 66610 nfields = split(line, field, "@")
66968 66611 substed = 0
66969 66612 len = length(field[1])
66970 66613 for (i = 2; i < nfields; i++) {
66971 66614 key = field[i]
66972 66615 keylen = length(key)
66973 66616 if (S_is_set[key]) {
66974 66617 value = S[key]
66975 66618 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66976 66619 len += length(value) + length(field[++i])
66977 66620 substed = 1
66978 66621 } else
66979 66622 len += 1 + keylen
66980 66623 }
66981 66624
66982 66625 print line
66983 66626 }
66984 66627
66985 66628 _ACAWK
66986 66629 _ACEOF
66987 66630 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66988 66631 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66989 66632 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66990 66633 else
66991 66634 cat
66992 66635 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66993 66636 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66994 66637 _ACEOF
66995 66638
66996 66639 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66997 66640 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66998 66641 # trailing colons and then remove the whole line if VPATH becomes empty
66999 66642 # (actually we leave an empty line to preserve line numbers).
67000 66643 if test "x$srcdir" = x.; then
67001 66644 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
67002 66645 h
67003 66646 s///
67004 66647 s/^/:/
67005 66648 s/[ ]*$/:/
67006 66649 s/:\$(srcdir):/:/g
67007 66650 s/:\${srcdir}:/:/g
67008 66651 s/:@srcdir@:/:/g
67009 66652 s/^:*//
67010 66653 s/:*$//
67011 66654 x
67012 66655 s/\(=[ ]*\).*/\1/
67013 66656 G
67014 66657 s/\n//
67015 66658 s/^[^=]*=[ ]*$//
67016 66659 }'
67017 66660 fi
67018 66661
67019 66662 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67020 66663 fi # test -n "$CONFIG_FILES"
67021 66664
67022 66665
67023 66666 eval set X " :F $CONFIG_FILES "
67024 66667 shift
67025 66668 for ac_tag
67026 66669 do
67027 66670 case $ac_tag in
67028 66671 :[FHLC]) ac_mode=$ac_tag; continue;;
67029 66672 esac
67030 66673 case $ac_mode$ac_tag in
67031 66674 :[FHL]*:*);;
67032 66675 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67033 66676 :[FH]-) ac_tag=-:-;;
67034 66677 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67035 66678 esac
67036 66679 ac_save_IFS=$IFS
67037 66680 IFS=:
67038 66681 set x $ac_tag
67039 66682 IFS=$ac_save_IFS
67040 66683 shift
67041 66684 ac_file=$1
67042 66685 shift
67043 66686
67044 66687 case $ac_mode in
67045 66688 :L) ac_source=$1;;
67046 66689 :[FH])
67047 66690 ac_file_inputs=
67048 66691 for ac_f
67049 66692 do
67050 66693 case $ac_f in
67051 66694 -) ac_f="$ac_tmp/stdin";;
67052 66695 *) # Look for the file first in the build tree, then in the source tree
67053 66696 # (if the path is not absolute). The absolute path cannot be DOS-style,
67054 66697 # because $ac_f cannot contain `:'.
67055 66698 test -f "$ac_f" ||
67056 66699 case $ac_f in
67057 66700 [\\/$]*) false;;
67058 66701 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67059 66702 esac ||
67060 66703 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67061 66704 esac
67062 66705 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67063 66706 as_fn_append ac_file_inputs " '$ac_f'"
67064 66707 done
67065 66708
67066 66709 # Let's still pretend it is `configure' which instantiates (i.e., don't
67067 66710 # use $as_me), people would be surprised to read:
67068 66711 # /* config.h. Generated by config.status. */
67069 66712 configure_input='Generated from '`
67070 66713 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67071 66714 `' by configure.'
67072 66715 if test x"$ac_file" != x-; then
67073 66716 configure_input="$ac_file. $configure_input"
67074 66717 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67075 66718 $as_echo "$as_me: creating $ac_file" >&6;}
67076 66719 fi
67077 66720 # Neutralize special characters interpreted by sed in replacement strings.
67078 66721 case $configure_input in #(
67079 66722 *\&* | *\|* | *\\* )
67080 66723 ac_sed_conf_input=`$as_echo "$configure_input" |
67081 66724 sed 's/[\\\\&|]/\\\\&/g'`;; #(
67082 66725 *) ac_sed_conf_input=$configure_input;;
67083 66726 esac
67084 66727
67085 66728 case $ac_tag in
67086 66729 *:-:* | *:-) cat >"$ac_tmp/stdin" \
67087 66730 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67088 66731 esac
67089 66732 ;;
67090 66733 esac
67091 66734
67092 66735 ac_dir=`$as_dirname -- "$ac_file" ||
67093 66736 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67094 66737 X"$ac_file" : 'X\(//\)[^/]' \| \
67095 66738 X"$ac_file" : 'X\(//\)$' \| \
67096 66739 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67097 66740 $as_echo X"$ac_file" |
67098 66741 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67099 66742 s//\1/
67100 66743 q
67101 66744 }
67102 66745 /^X\(\/\/\)[^/].*/{
67103 66746 s//\1/
67104 66747 q
67105 66748 }
67106 66749 /^X\(\/\/\)$/{
67107 66750 s//\1/
67108 66751 q
67109 66752 }
67110 66753 /^X\(\/\).*/{
67111 66754 s//\1/
67112 66755 q
67113 66756 }
67114 66757 s/.*/./; q'`
67115 66758 as_dir="$ac_dir"; as_fn_mkdir_p
67116 66759 ac_builddir=.
67117 66760
67118 66761 case "$ac_dir" in
67119 66762 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67120 66763 *)
67121 66764 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67122 66765 # A ".." for each directory in $ac_dir_suffix.
67123 66766 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67124 66767 case $ac_top_builddir_sub in
67125 66768 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67126 66769 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67127 66770 esac ;;
67128 66771 esac
67129 66772 ac_abs_top_builddir=$ac_pwd
67130 66773 ac_abs_builddir=$ac_pwd$ac_dir_suffix
67131 66774 # for backward compatibility:
67132 66775 ac_top_builddir=$ac_top_build_prefix
67133 66776
67134 66777 case $srcdir in
67135 66778 .) # We are building in place.
67136 66779 ac_srcdir=.
67137 66780 ac_top_srcdir=$ac_top_builddir_sub
67138 66781 ac_abs_top_srcdir=$ac_pwd ;;
67139 66782 [\\/]* | ?:[\\/]* ) # Absolute name.
67140 66783 ac_srcdir=$srcdir$ac_dir_suffix;
67141 66784 ac_top_srcdir=$srcdir
67142 66785 ac_abs_top_srcdir=$srcdir ;;
67143 66786 *) # Relative name.
67144 66787 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67145 66788 ac_top_srcdir=$ac_top_build_prefix$srcdir
67146 66789 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67147 66790 esac
67148 66791 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67149 66792
67150 66793
67151 66794 case $ac_mode in
67152 66795 :F)
67153 66796 #
67154 66797 # CONFIG_FILE
67155 66798 #
67156 66799
67157 66800 _ACEOF
67158 66801
67159 66802 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67160 66803 # If the template does not know about datarootdir, expand it.
67161 66804 # FIXME: This hack should be removed a few years after 2.60.
67162 66805 ac_datarootdir_hack=; ac_datarootdir_seen=
67163 66806 ac_sed_dataroot='
67164 66807 /datarootdir/ {
67165 66808 p
67166 66809 q
67167 66810 }
67168 66811 /@datadir@/p
67169 66812 /@docdir@/p
67170 66813 /@infodir@/p
67171 66814 /@localedir@/p
67172 66815 /@mandir@/p'
67173 66816 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67174 66817 *datarootdir*) ac_datarootdir_seen=yes;;
67175 66818 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67176 66819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67177 66820 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67178 66821 _ACEOF
67179 66822 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67180 66823 ac_datarootdir_hack='
67181 66824 s&@datadir@&$datadir&g
67182 66825 s&@docdir@&$docdir&g
67183 66826 s&@infodir@&$infodir&g
67184 66827 s&@localedir@&$localedir&g
67185 66828 s&@mandir@&$mandir&g
67186 66829 s&\\\${datarootdir}&$datarootdir&g' ;;
67187 66830 esac
67188 66831 _ACEOF
67189 66832
67190 66833 # Neutralize VPATH when `$srcdir' = `.'.
67191 66834 # Shell code in configure.ac might set extrasub.
67192 66835 # FIXME: do we really want to maintain this feature?
67193 66836 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67194 66837 ac_sed_extra="$ac_vpsub
67195 66838 $extrasub
67196 66839 _ACEOF
67197 66840 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67198 66841 :t
67199 66842 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67200 66843 s|@configure_input@|$ac_sed_conf_input|;t t
67201 66844 s&@top_builddir@&$ac_top_builddir_sub&;t t
67202 66845 s&@top_build_prefix@&$ac_top_build_prefix&;t t
67203 66846 s&@srcdir@&$ac_srcdir&;t t
67204 66847 s&@abs_srcdir@&$ac_abs_srcdir&;t t
67205 66848 s&@top_srcdir@&$ac_top_srcdir&;t t
67206 66849 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67207 66850 s&@builddir@&$ac_builddir&;t t
67208 66851 s&@abs_builddir@&$ac_abs_builddir&;t t
67209 66852 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67210 66853 $ac_datarootdir_hack
67211 66854 "
67212 66855 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67213 66856 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67214 66857
67215 66858 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67216 66859 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67217 66860 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
67218 66861 "$ac_tmp/out"`; test -z "$ac_out"; } &&
67219 66862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67220 66863 which seems to be undefined. Please make sure it is defined" >&5
67221 66864 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67222 66865 which seems to be undefined. Please make sure it is defined" >&2;}
67223 66866
67224 66867 rm -f "$ac_tmp/stdin"
67225 66868 case $ac_file in
67226 66869 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67227 66870 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67228 66871 esac \
67229 66872 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67230 66873 ;;
67231 66874
67232 66875
67233 66876
67234 66877 esac
67235 66878
67236 66879 done # for ac_tag
67237 66880
67238 66881
67239 66882 as_fn_exit 0
67240 66883 _ACEOF
67241 66884 ac_clean_files=$ac_clean_files_save
67242 66885
67243 66886 test $ac_write_fail = 0 ||
67244 66887 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67245 66888
67246 66889
67247 66890 # configure is writing to config.log, and then calls config.status.
67248 66891 # config.status does its own redirection, appending to config.log.
67249 66892 # Unfortunately, on DOS this fails, as config.log is still kept open
67250 66893 # by configure, so config.status won't be able to write to it; its
67251 66894 # output is simply discarded. So we exec the FD to /dev/null,
67252 66895 # effectively closing config.log, so it can be properly (re)opened and
67253 66896 # appended to by config.status. When coming back to configure, we
67254 66897 # need to make the FD available again.
67255 66898 if test "$no_create" != yes; then
67256 66899 ac_cs_success=:
67257 66900 ac_config_status_args=
67258 66901 test "$silent" = yes &&
67259 66902 ac_config_status_args="$ac_config_status_args --quiet"
67260 66903 exec 5>/dev/null
67261 66904 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67262 66905 exec 5>>config.log
67263 66906 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67264 66907 # would make configure fail if this is the last instruction.
67265 66908 $ac_cs_success || as_fn_exit 1
67266 66909 fi
67267 66910 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67268 66911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67269 66912 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67270 66913 fi
67271 66914
67272 66915
67273 66916 # After AC_OUTPUT, we need to do final work
67274 66917
67275 66918
67276 66919 # Try to move config.log (generated by autoconf) to the configure-support directory.
67277 66920 if test -e ./config.log; then
67278 66921 $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67279 66922 fi
67280 66923
67281 66924 # Rotate our log file (configure.log)
67282 66925 if test -e "$OUTPUT_ROOT/configure.log.old"; then
67283 66926 $RM -f "$OUTPUT_ROOT/configure.log.old"
67284 66927 fi
67285 66928 if test -e "$OUTPUT_ROOT/configure.log"; then
67286 66929 $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67287 66930 fi
67288 66931
67289 66932 # Move configure.log from current directory to the build output root
67290 66933 if test -e ./configure.log; then
67291 66934 $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67292 66935 fi
67293 66936
67294 66937 # Make the compare script executable
67295 66938 $CHMOD +x $OUTPUT_ROOT/compare.sh
67296 66939
67297 66940
67298 66941 # Finally output some useful information to the user
67299 66942
67300 66943 # Finally output some useful information to the user
67301 66944
67302 66945 printf "\n"
67303 66946 printf "====================================================\n"
67304 66947 if test "x$no_create" != "xyes"; then
67305 66948 if test "x$IS_RECONFIGURE" != "xyes"; then
67306 66949 printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67307 66950 else
67308 66951 printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67309 66952 fi
67310 66953 else
67311 66954 if test "x$IS_RECONFIGURE" != "xyes"; then
67312 66955 printf "A configuration has been successfully checked but not created\n"
67313 66956 else
67314 66957 printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67315 66958 fi
67316 66959 fi
67317 66960 if test "x$CONFIGURE_COMMAND_LINE" != x; then
67318 66961 printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67319 66962 else
67320 66963 printf "using default settings.\n"
67321 66964 fi
67322 66965
67323 66966 printf "\n"
67324 66967 printf "Configuration summary:\n"
67325 66968 printf "* Debug level: $DEBUG_LEVEL\n"
67326 66969 printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67327 66970 printf "* JDK variant: $JDK_VARIANT\n"
67328 66971 printf "* JVM variants: $JVM_VARIANTS\n"
67329 66972 printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67330 66973 printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67331 66974
67332 66975 printf "\n"
67333 66976 printf "Tools summary:\n"
67334 66977 if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67335 66978 printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67336 66979 fi
67337 66980 printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67338 66981 if test "x$TOOLCHAIN_VERSION" != "x"; then
67339 66982 print_version=" $TOOLCHAIN_VERSION"
67340 66983 fi
67341 66984 printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67342 66985 printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
67343 66986 printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
67344 66987
67345 66988 printf "\n"
67346 66989 printf "Build performance summary:\n"
67347 66990 printf "* Cores to use: $JOBS\n"
67348 66991 printf "* Memory limit: $MEMORY_SIZE MB\n"
67349 66992 if test "x$CCACHE_STATUS" != "x"; then
67350 66993 printf "* ccache status: $CCACHE_STATUS\n"
67351 66994 fi
67352 66995 printf "\n"
67353 66996
67354 66997 if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67355 66998 printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67356 66999 printf "will result in longer build times.\n"
67357 67000 printf "\n"
67358 67001 fi
67359 67002
67360 67003 if test "x$FOUND_ALT_VARIABLES" != "x"; then
67361 67004 printf "WARNING: You have old-style ALT_ environment variables set.\n"
67362 67005 printf "These are not respected, and will be ignored. It is recommended\n"
67363 67006 printf "that you clean your environment. The following variables are set:\n"
67364 67007 printf "$FOUND_ALT_VARIABLES\n"
67365 67008 printf "\n"
67366 67009 fi
67367 67010
67368 67011 if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67369 67012 printf "WARNING: Your build output directory is not on a local disk.\n"
67370 67013 printf "This will severely degrade build performance!\n"
67371 67014 printf "It is recommended that you create an output directory on a local disk,\n"
67372 67015 printf "and run the configure script again from that directory.\n"
67373 67016 printf "\n"
67374 67017 fi
67375 67018
67376 67019 if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67377 67020 printf "WARNING: The result of this configuration has overridden an older\n"
67378 67021 printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67379 67022 printf "proper build. Failure to do so might result in strange build problems.\n"
67380 67023 printf "\n"
67381 67024 fi
67382 67025
67383 67026 if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67384 67027 printf "WARNING: The result of this configuration was not saved.\n"
67385 67028 printf "You should run without '--no-create | -n' to create the configuration.\n"
67386 67029 printf "\n"
67387 67030 fi
67388 67031
67389 67032
67390 67033
67391 67034 # Locate config.log.
67392 67035 if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67393 67036 CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67394 67037 elif test -e "./config.log"; then
67395 67038 CONFIG_LOG_PATH="."
67396 67039 fi
67397 67040
67398 67041 if test -e "$CONFIG_LOG_PATH/config.log"; then
67399 67042 $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67400 67043 if test $? -eq 0; then
67401 67044 printf "The following warnings were produced. Repeated here for convenience:\n"
67402 67045 # We must quote sed expression (using []) to stop m4 from eating the [].
67403 67046 $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e 's/^configure:[0-9]*: //'
67404 67047 printf "\n"
67405 67048 fi
67406 67049 fi
67407 67050
↓ open down ↓ |
5893 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX