Debian Codegraph @

configure

raw
1 #! /bin/sh
2
3 if test -e '.git' ; then :
4 if test -z "$ac_read_git_config" ; then :
5 extra_args=$(git config ocaml.configure 2>/dev/null)
6 extended_cache=$(git config ocaml.configure-cache 2>/dev/null)
7 cache_file=
8
9 # If ocaml.configure-cache is set, parse the command-line for the --host
10 # option, in order to determine the name of the cache file.
11 if test -n "$extended_cache" ; then :
12 echo "Detected Git configuration option ocaml.configure-cache set to \
13 \"$extended_cache\""
14 dashdash=
15 prev=
16 host=default
17 # The logic here is pretty borrowed from autoconf's
18 for option in $extra_args "$@"
19 do
20 if test -n "$prev" ; then :
21 host=$option
22 continue
23 fi
24
25 case $dashdash$option in
26 --)
27 dashdash=yes ;;
28 -host | --host | --hos | --ho)
29 prev=host ;;
30 -host=* | --host=* | --hos=* | --ho=*)
31 case $option in
32 *=?*) host=$(expr "X$option" : '[^=]*=\(.*\)') ;;
33 *=) host= ;;
34 esac ;;
35 esac
36 done
37 cache_file="`dirname "$0"`/$extended_cache/ocaml-$host.cache"
38 fi
39
40 # If either option has a value, re-invoke configure
41 if test -n "$extra_args$cache_file" ; then :
42 echo "Detected Git configuration option ocaml.configure set to \
43 \"$extra_args\""
44 # Too much effort to get the echo to show appropriate quoting - the
45 # invocation itself intentionally quotes $0 and passes $@ exactly as given
46 # but allows a single expansion of ocaml.configure
47 if test -n "$cache_file" ; then :
48 echo "Re-running $0 $extra_args --cache-file \"$cache_file\" $@"
49 ac_read_git_config=true exec "$0" $extra_args \
50 --cache-file "$cache_file" "$@"
51 else
52 echo "Re-running $0 $extra_args $@"
53 ac_read_git_config=true exec "$0" $extra_args "$@"
54 fi
55 fi
56 fi
57 fi
58 # Guess values for system-dependent variables and create Makefiles.
59 # Generated by GNU Autoconf 2.71 for OCaml 5.4.1.
60 #
61 # Report bugs to <[email protected]>.
62 #
63 #
64 # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
65 # Inc.
66 #
67 #
68 # This configure script is free software; the Free Software Foundation
69 # gives unlimited permission to copy, distribute and modify it.
70 ## -------------------- ##
71 ## M4sh Initialization. ##
72 ## -------------------- ##
73
74 # Be more Bourne compatible
75 DUALCASE=1; export DUALCASE # for MKS sh
76 as_nop=:
77 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
78 then :
79 emulate sh
80 NULLCMD=:
81 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
82 # is contrary to our usage. Disable this feature.
83 alias -g '${1+"$@"}'='"$@"'
84 setopt NO_GLOB_SUBST
85 else $as_nop
86 case `(set -o) 2>/dev/null` in #(
87 *posix*) :
88 set -o posix ;; #(
89 *) :
90 ;;
91 esac
92 fi
93
94
95
96 # Reset variables that may have inherited troublesome values from
97 # the environment.
98
99 # IFS needs to be set, to space, tab, and newline, in precisely that order.
100 # (If _AS_PATH_WALK were called with IFS unset, it would have the
101 # side effect of setting IFS to empty, thus disabling word splitting.)
102 # Quoting is to prevent editors from complaining about space-tab.
103 as_nl='
104 '
105 export as_nl
106 IFS=" "" $as_nl"
107
108 PS1='$ '
109 PS2='> '
110 PS4='+ '
111
112 # Ensure predictable behavior from utilities with locale-dependent output.
113 LC_ALL=C
114 export LC_ALL
115 LANGUAGE=C
116 export LANGUAGE
117
118 # We cannot yet rely on "unset" to work, but we need these variables
119 # to be unset--not just set to an empty or harmless value--now, to
120 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
121 # also avoids known problems related to "unset" and subshell syntax
122 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
123 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
124 do eval test \${$as_var+y} \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
126 done
127
128 # Ensure that fds 0, 1, and 2 are open.
129 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
130 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
131 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
132
133 # The user is always right.
134 if ${PATH_SEPARATOR+false} :; then
135 PATH_SEPARATOR=:
136 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
137 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
138 PATH_SEPARATOR=';'
139 }
140 fi
141
142
143 # Find who we are. Look in the path if we contain no directory separator.
144 as_myself=
145 case $0 in #((
146 *[\\/]* ) as_myself=$0 ;;
147 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
148 for as_dir in $PATH
149 do
150 IFS=$as_save_IFS
151 case $as_dir in #(((
152 '') as_dir=./ ;;
153 */) ;;
154 *) as_dir=$as_dir/ ;;
155 esac
156 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
157 done
158 IFS=$as_save_IFS
159
160 ;;
161 esac
162 # We did not find ourselves, most probably we were run as `sh COMMAND'
163 # in which case we are not to be found in the path.
164 if test "x$as_myself" = x; then
165 as_myself=$0
166 fi
167 if test ! -f "$as_myself"; then
168 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
169 exit 1
170 fi
171
172
173 # Use a proper internal environment variable to ensure we don't fall
174 # into an infinite loop, continuously re-executing ourselves.
175 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
176 _as_can_reexec=no; export _as_can_reexec;
177 # We cannot yet assume a decent shell, so we have to provide a
178 # neutralization value for shells without unset; and this also
179 # works around shells that cannot unset nonexistent variables.
180 # Preserve -v and -x to the replacement shell.
181 BASH_ENV=/dev/null
182 ENV=/dev/null
183 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
184 case $- in # ((((
185 *v*x* | *x*v* ) as_opts=-vx ;;
186 *v* ) as_opts=-v ;;
187 *x* ) as_opts=-x ;;
188 * ) as_opts= ;;
189 esac
190 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
191 # Admittedly, this is quite paranoid, since all the known shells bail
192 # out after a failed `exec'.
193 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
194 exit 255
195 fi
196 # We don't want this to propagate to other subprocesses.
197 { _as_can_reexec=; unset _as_can_reexec;}
198 if test "x$CONFIG_SHELL" = x; then
199 as_bourne_compatible="as_nop=:
200 if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
201 then :
202 emulate sh
203 NULLCMD=:
204 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
205 # is contrary to our usage. Disable this feature.
206 alias -g '\${1+\"\$@\"}'='\"\$@\"'
207 setopt NO_GLOB_SUBST
208 else \$as_nop
209 case \`(set -o) 2>/dev/null\` in #(
210 *posix*) :
211 set -o posix ;; #(
212 *) :
213 ;;
214 esac
215 fi
216 "
217 as_required="as_fn_return () { (exit \$1); }
218 as_fn_success () { as_fn_return 0; }
219 as_fn_failure () { as_fn_return 1; }
220 as_fn_ret_success () { return 0; }
221 as_fn_ret_failure () { return 1; }
222
223 exitcode=0
224 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
225 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
226 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
227 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
228 if ( set x; as_fn_ret_success y && test x = \"\$1\" )
229 then :
230
231 else \$as_nop
232 exitcode=1; echo positional parameters were not saved.
233 fi
234 test x\$exitcode = x0 || exit 1
235 blah=\$(echo \$(echo blah))
236 test x\"\$blah\" = xblah || exit 1
237 test -x / || exit 1"
238 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
239 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
240 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
241 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
242
243 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || (
244 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
245 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
246 ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO
247 PATH=/empty FPATH=/empty; export PATH FPATH
248 test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\
249 || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1
250 test \$(( 1 + 1 )) = 2 || exit 1"
251 if (eval "$as_required") 2>/dev/null
252 then :
253 as_have_required=yes
254 else $as_nop
255 as_have_required=no
256 fi
257 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null
258 then :
259
260 else $as_nop
261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
262 as_found=false
263 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
264 do
265 IFS=$as_save_IFS
266 case $as_dir in #(((
267 '') as_dir=./ ;;
268 */) ;;
269 *) as_dir=$as_dir/ ;;
270 esac
271 as_found=:
272 case $as_dir in #(
273 /*)
274 for as_base in sh bash ksh sh5; do
275 # Try only shells that exist, to save several forks.
276 as_shell=$as_dir$as_base
277 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
278 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null
279 then :
280 CONFIG_SHELL=$as_shell as_have_required=yes
281 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null
282 then :
283 break 2
284 fi
285 fi
286 done;;
287 esac
288 as_found=false
289 done
290 IFS=$as_save_IFS
291 if $as_found
292 then :
293
294 else $as_nop
295 if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
296 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null
297 then :
298 CONFIG_SHELL=$SHELL as_have_required=yes
299 fi
300 fi
301
302
303 if test "x$CONFIG_SHELL" != x
304 then :
305 export CONFIG_SHELL
306 # We cannot yet assume a decent shell, so we have to provide a
307 # neutralization value for shells without unset; and this also
308 # works around shells that cannot unset nonexistent variables.
309 # Preserve -v and -x to the replacement shell.
310 BASH_ENV=/dev/null
311 ENV=/dev/null
312 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
313 case $- in # ((((
314 *v*x* | *x*v* ) as_opts=-vx ;;
315 *v* ) as_opts=-v ;;
316 *x* ) as_opts=-x ;;
317 * ) as_opts= ;;
318 esac
319 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
320 # Admittedly, this is quite paranoid, since all the known shells bail
321 # out after a failed `exec'.
322 printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2
323 exit 255
324 fi
325
326 if test x$as_have_required = xno
327 then :
328 printf "%s\n" "$0: This script requires a shell more modern than all"
329 printf "%s\n" "$0: the shells that I found on your system."
330 if test ${ZSH_VERSION+y} ; then
331 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should"
332 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later."
333 else
334 printf "%s\n" "$0: Please tell [email protected] and [email protected]
335 $0: about your system, including any error possibly output
336 $0: before this message. Then install a modern shell, or
337 $0: manually run the script under such a shell if you do
338 $0: have one."
339 fi
340 exit 1
341 fi
342 fi
343 fi
344 SHELL=${CONFIG_SHELL-/bin/sh}
345 export SHELL
346 # Unset more variables known to interfere with behavior of common tools.
347 CLICOLOR_FORCE= GREP_OPTIONS=
348 unset CLICOLOR_FORCE GREP_OPTIONS
349
350 ## --------------------- ##
351 ## M4sh Shell Functions. ##
352 ## --------------------- ##
353 # as_fn_unset VAR
354 # ---------------
355 # Portably unset VAR.
356 as_fn_unset ()
357 {
358 { eval $1=; unset $1;}
359 }
360 as_unset=as_fn_unset
361
362
363 # as_fn_set_status STATUS
364 # -----------------------
365 # Set $? to STATUS, without forking.
366 as_fn_set_status ()
367 {
368 return $1
369 } # as_fn_set_status
370
371 # as_fn_exit STATUS
372 # -----------------
373 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
374 as_fn_exit ()
375 {
376 set +e
377 as_fn_set_status $1
378 exit $1
379 } # as_fn_exit
380 # as_fn_nop
381 # ---------
382 # Do nothing but, unlike ":", preserve the value of $?.
383 as_fn_nop ()
384 {
385 return $?
386 }
387 as_nop=as_fn_nop
388
389 # as_fn_mkdir_p
390 # -------------
391 # Create "$as_dir" as a directory, including parents if necessary.
392 as_fn_mkdir_p ()
393 {
394
395 case $as_dir in #(
396 -*) as_dir=./$as_dir;;
397 esac
398 test -d "$as_dir" || eval $as_mkdir_p || {
399 as_dirs=
400 while :; do
401 case $as_dir in #(
402 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
403 *) as_qdir=$as_dir;;
404 esac
405 as_dirs="'$as_qdir' $as_dirs"
406 as_dir=`$as_dirname -- "$as_dir" ||
407 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
408 X"$as_dir" : 'X\(//\)[^/]' \| \
409 X"$as_dir" : 'X\(//\)$' \| \
410 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
411 printf "%s\n" X"$as_dir" |
412 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
413 s//\1/
414 q
415 }
416 /^X\(\/\/\)[^/].*/{
417 s//\1/
418 q
419 }
420 /^X\(\/\/\)$/{
421 s//\1/
422 q
423 }
424 /^X\(\/\).*/{
425 s//\1/
426 q
427 }
428 s/.*/./; q'`
429 test -d "$as_dir" && break
430 done
431 test -z "$as_dirs" || eval "mkdir $as_dirs"
432 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
433
434
435 } # as_fn_mkdir_p
436
437 # as_fn_executable_p FILE
438 # -----------------------
439 # Test if FILE is an executable regular file.
440 as_fn_executable_p ()
441 {
442 test -f "$1" && test -x "$1"
443 } # as_fn_executable_p
444 # as_fn_append VAR VALUE
445 # ----------------------
446 # Append the text in VALUE to the end of the definition contained in VAR. Take
447 # advantage of any shell optimizations that allow amortized linear growth over
448 # repeated appends, instead of the typical quadratic growth present in naive
449 # implementations.
450 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
451 then :
452 eval 'as_fn_append ()
453 {
454 eval $1+=\$2
455 }'
456 else $as_nop
457 as_fn_append ()
458 {
459 eval $1=\$$1\$2
460 }
461 fi # as_fn_append
462
463 # as_fn_arith ARG...
464 # ------------------
465 # Perform arithmetic evaluation on the ARGs, and store the result in the
466 # global $as_val. Take advantage of shells that can avoid forks. The arguments
467 # must be portable across $(()) and expr.
468 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
469 then :
470 eval 'as_fn_arith ()
471 {
472 as_val=$(( $* ))
473 }'
474 else $as_nop
475 as_fn_arith ()
476 {
477 as_val=`expr "$@" || test $? -eq 1`
478 }
479 fi # as_fn_arith
480
481 # as_fn_nop
482 # ---------
483 # Do nothing but, unlike ":", preserve the value of $?.
484 as_fn_nop ()
485 {
486 return $?
487 }
488 as_nop=as_fn_nop
489
490 # as_fn_error STATUS ERROR [LINENO LOG_FD]
491 # ----------------------------------------
492 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
493 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
494 # script with STATUS, using 1 if that was 0.
495 as_fn_error ()
496 {
497 as_status=$1; test $as_status -eq 0 && as_status=1
498 if test "$4"; then
499 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
500 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
501 fi
502 printf "%s\n" "$as_me: error: $2" >&2
503 as_fn_exit $as_status
504 } # as_fn_error
505
506 if expr a : '\(a\)' >/dev/null 2>&1 &&
507 test "X`expr 00001 : '.*\(...\)'`" = X001; then
508 as_expr=expr
509 else
510 as_expr=false
511 fi
512
513 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
514 as_basename=basename
515 else
516 as_basename=false
517 fi
518
519 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
520 as_dirname=dirname
521 else
522 as_dirname=false
523 fi
524
525 as_me=`$as_basename -- "$0" ||
526 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
527 X"$0" : 'X\(//\)$' \| \
528 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
529 printf "%s\n" X/"$0" |
530 sed '/^.*\/\([^/][^/]*\)\/*$/{
531 s//\1/
532 q
533 }
534 /^X\/\(\/\/\)$/{
535 s//\1/
536 q
537 }
538 /^X\/\(\/\).*/{
539 s//\1/
540 q
541 }
542 s/.*/./; q'`
543
544 # Avoid depending upon Character Ranges.
545 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
546 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
547 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
548 as_cr_digits='0123456789'
549 as_cr_alnum=$as_cr_Letters$as_cr_digits
550
551
552 as_lineno_1=$LINENO as_lineno_1a=$LINENO
553 as_lineno_2=$LINENO as_lineno_2a=$LINENO
554 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
555 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
556 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
557 sed -n '
558 p
559 /[$]LINENO/=
560 ' <$as_myself |
561 sed '
562 s/[$]LINENO.*/&-/
563 t lineno
564 b
565 :lineno
566 N
567 :loop
568 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
569 t loop
570 s/-\n.*//
571 ' >$as_me.lineno &&
572 chmod +x "$as_me.lineno" ||
573 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
574
575 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
576 # already done that, so ensure we don't try to do so again and fall
577 # in an infinite loop. This has already happened in practice.
578 _as_can_reexec=no; export _as_can_reexec
579 # Don't try to exec as it changes $[0], causing all sort of problems
580 # (the dirname of $[0] is not the place where we might find the
581 # original and so on. Autoconf is especially sensitive to this).
582 . "./$as_me.lineno"
583 # Exit status is that of the last command.
584 exit
585 }
586
587
588 # Determine whether it's possible to make 'echo' print without a newline.
589 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
590 # for compatibility with existing Makefiles.
591 ECHO_C= ECHO_N= ECHO_T=
592 case `echo -n x` in #(((((
593 -n*)
594 case `echo 'xy\c'` in
595 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
596 xy) ECHO_C='\c';;
597 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
598 ECHO_T=' ';;
599 esac;;
600 *)
601 ECHO_N='-n';;
602 esac
603
604 # For backward compatibility with old third-party macros, we provide
605 # the shell variables $as_echo and $as_echo_n. New code should use
606 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
607 as_echo='printf %s\n'
608 as_echo_n='printf %s'
609
610
611 rm -f conf$$ conf$$.exe conf$$.file
612 if test -d conf$$.dir; then
613 rm -f conf$$.dir/conf$$.file
614 else
615 rm -f conf$$.dir
616 mkdir conf$$.dir 2>/dev/null
617 fi
618 if (echo >conf$$.file) 2>/dev/null; then
619 if ln -s conf$$.file conf$$ 2>/dev/null; then
620 as_ln_s='ln -s'
621 # ... but there are two gotchas:
622 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
623 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
624 # In both cases, we have to default to `cp -pR'.
625 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
626 as_ln_s='cp -pR'
627 elif ln conf$$.file conf$$ 2>/dev/null; then
628 as_ln_s=ln
629 else
630 as_ln_s='cp -pR'
631 fi
632 else
633 as_ln_s='cp -pR'
634 fi
635 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
636 rmdir conf$$.dir 2>/dev/null
637
638 if mkdir -p . 2>/dev/null; then
639 as_mkdir_p='mkdir -p "$as_dir"'
640 else
641 test -d ./-p && rmdir ./-p
642 as_mkdir_p=false
643 fi
644
645 as_test_x='test -x'
646 as_executable_p=as_fn_executable_p
647
648 # Sed expression to map a string onto a valid CPP name.
649 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
650
651 # Sed expression to map a string onto a valid variable name.
652 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
653
654 SHELL=${CONFIG_SHELL-/bin/sh}
655
656
657 test -n "$DJDIR" || exec 7<&0 </dev/null
658 exec 6>&1
659
660 # Name of the host.
661 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
662 # so uname gets run too.
663 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
664
665 #
666 # Initializations.
667 #
668 ac_default_prefix=/usr/local
669 ac_clean_files=
670 ac_config_libobj_dir=.
671 LIBOBJS=
672 cross_compiling=no
673 subdirs=
674 MFLAGS=
675 MAKEFLAGS=
676
677 # Identity of this package.
678 PACKAGE_NAME='OCaml'
679 PACKAGE_TARNAME='ocaml'
680 PACKAGE_VERSION='5.4.1'
681 PACKAGE_STRING='OCaml 5.4.1'
682 PACKAGE_BUGREPORT='[email protected]'
683 PACKAGE_URL='http://www.ocaml.org'
684
685 ac_unique_file="runtime/interp.c"
686 # Factoring default headers for most tests.
687 ac_includes_default="\
688 #include <stddef.h>
689 #ifdef HAVE_STDIO_H
690 # include <stdio.h>
691 #endif
692 #ifdef HAVE_STDLIB_H
693 # include <stdlib.h>
694 #endif
695 #ifdef HAVE_STRING_H
696 # include <string.h>
697 #endif
698 #ifdef HAVE_INTTYPES_H
699 # include <inttypes.h>
700 #endif
701 #ifdef HAVE_STDINT_H
702 # include <stdint.h>
703 #endif
704 #ifdef HAVE_STRINGS_H
705 # include <strings.h>
706 #endif
707 #ifdef HAVE_SYS_TYPES_H
708 # include <sys/types.h>
709 #endif
710 #ifdef HAVE_SYS_STAT_H
711 # include <sys/stat.h>
712 #endif
713 #ifdef HAVE_UNISTD_H
714 # include <unistd.h>
715 #endif"
716
717 ac_header_c_list=
718 ac_subst_vars='LTLIBOBJS
719 LIBOBJS
720 DIFF
721 PTHREAD_CFLAGS
722 PTHREAD_LIBS
723 PTHREAD_CXX
724 PTHREAD_CC
725 ax_pthread_config
726 PKG_CONFIG
727 rlwrap
728 DIRECT_LD
729 INSTALL_DATA
730 INSTALL_SCRIPT
731 INSTALL_PROGRAM
732 LDFLAGS_FOR_BUILD
733 CPPFLAGS_FOR_BUILD
734 CFLAGS_FOR_BUILD
735 BUILD_OBJEXT
736 BUILD_EXEEXT
737 CPP_FOR_BUILD
738 ac_ct_CC_FOR_BUILD
739 CC_FOR_BUILD
740 flexlink
741 CPP
742 ac_ct_DEP_CC
743 DEP_CC
744 LT_SYS_LIBRARY_PATH
745 OTOOL64
746 OTOOL
747 LIPO
748 NMEDIT
749 DSYMUTIL
750 MANIFEST_TOOL
751 AWK
752 RANLIB
753 STRIP
754 ac_ct_AR
755 DLLTOOL
756 OBJDUMP
757 FILECMD
758 LN_S
759 NM
760 ac_ct_DUMPBIN
761 DUMPBIN
762 FGREP
763 EGREP
764 GREP
765 SED
766 OBJEXT
767 EXEEXT
768 ac_ct_CC
769 CPPFLAGS
770 LDFLAGS
771 CFLAGS
772 LIBTOOL
773 ac_ct_LD
774 LD
775 DEFAULT_STRING
776 WINDOWS_UNICODE_MODE
777 TARGET_BINDIR
778 LIBUNWIND_LDFLAGS
779 LIBUNWIND_CPPFLAGS
780 DLLIBS
781 COMPILER_NATIVE_CPPFLAGS
782 COMPILER_NATIVE_CFLAGS
783 COMPILER_BYTECODE_CPPFLAGS
784 COMPILER_BYTECODE_CFLAGS
785 PARTIALLD
786 csc
787 target_os
788 target_vendor
789 target_cpu
790 target
791 host_os
792 host_vendor
793 host_cpu
794 host
795 build_os
796 build_vendor
797 build_cpu
798 build
799 ar_supports_response_files
800 QS
801 TARGET_LIBDIR
802 ocaml_libdir
803 ocaml_bindir
804 compute_deps
805 build_libraries_manpages
806 PACKLD
807 flexdll_chain
808 afl
809 oc_native_compflags
810 function_sections
811 flat_float_array
812 align_int64
813 align_double
814 windows_unicode
815 cmm_invariants
816 flambda_invariants
817 flambda
818 frame_pointers
819 reserved_header_bits
820 install_ocamlnat
821 install_source_artifacts
822 install_bytecode_programs
823 mksharedlibrpath
824 mkmaindll_exp
825 mkmaindll
826 mkdll_exp
827 mkdll
828 rpath
829 sharedlib_cflags
830 asm_size_type_directives
831 asm_cfi_supported
832 AS
833 endianness
834 ASPP
835 ocamltest_opt_target
836 ocamltest_target
837 ocamltest
838 build_ocamltest
839 build_ocamlobjinfo
840 documentation_tool_cmd
841 documentation_tool
842 with_ocamldoc
843 ocamldoc_opt_target
844 ocamldoc_target
845 build_ocamldoc
846 build_ocamltex
847 build_ocamldebug
848 with_debugger
849 as_has_debug_prefix_map
850 cc_has_debug_prefix_map
851 unix_directory
852 unix_library
853 ocamltest_libunix
854 ocamltest_CPP
855 optional_native_tools
856 optional_bytecode_tools
857 optional_libraries
858 lib_unix
859 lib_systhreads
860 lib_str
861 lib_runtime_events
862 lib_dynlink
863 otherlibs
864 otherlibraries
865 instrumented_runtime_libs
866 instrumented_runtime
867 codegen_invariants
868 debug_runtime
869 cmxs
870 natdynlink_archive
871 natdynlinkopts
872 natdynlink
873 supports_shared_libraries
874 mklib
875 AR
876 shebangscripts
877 winpthreads_source_include_dir
878 winpthreads_source_dir
879 flexdll_dir
880 bootstrapping_flexdll
881 flexdll_source_dir
882 zstd_libs
883 with_nonexecstack_note
884 native_ldflags
885 cclibs
886 oc_dll_ldflags
887 oc_ldflags
888 oc_cppflags
889 common_cppflags
890 tsan_native_runtime_c_sources
891 tsan
892 oc_cflags
893 common_cflags
894 toolchain
895 ccomp_type
896 mkexe_via_cc_extra_cmd
897 mkexe_via_cc_ldflags
898 mkexedebugflag
899 mkexe_exp
900 mkexe
901 fpic
902 syslib
903 outputobj
904 outputexe
905 ocamlyacc_wstr_module
906 ln
907 unix_or_win32
908 ocamlsrcdir
909 systhread_support
910 oc_native_cppflags
911 oc_native_cflags
912 oc_bytecode_cppflags
913 oc_bytecode_cflags
914 native_cppflags
915 native_cflags
916 bytecode_cppflags
917 bytecode_cflags
918 target_os_type
919 system
920 model
921 arch64
922 arch_specific_SOURCES
923 arch
924 SO
925 runtime_asm_objects
926 S
927 libext
928 ac_tool_prefix
929 CSCFLAGS
930 CSC
931 diff_supports_color
932 DIFF_FLAGS
933 encode_C_literal
934 SAK
935 SAK_BUILD
936 CC
937 LINEAR_MAGIC_NUMBER
938 CMT_MAGIC_NUMBER
939 CMXS_MAGIC_NUMBER
940 AST_INTF_MAGIC_NUMBER
941 AST_IMPL_MAGIC_NUMBER
942 CMXA_MAGIC_NUMBER
943 CMX_MAGIC_NUMBER
944 CMA_MAGIC_NUMBER
945 CMO_MAGIC_NUMBER
946 CMI_MAGIC_NUMBER
947 EXEC_MAGIC_NUMBER
948 MAGIC_LENGTH
949 OCAML_VERSION_SHORT
950 OCAML_VERSION_EXTRA
951 OCAML_VERSION_PATCHLEVEL
952 OCAML_VERSION_MINOR
953 OCAML_VERSION_MAJOR
954 OCAML_RELEASE_EXTRA
955 OCAML_DEVELOPMENT_VERSION
956 VERSION
957 default_build_target
958 native_compiler
959 CONFIGURE_ARGS
960 target_alias
961 host_alias
962 build_alias
963 LIBS
964 ECHO_T
965 ECHO_N
966 ECHO_C
967 DEFS
968 mandir
969 localedir
970 libdir
971 psdir
972 pdfdir
973 dvidir
974 htmldir
975 infodir
976 docdir
977 oldincludedir
978 includedir
979 runstatedir
980 localstatedir
981 sharedstatedir
982 sysconfdir
983 datadir
984 datarootdir
985 libexecdir
986 sbindir
987 bindir
988 program_transform_name
989 prefix
990 exec_prefix
991 PACKAGE_URL
992 PACKAGE_BUGREPORT
993 PACKAGE_STRING
994 PACKAGE_VERSION
995 PACKAGE_TARNAME
996 PACKAGE_NAME
997 PATH_SEPARATOR
998 SHELL'
999 ac_subst_files=''
1000 ac_user_opts='
1001 enable_option_checking
1002 enable_debug_runtime
1003 enable_codegen_invariants
1004 enable_ocamldebug
1005 enable_debugger
1006 enable_dependency_generation
1007 enable_instrumented_runtime
1008 enable_vmthreads
1009 enable_systhreads
1010 enable_tsan
1011 enable_graph_lib
1012 enable_str_lib
1013 enable_unix_lib
1014 enable_bigarray_lib
1015 enable_ocamldoc
1016 with_odoc
1017 enable_ocamlobjinfo
1018 enable_ocamltest
1019 enable_native_toplevel
1020 enable_frame_pointers
1021 enable_naked_pointers
1022 enable_naked_pointers_checker
1023 enable_spacetime
1024 enable_cfi
1025 enable_imprecise_c99_float_ops
1026 enable_installing_source_artifacts
1027 enable_installing_bytecode_programs
1028 enable_native_compiler
1029 enable_flambda
1030 enable_flambda_invariants
1031 enable_cmm_invariants
1032 with_target_sh
1033 enable_reserved_header_bits
1034 enable_stdlib_manpages
1035 enable_warn_error
1036 enable_force_safe_string
1037 enable_flat_float_array
1038 enable_function_sections
1039 enable_mmap_map_stack
1040 with_afl
1041 with_flexdll
1042 with_winpthreads_msvc
1043 with_zstd
1044 enable_shared
1045 enable_static
1046 enable_pic
1047 with_pic
1048 enable_fast_install
1049 enable_aix_soname
1050 with_aix_soname
1051 with_gnu_ld
1052 with_sysroot
1053 enable_libtool_lock
1054 '
1055 ac_precious_vars='build_alias
1056 host_alias
1057 target_alias
1058 AS
1059 ASPP
1060 PARTIALLD
1061 COMPILER_BYTECODE_CFLAGS
1062 COMPILER_BYTECODE_CPPFLAGS
1063 COMPILER_NATIVE_CFLAGS
1064 COMPILER_NATIVE_CPPFLAGS
1065 DLLIBS
1066 LIBUNWIND_CPPFLAGS
1067 LIBUNWIND_LDFLAGS
1068 TARGET_BINDIR
1069 TARGET_LIBDIR
1070 WINDOWS_UNICODE_MODE
1071 DEFAULT_STRING
1072 CC
1073 CFLAGS
1074 LDFLAGS
1075 LIBS
1076 CPPFLAGS
1077 LT_SYS_LIBRARY_PATH
1078 CPP'
1079
1080
1081 # Initialize some variables set by options.
1082 ac_init_help=
1083 ac_init_version=false
1084 ac_unrecognized_opts=
1085 ac_unrecognized_sep=
1086 # The variables have the same names as the options, with
1087 # dashes changed to underlines.
1088 cache_file=/dev/null
1089 exec_prefix=NONE
1090 no_create=
1091 no_recursion=
1092 prefix=NONE
1093 program_prefix=NONE
1094 program_suffix=NONE
1095 program_transform_name=s,x,x,
1096 silent=
1097 site=
1098 srcdir=
1099 verbose=
1100 x_includes=NONE
1101 x_libraries=NONE
1102
1103 # Installation directory options.
1104 # These are left unexpanded so users can "make install exec_prefix=/foo"
1105 # and all the variables that are supposed to be based on exec_prefix
1106 # by default will actually change.
1107 # Use braces instead of parens because sh, perl, etc. also accept them.
1108 # (The list follows the same order as the GNU Coding Standards.)
1109 bindir='${exec_prefix}/bin'
1110 sbindir='${exec_prefix}/sbin'
1111 libexecdir='${exec_prefix}/libexec'
1112 datarootdir='${prefix}/share'
1113 datadir='${datarootdir}'
1114 sysconfdir='${prefix}/etc'
1115 sharedstatedir='${prefix}/com'
1116 localstatedir='${prefix}/var'
1117 runstatedir='${localstatedir}/run'
1118 includedir='${prefix}/include'
1119 oldincludedir='/usr/include'
1120 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1121 infodir='${datarootdir}/info'
1122 htmldir='${docdir}'
1123 dvidir='${docdir}'
1124 pdfdir='${docdir}'
1125 psdir='${docdir}'
1126 libdir='${exec_prefix}/lib'
1127 localedir='${datarootdir}/locale'
1128 mandir='${datarootdir}/man'
1129
1130 ac_prev=
1131 ac_dashdash=
1132 for ac_option
1133 do
1134 # If the previous option needs an argument, assign it.
1135 if test -n "$ac_prev"; then
1136 eval $ac_prev=\$ac_option
1137 ac_prev=
1138 continue
1139 fi
1140
1141 case $ac_option in
1142 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1143 *=) ac_optarg= ;;
1144 *) ac_optarg=yes ;;
1145 esac
1146
1147 case $ac_dashdash$ac_option in
1148 --)
1149 ac_dashdash=yes ;;
1150
1151 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1152 ac_prev=bindir ;;
1153 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1154 bindir=$ac_optarg ;;
1155
1156 -build | --build | --buil | --bui | --bu)
1157 ac_prev=build_alias ;;
1158 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1159 build_alias=$ac_optarg ;;
1160
1161 -cache-file | --cache-file | --cache-fil | --cache-fi \
1162 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1163 ac_prev=cache_file ;;
1164 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1165 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1166 cache_file=$ac_optarg ;;
1167
1168 --config-cache | -C)
1169 cache_file=config.cache ;;
1170
1171 -datadir | --datadir | --datadi | --datad)
1172 ac_prev=datadir ;;
1173 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1174 datadir=$ac_optarg ;;
1175
1176 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1177 | --dataroo | --dataro | --datar)
1178 ac_prev=datarootdir ;;
1179 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1180 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1181 datarootdir=$ac_optarg ;;
1182
1183 -disable-* | --disable-*)
1184 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1185 # Reject names that are not valid shell variable names.
1186 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1187 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1188 ac_useropt_orig=$ac_useropt
1189 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1190 case $ac_user_opts in
1191 *"
1192 "enable_$ac_useropt"
1193 "*) ;;
1194 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1195 ac_unrecognized_sep=', ';;
1196 esac
1197 eval enable_$ac_useropt=no ;;
1198
1199 -docdir | --docdir | --docdi | --doc | --do)
1200 ac_prev=docdir ;;
1201 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1202 docdir=$ac_optarg ;;
1203
1204 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1205 ac_prev=dvidir ;;
1206 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1207 dvidir=$ac_optarg ;;
1208
1209 -enable-* | --enable-*)
1210 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1211 # Reject names that are not valid shell variable names.
1212 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1213 as_fn_error $? "invalid feature name: \`$ac_useropt'"
1214 ac_useropt_orig=$ac_useropt
1215 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1216 case $ac_user_opts in
1217 *"
1218 "enable_$ac_useropt"
1219 "*) ;;
1220 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1221 ac_unrecognized_sep=', ';;
1222 esac
1223 eval enable_$ac_useropt=\$ac_optarg ;;
1224
1225 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1226 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1227 | --exec | --exe | --ex)
1228 ac_prev=exec_prefix ;;
1229 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1230 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1231 | --exec=* | --exe=* | --ex=*)
1232 exec_prefix=$ac_optarg ;;
1233
1234 -gas | --gas | --ga | --g)
1235 # Obsolete; use --with-gas.
1236 with_gas=yes ;;
1237
1238 -help | --help | --hel | --he | -h)
1239 ac_init_help=long ;;
1240 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1241 ac_init_help=recursive ;;
1242 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1243 ac_init_help=short ;;
1244
1245 -host | --host | --hos | --ho)
1246 ac_prev=host_alias ;;
1247 -host=* | --host=* | --hos=* | --ho=*)
1248 host_alias=$ac_optarg ;;
1249
1250 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1251 ac_prev=htmldir ;;
1252 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1253 | --ht=*)
1254 htmldir=$ac_optarg ;;
1255
1256 -includedir | --includedir | --includedi | --included | --include \
1257 | --includ | --inclu | --incl | --inc)
1258 ac_prev=includedir ;;
1259 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1260 | --includ=* | --inclu=* | --incl=* | --inc=*)
1261 includedir=$ac_optarg ;;
1262
1263 -infodir | --infodir | --infodi | --infod | --info | --inf)
1264 ac_prev=infodir ;;
1265 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1266 infodir=$ac_optarg ;;
1267
1268 -libdir | --libdir | --libdi | --libd)
1269 ac_prev=libdir ;;
1270 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1271 libdir=$ac_optarg ;;
1272
1273 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1274 | --libexe | --libex | --libe)
1275 ac_prev=libexecdir ;;
1276 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1277 | --libexe=* | --libex=* | --libe=*)
1278 libexecdir=$ac_optarg ;;
1279
1280 -localedir | --localedir | --localedi | --localed | --locale)
1281 ac_prev=localedir ;;
1282 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1283 localedir=$ac_optarg ;;
1284
1285 -localstatedir | --localstatedir | --localstatedi | --localstated \
1286 | --localstate | --localstat | --localsta | --localst | --locals)
1287 ac_prev=localstatedir ;;
1288 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1289 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1290 localstatedir=$ac_optarg ;;
1291
1292 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1293 ac_prev=mandir ;;
1294 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1295 mandir=$ac_optarg ;;
1296
1297 -nfp | --nfp | --nf)
1298 # Obsolete; use --without-fp.
1299 with_fp=no ;;
1300
1301 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1302 | --no-cr | --no-c | -n)
1303 no_create=yes ;;
1304
1305 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1306 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1307 no_recursion=yes ;;
1308
1309 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1310 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1311 | --oldin | --oldi | --old | --ol | --o)
1312 ac_prev=oldincludedir ;;
1313 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1314 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1315 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1316 oldincludedir=$ac_optarg ;;
1317
1318 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1319 ac_prev=prefix ;;
1320 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1321 prefix=$ac_optarg ;;
1322
1323 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1324 | --program-pre | --program-pr | --program-p)
1325 ac_prev=program_prefix ;;
1326 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1327 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1328 program_prefix=$ac_optarg ;;
1329
1330 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1331 | --program-suf | --program-su | --program-s)
1332 ac_prev=program_suffix ;;
1333 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1334 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1335 program_suffix=$ac_optarg ;;
1336
1337 -program-transform-name | --program-transform-name \
1338 | --program-transform-nam | --program-transform-na \
1339 | --program-transform-n | --program-transform- \
1340 | --program-transform | --program-transfor \
1341 | --program-transfo | --program-transf \
1342 | --program-trans | --program-tran \
1343 | --progr-tra | --program-tr | --program-t)
1344 ac_prev=program_transform_name ;;
1345 -program-transform-name=* | --program-transform-name=* \
1346 | --program-transform-nam=* | --program-transform-na=* \
1347 | --program-transform-n=* | --program-transform-=* \
1348 | --program-transform=* | --program-transfor=* \
1349 | --program-transfo=* | --program-transf=* \
1350 | --program-trans=* | --program-tran=* \
1351 | --progr-tra=* | --program-tr=* | --program-t=*)
1352 program_transform_name=$ac_optarg ;;
1353
1354 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1355 ac_prev=pdfdir ;;
1356 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1357 pdfdir=$ac_optarg ;;
1358
1359 -psdir | --psdir | --psdi | --psd | --ps)
1360 ac_prev=psdir ;;
1361 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1362 psdir=$ac_optarg ;;
1363
1364 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1365 | -silent | --silent | --silen | --sile | --sil)
1366 silent=yes ;;
1367
1368 -runstatedir | --runstatedir | --runstatedi | --runstated \
1369 | --runstate | --runstat | --runsta | --runst | --runs \
1370 | --run | --ru | --r)
1371 ac_prev=runstatedir ;;
1372 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1373 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1374 | --run=* | --ru=* | --r=*)
1375 runstatedir=$ac_optarg ;;
1376
1377 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1378 ac_prev=sbindir ;;
1379 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1380 | --sbi=* | --sb=*)
1381 sbindir=$ac_optarg ;;
1382
1383 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1384 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1385 | --sharedst | --shareds | --shared | --share | --shar \
1386 | --sha | --sh)
1387 ac_prev=sharedstatedir ;;
1388 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1389 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1390 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1391 | --sha=* | --sh=*)
1392 sharedstatedir=$ac_optarg ;;
1393
1394 -site | --site | --sit)
1395 ac_prev=site ;;
1396 -site=* | --site=* | --sit=*)
1397 site=$ac_optarg ;;
1398
1399 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1400 ac_prev=srcdir ;;
1401 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1402 srcdir=$ac_optarg ;;
1403
1404 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1405 | --syscon | --sysco | --sysc | --sys | --sy)
1406 ac_prev=sysconfdir ;;
1407 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1408 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1409 sysconfdir=$ac_optarg ;;
1410
1411 -target | --target | --targe | --targ | --tar | --ta | --t)
1412 ac_prev=target_alias ;;
1413 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1414 target_alias=$ac_optarg ;;
1415
1416 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1417 verbose=yes ;;
1418
1419 -version | --version | --versio | --versi | --vers | -V)
1420 ac_init_version=: ;;
1421
1422 -with-* | --with-*)
1423 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1424 # Reject names that are not valid shell variable names.
1425 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1426 as_fn_error $? "invalid package name: \`$ac_useropt'"
1427 ac_useropt_orig=$ac_useropt
1428 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1429 case $ac_user_opts in
1430 *"
1431 "with_$ac_useropt"
1432 "*) ;;
1433 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1434 ac_unrecognized_sep=', ';;
1435 esac
1436 eval with_$ac_useropt=\$ac_optarg ;;
1437
1438 -without-* | --without-*)
1439 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1440 # Reject names that are not valid shell variable names.
1441 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1442 as_fn_error $? "invalid package name: \`$ac_useropt'"
1443 ac_useropt_orig=$ac_useropt
1444 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'`
1445 case $ac_user_opts in
1446 *"
1447 "with_$ac_useropt"
1448 "*) ;;
1449 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1450 ac_unrecognized_sep=', ';;
1451 esac
1452 eval with_$ac_useropt=no ;;
1453
1454 --x)
1455 # Obsolete; use --with-x.
1456 with_x=yes ;;
1457
1458 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1459 | --x-incl | --x-inc | --x-in | --x-i)
1460 ac_prev=x_includes ;;
1461 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1462 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1463 x_includes=$ac_optarg ;;
1464
1465 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1466 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1467 ac_prev=x_libraries ;;
1468 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1469 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1470 x_libraries=$ac_optarg ;;
1471
1472 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1473 Try \`$0 --help' for more information"
1474 ;;
1475
1476 *=*)
1477 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1478 # Reject names that are not valid shell variable names.
1479 case $ac_envvar in #(
1480 '' | [0-9]* | *[!_$as_cr_alnum]* )
1481 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1482 esac
1483 eval $ac_envvar=\$ac_optarg
1484 export $ac_envvar ;;
1485
1486 *)
1487 # FIXME: should be removed in autoconf 3.0.
1488 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2
1489 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1490 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2
1491 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1492 ;;
1493
1494 esac
1495 done
1496
1497 if test -n "$ac_prev"; then
1498 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1499 as_fn_error $? "missing argument to $ac_option"
1500 fi
1501
1502 if test -n "$ac_unrecognized_opts"; then
1503 case $enable_option_checking in
1504 no) ;;
1505 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1506 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1507 esac
1508 fi
1509
1510 # Check all directory arguments for consistency.
1511 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1512 datadir sysconfdir sharedstatedir localstatedir includedir \
1513 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1514 libdir localedir mandir runstatedir
1515 do
1516 eval ac_val=\$$ac_var
1517 # Remove trailing slashes.
1518 case $ac_val in
1519 */ )
1520 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1521 eval $ac_var=\$ac_val;;
1522 esac
1523 # Be sure to have absolute directory names.
1524 case $ac_val in
1525 [\\/$]* | ?:[\\/]* ) continue;;
1526 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1527 esac
1528 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1529 done
1530
1531 # There might be people who depend on the old broken behavior: `$host'
1532 # used to hold the argument of --host etc.
1533 # FIXME: To remove some day.
1534 build=$build_alias
1535 host=$host_alias
1536 target=$target_alias
1537
1538 # FIXME: To remove some day.
1539 if test "x$host_alias" != x; then
1540 if test "x$build_alias" = x; then
1541 cross_compiling=maybe
1542 elif test "x$build_alias" != "x$host_alias"; then
1543 cross_compiling=yes
1544 fi
1545 fi
1546
1547 ac_tool_prefix=
1548 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1549
1550 test "$silent" = yes && exec 6>/dev/null
1551
1552
1553 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1554 ac_ls_di=`ls -di .` &&
1555 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1556 as_fn_error $? "working directory cannot be determined"
1557 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1558 as_fn_error $? "pwd does not report name of working directory"
1559
1560
1561 # Find the source files, if location was not specified.
1562 if test -z "$srcdir"; then
1563 ac_srcdir_defaulted=yes
1564 # Try the directory containing this script, then the parent directory.
1565 ac_confdir=`$as_dirname -- "$as_myself" ||
1566 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1567 X"$as_myself" : 'X\(//\)[^/]' \| \
1568 X"$as_myself" : 'X\(//\)$' \| \
1569 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1570 printf "%s\n" X"$as_myself" |
1571 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1572 s//\1/
1573 q
1574 }
1575 /^X\(\/\/\)[^/].*/{
1576 s//\1/
1577 q
1578 }
1579 /^X\(\/\/\)$/{
1580 s//\1/
1581 q
1582 }
1583 /^X\(\/\).*/{
1584 s//\1/
1585 q
1586 }
1587 s/.*/./; q'`
1588 srcdir=$ac_confdir
1589 if test ! -r "$srcdir/$ac_unique_file"; then
1590 srcdir=..
1591 fi
1592 else
1593 ac_srcdir_defaulted=no
1594 fi
1595 if test ! -r "$srcdir/$ac_unique_file"; then
1596 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1597 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1598 fi
1599 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1600 ac_abs_confdir=`(
1601 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1602 pwd)`
1603 # When building in place, set srcdir=.
1604 if test "$ac_abs_confdir" = "$ac_pwd"; then
1605 srcdir=.
1606 fi
1607 # Remove unnecessary trailing slashes from srcdir.
1608 # Double slashes in file names in object file debugging info
1609 # mess up M-x gdb in Emacs.
1610 case $srcdir in
1611 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1612 esac
1613 for ac_var in $ac_precious_vars; do
1614 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1615 eval ac_env_${ac_var}_value=\$${ac_var}
1616 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1617 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1618 done
1619
1620 #
1621 # Report the --help message.
1622 #
1623 if test "$ac_init_help" = "long"; then
1624 # Omit some internal or obsolete options to make the list less imposing.
1625 # This message is too long to be a string in the A/UX 3.1 sh.
1626 cat <<_ACEOF
1627 \`configure' configures OCaml 5.4.1 to adapt to many kinds of systems.
1628
1629 Usage: $0 [OPTION]... [VAR=VALUE]...
1630
1631 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1632 VAR=VALUE. See below for descriptions of some of the useful variables.
1633
1634 Defaults for the options are specified in brackets.
1635
1636 Configuration:
1637 -h, --help display this help and exit
1638 --help=short display options specific to this package
1639 --help=recursive display the short help of all the included packages
1640 -V, --version display version information and exit
1641 -q, --quiet, --silent do not print \`checking ...' messages
1642 --cache-file=FILE cache test results in FILE [disabled]
1643 -C, --config-cache alias for \`--cache-file=config.cache'
1644 -n, --no-create do not create output files
1645 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1646
1647 Installation directories:
1648 --prefix=PREFIX install architecture-independent files in PREFIX
1649 [$ac_default_prefix]
1650 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1651 [PREFIX]
1652
1653 By default, \`make install' will install all the files in
1654 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1655 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1656 for instance \`--prefix=\$HOME'.
1657
1658 For better control, use the options below.
1659
1660 Fine tuning of the installation directories:
1661 --bindir=DIR user executables [EPREFIX/bin]
1662 --sbindir=DIR system admin executables [EPREFIX/sbin]
1663 --libexecdir=DIR program executables [EPREFIX/libexec]
1664 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1665 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1666 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1667 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
1668 --libdir=DIR object code libraries [EPREFIX/lib]
1669 --includedir=DIR C header files [PREFIX/include]
1670 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1671 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1672 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1673 --infodir=DIR info documentation [DATAROOTDIR/info]
1674 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1675 --mandir=DIR man documentation [DATAROOTDIR/man]
1676 --docdir=DIR documentation root [DATAROOTDIR/doc/ocaml]
1677 --htmldir=DIR html documentation [DOCDIR]
1678 --dvidir=DIR dvi documentation [DOCDIR]
1679 --pdfdir=DIR pdf documentation [DOCDIR]
1680 --psdir=DIR ps documentation [DOCDIR]
1681 _ACEOF
1682
1683 cat <<\_ACEOF
1684
1685 System types:
1686 --build=BUILD configure for building on BUILD [guessed]
1687 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1688 --target=TARGET configure for building compilers for TARGET [HOST]
1689 _ACEOF
1690 fi
1691
1692 if test -n "$ac_init_help"; then
1693 case $ac_init_help in
1694 short | recursive ) echo "Configuration of OCaml 5.4.1:";;
1695 esac
1696 cat <<\_ACEOF
1697
1698 Optional Features:
1699 --disable-option-checking ignore unrecognized --enable/--with options
1700 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1701 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1702 --disable-debug-runtime do not build runtime with debugging support
1703 --enable-codegen-invariants
1704 enable invariants checks in native codegen
1705 --enable-ocamldebug build ocamldebug [default=auto]
1706 --enable-debugger alias for --enable-ocamldebug
1707 --disable-dependency-generation
1708 do not compute dependency information for C sources
1709 --enable-instrumented-runtime
1710 build the instrumented runtime [default=auto]
1711
1712 --disable-systhreads disable the Win32/POSIX threads library
1713 --enable-tsan enable ThreadSanitizer support [default=no]
1714 --disable-str-lib do not build the str library
1715 --disable-unix-lib do not build the unix library
1716 --disable-ocamldoc do not build the ocamldoc documentation system
1717 --disable-ocamlobjinfo do not build ocamlobjinfo
1718 --disable-ocamltest do not build ocamltest
1719 --enable-native-toplevel
1720 build the native toplevel
1721 --enable-frame-pointers use frame pointers in runtime and generated code
1722 --disable-cfi disable the CFI directives in assembly files
1723 --enable-imprecise-c99-float-ops
1724 enables potentially imprecise replacement
1725 implementations of C99 float ops if unavailable on
1726 this platform
1727 --enable-installing-source-artifacts
1728 install *.cmt* and *.mli files
1729 --enable-installing-bytecode-programs
1730 also install the bytecode versions of programs
1731 --disable-native-compiler
1732 do not build the native compiler
1733 --enable-flambda enable flambda optimizations
1734 --enable-flambda-invariants
1735 enable invariants checks in flambda
1736 --enable-cmm-invariants enable invariants checks in Cmm
1737 --enable-reserved-header-bits=BITS
1738 reserve BITS (between 0 and 31) bits in block
1739 headers
1740 --disable-stdlib-manpages
1741 do not build or install the library man pages
1742 --enable-warn-error treat C compiler warnings as errors
1743 --disable-flat-float-array
1744 do not use flat float arrays
1745 --disable-function-sections
1746 do not emit each function in a separate section
1747 --enable-mmap-map-stack use mmap to allocate stacks instead of malloc
1748 --enable-shared[=PKGS] build shared libraries [default=yes]
1749 --enable-static[=PKGS] build static libraries [default=yes]
1750 --enable-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
1751 both]
1752 --enable-fast-install[=PKGS]
1753 optimize for fast installation [default=yes]
1754 --enable-aix-soname=aix|svr4|both
1755 shared library versioning (aka "SONAME") variant to
1756 provide on AIX, [default=aix].
1757 --disable-libtool-lock avoid locking (might break parallel builds)
1758
1759 Optional Packages:
1760 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1761 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1762 --with-odoc build documentation with odoc
1763 --with-target-sh location of Posix sh on the target system
1764 --with-afl use the AFL fuzzer
1765 --with-flexdll bootstrap FlexDLL from the given sources
1766 --with-winpthreads-msvc build winpthreads (only for the MSVC port) from the
1767 given sources
1768 --without-zstd disable compression of compilation artefacts
1769 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
1770 --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
1771 compiler's sysroot if not specified).
1772 --with-odoc
1773
1774 Some influential environment variables:
1775 AS which assembler to use
1776 ASPP which assembler (with preprocessor) to use
1777 PARTIALLD how to build partial (relocatable) object files
1778 COMPILER_BYTECODE_CFLAGS
1779 CFLAGS for compiling C files to be linked with bytecode
1780 COMPILER_BYTECODE_CPPFLAGS
1781 CPPFLAGS for compiling C files to be linked with bytecode
1782 COMPILER_NATIVE_CFLAGS
1783 CFLAGS for compiling C files to be linked with native code
1784 COMPILER_NATIVE_CPPFLAGS
1785 CPPFLAGS for compiling C files to be linked with native code
1786 DLLIBS which libraries to use (in addition to -ldl) to load dynamic
1787 libs
1788 LIBUNWIND_CPPFLAGS
1789 C preprocessor flags for libunwind (e.g. -I<location of
1790 libunwind headers>)
1791 LIBUNWIND_LDFLAGS
1792 linker flags for libunwind (e.g. -L<location of libunwind>
1793 TARGET_BINDIR
1794 location of the runtime binaries on the target system
1795 TARGET_LIBDIR
1796 location of the libraries on the target system, to be used for
1797 dynlink; defaults to the value of libdir
1798 WINDOWS_UNICODE_MODE
1799 how to handle Unicode under Windows: ansi, compatible
1800 DEFAULT_STRING
1801
1802 CC C compiler command
1803 CFLAGS C compiler flags
1804 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1805 nonstandard directory <lib dir>
1806 LIBS libraries to pass to the linker, e.g. -l<library>
1807 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1808 you have headers in a nonstandard directory <include dir>
1809 LT_SYS_LIBRARY_PATH
1810 User-defined run-time library search path.
1811 CPP C preprocessor
1812
1813 Use these variables to override the choices made by `configure' or to help
1814 it to find libraries and programs with nonstandard names/locations.
1815
1816 Report bugs to <[email protected]>.
1817 OCaml home page: <http://www.ocaml.org>.
1818 _ACEOF
1819 ac_status=$?
1820 fi
1821
1822 if test "$ac_init_help" = "recursive"; then
1823 # If there are subdirs, report their specific --help.
1824 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1825 test -d "$ac_dir" ||
1826 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1827 continue
1828 ac_builddir=.
1829
1830 case "$ac_dir" in
1831 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1832 *)
1833 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
1834 # A ".." for each directory in $ac_dir_suffix.
1835 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1836 case $ac_top_builddir_sub in
1837 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1838 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1839 esac ;;
1840 esac
1841 ac_abs_top_builddir=$ac_pwd
1842 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1843 # for backward compatibility:
1844 ac_top_builddir=$ac_top_build_prefix
1845
1846 case $srcdir in
1847 .) # We are building in place.
1848 ac_srcdir=.
1849 ac_top_srcdir=$ac_top_builddir_sub
1850 ac_abs_top_srcdir=$ac_pwd ;;
1851 [\\/]* | ?:[\\/]* ) # Absolute name.
1852 ac_srcdir=$srcdir$ac_dir_suffix;
1853 ac_top_srcdir=$srcdir
1854 ac_abs_top_srcdir=$srcdir ;;
1855 *) # Relative name.
1856 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1857 ac_top_srcdir=$ac_top_build_prefix$srcdir
1858 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1859 esac
1860 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1861
1862 cd "$ac_dir" || { ac_status=$?; continue; }
1863 # Check for configure.gnu first; this name is used for a wrapper for
1864 # Metaconfig's "Configure" on case-insensitive file systems.
1865 if test -f "$ac_srcdir/configure.gnu"; then
1866 echo &&
1867 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1868 elif test -f "$ac_srcdir/configure"; then
1869 echo &&
1870 $SHELL "$ac_srcdir/configure" --help=recursive
1871 else
1872 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1873 fi || ac_status=$?
1874 cd "$ac_pwd" || { ac_status=$?; break; }
1875 done
1876 fi
1877
1878 test -n "$ac_init_help" && exit $ac_status
1879 if $ac_init_version; then
1880 cat <<\_ACEOF
1881 OCaml configure 5.4.1
1882 generated by GNU Autoconf 2.71
1883
1884 Copyright (C) 2021 Free Software Foundation, Inc.
1885 This configure script is free software; the Free Software Foundation
1886 gives unlimited permission to copy, distribute and modify it.
1887 _ACEOF
1888 exit
1889 fi
1890
1891 ## ------------------------ ##
1892 ## Autoconf initialization. ##
1893 ## ------------------------ ##
1894
1895 # ac_fn_c_try_compile LINENO
1896 # --------------------------
1897 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1898 ac_fn_c_try_compile ()
1899 {
1900 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901 rm -f conftest.$ac_objext conftest.beam
1902 if { { ac_try="$ac_compile"
1903 case "(($ac_try" in
1904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1905 *) ac_try_echo=$ac_try;;
1906 esac
1907 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1908 printf "%s\n" "$ac_try_echo"; } >&5
1909 (eval "$ac_compile") 2>conftest.err
1910 ac_status=$?
1911 if test -s conftest.err; then
1912 grep -v '^ *+' conftest.err >conftest.er1
1913 cat conftest.er1 >&5
1914 mv -f conftest.er1 conftest.err
1915 fi
1916 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1917 test $ac_status = 0; } && {
1918 test -z "$ac_c_werror_flag" ||
1919 test ! -s conftest.err
1920 } && test -s conftest.$ac_objext
1921 then :
1922 ac_retval=0
1923 else $as_nop
1924 printf "%s\n" "$as_me: failed program was:" >&5
1925 sed 's/^/| /' conftest.$ac_ext >&5
1926
1927 ac_retval=1
1928 fi
1929 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1930 as_fn_set_status $ac_retval
1931
1932 } # ac_fn_c_try_compile
1933
1934 # ac_fn_c_try_link LINENO
1935 # -----------------------
1936 # Try to link conftest.$ac_ext, and return whether this succeeded.
1937 ac_fn_c_try_link ()
1938 {
1939 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
1941 if { { ac_try="$ac_link"
1942 case "(($ac_try" in
1943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1944 *) ac_try_echo=$ac_try;;
1945 esac
1946 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1947 printf "%s\n" "$ac_try_echo"; } >&5
1948 (eval "$ac_link") 2>conftest.err
1949 ac_status=$?
1950 if test -s conftest.err; then
1951 grep -v '^ *+' conftest.err >conftest.er1
1952 cat conftest.er1 >&5
1953 mv -f conftest.er1 conftest.err
1954 fi
1955 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1956 test $ac_status = 0; } && {
1957 test -z "$ac_c_werror_flag" ||
1958 test ! -s conftest.err
1959 } && test -s conftest$ac_exeext && {
1960 test "$cross_compiling" = yes ||
1961 test -x conftest$ac_exeext
1962 }
1963 then :
1964 ac_retval=0
1965 else $as_nop
1966 printf "%s\n" "$as_me: failed program was:" >&5
1967 sed 's/^/| /' conftest.$ac_ext >&5
1968
1969 ac_retval=1
1970 fi
1971 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1972 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1973 # interfere with the next link command; also delete a directory that is
1974 # left behind by Apple's compiler. We do this before executing the actions.
1975 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1976 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1977 as_fn_set_status $ac_retval
1978
1979 } # ac_fn_c_try_link
1980
1981 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1982 # -------------------------------------------------------
1983 # Tests whether HEADER exists and can be compiled using the include files in
1984 # INCLUDES, setting the cache variable VAR accordingly.
1985 ac_fn_c_check_header_compile ()
1986 {
1987 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1989 printf %s "checking for $2... " >&6; }
1990 if eval test \${$3+y}
1991 then :
1992 printf %s "(cached) " >&6
1993 else $as_nop
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995 /* end confdefs.h. */
1996 $4
1997 #include <$2>
1998 _ACEOF
1999 if ac_fn_c_try_compile "$LINENO"
2000 then :
2001 eval "$3=yes"
2002 else $as_nop
2003 eval "$3=no"
2004 fi
2005 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2006 fi
2007 eval ac_res=\$$3
2008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2009 printf "%s\n" "$ac_res" >&6; }
2010 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2011
2012 } # ac_fn_c_check_header_compile
2013
2014 # ac_fn_c_check_func LINENO FUNC VAR
2015 # ----------------------------------
2016 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2017 ac_fn_c_check_func ()
2018 {
2019 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2021 printf %s "checking for $2... " >&6; }
2022 if eval test \${$3+y}
2023 then :
2024 printf %s "(cached) " >&6
2025 else $as_nop
2026 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2027 /* end confdefs.h. */
2028 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2029 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2030 #define $2 innocuous_$2
2031
2032 /* System header to define __stub macros and hopefully few prototypes,
2033 which can conflict with char $2 (); below. */
2034
2035 #include <limits.h>
2036 #undef $2
2037
2038 /* Override any GCC internal prototype to avoid an error.
2039 Use char because int might match the return type of a GCC
2040 builtin and then its argument prototype would still apply. */
2041 #ifdef __cplusplus
2042 extern "C"
2043 #endif
2044 char $2 ();
2045 /* The GNU C library defines this for functions which it implements
2046 to always fail with ENOSYS. Some functions are actually named
2047 something starting with __ and the normal name is an alias. */
2048 #if defined __stub_$2 || defined __stub___$2
2049 choke me
2050 #endif
2051
2052 int
2053 main (void)
2054 {
2055 return $2 ();
2056 ;
2057 return 0;
2058 }
2059 _ACEOF
2060 if ac_fn_c_try_link "$LINENO"
2061 then :
2062 eval "$3=yes"
2063 else $as_nop
2064 eval "$3=no"
2065 fi
2066 rm -f core conftest.err conftest.$ac_objext conftest.beam \
2067 conftest$ac_exeext conftest.$ac_ext
2068 fi
2069 eval ac_res=\$$3
2070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2071 printf "%s\n" "$ac_res" >&6; }
2072 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2073
2074 } # ac_fn_c_check_func
2075
2076 # ac_fn_c_try_cpp LINENO
2077 # ----------------------
2078 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2079 ac_fn_c_try_cpp ()
2080 {
2081 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2082 if { { ac_try="$ac_cpp conftest.$ac_ext"
2083 case "(($ac_try" in
2084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2085 *) ac_try_echo=$ac_try;;
2086 esac
2087 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2088 printf "%s\n" "$ac_try_echo"; } >&5
2089 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2090 ac_status=$?
2091 if test -s conftest.err; then
2092 grep -v '^ *+' conftest.err >conftest.er1
2093 cat conftest.er1 >&5
2094 mv -f conftest.er1 conftest.err
2095 fi
2096 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2097 test $ac_status = 0; } > conftest.i && {
2098 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2099 test ! -s conftest.err
2100 }
2101 then :
2102 ac_retval=0
2103 else $as_nop
2104 printf "%s\n" "$as_me: failed program was:" >&5
2105 sed 's/^/| /' conftest.$ac_ext >&5
2106
2107 ac_retval=1
2108 fi
2109 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2110 as_fn_set_status $ac_retval
2111
2112 } # ac_fn_c_try_cpp
2113
2114 # ac_fn_c_try_run LINENO
2115 # ----------------------
2116 # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that
2117 # executables *can* be run.
2118 ac_fn_c_try_run ()
2119 {
2120 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2121 if { { ac_try="$ac_link"
2122 case "(($ac_try" in
2123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2124 *) ac_try_echo=$ac_try;;
2125 esac
2126 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2127 printf "%s\n" "$ac_try_echo"; } >&5
2128 (eval "$ac_link") 2>&5
2129 ac_status=$?
2130 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2131 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2132 { { case "(($ac_try" in
2133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2134 *) ac_try_echo=$ac_try;;
2135 esac
2136 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2137 printf "%s\n" "$ac_try_echo"; } >&5
2138 (eval "$ac_try") 2>&5
2139 ac_status=$?
2140 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2141 test $ac_status = 0; }; }
2142 then :
2143 ac_retval=0
2144 else $as_nop
2145 printf "%s\n" "$as_me: program exited with status $ac_status" >&5
2146 printf "%s\n" "$as_me: failed program was:" >&5
2147 sed 's/^/| /' conftest.$ac_ext >&5
2148
2149 ac_retval=$ac_status
2150 fi
2151 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2152 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2153 as_fn_set_status $ac_retval
2154
2155 } # ac_fn_c_try_run
2156
2157 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2158 # -------------------------------------------
2159 # Tests whether TYPE exists after having included INCLUDES, setting cache
2160 # variable VAR accordingly.
2161 ac_fn_c_check_type ()
2162 {
2163 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2165 printf %s "checking for $2... " >&6; }
2166 if eval test \${$3+y}
2167 then :
2168 printf %s "(cached) " >&6
2169 else $as_nop
2170 eval "$3=no"
2171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172 /* end confdefs.h. */
2173 $4
2174 int
2175 main (void)
2176 {
2177 if (sizeof ($2))
2178 return 0;
2179 ;
2180 return 0;
2181 }
2182 _ACEOF
2183 if ac_fn_c_try_compile "$LINENO"
2184 then :
2185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2186 /* end confdefs.h. */
2187 $4
2188 int
2189 main (void)
2190 {
2191 if (sizeof (($2)))
2192 return 0;
2193 ;
2194 return 0;
2195 }
2196 _ACEOF
2197 if ac_fn_c_try_compile "$LINENO"
2198 then :
2199
2200 else $as_nop
2201 eval "$3=yes"
2202 fi
2203 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2204 fi
2205 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2206 fi
2207 eval ac_res=\$$3
2208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2209 printf "%s\n" "$ac_res" >&6; }
2210 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2211
2212 } # ac_fn_c_check_type
2213
2214 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2215 # --------------------------------------------
2216 # Tries to find the compile-time value of EXPR in a program that includes
2217 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2218 # computed
2219 ac_fn_c_compute_int ()
2220 {
2221 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2222 if test "$cross_compiling" = yes; then
2223 # Depending upon the size, compute the lo and hi bounds.
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225 /* end confdefs.h. */
2226 $4
2227 int
2228 main (void)
2229 {
2230 static int test_array [1 - 2 * !(($2) >= 0)];
2231 test_array [0] = 0;
2232 return test_array [0];
2233
2234 ;
2235 return 0;
2236 }
2237 _ACEOF
2238 if ac_fn_c_try_compile "$LINENO"
2239 then :
2240 ac_lo=0 ac_mid=0
2241 while :; do
2242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243 /* end confdefs.h. */
2244 $4
2245 int
2246 main (void)
2247 {
2248 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2249 test_array [0] = 0;
2250 return test_array [0];
2251
2252 ;
2253 return 0;
2254 }
2255 _ACEOF
2256 if ac_fn_c_try_compile "$LINENO"
2257 then :
2258 ac_hi=$ac_mid; break
2259 else $as_nop
2260 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2261 if test $ac_lo -le $ac_mid; then
2262 ac_lo= ac_hi=
2263 break
2264 fi
2265 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2266 fi
2267 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2268 done
2269 else $as_nop
2270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2271 /* end confdefs.h. */
2272 $4
2273 int
2274 main (void)
2275 {
2276 static int test_array [1 - 2 * !(($2) < 0)];
2277 test_array [0] = 0;
2278 return test_array [0];
2279
2280 ;
2281 return 0;
2282 }
2283 _ACEOF
2284 if ac_fn_c_try_compile "$LINENO"
2285 then :
2286 ac_hi=-1 ac_mid=-1
2287 while :; do
2288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2289 /* end confdefs.h. */
2290 $4
2291 int
2292 main (void)
2293 {
2294 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2295 test_array [0] = 0;
2296 return test_array [0];
2297
2298 ;
2299 return 0;
2300 }
2301 _ACEOF
2302 if ac_fn_c_try_compile "$LINENO"
2303 then :
2304 ac_lo=$ac_mid; break
2305 else $as_nop
2306 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2307 if test $ac_mid -le $ac_hi; then
2308 ac_lo= ac_hi=
2309 break
2310 fi
2311 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2312 fi
2313 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2314 done
2315 else $as_nop
2316 ac_lo= ac_hi=
2317 fi
2318 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2319 fi
2320 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2321 # Binary search between lo and hi bounds.
2322 while test "x$ac_lo" != "x$ac_hi"; do
2323 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2325 /* end confdefs.h. */
2326 $4
2327 int
2328 main (void)
2329 {
2330 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2331 test_array [0] = 0;
2332 return test_array [0];
2333
2334 ;
2335 return 0;
2336 }
2337 _ACEOF
2338 if ac_fn_c_try_compile "$LINENO"
2339 then :
2340 ac_hi=$ac_mid
2341 else $as_nop
2342 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2343 fi
2344 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2345 done
2346 case $ac_lo in #((
2347 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2348 '') ac_retval=1 ;;
2349 esac
2350 else
2351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2352 /* end confdefs.h. */
2353 $4
2354 static long int longval (void) { return $2; }
2355 static unsigned long int ulongval (void) { return $2; }
2356 #include <stdio.h>
2357 #include <stdlib.h>
2358 int
2359 main (void)
2360 {
2361
2362 FILE *f = fopen ("conftest.val", "w");
2363 if (! f)
2364 return 1;
2365 if (($2) < 0)
2366 {
2367 long int i = longval ();
2368 if (i != ($2))
2369 return 1;
2370 fprintf (f, "%ld", i);
2371 }
2372 else
2373 {
2374 unsigned long int i = ulongval ();
2375 if (i != ($2))
2376 return 1;
2377 fprintf (f, "%lu", i);
2378 }
2379 /* Do not output a trailing newline, as this causes \r\n confusion
2380 on some platforms. */
2381 return ferror (f) || fclose (f) != 0;
2382
2383 ;
2384 return 0;
2385 }
2386 _ACEOF
2387 if ac_fn_c_try_run "$LINENO"
2388 then :
2389 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2390 else $as_nop
2391 ac_retval=1
2392 fi
2393 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2394 conftest.$ac_objext conftest.beam conftest.$ac_ext
2395 rm -f conftest.val
2396
2397 fi
2398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2399 as_fn_set_status $ac_retval
2400
2401 } # ac_fn_c_compute_int
2402
2403 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2404 # ----------------------------------------------------
2405 # Tries to find if the field MEMBER exists in type AGGR, after including
2406 # INCLUDES, setting cache variable VAR accordingly.
2407 ac_fn_c_check_member ()
2408 {
2409 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2411 printf %s "checking for $2.$3... " >&6; }
2412 if eval test \${$4+y}
2413 then :
2414 printf %s "(cached) " >&6
2415 else $as_nop
2416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417 /* end confdefs.h. */
2418 $5
2419 int
2420 main (void)
2421 {
2422 static $2 ac_aggr;
2423 if (ac_aggr.$3)
2424 return 0;
2425 ;
2426 return 0;
2427 }
2428 _ACEOF
2429 if ac_fn_c_try_compile "$LINENO"
2430 then :
2431 eval "$4=yes"
2432 else $as_nop
2433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2434 /* end confdefs.h. */
2435 $5
2436 int
2437 main (void)
2438 {
2439 static $2 ac_aggr;
2440 if (sizeof ac_aggr.$3)
2441 return 0;
2442 ;
2443 return 0;
2444 }
2445 _ACEOF
2446 if ac_fn_c_try_compile "$LINENO"
2447 then :
2448 eval "$4=yes"
2449 else $as_nop
2450 eval "$4=no"
2451 fi
2452 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2453 fi
2454 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2455 fi
2456 eval ac_res=\$$4
2457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2458 printf "%s\n" "$ac_res" >&6; }
2459 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2460
2461 } # ac_fn_c_check_member
2462
2463 # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR
2464 # ------------------------------------------------------------------
2465 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2466 # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR.
2467 ac_fn_check_decl ()
2468 {
2469 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2470 as_decl_name=`echo $2|sed 's/ *(.*//'`
2471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2472 printf %s "checking whether $as_decl_name is declared... " >&6; }
2473 if eval test \${$3+y}
2474 then :
2475 printf %s "(cached) " >&6
2476 else $as_nop
2477 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2478 eval ac_save_FLAGS=\$$6
2479 as_fn_append $6 " $5"
2480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2481 /* end confdefs.h. */
2482 $4
2483 int
2484 main (void)
2485 {
2486 #ifndef $as_decl_name
2487 #ifdef __cplusplus
2488 (void) $as_decl_use;
2489 #else
2490 (void) $as_decl_name;
2491 #endif
2492 #endif
2493
2494 ;
2495 return 0;
2496 }
2497 _ACEOF
2498 if ac_fn_c_try_compile "$LINENO"
2499 then :
2500 eval "$3=yes"
2501 else $as_nop
2502 eval "$3=no"
2503 fi
2504 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
2505 eval $6=\$ac_save_FLAGS
2506
2507 fi
2508 eval ac_res=\$$3
2509 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2510 printf "%s\n" "$ac_res" >&6; }
2511 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2512
2513 } # ac_fn_check_decl
2514 ac_configure_args_raw=
2515 for ac_arg
2516 do
2517 case $ac_arg in
2518 *\'*)
2519 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2520 esac
2521 as_fn_append ac_configure_args_raw " '$ac_arg'"
2522 done
2523
2524 case $ac_configure_args_raw in
2525 *$as_nl*)
2526 ac_safe_unquote= ;;
2527 *)
2528 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab.
2529 ac_unsafe_a="$ac_unsafe_z#~"
2530 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g"
2531 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;;
2532 esac
2533
2534 cat >config.log <<_ACEOF
2535 This file contains any messages produced by compilers while
2536 running configure, to aid debugging if configure makes a mistake.
2537
2538 It was created by OCaml $as_me 5.4.1, which was
2539 generated by GNU Autoconf 2.71. Invocation command line was
2540
2541 $ $0$ac_configure_args_raw
2542
2543 _ACEOF
2544 exec 5>>config.log
2545 {
2546 cat <<_ASUNAME
2547 ## --------- ##
2548 ## Platform. ##
2549 ## --------- ##
2550
2551 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2552 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2553 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2554 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2555 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2556
2557 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2558 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2559
2560 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2561 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2562 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2563 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2564 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2565 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2566 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2567
2568 _ASUNAME
2569
2570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2571 for as_dir in $PATH
2572 do
2573 IFS=$as_save_IFS
2574 case $as_dir in #(((
2575 '') as_dir=./ ;;
2576 */) ;;
2577 *) as_dir=$as_dir/ ;;
2578 esac
2579 printf "%s\n" "PATH: $as_dir"
2580 done
2581 IFS=$as_save_IFS
2582
2583 } >&5
2584
2585 cat >&5 <<_ACEOF
2586
2587
2588 ## ----------- ##
2589 ## Core tests. ##
2590 ## ----------- ##
2591
2592 _ACEOF
2593
2594
2595 # Keep a trace of the command line.
2596 # Strip out --no-create and --no-recursion so they do not pile up.
2597 # Strip out --silent because we don't want to record it for future runs.
2598 # Also quote any args containing shell meta-characters.
2599 # Make two passes to allow for proper duplicate-argument suppression.
2600 ac_configure_args=
2601 ac_configure_args0=
2602 ac_configure_args1=
2603 ac_must_keep_next=false
2604 for ac_pass in 1 2
2605 do
2606 for ac_arg
2607 do
2608 case $ac_arg in
2609 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2610 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2611 | -silent | --silent | --silen | --sile | --sil)
2612 continue ;;
2613 *\'*)
2614 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2615 esac
2616 case $ac_pass in
2617 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2618 2)
2619 as_fn_append ac_configure_args1 " '$ac_arg'"
2620 if test $ac_must_keep_next = true; then
2621 ac_must_keep_next=false # Got value, back to normal.
2622 else
2623 case $ac_arg in
2624 *=* | --config-cache | -C | -disable-* | --disable-* \
2625 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2626 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2627 | -with-* | --with-* | -without-* | --without-* | --x)
2628 case "$ac_configure_args0 " in
2629 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2630 esac
2631 ;;
2632 -* ) ac_must_keep_next=true ;;
2633 esac
2634 fi
2635 as_fn_append ac_configure_args " '$ac_arg'"
2636 ;;
2637 esac
2638 done
2639 done
2640 { ac_configure_args0=; unset ac_configure_args0;}
2641 { ac_configure_args1=; unset ac_configure_args1;}
2642
2643 # When interrupted or exit'd, cleanup temporary files, and complete
2644 # config.log. We remove comments because anyway the quotes in there
2645 # would cause problems or look ugly.
2646 # WARNING: Use '\'' to represent an apostrophe within the trap.
2647 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2648 trap 'exit_status=$?
2649 # Sanitize IFS.
2650 IFS=" "" $as_nl"
2651 # Save into config.log some information that might help in debugging.
2652 {
2653 echo
2654
2655 printf "%s\n" "## ---------------- ##
2656 ## Cache variables. ##
2657 ## ---------------- ##"
2658 echo
2659 # The following way of writing the cache mishandles newlines in values,
2660 (
2661 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2662 eval ac_val=\$$ac_var
2663 case $ac_val in #(
2664 *${as_nl}*)
2665 case $ac_var in #(
2666 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2667 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2668 esac
2669 case $ac_var in #(
2670 _ | IFS | as_nl) ;; #(
2671 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2672 *) { eval $ac_var=; unset $ac_var;} ;;
2673 esac ;;
2674 esac
2675 done
2676 (set) 2>&1 |
2677 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2678 *${as_nl}ac_space=\ *)
2679 sed -n \
2680 "s/'\''/'\''\\\\'\'''\''/g;
2681 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2682 ;; #(
2683 *)
2684 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2685 ;;
2686 esac |
2687 sort
2688 )
2689 echo
2690
2691 printf "%s\n" "## ----------------- ##
2692 ## Output variables. ##
2693 ## ----------------- ##"
2694 echo
2695 for ac_var in $ac_subst_vars
2696 do
2697 eval ac_val=\$$ac_var
2698 case $ac_val in
2699 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2700 esac
2701 printf "%s\n" "$ac_var='\''$ac_val'\''"
2702 done | sort
2703 echo
2704
2705 if test -n "$ac_subst_files"; then
2706 printf "%s\n" "## ------------------- ##
2707 ## File substitutions. ##
2708 ## ------------------- ##"
2709 echo
2710 for ac_var in $ac_subst_files
2711 do
2712 eval ac_val=\$$ac_var
2713 case $ac_val in
2714 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2715 esac
2716 printf "%s\n" "$ac_var='\''$ac_val'\''"
2717 done | sort
2718 echo
2719 fi
2720
2721 if test -s confdefs.h; then
2722 printf "%s\n" "## ----------- ##
2723 ## confdefs.h. ##
2724 ## ----------- ##"
2725 echo
2726 cat confdefs.h
2727 echo
2728 fi
2729 test "$ac_signal" != 0 &&
2730 printf "%s\n" "$as_me: caught signal $ac_signal"
2731 printf "%s\n" "$as_me: exit $exit_status"
2732 } >&5
2733 rm -f core *.core core.conftest.* &&
2734 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2735 exit $exit_status
2736 ' 0
2737 for ac_signal in 1 2 13 15; do
2738 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2739 done
2740 ac_signal=0
2741
2742 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2743 rm -f -r conftest* confdefs.h
2744
2745 printf "%s\n" "/* confdefs.h */" > confdefs.h
2746
2747 # Predefined preprocessor variables.
2748
2749 printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h
2750
2751 printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h
2752
2753 printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h
2754
2755 printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h
2756
2757 printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h
2758
2759 printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h
2760
2761
2762 # Let the site file select an alternate cache file if it wants to.
2763 # Prefer an explicitly selected file to automatically selected ones.
2764 if test -n "$CONFIG_SITE"; then
2765 ac_site_files="$CONFIG_SITE"
2766 elif test "x$prefix" != xNONE; then
2767 ac_site_files="$prefix/share/config.site $prefix/etc/config.site"
2768 else
2769 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
2770 fi
2771
2772 for ac_site_file in $ac_site_files
2773 do
2774 case $ac_site_file in #(
2775 */*) :
2776 ;; #(
2777 *) :
2778 ac_site_file=./$ac_site_file ;;
2779 esac
2780 if test -f "$ac_site_file" && test -r "$ac_site_file"; then
2781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2782 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;}
2783 sed 's/^/| /' "$ac_site_file" >&5
2784 . "$ac_site_file" \
2785 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2786 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
2787 as_fn_error $? "failed to load site script $ac_site_file
2788 See \`config.log' for more details" "$LINENO" 5; }
2789 fi
2790 done
2791
2792 if test -r "$cache_file"; then
2793 # Some versions of bash will fail to source /dev/null (special files
2794 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2795 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2797 printf "%s\n" "$as_me: loading cache $cache_file" >&6;}
2798 case $cache_file in
2799 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2800 *) . "./$cache_file";;
2801 esac
2802 fi
2803 else
2804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2805 printf "%s\n" "$as_me: creating cache $cache_file" >&6;}
2806 >$cache_file
2807 fi
2808
2809 # Test code for whether the C compiler supports C89 (global declarations)
2810 ac_c_conftest_c89_globals='
2811 /* Does the compiler advertise C89 conformance?
2812 Do not test the value of __STDC__, because some compilers set it to 0
2813 while being otherwise adequately conformant. */
2814 #if !defined __STDC__
2815 # error "Compiler does not advertise C89 conformance"
2816 #endif
2817
2818 #include <stddef.h>
2819 #include <stdarg.h>
2820 struct stat;
2821 /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
2822 struct buf { int x; };
2823 struct buf * (*rcsopen) (struct buf *, struct stat *, int);
2824 static char *e (p, i)
2825 char **p;
2826 int i;
2827 {
2828 return p[i];
2829 }
2830 static char *f (char * (*g) (char **, int), char **p, ...)
2831 {
2832 char *s;
2833 va_list v;
2834 va_start (v,p);
2835 s = g (p, va_arg (v,int));
2836 va_end (v);
2837 return s;
2838 }
2839
2840 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2841 function prototypes and stuff, but not \xHH hex character constants.
2842 These do not provoke an error unfortunately, instead are silently treated
2843 as an "x". The following induces an error, until -std is added to get
2844 proper ANSI mode. Curiously \x00 != x always comes out true, for an
2845 array size at least. It is necessary to write \x00 == 0 to get something
2846 that is true only with -std. */
2847 int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1];
2848
2849 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
2850 inside strings and character constants. */
2851 #define FOO(x) '\''x'\''
2852 int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1];
2853
2854 int test (int i, double x);
2855 struct s1 {int (*f) (int a);};
2856 struct s2 {int (*f) (double a);};
2857 int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int),
2858 int, int);'
2859
2860 # Test code for whether the C compiler supports C89 (body of main).
2861 ac_c_conftest_c89_main='
2862 ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]);
2863 '
2864
2865 # Test code for whether the C compiler supports C99 (global declarations)
2866 ac_c_conftest_c99_globals='
2867 // Does the compiler advertise C99 conformance?
2868 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L
2869 # error "Compiler does not advertise C99 conformance"
2870 #endif
2871
2872 #include <stdbool.h>
2873 extern int puts (const char *);
2874 extern int printf (const char *, ...);
2875 extern int dprintf (int, const char *, ...);
2876 extern void *malloc (size_t);
2877
2878 // Check varargs macros. These examples are taken from C99 6.10.3.5.
2879 // dprintf is used instead of fprintf to avoid needing to declare
2880 // FILE and stderr.
2881 #define debug(...) dprintf (2, __VA_ARGS__)
2882 #define showlist(...) puts (#__VA_ARGS__)
2883 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
2884 static void
2885 test_varargs_macros (void)
2886 {
2887 int x = 1234;
2888 int y = 5678;
2889 debug ("Flag");
2890 debug ("X = %d\n", x);
2891 showlist (The first, second, and third items.);
2892 report (x>y, "x is %d but y is %d", x, y);
2893 }
2894
2895 // Check long long types.
2896 #define BIG64 18446744073709551615ull
2897 #define BIG32 4294967295ul
2898 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
2899 #if !BIG_OK
2900 #error "your preprocessor is broken"
2901 #endif
2902 #if BIG_OK
2903 #else
2904 #error "your preprocessor is broken"
2905 #endif
2906 static long long int bignum = -9223372036854775807LL;
2907 static unsigned long long int ubignum = BIG64;
2908
2909 struct incomplete_array
2910 {
2911 int datasize;
2912 double data[];
2913 };
2914
2915 struct named_init {
2916 int number;
2917 const wchar_t *name;
2918 double average;
2919 };
2920
2921 typedef const char *ccp;
2922
2923 static inline int
2924 test_restrict (ccp restrict text)
2925 {
2926 // See if C++-style comments work.
2927 // Iterate through items via the restricted pointer.
2928 // Also check for declarations in for loops.
2929 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i)
2930 continue;
2931 return 0;
2932 }
2933
2934 // Check varargs and va_copy.
2935 static bool
2936 test_varargs (const char *format, ...)
2937 {
2938 va_list args;
2939 va_start (args, format);
2940 va_list args_copy;
2941 va_copy (args_copy, args);
2942
2943 const char *str = "";
2944 int number = 0;
2945 float fnumber = 0;
2946
2947 while (*format)
2948 {
2949 switch (*format++)
2950 {
2951 case '\''s'\'': // string
2952 str = va_arg (args_copy, const char *);
2953 break;
2954 case '\''d'\'': // int
2955 number = va_arg (args_copy, int);
2956 break;
2957 case '\''f'\'': // float
2958 fnumber = va_arg (args_copy, double);
2959 break;
2960 default:
2961 break;
2962 }
2963 }
2964 va_end (args_copy);
2965 va_end (args);
2966
2967 return *str && number && fnumber;
2968 }
2969 '
2970
2971 # Test code for whether the C compiler supports C99 (body of main).
2972 ac_c_conftest_c99_main='
2973 // Check bool.
2974 _Bool success = false;
2975 success |= (argc != 0);
2976
2977 // Check restrict.
2978 if (test_restrict ("String literal") == 0)
2979 success = true;
2980 char *restrict newvar = "Another string";
2981
2982 // Check varargs.
2983 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234);
2984 test_varargs_macros ();
2985
2986 // Check flexible array members.
2987 struct incomplete_array *ia =
2988 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
2989 ia->datasize = 10;
2990 for (int i = 0; i < ia->datasize; ++i)
2991 ia->data[i] = i * 1.234;
2992
2993 // Check named initializers.
2994 struct named_init ni = {
2995 .number = 34,
2996 .name = L"Test wide string",
2997 .average = 543.34343,
2998 };
2999
3000 ni.number = 58;
3001
3002 int dynamic_array[ni.number];
3003 dynamic_array[0] = argv[0][0];
3004 dynamic_array[ni.number - 1] = 543;
3005
3006 // work around unused variable warnings
3007 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\''
3008 || dynamic_array[ni.number - 1] != 543);
3009 '
3010
3011 # Test code for whether the C compiler supports C11 (global declarations)
3012 ac_c_conftest_c11_globals='
3013 // Does the compiler advertise C11 conformance?
3014 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L
3015 # error "Compiler does not advertise C11 conformance"
3016 #endif
3017
3018 // Check _Alignas.
3019 char _Alignas (double) aligned_as_double;
3020 char _Alignas (0) no_special_alignment;
3021 extern char aligned_as_int;
3022 char _Alignas (0) _Alignas (int) aligned_as_int;
3023
3024 // Check _Alignof.
3025 enum
3026 {
3027 int_alignment = _Alignof (int),
3028 int_array_alignment = _Alignof (int[100]),
3029 char_alignment = _Alignof (char)
3030 };
3031 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
3032
3033 // Check _Noreturn.
3034 int _Noreturn does_not_return (void) { for (;;) continue; }
3035
3036 // Check _Static_assert.
3037 struct test_static_assert
3038 {
3039 int x;
3040 _Static_assert (sizeof (int) <= sizeof (long int),
3041 "_Static_assert does not work in struct");
3042 long int y;
3043 };
3044
3045 // Check UTF-8 literals.
3046 #define u8 syntax error!
3047 char const utf8_literal[] = u8"happens to be ASCII" "another string";
3048
3049 // Check duplicate typedefs.
3050 typedef long *long_ptr;
3051 typedef long int *long_ptr;
3052 typedef long_ptr long_ptr;
3053
3054 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
3055 struct anonymous
3056 {
3057 union {
3058 struct { int i; int j; };
3059 struct { int k; long int l; } w;
3060 };
3061 int m;
3062 } v1;
3063 '
3064
3065 # Test code for whether the C compiler supports C11 (body of main).
3066 ac_c_conftest_c11_main='
3067 _Static_assert ((offsetof (struct anonymous, i)
3068 == offsetof (struct anonymous, w.k)),
3069 "Anonymous union alignment botch");
3070 v1.i = 2;
3071 v1.w.k = 5;
3072 ok |= v1.i != 5;
3073 '
3074
3075 # Test code for whether the C compiler supports C11 (complete).
3076 ac_c_conftest_c11_program="${ac_c_conftest_c89_globals}
3077 ${ac_c_conftest_c99_globals}
3078 ${ac_c_conftest_c11_globals}
3079
3080 int
3081 main (int argc, char **argv)
3082 {
3083 int ok = 0;
3084 ${ac_c_conftest_c89_main}
3085 ${ac_c_conftest_c99_main}
3086 ${ac_c_conftest_c11_main}
3087 return ok;
3088 }
3089 "
3090
3091 # Test code for whether the C compiler supports C99 (complete).
3092 ac_c_conftest_c99_program="${ac_c_conftest_c89_globals}
3093 ${ac_c_conftest_c99_globals}
3094
3095 int
3096 main (int argc, char **argv)
3097 {
3098 int ok = 0;
3099 ${ac_c_conftest_c89_main}
3100 ${ac_c_conftest_c99_main}
3101 return ok;
3102 }
3103 "
3104
3105 # Test code for whether the C compiler supports C89 (complete).
3106 ac_c_conftest_c89_program="${ac_c_conftest_c89_globals}
3107
3108 int
3109 main (int argc, char **argv)
3110 {
3111 int ok = 0;
3112 ${ac_c_conftest_c89_main}
3113 return ok;
3114 }
3115 "
3116
3117 as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
3118 as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
3119 as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
3120 as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
3121 as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
3122 as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
3123 as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
3124 as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
3125 as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
3126
3127 # Auxiliary files required by this configure script.
3128 ac_aux_files="install-sh ltmain.sh config.guess config.sub"
3129
3130 # Locations in which to look for auxiliary files.
3131 ac_aux_dir_candidates="${srcdir}/build-aux"
3132
3133 # Search for a directory containing all of the required auxiliary files,
3134 # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates.
3135 # If we don't find one directory that contains all the files we need,
3136 # we report the set of missing files from the *first* directory in
3137 # $ac_aux_dir_candidates and give up.
3138 ac_missing_aux_files=""
3139 ac_first_candidate=:
3140 printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5
3141 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3142 as_found=false
3143 for as_dir in $ac_aux_dir_candidates
3144 do
3145 IFS=$as_save_IFS
3146 case $as_dir in #(((
3147 '') as_dir=./ ;;
3148 */) ;;
3149 *) as_dir=$as_dir/ ;;
3150 esac
3151 as_found=:
3152
3153 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5
3154 ac_aux_dir_found=yes
3155 ac_install_sh=
3156 for ac_aux in $ac_aux_files
3157 do
3158 # As a special case, if "install-sh" is required, that requirement
3159 # can be satisfied by any of "install-sh", "install.sh", or "shtool",
3160 # and $ac_install_sh is set appropriately for whichever one is found.
3161 if test x"$ac_aux" = x"install-sh"
3162 then
3163 if test -f "${as_dir}install-sh"; then
3164 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5
3165 ac_install_sh="${as_dir}install-sh -c"
3166 elif test -f "${as_dir}install.sh"; then
3167 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5
3168 ac_install_sh="${as_dir}install.sh -c"
3169 elif test -f "${as_dir}shtool"; then
3170 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5
3171 ac_install_sh="${as_dir}shtool install -c"
3172 else
3173 ac_aux_dir_found=no
3174 if $ac_first_candidate; then
3175 ac_missing_aux_files="${ac_missing_aux_files} install-sh"
3176 else
3177 break
3178 fi
3179 fi
3180 else
3181 if test -f "${as_dir}${ac_aux}"; then
3182 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5
3183 else
3184 ac_aux_dir_found=no
3185 if $ac_first_candidate; then
3186 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}"
3187 else
3188 break
3189 fi
3190 fi
3191 fi
3192 done
3193 if test "$ac_aux_dir_found" = yes; then
3194 ac_aux_dir="$as_dir"
3195 break
3196 fi
3197 ac_first_candidate=false
3198
3199 as_found=false
3200 done
3201 IFS=$as_save_IFS
3202 if $as_found
3203 then :
3204
3205 else $as_nop
3206 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5
3207 fi
3208
3209
3210 # These three variables are undocumented and unsupported,
3211 # and are intended to be withdrawn in a future Autoconf release.
3212 # They can cause serious problems if a builder's source tree is in a directory
3213 # whose full name contains unusual characters.
3214 if test -f "${ac_aux_dir}config.guess"; then
3215 ac_config_guess="$SHELL ${ac_aux_dir}config.guess"
3216 fi
3217 if test -f "${ac_aux_dir}config.sub"; then
3218 ac_config_sub="$SHELL ${ac_aux_dir}config.sub"
3219 fi
3220 if test -f "$ac_aux_dir/configure"; then
3221 ac_configure="$SHELL ${ac_aux_dir}configure"
3222 fi
3223
3224 # Check that the precious variables saved in the cache have kept the same
3225 # value.
3226 ac_cache_corrupted=false
3227 for ac_var in $ac_precious_vars; do
3228 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3229 eval ac_new_set=\$ac_env_${ac_var}_set
3230 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3231 eval ac_new_val=\$ac_env_${ac_var}_value
3232 case $ac_old_set,$ac_new_set in
3233 set,)
3234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3235 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3236 ac_cache_corrupted=: ;;
3237 ,set)
3238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3239 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3240 ac_cache_corrupted=: ;;
3241 ,);;
3242 *)
3243 if test "x$ac_old_val" != "x$ac_new_val"; then
3244 # differences in whitespace do not lead to failure.
3245 ac_old_val_w=`echo x $ac_old_val`
3246 ac_new_val_w=`echo x $ac_new_val`
3247 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3249 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3250 ac_cache_corrupted=:
3251 else
3252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3253 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3254 eval $ac_var=\$ac_old_val
3255 fi
3256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3257 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;}
3258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3259 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;}
3260 fi;;
3261 esac
3262 # Pass precious variables to config.status.
3263 if test "$ac_new_set" = set; then
3264 case $ac_new_val in
3265 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3266 *) ac_arg=$ac_var=$ac_new_val ;;
3267 esac
3268 case " $ac_configure_args " in
3269 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3270 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3271 esac
3272 fi
3273 done
3274 if $ac_cache_corrupted; then
3275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3276 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
3277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3278 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;}
3279 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file'
3280 and start over" "$LINENO" 5
3281 fi
3282 ## -------------------- ##
3283 ## Main body of script. ##
3284 ## -------------------- ##
3285
3286 ac_ext=c
3287 ac_cpp='$CPP $CPPFLAGS'
3288 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3289 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3290 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3291
3292
3293
3294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Configuring OCaml version 5.4.1" >&5
3295 printf "%s\n" "$as_me: Configuring OCaml version 5.4.1" >&6;}
3296
3297 # Configuration variables
3298
3299 ## Command-line arguments passed to configure
3300 CONFIGURE_ARGS="$*"
3301
3302 # Command to build executables
3303 # Ultimately, MKEXE may build an executable using the C compiler or it may use
3304 # a wrapper for a linker (i.e. flexlink). The build system must therefore not
3305 # rely on $CFLAGS because these cannot be processed by flexlink (and are not
3306 # passed)
3307 mkexe_cmd='$(CC)'
3308 mkexe_extra_flags=''
3309 mkexe_via_cc_extra_cmd=''
3310 mkexe_ldflags_prefix=''
3311 mkexe_via_cc_ldflags_prefix=''
3312
3313 # Flags for building executable files with debugging symbols
3314 mkexedebugflag="-g"
3315 common_cflags=""
3316 common_cppflags=""
3317 internal_cflags=""
3318 internal_cppflags=""
3319 bytecode_cflags=""
3320 bytecode_cppflags=""
3321 oc_ldflags=""
3322 oc_dll_ldflags=""
3323 oc_exe_ldflags=""
3324
3325 tsan=false
3326 # TSan flags for each compilation stage
3327 tsan_cppflags="-DWITH_THREAD_SANITIZER"
3328 tsan_cflags="-fsanitize=thread"
3329 tsan_distinguish_volatile_cflags=""
3330 tsan_ldflags="-fsanitize=thread"
3331
3332 # The C# compiler and its flags
3333 CSC=""
3334 CSCFLAGS=""
3335
3336 ostype="Unix"
3337 SO="so"
3338 toolchain="cc"
3339 reserved_header_bits=0
3340 instrumented_runtime=false
3341 instrumented_runtime_libs=""
3342 bootstrapping_flexdll=false
3343 flexdll_dir=
3344 lib_dynlink=false
3345 lib_str=false
3346 lib_systhreads=false
3347 lib_unix=false
3348 optional_libraries=''
3349 optional_bytecode_tools=''
3350 optional_native_tools=''
3351 ocamltest_libunix=None
3352 ocamltest_unix_impl="dummy"
3353 unix_library=""
3354 unix_directory=""
3355
3356 # Information about the package
3357
3358 ## Source directory
3359
3360
3361 ## Directory containing auxiliary scripts used during build
3362
3363
3364 ## Output variables
3365
3366
3367
3368
3369 VERSION=5.4.1
3370
3371 OCAML_DEVELOPMENT_VERSION=false
3372
3373 OCAML_RELEASE_EXTRA=None
3374
3375 OCAML_VERSION_MAJOR=5
3376
3377 OCAML_VERSION_MINOR=4
3378
3379 OCAML_VERSION_PATCHLEVEL=1
3380
3381 OCAML_VERSION_EXTRA=
3382
3383 OCAML_VERSION_SHORT=5.4
3384
3385 printf "%s\n" "#define MAGIC_NUMBER_PREFIX \"Caml1999\"" >>confdefs.h
3386
3387 printf "%s\n" "#define MAGIC_NUMBER_VERSION \"036\"" >>confdefs.h
3388
3389 printf "%s\n" "#define EXEC_MAGIC_LENGTH 12" >>confdefs.h
3390
3391 MAGIC_LENGTH=12
3392
3393 printf "%s\n" "#define EXEC_FORMAT \"X\"" >>confdefs.h
3394
3395 EXEC_MAGIC_NUMBER=Caml1999X036
3396
3397 CMI_MAGIC_NUMBER=Caml1999I036
3398
3399 CMO_MAGIC_NUMBER=Caml1999O036
3400
3401 CMA_MAGIC_NUMBER=Caml1999A036
3402
3403
3404
3405 AST_IMPL_MAGIC_NUMBER=Caml1999M036
3406
3407 AST_INTF_MAGIC_NUMBER=Caml1999N036
3408
3409 CMXS_MAGIC_NUMBER=Caml1999D036
3410
3411 CMT_MAGIC_NUMBER=Caml1999T036
3412
3413 LINEAR_MAGIC_NUMBER=Caml1999L036
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423 # Note: This is present for the flexdll bootstrap where it exposed as the old
3424 # TOOLPREF variable. It would be better if flexdll where updated to require
3425 # WINDRES instead.
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508 # TODO: rename this variable
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559 ## Generated files
3560
3561 ac_config_files="$ac_config_files Makefile.build_config"
3562
3563 ac_config_files="$ac_config_files Makefile.config"
3564
3565 ac_config_files="$ac_config_files stdlib/sys.ml"
3566
3567 ac_config_files="$ac_config_files manual/src/version.tex"
3568
3569 ac_config_files="$ac_config_files manual/src/html_processing/src/common.ml"
3570
3571 ac_config_files="$ac_config_files ocamltest/ocamltest_config.ml"
3572
3573 ac_config_files="$ac_config_files otherlibs/dynlink/dynlink_config.ml"
3574
3575 ac_config_files="$ac_config_files utils/config.common.ml"
3576
3577 ac_config_files="$ac_config_files utils/config.generated.ml"
3578
3579 ac_config_headers="$ac_config_headers runtime/caml/exec.h"
3580
3581 ac_config_headers="$ac_config_headers runtime/caml/m.h"
3582
3583 ac_config_headers="$ac_config_headers runtime/caml/s.h"
3584
3585 ac_config_headers="$ac_config_headers runtime/caml/version.h"
3586
3587 ac_config_files="$ac_config_files compilerlibs/META"
3588
3589 ac_config_files="$ac_config_files otherlibs/dynlink/META"
3590
3591 ac_config_files="$ac_config_files otherlibs/runtime_events/META"
3592
3593 ac_config_files="$ac_config_files stdlib/META"
3594
3595
3596 # Definitions related to the version of OCaml
3597 printf "%s\n" "#define OCAML_VERSION_MAJOR 5" >>confdefs.h
3598
3599 printf "%s\n" "#define OCAML_VERSION_MINOR 4" >>confdefs.h
3600
3601 printf "%s\n" "#define OCAML_VERSION_PATCHLEVEL 1" >>confdefs.h
3602
3603 printf "%s\n" "#define OCAML_VERSION_ADDITIONAL \"\"" >>confdefs.h
3604
3605 printf "%s\n" "#define OCAML_VERSION_EXTRA \"\"" >>confdefs.h
3606
3607 printf "%s\n" "#define OCAML_VERSION 50401" >>confdefs.h
3608
3609 printf "%s\n" "#define OCAML_VERSION_STRING \"5.4.1\"" >>confdefs.h
3610
3611
3612 # Works out how many "o"s are needed in quoted strings
3613
3614
3615 # Checks for system types
3616
3617
3618
3619
3620 # Make sure we can run config.sub.
3621 $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 ||
3622 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5
3623
3624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3625 printf %s "checking build system type... " >&6; }
3626 if test ${ac_cv_build+y}
3627 then :
3628 printf %s "(cached) " >&6
3629 else $as_nop
3630 ac_build_alias=$build_alias
3631 test "x$ac_build_alias" = x &&
3632 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"`
3633 test "x$ac_build_alias" = x &&
3634 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3635 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` ||
3636 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5
3637
3638 fi
3639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3640 printf "%s\n" "$ac_cv_build" >&6; }
3641 case $ac_cv_build in
3642 *-*-*) ;;
3643 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3644 esac
3645 build=$ac_cv_build
3646 ac_save_IFS=$IFS; IFS='-'
3647 set x $ac_cv_build
3648 shift
3649 build_cpu=$1
3650 build_vendor=$2
3651 shift; shift
3652 # Remember, the first character of IFS is used to create $*,
3653 # except with old shells:
3654 build_os=$*
3655 IFS=$ac_save_IFS
3656 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3657
3658
3659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3660 printf %s "checking host system type... " >&6; }
3661 if test ${ac_cv_host+y}
3662 then :
3663 printf %s "(cached) " >&6
3664 else $as_nop
3665 if test "x$host_alias" = x; then
3666 ac_cv_host=$ac_cv_build
3667 else
3668 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` ||
3669 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5
3670 fi
3671
3672 fi
3673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3674 printf "%s\n" "$ac_cv_host" >&6; }
3675 case $ac_cv_host in
3676 *-*-*) ;;
3677 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3678 esac
3679 host=$ac_cv_host
3680 ac_save_IFS=$IFS; IFS='-'
3681 set x $ac_cv_host
3682 shift
3683 host_cpu=$1
3684 host_vendor=$2
3685 shift; shift
3686 # Remember, the first character of IFS is used to create $*,
3687 # except with old shells:
3688 host_os=$*
3689 IFS=$ac_save_IFS
3690 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3691
3692
3693 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3694 printf %s "checking target system type... " >&6; }
3695 if test ${ac_cv_target+y}
3696 then :
3697 printf %s "(cached) " >&6
3698 else $as_nop
3699 if test "x$target_alias" = x; then
3700 ac_cv_target=$ac_cv_host
3701 else
3702 ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` ||
3703 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5
3704 fi
3705
3706 fi
3707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3708 printf "%s\n" "$ac_cv_target" >&6; }
3709 case $ac_cv_target in
3710 *-*-*) ;;
3711 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3712 esac
3713 target=$ac_cv_target
3714 ac_save_IFS=$IFS; IFS='-'
3715 set x $ac_cv_target
3716 shift
3717 target_cpu=$1
3718 target_vendor=$2
3719 shift; shift
3720 # Remember, the first character of IFS is used to create $*,
3721 # except with old shells:
3722 target_os=$*
3723 IFS=$ac_save_IFS
3724 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3725
3726
3727 # The aliases save the names the user supplied, while $host etc.
3728 # will get canonicalized.
3729 test -n "$target_alias" &&
3730 test "$program_prefix$program_suffix$program_transform_name" = \
3731 NONENONEs,x,x, &&
3732 program_prefix=${target_alias}-
3733
3734 # Override cross_compiling and ac_tool_prefix variables since the C toolchain is
3735 # used to generate target code when building a cross compiler
3736 cross_compiling=no
3737 if test x"$target_alias" != x
3738 then :
3739 if test x"$build_alias" = x
3740 then :
3741 cross_compiling=maybe
3742 else $as_nop
3743 if test x"$build_alias" != x"$target_alias"
3744 then :
3745 cross_compiling=yes
3746 fi
3747 fi
3748 fi
3749 if test -n "$target_alias"
3750 then :
3751 ac_tool_prefix=$target_alias-
3752 fi
3753
3754 # Ensure that AC_CONFIG_LINKS will either create symlinks which are compatible
3755 # with native Windows (i.e. NTFS symlinks, not WSL or Cygwin-emulated ones) or
3756 # use its fallback mechanisms. Native Windows versions of ocamlc/ocamlopt cannot
3757 # interpret either WSL or Cygwin-emulated symlinks.
3758 case $host in #(
3759 *-pc-windows|*-w64-mingw32*) :
3760 ac_config_commands="$ac_config_commands native-symlinks"
3761 ;; #(
3762 *) :
3763 ;;
3764 esac
3765
3766 # Sanitize the Windows target triplets. After this block, the patterns are:
3767 # *-*-cygwin - Cygwin (the vendor part is always ignored, though it should
3768 # always be 'pc')
3769 # *-w64-mingw32* - mingw-w64. The vendor part is always matched because
3770 # *-pc-mingw* is a likely misconfiguration and the triplet
3771 # matters both for flexlink and for prefixed compilers/tools.
3772 # mingw32* is matched (rather than just mingw32) because some
3773 # cross-compilation environments from Linux may add additional
3774 # information after the mingw32
3775 # *-pc-windows - MSVC. The full -pc-windows is matched because that's a suffix
3776 # which is specifically recognised by our build system (since
3777 # autotools still doesn't have full support for recognising MSVC)
3778
3779 case $target in #(
3780 i686-*-cygwin|x86_64-*-cygwin) :
3781 ;; #(
3782 *-*-cygwin*) :
3783 as_fn_error $? "unknown Cygwin variant" "$LINENO" 5 ;; #(
3784 i686-w64-mingw32*|x86_64-w64-mingw32*) :
3785 ;; #(
3786 *-*-mingw*) :
3787 as_fn_error $? "unknown mingw-w64 variant" "$LINENO" 5 ;; #(
3788 i686-pc-windows|x86_64-pc-windows) :
3789 ;; #(
3790 *-pc-windows*) :
3791 as_fn_error $? "unknown MSVC variant" "$LINENO" 5 ;; #(
3792 *) :
3793 ;;
3794 esac
3795
3796
3797 case $host in #(
3798 i686-*-cygwin|x86_64-*-cygwin) :
3799 ;; #(
3800 *-*-cygwin*) :
3801 as_fn_error $? "unknown Cygwin variant" "$LINENO" 5 ;; #(
3802 i686-w64-mingw32*|x86_64-w64-mingw32*) :
3803 ;; #(
3804 *-*-mingw*) :
3805 as_fn_error $? "unknown mingw-w64 variant" "$LINENO" 5 ;; #(
3806 i686-pc-windows|x86_64-pc-windows) :
3807 ;; #(
3808 *-pc-windows*) :
3809 as_fn_error $? "unknown MSVC variant" "$LINENO" 5 ;; #(
3810 *) :
3811 ;;
3812 esac
3813
3814
3815 # Systems that are known not to work, even in bytecode only.
3816
3817 case $target in #(
3818 i386-*-solaris*) :
3819 as_fn_error $? "Building for 32 bits target is not supported. \
3820 If your host is 64 bits, you can try with './configure CC=\"gcc -m64\"' \
3821 (or \"cc -m64\" if you don't have GCC)." "$LINENO" 5 ;; #(
3822 *) :
3823 ;;
3824 esac
3825
3826 # MSVC special case
3827
3828 case $target in #(
3829 *-pc-windows) :
3830 if test -z "$CC"
3831 then :
3832 CC=cl
3833 fi
3834 ccomp_type=msvc
3835 S=asm
3836 SO=dll
3837 outputexe=-Fe
3838 outputobj=-Fo
3839 syslib='$(1).lib' ;; #(
3840 *) :
3841 ccomp_type=cc
3842 S=s
3843 SO=so
3844 outputexe='-o '
3845 outputobj='-o '
3846 syslib='-l$(1)' ;;
3847 esac
3848
3849 # Extract the first word of "csc", so it can be a program name with args.
3850 set dummy csc; ac_word=$2
3851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3852 printf %s "checking for $ac_word... " >&6; }
3853 if test ${ac_cv_prog_csc+y}
3854 then :
3855 printf %s "(cached) " >&6
3856 else $as_nop
3857 if test -n "$csc"; then
3858 ac_cv_prog_csc="$csc" # Let the user override the test.
3859 else
3860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3861 for as_dir in $PATH
3862 do
3863 IFS=$as_save_IFS
3864 case $as_dir in #(((
3865 '') as_dir=./ ;;
3866 */) ;;
3867 *) as_dir=$as_dir/ ;;
3868 esac
3869 for ac_exec_ext in '' $ac_executable_extensions; do
3870 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
3871 ac_cv_prog_csc="csc"
3872 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
3873 break 2
3874 fi
3875 done
3876 done
3877 IFS=$as_save_IFS
3878
3879 fi
3880 fi
3881 csc=$ac_cv_prog_csc
3882 if test -n "$csc"; then
3883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $csc" >&5
3884 printf "%s\n" "$csc" >&6; }
3885 else
3886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
3887 printf "%s\n" "no" >&6; }
3888 fi
3889
3890
3891 if test -n "$csc"
3892 then :
3893 case $host in #(
3894 *-w64-mingw32*|*-pc-windows) :
3895 CSC=csc
3896 CSCFLAGS="/nologo /nowarn:1668"
3897 case $host_cpu in #(
3898 i*86) :
3899 CSCFLAGS="$CSCFLAGS /platform:x86" ;; #(
3900 *) :
3901 ;;
3902 esac ;; #(
3903 *) :
3904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Mono is not yet supported - C sharp tests disabled" >&5
3905 printf "%s\n" "$as_me: WARNING: Mono is not yet supported - C sharp tests disabled" >&2;} ;;
3906 esac
3907 fi
3908
3909 # Environment variables that are taken into account
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920 # Command-line arguments to configure
3921
3922 # Check whether --enable-debug-runtime was given.
3923 if test ${enable_debug_runtime+y}
3924 then :
3925 enableval=$enable_debug_runtime;
3926 fi
3927
3928
3929 # Check whether --enable-codegen-invariants was given.
3930 if test ${enable_codegen_invariants+y}
3931 then :
3932 enableval=$enable_codegen_invariants;
3933 fi
3934
3935
3936 # Check whether --enable-ocamldebug was given.
3937 if test ${enable_ocamldebug+y}
3938 then :
3939 enableval=$enable_ocamldebug;
3940 else $as_nop
3941 enable_ocamldebug=auto
3942 fi
3943
3944
3945 # Check whether --enable-debugger was given.
3946 if test ${enable_debugger+y}
3947 then :
3948 enableval=$enable_debugger; enable_ocamldebug=$enableval
3949 fi
3950
3951
3952 # Check whether --enable-dependency-generation was given.
3953 if test ${enable_dependency_generation+y}
3954 then :
3955 enableval=$enable_dependency_generation;
3956 else $as_nop
3957 enable_dependency_generation=auto
3958 fi
3959
3960
3961
3962
3963 # Check whether --enable-instrumented-runtime was given.
3964 if test ${enable_instrumented_runtime+y}
3965 then :
3966 enableval=$enable_instrumented_runtime;
3967 else $as_nop
3968 enable_instrumented_runtime=auto
3969 fi
3970
3971
3972 # Check whether --enable-vmthreads was given.
3973 if test ${enable_vmthreads+y}
3974 then :
3975 enableval=$enable_vmthreads; if test "x$enableval" != 'xno'
3976 then :
3977 as_fn_error $? "The vmthreads library is no longer available. It was deleted in OCaml 4.09." "$LINENO" 5
3978 fi
3979 fi
3980
3981
3982 # Check whether --enable-systhreads was given.
3983 if test ${enable_systhreads+y}
3984 then :
3985 enableval=$enable_systhreads;
3986 fi
3987
3988
3989 # Check whether --enable-tsan was given.
3990 if test ${enable_tsan+y}
3991 then :
3992 enableval=$enable_tsan;
3993 else $as_nop
3994 enable_tsan=no
3995 fi
3996
3997
3998 # Preprocessor and linker flags for libunwind (currently only used when TSan is
3999 # enabled)
4000
4001
4002
4003
4004
4005 # Check whether --enable-graph-lib was given.
4006 if test ${enable_graph_lib+y}
4007 then :
4008 enableval=$enable_graph_lib; if test "x$enableval" != 'xno'
4009 then :
4010 as_fn_error $? "The graphics library is no longer distributed with OCaml since version 4.09. It is now distributed as a separate \"graphics\" package: https://github.com/ocaml/graphics" "$LINENO" 5
4011 fi
4012 fi
4013
4014
4015 # Check whether --enable-str-lib was given.
4016 if test ${enable_str_lib+y}
4017 then :
4018 enableval=$enable_str_lib;
4019 fi
4020
4021
4022 # Check whether --enable-unix-lib was given.
4023 if test ${enable_unix_lib+y}
4024 then :
4025 enableval=$enable_unix_lib;
4026 fi
4027
4028
4029 # Check whether --enable-bigarray-lib was given.
4030 if test ${enable_bigarray_lib+y}
4031 then :
4032 enableval=$enable_bigarray_lib; if test "x$enableval" != 'xno'
4033 then :
4034 as_fn_error $? "The bigarray-lib option was deleted in OCaml 5.0, as the Bigarray module is now part of the standard library." "$LINENO" 5
4035 fi
4036 fi
4037
4038
4039 # Check whether --enable-ocamldoc was given.
4040 if test ${enable_ocamldoc+y}
4041 then :
4042 enableval=$enable_ocamldoc;
4043 else $as_nop
4044 enable_ocamldoc='auto'
4045 fi
4046
4047
4048
4049 # Check whether --with-odoc was given.
4050 if test ${with_odoc+y}
4051 then :
4052 withval=$with_odoc;
4053 fi
4054
4055
4056 # Check whether --enable-ocamlobjinfo was given.
4057 if test ${enable_ocamlobjinfo+y}
4058 then :
4059 enableval=$enable_ocamlobjinfo;
4060 fi
4061
4062
4063 # Check whether --enable-ocamltest was given.
4064 if test ${enable_ocamltest+y}
4065 then :
4066 enableval=$enable_ocamltest;
4067 fi
4068
4069
4070 # Check whether --enable-native-toplevel was given.
4071 if test ${enable_native_toplevel+y}
4072 then :
4073 enableval=$enable_native_toplevel;
4074 fi
4075
4076
4077 # Check whether --enable-frame-pointers was given.
4078 if test ${enable_frame_pointers+y}
4079 then :
4080 enableval=$enable_frame_pointers;
4081 fi
4082
4083
4084 # Check whether --enable-naked-pointers was given.
4085 if test ${enable_naked_pointers+y}
4086 then :
4087 enableval=$enable_naked_pointers; if test "x$enableval" != 'xno'
4088 then :
4089 as_fn_error $? "Naked pointers were prohibited in OCaml 5.0." "$LINENO" 5
4090 fi
4091 fi
4092
4093
4094 # Check whether --enable-naked-pointers-checker was given.
4095 if test ${enable_naked_pointers_checker+y}
4096 then :
4097 enableval=$enable_naked_pointers_checker; if test "x$enableval" != 'xno'
4098 then :
4099 as_fn_error $? "The naked pointers checker was removed in OCaml 5.0." "$LINENO" 5
4100 fi
4101 fi
4102
4103
4104 # Check whether --enable-spacetime was given.
4105 if test ${enable_spacetime+y}
4106 then :
4107 enableval=$enable_spacetime; if test "x$enableval" != 'xno'
4108 then :
4109 as_fn_error $? "spacetime profiling was deleted in OCaml 4.12." "$LINENO" 5
4110 fi
4111 fi
4112
4113
4114 # Check whether --enable-cfi was given.
4115 if test ${enable_cfi+y}
4116 then :
4117 enableval=$enable_cfi;
4118 fi
4119
4120
4121 # Check whether --enable-imprecise-c99-float-ops was given.
4122 if test ${enable_imprecise_c99_float_ops+y}
4123 then :
4124 enableval=$enable_imprecise_c99_float_ops;
4125 fi
4126
4127
4128 # Check whether --enable-installing-source-artifacts was given.
4129 if test ${enable_installing_source_artifacts+y}
4130 then :
4131 enableval=$enable_installing_source_artifacts;
4132 fi
4133
4134 # Check whether --enable-installing-bytecode-programs was given.
4135 if test ${enable_installing_bytecode_programs+y}
4136 then :
4137 enableval=$enable_installing_bytecode_programs;
4138 fi
4139
4140
4141 # Check whether --enable-native-compiler was given.
4142 if test ${enable_native_compiler+y}
4143 then :
4144 enableval=$enable_native_compiler;
4145 fi
4146
4147
4148 # Check whether --enable-flambda was given.
4149 if test ${enable_flambda+y}
4150 then :
4151 enableval=$enable_flambda;
4152 fi
4153
4154
4155 # Check whether --enable-flambda-invariants was given.
4156 if test ${enable_flambda_invariants+y}
4157 then :
4158 enableval=$enable_flambda_invariants;
4159 fi
4160
4161
4162 # Check whether --enable-cmm-invariants was given.
4163 if test ${enable_cmm_invariants+y}
4164 then :
4165 enableval=$enable_cmm_invariants;
4166 fi
4167
4168
4169
4170
4171
4172
4173
4174 # Check whether --with-target-sh was given.
4175 if test ${with_target_sh+y}
4176 then :
4177 withval=$with_target_sh; if test x"$withval" = 'xno'
4178 then :
4179 target_launch_method='exe'
4180 else $as_nop
4181 target_launch_method="$withval"
4182 fi
4183 else $as_nop
4184 target_launch_method=''
4185 fi
4186
4187
4188 # Check whether --enable-reserved-header-bits was given.
4189 if test ${enable_reserved_header_bits+y}
4190 then :
4191 enableval=$enable_reserved_header_bits; case $enable_reserved_header_bits in #(
4192 [0-9]|[1-2][0-9]|3[0-1]) :
4193 reserved_header_bits=$enable_reserved_header_bits ;; #(
4194 *) :
4195 as_fn_error $? "invalid argument to --enable-reserved-header-bits" "$LINENO" 5 ;;
4196 esac
4197 fi
4198
4199
4200 # Check whether --enable-stdlib-manpages was given.
4201 if test ${enable_stdlib_manpages+y}
4202 then :
4203 enableval=$enable_stdlib_manpages;
4204 else $as_nop
4205 enable_stdlib_manpages='auto'
4206 fi
4207
4208
4209 # Check whether --enable-warn-error was given.
4210 if test ${enable_warn_error+y}
4211 then :
4212 enableval=$enable_warn_error;
4213 fi
4214
4215
4216
4217
4218 # Check whether --enable-force-safe-string was given.
4219 if test ${enable_force_safe_string+y}
4220 then :
4221 enableval=$enable_force_safe_string; if test "x$enableval" = 'xno'
4222 then :
4223 as_fn_error $? "Support for mutable strings was removed in OCaml 5.0." "$LINENO" 5
4224 fi
4225 fi
4226
4227
4228
4229 if test x"$DEFAULT_STRING" = "xunsafe"
4230 then :
4231 as_fn_error $? "Support for mutable strings was removed in OCaml 5.0." "$LINENO" 5
4232 fi
4233
4234 # Check whether --enable-flat-float-array was given.
4235 if test ${enable_flat_float_array+y}
4236 then :
4237 enableval=$enable_flat_float_array;
4238 fi
4239
4240
4241 # Check whether --enable-function-sections was given.
4242 if test ${enable_function_sections+y}
4243 then :
4244 enableval=$enable_function_sections;
4245 else $as_nop
4246 enable_function_sections=auto
4247 fi
4248
4249
4250 # Check whether --enable-mmap-map-stack was given.
4251 if test ${enable_mmap_map_stack+y}
4252 then :
4253 enableval=$enable_mmap_map_stack;
4254 fi
4255
4256
4257
4258 # Check whether --with-afl was given.
4259 if test ${with_afl+y}
4260 then :
4261 withval=$with_afl;
4262 fi
4263
4264
4265
4266 # Check whether --with-flexdll was given.
4267 if test ${with_flexdll+y}
4268 then :
4269 withval=$with_flexdll; if test x"$withval" = 'xyes'
4270 then :
4271 with_flexdll=flexdll
4272 fi
4273 fi
4274
4275
4276
4277 # Check whether --with-winpthreads-msvc was given.
4278 if test ${with_winpthreads_msvc+y}
4279 then :
4280 withval=$with_winpthreads_msvc; if test x"$withval" = 'xyes'
4281 then :
4282 with_winpthreads_msvc=winpthreads
4283 fi
4284 fi
4285
4286
4287
4288 # Check whether --with-zstd was given.
4289 if test ${with_zstd+y}
4290 then :
4291 withval=$with_zstd;
4292 fi
4293
4294
4295 if test x"$enable_unix_lib" = "xno"
4296 then :
4297 if test x"$enable_ocamldebug" = "xyes"
4298 then :
4299 as_fn_error $? "ocamldebug requires the unix library" "$LINENO" 5
4300 else $as_nop
4301 enable_ocamldebug="no"
4302 fi
4303 fi
4304
4305 if test x"$enable_unix_lib" = "xno" || test x"$enable_str_lib" = "xno"
4306 then :
4307 if test x"$enable_ocamldoc" = "xyes"
4308 then :
4309 as_fn_error $? "ocamldoc requires the unix and str libraries" "$LINENO" 5
4310 else $as_nop
4311 enable_ocamldoc="no"
4312 build_ocamltex=false
4313 fi
4314 else $as_nop
4315 build_ocamltex=true
4316 fi
4317
4318 if test x"$enable_ocamldoc" = "xno"
4319 then :
4320 if test x"$enable_stdlib_manpages" = "xyes"
4321 then :
4322 as_fn_error $? "--enable-stdlib-manpages requires ocamldoc" "$LINENO" 5
4323 fi
4324 ocamldoc_target=""
4325 ocamldoc_opt_target=""
4326 with_ocamldoc=""
4327 enable_stdlib_manpages=no
4328 build_ocamldoc=false
4329 else $as_nop
4330 ocamldoc_target=ocamldoc
4331 ocamldoc_opt_target=ocamldoc.opt
4332 with_ocamldoc=ocamldoc
4333 build_ocamldoc=true
4334 optional_libraries="$optional_libraries ocamldoc/odoc_info"
4335 ac_config_files="$ac_config_files ocamldoc/META"
4336
4337 fi
4338
4339 # Are we building a cross-compiler
4340
4341 if test x"$host" = x"$target"
4342 then :
4343 cross_compiler=false
4344 else $as_nop
4345 # We require a non-cross compiler of the same version
4346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the installed OCaml compiler can build the cross compiler" >&5
4347 printf %s "checking if the installed OCaml compiler can build the cross compiler... " >&6; }
4348 already_installed_version="$(ocamlc -vnum)"
4349 if test x"5.4.1" = x"$already_installed_version"
4350 then :
4351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (5.4.1)" >&5
4352 printf "%s\n" "yes (5.4.1)" >&6; }
4353 else $as_nop
4354 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no (5.4.1 vs $already_installed_version)" >&5
4355 printf "%s\n" "no (5.4.1 vs $already_installed_version)" >&6; }
4356 as_fn_error $? "exiting" "$LINENO" 5
4357 fi
4358 cross_compiler=true
4359 fi
4360
4361 # Initialization of libtool
4362 # Allow the MSVC linker to be found even if ld isn't installed.
4363 # User-specified LD still takes precedence.
4364 if $cross_compiler
4365 then :
4366 for ac_prog in ld link
4367 do
4368 # Extract the first word of "$target_alias-$ac_prog", so it can be a program name with args.
4369 set dummy $target_alias-$ac_prog; ac_word=$2
4370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4371 printf %s "checking for $ac_word... " >&6; }
4372 if test ${ac_cv_prog_LD+y}
4373 then :
4374 printf %s "(cached) " >&6
4375 else $as_nop
4376 if test -n "$LD"; then
4377 ac_cv_prog_LD="$LD" # Let the user override the test.
4378 else
4379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4380 for as_dir in $PATH
4381 do
4382 IFS=$as_save_IFS
4383 case $as_dir in #(((
4384 '') as_dir=./ ;;
4385 */) ;;
4386 *) as_dir=$as_dir/ ;;
4387 esac
4388 for ac_exec_ext in '' $ac_executable_extensions; do
4389 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4390 ac_cv_prog_LD="$target_alias-$ac_prog"
4391 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4392 break 2
4393 fi
4394 done
4395 done
4396 IFS=$as_save_IFS
4397
4398 fi
4399 fi
4400 LD=$ac_cv_prog_LD
4401 if test -n "$LD"; then
4402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
4403 printf "%s\n" "$LD" >&6; }
4404 else
4405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4406 printf "%s\n" "no" >&6; }
4407 fi
4408
4409
4410 test -n "$LD" && break
4411 done
4412 if test -z "$LD"; then
4413 if test "$build" = "$target"; then
4414 ac_ct_LD=$LD
4415 for ac_prog in ld link
4416 do
4417 # Extract the first word of "$ac_prog", so it can be a program name with args.
4418 set dummy $ac_prog; ac_word=$2
4419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4420 printf %s "checking for $ac_word... " >&6; }
4421 if test ${ac_cv_prog_ac_ct_LD+y}
4422 then :
4423 printf %s "(cached) " >&6
4424 else $as_nop
4425 if test -n "$ac_ct_LD"; then
4426 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4427 else
4428 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429 for as_dir in $PATH
4430 do
4431 IFS=$as_save_IFS
4432 case $as_dir in #(((
4433 '') as_dir=./ ;;
4434 */) ;;
4435 *) as_dir=$as_dir/ ;;
4436 esac
4437 for ac_exec_ext in '' $ac_executable_extensions; do
4438 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4439 ac_cv_prog_ac_ct_LD="$ac_prog"
4440 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4441 break 2
4442 fi
4443 done
4444 done
4445 IFS=$as_save_IFS
4446
4447 fi
4448 fi
4449 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4450 if test -n "$ac_ct_LD"; then
4451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
4452 printf "%s\n" "$ac_ct_LD" >&6; }
4453 else
4454 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4455 printf "%s\n" "no" >&6; }
4456 fi
4457
4458
4459 test -n "$ac_ct_LD" && break
4460 done
4461 test -n "$ac_ct_LD" || ac_ct_LD="false"
4462
4463 LD=$ac_ct_LD
4464 else
4465 LD="false"
4466 fi
4467 fi
4468
4469 else $as_nop
4470 if test -n "$ac_tool_prefix"; then
4471 for ac_prog in ld link
4472 do
4473 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4474 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4475 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4476 printf %s "checking for $ac_word... " >&6; }
4477 if test ${ac_cv_prog_LD+y}
4478 then :
4479 printf %s "(cached) " >&6
4480 else $as_nop
4481 if test -n "$LD"; then
4482 ac_cv_prog_LD="$LD" # Let the user override the test.
4483 else
4484 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4485 for as_dir in $PATH
4486 do
4487 IFS=$as_save_IFS
4488 case $as_dir in #(((
4489 '') as_dir=./ ;;
4490 */) ;;
4491 *) as_dir=$as_dir/ ;;
4492 esac
4493 for ac_exec_ext in '' $ac_executable_extensions; do
4494 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4495 ac_cv_prog_LD="$ac_tool_prefix$ac_prog"
4496 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4497 break 2
4498 fi
4499 done
4500 done
4501 IFS=$as_save_IFS
4502
4503 fi
4504 fi
4505 LD=$ac_cv_prog_LD
4506 if test -n "$LD"; then
4507 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
4508 printf "%s\n" "$LD" >&6; }
4509 else
4510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4511 printf "%s\n" "no" >&6; }
4512 fi
4513
4514
4515 test -n "$LD" && break
4516 done
4517 fi
4518 if test -z "$LD"; then
4519 ac_ct_LD=$LD
4520 for ac_prog in ld link
4521 do
4522 # Extract the first word of "$ac_prog", so it can be a program name with args.
4523 set dummy $ac_prog; ac_word=$2
4524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4525 printf %s "checking for $ac_word... " >&6; }
4526 if test ${ac_cv_prog_ac_ct_LD+y}
4527 then :
4528 printf %s "(cached) " >&6
4529 else $as_nop
4530 if test -n "$ac_ct_LD"; then
4531 ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4532 else
4533 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4534 for as_dir in $PATH
4535 do
4536 IFS=$as_save_IFS
4537 case $as_dir in #(((
4538 '') as_dir=./ ;;
4539 */) ;;
4540 *) as_dir=$as_dir/ ;;
4541 esac
4542 for ac_exec_ext in '' $ac_executable_extensions; do
4543 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4544 ac_cv_prog_ac_ct_LD="$ac_prog"
4545 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4546 break 2
4547 fi
4548 done
4549 done
4550 IFS=$as_save_IFS
4551
4552 fi
4553 fi
4554 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4555 if test -n "$ac_ct_LD"; then
4556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LD" >&5
4557 printf "%s\n" "$ac_ct_LD" >&6; }
4558 else
4559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4560 printf "%s\n" "no" >&6; }
4561 fi
4562
4563
4564 test -n "$ac_ct_LD" && break
4565 done
4566
4567 if test "x$ac_ct_LD" = x; then
4568 LD=""
4569 else
4570 case $cross_compiling:$ac_tool_warned in
4571 yes:)
4572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4573 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4574 ac_tool_warned=yes ;;
4575 esac
4576 LD=$ac_ct_LD
4577 fi
4578 fi
4579
4580 fi
4581 # libtool will detect a build-to-host C toolchain but when building an OCaml
4582 # cross compiler we need the C toolchain to build the target runtime so we
4583 # temporarily define host* values as macros for target* values so that the
4584 # proper toolchain is configured. Note that host=target unless we are building a
4585 # cross compiler so this is transparent for the usual use case.
4586 # libtool expects host_os=mingw for native Windows
4587 # Also, it has been observed that, on some platforms (e.g. msvc) LT_INIT
4588 # alters the CFLAGS variable, so we save its value before calling the macro
4589 # and restore it after the call
4590 old_host_os=$target_os
4591 if test x"$target_os" = "xwindows"
4592 then :
4593 target_os=mingw
4594 fi
4595 saved_CFLAGS="$CFLAGS"
4596
4597 case `pwd` in
4598 *\ * | *\ *)
4599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
4600 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
4601 esac
4602
4603
4604
4605 macro_version='2.5.4'
4606 macro_revision='2.5.4'
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621 ltmain=$ac_aux_dir/ltmain.sh
4622
4623 # Backslashify metacharacters that are still active within
4624 # double-quoted strings.
4625 sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
4626
4627 # Same as above, but do not quote variable references.
4628 double_quote_subst='s/\(["`\\]\)/\\\1/g'
4629
4630 # Sed substitution to delay expansion of an escaped shell variable in a
4631 # double_quote_subst'ed string.
4632 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4633
4634 # Sed substitution to delay expansion of an escaped single quote.
4635 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
4636
4637 # Sed substitution to avoid accidental globbing in evaled expressions
4638 no_glob_subst='s/\*/\\\*/g'
4639
4640 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4641 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
4642 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4643
4644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5
4645 printf %s "checking how to print strings... " >&6; }
4646 # Test print first, because it will be a builtin if present.
4647 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
4648 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
4649 ECHO='print -r --'
4650 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
4651 ECHO='printf %s\n'
4652 else
4653 # Use this function as a fallback that always works.
4654 func_fallback_echo ()
4655 {
4656 eval 'cat <<_LTECHO_EOF
4657 $1
4658 _LTECHO_EOF'
4659 }
4660 ECHO='func_fallback_echo'
4661 fi
4662
4663 # func_echo_all arg...
4664 # Invoke $ECHO with all args, space-separated.
4665 func_echo_all ()
4666 {
4667 $ECHO ""
4668 }
4669
4670 case $ECHO in
4671 printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5
4672 printf "%s\n" "printf" >&6; } ;;
4673 print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
4674 printf "%s\n" "print -r" >&6; } ;;
4675 *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5
4676 printf "%s\n" "cat" >&6; } ;;
4677 esac
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701 ac_ext=c
4702 ac_cpp='$CPP $CPPFLAGS'
4703 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4704 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4705 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4706 if test -n "$ac_tool_prefix"; then
4707 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4708 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4709 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710 printf %s "checking for $ac_word... " >&6; }
4711 if test ${ac_cv_prog_CC+y}
4712 then :
4713 printf %s "(cached) " >&6
4714 else $as_nop
4715 if test -n "$CC"; then
4716 ac_cv_prog_CC="$CC" # Let the user override the test.
4717 else
4718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4719 for as_dir in $PATH
4720 do
4721 IFS=$as_save_IFS
4722 case $as_dir in #(((
4723 '') as_dir=./ ;;
4724 */) ;;
4725 *) as_dir=$as_dir/ ;;
4726 esac
4727 for ac_exec_ext in '' $ac_executable_extensions; do
4728 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4729 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4730 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4731 break 2
4732 fi
4733 done
4734 done
4735 IFS=$as_save_IFS
4736
4737 fi
4738 fi
4739 CC=$ac_cv_prog_CC
4740 if test -n "$CC"; then
4741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4742 printf "%s\n" "$CC" >&6; }
4743 else
4744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4745 printf "%s\n" "no" >&6; }
4746 fi
4747
4748
4749 fi
4750 if test -z "$ac_cv_prog_CC"; then
4751 ac_ct_CC=$CC
4752 # Extract the first word of "gcc", so it can be a program name with args.
4753 set dummy gcc; ac_word=$2
4754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4755 printf %s "checking for $ac_word... " >&6; }
4756 if test ${ac_cv_prog_ac_ct_CC+y}
4757 then :
4758 printf %s "(cached) " >&6
4759 else $as_nop
4760 if test -n "$ac_ct_CC"; then
4761 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4762 else
4763 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4764 for as_dir in $PATH
4765 do
4766 IFS=$as_save_IFS
4767 case $as_dir in #(((
4768 '') as_dir=./ ;;
4769 */) ;;
4770 *) as_dir=$as_dir/ ;;
4771 esac
4772 for ac_exec_ext in '' $ac_executable_extensions; do
4773 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4774 ac_cv_prog_ac_ct_CC="gcc"
4775 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4776 break 2
4777 fi
4778 done
4779 done
4780 IFS=$as_save_IFS
4781
4782 fi
4783 fi
4784 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4785 if test -n "$ac_ct_CC"; then
4786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4787 printf "%s\n" "$ac_ct_CC" >&6; }
4788 else
4789 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4790 printf "%s\n" "no" >&6; }
4791 fi
4792
4793 if test "x$ac_ct_CC" = x; then
4794 CC=""
4795 else
4796 case $cross_compiling:$ac_tool_warned in
4797 yes:)
4798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
4799 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
4800 ac_tool_warned=yes ;;
4801 esac
4802 CC=$ac_ct_CC
4803 fi
4804 else
4805 CC="$ac_cv_prog_CC"
4806 fi
4807
4808 if test -z "$CC"; then
4809 if test -n "$ac_tool_prefix"; then
4810 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4811 set dummy ${ac_tool_prefix}cc; ac_word=$2
4812 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4813 printf %s "checking for $ac_word... " >&6; }
4814 if test ${ac_cv_prog_CC+y}
4815 then :
4816 printf %s "(cached) " >&6
4817 else $as_nop
4818 if test -n "$CC"; then
4819 ac_cv_prog_CC="$CC" # Let the user override the test.
4820 else
4821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4822 for as_dir in $PATH
4823 do
4824 IFS=$as_save_IFS
4825 case $as_dir in #(((
4826 '') as_dir=./ ;;
4827 */) ;;
4828 *) as_dir=$as_dir/ ;;
4829 esac
4830 for ac_exec_ext in '' $ac_executable_extensions; do
4831 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4832 ac_cv_prog_CC="${ac_tool_prefix}cc"
4833 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4834 break 2
4835 fi
4836 done
4837 done
4838 IFS=$as_save_IFS
4839
4840 fi
4841 fi
4842 CC=$ac_cv_prog_CC
4843 if test -n "$CC"; then
4844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4845 printf "%s\n" "$CC" >&6; }
4846 else
4847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848 printf "%s\n" "no" >&6; }
4849 fi
4850
4851
4852 fi
4853 fi
4854 if test -z "$CC"; then
4855 # Extract the first word of "cc", so it can be a program name with args.
4856 set dummy cc; ac_word=$2
4857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4858 printf %s "checking for $ac_word... " >&6; }
4859 if test ${ac_cv_prog_CC+y}
4860 then :
4861 printf %s "(cached) " >&6
4862 else $as_nop
4863 if test -n "$CC"; then
4864 ac_cv_prog_CC="$CC" # Let the user override the test.
4865 else
4866 ac_prog_rejected=no
4867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4868 for as_dir in $PATH
4869 do
4870 IFS=$as_save_IFS
4871 case $as_dir in #(((
4872 '') as_dir=./ ;;
4873 */) ;;
4874 *) as_dir=$as_dir/ ;;
4875 esac
4876 for ac_exec_ext in '' $ac_executable_extensions; do
4877 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4878 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4879 ac_prog_rejected=yes
4880 continue
4881 fi
4882 ac_cv_prog_CC="cc"
4883 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4884 break 2
4885 fi
4886 done
4887 done
4888 IFS=$as_save_IFS
4889
4890 if test $ac_prog_rejected = yes; then
4891 # We found a bogon in the path, so make sure we never use it.
4892 set dummy $ac_cv_prog_CC
4893 shift
4894 if test $# != 0; then
4895 # We chose a different compiler from the bogus one.
4896 # However, it has the same basename, so the bogon will be chosen
4897 # first if we set CC to just the basename; use the full file name.
4898 shift
4899 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@"
4900 fi
4901 fi
4902 fi
4903 fi
4904 CC=$ac_cv_prog_CC
4905 if test -n "$CC"; then
4906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4907 printf "%s\n" "$CC" >&6; }
4908 else
4909 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910 printf "%s\n" "no" >&6; }
4911 fi
4912
4913
4914 fi
4915 if test -z "$CC"; then
4916 if test -n "$ac_tool_prefix"; then
4917 for ac_prog in cl.exe
4918 do
4919 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4920 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4921 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4922 printf %s "checking for $ac_word... " >&6; }
4923 if test ${ac_cv_prog_CC+y}
4924 then :
4925 printf %s "(cached) " >&6
4926 else $as_nop
4927 if test -n "$CC"; then
4928 ac_cv_prog_CC="$CC" # Let the user override the test.
4929 else
4930 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931 for as_dir in $PATH
4932 do
4933 IFS=$as_save_IFS
4934 case $as_dir in #(((
4935 '') as_dir=./ ;;
4936 */) ;;
4937 *) as_dir=$as_dir/ ;;
4938 esac
4939 for ac_exec_ext in '' $ac_executable_extensions; do
4940 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4941 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4942 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4943 break 2
4944 fi
4945 done
4946 done
4947 IFS=$as_save_IFS
4948
4949 fi
4950 fi
4951 CC=$ac_cv_prog_CC
4952 if test -n "$CC"; then
4953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4954 printf "%s\n" "$CC" >&6; }
4955 else
4956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
4957 printf "%s\n" "no" >&6; }
4958 fi
4959
4960
4961 test -n "$CC" && break
4962 done
4963 fi
4964 if test -z "$CC"; then
4965 ac_ct_CC=$CC
4966 for ac_prog in cl.exe
4967 do
4968 # Extract the first word of "$ac_prog", so it can be a program name with args.
4969 set dummy $ac_prog; ac_word=$2
4970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4971 printf %s "checking for $ac_word... " >&6; }
4972 if test ${ac_cv_prog_ac_ct_CC+y}
4973 then :
4974 printf %s "(cached) " >&6
4975 else $as_nop
4976 if test -n "$ac_ct_CC"; then
4977 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4978 else
4979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4980 for as_dir in $PATH
4981 do
4982 IFS=$as_save_IFS
4983 case $as_dir in #(((
4984 '') as_dir=./ ;;
4985 */) ;;
4986 *) as_dir=$as_dir/ ;;
4987 esac
4988 for ac_exec_ext in '' $ac_executable_extensions; do
4989 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
4990 ac_cv_prog_ac_ct_CC="$ac_prog"
4991 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
4992 break 2
4993 fi
4994 done
4995 done
4996 IFS=$as_save_IFS
4997
4998 fi
4999 fi
5000 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5001 if test -n "$ac_ct_CC"; then
5002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5003 printf "%s\n" "$ac_ct_CC" >&6; }
5004 else
5005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5006 printf "%s\n" "no" >&6; }
5007 fi
5008
5009
5010 test -n "$ac_ct_CC" && break
5011 done
5012
5013 if test "x$ac_ct_CC" = x; then
5014 CC=""
5015 else
5016 case $cross_compiling:$ac_tool_warned in
5017 yes:)
5018 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
5019 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
5020 ac_tool_warned=yes ;;
5021 esac
5022 CC=$ac_ct_CC
5023 fi
5024 fi
5025
5026 fi
5027 if test -z "$CC"; then
5028 if test -n "$ac_tool_prefix"; then
5029 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
5030 set dummy ${ac_tool_prefix}clang; ac_word=$2
5031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032 printf %s "checking for $ac_word... " >&6; }
5033 if test ${ac_cv_prog_CC+y}
5034 then :
5035 printf %s "(cached) " >&6
5036 else $as_nop
5037 if test -n "$CC"; then
5038 ac_cv_prog_CC="$CC" # Let the user override the test.
5039 else
5040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5041 for as_dir in $PATH
5042 do
5043 IFS=$as_save_IFS
5044 case $as_dir in #(((
5045 '') as_dir=./ ;;
5046 */) ;;
5047 *) as_dir=$as_dir/ ;;
5048 esac
5049 for ac_exec_ext in '' $ac_executable_extensions; do
5050 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5051 ac_cv_prog_CC="${ac_tool_prefix}clang"
5052 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5053 break 2
5054 fi
5055 done
5056 done
5057 IFS=$as_save_IFS
5058
5059 fi
5060 fi
5061 CC=$ac_cv_prog_CC
5062 if test -n "$CC"; then
5063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
5064 printf "%s\n" "$CC" >&6; }
5065 else
5066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5067 printf "%s\n" "no" >&6; }
5068 fi
5069
5070
5071 fi
5072 if test -z "$ac_cv_prog_CC"; then
5073 ac_ct_CC=$CC
5074 # Extract the first word of "clang", so it can be a program name with args.
5075 set dummy clang; ac_word=$2
5076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5077 printf %s "checking for $ac_word... " >&6; }
5078 if test ${ac_cv_prog_ac_ct_CC+y}
5079 then :
5080 printf %s "(cached) " >&6
5081 else $as_nop
5082 if test -n "$ac_ct_CC"; then
5083 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
5084 else
5085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5086 for as_dir in $PATH
5087 do
5088 IFS=$as_save_IFS
5089 case $as_dir in #(((
5090 '') as_dir=./ ;;
5091 */) ;;
5092 *) as_dir=$as_dir/ ;;
5093 esac
5094 for ac_exec_ext in '' $ac_executable_extensions; do
5095 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
5096 ac_cv_prog_ac_ct_CC="clang"
5097 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
5098 break 2
5099 fi
5100 done
5101 done
5102 IFS=$as_save_IFS
5103
5104 fi
5105 fi
5106 ac_ct_CC=$ac_cv_prog_ac_ct_CC
5107 if test -n "$ac_ct_CC"; then
5108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
5109 printf "%s\n" "$ac_ct_CC" >&6; }
5110 else
5111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5112 printf "%s\n" "no" >&6; }
5113 fi
5114
5115 if test "x$ac_ct_CC" = x; then
5116 CC=""
5117 else
5118 case $cross_compiling:$ac_tool_warned in
5119 yes:)
5120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
5121 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
5122 ac_tool_warned=yes ;;
5123 esac
5124 CC=$ac_ct_CC
5125 fi
5126 else
5127 CC="$ac_cv_prog_CC"
5128 fi
5129
5130 fi
5131
5132
5133 test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5134 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5135 as_fn_error $? "no acceptable C compiler found in \$PATH
5136 See \`config.log' for more details" "$LINENO" 5; }
5137
5138 # Provide some information about the compiler.
5139 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
5140 set X $ac_compile
5141 ac_compiler=$2
5142 for ac_option in --version -v -V -qversion -version; do
5143 { { ac_try="$ac_compiler $ac_option >&5"
5144 case "(($ac_try" in
5145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5146 *) ac_try_echo=$ac_try;;
5147 esac
5148 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5149 printf "%s\n" "$ac_try_echo"; } >&5
5150 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
5151 ac_status=$?
5152 if test -s conftest.err; then
5153 sed '10a\
5154 ... rest of stderr output deleted ...
5155 10q' conftest.err >conftest.er1
5156 cat conftest.er1 >&5
5157 fi
5158 rm -f conftest.er1 conftest.err
5159 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5160 test $ac_status = 0; }
5161 done
5162
5163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5164 /* end confdefs.h. */
5165
5166 int
5167 main (void)
5168 {
5169
5170 ;
5171 return 0;
5172 }
5173 _ACEOF
5174 ac_clean_files_save=$ac_clean_files
5175 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
5176 # Try to create an executable without -o first, disregard a.out.
5177 # It will help us diagnose broken compilers, and finding out an intuition
5178 # of exeext.
5179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
5180 printf %s "checking whether the C compiler works... " >&6; }
5181 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
5182
5183 # The possible output files:
5184 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
5185
5186 ac_rmfiles=
5187 for ac_file in $ac_files
5188 do
5189 case $ac_file in
5190 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5191 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
5192 esac
5193 done
5194 rm -f $ac_rmfiles
5195
5196 if { { ac_try="$ac_link_default"
5197 case "(($ac_try" in
5198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5199 *) ac_try_echo=$ac_try;;
5200 esac
5201 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5202 printf "%s\n" "$ac_try_echo"; } >&5
5203 (eval "$ac_link_default") 2>&5
5204 ac_status=$?
5205 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5206 test $ac_status = 0; }
5207 then :
5208 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
5209 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
5210 # in a Makefile. We should not override ac_cv_exeext if it was cached,
5211 # so that the user can short-circuit this test for compilers unknown to
5212 # Autoconf.
5213 for ac_file in $ac_files ''
5214 do
5215 test -f "$ac_file" || continue
5216 case $ac_file in
5217 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
5218 ;;
5219 [ab].out )
5220 # We found the default executable, but exeext='' is most
5221 # certainly right.
5222 break;;
5223 *.* )
5224 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
5225 then :; else
5226 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5227 fi
5228 # We set ac_cv_exeext here because the later test for it is not
5229 # safe: cross compilers may not add the suffix if given an `-o'
5230 # argument, so we may need to know it at that point already.
5231 # Even if this section looks crufty: it has the advantage of
5232 # actually working.
5233 break;;
5234 * )
5235 break;;
5236 esac
5237 done
5238 test "$ac_cv_exeext" = no && ac_cv_exeext=
5239
5240 else $as_nop
5241 ac_file=''
5242 fi
5243 if test -z "$ac_file"
5244 then :
5245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
5246 printf "%s\n" "no" >&6; }
5247 printf "%s\n" "$as_me: failed program was:" >&5
5248 sed 's/^/| /' conftest.$ac_ext >&5
5249
5250 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5251 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5252 as_fn_error 77 "C compiler cannot create executables
5253 See \`config.log' for more details" "$LINENO" 5; }
5254 else $as_nop
5255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5256 printf "%s\n" "yes" >&6; }
5257 fi
5258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
5259 printf %s "checking for C compiler default output file name... " >&6; }
5260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
5261 printf "%s\n" "$ac_file" >&6; }
5262 ac_exeext=$ac_cv_exeext
5263
5264 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
5265 ac_clean_files=$ac_clean_files_save
5266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
5267 printf %s "checking for suffix of executables... " >&6; }
5268 if { { ac_try="$ac_link"
5269 case "(($ac_try" in
5270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5271 *) ac_try_echo=$ac_try;;
5272 esac
5273 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5274 printf "%s\n" "$ac_try_echo"; } >&5
5275 (eval "$ac_link") 2>&5
5276 ac_status=$?
5277 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5278 test $ac_status = 0; }
5279 then :
5280 # If both `conftest.exe' and `conftest' are `present' (well, observable)
5281 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
5282 # work properly (i.e., refer to `conftest.exe'), while it won't with
5283 # `rm'.
5284 for ac_file in conftest.exe conftest conftest.*; do
5285 test -f "$ac_file" || continue
5286 case $ac_file in
5287 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
5288 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
5289 break;;
5290 * ) break;;
5291 esac
5292 done
5293 else $as_nop
5294 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5295 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5296 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
5297 See \`config.log' for more details" "$LINENO" 5; }
5298 fi
5299 rm -f conftest conftest$ac_cv_exeext
5300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
5301 printf "%s\n" "$ac_cv_exeext" >&6; }
5302
5303 rm -f conftest.$ac_ext
5304 EXEEXT=$ac_cv_exeext
5305 ac_exeext=$EXEEXT
5306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5307 /* end confdefs.h. */
5308 #include <stdio.h>
5309 int
5310 main (void)
5311 {
5312 FILE *f = fopen ("conftest.out", "w");
5313 return ferror (f) || fclose (f) != 0;
5314
5315 ;
5316 return 0;
5317 }
5318 _ACEOF
5319 ac_clean_files="$ac_clean_files conftest.out"
5320 # Check that the compiler produces executables we can run. If not, either
5321 # the compiler is broken, or we cross compile.
5322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
5323 printf %s "checking whether we are cross compiling... " >&6; }
5324 if test "$cross_compiling" != yes; then
5325 { { ac_try="$ac_link"
5326 case "(($ac_try" in
5327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5328 *) ac_try_echo=$ac_try;;
5329 esac
5330 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5331 printf "%s\n" "$ac_try_echo"; } >&5
5332 (eval "$ac_link") 2>&5
5333 ac_status=$?
5334 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5335 test $ac_status = 0; }
5336 if { ac_try='./conftest$ac_cv_exeext'
5337 { { case "(($ac_try" in
5338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5339 *) ac_try_echo=$ac_try;;
5340 esac
5341 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5342 printf "%s\n" "$ac_try_echo"; } >&5
5343 (eval "$ac_try") 2>&5
5344 ac_status=$?
5345 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5346 test $ac_status = 0; }; }; then
5347 cross_compiling=no
5348 else
5349 if test "$cross_compiling" = maybe; then
5350 cross_compiling=yes
5351 else
5352 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5353 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5354 as_fn_error 77 "cannot run C compiled programs.
5355 If you meant to cross compile, use \`--target'.
5356 See \`config.log' for more details" "$LINENO" 5; }
5357 fi
5358 fi
5359 fi
5360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
5361 printf "%s\n" "$cross_compiling" >&6; }
5362
5363 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
5364 ac_clean_files=$ac_clean_files_save
5365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
5366 printf %s "checking for suffix of object files... " >&6; }
5367 if test ${ac_cv_objext+y}
5368 then :
5369 printf %s "(cached) " >&6
5370 else $as_nop
5371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5372 /* end confdefs.h. */
5373
5374 int
5375 main (void)
5376 {
5377
5378 ;
5379 return 0;
5380 }
5381 _ACEOF
5382 rm -f conftest.o conftest.obj
5383 if { { ac_try="$ac_compile"
5384 case "(($ac_try" in
5385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5386 *) ac_try_echo=$ac_try;;
5387 esac
5388 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5389 printf "%s\n" "$ac_try_echo"; } >&5
5390 (eval "$ac_compile") 2>&5
5391 ac_status=$?
5392 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5393 test $ac_status = 0; }
5394 then :
5395 for ac_file in conftest.o conftest.obj conftest.*; do
5396 test -f "$ac_file" || continue;
5397 case $ac_file in
5398 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
5399 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
5400 break;;
5401 esac
5402 done
5403 else $as_nop
5404 printf "%s\n" "$as_me: failed program was:" >&5
5405 sed 's/^/| /' conftest.$ac_ext >&5
5406
5407 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5408 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
5409 as_fn_error $? "cannot compute suffix of object files: cannot compile
5410 See \`config.log' for more details" "$LINENO" 5; }
5411 fi
5412 rm -f conftest.$ac_cv_objext conftest.$ac_ext
5413 fi
5414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
5415 printf "%s\n" "$ac_cv_objext" >&6; }
5416 OBJEXT=$ac_cv_objext
5417 ac_objext=$OBJEXT
5418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
5419 printf %s "checking whether the compiler supports GNU C... " >&6; }
5420 if test ${ac_cv_c_compiler_gnu+y}
5421 then :
5422 printf %s "(cached) " >&6
5423 else $as_nop
5424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5425 /* end confdefs.h. */
5426
5427 int
5428 main (void)
5429 {
5430 #ifndef __GNUC__
5431 choke me
5432 #endif
5433
5434 ;
5435 return 0;
5436 }
5437 _ACEOF
5438 if ac_fn_c_try_compile "$LINENO"
5439 then :
5440 ac_compiler_gnu=yes
5441 else $as_nop
5442 ac_compiler_gnu=no
5443 fi
5444 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5445 ac_cv_c_compiler_gnu=$ac_compiler_gnu
5446
5447 fi
5448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
5449 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
5450 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5451
5452 if test $ac_compiler_gnu = yes; then
5453 GCC=yes
5454 else
5455 GCC=
5456 fi
5457 ac_test_CFLAGS=${CFLAGS+y}
5458 ac_save_CFLAGS=$CFLAGS
5459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
5460 printf %s "checking whether $CC accepts -g... " >&6; }
5461 if test ${ac_cv_prog_cc_g+y}
5462 then :
5463 printf %s "(cached) " >&6
5464 else $as_nop
5465 ac_save_c_werror_flag=$ac_c_werror_flag
5466 ac_c_werror_flag=yes
5467 ac_cv_prog_cc_g=no
5468 CFLAGS="-g"
5469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5470 /* end confdefs.h. */
5471
5472 int
5473 main (void)
5474 {
5475
5476 ;
5477 return 0;
5478 }
5479 _ACEOF
5480 if ac_fn_c_try_compile "$LINENO"
5481 then :
5482 ac_cv_prog_cc_g=yes
5483 else $as_nop
5484 CFLAGS=""
5485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5486 /* end confdefs.h. */
5487
5488 int
5489 main (void)
5490 {
5491
5492 ;
5493 return 0;
5494 }
5495 _ACEOF
5496 if ac_fn_c_try_compile "$LINENO"
5497 then :
5498
5499 else $as_nop
5500 ac_c_werror_flag=$ac_save_c_werror_flag
5501 CFLAGS="-g"
5502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5503 /* end confdefs.h. */
5504
5505 int
5506 main (void)
5507 {
5508
5509 ;
5510 return 0;
5511 }
5512 _ACEOF
5513 if ac_fn_c_try_compile "$LINENO"
5514 then :
5515 ac_cv_prog_cc_g=yes
5516 fi
5517 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5518 fi
5519 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5520 fi
5521 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
5522 ac_c_werror_flag=$ac_save_c_werror_flag
5523 fi
5524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
5525 printf "%s\n" "$ac_cv_prog_cc_g" >&6; }
5526 if test $ac_test_CFLAGS; then
5527 CFLAGS=$ac_save_CFLAGS
5528 elif test $ac_cv_prog_cc_g = yes; then
5529 if test "$GCC" = yes; then
5530 CFLAGS="-g -O2"
5531 else
5532 CFLAGS="-g"
5533 fi
5534 else
5535 if test "$GCC" = yes; then
5536 CFLAGS="-O2"
5537 else
5538 CFLAGS=
5539 fi
5540 fi
5541 ac_prog_cc_stdc=no
5542 if test x$ac_prog_cc_stdc = xno
5543 then :
5544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
5545 printf %s "checking for $CC option to enable C11 features... " >&6; }
5546 if test ${ac_cv_prog_cc_c11+y}
5547 then :
5548 printf %s "(cached) " >&6
5549 else $as_nop
5550 ac_cv_prog_cc_c11=no
5551 ac_save_CC=$CC
5552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5553 /* end confdefs.h. */
5554 $ac_c_conftest_c11_program
5555 _ACEOF
5556 for ac_arg in '' -std=gnu11
5557 do
5558 CC="$ac_save_CC $ac_arg"
5559 if ac_fn_c_try_compile "$LINENO"
5560 then :
5561 ac_cv_prog_cc_c11=$ac_arg
5562 fi
5563 rm -f core conftest.err conftest.$ac_objext conftest.beam
5564 test "x$ac_cv_prog_cc_c11" != "xno" && break
5565 done
5566 rm -f conftest.$ac_ext
5567 CC=$ac_save_CC
5568 fi
5569
5570 if test "x$ac_cv_prog_cc_c11" = xno
5571 then :
5572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5573 printf "%s\n" "unsupported" >&6; }
5574 else $as_nop
5575 if test "x$ac_cv_prog_cc_c11" = x
5576 then :
5577 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5578 printf "%s\n" "none needed" >&6; }
5579 else $as_nop
5580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
5581 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; }
5582 CC="$CC $ac_cv_prog_cc_c11"
5583 fi
5584 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
5585 ac_prog_cc_stdc=c11
5586 fi
5587 fi
5588 if test x$ac_prog_cc_stdc = xno
5589 then :
5590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
5591 printf %s "checking for $CC option to enable C99 features... " >&6; }
5592 if test ${ac_cv_prog_cc_c99+y}
5593 then :
5594 printf %s "(cached) " >&6
5595 else $as_nop
5596 ac_cv_prog_cc_c99=no
5597 ac_save_CC=$CC
5598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5599 /* end confdefs.h. */
5600 $ac_c_conftest_c99_program
5601 _ACEOF
5602 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
5603 do
5604 CC="$ac_save_CC $ac_arg"
5605 if ac_fn_c_try_compile "$LINENO"
5606 then :
5607 ac_cv_prog_cc_c99=$ac_arg
5608 fi
5609 rm -f core conftest.err conftest.$ac_objext conftest.beam
5610 test "x$ac_cv_prog_cc_c99" != "xno" && break
5611 done
5612 rm -f conftest.$ac_ext
5613 CC=$ac_save_CC
5614 fi
5615
5616 if test "x$ac_cv_prog_cc_c99" = xno
5617 then :
5618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5619 printf "%s\n" "unsupported" >&6; }
5620 else $as_nop
5621 if test "x$ac_cv_prog_cc_c99" = x
5622 then :
5623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5624 printf "%s\n" "none needed" >&6; }
5625 else $as_nop
5626 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5627 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; }
5628 CC="$CC $ac_cv_prog_cc_c99"
5629 fi
5630 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5631 ac_prog_cc_stdc=c99
5632 fi
5633 fi
5634 if test x$ac_prog_cc_stdc = xno
5635 then :
5636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5637 printf %s "checking for $CC option to enable C89 features... " >&6; }
5638 if test ${ac_cv_prog_cc_c89+y}
5639 then :
5640 printf %s "(cached) " >&6
5641 else $as_nop
5642 ac_cv_prog_cc_c89=no
5643 ac_save_CC=$CC
5644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645 /* end confdefs.h. */
5646 $ac_c_conftest_c89_program
5647 _ACEOF
5648 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5649 do
5650 CC="$ac_save_CC $ac_arg"
5651 if ac_fn_c_try_compile "$LINENO"
5652 then :
5653 ac_cv_prog_cc_c89=$ac_arg
5654 fi
5655 rm -f core conftest.err conftest.$ac_objext conftest.beam
5656 test "x$ac_cv_prog_cc_c89" != "xno" && break
5657 done
5658 rm -f conftest.$ac_ext
5659 CC=$ac_save_CC
5660 fi
5661
5662 if test "x$ac_cv_prog_cc_c89" = xno
5663 then :
5664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5665 printf "%s\n" "unsupported" >&6; }
5666 else $as_nop
5667 if test "x$ac_cv_prog_cc_c89" = x
5668 then :
5669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5670 printf "%s\n" "none needed" >&6; }
5671 else $as_nop
5672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5673 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; }
5674 CC="$CC $ac_cv_prog_cc_c89"
5675 fi
5676 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5677 ac_prog_cc_stdc=c89
5678 fi
5679 fi
5680
5681 ac_ext=c
5682 ac_cpp='$CPP $CPPFLAGS'
5683 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5684 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5685 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5686
5687 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
5688 printf %s "checking for a sed that does not truncate output... " >&6; }
5689 if test ${ac_cv_path_SED+y}
5690 then :
5691 printf %s "(cached) " >&6
5692 else $as_nop
5693 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
5694 for ac_i in 1 2 3 4 5 6 7; do
5695 ac_script="$ac_script$as_nl$ac_script"
5696 done
5697 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
5698 { ac_script=; unset ac_script;}
5699 if test -z "$SED"; then
5700 ac_path_SED_found=false
5701 # Loop through the user's path and test for each of PROGNAME-LIST
5702 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703 for as_dir in $PATH
5704 do
5705 IFS=$as_save_IFS
5706 case $as_dir in #(((
5707 '') as_dir=./ ;;
5708 */) ;;
5709 *) as_dir=$as_dir/ ;;
5710 esac
5711 for ac_prog in sed gsed
5712 do
5713 for ac_exec_ext in '' $ac_executable_extensions; do
5714 ac_path_SED="$as_dir$ac_prog$ac_exec_ext"
5715 as_fn_executable_p "$ac_path_SED" || continue
5716 # Check for GNU ac_path_SED and select it if it is found.
5717 # Check for GNU $ac_path_SED
5718 case `"$ac_path_SED" --version 2>&1` in
5719 *GNU*)
5720 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
5721 *)
5722 ac_count=0
5723 printf %s 0123456789 >"conftest.in"
5724 while :
5725 do
5726 cat "conftest.in" "conftest.in" >"conftest.tmp"
5727 mv "conftest.tmp" "conftest.in"
5728 cp "conftest.in" "conftest.nl"
5729 printf "%s\n" '' >> "conftest.nl"
5730 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
5731 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5732 as_fn_arith $ac_count + 1 && ac_count=$as_val
5733 if test $ac_count -gt ${ac_path_SED_max-0}; then
5734 # Best one so far, save it but keep looking for a better one
5735 ac_cv_path_SED="$ac_path_SED"
5736 ac_path_SED_max=$ac_count
5737 fi
5738 # 10*(2^10) chars as input seems more than enough
5739 test $ac_count -gt 10 && break
5740 done
5741 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5742 esac
5743
5744 $ac_path_SED_found && break 3
5745 done
5746 done
5747 done
5748 IFS=$as_save_IFS
5749 if test -z "$ac_cv_path_SED"; then
5750 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
5751 fi
5752 else
5753 ac_cv_path_SED=$SED
5754 fi
5755
5756 fi
5757 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
5758 printf "%s\n" "$ac_cv_path_SED" >&6; }
5759 SED="$ac_cv_path_SED"
5760 rm -f conftest.sed
5761
5762 test -z "$SED" && SED=sed
5763 Xsed="$SED -e 1s/^X//"
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5776 printf %s "checking for grep that handles long lines and -e... " >&6; }
5777 if test ${ac_cv_path_GREP+y}
5778 then :
5779 printf %s "(cached) " >&6
5780 else $as_nop
5781 if test -z "$GREP"; then
5782 ac_path_GREP_found=false
5783 # Loop through the user's path and test for each of PROGNAME-LIST
5784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5785 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5786 do
5787 IFS=$as_save_IFS
5788 case $as_dir in #(((
5789 '') as_dir=./ ;;
5790 */) ;;
5791 *) as_dir=$as_dir/ ;;
5792 esac
5793 for ac_prog in grep ggrep
5794 do
5795 for ac_exec_ext in '' $ac_executable_extensions; do
5796 ac_path_GREP="$as_dir$ac_prog$ac_exec_ext"
5797 as_fn_executable_p "$ac_path_GREP" || continue
5798 # Check for GNU ac_path_GREP and select it if it is found.
5799 # Check for GNU $ac_path_GREP
5800 case `"$ac_path_GREP" --version 2>&1` in
5801 *GNU*)
5802 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5803 *)
5804 ac_count=0
5805 printf %s 0123456789 >"conftest.in"
5806 while :
5807 do
5808 cat "conftest.in" "conftest.in" >"conftest.tmp"
5809 mv "conftest.tmp" "conftest.in"
5810 cp "conftest.in" "conftest.nl"
5811 printf "%s\n" 'GREP' >> "conftest.nl"
5812 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5813 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5814 as_fn_arith $ac_count + 1 && ac_count=$as_val
5815 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5816 # Best one so far, save it but keep looking for a better one
5817 ac_cv_path_GREP="$ac_path_GREP"
5818 ac_path_GREP_max=$ac_count
5819 fi
5820 # 10*(2^10) chars as input seems more than enough
5821 test $ac_count -gt 10 && break
5822 done
5823 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5824 esac
5825
5826 $ac_path_GREP_found && break 3
5827 done
5828 done
5829 done
5830 IFS=$as_save_IFS
5831 if test -z "$ac_cv_path_GREP"; then
5832 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5833 fi
5834 else
5835 ac_cv_path_GREP=$GREP
5836 fi
5837
5838 fi
5839 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5840 printf "%s\n" "$ac_cv_path_GREP" >&6; }
5841 GREP="$ac_cv_path_GREP"
5842
5843
5844 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5845 printf %s "checking for egrep... " >&6; }
5846 if test ${ac_cv_path_EGREP+y}
5847 then :
5848 printf %s "(cached) " >&6
5849 else $as_nop
5850 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5851 then ac_cv_path_EGREP="$GREP -E"
5852 else
5853 if test -z "$EGREP"; then
5854 ac_path_EGREP_found=false
5855 # Loop through the user's path and test for each of PROGNAME-LIST
5856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5857 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5858 do
5859 IFS=$as_save_IFS
5860 case $as_dir in #(((
5861 '') as_dir=./ ;;
5862 */) ;;
5863 *) as_dir=$as_dir/ ;;
5864 esac
5865 for ac_prog in egrep
5866 do
5867 for ac_exec_ext in '' $ac_executable_extensions; do
5868 ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext"
5869 as_fn_executable_p "$ac_path_EGREP" || continue
5870 # Check for GNU ac_path_EGREP and select it if it is found.
5871 # Check for GNU $ac_path_EGREP
5872 case `"$ac_path_EGREP" --version 2>&1` in
5873 *GNU*)
5874 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5875 *)
5876 ac_count=0
5877 printf %s 0123456789 >"conftest.in"
5878 while :
5879 do
5880 cat "conftest.in" "conftest.in" >"conftest.tmp"
5881 mv "conftest.tmp" "conftest.in"
5882 cp "conftest.in" "conftest.nl"
5883 printf "%s\n" 'EGREP' >> "conftest.nl"
5884 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5885 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5886 as_fn_arith $ac_count + 1 && ac_count=$as_val
5887 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5888 # Best one so far, save it but keep looking for a better one
5889 ac_cv_path_EGREP="$ac_path_EGREP"
5890 ac_path_EGREP_max=$ac_count
5891 fi
5892 # 10*(2^10) chars as input seems more than enough
5893 test $ac_count -gt 10 && break
5894 done
5895 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5896 esac
5897
5898 $ac_path_EGREP_found && break 3
5899 done
5900 done
5901 done
5902 IFS=$as_save_IFS
5903 if test -z "$ac_cv_path_EGREP"; then
5904 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5905 fi
5906 else
5907 ac_cv_path_EGREP=$EGREP
5908 fi
5909
5910 fi
5911 fi
5912 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5913 printf "%s\n" "$ac_cv_path_EGREP" >&6; }
5914 EGREP="$ac_cv_path_EGREP"
5915
5916
5917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
5918 printf %s "checking for fgrep... " >&6; }
5919 if test ${ac_cv_path_FGREP+y}
5920 then :
5921 printf %s "(cached) " >&6
5922 else $as_nop
5923 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
5924 then ac_cv_path_FGREP="$GREP -F"
5925 else
5926 if test -z "$FGREP"; then
5927 ac_path_FGREP_found=false
5928 # Loop through the user's path and test for each of PROGNAME-LIST
5929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5931 do
5932 IFS=$as_save_IFS
5933 case $as_dir in #(((
5934 '') as_dir=./ ;;
5935 */) ;;
5936 *) as_dir=$as_dir/ ;;
5937 esac
5938 for ac_prog in fgrep
5939 do
5940 for ac_exec_ext in '' $ac_executable_extensions; do
5941 ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext"
5942 as_fn_executable_p "$ac_path_FGREP" || continue
5943 # Check for GNU ac_path_FGREP and select it if it is found.
5944 # Check for GNU $ac_path_FGREP
5945 case `"$ac_path_FGREP" --version 2>&1` in
5946 *GNU*)
5947 ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
5948 *)
5949 ac_count=0
5950 printf %s 0123456789 >"conftest.in"
5951 while :
5952 do
5953 cat "conftest.in" "conftest.in" >"conftest.tmp"
5954 mv "conftest.tmp" "conftest.in"
5955 cp "conftest.in" "conftest.nl"
5956 printf "%s\n" 'FGREP' >> "conftest.nl"
5957 "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
5958 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5959 as_fn_arith $ac_count + 1 && ac_count=$as_val
5960 if test $ac_count -gt ${ac_path_FGREP_max-0}; then
5961 # Best one so far, save it but keep looking for a better one
5962 ac_cv_path_FGREP="$ac_path_FGREP"
5963 ac_path_FGREP_max=$ac_count
5964 fi
5965 # 10*(2^10) chars as input seems more than enough
5966 test $ac_count -gt 10 && break
5967 done
5968 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5969 esac
5970
5971 $ac_path_FGREP_found && break 3
5972 done
5973 done
5974 done
5975 IFS=$as_save_IFS
5976 if test -z "$ac_cv_path_FGREP"; then
5977 as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5978 fi
5979 else
5980 ac_cv_path_FGREP=$FGREP
5981 fi
5982
5983 fi
5984 fi
5985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
5986 printf "%s\n" "$ac_cv_path_FGREP" >&6; }
5987 FGREP="$ac_cv_path_FGREP"
5988
5989
5990 test -z "$GREP" && GREP=grep
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010 # Check whether --with-gnu-ld was given.
6011 if test ${with_gnu_ld+y}
6012 then :
6013 withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
6014 else $as_nop
6015 with_gnu_ld=no
6016 fi
6017
6018 ac_prog=ld
6019 if test yes = "$GCC"; then
6020 # Check if gcc -print-prog-name=ld gives a path.
6021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
6022 printf %s "checking for ld used by $CC... " >&6; }
6023 case $target in
6024 *-*-mingw* | *-*-windows*)
6025 # gcc leaves a trailing carriage return, which upsets mingw
6026 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
6027 *)
6028 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
6029 esac
6030 case $ac_prog in
6031 # Accept absolute paths.
6032 [\\/]* | ?:[\\/]*)
6033 re_direlt='/[^/][^/]*/\.\./'
6034 # Canonicalize the pathname of ld
6035 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
6036 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
6037 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
6038 done
6039 test -z "$LD" && LD=$ac_prog
6040 ;;
6041 "")
6042 # If it fails, then pretend we aren't using GCC.
6043 ac_prog=ld
6044 ;;
6045 *)
6046 # If it is relative, then search for the first ld in PATH.
6047 with_gnu_ld=unknown
6048 ;;
6049 esac
6050 elif test yes = "$with_gnu_ld"; then
6051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
6052 printf %s "checking for GNU ld... " >&6; }
6053 else
6054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
6055 printf %s "checking for non-GNU ld... " >&6; }
6056 fi
6057 if test ${lt_cv_path_LD+y}
6058 then :
6059 printf %s "(cached) " >&6
6060 else $as_nop
6061 if test -z "$LD"; then
6062 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6063 for ac_dir in $PATH; do
6064 IFS=$lt_save_ifs
6065 test -z "$ac_dir" && ac_dir=.
6066 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
6067 lt_cv_path_LD=$ac_dir/$ac_prog
6068 # Check to see if the program is GNU ld. I'd rather use --version,
6069 # but apparently some variants of GNU ld only accept -v.
6070 # Break only if it was the GNU/non-GNU ld that we prefer.
6071 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
6072 *GNU* | *'with BFD'*)
6073 test no != "$with_gnu_ld" && break
6074 ;;
6075 *)
6076 test yes != "$with_gnu_ld" && break
6077 ;;
6078 esac
6079 fi
6080 done
6081 IFS=$lt_save_ifs
6082 else
6083 lt_cv_path_LD=$LD # Let the user override the test with a path.
6084 fi
6085 fi
6086
6087 LD=$lt_cv_path_LD
6088 if test -n "$LD"; then
6089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
6090 printf "%s\n" "$LD" >&6; }
6091 else
6092 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6093 printf "%s\n" "no" >&6; }
6094 fi
6095 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
6096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
6097 printf %s "checking if the linker ($LD) is GNU ld... " >&6; }
6098 if test ${lt_cv_prog_gnu_ld+y}
6099 then :
6100 printf %s "(cached) " >&6
6101 else $as_nop
6102 # I'd rather use --version here, but apparently some GNU lds only accept -v.
6103 case `$LD -v 2>&1 </dev/null` in
6104 *GNU* | *'with BFD'*)
6105 lt_cv_prog_gnu_ld=yes
6106 ;;
6107 *)
6108 lt_cv_prog_gnu_ld=no
6109 ;;
6110 esac
6111 fi
6112 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
6113 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; }
6114 with_gnu_ld=$lt_cv_prog_gnu_ld
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
6125 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
6126 if test ${lt_cv_path_NM+y}
6127 then :
6128 printf %s "(cached) " >&6
6129 else $as_nop
6130 if test -n "$NM"; then
6131 # Let the user override the test.
6132 lt_cv_path_NM=$NM
6133 else
6134 lt_nm_to_check=${ac_tool_prefix}nm
6135 if test -n "$ac_tool_prefix" && test "$build" = "$target"; then
6136 lt_nm_to_check="$lt_nm_to_check nm"
6137 fi
6138 for lt_tmp_nm in $lt_nm_to_check; do
6139 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
6140 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
6141 IFS=$lt_save_ifs
6142 test -z "$ac_dir" && ac_dir=.
6143 tmp_nm=$ac_dir/$lt_tmp_nm
6144 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
6145 # Check to see if the nm accepts a BSD-compat flag.
6146 # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
6147 # nm: unknown option "B" ignored
6148 # Tru64's nm complains that /dev/null is an invalid object file
6149 # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
6150 case $build_os in
6151 mingw* | windows*) lt_bad_file=conftest.nm/nofile ;;
6152 *) lt_bad_file=/dev/null ;;
6153 esac
6154 case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
6155 *$lt_bad_file* | *'Invalid file or object type'*)
6156 lt_cv_path_NM="$tmp_nm -B"
6157 break 2
6158 ;;
6159 *)
6160 case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
6161 */dev/null*)
6162 lt_cv_path_NM="$tmp_nm -p"
6163 break 2
6164 ;;
6165 *)
6166 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
6167 continue # so that we can try to find one that supports BSD flags
6168 ;;
6169 esac
6170 ;;
6171 esac
6172 fi
6173 done
6174 IFS=$lt_save_ifs
6175 done
6176 : ${lt_cv_path_NM=no}
6177 fi
6178 fi
6179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
6180 printf "%s\n" "$lt_cv_path_NM" >&6; }
6181 if test no != "$lt_cv_path_NM"; then
6182 NM=$lt_cv_path_NM
6183 else
6184 # Didn't find any BSD compatible name lister, look for dumpbin.
6185 if test -n "$DUMPBIN"; then :
6186 # Let the user override the test.
6187 else
6188 if test -n "$ac_tool_prefix"; then
6189 for ac_prog in dumpbin "link -dump"
6190 do
6191 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6192 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6194 printf %s "checking for $ac_word... " >&6; }
6195 if test ${ac_cv_prog_DUMPBIN+y}
6196 then :
6197 printf %s "(cached) " >&6
6198 else $as_nop
6199 if test -n "$DUMPBIN"; then
6200 ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
6201 else
6202 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6203 for as_dir in $PATH
6204 do
6205 IFS=$as_save_IFS
6206 case $as_dir in #(((
6207 '') as_dir=./ ;;
6208 */) ;;
6209 *) as_dir=$as_dir/ ;;
6210 esac
6211 for ac_exec_ext in '' $ac_executable_extensions; do
6212 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6213 ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
6214 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6215 break 2
6216 fi
6217 done
6218 done
6219 IFS=$as_save_IFS
6220
6221 fi
6222 fi
6223 DUMPBIN=$ac_cv_prog_DUMPBIN
6224 if test -n "$DUMPBIN"; then
6225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
6226 printf "%s\n" "$DUMPBIN" >&6; }
6227 else
6228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6229 printf "%s\n" "no" >&6; }
6230 fi
6231
6232
6233 test -n "$DUMPBIN" && break
6234 done
6235 fi
6236 if test -z "$DUMPBIN"; then
6237 ac_ct_DUMPBIN=$DUMPBIN
6238 for ac_prog in dumpbin "link -dump"
6239 do
6240 # Extract the first word of "$ac_prog", so it can be a program name with args.
6241 set dummy $ac_prog; ac_word=$2
6242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6243 printf %s "checking for $ac_word... " >&6; }
6244 if test ${ac_cv_prog_ac_ct_DUMPBIN+y}
6245 then :
6246 printf %s "(cached) " >&6
6247 else $as_nop
6248 if test -n "$ac_ct_DUMPBIN"; then
6249 ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
6250 else
6251 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6252 for as_dir in $PATH
6253 do
6254 IFS=$as_save_IFS
6255 case $as_dir in #(((
6256 '') as_dir=./ ;;
6257 */) ;;
6258 *) as_dir=$as_dir/ ;;
6259 esac
6260 for ac_exec_ext in '' $ac_executable_extensions; do
6261 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6262 ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
6263 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6264 break 2
6265 fi
6266 done
6267 done
6268 IFS=$as_save_IFS
6269
6270 fi
6271 fi
6272 ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
6273 if test -n "$ac_ct_DUMPBIN"; then
6274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
6275 printf "%s\n" "$ac_ct_DUMPBIN" >&6; }
6276 else
6277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6278 printf "%s\n" "no" >&6; }
6279 fi
6280
6281
6282 test -n "$ac_ct_DUMPBIN" && break
6283 done
6284
6285 if test "x$ac_ct_DUMPBIN" = x; then
6286 DUMPBIN=":"
6287 else
6288 case $cross_compiling:$ac_tool_warned in
6289 yes:)
6290 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
6291 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
6292 ac_tool_warned=yes ;;
6293 esac
6294 DUMPBIN=$ac_ct_DUMPBIN
6295 fi
6296 fi
6297
6298 case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
6299 *COFF*)
6300 DUMPBIN="$DUMPBIN -symbols -headers"
6301 ;;
6302 *)
6303 DUMPBIN=:
6304 ;;
6305 esac
6306 fi
6307
6308 if test : != "$DUMPBIN"; then
6309 NM=$DUMPBIN
6310 fi
6311 fi
6312 test -z "$NM" && NM=nm
6313
6314
6315
6316
6317
6318
6319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
6320 printf %s "checking the name lister ($NM) interface... " >&6; }
6321 if test ${lt_cv_nm_interface+y}
6322 then :
6323 printf %s "(cached) " >&6
6324 else $as_nop
6325 lt_cv_nm_interface="BSD nm"
6326 echo "int some_variable = 0;" > conftest.$ac_ext
6327 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5)
6328 (eval "$ac_compile" 2>conftest.err)
6329 cat conftest.err >&5
6330 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
6331 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
6332 cat conftest.err >&5
6333 (eval echo "\"\$as_me:$LINENO: output\"" >&5)
6334 cat conftest.out >&5
6335 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
6336 lt_cv_nm_interface="MS dumpbin"
6337 fi
6338 rm -f conftest*
6339 fi
6340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
6341 printf "%s\n" "$lt_cv_nm_interface" >&6; }
6342
6343 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
6344 printf %s "checking whether ln -s works... " >&6; }
6345 LN_S=$as_ln_s
6346 if test "$LN_S" = "ln -s"; then
6347 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6348 printf "%s\n" "yes" >&6; }
6349 else
6350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
6351 printf "%s\n" "no, using $LN_S" >&6; }
6352 fi
6353
6354 # find the maximum length of command line arguments
6355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
6356 printf %s "checking the maximum length of command line arguments... " >&6; }
6357 if test ${lt_cv_sys_max_cmd_len+y}
6358 then :
6359 printf %s "(cached) " >&6
6360 else $as_nop
6361 i=0
6362 teststring=ABCD
6363
6364 case $build_os in
6365 msdosdjgpp*)
6366 # On DJGPP, this test can blow up pretty badly due to problems in libc
6367 # (any single argument exceeding 2000 bytes causes a buffer overrun
6368 # during glob expansion). Even if it were fixed, the result of this
6369 # check would be larger than it should be.
6370 lt_cv_sys_max_cmd_len=12288; # 12K is about right
6371 ;;
6372
6373 gnu* | ironclad*)
6374 # Under GNU Hurd and Ironclad, this test is not required because there
6375 # is no limit to the length of command line arguments.
6376 # Libtool will interpret -1 as no limit whatsoever
6377 lt_cv_sys_max_cmd_len=-1;
6378 ;;
6379
6380 cygwin* | mingw* | windows* | cegcc*)
6381 # On Win9x/ME, this test blows up -- it succeeds, but takes
6382 # about 5 minutes as the teststring grows exponentially.
6383 # Worse, since 9x/ME are not pre-emptively multitasking,
6384 # you end up with a "frozen" computer, even though with patience
6385 # the test eventually succeeds (with a max line length of 256k).
6386 # Instead, let's just punt: use the minimum linelength reported by
6387 # all of the supported platforms: 8192 (on NT/2K/XP).
6388 lt_cv_sys_max_cmd_len=8192;
6389 ;;
6390
6391 mint*)
6392 # On MiNT this can take a long time and run out of memory.
6393 lt_cv_sys_max_cmd_len=8192;
6394 ;;
6395
6396 amigaos*)
6397 # On AmigaOS with pdksh, this test takes hours, literally.
6398 # So we just punt and use a minimum line length of 8192.
6399 lt_cv_sys_max_cmd_len=8192;
6400 ;;
6401
6402 darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
6403 # This has been around since 386BSD, at least. Likely further.
6404 if test -x /sbin/sysctl; then
6405 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
6406 elif test -x /usr/sbin/sysctl; then
6407 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
6408 else
6409 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
6410 fi
6411 # And add a safety zone
6412 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6413 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6414 ;;
6415
6416 interix*)
6417 # We know the value 262144 and hardcode it with a safety zone (like BSD)
6418 lt_cv_sys_max_cmd_len=196608
6419 ;;
6420
6421 os2*)
6422 # The test takes a long time on OS/2.
6423 lt_cv_sys_max_cmd_len=8192
6424 ;;
6425
6426 osf*)
6427 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
6428 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
6429 # nice to cause kernel panics so lets avoid the loop below.
6430 # First set a reasonable default.
6431 lt_cv_sys_max_cmd_len=16384
6432 #
6433 if test -x /sbin/sysconfig; then
6434 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
6435 *1*) lt_cv_sys_max_cmd_len=-1 ;;
6436 esac
6437 fi
6438 ;;
6439 sco3.2v5*)
6440 lt_cv_sys_max_cmd_len=102400
6441 ;;
6442 sysv5* | sco5v6* | sysv4.2uw2*)
6443 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
6444 if test -n "$kargmax"; then
6445 lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'`
6446 else
6447 lt_cv_sys_max_cmd_len=32768
6448 fi
6449 ;;
6450 *)
6451 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
6452 if test -n "$lt_cv_sys_max_cmd_len" && \
6453 test undefined != "$lt_cv_sys_max_cmd_len"; then
6454 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
6455 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
6456 else
6457 # Make teststring a little bigger before we do anything with it.
6458 # a 1K string should be a reasonable start.
6459 for i in 1 2 3 4 5 6 7 8; do
6460 teststring=$teststring$teststring
6461 done
6462 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
6463 # If test is not a shell built-in, we'll probably end up computing a
6464 # maximum length that is only half of the actual maximum length, but
6465 # we can't tell.
6466 while { test X`env echo "$teststring$teststring" 2>/dev/null` \
6467 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
6468 test 17 != "$i" # 1/2 MB should be enough
6469 do
6470 i=`expr $i + 1`
6471 teststring=$teststring$teststring
6472 done
6473 # Only check the string length outside the loop.
6474 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
6475 teststring=
6476 # Add a significant safety factor because C++ compilers can tack on
6477 # massive amounts of additional arguments before passing them to the
6478 # linker. It appears as though 1/2 is a usable value.
6479 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
6480 fi
6481 ;;
6482 esac
6483
6484 fi
6485
6486 if test -n "$lt_cv_sys_max_cmd_len"; then
6487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
6488 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; }
6489 else
6490 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5
6491 printf "%s\n" "none" >&6; }
6492 fi
6493 max_cmd_len=$lt_cv_sys_max_cmd_len
6494
6495
6496
6497
6498
6499
6500 : ${CP="cp -f"}
6501 : ${MV="mv -f"}
6502 : ${RM="rm -f"}
6503
6504 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
6505 lt_unset=unset
6506 else
6507 lt_unset=false
6508 fi
6509
6510
6511
6512
6513
6514 # test EBCDIC or ASCII
6515 case `echo X|tr X '\101'` in
6516 A) # ASCII based system
6517 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
6518 lt_SP2NL='tr \040 \012'
6519 lt_NL2SP='tr \015\012 \040\040'
6520 ;;
6521 *) # EBCDIC based system
6522 lt_SP2NL='tr \100 \n'
6523 lt_NL2SP='tr \r\n \100\100'
6524 ;;
6525 esac
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $target format" >&5
6536 printf %s "checking how to convert $build file names to $target format... " >&6; }
6537 if test ${lt_cv_to_host_file_cmd+y}
6538 then :
6539 printf %s "(cached) " >&6
6540 else $as_nop
6541 case $target in
6542 *-*-mingw* )
6543 case $build in
6544 *-*-mingw* | *-*-windows* ) # actually msys
6545 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
6546 ;;
6547 *-*-cygwin* )
6548 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
6549 ;;
6550 * ) # otherwise, assume *nix
6551 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
6552 ;;
6553 esac
6554 ;;
6555 *-*-cygwin* )
6556 case $build in
6557 *-*-mingw* | *-*-windows* ) # actually msys
6558 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
6559 ;;
6560 *-*-cygwin* )
6561 lt_cv_to_host_file_cmd=func_convert_file_noop
6562 ;;
6563 * ) # otherwise, assume *nix
6564 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
6565 ;;
6566 esac
6567 ;;
6568 * ) # unhandled hosts (and "normal" native builds)
6569 lt_cv_to_host_file_cmd=func_convert_file_noop
6570 ;;
6571 esac
6572
6573 fi
6574
6575 to_host_file_cmd=$lt_cv_to_host_file_cmd
6576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5
6577 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; }
6578
6579
6580
6581
6582
6583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5
6584 printf %s "checking how to convert $build file names to toolchain format... " >&6; }
6585 if test ${lt_cv_to_tool_file_cmd+y}
6586 then :
6587 printf %s "(cached) " >&6
6588 else $as_nop
6589 #assume ordinary cross tools, or native build.
6590 lt_cv_to_tool_file_cmd=func_convert_file_noop
6591 case $target in
6592 *-*-mingw* | *-*-windows* )
6593 case $build in
6594 *-*-mingw* | *-*-windows* ) # actually msys
6595 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
6596 ;;
6597 esac
6598 ;;
6599 esac
6600
6601 fi
6602
6603 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
6604 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5
6605 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; }
6606
6607
6608
6609
6610
6611 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
6612 printf %s "checking for $LD option to reload object files... " >&6; }
6613 if test ${lt_cv_ld_reload_flag+y}
6614 then :
6615 printf %s "(cached) " >&6
6616 else $as_nop
6617 lt_cv_ld_reload_flag='-r'
6618 fi
6619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
6620 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; }
6621 reload_flag=$lt_cv_ld_reload_flag
6622 case $reload_flag in
6623 "" | " "*) ;;
6624 *) reload_flag=" $reload_flag" ;;
6625 esac
6626 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6627 case $target_os in
6628 cygwin* | mingw* | windows* | pw32* | cegcc*)
6629 if test yes != "$GCC"; then
6630 reload_cmds=false
6631 fi
6632 ;;
6633 darwin*)
6634 if test yes = "$GCC"; then
6635 reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
6636 else
6637 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6638 fi
6639 ;;
6640 esac
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650 # Extract the first word of "file", so it can be a program name with args.
6651 set dummy file; ac_word=$2
6652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6653 printf %s "checking for $ac_word... " >&6; }
6654 if test ${ac_cv_prog_FILECMD+y}
6655 then :
6656 printf %s "(cached) " >&6
6657 else $as_nop
6658 if test -n "$FILECMD"; then
6659 ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test.
6660 else
6661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6662 for as_dir in $PATH
6663 do
6664 IFS=$as_save_IFS
6665 case $as_dir in #(((
6666 '') as_dir=./ ;;
6667 */) ;;
6668 *) as_dir=$as_dir/ ;;
6669 esac
6670 for ac_exec_ext in '' $ac_executable_extensions; do
6671 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6672 ac_cv_prog_FILECMD="file"
6673 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6674 break 2
6675 fi
6676 done
6677 done
6678 IFS=$as_save_IFS
6679
6680 test -z "$ac_cv_prog_FILECMD" && ac_cv_prog_FILECMD=":"
6681 fi
6682 fi
6683 FILECMD=$ac_cv_prog_FILECMD
6684 if test -n "$FILECMD"; then
6685 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5
6686 printf "%s\n" "$FILECMD" >&6; }
6687 else
6688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6689 printf "%s\n" "no" >&6; }
6690 fi
6691
6692
6693
6694
6695
6696
6697
6698
6699 if test -n "$ac_tool_prefix"; then
6700 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
6701 set dummy ${ac_tool_prefix}objdump; ac_word=$2
6702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6703 printf %s "checking for $ac_word... " >&6; }
6704 if test ${ac_cv_prog_OBJDUMP+y}
6705 then :
6706 printf %s "(cached) " >&6
6707 else $as_nop
6708 if test -n "$OBJDUMP"; then
6709 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
6710 else
6711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6712 for as_dir in $PATH
6713 do
6714 IFS=$as_save_IFS
6715 case $as_dir in #(((
6716 '') as_dir=./ ;;
6717 */) ;;
6718 *) as_dir=$as_dir/ ;;
6719 esac
6720 for ac_exec_ext in '' $ac_executable_extensions; do
6721 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6722 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6723 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6724 break 2
6725 fi
6726 done
6727 done
6728 IFS=$as_save_IFS
6729
6730 fi
6731 fi
6732 OBJDUMP=$ac_cv_prog_OBJDUMP
6733 if test -n "$OBJDUMP"; then
6734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
6735 printf "%s\n" "$OBJDUMP" >&6; }
6736 else
6737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6738 printf "%s\n" "no" >&6; }
6739 fi
6740
6741
6742 fi
6743 if test -z "$ac_cv_prog_OBJDUMP"; then
6744 ac_ct_OBJDUMP=$OBJDUMP
6745 # Extract the first word of "objdump", so it can be a program name with args.
6746 set dummy objdump; ac_word=$2
6747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6748 printf %s "checking for $ac_word... " >&6; }
6749 if test ${ac_cv_prog_ac_ct_OBJDUMP+y}
6750 then :
6751 printf %s "(cached) " >&6
6752 else $as_nop
6753 if test -n "$ac_ct_OBJDUMP"; then
6754 ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
6755 else
6756 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6757 for as_dir in $PATH
6758 do
6759 IFS=$as_save_IFS
6760 case $as_dir in #(((
6761 '') as_dir=./ ;;
6762 */) ;;
6763 *) as_dir=$as_dir/ ;;
6764 esac
6765 for ac_exec_ext in '' $ac_executable_extensions; do
6766 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
6767 ac_cv_prog_ac_ct_OBJDUMP="objdump"
6768 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
6769 break 2
6770 fi
6771 done
6772 done
6773 IFS=$as_save_IFS
6774
6775 fi
6776 fi
6777 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
6778 if test -n "$ac_ct_OBJDUMP"; then
6779 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
6780 printf "%s\n" "$ac_ct_OBJDUMP" >&6; }
6781 else
6782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
6783 printf "%s\n" "no" >&6; }
6784 fi
6785
6786 if test "x$ac_ct_OBJDUMP" = x; then
6787 OBJDUMP="false"
6788 else
6789 case $cross_compiling:$ac_tool_warned in
6790 yes:)
6791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
6792 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
6793 ac_tool_warned=yes ;;
6794 esac
6795 OBJDUMP=$ac_ct_OBJDUMP
6796 fi
6797 else
6798 OBJDUMP="$ac_cv_prog_OBJDUMP"
6799 fi
6800
6801 test -z "$OBJDUMP" && OBJDUMP=objdump
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
6812 printf %s "checking how to recognize dependent libraries... " >&6; }
6813 if test ${lt_cv_deplibs_check_method+y}
6814 then :
6815 printf %s "(cached) " >&6
6816 else $as_nop
6817 lt_cv_file_magic_cmd='$MAGIC_CMD'
6818 lt_cv_file_magic_test_file=
6819 lt_cv_deplibs_check_method='unknown'
6820 # Need to set the preceding variable on all platforms that support
6821 # interlibrary dependencies.
6822 # 'none' -- dependencies not supported.
6823 # 'unknown' -- same as none, but documents that we really don't know.
6824 # 'pass_all' -- all dependencies passed with no checks.
6825 # 'file_magic [[regex]]' -- check by looking for files in library path
6826 # that responds to the $file_magic_cmd with a given extended regex.
6827 # If you have 'file' or equivalent on your system and you're not sure
6828 # whether 'pass_all' will *always* work, you probably want this one.
6829
6830 case $target_os in
6831 aix[4-9]*)
6832 lt_cv_deplibs_check_method=pass_all
6833 ;;
6834
6835 beos*)
6836 lt_cv_deplibs_check_method=pass_all
6837 ;;
6838
6839 bsdi[45]*)
6840 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
6841 lt_cv_file_magic_cmd='$FILECMD -L'
6842 lt_cv_file_magic_test_file=/shlib/libc.so
6843 ;;
6844
6845 cygwin*)
6846 # func_win32_libid is a shell function defined in ltmain.sh
6847 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6848 lt_cv_file_magic_cmd='func_win32_libid'
6849 ;;
6850
6851 mingw* | windows* | pw32*)
6852 # Base MSYS/MinGW do not provide the 'file' command needed by
6853 # func_win32_libid shell function, so use a weaker test based on 'objdump',
6854 # unless we find 'file', for example because we are cross-compiling.
6855 if ( file / ) >/dev/null 2>&1; then
6856 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
6857 lt_cv_file_magic_cmd='func_win32_libid'
6858 else
6859 # Keep this pattern in sync with the one in func_win32_libid.
6860 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64|pe-aarch64)'
6861 lt_cv_file_magic_cmd='$OBJDUMP -f'
6862 fi
6863 ;;
6864
6865 cegcc*)
6866 # use the weaker test based on 'objdump'. See mingw*.
6867 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
6868 lt_cv_file_magic_cmd='$OBJDUMP -f'
6869 ;;
6870
6871 darwin* | rhapsody*)
6872 lt_cv_deplibs_check_method=pass_all
6873 ;;
6874
6875 freebsd* | dragonfly* | midnightbsd*)
6876 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6877 case $target_cpu in
6878 i*86 )
6879 # Not sure whether the presence of OpenBSD here was a mistake.
6880 # Let's accept both of them until this is cleared up.
6881 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
6882 lt_cv_file_magic_cmd=$FILECMD
6883 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
6884 ;;
6885 esac
6886 else
6887 lt_cv_deplibs_check_method=pass_all
6888 fi
6889 ;;
6890
6891 haiku*)
6892 lt_cv_deplibs_check_method=pass_all
6893 ;;
6894
6895 hpux10.20* | hpux11*)
6896 lt_cv_file_magic_cmd=$FILECMD
6897 case $target_cpu in
6898 ia64*)
6899 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
6900 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
6901 ;;
6902 hppa*64*)
6903 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'
6904 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
6905 ;;
6906 *)
6907 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library'
6908 lt_cv_file_magic_test_file=/usr/lib/libc.sl
6909 ;;
6910 esac
6911 ;;
6912
6913 interix[3-9]*)
6914 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
6915 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
6916 ;;
6917
6918 irix5* | irix6* | nonstopux*)
6919 case $LD in
6920 *-32|*"-32 ") libmagic=32-bit;;
6921 *-n32|*"-n32 ") libmagic=N32;;
6922 *-64|*"-64 ") libmagic=64-bit;;
6923 *) libmagic=never-match;;
6924 esac
6925 lt_cv_deplibs_check_method=pass_all
6926 ;;
6927
6928 # This must be glibc/ELF.
6929 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
6930 lt_cv_deplibs_check_method=pass_all
6931 ;;
6932
6933 *-mlibc)
6934 lt_cv_deplibs_check_method=pass_all
6935 ;;
6936
6937 netbsd* | netbsdelf*-gnu)
6938 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
6939 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6940 else
6941 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
6942 fi
6943 ;;
6944
6945 newos6*)
6946 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
6947 lt_cv_file_magic_cmd=$FILECMD
6948 lt_cv_file_magic_test_file=/usr/lib/libnls.so
6949 ;;
6950
6951 *nto* | *qnx*)
6952 lt_cv_deplibs_check_method=pass_all
6953 ;;
6954
6955 openbsd*)
6956 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
6957 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
6958 else
6959 lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
6960 fi
6961 ;;
6962
6963 osf3* | osf4* | osf5*)
6964 lt_cv_deplibs_check_method=pass_all
6965 ;;
6966
6967 rdos*)
6968 lt_cv_deplibs_check_method=pass_all
6969 ;;
6970
6971 serenity*)
6972 lt_cv_deplibs_check_method=pass_all
6973 ;;
6974
6975 solaris*)
6976 lt_cv_deplibs_check_method=pass_all
6977 ;;
6978
6979 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
6980 lt_cv_deplibs_check_method=pass_all
6981 ;;
6982
6983 sysv4 | sysv4.3*)
6984 case $target_vendor in
6985 motorola)
6986 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
6987 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
6988 ;;
6989 ncr)
6990 lt_cv_deplibs_check_method=pass_all
6991 ;;
6992 sequent)
6993 lt_cv_file_magic_cmd='/bin/file'
6994 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
6995 ;;
6996 sni)
6997 lt_cv_file_magic_cmd='/bin/file'
6998 lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
6999 lt_cv_file_magic_test_file=/lib/libc.so
7000 ;;
7001 siemens)
7002 lt_cv_deplibs_check_method=pass_all
7003 ;;
7004 pc)
7005 lt_cv_deplibs_check_method=pass_all
7006 ;;
7007 esac
7008 ;;
7009
7010 tpf*)
7011 lt_cv_deplibs_check_method=pass_all
7012 ;;
7013 os2*)
7014 lt_cv_deplibs_check_method=pass_all
7015 ;;
7016 esac
7017
7018 fi
7019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
7020 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; }
7021
7022 file_magic_glob=
7023 want_nocaseglob=no
7024 if test "$build" = "$target"; then
7025 case $target_os in
7026 mingw* | windows* | pw32*)
7027 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
7028 want_nocaseglob=yes
7029 else
7030 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"`
7031 fi
7032 ;;
7033 esac
7034 fi
7035
7036 file_magic_cmd=$lt_cv_file_magic_cmd
7037 deplibs_check_method=$lt_cv_deplibs_check_method
7038 test -z "$deplibs_check_method" && deplibs_check_method=unknown
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061 if test -n "$ac_tool_prefix"; then
7062 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7063 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7064 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7065 printf %s "checking for $ac_word... " >&6; }
7066 if test ${ac_cv_prog_DLLTOOL+y}
7067 then :
7068 printf %s "(cached) " >&6
7069 else $as_nop
7070 if test -n "$DLLTOOL"; then
7071 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7072 else
7073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7074 for as_dir in $PATH
7075 do
7076 IFS=$as_save_IFS
7077 case $as_dir in #(((
7078 '') as_dir=./ ;;
7079 */) ;;
7080 *) as_dir=$as_dir/ ;;
7081 esac
7082 for ac_exec_ext in '' $ac_executable_extensions; do
7083 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7084 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7085 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7086 break 2
7087 fi
7088 done
7089 done
7090 IFS=$as_save_IFS
7091
7092 fi
7093 fi
7094 DLLTOOL=$ac_cv_prog_DLLTOOL
7095 if test -n "$DLLTOOL"; then
7096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7097 printf "%s\n" "$DLLTOOL" >&6; }
7098 else
7099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7100 printf "%s\n" "no" >&6; }
7101 fi
7102
7103
7104 fi
7105 if test -z "$ac_cv_prog_DLLTOOL"; then
7106 ac_ct_DLLTOOL=$DLLTOOL
7107 # Extract the first word of "dlltool", so it can be a program name with args.
7108 set dummy dlltool; ac_word=$2
7109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7110 printf %s "checking for $ac_word... " >&6; }
7111 if test ${ac_cv_prog_ac_ct_DLLTOOL+y}
7112 then :
7113 printf %s "(cached) " >&6
7114 else $as_nop
7115 if test -n "$ac_ct_DLLTOOL"; then
7116 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7117 else
7118 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7119 for as_dir in $PATH
7120 do
7121 IFS=$as_save_IFS
7122 case $as_dir in #(((
7123 '') as_dir=./ ;;
7124 */) ;;
7125 *) as_dir=$as_dir/ ;;
7126 esac
7127 for ac_exec_ext in '' $ac_executable_extensions; do
7128 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7129 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7130 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7131 break 2
7132 fi
7133 done
7134 done
7135 IFS=$as_save_IFS
7136
7137 fi
7138 fi
7139 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7140 if test -n "$ac_ct_DLLTOOL"; then
7141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7142 printf "%s\n" "$ac_ct_DLLTOOL" >&6; }
7143 else
7144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7145 printf "%s\n" "no" >&6; }
7146 fi
7147
7148 if test "x$ac_ct_DLLTOOL" = x; then
7149 DLLTOOL="false"
7150 else
7151 case $cross_compiling:$ac_tool_warned in
7152 yes:)
7153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
7154 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
7155 ac_tool_warned=yes ;;
7156 esac
7157 DLLTOOL=$ac_ct_DLLTOOL
7158 fi
7159 else
7160 DLLTOOL="$ac_cv_prog_DLLTOOL"
7161 fi
7162
7163 test -z "$DLLTOOL" && DLLTOOL=dlltool
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5
7175 printf %s "checking how to associate runtime and link libraries... " >&6; }
7176 if test ${lt_cv_sharedlib_from_linklib_cmd+y}
7177 then :
7178 printf %s "(cached) " >&6
7179 else $as_nop
7180 lt_cv_sharedlib_from_linklib_cmd='unknown'
7181
7182 case $target_os in
7183 cygwin* | mingw* | windows* | pw32* | cegcc*)
7184 # two different shell functions defined in ltmain.sh;
7185 # decide which one to use based on capabilities of $DLLTOOL
7186 case `$DLLTOOL --help 2>&1` in
7187 *--identify-strict*)
7188 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
7189 ;;
7190 *)
7191 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7192 ;;
7193 esac
7194 ;;
7195 *)
7196 # fallback: assume linklib IS sharedlib
7197 lt_cv_sharedlib_from_linklib_cmd=$ECHO
7198 ;;
7199 esac
7200
7201 fi
7202 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5
7203 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; }
7204 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
7205 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7206
7207
7208
7209
7210
7211
7212
7213
7214 if test -n "$ac_tool_prefix"; then
7215 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7216 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7218 printf %s "checking for $ac_word... " >&6; }
7219 if test ${ac_cv_prog_RANLIB+y}
7220 then :
7221 printf %s "(cached) " >&6
7222 else $as_nop
7223 if test -n "$RANLIB"; then
7224 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7225 else
7226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7227 for as_dir in $PATH
7228 do
7229 IFS=$as_save_IFS
7230 case $as_dir in #(((
7231 '') as_dir=./ ;;
7232 */) ;;
7233 *) as_dir=$as_dir/ ;;
7234 esac
7235 for ac_exec_ext in '' $ac_executable_extensions; do
7236 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7237 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7238 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7239 break 2
7240 fi
7241 done
7242 done
7243 IFS=$as_save_IFS
7244
7245 fi
7246 fi
7247 RANLIB=$ac_cv_prog_RANLIB
7248 if test -n "$RANLIB"; then
7249 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7250 printf "%s\n" "$RANLIB" >&6; }
7251 else
7252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7253 printf "%s\n" "no" >&6; }
7254 fi
7255
7256
7257 fi
7258 if test -z "$ac_cv_prog_RANLIB"; then
7259 ac_ct_RANLIB=$RANLIB
7260 # Extract the first word of "ranlib", so it can be a program name with args.
7261 set dummy ranlib; ac_word=$2
7262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7263 printf %s "checking for $ac_word... " >&6; }
7264 if test ${ac_cv_prog_ac_ct_RANLIB+y}
7265 then :
7266 printf %s "(cached) " >&6
7267 else $as_nop
7268 if test -n "$ac_ct_RANLIB"; then
7269 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7270 else
7271 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7272 for as_dir in $PATH
7273 do
7274 IFS=$as_save_IFS
7275 case $as_dir in #(((
7276 '') as_dir=./ ;;
7277 */) ;;
7278 *) as_dir=$as_dir/ ;;
7279 esac
7280 for ac_exec_ext in '' $ac_executable_extensions; do
7281 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7282 ac_cv_prog_ac_ct_RANLIB="ranlib"
7283 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7284 break 2
7285 fi
7286 done
7287 done
7288 IFS=$as_save_IFS
7289
7290 fi
7291 fi
7292 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7293 if test -n "$ac_ct_RANLIB"; then
7294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7295 printf "%s\n" "$ac_ct_RANLIB" >&6; }
7296 else
7297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7298 printf "%s\n" "no" >&6; }
7299 fi
7300
7301 if test "x$ac_ct_RANLIB" = x; then
7302 RANLIB=":"
7303 else
7304 case $cross_compiling:$ac_tool_warned in
7305 yes:)
7306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
7307 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
7308 ac_tool_warned=yes ;;
7309 esac
7310 RANLIB=$ac_ct_RANLIB
7311 fi
7312 else
7313 RANLIB="$ac_cv_prog_RANLIB"
7314 fi
7315
7316 if test -n "$ac_tool_prefix"; then
7317 for ac_prog in ar
7318 do
7319 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
7320 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
7321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7322 printf %s "checking for $ac_word... " >&6; }
7323 if test ${ac_cv_prog_AR+y}
7324 then :
7325 printf %s "(cached) " >&6
7326 else $as_nop
7327 if test -n "$AR"; then
7328 ac_cv_prog_AR="$AR" # Let the user override the test.
7329 else
7330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7331 for as_dir in $PATH
7332 do
7333 IFS=$as_save_IFS
7334 case $as_dir in #(((
7335 '') as_dir=./ ;;
7336 */) ;;
7337 *) as_dir=$as_dir/ ;;
7338 esac
7339 for ac_exec_ext in '' $ac_executable_extensions; do
7340 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7341 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7342 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7343 break 2
7344 fi
7345 done
7346 done
7347 IFS=$as_save_IFS
7348
7349 fi
7350 fi
7351 AR=$ac_cv_prog_AR
7352 if test -n "$AR"; then
7353 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7354 printf "%s\n" "$AR" >&6; }
7355 else
7356 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357 printf "%s\n" "no" >&6; }
7358 fi
7359
7360
7361 test -n "$AR" && break
7362 done
7363 fi
7364 if test -z "$AR"; then
7365 ac_ct_AR=$AR
7366 for ac_prog in ar
7367 do
7368 # Extract the first word of "$ac_prog", so it can be a program name with args.
7369 set dummy $ac_prog; ac_word=$2
7370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7371 printf %s "checking for $ac_word... " >&6; }
7372 if test ${ac_cv_prog_ac_ct_AR+y}
7373 then :
7374 printf %s "(cached) " >&6
7375 else $as_nop
7376 if test -n "$ac_ct_AR"; then
7377 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7378 else
7379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7380 for as_dir in $PATH
7381 do
7382 IFS=$as_save_IFS
7383 case $as_dir in #(((
7384 '') as_dir=./ ;;
7385 */) ;;
7386 *) as_dir=$as_dir/ ;;
7387 esac
7388 for ac_exec_ext in '' $ac_executable_extensions; do
7389 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7390 ac_cv_prog_ac_ct_AR="$ac_prog"
7391 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7392 break 2
7393 fi
7394 done
7395 done
7396 IFS=$as_save_IFS
7397
7398 fi
7399 fi
7400 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7401 if test -n "$ac_ct_AR"; then
7402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7403 printf "%s\n" "$ac_ct_AR" >&6; }
7404 else
7405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7406 printf "%s\n" "no" >&6; }
7407 fi
7408
7409
7410 test -n "$ac_ct_AR" && break
7411 done
7412
7413 if test "x$ac_ct_AR" = x; then
7414 AR="false"
7415 else
7416 case $cross_compiling:$ac_tool_warned in
7417 yes:)
7418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
7419 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
7420 ac_tool_warned=yes ;;
7421 esac
7422 AR=$ac_ct_AR
7423 fi
7424 fi
7425
7426 : ${AR=ar}
7427
7428
7429
7430
7431
7432
7433 # Use ARFLAGS variable as AR's operation code to sync the variable naming with
7434 # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
7435 # higher priority because that's what people were doing historically (setting
7436 # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
7437 # variable obsoleted/removed.
7438
7439 test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
7440 lt_ar_flags=$AR_FLAGS
7441
7442
7443
7444
7445
7446
7447 # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
7448 # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
7449
7450
7451
7452
7453
7454
7455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5
7456 printf %s "checking for archiver @FILE support... " >&6; }
7457 if test ${lt_cv_ar_at_file+y}
7458 then :
7459 printf %s "(cached) " >&6
7460 else $as_nop
7461 lt_cv_ar_at_file=no
7462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7463 /* end confdefs.h. */
7464
7465 int
7466 main (void)
7467 {
7468
7469 ;
7470 return 0;
7471 }
7472 _ACEOF
7473 if ac_fn_c_try_compile "$LINENO"
7474 then :
7475 echo conftest.$ac_objext > conftest.lst
7476 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5'
7477 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
7478 (eval $lt_ar_try) 2>&5
7479 ac_status=$?
7480 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7481 test $ac_status = 0; }
7482 if test 0 -eq "$ac_status"; then
7483 # Ensure the archiver fails upon bogus file names.
7484 rm -f conftest.$ac_objext libconftest.a
7485 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
7486 (eval $lt_ar_try) 2>&5
7487 ac_status=$?
7488 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7489 test $ac_status = 0; }
7490 if test 0 -ne "$ac_status"; then
7491 lt_cv_ar_at_file=@
7492 fi
7493 fi
7494 rm -f conftest.* libconftest.a
7495
7496 fi
7497 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
7498
7499 fi
7500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
7501 printf "%s\n" "$lt_cv_ar_at_file" >&6; }
7502
7503 if test no = "$lt_cv_ar_at_file"; then
7504 archiver_list_spec=
7505 else
7506 archiver_list_spec=$lt_cv_ar_at_file
7507 fi
7508
7509
7510
7511
7512
7513
7514
7515 if test -n "$ac_tool_prefix"; then
7516 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
7517 set dummy ${ac_tool_prefix}strip; ac_word=$2
7518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519 printf %s "checking for $ac_word... " >&6; }
7520 if test ${ac_cv_prog_STRIP+y}
7521 then :
7522 printf %s "(cached) " >&6
7523 else $as_nop
7524 if test -n "$STRIP"; then
7525 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
7526 else
7527 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528 for as_dir in $PATH
7529 do
7530 IFS=$as_save_IFS
7531 case $as_dir in #(((
7532 '') as_dir=./ ;;
7533 */) ;;
7534 *) as_dir=$as_dir/ ;;
7535 esac
7536 for ac_exec_ext in '' $ac_executable_extensions; do
7537 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7538 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7539 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7540 break 2
7541 fi
7542 done
7543 done
7544 IFS=$as_save_IFS
7545
7546 fi
7547 fi
7548 STRIP=$ac_cv_prog_STRIP
7549 if test -n "$STRIP"; then
7550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
7551 printf "%s\n" "$STRIP" >&6; }
7552 else
7553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554 printf "%s\n" "no" >&6; }
7555 fi
7556
7557
7558 fi
7559 if test -z "$ac_cv_prog_STRIP"; then
7560 ac_ct_STRIP=$STRIP
7561 # Extract the first word of "strip", so it can be a program name with args.
7562 set dummy strip; ac_word=$2
7563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7564 printf %s "checking for $ac_word... " >&6; }
7565 if test ${ac_cv_prog_ac_ct_STRIP+y}
7566 then :
7567 printf %s "(cached) " >&6
7568 else $as_nop
7569 if test -n "$ac_ct_STRIP"; then
7570 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
7571 else
7572 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7573 for as_dir in $PATH
7574 do
7575 IFS=$as_save_IFS
7576 case $as_dir in #(((
7577 '') as_dir=./ ;;
7578 */) ;;
7579 *) as_dir=$as_dir/ ;;
7580 esac
7581 for ac_exec_ext in '' $ac_executable_extensions; do
7582 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7583 ac_cv_prog_ac_ct_STRIP="strip"
7584 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7585 break 2
7586 fi
7587 done
7588 done
7589 IFS=$as_save_IFS
7590
7591 fi
7592 fi
7593 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
7594 if test -n "$ac_ct_STRIP"; then
7595 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
7596 printf "%s\n" "$ac_ct_STRIP" >&6; }
7597 else
7598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7599 printf "%s\n" "no" >&6; }
7600 fi
7601
7602 if test "x$ac_ct_STRIP" = x; then
7603 STRIP=":"
7604 else
7605 case $cross_compiling:$ac_tool_warned in
7606 yes:)
7607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
7608 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
7609 ac_tool_warned=yes ;;
7610 esac
7611 STRIP=$ac_ct_STRIP
7612 fi
7613 else
7614 STRIP="$ac_cv_prog_STRIP"
7615 fi
7616
7617 test -z "$STRIP" && STRIP=:
7618
7619
7620
7621
7622
7623
7624
7625 test -z "$RANLIB" && RANLIB=:
7626
7627
7628
7629
7630
7631
7632 # Determine commands to create old-style static archives.
7633 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
7634 old_postinstall_cmds='chmod 644 $oldlib'
7635 old_postuninstall_cmds=
7636
7637 if test -n "$RANLIB"; then
7638 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
7639 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
7640 fi
7641
7642 case $target_os in
7643 darwin*)
7644 lock_old_archive_extraction=yes ;;
7645 *)
7646 lock_old_archive_extraction=no ;;
7647 esac
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669 for ac_prog in gawk mawk nawk awk
7670 do
7671 # Extract the first word of "$ac_prog", so it can be a program name with args.
7672 set dummy $ac_prog; ac_word=$2
7673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674 printf %s "checking for $ac_word... " >&6; }
7675 if test ${ac_cv_prog_AWK+y}
7676 then :
7677 printf %s "(cached) " >&6
7678 else $as_nop
7679 if test -n "$AWK"; then
7680 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7681 else
7682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7683 for as_dir in $PATH
7684 do
7685 IFS=$as_save_IFS
7686 case $as_dir in #(((
7687 '') as_dir=./ ;;
7688 */) ;;
7689 *) as_dir=$as_dir/ ;;
7690 esac
7691 for ac_exec_ext in '' $ac_executable_extensions; do
7692 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
7693 ac_cv_prog_AWK="$ac_prog"
7694 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
7695 break 2
7696 fi
7697 done
7698 done
7699 IFS=$as_save_IFS
7700
7701 fi
7702 fi
7703 AWK=$ac_cv_prog_AWK
7704 if test -n "$AWK"; then
7705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7706 printf "%s\n" "$AWK" >&6; }
7707 else
7708 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
7709 printf "%s\n" "no" >&6; }
7710 fi
7711
7712
7713 test -n "$AWK" && break
7714 done
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734 # If no C compiler was specified, use CC.
7735 LTCC=${LTCC-"$CC"}
7736
7737 # If no C compiler flags were specified, use CFLAGS.
7738 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
7739
7740 # Allow CC to be a program name with arguments.
7741 compiler=$CC
7742
7743
7744 # Check for command to grab the raw symbol name followed by C symbol from nm.
7745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
7746 printf %s "checking command to parse $NM output from $compiler object... " >&6; }
7747 if test ${lt_cv_sys_global_symbol_pipe+y}
7748 then :
7749 printf %s "(cached) " >&6
7750 else $as_nop
7751
7752 # These are sane defaults that work on at least a few old systems.
7753 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
7754
7755 # Character class describing NM global symbol codes.
7756 symcode='[BCDEGRST]'
7757
7758 # Regexp to match symbols that can be accessed directly from C.
7759 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
7760
7761 # Define system-specific variables.
7762 case $target_os in
7763 aix*)
7764 symcode='[BCDT]'
7765 ;;
7766 cygwin* | mingw* | windows* | pw32* | cegcc*)
7767 symcode='[ABCDGISTW]'
7768 ;;
7769 hpux*)
7770 if test ia64 = "$target_cpu"; then
7771 symcode='[ABCDEGRST]'
7772 fi
7773 ;;
7774 irix* | nonstopux*)
7775 symcode='[BCDEGRST]'
7776 ;;
7777 osf*)
7778 symcode='[BCDEGQRST]'
7779 ;;
7780 solaris*)
7781 symcode='[BCDRT]'
7782 ;;
7783 sco3.2v5*)
7784 symcode='[DT]'
7785 ;;
7786 sysv4.2uw2*)
7787 symcode='[DT]'
7788 ;;
7789 sysv5* | sco5v6* | unixware* | OpenUNIX*)
7790 symcode='[ABDT]'
7791 ;;
7792 sysv4)
7793 symcode='[DFNSTU]'
7794 ;;
7795 esac
7796
7797 # If we're using GNU nm, then use its standard symbol codes.
7798 case `$NM -V 2>&1` in
7799 *GNU* | *'with BFD'*)
7800 symcode='[ABCDGIRSTW]' ;;
7801 esac
7802
7803 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7804 # Gets list of data symbols to import.
7805 lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
7806 # Adjust the below global symbol transforms to fixup imported variables.
7807 lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
7808 lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
7809 lt_c_name_lib_hook="\
7810 -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
7811 -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
7812 else
7813 # Disable hooks by default.
7814 lt_cv_sys_global_symbol_to_import=
7815 lt_cdecl_hook=
7816 lt_c_name_hook=
7817 lt_c_name_lib_hook=
7818 fi
7819
7820 # Transform an extracted symbol line into a proper C declaration.
7821 # Some systems (esp. on ia64) link data and code symbols differently,
7822 # so use this general approach.
7823 lt_cv_sys_global_symbol_to_cdecl="$SED -n"\
7824 $lt_cdecl_hook\
7825 " -e 's/^T .* \(.*\)$/extern int \1();/p'"\
7826 " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
7827
7828 # Transform an extracted symbol line into symbol name and symbol address
7829 lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
7830 $lt_c_name_hook\
7831 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
7832 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
7833
7834 # Transform an extracted symbol line into symbol name with lib prefix and
7835 # symbol address.
7836 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
7837 $lt_c_name_lib_hook\
7838 " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
7839 " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
7840 " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
7841
7842 # Handle CRLF in mingw tool chain
7843 opt_cr=
7844 case $build_os in
7845 mingw* | windows*)
7846 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7847 ;;
7848 esac
7849
7850 # Try without a prefix underscore, then with it.
7851 for ac_symprfx in "" "_"; do
7852
7853 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
7854 symxfrm="\\1 $ac_symprfx\\2 \\2"
7855
7856 # Write the raw and C identifiers.
7857 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
7858 # Fake it for dumpbin and say T for any non-static function,
7859 # D for any global variable and I for any imported variable.
7860 # Also find C++ and __fastcall symbols from MSVC++ or ICC,
7861 # which start with @ or ?.
7862 lt_cv_sys_global_symbol_pipe="$AWK '"\
7863 " {last_section=section; section=\$ 3};"\
7864 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
7865 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
7866 " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
7867 " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
7868 " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
7869 " \$ 0!~/External *\|/{next};"\
7870 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
7871 " {if(hide[section]) next};"\
7872 " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
7873 " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
7874 " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
7875 " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
7876 " ' prfx=^$ac_symprfx"
7877 else
7878 lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
7879 fi
7880 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
7881
7882 # Check to see that the pipe works correctly.
7883 pipe_works=no
7884
7885 rm -f conftest*
7886 cat > conftest.$ac_ext <<_LT_EOF
7887 #ifdef __cplusplus
7888 extern "C" {
7889 #endif
7890 char nm_test_var;
7891 void nm_test_func(void);
7892 void nm_test_func(void){}
7893 #ifdef __cplusplus
7894 }
7895 #endif
7896 int main(void){nm_test_var='a';nm_test_func();return(0);}
7897 _LT_EOF
7898
7899 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7900 (eval $ac_compile) 2>&5
7901 ac_status=$?
7902 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7903 test $ac_status = 0; }; then
7904 # Now try to grab the symbols.
7905 nlist=conftest.nm
7906 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
7907 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
7908 # Try sorting and uniquifying the output.
7909 if sort "$nlist" | uniq > "$nlist"T; then
7910 mv -f "$nlist"T "$nlist"
7911 else
7912 rm -f "$nlist"T
7913 fi
7914
7915 # Make sure that we snagged all the symbols we need.
7916 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
7917 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
7918 cat <<_LT_EOF > conftest.$ac_ext
7919 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
7920 #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
7921 /* DATA imports from DLLs on WIN32 can't be const, because runtime
7922 relocations are performed -- see ld's documentation on pseudo-relocs. */
7923 # define LT_DLSYM_CONST
7924 #elif defined __osf__
7925 /* This system does not cope well with relocations in const data. */
7926 # define LT_DLSYM_CONST
7927 #else
7928 # define LT_DLSYM_CONST const
7929 #endif
7930
7931 #ifdef __cplusplus
7932 extern "C" {
7933 #endif
7934
7935 _LT_EOF
7936 # Now generate the symbol file.
7937 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7938
7939 cat <<_LT_EOF >> conftest.$ac_ext
7940
7941 /* The mapping between symbol names and symbols. */
7942 LT_DLSYM_CONST struct {
7943 const char *name;
7944 void *address;
7945 }
7946 lt__PROGRAM__LTX_preloaded_symbols[] =
7947 {
7948 { "@PROGRAM@", (void *) 0 },
7949 _LT_EOF
7950 $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
7951 cat <<\_LT_EOF >> conftest.$ac_ext
7952 {0, (void *) 0}
7953 };
7954
7955 /* This works around a problem in FreeBSD linker */
7956 #ifdef FREEBSD_WORKAROUND
7957 static const void *lt_preloaded_setup() {
7958 return lt__PROGRAM__LTX_preloaded_symbols;
7959 }
7960 #endif
7961
7962 #ifdef __cplusplus
7963 }
7964 #endif
7965 _LT_EOF
7966 # Now try linking the two files.
7967 mv conftest.$ac_objext conftstm.$ac_objext
7968 lt_globsym_save_LIBS=$LIBS
7969 lt_globsym_save_CFLAGS=$CFLAGS
7970 LIBS=conftstm.$ac_objext
7971 CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
7972 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7973 (eval $ac_link) 2>&5
7974 ac_status=$?
7975 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7976 test $ac_status = 0; } && test -s conftest$ac_exeext; then
7977 pipe_works=yes
7978 fi
7979 LIBS=$lt_globsym_save_LIBS
7980 CFLAGS=$lt_globsym_save_CFLAGS
7981 else
7982 echo "cannot find nm_test_func in $nlist" >&5
7983 fi
7984 else
7985 echo "cannot find nm_test_var in $nlist" >&5
7986 fi
7987 else
7988 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
7989 fi
7990 else
7991 echo "$progname: failed program was:" >&5
7992 cat conftest.$ac_ext >&5
7993 fi
7994 rm -rf conftest* conftst*
7995
7996 # Do not use the global_symbol_pipe unless it works.
7997 if test yes = "$pipe_works"; then
7998 break
7999 else
8000 lt_cv_sys_global_symbol_pipe=
8001 fi
8002 done
8003
8004 fi
8005
8006 if test -z "$lt_cv_sys_global_symbol_pipe"; then
8007 lt_cv_sys_global_symbol_to_cdecl=
8008 fi
8009 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
8010 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5
8011 printf "%s\n" "failed" >&6; }
8012 else
8013 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5
8014 printf "%s\n" "ok" >&6; }
8015 fi
8016
8017 # Response file support.
8018 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
8019 nm_file_list_spec='@'
8020 elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then
8021 nm_file_list_spec='@'
8022 fi
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
8061 printf %s "checking for sysroot... " >&6; }
8062
8063 # Check whether --with-sysroot was given.
8064 if test ${with_sysroot+y}
8065 then :
8066 withval=$with_sysroot;
8067 else $as_nop
8068 with_sysroot=no
8069 fi
8070
8071
8072 lt_sysroot=
8073 case $with_sysroot in #(
8074 yes)
8075 if test yes = "$GCC"; then
8076 # Trim trailing / since we'll always append absolute paths and we want
8077 # to avoid //, if only for less confusing output for the user.
8078 lt_sysroot=`$CC --print-sysroot 2>/dev/null | $SED 's:/\+$::'`
8079 fi
8080 ;; #(
8081 /*)
8082 lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
8083 ;; #(
8084 no|'')
8085 ;; #(
8086 *)
8087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
8088 printf "%s\n" "$with_sysroot" >&6; }
8089 as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
8090 ;;
8091 esac
8092
8093 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5
8094 printf "%s\n" "${lt_sysroot:-no}" >&6; }
8095
8096
8097
8098
8099
8100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
8101 printf %s "checking for a working dd... " >&6; }
8102 if test ${ac_cv_path_lt_DD+y}
8103 then :
8104 printf %s "(cached) " >&6
8105 else $as_nop
8106 printf 0123456789abcdef0123456789abcdef >conftest.i
8107 cat conftest.i conftest.i >conftest2.i
8108 : ${lt_DD:=$DD}
8109 if test -z "$lt_DD"; then
8110 ac_path_lt_DD_found=false
8111 # Loop through the user's path and test for each of PROGNAME-LIST
8112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8113 for as_dir in $PATH
8114 do
8115 IFS=$as_save_IFS
8116 case $as_dir in #(((
8117 '') as_dir=./ ;;
8118 */) ;;
8119 *) as_dir=$as_dir/ ;;
8120 esac
8121 for ac_prog in dd
8122 do
8123 for ac_exec_ext in '' $ac_executable_extensions; do
8124 ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext"
8125 as_fn_executable_p "$ac_path_lt_DD" || continue
8126 if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
8127 cmp -s conftest.i conftest.out \
8128 && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
8129 fi
8130 $ac_path_lt_DD_found && break 3
8131 done
8132 done
8133 done
8134 IFS=$as_save_IFS
8135 if test -z "$ac_cv_path_lt_DD"; then
8136 :
8137 fi
8138 else
8139 ac_cv_path_lt_DD=$lt_DD
8140 fi
8141
8142 rm -f conftest.i conftest2.i conftest.out
8143 fi
8144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
8145 printf "%s\n" "$ac_cv_path_lt_DD" >&6; }
8146
8147
8148 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
8149 printf %s "checking how to truncate binary pipes... " >&6; }
8150 if test ${lt_cv_truncate_bin+y}
8151 then :
8152 printf %s "(cached) " >&6
8153 else $as_nop
8154 printf 0123456789abcdef0123456789abcdef >conftest.i
8155 cat conftest.i conftest.i >conftest2.i
8156 lt_cv_truncate_bin=
8157 if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
8158 cmp -s conftest.i conftest.out \
8159 && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
8160 fi
8161 rm -f conftest.i conftest2.i conftest.out
8162 test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
8163 fi
8164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
8165 printf "%s\n" "$lt_cv_truncate_bin" >&6; }
8166
8167
8168
8169
8170
8171
8172
8173 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
8174 func_cc_basename ()
8175 {
8176 for cc_temp in $*""; do
8177 case $cc_temp in
8178 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
8179 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
8180 \-*) ;;
8181 *) break;;
8182 esac
8183 done
8184 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$target_alias-%%"`
8185 }
8186
8187 # Check whether --enable-libtool-lock was given.
8188 if test ${enable_libtool_lock+y}
8189 then :
8190 enableval=$enable_libtool_lock;
8191 fi
8192
8193 test no = "$enable_libtool_lock" || enable_libtool_lock=yes
8194
8195 # Some flags need to be propagated to the compiler or linker for good
8196 # libtool support.
8197 case $target in
8198 ia64-*-hpux*)
8199 # Find out what ABI is being produced by ac_compile, and set mode
8200 # options accordingly.
8201 echo 'int i;' > conftest.$ac_ext
8202 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8203 (eval $ac_compile) 2>&5
8204 ac_status=$?
8205 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8206 test $ac_status = 0; }; then
8207 case `$FILECMD conftest.$ac_objext` in
8208 *ELF-32*)
8209 HPUX_IA64_MODE=32
8210 ;;
8211 *ELF-64*)
8212 HPUX_IA64_MODE=64
8213 ;;
8214 esac
8215 fi
8216 rm -rf conftest*
8217 ;;
8218 *-*-irix6*)
8219 # Find out what ABI is being produced by ac_compile, and set linker
8220 # options accordingly.
8221 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8222 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8223 (eval $ac_compile) 2>&5
8224 ac_status=$?
8225 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8226 test $ac_status = 0; }; then
8227 if test yes = "$lt_cv_prog_gnu_ld"; then
8228 case `$FILECMD conftest.$ac_objext` in
8229 *32-bit*)
8230 LD="${LD-ld} -melf32bsmip"
8231 ;;
8232 *N32*)
8233 LD="${LD-ld} -melf32bmipn32"
8234 ;;
8235 *64-bit*)
8236 LD="${LD-ld} -melf64bmip"
8237 ;;
8238 esac
8239 else
8240 case `$FILECMD conftest.$ac_objext` in
8241 *32-bit*)
8242 LD="${LD-ld} -32"
8243 ;;
8244 *N32*)
8245 LD="${LD-ld} -n32"
8246 ;;
8247 *64-bit*)
8248 LD="${LD-ld} -64"
8249 ;;
8250 esac
8251 fi
8252 fi
8253 rm -rf conftest*
8254 ;;
8255
8256 mips64*-*linux*)
8257 # Find out what ABI is being produced by ac_compile, and set linker
8258 # options accordingly.
8259 echo '#line '$LINENO' "configure"' > conftest.$ac_ext
8260 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8261 (eval $ac_compile) 2>&5
8262 ac_status=$?
8263 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8264 test $ac_status = 0; }; then
8265 emul=elf
8266 case `$FILECMD conftest.$ac_objext` in
8267 *32-bit*)
8268 emul="${emul}32"
8269 ;;
8270 *64-bit*)
8271 emul="${emul}64"
8272 ;;
8273 esac
8274 case `$FILECMD conftest.$ac_objext` in
8275 *MSB*)
8276 emul="${emul}btsmip"
8277 ;;
8278 *LSB*)
8279 emul="${emul}ltsmip"
8280 ;;
8281 esac
8282 case `$FILECMD conftest.$ac_objext` in
8283 *N32*)
8284 emul="${emul}n32"
8285 ;;
8286 esac
8287 LD="${LD-ld} -m $emul"
8288 fi
8289 rm -rf conftest*
8290 ;;
8291
8292 x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
8293 s390*-*linux*|s390*-*tpf*|sparc*-*linux*|x86_64-gnu*)
8294 # Find out what ABI is being produced by ac_compile, and set linker
8295 # options accordingly. Note that the listed cases only cover the
8296 # situations where additional linker options are needed (such as when
8297 # doing 32-bit compilation for a host where ld defaults to 64-bit, or
8298 # vice versa); the common cases where no linker options are needed do
8299 # not appear in the list.
8300 echo 'int i;' > conftest.$ac_ext
8301 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8302 (eval $ac_compile) 2>&5
8303 ac_status=$?
8304 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8305 test $ac_status = 0; }; then
8306 case `$FILECMD conftest.o` in
8307 *32-bit*)
8308 case $target in
8309 x86_64-*kfreebsd*-gnu)
8310 LD="${LD-ld} -m elf_i386_fbsd"
8311 ;;
8312 x86_64-*linux*|x86_64-gnu*)
8313 case `$FILECMD conftest.o` in
8314 *x86-64*)
8315 LD="${LD-ld} -m elf32_x86_64"
8316 ;;
8317 *)
8318 LD="${LD-ld} -m elf_i386"
8319 ;;
8320 esac
8321 ;;
8322 powerpc64le-*linux*)
8323 LD="${LD-ld} -m elf32lppclinux"
8324 ;;
8325 powerpc64-*linux*)
8326 LD="${LD-ld} -m elf32ppclinux"
8327 ;;
8328 s390x-*linux*)
8329 LD="${LD-ld} -m elf_s390"
8330 ;;
8331 sparc64-*linux*)
8332 LD="${LD-ld} -m elf32_sparc"
8333 ;;
8334 esac
8335 ;;
8336 *64-bit*)
8337 case $target in
8338 x86_64-*kfreebsd*-gnu)
8339 LD="${LD-ld} -m elf_x86_64_fbsd"
8340 ;;
8341 x86_64-*linux*|x86_64-gnu*)
8342 LD="${LD-ld} -m elf_x86_64"
8343 ;;
8344 powerpcle-*linux*)
8345 LD="${LD-ld} -m elf64lppc"
8346 ;;
8347 powerpc-*linux*)
8348 LD="${LD-ld} -m elf64ppc"
8349 ;;
8350 s390*-*linux*|s390*-*tpf*)
8351 LD="${LD-ld} -m elf64_s390"
8352 ;;
8353 sparc*-*linux*)
8354 LD="${LD-ld} -m elf64_sparc"
8355 ;;
8356 esac
8357 ;;
8358 esac
8359 fi
8360 rm -rf conftest*
8361 ;;
8362
8363 *-*-sco3.2v5*)
8364 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
8365 SAVE_CFLAGS=$CFLAGS
8366 CFLAGS="$CFLAGS -belf"
8367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
8368 printf %s "checking whether the C compiler needs -belf... " >&6; }
8369 if test ${lt_cv_cc_needs_belf+y}
8370 then :
8371 printf %s "(cached) " >&6
8372 else $as_nop
8373 ac_ext=c
8374 ac_cpp='$CPP $CPPFLAGS'
8375 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8376 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8377 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8378
8379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8380 /* end confdefs.h. */
8381
8382 int
8383 main (void)
8384 {
8385
8386 ;
8387 return 0;
8388 }
8389 _ACEOF
8390 if ac_fn_c_try_link "$LINENO"
8391 then :
8392 lt_cv_cc_needs_belf=yes
8393 else $as_nop
8394 lt_cv_cc_needs_belf=no
8395 fi
8396 rm -f core conftest.err conftest.$ac_objext conftest.beam \
8397 conftest$ac_exeext conftest.$ac_ext
8398 ac_ext=c
8399 ac_cpp='$CPP $CPPFLAGS'
8400 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8401 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8402 ac_compiler_gnu=$ac_cv_c_compiler_gnu
8403
8404 fi
8405 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
8406 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; }
8407 if test yes != "$lt_cv_cc_needs_belf"; then
8408 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
8409 CFLAGS=$SAVE_CFLAGS
8410 fi
8411 ;;
8412 *-*solaris*)
8413 # Find out what ABI is being produced by ac_compile, and set linker
8414 # options accordingly.
8415 echo 'int i;' > conftest.$ac_ext
8416 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8417 (eval $ac_compile) 2>&5
8418 ac_status=$?
8419 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8420 test $ac_status = 0; }; then
8421 case `$FILECMD conftest.o` in
8422 *64-bit*)
8423 case $lt_cv_prog_gnu_ld in
8424 yes*)
8425 case $target in
8426 i?86-*-solaris*|x86_64-*-solaris*)
8427 LD="${LD-ld} -m elf_x86_64"
8428 ;;
8429 sparc*-*-solaris*)
8430 LD="${LD-ld} -m elf64_sparc"
8431 ;;
8432 esac
8433 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
8434 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
8435 LD=${LD-ld}_sol2
8436 fi
8437 ;;
8438 *)
8439 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
8440 LD="${LD-ld} -64"
8441 fi
8442 ;;
8443 esac
8444 ;;
8445 esac
8446 fi
8447 rm -rf conftest*
8448 ;;
8449 esac
8450
8451 need_locks=$enable_libtool_lock
8452
8453 if test -n "$ac_tool_prefix"; then
8454 # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
8455 set dummy ${ac_tool_prefix}mt; ac_word=$2
8456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8457 printf %s "checking for $ac_word... " >&6; }
8458 if test ${ac_cv_prog_MANIFEST_TOOL+y}
8459 then :
8460 printf %s "(cached) " >&6
8461 else $as_nop
8462 if test -n "$MANIFEST_TOOL"; then
8463 ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test.
8464 else
8465 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8466 for as_dir in $PATH
8467 do
8468 IFS=$as_save_IFS
8469 case $as_dir in #(((
8470 '') as_dir=./ ;;
8471 */) ;;
8472 *) as_dir=$as_dir/ ;;
8473 esac
8474 for ac_exec_ext in '' $ac_executable_extensions; do
8475 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8476 ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
8477 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8478 break 2
8479 fi
8480 done
8481 done
8482 IFS=$as_save_IFS
8483
8484 fi
8485 fi
8486 MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL
8487 if test -n "$MANIFEST_TOOL"; then
8488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5
8489 printf "%s\n" "$MANIFEST_TOOL" >&6; }
8490 else
8491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8492 printf "%s\n" "no" >&6; }
8493 fi
8494
8495
8496 fi
8497 if test -z "$ac_cv_prog_MANIFEST_TOOL"; then
8498 ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL
8499 # Extract the first word of "mt", so it can be a program name with args.
8500 set dummy mt; ac_word=$2
8501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8502 printf %s "checking for $ac_word... " >&6; }
8503 if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y}
8504 then :
8505 printf %s "(cached) " >&6
8506 else $as_nop
8507 if test -n "$ac_ct_MANIFEST_TOOL"; then
8508 ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test.
8509 else
8510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8511 for as_dir in $PATH
8512 do
8513 IFS=$as_save_IFS
8514 case $as_dir in #(((
8515 '') as_dir=./ ;;
8516 */) ;;
8517 *) as_dir=$as_dir/ ;;
8518 esac
8519 for ac_exec_ext in '' $ac_executable_extensions; do
8520 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8521 ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
8522 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8523 break 2
8524 fi
8525 done
8526 done
8527 IFS=$as_save_IFS
8528
8529 fi
8530 fi
8531 ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL
8532 if test -n "$ac_ct_MANIFEST_TOOL"; then
8533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5
8534 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; }
8535 else
8536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537 printf "%s\n" "no" >&6; }
8538 fi
8539
8540 if test "x$ac_ct_MANIFEST_TOOL" = x; then
8541 MANIFEST_TOOL=":"
8542 else
8543 case $cross_compiling:$ac_tool_warned in
8544 yes:)
8545 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
8546 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
8547 ac_tool_warned=yes ;;
8548 esac
8549 MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL
8550 fi
8551 else
8552 MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL"
8553 fi
8554
8555 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
8556 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5
8557 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; }
8558 if test ${lt_cv_path_manifest_tool+y}
8559 then :
8560 printf %s "(cached) " >&6
8561 else $as_nop
8562 lt_cv_path_manifest_tool=no
8563 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5
8564 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
8565 cat conftest.err >&5
8566 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
8567 lt_cv_path_manifest_tool=yes
8568 fi
8569 rm -f conftest*
8570 fi
8571 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_manifest_tool" >&5
8572 printf "%s\n" "$lt_cv_path_manifest_tool" >&6; }
8573 if test yes != "$lt_cv_path_manifest_tool"; then
8574 MANIFEST_TOOL=:
8575 fi
8576
8577
8578
8579
8580
8581
8582 case $target_os in
8583 rhapsody* | darwin*)
8584 if test -n "$ac_tool_prefix"; then
8585 # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
8586 set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
8587 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8588 printf %s "checking for $ac_word... " >&6; }
8589 if test ${ac_cv_prog_DSYMUTIL+y}
8590 then :
8591 printf %s "(cached) " >&6
8592 else $as_nop
8593 if test -n "$DSYMUTIL"; then
8594 ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
8595 else
8596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8597 for as_dir in $PATH
8598 do
8599 IFS=$as_save_IFS
8600 case $as_dir in #(((
8601 '') as_dir=./ ;;
8602 */) ;;
8603 *) as_dir=$as_dir/ ;;
8604 esac
8605 for ac_exec_ext in '' $ac_executable_extensions; do
8606 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8607 ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
8608 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8609 break 2
8610 fi
8611 done
8612 done
8613 IFS=$as_save_IFS
8614
8615 fi
8616 fi
8617 DSYMUTIL=$ac_cv_prog_DSYMUTIL
8618 if test -n "$DSYMUTIL"; then
8619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
8620 printf "%s\n" "$DSYMUTIL" >&6; }
8621 else
8622 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8623 printf "%s\n" "no" >&6; }
8624 fi
8625
8626
8627 fi
8628 if test -z "$ac_cv_prog_DSYMUTIL"; then
8629 ac_ct_DSYMUTIL=$DSYMUTIL
8630 # Extract the first word of "dsymutil", so it can be a program name with args.
8631 set dummy dsymutil; ac_word=$2
8632 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8633 printf %s "checking for $ac_word... " >&6; }
8634 if test ${ac_cv_prog_ac_ct_DSYMUTIL+y}
8635 then :
8636 printf %s "(cached) " >&6
8637 else $as_nop
8638 if test -n "$ac_ct_DSYMUTIL"; then
8639 ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
8640 else
8641 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8642 for as_dir in $PATH
8643 do
8644 IFS=$as_save_IFS
8645 case $as_dir in #(((
8646 '') as_dir=./ ;;
8647 */) ;;
8648 *) as_dir=$as_dir/ ;;
8649 esac
8650 for ac_exec_ext in '' $ac_executable_extensions; do
8651 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8652 ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
8653 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8654 break 2
8655 fi
8656 done
8657 done
8658 IFS=$as_save_IFS
8659
8660 fi
8661 fi
8662 ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
8663 if test -n "$ac_ct_DSYMUTIL"; then
8664 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
8665 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; }
8666 else
8667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8668 printf "%s\n" "no" >&6; }
8669 fi
8670
8671 if test "x$ac_ct_DSYMUTIL" = x; then
8672 DSYMUTIL=":"
8673 else
8674 case $cross_compiling:$ac_tool_warned in
8675 yes:)
8676 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
8677 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
8678 ac_tool_warned=yes ;;
8679 esac
8680 DSYMUTIL=$ac_ct_DSYMUTIL
8681 fi
8682 else
8683 DSYMUTIL="$ac_cv_prog_DSYMUTIL"
8684 fi
8685
8686 if test -n "$ac_tool_prefix"; then
8687 # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
8688 set dummy ${ac_tool_prefix}nmedit; ac_word=$2
8689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8690 printf %s "checking for $ac_word... " >&6; }
8691 if test ${ac_cv_prog_NMEDIT+y}
8692 then :
8693 printf %s "(cached) " >&6
8694 else $as_nop
8695 if test -n "$NMEDIT"; then
8696 ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
8697 else
8698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8699 for as_dir in $PATH
8700 do
8701 IFS=$as_save_IFS
8702 case $as_dir in #(((
8703 '') as_dir=./ ;;
8704 */) ;;
8705 *) as_dir=$as_dir/ ;;
8706 esac
8707 for ac_exec_ext in '' $ac_executable_extensions; do
8708 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8709 ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
8710 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8711 break 2
8712 fi
8713 done
8714 done
8715 IFS=$as_save_IFS
8716
8717 fi
8718 fi
8719 NMEDIT=$ac_cv_prog_NMEDIT
8720 if test -n "$NMEDIT"; then
8721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
8722 printf "%s\n" "$NMEDIT" >&6; }
8723 else
8724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8725 printf "%s\n" "no" >&6; }
8726 fi
8727
8728
8729 fi
8730 if test -z "$ac_cv_prog_NMEDIT"; then
8731 ac_ct_NMEDIT=$NMEDIT
8732 # Extract the first word of "nmedit", so it can be a program name with args.
8733 set dummy nmedit; ac_word=$2
8734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8735 printf %s "checking for $ac_word... " >&6; }
8736 if test ${ac_cv_prog_ac_ct_NMEDIT+y}
8737 then :
8738 printf %s "(cached) " >&6
8739 else $as_nop
8740 if test -n "$ac_ct_NMEDIT"; then
8741 ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
8742 else
8743 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744 for as_dir in $PATH
8745 do
8746 IFS=$as_save_IFS
8747 case $as_dir in #(((
8748 '') as_dir=./ ;;
8749 */) ;;
8750 *) as_dir=$as_dir/ ;;
8751 esac
8752 for ac_exec_ext in '' $ac_executable_extensions; do
8753 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8754 ac_cv_prog_ac_ct_NMEDIT="nmedit"
8755 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8756 break 2
8757 fi
8758 done
8759 done
8760 IFS=$as_save_IFS
8761
8762 fi
8763 fi
8764 ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
8765 if test -n "$ac_ct_NMEDIT"; then
8766 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
8767 printf "%s\n" "$ac_ct_NMEDIT" >&6; }
8768 else
8769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8770 printf "%s\n" "no" >&6; }
8771 fi
8772
8773 if test "x$ac_ct_NMEDIT" = x; then
8774 NMEDIT=":"
8775 else
8776 case $cross_compiling:$ac_tool_warned in
8777 yes:)
8778 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
8779 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
8780 ac_tool_warned=yes ;;
8781 esac
8782 NMEDIT=$ac_ct_NMEDIT
8783 fi
8784 else
8785 NMEDIT="$ac_cv_prog_NMEDIT"
8786 fi
8787
8788 if test -n "$ac_tool_prefix"; then
8789 # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
8790 set dummy ${ac_tool_prefix}lipo; ac_word=$2
8791 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8792 printf %s "checking for $ac_word... " >&6; }
8793 if test ${ac_cv_prog_LIPO+y}
8794 then :
8795 printf %s "(cached) " >&6
8796 else $as_nop
8797 if test -n "$LIPO"; then
8798 ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
8799 else
8800 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8801 for as_dir in $PATH
8802 do
8803 IFS=$as_save_IFS
8804 case $as_dir in #(((
8805 '') as_dir=./ ;;
8806 */) ;;
8807 *) as_dir=$as_dir/ ;;
8808 esac
8809 for ac_exec_ext in '' $ac_executable_extensions; do
8810 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8811 ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
8812 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8813 break 2
8814 fi
8815 done
8816 done
8817 IFS=$as_save_IFS
8818
8819 fi
8820 fi
8821 LIPO=$ac_cv_prog_LIPO
8822 if test -n "$LIPO"; then
8823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
8824 printf "%s\n" "$LIPO" >&6; }
8825 else
8826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8827 printf "%s\n" "no" >&6; }
8828 fi
8829
8830
8831 fi
8832 if test -z "$ac_cv_prog_LIPO"; then
8833 ac_ct_LIPO=$LIPO
8834 # Extract the first word of "lipo", so it can be a program name with args.
8835 set dummy lipo; ac_word=$2
8836 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8837 printf %s "checking for $ac_word... " >&6; }
8838 if test ${ac_cv_prog_ac_ct_LIPO+y}
8839 then :
8840 printf %s "(cached) " >&6
8841 else $as_nop
8842 if test -n "$ac_ct_LIPO"; then
8843 ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
8844 else
8845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8846 for as_dir in $PATH
8847 do
8848 IFS=$as_save_IFS
8849 case $as_dir in #(((
8850 '') as_dir=./ ;;
8851 */) ;;
8852 *) as_dir=$as_dir/ ;;
8853 esac
8854 for ac_exec_ext in '' $ac_executable_extensions; do
8855 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8856 ac_cv_prog_ac_ct_LIPO="lipo"
8857 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8858 break 2
8859 fi
8860 done
8861 done
8862 IFS=$as_save_IFS
8863
8864 fi
8865 fi
8866 ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
8867 if test -n "$ac_ct_LIPO"; then
8868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
8869 printf "%s\n" "$ac_ct_LIPO" >&6; }
8870 else
8871 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872 printf "%s\n" "no" >&6; }
8873 fi
8874
8875 if test "x$ac_ct_LIPO" = x; then
8876 LIPO=":"
8877 else
8878 case $cross_compiling:$ac_tool_warned in
8879 yes:)
8880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
8881 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
8882 ac_tool_warned=yes ;;
8883 esac
8884 LIPO=$ac_ct_LIPO
8885 fi
8886 else
8887 LIPO="$ac_cv_prog_LIPO"
8888 fi
8889
8890 if test -n "$ac_tool_prefix"; then
8891 # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
8892 set dummy ${ac_tool_prefix}otool; ac_word=$2
8893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8894 printf %s "checking for $ac_word... " >&6; }
8895 if test ${ac_cv_prog_OTOOL+y}
8896 then :
8897 printf %s "(cached) " >&6
8898 else $as_nop
8899 if test -n "$OTOOL"; then
8900 ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
8901 else
8902 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8903 for as_dir in $PATH
8904 do
8905 IFS=$as_save_IFS
8906 case $as_dir in #(((
8907 '') as_dir=./ ;;
8908 */) ;;
8909 *) as_dir=$as_dir/ ;;
8910 esac
8911 for ac_exec_ext in '' $ac_executable_extensions; do
8912 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8913 ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
8914 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8915 break 2
8916 fi
8917 done
8918 done
8919 IFS=$as_save_IFS
8920
8921 fi
8922 fi
8923 OTOOL=$ac_cv_prog_OTOOL
8924 if test -n "$OTOOL"; then
8925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
8926 printf "%s\n" "$OTOOL" >&6; }
8927 else
8928 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8929 printf "%s\n" "no" >&6; }
8930 fi
8931
8932
8933 fi
8934 if test -z "$ac_cv_prog_OTOOL"; then
8935 ac_ct_OTOOL=$OTOOL
8936 # Extract the first word of "otool", so it can be a program name with args.
8937 set dummy otool; ac_word=$2
8938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8939 printf %s "checking for $ac_word... " >&6; }
8940 if test ${ac_cv_prog_ac_ct_OTOOL+y}
8941 then :
8942 printf %s "(cached) " >&6
8943 else $as_nop
8944 if test -n "$ac_ct_OTOOL"; then
8945 ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
8946 else
8947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8948 for as_dir in $PATH
8949 do
8950 IFS=$as_save_IFS
8951 case $as_dir in #(((
8952 '') as_dir=./ ;;
8953 */) ;;
8954 *) as_dir=$as_dir/ ;;
8955 esac
8956 for ac_exec_ext in '' $ac_executable_extensions; do
8957 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
8958 ac_cv_prog_ac_ct_OTOOL="otool"
8959 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
8960 break 2
8961 fi
8962 done
8963 done
8964 IFS=$as_save_IFS
8965
8966 fi
8967 fi
8968 ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
8969 if test -n "$ac_ct_OTOOL"; then
8970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
8971 printf "%s\n" "$ac_ct_OTOOL" >&6; }
8972 else
8973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
8974 printf "%s\n" "no" >&6; }
8975 fi
8976
8977 if test "x$ac_ct_OTOOL" = x; then
8978 OTOOL=":"
8979 else
8980 case $cross_compiling:$ac_tool_warned in
8981 yes:)
8982 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
8983 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
8984 ac_tool_warned=yes ;;
8985 esac
8986 OTOOL=$ac_ct_OTOOL
8987 fi
8988 else
8989 OTOOL="$ac_cv_prog_OTOOL"
8990 fi
8991
8992 if test -n "$ac_tool_prefix"; then
8993 # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
8994 set dummy ${ac_tool_prefix}otool64; ac_word=$2
8995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8996 printf %s "checking for $ac_word... " >&6; }
8997 if test ${ac_cv_prog_OTOOL64+y}
8998 then :
8999 printf %s "(cached) " >&6
9000 else $as_nop
9001 if test -n "$OTOOL64"; then
9002 ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
9003 else
9004 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9005 for as_dir in $PATH
9006 do
9007 IFS=$as_save_IFS
9008 case $as_dir in #(((
9009 '') as_dir=./ ;;
9010 */) ;;
9011 *) as_dir=$as_dir/ ;;
9012 esac
9013 for ac_exec_ext in '' $ac_executable_extensions; do
9014 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9015 ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
9016 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9017 break 2
9018 fi
9019 done
9020 done
9021 IFS=$as_save_IFS
9022
9023 fi
9024 fi
9025 OTOOL64=$ac_cv_prog_OTOOL64
9026 if test -n "$OTOOL64"; then
9027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
9028 printf "%s\n" "$OTOOL64" >&6; }
9029 else
9030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9031 printf "%s\n" "no" >&6; }
9032 fi
9033
9034
9035 fi
9036 if test -z "$ac_cv_prog_OTOOL64"; then
9037 ac_ct_OTOOL64=$OTOOL64
9038 # Extract the first word of "otool64", so it can be a program name with args.
9039 set dummy otool64; ac_word=$2
9040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9041 printf %s "checking for $ac_word... " >&6; }
9042 if test ${ac_cv_prog_ac_ct_OTOOL64+y}
9043 then :
9044 printf %s "(cached) " >&6
9045 else $as_nop
9046 if test -n "$ac_ct_OTOOL64"; then
9047 ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
9048 else
9049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9050 for as_dir in $PATH
9051 do
9052 IFS=$as_save_IFS
9053 case $as_dir in #(((
9054 '') as_dir=./ ;;
9055 */) ;;
9056 *) as_dir=$as_dir/ ;;
9057 esac
9058 for ac_exec_ext in '' $ac_executable_extensions; do
9059 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
9060 ac_cv_prog_ac_ct_OTOOL64="otool64"
9061 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
9062 break 2
9063 fi
9064 done
9065 done
9066 IFS=$as_save_IFS
9067
9068 fi
9069 fi
9070 ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
9071 if test -n "$ac_ct_OTOOL64"; then
9072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
9073 printf "%s\n" "$ac_ct_OTOOL64" >&6; }
9074 else
9075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9076 printf "%s\n" "no" >&6; }
9077 fi
9078
9079 if test "x$ac_ct_OTOOL64" = x; then
9080 OTOOL64=":"
9081 else
9082 case $cross_compiling:$ac_tool_warned in
9083 yes:)
9084 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with target triplet" >&5
9085 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with target triplet" >&2;}
9086 ac_tool_warned=yes ;;
9087 esac
9088 OTOOL64=$ac_ct_OTOOL64
9089 fi
9090 else
9091 OTOOL64="$ac_cv_prog_OTOOL64"
9092 fi
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
9121 printf %s "checking for -single_module linker flag... " >&6; }
9122 if test ${lt_cv_apple_cc_single_mod+y}
9123 then :
9124 printf %s "(cached) " >&6
9125 else $as_nop
9126 lt_cv_apple_cc_single_mod=no
9127 if test -z "$LT_MULTI_MODULE"; then
9128 # By default we will add the -single_module flag. You can override
9129 # by either setting the environment variable LT_MULTI_MODULE
9130 # non-empty at configure time, or by adding -multi_module to the
9131 # link flags.
9132 rm -rf libconftest.dylib*
9133 echo "int foo(void){return 1;}" > conftest.c
9134 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9135 -dynamiclib -Wl,-single_module conftest.c" >&5
9136 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
9137 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
9138 _lt_result=$?
9139 # If there is a non-empty error log, and "single_module"
9140 # appears in it, assume the flag caused a linker warning
9141 if test -s conftest.err && $GREP single_module conftest.err; then
9142 cat conftest.err >&5
9143 # Otherwise, if the output was created with a 0 exit code from
9144 # the compiler, it worked.
9145 elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
9146 lt_cv_apple_cc_single_mod=yes
9147 else
9148 cat conftest.err >&5
9149 fi
9150 rm -rf libconftest.dylib*
9151 rm -f conftest.*
9152 fi
9153 fi
9154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
9155 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; }
9156
9157 # Feature test to disable chained fixups since it is not
9158 # compatible with '-undefined dynamic_lookup'
9159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -no_fixup_chains linker flag" >&5
9160 printf %s "checking for -no_fixup_chains linker flag... " >&6; }
9161 if test ${lt_cv_support_no_fixup_chains+y}
9162 then :
9163 printf %s "(cached) " >&6
9164 else $as_nop
9165 save_LDFLAGS=$LDFLAGS
9166 LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
9167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9168 /* end confdefs.h. */
9169
9170 int
9171 main (void)
9172 {
9173
9174 ;
9175 return 0;
9176 }
9177 _ACEOF
9178 if ac_fn_c_try_link "$LINENO"
9179 then :
9180 lt_cv_support_no_fixup_chains=yes
9181 else $as_nop
9182 lt_cv_support_no_fixup_chains=no
9183
9184 fi
9185 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9186 conftest$ac_exeext conftest.$ac_ext
9187 LDFLAGS=$save_LDFLAGS
9188
9189
9190 fi
9191 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_support_no_fixup_chains" >&5
9192 printf "%s\n" "$lt_cv_support_no_fixup_chains" >&6; }
9193
9194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
9195 printf %s "checking for -exported_symbols_list linker flag... " >&6; }
9196 if test ${lt_cv_ld_exported_symbols_list+y}
9197 then :
9198 printf %s "(cached) " >&6
9199 else $as_nop
9200 lt_cv_ld_exported_symbols_list=no
9201 save_LDFLAGS=$LDFLAGS
9202 echo "_main" > conftest.sym
9203 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
9204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9205 /* end confdefs.h. */
9206
9207 int
9208 main (void)
9209 {
9210
9211 ;
9212 return 0;
9213 }
9214 _ACEOF
9215 if ac_fn_c_try_link "$LINENO"
9216 then :
9217 lt_cv_ld_exported_symbols_list=yes
9218 else $as_nop
9219 lt_cv_ld_exported_symbols_list=no
9220 fi
9221 rm -f core conftest.err conftest.$ac_objext conftest.beam \
9222 conftest$ac_exeext conftest.$ac_ext
9223 LDFLAGS=$save_LDFLAGS
9224
9225 fi
9226 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
9227 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; }
9228
9229 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5
9230 printf %s "checking for -force_load linker flag... " >&6; }
9231 if test ${lt_cv_ld_force_load+y}
9232 then :
9233 printf %s "(cached) " >&6
9234 else $as_nop
9235 lt_cv_ld_force_load=no
9236 cat > conftest.c << _LT_EOF
9237 int forced_loaded() { return 2;}
9238 _LT_EOF
9239 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
9240 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
9241 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
9242 $AR $AR_FLAGS libconftest.a conftest.o 2>&5
9243 echo "$RANLIB libconftest.a" >&5
9244 $RANLIB libconftest.a 2>&5
9245 cat > conftest.c << _LT_EOF
9246 int main(void) { return 0;}
9247 _LT_EOF
9248 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5
9249 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
9250 _lt_result=$?
9251 if test -s conftest.err && $GREP force_load conftest.err; then
9252 cat conftest.err >&5
9253 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
9254 lt_cv_ld_force_load=yes
9255 else
9256 cat conftest.err >&5
9257 fi
9258 rm -f conftest.err libconftest.a conftest conftest.c
9259 rm -rf conftest.dSYM
9260
9261 fi
9262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5
9263 printf "%s\n" "$lt_cv_ld_force_load" >&6; }
9264 case $target_os in
9265 rhapsody* | darwin1.[012])
9266 _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
9267 darwin1.*)
9268 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
9269 darwin*)
9270 case $MACOSX_DEPLOYMENT_TARGET,$target in
9271 10.[012],*|,*powerpc*-darwin[5-8]*)
9272 _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
9273 *)
9274 _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
9275 if test yes = "$lt_cv_support_no_fixup_chains"; then
9276 as_fn_append _lt_dar_allow_undefined ' $wl-no_fixup_chains'
9277 fi
9278 ;;
9279 esac
9280 ;;
9281 esac
9282 if test yes = "$lt_cv_apple_cc_single_mod"; then
9283 _lt_dar_single_mod='$single_module'
9284 fi
9285 _lt_dar_needs_single_mod=no
9286 case $target_os in
9287 rhapsody* | darwin1.*)
9288 _lt_dar_needs_single_mod=yes ;;
9289 darwin*)
9290 # When targeting Mac OS X 10.4 (darwin 8) or later,
9291 # -single_module is the default and -multi_module is unsupported.
9292 # The toolchain on macOS 10.14 (darwin 18) and later cannot
9293 # target any OS version that needs -single_module.
9294 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$target in
9295 10.0,*-darwin[567].*|10.[0-3],*-darwin[5-9].*|10.[0-3],*-darwin1[0-7].*)
9296 _lt_dar_needs_single_mod=yes ;;
9297 esac
9298 ;;
9299 esac
9300 if test yes = "$lt_cv_ld_exported_symbols_list"; then
9301 _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
9302 else
9303 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
9304 fi
9305 if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
9306 _lt_dsymutil='~$DSYMUTIL $lib || :'
9307 else
9308 _lt_dsymutil=
9309 fi
9310 ;;
9311 esac
9312
9313 # func_munge_path_list VARIABLE PATH
9314 # -----------------------------------
9315 # VARIABLE is name of variable containing _space_ separated list of
9316 # directories to be munged by the contents of PATH, which is string
9317 # having a format:
9318 # "DIR[:DIR]:"
9319 # string "DIR[ DIR]" will be prepended to VARIABLE
9320 # ":DIR[:DIR]"
9321 # string "DIR[ DIR]" will be appended to VARIABLE
9322 # "DIRP[:DIRP]::[DIRA:]DIRA"
9323 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
9324 # "DIRA[ DIRA]" will be appended to VARIABLE
9325 # "DIR[:DIR]"
9326 # VARIABLE will be replaced by "DIR[ DIR]"
9327 func_munge_path_list ()
9328 {
9329 case x$2 in
9330 x)
9331 ;;
9332 *:)
9333 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
9334 ;;
9335 x:*)
9336 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
9337 ;;
9338 *::*)
9339 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
9340 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
9341 ;;
9342 *)
9343 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
9344 ;;
9345 esac
9346 }
9347
9348 ac_header= ac_cache=
9349 for ac_item in $ac_header_c_list
9350 do
9351 if test $ac_cache; then
9352 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
9353 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
9354 printf "%s\n" "#define $ac_item 1" >> confdefs.h
9355 fi
9356 ac_header= ac_cache=
9357 elif test $ac_header; then
9358 ac_cache=$ac_item
9359 else
9360 ac_header=$ac_item
9361 fi
9362 done
9363
9364
9365
9366
9367
9368
9369
9370
9371 if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
9372 then :
9373
9374 printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
9375
9376 fi
9377 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
9378 "
9379 if test "x$ac_cv_header_dlfcn_h" = xyes
9380 then :
9381 printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h
9382
9383 fi
9384
9385
9386
9387
9388
9389 # Set options
9390
9391
9392
9393 enable_dlopen=no
9394
9395
9396 enable_win32_dll=no
9397
9398
9399 # Check whether --enable-shared was given.
9400 if test ${enable_shared+y}
9401 then :
9402 enableval=$enable_shared; p=${PACKAGE-default}
9403 case $enableval in
9404 yes) enable_shared=yes ;;
9405 no) enable_shared=no ;;
9406 *)
9407 enable_shared=no
9408 # Look at the argument we got. We use all the common list separators.
9409 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9410 for pkg in $enableval; do
9411 IFS=$lt_save_ifs
9412 if test "X$pkg" = "X$p"; then
9413 enable_shared=yes
9414 fi
9415 done
9416 IFS=$lt_save_ifs
9417 ;;
9418 esac
9419 else $as_nop
9420 enable_shared=yes
9421 fi
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431 # Check whether --enable-static was given.
9432 if test ${enable_static+y}
9433 then :
9434 enableval=$enable_static; p=${PACKAGE-default}
9435 case $enableval in
9436 yes) enable_static=yes ;;
9437 no) enable_static=no ;;
9438 *)
9439 enable_static=no
9440 # Look at the argument we got. We use all the common list separators.
9441 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9442 for pkg in $enableval; do
9443 IFS=$lt_save_ifs
9444 if test "X$pkg" = "X$p"; then
9445 enable_static=yes
9446 fi
9447 done
9448 IFS=$lt_save_ifs
9449 ;;
9450 esac
9451 else $as_nop
9452 enable_static=yes
9453 fi
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463 # Check whether --enable-pic was given.
9464 if test ${enable_pic+y}
9465 then :
9466 enableval=$enable_pic; lt_p=${PACKAGE-default}
9467 case $enableval in
9468 yes|no) pic_mode=$enableval ;;
9469 *)
9470 pic_mode=default
9471 # Look at the argument we got. We use all the common list separators.
9472 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9473 for lt_pkg in $enableval; do
9474 IFS=$lt_save_ifs
9475 if test "X$lt_pkg" = "X$lt_p"; then
9476 pic_mode=yes
9477 fi
9478 done
9479 IFS=$lt_save_ifs
9480 ;;
9481 esac
9482 else $as_nop
9483 # Check whether --with-pic was given.
9484 if test ${with_pic+y}
9485 then :
9486 withval=$with_pic; lt_p=${PACKAGE-default}
9487 case $withval in
9488 yes|no) pic_mode=$withval ;;
9489 *)
9490 pic_mode=default
9491 # Look at the argument we got. We use all the common list separators.
9492 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9493 for lt_pkg in $withval; do
9494 IFS=$lt_save_ifs
9495 if test "X$lt_pkg" = "X$lt_p"; then
9496 pic_mode=yes
9497 fi
9498 done
9499 IFS=$lt_save_ifs
9500 ;;
9501 esac
9502 else $as_nop
9503 pic_mode=default
9504 fi
9505
9506
9507 fi
9508
9509
9510
9511
9512
9513
9514
9515
9516 # Check whether --enable-fast-install was given.
9517 if test ${enable_fast_install+y}
9518 then :
9519 enableval=$enable_fast_install; p=${PACKAGE-default}
9520 case $enableval in
9521 yes) enable_fast_install=yes ;;
9522 no) enable_fast_install=no ;;
9523 *)
9524 enable_fast_install=no
9525 # Look at the argument we got. We use all the common list separators.
9526 lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
9527 for pkg in $enableval; do
9528 IFS=$lt_save_ifs
9529 if test "X$pkg" = "X$p"; then
9530 enable_fast_install=yes
9531 fi
9532 done
9533 IFS=$lt_save_ifs
9534 ;;
9535 esac
9536 else $as_nop
9537 enable_fast_install=yes
9538 fi
9539
9540
9541
9542
9543
9544
9545
9546
9547 shared_archive_member_spec=
9548 case $target,$enable_shared in
9549 power*-*-aix[5-9]*,yes)
9550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
9551 printf %s "checking which variant of shared library versioning to provide... " >&6; }
9552 # Check whether --enable-aix-soname was given.
9553 if test ${enable_aix_soname+y}
9554 then :
9555 enableval=$enable_aix_soname; case $enableval in
9556 aix|svr4|both)
9557 ;;
9558 *)
9559 as_fn_error $? "Unknown argument to --enable-aix-soname" "$LINENO" 5
9560 ;;
9561 esac
9562 lt_cv_with_aix_soname=$enable_aix_soname
9563 else $as_nop
9564 # Check whether --with-aix-soname was given.
9565 if test ${with_aix_soname+y}
9566 then :
9567 withval=$with_aix_soname; case $withval in
9568 aix|svr4|both)
9569 ;;
9570 *)
9571 as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
9572 ;;
9573 esac
9574 lt_cv_with_aix_soname=$with_aix_soname
9575 else $as_nop
9576 if test ${lt_cv_with_aix_soname+y}
9577 then :
9578 printf %s "(cached) " >&6
9579 else $as_nop
9580 lt_cv_with_aix_soname=aix
9581 fi
9582
9583 fi
9584
9585 enable_aix_soname=$lt_cv_with_aix_soname
9586 fi
9587
9588 with_aix_soname=$enable_aix_soname
9589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
9590 printf "%s\n" "$with_aix_soname" >&6; }
9591 if test aix != "$with_aix_soname"; then
9592 # For the AIX way of multilib, we name the shared archive member
9593 # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
9594 # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
9595 # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
9596 # the AIX toolchain works better with OBJECT_MODE set (default 32).
9597 if test 64 = "${OBJECT_MODE-32}"; then
9598 shared_archive_member_spec=shr_64
9599 else
9600 shared_archive_member_spec=shr
9601 fi
9602 fi
9603 ;;
9604 *)
9605 with_aix_soname=aix
9606 ;;
9607 esac
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618 # This can be used to rebuild libtool when needed
9619 LIBTOOL_DEPS=$ltmain
9620
9621 # Always use our own libtool.
9622 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653 test -z "$LN_S" && LN_S="ln -s"
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668 if test -n "${ZSH_VERSION+set}"; then
9669 setopt NO_GLOB_SUBST
9670 fi
9671
9672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
9673 printf %s "checking for objdir... " >&6; }
9674 if test ${lt_cv_objdir+y}
9675 then :
9676 printf %s "(cached) " >&6
9677 else $as_nop
9678 rm -f .libs 2>/dev/null
9679 mkdir .libs 2>/dev/null
9680 if test -d .libs; then
9681 lt_cv_objdir=.libs
9682 else
9683 # MS-DOS does not allow filenames that begin with a dot.
9684 lt_cv_objdir=_libs
9685 fi
9686 rmdir .libs 2>/dev/null
9687 fi
9688 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
9689 printf "%s\n" "$lt_cv_objdir" >&6; }
9690 objdir=$lt_cv_objdir
9691
9692
9693
9694
9695
9696 printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h
9697
9698
9699
9700
9701 case $target_os in
9702 aix3*)
9703 # AIX sometimes has problems with the GCC collect2 program. For some
9704 # reason, if we set the COLLECT_NAMES environment variable, the problems
9705 # vanish in a puff of smoke.
9706 if test set != "${COLLECT_NAMES+set}"; then
9707 COLLECT_NAMES=
9708 export COLLECT_NAMES
9709 fi
9710 ;;
9711 esac
9712
9713 # Global variables:
9714 ofile=libtool
9715 can_build_shared=yes
9716
9717 # All known linkers require a '.a' archive for static linking (except MSVC and
9718 # ICC, which need '.lib').
9719 libext=a
9720
9721 with_gnu_ld=$lt_cv_prog_gnu_ld
9722
9723 old_CC=$CC
9724 old_CFLAGS=$CFLAGS
9725
9726 # Set sane defaults for various variables
9727 test -z "$CC" && CC=cc
9728 test -z "$LTCC" && LTCC=$CC
9729 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
9730 test -z "$LD" && LD=ld
9731 test -z "$ac_objext" && ac_objext=o
9732
9733 func_cc_basename $compiler
9734 cc_basename=$func_cc_basename_result
9735
9736
9737 # Only perform the check for file, if the check method requires it
9738 test -z "$MAGIC_CMD" && MAGIC_CMD=file
9739 case $deplibs_check_method in
9740 file_magic*)
9741 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
9742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
9743 printf %s "checking for ${ac_tool_prefix}file... " >&6; }
9744 if test ${lt_cv_path_MAGIC_CMD+y}
9745 then :
9746 printf %s "(cached) " >&6
9747 else $as_nop
9748 case $MAGIC_CMD in
9749 [\\/*] | ?:[\\/]*)
9750 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
9751 ;;
9752 *)
9753 lt_save_MAGIC_CMD=$MAGIC_CMD
9754 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
9755 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
9756 for ac_dir in $ac_dummy; do
9757 IFS=$lt_save_ifs
9758 test -z "$ac_dir" && ac_dir=.
9759 if test -f "$ac_dir/${ac_tool_prefix}file"; then
9760 lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
9761 if test -n "$file_magic_test_file"; then
9762 case $deplibs_check_method in
9763 "file_magic "*)
9764 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
9765 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
9766 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9767 $EGREP "$file_magic_regex" > /dev/null; then
9768 :
9769 else
9770 cat <<_LT_EOF 1>&2
9771
9772 *** Warning: the command libtool uses to detect shared libraries,
9773 *** $file_magic_cmd, produces output that libtool cannot recognize.
9774 *** The result is that libtool may fail to recognize shared libraries
9775 *** as such. This will affect the creation of libtool libraries that
9776 *** depend on shared libraries, but programs linked with such libtool
9777 *** libraries will work regardless of this problem. Nevertheless, you
9778 *** may want to report the problem to your system manager and/or to
9779 *** [email protected]
9780
9781 _LT_EOF
9782 fi ;;
9783 esac
9784 fi
9785 break
9786 fi
9787 done
9788 IFS=$lt_save_ifs
9789 MAGIC_CMD=$lt_save_MAGIC_CMD
9790 ;;
9791 esac
9792 fi
9793
9794 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
9795 if test -n "$MAGIC_CMD"; then
9796 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
9797 printf "%s\n" "$MAGIC_CMD" >&6; }
9798 else
9799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9800 printf "%s\n" "no" >&6; }
9801 fi
9802
9803
9804
9805
9806
9807 if test -z "$lt_cv_path_MAGIC_CMD"; then
9808 if test -n "$ac_tool_prefix"; then
9809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5
9810 printf %s "checking for file... " >&6; }
9811 if test ${lt_cv_path_MAGIC_CMD+y}
9812 then :
9813 printf %s "(cached) " >&6
9814 else $as_nop
9815 case $MAGIC_CMD in
9816 [\\/*] | ?:[\\/]*)
9817 lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
9818 ;;
9819 *)
9820 lt_save_MAGIC_CMD=$MAGIC_CMD
9821 lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
9822 ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
9823 for ac_dir in $ac_dummy; do
9824 IFS=$lt_save_ifs
9825 test -z "$ac_dir" && ac_dir=.
9826 if test -f "$ac_dir/file"; then
9827 lt_cv_path_MAGIC_CMD=$ac_dir/"file"
9828 if test -n "$file_magic_test_file"; then
9829 case $deplibs_check_method in
9830 "file_magic "*)
9831 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
9832 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
9833 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
9834 $EGREP "$file_magic_regex" > /dev/null; then
9835 :
9836 else
9837 cat <<_LT_EOF 1>&2
9838
9839 *** Warning: the command libtool uses to detect shared libraries,
9840 *** $file_magic_cmd, produces output that libtool cannot recognize.
9841 *** The result is that libtool may fail to recognize shared libraries
9842 *** as such. This will affect the creation of libtool libraries that
9843 *** depend on shared libraries, but programs linked with such libtool
9844 *** libraries will work regardless of this problem. Nevertheless, you
9845 *** may want to report the problem to your system manager and/or to
9846 *** [email protected]
9847
9848 _LT_EOF
9849 fi ;;
9850 esac
9851 fi
9852 break
9853 fi
9854 done
9855 IFS=$lt_save_ifs
9856 MAGIC_CMD=$lt_save_MAGIC_CMD
9857 ;;
9858 esac
9859 fi
9860
9861 MAGIC_CMD=$lt_cv_path_MAGIC_CMD
9862 if test -n "$MAGIC_CMD"; then
9863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
9864 printf "%s\n" "$MAGIC_CMD" >&6; }
9865 else
9866 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867 printf "%s\n" "no" >&6; }
9868 fi
9869
9870
9871 else
9872 MAGIC_CMD=:
9873 fi
9874 fi
9875
9876 fi
9877 ;;
9878 esac
9879
9880 # Use C for the default configuration in the libtool script
9881
9882 lt_save_CC=$CC
9883 ac_ext=c
9884 ac_cpp='$CPP $CPPFLAGS'
9885 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9886 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9887 ac_compiler_gnu=$ac_cv_c_compiler_gnu
9888
9889
9890 # Source file extension for C test sources.
9891 ac_ext=c
9892
9893 # Object file extension for compiled C test sources.
9894 objext=o
9895 objext=$objext
9896
9897 # Code to be used in simple compile tests
9898 lt_simple_compile_test_code="int some_variable = 0;"
9899
9900 # Code to be used in simple link tests
9901 lt_simple_link_test_code='int main(void){return(0);}'
9902
9903
9904
9905
9906
9907
9908
9909 # If no C compiler was specified, use CC.
9910 LTCC=${LTCC-"$CC"}
9911
9912 # If no C compiler flags were specified, use CFLAGS.
9913 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
9914
9915 # Allow CC to be a program name with arguments.
9916 compiler=$CC
9917
9918 # Save the default compiler, since it gets overwritten when the other
9919 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
9920 compiler_DEFAULT=$CC
9921
9922 # save warnings/boilerplate of simple test code
9923 ac_outfile=conftest.$ac_objext
9924 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
9925 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9926 _lt_compiler_boilerplate=`cat conftest.err`
9927 $RM conftest*
9928
9929 ac_outfile=conftest.$ac_objext
9930 echo "$lt_simple_link_test_code" >conftest.$ac_ext
9931 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
9932 _lt_linker_boilerplate=`cat conftest.err`
9933 $RM -r conftest*
9934
9935
9936 ## CAVEAT EMPTOR:
9937 ## There is no encapsulation within the following macros, do not change
9938 ## the running order or otherwise move them around unless you know exactly
9939 ## what you are doing...
9940 if test -n "$compiler"; then
9941
9942 lt_prog_compiler_no_builtin_flag=
9943
9944 if test yes = "$GCC"; then
9945 case $cc_basename in
9946 nvcc*)
9947 lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
9948 *)
9949 lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;;
9950 esac
9951
9952 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
9953 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
9954 if test ${lt_cv_prog_compiler_rtti_exceptions+y}
9955 then :
9956 printf %s "(cached) " >&6
9957 else $as_nop
9958 lt_cv_prog_compiler_rtti_exceptions=no
9959 ac_outfile=conftest.$ac_objext
9960 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9961 lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
9962 # Insert the option either (1) after the last *FLAGS variable, or
9963 # (2) before a word containing "conftest.", or (3) at the end.
9964 # Note that $ac_compile itself does not contain backslashes and begins
9965 # with a dollar sign (not a hyphen), so the echo should work correctly.
9966 # The option is referenced via a variable to avoid confusing sed.
9967 lt_compile=`echo "$ac_compile" | $SED \
9968 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
9969 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
9970 -e 's:$: $lt_compiler_flag:'`
9971 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
9972 (eval "$lt_compile" 2>conftest.err)
9973 ac_status=$?
9974 cat conftest.err >&5
9975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9976 if (exit $ac_status) && test -s "$ac_outfile"; then
9977 # The compiler can only warn and ignore the option if not recognized
9978 # So say no if there are warnings other than the usual output.
9979 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
9980 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
9981 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
9982 lt_cv_prog_compiler_rtti_exceptions=yes
9983 fi
9984 fi
9985 $RM conftest*
9986
9987 fi
9988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
9989 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
9990
9991 if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
9992 lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
9993 else
9994 :
9995 fi
9996
9997 fi
9998
9999
10000
10001
10002
10003
10004 lt_prog_compiler_wl=
10005 lt_prog_compiler_pic=
10006 lt_prog_compiler_static=
10007
10008
10009 if test yes = "$GCC"; then
10010 lt_prog_compiler_wl='-Wl,'
10011 lt_prog_compiler_static='-static'
10012
10013 case $target_os in
10014 aix*)
10015 # All AIX code is PIC.
10016 if test ia64 = "$target_cpu"; then
10017 # AIX 5 now supports IA64 processor
10018 lt_prog_compiler_static='-Bstatic'
10019 fi
10020 lt_prog_compiler_pic='-fPIC'
10021 ;;
10022
10023 amigaos*)
10024 case $target_cpu in
10025 powerpc)
10026 # see comment about AmigaOS4 .so support
10027 lt_prog_compiler_pic='-fPIC'
10028 ;;
10029 m68k)
10030 # FIXME: we need at least 68020 code to build shared libraries, but
10031 # adding the '-m68020' flag to GCC prevents building anything better,
10032 # like '-m68040'.
10033 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
10034 ;;
10035 esac
10036 ;;
10037
10038 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
10039 # PIC is the default for these OSes.
10040 ;;
10041
10042 mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
10043 # This hack is so that the source file can tell whether it is being
10044 # built for inclusion in a dll (and should export symbols for example).
10045 # Although the cygwin gcc ignores -fPIC, still need this for old-style
10046 # (--disable-auto-import) libraries
10047 lt_prog_compiler_pic='-DDLL_EXPORT'
10048 case $target_os in
10049 os2*)
10050 lt_prog_compiler_static='$wl-static'
10051 ;;
10052 esac
10053 ;;
10054
10055 darwin* | rhapsody*)
10056 # PIC is the default on this platform
10057 # Common symbols not allowed in MH_DYLIB files
10058 lt_prog_compiler_pic='-fno-common'
10059 ;;
10060
10061 haiku*)
10062 # PIC is the default for Haiku.
10063 # The "-static" flag exists, but is broken.
10064 lt_prog_compiler_static=
10065 ;;
10066
10067 hpux*)
10068 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
10069 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
10070 # sets the default TLS model and affects inlining.
10071 case $target_cpu in
10072 hppa*64*)
10073 # +Z the default
10074 ;;
10075 *)
10076 lt_prog_compiler_pic='-fPIC'
10077 ;;
10078 esac
10079 ;;
10080
10081 interix[3-9]*)
10082 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
10083 # Instead, we relocate shared libraries at runtime.
10084 ;;
10085
10086 msdosdjgpp*)
10087 # Just because we use GCC doesn't mean we suddenly get shared libraries
10088 # on systems that don't support them.
10089 lt_prog_compiler_can_build_shared=no
10090 enable_shared=no
10091 ;;
10092
10093 *nto* | *qnx*)
10094 # QNX uses GNU C++, but need to define -shared option too, otherwise
10095 # it will coredump.
10096 lt_prog_compiler_pic='-fPIC -shared'
10097 ;;
10098
10099 sysv4*MP*)
10100 if test -d /usr/nec; then
10101 lt_prog_compiler_pic=-Kconform_pic
10102 fi
10103 ;;
10104
10105 *)
10106 lt_prog_compiler_pic='-fPIC'
10107 ;;
10108 esac
10109
10110 case $cc_basename in
10111 nvcc*) # Cuda Compiler Driver 2.2
10112 lt_prog_compiler_wl='-Xlinker '
10113 if test -n "$lt_prog_compiler_pic"; then
10114 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
10115 fi
10116 ;;
10117 esac
10118 else
10119 # PORTME Check for flag to pass linker flags through the system compiler.
10120 case $target_os in
10121 aix*)
10122 lt_prog_compiler_wl='-Wl,'
10123 if test ia64 = "$target_cpu"; then
10124 # AIX 5 now supports IA64 processor
10125 lt_prog_compiler_static='-Bstatic'
10126 else
10127 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
10128 fi
10129 ;;
10130
10131 darwin* | rhapsody*)
10132 # PIC is the default on this platform
10133 # Common symbols not allowed in MH_DYLIB files
10134 lt_prog_compiler_pic='-fno-common'
10135 case $cc_basename in
10136 nagfor*)
10137 # NAG Fortran compiler
10138 lt_prog_compiler_wl='-Wl,-Wl,,'
10139 lt_prog_compiler_pic='-PIC'
10140 lt_prog_compiler_static='-Bstatic'
10141 ;;
10142 esac
10143 ;;
10144
10145 mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
10146 # This hack is so that the source file can tell whether it is being
10147 # built for inclusion in a dll (and should export symbols for example).
10148 lt_prog_compiler_pic='-DDLL_EXPORT'
10149 case $target_os in
10150 os2*)
10151 lt_prog_compiler_static='$wl-static'
10152 ;;
10153 esac
10154 ;;
10155
10156 hpux9* | hpux10* | hpux11*)
10157 lt_prog_compiler_wl='-Wl,'
10158 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
10159 # not for PA HP-UX.
10160 case $target_cpu in
10161 hppa*64*|ia64*)
10162 # +Z the default
10163 ;;
10164 *)
10165 lt_prog_compiler_pic='+Z'
10166 ;;
10167 esac
10168 # Is there a better lt_prog_compiler_static that works with the bundled CC?
10169 lt_prog_compiler_static='$wl-a ${wl}archive'
10170 ;;
10171
10172 irix5* | irix6* | nonstopux*)
10173 lt_prog_compiler_wl='-Wl,'
10174 # PIC (with -KPIC) is the default.
10175 lt_prog_compiler_static='-non_shared'
10176 ;;
10177
10178 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
10179 case $cc_basename in
10180 # old Intel for x86_64, which still supported -KPIC.
10181 ecc*)
10182 lt_prog_compiler_wl='-Wl,'
10183 lt_prog_compiler_pic='-KPIC'
10184 lt_prog_compiler_static='-static'
10185 ;;
10186 *flang* | ftn | f18* | f95*)
10187 # Flang compiler.
10188 lt_prog_compiler_wl='-Wl,'
10189 lt_prog_compiler_pic='-fPIC'
10190 lt_prog_compiler_static='-static'
10191 ;;
10192 # icc used to be incompatible with GCC.
10193 # ICC 10 doesn't accept -KPIC any more.
10194 icc* | ifort*)
10195 lt_prog_compiler_wl='-Wl,'
10196 lt_prog_compiler_pic='-fPIC'
10197 lt_prog_compiler_static='-static'
10198 ;;
10199 # Lahey Fortran 8.1.
10200 lf95*)
10201 lt_prog_compiler_wl='-Wl,'
10202 lt_prog_compiler_pic='--shared'
10203 lt_prog_compiler_static='--static'
10204 ;;
10205 nagfor*)
10206 # NAG Fortran compiler
10207 lt_prog_compiler_wl='-Wl,-Wl,,'
10208 lt_prog_compiler_pic='-PIC'
10209 lt_prog_compiler_static='-Bstatic'
10210 ;;
10211 tcc*)
10212 # Fabrice Bellard et al's Tiny C Compiler
10213 lt_prog_compiler_wl='-Wl,'
10214 lt_prog_compiler_pic='-fPIC'
10215 lt_prog_compiler_static='-static'
10216 ;;
10217 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
10218 # Portland Group compilers (*not* the Pentium gcc compiler,
10219 # which looks to be a dead project)
10220 lt_prog_compiler_wl='-Wl,'
10221 lt_prog_compiler_pic='-fpic'
10222 lt_prog_compiler_static='-Bstatic'
10223 ;;
10224 ccc*)
10225 lt_prog_compiler_wl='-Wl,'
10226 # All Alpha code is PIC.
10227 lt_prog_compiler_static='-non_shared'
10228 ;;
10229 xl* | bgxl* | bgf* | mpixl*)
10230 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
10231 lt_prog_compiler_wl='-Wl,'
10232 lt_prog_compiler_pic='-qpic'
10233 lt_prog_compiler_static='-qstaticlink'
10234 ;;
10235 *)
10236 case `$CC -V 2>&1 | $SED 5q` in
10237 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
10238 # Sun Fortran 8.3 passes all unrecognized flags to the linker
10239 lt_prog_compiler_pic='-KPIC'
10240 lt_prog_compiler_static='-Bstatic'
10241 lt_prog_compiler_wl=''
10242 ;;
10243 *Sun\ F* | *Sun*Fortran*)
10244 lt_prog_compiler_pic='-KPIC'
10245 lt_prog_compiler_static='-Bstatic'
10246 lt_prog_compiler_wl='-Qoption ld '
10247 ;;
10248 *Sun\ C*)
10249 # Sun C 5.9
10250 lt_prog_compiler_pic='-KPIC'
10251 lt_prog_compiler_static='-Bstatic'
10252 lt_prog_compiler_wl='-Wl,'
10253 ;;
10254 *Intel*\ [CF]*Compiler*)
10255 lt_prog_compiler_wl='-Wl,'
10256 lt_prog_compiler_pic='-fPIC'
10257 lt_prog_compiler_static='-static'
10258 ;;
10259 *Portland\ Group*)
10260 lt_prog_compiler_wl='-Wl,'
10261 lt_prog_compiler_pic='-fpic'
10262 lt_prog_compiler_static='-Bstatic'
10263 ;;
10264 esac
10265 ;;
10266 esac
10267 ;;
10268
10269 newsos6)
10270 lt_prog_compiler_pic='-KPIC'
10271 lt_prog_compiler_static='-Bstatic'
10272 ;;
10273
10274 *-mlibc)
10275 lt_prog_compiler_wl='-Wl,'
10276 lt_prog_compiler_pic='-fPIC'
10277 lt_prog_compiler_static='-static'
10278 ;;
10279
10280 *nto* | *qnx*)
10281 # QNX uses GNU C++, but need to define -shared option too, otherwise
10282 # it will coredump.
10283 lt_prog_compiler_pic='-fPIC -shared'
10284 ;;
10285
10286 osf3* | osf4* | osf5*)
10287 lt_prog_compiler_wl='-Wl,'
10288 # All OSF/1 code is PIC.
10289 lt_prog_compiler_static='-non_shared'
10290 ;;
10291
10292 rdos*)
10293 lt_prog_compiler_static='-non_shared'
10294 ;;
10295
10296 serenity*)
10297 ;;
10298
10299 solaris*)
10300 lt_prog_compiler_pic='-KPIC'
10301 lt_prog_compiler_static='-Bstatic'
10302 case $cc_basename in
10303 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
10304 lt_prog_compiler_wl='-Qoption ld ';;
10305 *)
10306 lt_prog_compiler_wl='-Wl,';;
10307 esac
10308 ;;
10309
10310 sunos4*)
10311 lt_prog_compiler_wl='-Qoption ld '
10312 lt_prog_compiler_pic='-PIC'
10313 lt_prog_compiler_static='-Bstatic'
10314 ;;
10315
10316 sysv4 | sysv4.2uw2* | sysv4.3*)
10317 lt_prog_compiler_wl='-Wl,'
10318 lt_prog_compiler_pic='-KPIC'
10319 lt_prog_compiler_static='-Bstatic'
10320 ;;
10321
10322 sysv4*MP*)
10323 if test -d /usr/nec; then
10324 lt_prog_compiler_pic='-Kconform_pic'
10325 lt_prog_compiler_static='-Bstatic'
10326 fi
10327 ;;
10328
10329 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
10330 lt_prog_compiler_wl='-Wl,'
10331 lt_prog_compiler_pic='-KPIC'
10332 lt_prog_compiler_static='-Bstatic'
10333 ;;
10334
10335 unicos*)
10336 lt_prog_compiler_wl='-Wl,'
10337 lt_prog_compiler_can_build_shared=no
10338 ;;
10339
10340 uts4*)
10341 lt_prog_compiler_pic='-pic'
10342 lt_prog_compiler_static='-Bstatic'
10343 ;;
10344
10345 *)
10346 lt_prog_compiler_can_build_shared=no
10347 ;;
10348 esac
10349 fi
10350
10351 case $target_os in
10352 # For platforms that do not support PIC, -DPIC is meaningless:
10353 *djgpp*)
10354 lt_prog_compiler_pic=
10355 ;;
10356 *)
10357 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
10358 ;;
10359 esac
10360
10361 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
10362 printf %s "checking for $compiler option to produce PIC... " >&6; }
10363 if test ${lt_cv_prog_compiler_pic+y}
10364 then :
10365 printf %s "(cached) " >&6
10366 else $as_nop
10367 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
10368 fi
10369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
10370 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
10371 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
10372
10373 #
10374 # Check to make sure the PIC flag actually works.
10375 #
10376 if test -n "$lt_prog_compiler_pic"; then
10377 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
10378 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
10379 if test ${lt_cv_prog_compiler_pic_works+y}
10380 then :
10381 printf %s "(cached) " >&6
10382 else $as_nop
10383 lt_cv_prog_compiler_pic_works=no
10384 ac_outfile=conftest.$ac_objext
10385 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10386 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
10387 # Insert the option either (1) after the last *FLAGS variable, or
10388 # (2) before a word containing "conftest.", or (3) at the end.
10389 # Note that $ac_compile itself does not contain backslashes and begins
10390 # with a dollar sign (not a hyphen), so the echo should work correctly.
10391 # The option is referenced via a variable to avoid confusing sed.
10392 lt_compile=`echo "$ac_compile" | $SED \
10393 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10394 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10395 -e 's:$: $lt_compiler_flag:'`
10396 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10397 (eval "$lt_compile" 2>conftest.err)
10398 ac_status=$?
10399 cat conftest.err >&5
10400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10401 if (exit $ac_status) && test -s "$ac_outfile"; then
10402 # The compiler can only warn and ignore the option if not recognized
10403 # So say no if there are warnings other than the usual output.
10404 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
10405 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10406 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
10407 lt_cv_prog_compiler_pic_works=yes
10408 fi
10409 fi
10410 $RM conftest*
10411
10412 fi
10413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
10414 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
10415
10416 if test yes = "$lt_cv_prog_compiler_pic_works"; then
10417 case $lt_prog_compiler_pic in
10418 "" | " "*) ;;
10419 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
10420 esac
10421 else
10422 lt_prog_compiler_pic=
10423 lt_prog_compiler_can_build_shared=no
10424 fi
10425
10426 fi
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438 #
10439 # Check to make sure the static flag actually works.
10440 #
10441 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
10442 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
10443 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
10444 if test ${lt_cv_prog_compiler_static_works+y}
10445 then :
10446 printf %s "(cached) " >&6
10447 else $as_nop
10448 lt_cv_prog_compiler_static_works=no
10449 save_LDFLAGS=$LDFLAGS
10450 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
10451 echo "$lt_simple_link_test_code" > conftest.$ac_ext
10452 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
10453 # The linker can only warn and ignore the option if not recognized
10454 # So say no if there are warnings
10455 if test -s conftest.err; then
10456 # Append any errors to the config.log.
10457 cat conftest.err 1>&5
10458 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
10459 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
10460 if diff conftest.exp conftest.er2 >/dev/null; then
10461 lt_cv_prog_compiler_static_works=yes
10462 fi
10463 else
10464 lt_cv_prog_compiler_static_works=yes
10465 fi
10466 fi
10467 $RM -r conftest*
10468 LDFLAGS=$save_LDFLAGS
10469
10470 fi
10471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
10472 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
10473
10474 if test yes = "$lt_cv_prog_compiler_static_works"; then
10475 :
10476 else
10477 lt_prog_compiler_static=
10478 fi
10479
10480
10481
10482
10483
10484
10485
10486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10487 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10488 if test ${lt_cv_prog_compiler_c_o+y}
10489 then :
10490 printf %s "(cached) " >&6
10491 else $as_nop
10492 lt_cv_prog_compiler_c_o=no
10493 $RM -r conftest 2>/dev/null
10494 mkdir conftest
10495 cd conftest
10496 mkdir out
10497 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10498
10499 lt_compiler_flag="-o out/conftest2.$ac_objext"
10500 # Insert the option either (1) after the last *FLAGS variable, or
10501 # (2) before a word containing "conftest.", or (3) at the end.
10502 # Note that $ac_compile itself does not contain backslashes and begins
10503 # with a dollar sign (not a hyphen), so the echo should work correctly.
10504 lt_compile=`echo "$ac_compile" | $SED \
10505 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10506 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10507 -e 's:$: $lt_compiler_flag:'`
10508 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10509 (eval "$lt_compile" 2>out/conftest.err)
10510 ac_status=$?
10511 cat out/conftest.err >&5
10512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10513 if (exit $ac_status) && test -s out/conftest2.$ac_objext
10514 then
10515 # The compiler can only warn and ignore the option if not recognized
10516 # So say no if there are warnings
10517 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10518 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10519 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10520 lt_cv_prog_compiler_c_o=yes
10521 fi
10522 fi
10523 chmod u+w . 2>&5
10524 $RM conftest*
10525 # SGI C++ compiler will create directory out/ii_files/ for
10526 # template instantiation
10527 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10528 $RM out/* && rmdir out
10529 cd ..
10530 $RM -r conftest
10531 $RM conftest*
10532
10533 fi
10534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10535 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
10536
10537
10538
10539
10540
10541
10542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
10543 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
10544 if test ${lt_cv_prog_compiler_c_o+y}
10545 then :
10546 printf %s "(cached) " >&6
10547 else $as_nop
10548 lt_cv_prog_compiler_c_o=no
10549 $RM -r conftest 2>/dev/null
10550 mkdir conftest
10551 cd conftest
10552 mkdir out
10553 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
10554
10555 lt_compiler_flag="-o out/conftest2.$ac_objext"
10556 # Insert the option either (1) after the last *FLAGS variable, or
10557 # (2) before a word containing "conftest.", or (3) at the end.
10558 # Note that $ac_compile itself does not contain backslashes and begins
10559 # with a dollar sign (not a hyphen), so the echo should work correctly.
10560 lt_compile=`echo "$ac_compile" | $SED \
10561 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
10562 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
10563 -e 's:$: $lt_compiler_flag:'`
10564 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
10565 (eval "$lt_compile" 2>out/conftest.err)
10566 ac_status=$?
10567 cat out/conftest.err >&5
10568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10569 if (exit $ac_status) && test -s out/conftest2.$ac_objext
10570 then
10571 # The compiler can only warn and ignore the option if not recognized
10572 # So say no if there are warnings
10573 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
10574 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
10575 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
10576 lt_cv_prog_compiler_c_o=yes
10577 fi
10578 fi
10579 chmod u+w . 2>&5
10580 $RM conftest*
10581 # SGI C++ compiler will create directory out/ii_files/ for
10582 # template instantiation
10583 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
10584 $RM out/* && rmdir out
10585 cd ..
10586 $RM -r conftest
10587 $RM conftest*
10588
10589 fi
10590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
10591 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; }
10592
10593
10594
10595
10596 hard_links=nottested
10597 if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
10598 # do not overwrite the value of need_locks provided by the user
10599 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
10600 printf %s "checking if we can lock with hard links... " >&6; }
10601 hard_links=yes
10602 $RM conftest*
10603 ln conftest.a conftest.b 2>/dev/null && hard_links=no
10604 touch conftest.a
10605 ln conftest.a conftest.b 2>&5 || hard_links=no
10606 ln conftest.a conftest.b 2>/dev/null && hard_links=no
10607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
10608 printf "%s\n" "$hard_links" >&6; }
10609 if test no = "$hard_links"; then
10610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
10611 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
10612 need_locks=warn
10613 fi
10614 else
10615 need_locks=no
10616 fi
10617
10618
10619
10620
10621
10622
10623 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
10624 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
10625
10626 runpath_var=
10627 allow_undefined_flag=
10628 always_export_symbols=no
10629 archive_cmds=
10630 archive_expsym_cmds=
10631 compiler_needs_object=no
10632 enable_shared_with_static_runtimes=no
10633 export_dynamic_flag_spec=
10634 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
10635 hardcode_automatic=no
10636 hardcode_direct=no
10637 hardcode_direct_absolute=no
10638 hardcode_libdir_flag_spec=
10639 hardcode_libdir_separator=
10640 hardcode_minus_L=no
10641 hardcode_shlibpath_var=unsupported
10642 inherit_rpath=no
10643 link_all_deplibs=unknown
10644 module_cmds=
10645 module_expsym_cmds=
10646 old_archive_from_new_cmds=
10647 old_archive_from_expsyms_cmds=
10648 thread_safe_flag_spec=
10649 whole_archive_flag_spec=
10650 # include_expsyms should be a list of space-separated symbols to be *always*
10651 # included in the symbol list
10652 include_expsyms=
10653 # exclude_expsyms can be an extended regexp of symbols to exclude
10654 # it will be wrapped by ' (' and ')$', so one must not match beginning or
10655 # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
10656 # as well as any symbol that contains 'd'.
10657 exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
10658 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
10659 # platforms (ab)use it in PIC code, but their linkers get confused if
10660 # the symbol is explicitly referenced. Since portable code cannot
10661 # rely on this symbol name, it's probably fine to never include it in
10662 # preloaded symbol tables.
10663 # Exclude shared library initialization/finalization symbols.
10664 extract_expsyms_cmds=
10665
10666 case $target_os in
10667 cygwin* | mingw* | windows* | pw32* | cegcc*)
10668 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
10669 # When not using gcc, we currently assume that we are using
10670 # Microsoft Visual C++ or Intel C++ Compiler.
10671 if test yes != "$GCC"; then
10672 with_gnu_ld=no
10673 fi
10674 ;;
10675 interix*)
10676 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
10677 with_gnu_ld=yes
10678 ;;
10679 esac
10680
10681 ld_shlibs=yes
10682
10683 # On some targets, GNU ld is compatible enough with the native linker
10684 # that we're better off using the native interface for both.
10685 lt_use_gnu_ld_interface=no
10686 if test yes = "$with_gnu_ld"; then
10687 case $target_os in
10688 aix*)
10689 # The AIX port of GNU ld has always aspired to compatibility
10690 # with the native linker. However, as the warning in the GNU ld
10691 # block says, versions before 2.19.5* couldn't really create working
10692 # shared libraries, regardless of the interface used.
10693 case `$LD -v 2>&1` in
10694 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
10695 *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;;
10696 *\ \(GNU\ Binutils\)\ [3-9]*) ;;
10697 *)
10698 lt_use_gnu_ld_interface=yes
10699 ;;
10700 esac
10701 ;;
10702 *)
10703 lt_use_gnu_ld_interface=yes
10704 ;;
10705 esac
10706 fi
10707
10708 if test yes = "$lt_use_gnu_ld_interface"; then
10709 # If archive_cmds runs LD, not CC, wlarc should be empty
10710 wlarc='$wl'
10711
10712 # Set some defaults for GNU ld with shared library support. These
10713 # are reset later if shared libraries are not supported. Putting them
10714 # here allows them to be overridden if necessary.
10715 runpath_var=LD_RUN_PATH
10716 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10717 export_dynamic_flag_spec='$wl--export-dynamic'
10718 # ancient GNU ld didn't support --whole-archive et. al.
10719 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
10720 whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
10721 else
10722 whole_archive_flag_spec=
10723 fi
10724 supports_anon_versioning=no
10725 case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in
10726 *GNU\ gold*) supports_anon_versioning=yes ;;
10727 *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
10728 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
10729 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
10730 *\ 2.11.*) ;; # other 2.11 versions
10731 *) supports_anon_versioning=yes ;;
10732 esac
10733
10734 # See if GNU ld supports shared libraries.
10735 case $target_os in
10736 aix[3-9]*)
10737 # On AIX/PPC, the GNU linker is very broken
10738 if test ia64 != "$target_cpu"; then
10739 ld_shlibs=no
10740 cat <<_LT_EOF 1>&2
10741
10742 *** Warning: the GNU linker, at least up to release 2.19, is reported
10743 *** to be unable to reliably create shared libraries on AIX.
10744 *** Therefore, libtool is disabling shared libraries support. If you
10745 *** really care for shared libraries, you may want to install binutils
10746 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
10747 *** You will then need to restart the configuration process.
10748
10749 _LT_EOF
10750 fi
10751 ;;
10752
10753 amigaos*)
10754 case $target_cpu in
10755 powerpc)
10756 # see comment about AmigaOS4 .so support
10757 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10758 archive_expsym_cmds=''
10759 ;;
10760 m68k)
10761 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
10762 hardcode_libdir_flag_spec='-L$libdir'
10763 hardcode_minus_L=yes
10764 ;;
10765 esac
10766 ;;
10767
10768 beos*)
10769 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10770 allow_undefined_flag=unsupported
10771 # Joseph Beckenbach <[email protected]> says some releases of gcc
10772 # support --undefined. This deserves some investigation. FIXME
10773 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10774 else
10775 ld_shlibs=no
10776 fi
10777 ;;
10778
10779 cygwin* | mingw* | windows* | pw32* | cegcc*)
10780 # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
10781 # as there is no search path for DLLs.
10782 hardcode_libdir_flag_spec='-L$libdir'
10783 export_dynamic_flag_spec='$wl--export-all-symbols'
10784 allow_undefined_flag=unsupported
10785 always_export_symbols=no
10786 enable_shared_with_static_runtimes=yes
10787 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
10788 exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
10789 file_list_spec='@'
10790
10791 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
10792 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10793 # If the export-symbols file already is a .def file, use it as
10794 # is; otherwise, prepend EXPORTS...
10795 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
10796 cp $export_symbols $output_objdir/$soname.def;
10797 else
10798 echo EXPORTS > $output_objdir/$soname.def;
10799 cat $export_symbols >> $output_objdir/$soname.def;
10800 fi~
10801 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
10802 else
10803 ld_shlibs=no
10804 fi
10805 ;;
10806
10807 haiku*)
10808 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10809 link_all_deplibs=no
10810 ;;
10811
10812 os2*)
10813 hardcode_libdir_flag_spec='-L$libdir'
10814 hardcode_minus_L=yes
10815 allow_undefined_flag=unsupported
10816 shrext_cmds=.dll
10817 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10818 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10819 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10820 $ECHO EXPORTS >> $output_objdir/$libname.def~
10821 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
10822 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10823 emximp -o $lib $output_objdir/$libname.def'
10824 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
10825 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
10826 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
10827 $ECHO EXPORTS >> $output_objdir/$libname.def~
10828 prefix_cmds="$SED"~
10829 if test EXPORTS = "`$SED 1q $export_symbols`"; then
10830 prefix_cmds="$prefix_cmds -e 1d";
10831 fi~
10832 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
10833 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
10834 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
10835 emximp -o $lib $output_objdir/$libname.def'
10836 old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
10837 enable_shared_with_static_runtimes=yes
10838 file_list_spec='@'
10839 ;;
10840
10841 interix[3-9]*)
10842 hardcode_direct=no
10843 hardcode_shlibpath_var=no
10844 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
10845 export_dynamic_flag_spec='$wl-E'
10846 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
10847 # Instead, shared libraries are loaded at an image base (0x10000000 by
10848 # default) and relocated if they conflict, which is a slow very memory
10849 # consuming and fragmenting process. To avoid this, we pick a random,
10850 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
10851 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
10852 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
10853 archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
10854 ;;
10855
10856 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
10857 tmp_diet=no
10858 if test linux-dietlibc = "$target_os"; then
10859 case $cc_basename in
10860 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
10861 esac
10862 fi
10863 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
10864 && test no = "$tmp_diet"
10865 then
10866 tmp_addflag=' $pic_flag'
10867 tmp_sharedflag='-shared'
10868 case $cc_basename,$target_cpu in
10869 pgcc*) # Portland Group C compiler
10870 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
10871 tmp_addflag=' $pic_flag'
10872 ;;
10873 pgf77* | pgf90* | pgf95* | pgfortran*)
10874 # Portland Group f77 and f90 compilers
10875 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
10876 tmp_addflag=' $pic_flag -Mnomain' ;;
10877 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
10878 tmp_addflag=' -i_dynamic' ;;
10879 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
10880 tmp_addflag=' -i_dynamic -nofor_main' ;;
10881 ifc* | ifort*) # Intel Fortran compiler
10882 tmp_addflag=' -nofor_main' ;;
10883 lf95*) # Lahey Fortran 8.1
10884 whole_archive_flag_spec=
10885 tmp_sharedflag='--shared' ;;
10886 nagfor*) # NAGFOR 5.3
10887 tmp_sharedflag='-Wl,-shared' ;;
10888 xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
10889 tmp_sharedflag='-qmkshrobj'
10890 tmp_addflag= ;;
10891 nvcc*) # Cuda Compiler Driver 2.2
10892 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
10893 compiler_needs_object=yes
10894 ;;
10895 esac
10896 case `$CC -V 2>&1 | $SED 5q` in
10897 *Sun\ C*) # Sun C 5.9
10898 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
10899 compiler_needs_object=yes
10900 tmp_sharedflag='-G' ;;
10901 *Sun\ F*) # Sun Fortran 8.3
10902 tmp_sharedflag='-G' ;;
10903 esac
10904 archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10905
10906 if test yes = "$supports_anon_versioning"; then
10907 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10908 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10909 echo "local: *; };" >> $output_objdir/$libname.ver~
10910 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
10911 fi
10912
10913 case $cc_basename in
10914 tcc*)
10915 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10916 export_dynamic_flag_spec='-rdynamic'
10917 ;;
10918 xlf* | bgf* | bgxlf* | mpixlf*)
10919 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
10920 whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
10921 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10922 archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
10923 if test yes = "$supports_anon_versioning"; then
10924 archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
10925 cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
10926 echo "local: *; };" >> $output_objdir/$libname.ver~
10927 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
10928 fi
10929 ;;
10930 esac
10931 else
10932 ld_shlibs=no
10933 fi
10934 ;;
10935
10936 *-mlibc)
10937 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10938 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10939 ;;
10940
10941 netbsd* | netbsdelf*-gnu)
10942 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
10943 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
10944 wlarc=
10945 else
10946 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10947 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10948 fi
10949 ;;
10950
10951 solaris*)
10952 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
10953 ld_shlibs=no
10954 cat <<_LT_EOF 1>&2
10955
10956 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
10957 *** create shared libraries on Solaris systems. Therefore, libtool
10958 *** is disabling shared libraries support. We urge you to upgrade GNU
10959 *** binutils to release 2.9.1 or newer. Another option is to modify
10960 *** your PATH or compiler configuration so that the native linker is
10961 *** used, and then restart.
10962
10963 _LT_EOF
10964 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10965 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10966 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10967 else
10968 ld_shlibs=no
10969 fi
10970 ;;
10971
10972 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
10973 case `$LD -v 2>&1` in
10974 *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
10975 ld_shlibs=no
10976 cat <<_LT_EOF 1>&2
10977
10978 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
10979 *** reliably create shared libraries on SCO systems. Therefore, libtool
10980 *** is disabling shared libraries support. We urge you to upgrade GNU
10981 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
10982 *** your PATH or compiler configuration so that the native linker is
10983 *** used, and then restart.
10984
10985 _LT_EOF
10986 ;;
10987 *)
10988 # For security reasons, it is highly recommended that you always
10989 # use absolute paths for naming shared libraries, and exclude the
10990 # DT_RUNPATH tag from executables and libraries. But doing so
10991 # requires that you compile everything twice, which is a pain.
10992 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
10993 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
10994 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
10995 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
10996 else
10997 ld_shlibs=no
10998 fi
10999 ;;
11000 esac
11001 ;;
11002
11003 sunos4*)
11004 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11005 wlarc=
11006 hardcode_direct=yes
11007 hardcode_shlibpath_var=no
11008 ;;
11009
11010 *)
11011 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
11012 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11013 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
11014 else
11015 ld_shlibs=no
11016 fi
11017 ;;
11018 esac
11019
11020 if test no = "$ld_shlibs"; then
11021 runpath_var=
11022 hardcode_libdir_flag_spec=
11023 export_dynamic_flag_spec=
11024 whole_archive_flag_spec=
11025 fi
11026 else
11027 # PORTME fill in a description of your system's linker (not GNU ld)
11028 case $target_os in
11029 aix3*)
11030 allow_undefined_flag=unsupported
11031 always_export_symbols=yes
11032 archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
11033 # Note: this linker hardcodes the directories in LIBPATH if there
11034 # are no directories specified by -L.
11035 hardcode_minus_L=yes
11036 if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
11037 # Neither direct hardcoding nor static linking is supported with a
11038 # broken collect2.
11039 hardcode_direct=unsupported
11040 fi
11041 ;;
11042
11043 aix[4-9]*)
11044 if test ia64 = "$target_cpu"; then
11045 # On IA64, the linker does run time linking by default, so we don't
11046 # have to do anything special.
11047 aix_use_runtimelinking=no
11048 exp_sym_flag='-Bexport'
11049 no_entry_flag=
11050 else
11051 # If we're using GNU nm, then we don't want the "-C" option.
11052 # -C means demangle to GNU nm, but means don't demangle to AIX nm.
11053 # Without the "-l" option, or with the "-B" option, AIX nm treats
11054 # weak defined symbols like other global defined symbols, whereas
11055 # GNU nm marks them as "W".
11056 # While the 'weak' keyword is ignored in the Export File, we need
11057 # it in the Import File for the 'aix-soname' feature, so we have
11058 # to replace the "-B" option with "-P" for AIX nm.
11059 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
11060 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
11061 else
11062 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
11063 fi
11064 aix_use_runtimelinking=no
11065
11066 # Test if we are trying to use run time linking or normal
11067 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
11068 # have runtime linking enabled, and use it for executables.
11069 # For shared libraries, we enable/disable runtime linking
11070 # depending on the kind of the shared library created -
11071 # when "with_aix_soname,aix_use_runtimelinking" is:
11072 # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
11073 # "aix,yes" lib.so shared, rtl:yes, for executables
11074 # lib.a static archive
11075 # "both,no" lib.so.V(shr.o) shared, rtl:yes
11076 # lib.a(lib.so.V) shared, rtl:no, for executables
11077 # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
11078 # lib.a(lib.so.V) shared, rtl:no
11079 # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
11080 # lib.a static archive
11081 case $target_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
11082 for ld_flag in $LDFLAGS; do
11083 if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
11084 aix_use_runtimelinking=yes
11085 break
11086 fi
11087 done
11088 if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
11089 # With aix-soname=svr4, we create the lib.so.V shared archives only,
11090 # so we don't have lib.a shared libs to link our executables.
11091 # We have to force runtime linking in this case.
11092 aix_use_runtimelinking=yes
11093 LDFLAGS="$LDFLAGS -Wl,-brtl"
11094 fi
11095 ;;
11096 esac
11097
11098 exp_sym_flag='-bexport'
11099 no_entry_flag='-bnoentry'
11100 fi
11101
11102 # When large executables or shared objects are built, AIX ld can
11103 # have problems creating the table of contents. If linking a library
11104 # or program results in "error TOC overflow" add -mminimal-toc to
11105 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
11106 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
11107
11108 archive_cmds=''
11109 hardcode_direct=yes
11110 hardcode_direct_absolute=yes
11111 hardcode_libdir_separator=':'
11112 link_all_deplibs=yes
11113 file_list_spec='$wl-f,'
11114 case $with_aix_soname,$aix_use_runtimelinking in
11115 aix,*) ;; # traditional, no import file
11116 svr4,* | *,yes) # use import file
11117 # The Import File defines what to hardcode.
11118 hardcode_direct=no
11119 hardcode_direct_absolute=no
11120 ;;
11121 esac
11122
11123 if test yes = "$GCC"; then
11124 case $target_os in aix4.[012]|aix4.[012].*)
11125 # We only want to do this on AIX 4.2 and lower, the check
11126 # below for broken collect2 doesn't work under 4.3+
11127 collect2name=`$CC -print-prog-name=collect2`
11128 if test -f "$collect2name" &&
11129 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
11130 then
11131 # We have reworked collect2
11132 :
11133 else
11134 # We have old collect2
11135 hardcode_direct=unsupported
11136 # It fails to find uninstalled libraries when the uninstalled
11137 # path is not listed in the libpath. Setting hardcode_minus_L
11138 # to unsupported forces relinking
11139 hardcode_minus_L=yes
11140 hardcode_libdir_flag_spec='-L$libdir'
11141 hardcode_libdir_separator=
11142 fi
11143 ;;
11144 esac
11145 shared_flag='-shared'
11146 if test yes = "$aix_use_runtimelinking"; then
11147 shared_flag="$shared_flag "'$wl-G'
11148 fi
11149 # Need to ensure runtime linking is disabled for the traditional
11150 # shared library, or the linker may eventually find shared libraries
11151 # /with/ Import File - we do not want to mix them.
11152 shared_flag_aix='-shared'
11153 shared_flag_svr4='-shared $wl-G'
11154 else
11155 # not using gcc
11156 if test ia64 = "$target_cpu"; then
11157 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
11158 # chokes on -Wl,-G. The following line is correct:
11159 shared_flag='-G'
11160 else
11161 if test yes = "$aix_use_runtimelinking"; then
11162 shared_flag='$wl-G'
11163 else
11164 shared_flag='$wl-bM:SRE'
11165 fi
11166 shared_flag_aix='$wl-bM:SRE'
11167 shared_flag_svr4='$wl-G'
11168 fi
11169 fi
11170
11171 export_dynamic_flag_spec='$wl-bexpall'
11172 # It seems that -bexpall does not export symbols beginning with
11173 # underscore (_), so it is better to generate a list of symbols to export.
11174 always_export_symbols=yes
11175 if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
11176 # Warning - without using the other runtime loading flags (-brtl),
11177 # -berok will link without error, but may produce a broken library.
11178 allow_undefined_flag='-berok'
11179 # Determine the default libpath from the value encoded in an
11180 # empty executable.
11181 if test set = "${lt_cv_aix_libpath+set}"; then
11182 aix_libpath=$lt_cv_aix_libpath
11183 else
11184 if test ${lt_cv_aix_libpath_+y}
11185 then :
11186 printf %s "(cached) " >&6
11187 else $as_nop
11188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11189 /* end confdefs.h. */
11190
11191 int
11192 main (void)
11193 {
11194
11195 ;
11196 return 0;
11197 }
11198 _ACEOF
11199 if ac_fn_c_try_link "$LINENO"
11200 then :
11201
11202 lt_aix_libpath_sed='
11203 /Import File Strings/,/^$/ {
11204 /^0/ {
11205 s/^0 *\([^ ]*\) *$/\1/
11206 p
11207 }
11208 }'
11209 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11210 # Check for a 64-bit object if we didn't find anything.
11211 if test -z "$lt_cv_aix_libpath_"; then
11212 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11213 fi
11214 fi
11215 rm -f core conftest.err conftest.$ac_objext conftest.beam \
11216 conftest$ac_exeext conftest.$ac_ext
11217 if test -z "$lt_cv_aix_libpath_"; then
11218 lt_cv_aix_libpath_=/usr/lib:/lib
11219 fi
11220
11221 fi
11222
11223 aix_libpath=$lt_cv_aix_libpath_
11224 fi
11225
11226 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11227 archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
11228 else
11229 if test ia64 = "$target_cpu"; then
11230 hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
11231 allow_undefined_flag="-z nodefs"
11232 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
11233 else
11234 # Determine the default libpath from the value encoded in an
11235 # empty executable.
11236 if test set = "${lt_cv_aix_libpath+set}"; then
11237 aix_libpath=$lt_cv_aix_libpath
11238 else
11239 if test ${lt_cv_aix_libpath_+y}
11240 then :
11241 printf %s "(cached) " >&6
11242 else $as_nop
11243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11244 /* end confdefs.h. */
11245
11246 int
11247 main (void)
11248 {
11249
11250 ;
11251 return 0;
11252 }
11253 _ACEOF
11254 if ac_fn_c_try_link "$LINENO"
11255 then :
11256
11257 lt_aix_libpath_sed='
11258 /Import File Strings/,/^$/ {
11259 /^0/ {
11260 s/^0 *\([^ ]*\) *$/\1/
11261 p
11262 }
11263 }'
11264 lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11265 # Check for a 64-bit object if we didn't find anything.
11266 if test -z "$lt_cv_aix_libpath_"; then
11267 lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
11268 fi
11269 fi
11270 rm -f core conftest.err conftest.$ac_objext conftest.beam \
11271 conftest$ac_exeext conftest.$ac_ext
11272 if test -z "$lt_cv_aix_libpath_"; then
11273 lt_cv_aix_libpath_=/usr/lib:/lib
11274 fi
11275
11276 fi
11277
11278 aix_libpath=$lt_cv_aix_libpath_
11279 fi
11280
11281 hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
11282 # Warning - without using the other run time loading flags,
11283 # -berok will link without error, but may produce a broken library.
11284 no_undefined_flag=' $wl-bernotok'
11285 allow_undefined_flag=' $wl-berok'
11286 if test yes = "$with_gnu_ld"; then
11287 # We only use this code for GNU lds that support --whole-archive.
11288 whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
11289 else
11290 # Exported symbols can be pulled into shared objects from archives
11291 whole_archive_flag_spec='$convenience'
11292 fi
11293 archive_cmds_need_lc=yes
11294 archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
11295 # -brtl affects multiple linker settings, -berok does not and is overridden later
11296 compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
11297 if test svr4 != "$with_aix_soname"; then
11298 # This is similar to how AIX traditionally builds its shared libraries.
11299 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
11300 fi
11301 if test aix != "$with_aix_soname"; then
11302 archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
11303 else
11304 # used by -dlpreopen to get the symbols
11305 archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
11306 fi
11307 archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
11308 fi
11309 fi
11310 ;;
11311
11312 amigaos*)
11313 case $target_cpu in
11314 powerpc)
11315 # see comment about AmigaOS4 .so support
11316 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
11317 archive_expsym_cmds=''
11318 ;;
11319 m68k)
11320 archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
11321 hardcode_libdir_flag_spec='-L$libdir'
11322 hardcode_minus_L=yes
11323 ;;
11324 esac
11325 ;;
11326
11327 bsdi[45]*)
11328 export_dynamic_flag_spec=-rdynamic
11329 ;;
11330
11331 cygwin* | mingw* | windows* | pw32* | cegcc*)
11332 # When not using gcc, we currently assume that we are using
11333 # Microsoft Visual C++ or Intel C++ Compiler.
11334 # hardcode_libdir_flag_spec is actually meaningless, as there is
11335 # no search path for DLLs.
11336 case $cc_basename in
11337 cl* | icl*)
11338 # Native MSVC or ICC
11339 hardcode_libdir_flag_spec=' '
11340 allow_undefined_flag=unsupported
11341 always_export_symbols=yes
11342 file_list_spec='@'
11343 # Tell ltmain to make .lib files, not .a files.
11344 libext=lib
11345 # Tell ltmain to make .dll files, not .so files.
11346 shrext_cmds=.dll
11347 # FIXME: Setting linknames here is a bad hack.
11348 archive_cmds='$CC -Fe$output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
11349 archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
11350 cp "$export_symbols" "$output_objdir/$soname.def";
11351 echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
11352 else
11353 $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
11354 fi~
11355 $CC -Fe$tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
11356 linknames='
11357 # The linker will not automatically build a static lib if we build a DLL.
11358 # _LT_TAGVAR(old_archive_from_new_cmds, )='true'
11359 enable_shared_with_static_runtimes=yes
11360 exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
11361 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
11362 # Don't use ranlib
11363 old_postinstall_cmds='chmod 644 $oldlib'
11364 postlink_cmds='lt_outputfile="@OUTPUT@"~
11365 lt_tool_outputfile="@TOOL_OUTPUT@"~
11366 case $lt_outputfile in
11367 *.exe|*.EXE) ;;
11368 *)
11369 lt_outputfile=$lt_outputfile.exe
11370 lt_tool_outputfile=$lt_tool_outputfile.exe
11371 ;;
11372 esac~
11373 if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
11374 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
11375 $RM "$lt_outputfile.manifest";
11376 fi'
11377 ;;
11378 *)
11379 # Assume MSVC and ICC wrapper
11380 hardcode_libdir_flag_spec=' '
11381 allow_undefined_flag=unsupported
11382 # Tell ltmain to make .lib files, not .a files.
11383 libext=lib
11384 # Tell ltmain to make .dll files, not .so files.
11385 shrext_cmds=.dll
11386 # FIXME: Setting linknames here is a bad hack.
11387 archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
11388 # The linker will automatically build a .lib file if we build a DLL.
11389 old_archive_from_new_cmds='true'
11390 # FIXME: Should let the user specify the lib program.
11391 old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
11392 enable_shared_with_static_runtimes=yes
11393 ;;
11394 esac
11395 ;;
11396
11397 darwin* | rhapsody*)
11398
11399
11400 archive_cmds_need_lc=no
11401 hardcode_direct=no
11402 hardcode_automatic=yes
11403 hardcode_shlibpath_var=unsupported
11404 if test yes = "$lt_cv_ld_force_load"; then
11405 whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
11406
11407 else
11408 whole_archive_flag_spec=''
11409 fi
11410 link_all_deplibs=yes
11411 allow_undefined_flag=$_lt_dar_allow_undefined
11412 case $cc_basename in
11413 ifort*|nagfor*) _lt_dar_can_shared=yes ;;
11414 *) _lt_dar_can_shared=$GCC ;;
11415 esac
11416 if test yes = "$_lt_dar_can_shared"; then
11417 output_verbose_link_cmd=func_echo_all
11418 archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
11419 module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
11420 archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
11421 module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
11422
11423 else
11424 ld_shlibs=no
11425 fi
11426
11427 ;;
11428
11429 dgux*)
11430 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11431 hardcode_libdir_flag_spec='-L$libdir'
11432 hardcode_shlibpath_var=no
11433 ;;
11434
11435 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
11436 # support. Future versions do this automatically, but an explicit c++rt0.o
11437 # does not break anything, and helps significantly (at the cost of a little
11438 # extra space).
11439 freebsd2.2*)
11440 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
11441 hardcode_libdir_flag_spec='-R$libdir'
11442 hardcode_direct=yes
11443 hardcode_shlibpath_var=no
11444 ;;
11445
11446 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
11447 freebsd2.*)
11448 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
11449 hardcode_direct=yes
11450 hardcode_minus_L=yes
11451 hardcode_shlibpath_var=no
11452 ;;
11453
11454 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
11455 freebsd* | dragonfly* | midnightbsd*)
11456 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11457 hardcode_libdir_flag_spec='-R$libdir'
11458 hardcode_direct=yes
11459 hardcode_shlibpath_var=no
11460 ;;
11461
11462 hpux9*)
11463 if test yes = "$GCC"; then
11464 archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
11465 else
11466 archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
11467 fi
11468 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11469 hardcode_libdir_separator=:
11470 hardcode_direct=yes
11471
11472 # hardcode_minus_L: Not really in the search PATH,
11473 # but as the default location of the library.
11474 hardcode_minus_L=yes
11475 export_dynamic_flag_spec='$wl-E'
11476 ;;
11477
11478 hpux10*)
11479 if test yes,no = "$GCC,$with_gnu_ld"; then
11480 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11481 else
11482 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11483 fi
11484 if test no = "$with_gnu_ld"; then
11485 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11486 hardcode_libdir_separator=:
11487 hardcode_direct=yes
11488 hardcode_direct_absolute=yes
11489 export_dynamic_flag_spec='$wl-E'
11490 # hardcode_minus_L: Not really in the search PATH,
11491 # but as the default location of the library.
11492 hardcode_minus_L=yes
11493 fi
11494 ;;
11495
11496 hpux11*)
11497 if test yes,no = "$GCC,$with_gnu_ld"; then
11498 case $target_cpu in
11499 hppa*64*)
11500 archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11501 ;;
11502 ia64*)
11503 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11504 ;;
11505 *)
11506 archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11507 ;;
11508 esac
11509 else
11510 case $target_cpu in
11511 hppa*64*)
11512 archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11513 ;;
11514 ia64*)
11515 archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
11516 ;;
11517 *)
11518
11519 # Older versions of the 11.00 compiler do not understand -b yet
11520 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
11521 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5
11522 printf %s "checking if $CC understands -b... " >&6; }
11523 if test ${lt_cv_prog_compiler__b+y}
11524 then :
11525 printf %s "(cached) " >&6
11526 else $as_nop
11527 lt_cv_prog_compiler__b=no
11528 save_LDFLAGS=$LDFLAGS
11529 LDFLAGS="$LDFLAGS -b"
11530 echo "$lt_simple_link_test_code" > conftest.$ac_ext
11531 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
11532 # The linker can only warn and ignore the option if not recognized
11533 # So say no if there are warnings
11534 if test -s conftest.err; then
11535 # Append any errors to the config.log.
11536 cat conftest.err 1>&5
11537 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
11538 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
11539 if diff conftest.exp conftest.er2 >/dev/null; then
11540 lt_cv_prog_compiler__b=yes
11541 fi
11542 else
11543 lt_cv_prog_compiler__b=yes
11544 fi
11545 fi
11546 $RM -r conftest*
11547 LDFLAGS=$save_LDFLAGS
11548
11549 fi
11550 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
11551 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; }
11552
11553 if test yes = "$lt_cv_prog_compiler__b"; then
11554 archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
11555 else
11556 archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
11557 fi
11558
11559 ;;
11560 esac
11561 fi
11562 if test no = "$with_gnu_ld"; then
11563 hardcode_libdir_flag_spec='$wl+b $wl$libdir'
11564 hardcode_libdir_separator=:
11565
11566 case $target_cpu in
11567 hppa*64*|ia64*)
11568 hardcode_direct=no
11569 hardcode_shlibpath_var=no
11570 ;;
11571 *)
11572 hardcode_direct=yes
11573 hardcode_direct_absolute=yes
11574 export_dynamic_flag_spec='$wl-E'
11575
11576 # hardcode_minus_L: Not really in the search PATH,
11577 # but as the default location of the library.
11578 hardcode_minus_L=yes
11579 ;;
11580 esac
11581 fi
11582 ;;
11583
11584 irix5* | irix6* | nonstopux*)
11585 if test yes = "$GCC"; then
11586 archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
11587 # Try to use the -exported_symbol ld option, if it does not
11588 # work, assume that -exports_file does not work either and
11589 # implicitly export all symbols.
11590 # This should be the same for all languages, so no per-tag cache variable.
11591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $target_os linker accepts -exported_symbol" >&5
11592 printf %s "checking whether the $target_os linker accepts -exported_symbol... " >&6; }
11593 if test ${lt_cv_irix_exported_symbol+y}
11594 then :
11595 printf %s "(cached) " >&6
11596 else $as_nop
11597 save_LDFLAGS=$LDFLAGS
11598 LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
11599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11600 /* end confdefs.h. */
11601 int foo (void) { return 0; }
11602 _ACEOF
11603 if ac_fn_c_try_link "$LINENO"
11604 then :
11605 lt_cv_irix_exported_symbol=yes
11606 else $as_nop
11607 lt_cv_irix_exported_symbol=no
11608 fi
11609 rm -f core conftest.err conftest.$ac_objext conftest.beam \
11610 conftest$ac_exeext conftest.$ac_ext
11611 LDFLAGS=$save_LDFLAGS
11612 fi
11613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
11614 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; }
11615 if test yes = "$lt_cv_irix_exported_symbol"; then
11616 archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
11617 fi
11618 else
11619 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
11620 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
11621 fi
11622 archive_cmds_need_lc='no'
11623 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11624 hardcode_libdir_separator=:
11625 inherit_rpath=yes
11626 link_all_deplibs=yes
11627 ;;
11628
11629 linux*)
11630 case $cc_basename in
11631 tcc*)
11632 # Fabrice Bellard et al's Tiny C Compiler
11633 ld_shlibs=yes
11634 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11635 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11636 ;;
11637 esac
11638 ;;
11639
11640 *-mlibc)
11641 ;;
11642
11643 netbsd* | netbsdelf*-gnu)
11644 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
11645 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
11646 else
11647 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
11648 fi
11649 hardcode_libdir_flag_spec='-R$libdir'
11650 hardcode_direct=yes
11651 hardcode_shlibpath_var=no
11652 ;;
11653
11654 newsos6)
11655 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11656 hardcode_direct=yes
11657 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11658 hardcode_libdir_separator=:
11659 hardcode_shlibpath_var=no
11660 ;;
11661
11662 *nto* | *qnx*)
11663 ;;
11664
11665 openbsd*)
11666 if test -f /usr/libexec/ld.so; then
11667 hardcode_direct=yes
11668 hardcode_shlibpath_var=no
11669 hardcode_direct_absolute=yes
11670 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
11671 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11672 archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
11673 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11674 export_dynamic_flag_spec='$wl-E'
11675 else
11676 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
11677 hardcode_libdir_flag_spec='$wl-rpath,$libdir'
11678 fi
11679 else
11680 ld_shlibs=no
11681 fi
11682 ;;
11683
11684 os2*)
11685 hardcode_libdir_flag_spec='-L$libdir'
11686 hardcode_minus_L=yes
11687 allow_undefined_flag=unsupported
11688 shrext_cmds=.dll
11689 archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11690 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11691 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11692 $ECHO EXPORTS >> $output_objdir/$libname.def~
11693 emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
11694 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11695 emximp -o $lib $output_objdir/$libname.def'
11696 archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
11697 $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
11698 $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
11699 $ECHO EXPORTS >> $output_objdir/$libname.def~
11700 prefix_cmds="$SED"~
11701 if test EXPORTS = "`$SED 1q $export_symbols`"; then
11702 prefix_cmds="$prefix_cmds -e 1d";
11703 fi~
11704 prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
11705 cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
11706 $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
11707 emximp -o $lib $output_objdir/$libname.def'
11708 old_archive_from_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
11709 enable_shared_with_static_runtimes=yes
11710 file_list_spec='@'
11711 ;;
11712
11713 osf3*)
11714 if test yes = "$GCC"; then
11715 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
11716 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
11717 else
11718 allow_undefined_flag=' -expect_unresolved \*'
11719 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
11720 fi
11721 archive_cmds_need_lc='no'
11722 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11723 hardcode_libdir_separator=:
11724 ;;
11725
11726 osf4* | osf5*) # as osf3* with the addition of -msym flag
11727 if test yes = "$GCC"; then
11728 allow_undefined_flag=' $wl-expect_unresolved $wl\*'
11729 archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
11730 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
11731 else
11732 allow_undefined_flag=' -expect_unresolved \*'
11733 archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
11734 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
11735 $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
11736
11737 # Both c and cxx compiler support -rpath directly
11738 hardcode_libdir_flag_spec='-rpath $libdir'
11739 fi
11740 archive_cmds_need_lc='no'
11741 hardcode_libdir_separator=:
11742 ;;
11743
11744 serenity*)
11745 ;;
11746
11747 solaris*)
11748 no_undefined_flag=' -z defs'
11749 if test yes = "$GCC"; then
11750 wlarc='$wl'
11751 archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
11752 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11753 $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
11754 else
11755 case `$CC -V 2>&1` in
11756 *"Compilers 5.0"*)
11757 wlarc=''
11758 archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
11759 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11760 $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
11761 ;;
11762 *)
11763 wlarc='$wl'
11764 archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
11765 archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
11766 $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
11767 ;;
11768 esac
11769 fi
11770 hardcode_libdir_flag_spec='-R$libdir'
11771 hardcode_shlibpath_var=no
11772 case $target_os in
11773 solaris2.[0-5] | solaris2.[0-5].*) ;;
11774 *)
11775 # The compiler driver will combine and reorder linker options,
11776 # but understands '-z linker_flag'. GCC discards it without '$wl',
11777 # but is careful enough not to reorder.
11778 # Supported since Solaris 2.6 (maybe 2.5.1?)
11779 if test yes = "$GCC"; then
11780 whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
11781 else
11782 whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
11783 fi
11784 ;;
11785 esac
11786 link_all_deplibs=yes
11787 ;;
11788
11789 sunos4*)
11790 if test sequent = "$target_vendor"; then
11791 # Use $CC to link under sequent, because it throws in some extra .o
11792 # files that make .init and .fini sections work.
11793 archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
11794 else
11795 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
11796 fi
11797 hardcode_libdir_flag_spec='-L$libdir'
11798 hardcode_direct=yes
11799 hardcode_minus_L=yes
11800 hardcode_shlibpath_var=no
11801 ;;
11802
11803 sysv4)
11804 case $target_vendor in
11805 sni)
11806 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11807 hardcode_direct=yes # is this really true???
11808 ;;
11809 siemens)
11810 ## LD is ld it makes a PLAMLIB
11811 ## CC just makes a GrossModule.
11812 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
11813 reload_cmds='$CC -r -o $output$reload_objs'
11814 hardcode_direct=no
11815 ;;
11816 motorola)
11817 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11818 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
11819 ;;
11820 esac
11821 runpath_var='LD_RUN_PATH'
11822 hardcode_shlibpath_var=no
11823 ;;
11824
11825 sysv4.3*)
11826 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11827 hardcode_shlibpath_var=no
11828 export_dynamic_flag_spec='-Bexport'
11829 ;;
11830
11831 sysv4*MP*)
11832 if test -d /usr/nec; then
11833 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11834 hardcode_shlibpath_var=no
11835 runpath_var=LD_RUN_PATH
11836 hardcode_runpath_var=yes
11837 ld_shlibs=yes
11838 fi
11839 ;;
11840
11841 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
11842 no_undefined_flag='$wl-z,text'
11843 archive_cmds_need_lc=no
11844 hardcode_shlibpath_var=no
11845 runpath_var='LD_RUN_PATH'
11846
11847 if test yes = "$GCC"; then
11848 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11849 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11850 else
11851 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11852 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11853 fi
11854 ;;
11855
11856 sysv5* | sco3.2v5* | sco5v6*)
11857 # Note: We CANNOT use -z defs as we might desire, because we do not
11858 # link with -lc, and that would cause any symbols used from libc to
11859 # always be unresolved, which means just about no library would
11860 # ever link correctly. If we're not using GNU ld we use -z text
11861 # though, which does catch some bad symbols but isn't as heavy-handed
11862 # as -z defs.
11863 no_undefined_flag='$wl-z,text'
11864 allow_undefined_flag='$wl-z,nodefs'
11865 archive_cmds_need_lc=no
11866 hardcode_shlibpath_var=no
11867 hardcode_libdir_flag_spec='$wl-R,$libdir'
11868 hardcode_libdir_separator=':'
11869 link_all_deplibs=yes
11870 export_dynamic_flag_spec='$wl-Bexport'
11871 runpath_var='LD_RUN_PATH'
11872
11873 if test yes = "$GCC"; then
11874 archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11875 archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11876 else
11877 archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11878 archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
11879 fi
11880 ;;
11881
11882 uts4*)
11883 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
11884 hardcode_libdir_flag_spec='-L$libdir'
11885 hardcode_shlibpath_var=no
11886 ;;
11887
11888 *)
11889 ld_shlibs=no
11890 ;;
11891 esac
11892
11893 if test sni = "$target_vendor"; then
11894 case $target in
11895 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
11896 export_dynamic_flag_spec='$wl-Blargedynsym'
11897 ;;
11898 esac
11899 fi
11900 fi
11901
11902 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
11903 printf "%s\n" "$ld_shlibs" >&6; }
11904 test no = "$ld_shlibs" && can_build_shared=no
11905
11906 with_gnu_ld=$with_gnu_ld
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922 #
11923 # Do we need to explicitly link libc?
11924 #
11925 case "x$archive_cmds_need_lc" in
11926 x|xyes)
11927 # Assume -lc should be added
11928 archive_cmds_need_lc=yes
11929
11930 if test yes,yes = "$GCC,$enable_shared"; then
11931 case $archive_cmds in
11932 *'~'*)
11933 # FIXME: we may have to deal with multi-command sequences.
11934 ;;
11935 '$CC '*)
11936 # Test whether the compiler implicitly links with -lc since on some
11937 # systems, -lgcc has to come before -lc. If gcc already passes -lc
11938 # to ld, don't add -lc before -lgcc.
11939 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
11940 printf %s "checking whether -lc should be explicitly linked in... " >&6; }
11941 if test ${lt_cv_archive_cmds_need_lc+y}
11942 then :
11943 printf %s "(cached) " >&6
11944 else $as_nop
11945 $RM conftest*
11946 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
11947
11948 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
11949 (eval $ac_compile) 2>&5
11950 ac_status=$?
11951 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11952 test $ac_status = 0; } 2>conftest.err; then
11953 soname=conftest
11954 lib=conftest
11955 libobjs=conftest.$ac_objext
11956 deplibs=
11957 wl=$lt_prog_compiler_wl
11958 pic_flag=$lt_prog_compiler_pic
11959 compiler_flags=-v
11960 linker_flags=-v
11961 verstring=
11962 output_objdir=.
11963 libname=conftest
11964 lt_save_allow_undefined_flag=$allow_undefined_flag
11965 allow_undefined_flag=
11966 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
11967 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
11968 ac_status=$?
11969 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
11970 test $ac_status = 0; }
11971 then
11972 lt_cv_archive_cmds_need_lc=no
11973 else
11974 lt_cv_archive_cmds_need_lc=yes
11975 fi
11976 allow_undefined_flag=$lt_save_allow_undefined_flag
11977 else
11978 cat conftest.err 1>&5
11979 fi
11980 $RM conftest*
11981
11982 fi
11983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5
11984 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; }
11985 archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc
11986 ;;
11987 esac
11988 fi
11989 ;;
11990 esac
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
12144 printf %s "checking dynamic linker characteristics... " >&6; }
12145
12146 if test yes = "$GCC"; then
12147 case $target_os in
12148 darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
12149 *) lt_awk_arg='/^libraries:/' ;;
12150 esac
12151 case $target_os in
12152 mingw* | windows* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
12153 *) lt_sed_strip_eq='s|=/|/|g' ;;
12154 esac
12155 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
12156 case $lt_search_path_spec in
12157 *\;*)
12158 # if the path contains ";" then we assume it to be the separator
12159 # otherwise default to the standard path separator (i.e. ":") - it is
12160 # assumed that no part of a normal pathname contains ";" but that should
12161 # okay in the real world where ";" in dirpaths is itself problematic.
12162 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
12163 ;;
12164 *)
12165 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
12166 ;;
12167 esac
12168 # Ok, now we have the path, separated by spaces, we can step through it
12169 # and add multilib dir if necessary...
12170 lt_tmp_lt_search_path_spec=
12171 lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12172 # ...but if some path component already ends with the multilib dir we assume
12173 # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
12174 case "$lt_multi_os_dir; $lt_search_path_spec " in
12175 "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
12176 lt_multi_os_dir=
12177 ;;
12178 esac
12179 for lt_sys_path in $lt_search_path_spec; do
12180 if test -d "$lt_sys_path$lt_multi_os_dir"; then
12181 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
12182 elif test -n "$lt_multi_os_dir"; then
12183 test -d "$lt_sys_path" && \
12184 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12185 fi
12186 done
12187 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
12188 BEGIN {RS = " "; FS = "/|\n";} {
12189 lt_foo = "";
12190 lt_count = 0;
12191 for (lt_i = NF; lt_i > 0; lt_i--) {
12192 if ($lt_i != "" && $lt_i != ".") {
12193 if ($lt_i == "..") {
12194 lt_count++;
12195 } else {
12196 if (lt_count == 0) {
12197 lt_foo = "/" $lt_i lt_foo;
12198 } else {
12199 lt_count--;
12200 }
12201 }
12202 }
12203 }
12204 if (lt_foo != "") { lt_freq[lt_foo]++; }
12205 if (lt_freq[lt_foo] == 1) { print lt_foo; }
12206 }'`
12207 # AWK program above erroneously prepends '/' to C:/dos/paths
12208 # for these hosts.
12209 case $target_os in
12210 mingw* | windows* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
12211 $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
12212 esac
12213 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
12214 else
12215 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12216 fi
12217 library_names_spec=
12218 libname_spec='lib$name'
12219 soname_spec=
12220 shrext_cmds=.so
12221 postinstall_cmds=
12222 postuninstall_cmds=
12223 finish_cmds=
12224 finish_eval=
12225 shlibpath_var=
12226 shlibpath_overrides_runpath=unknown
12227 version_type=none
12228 dynamic_linker="$target_os ld.so"
12229 sys_lib_dlsearch_path_spec="/lib /usr/lib"
12230 need_lib_prefix=unknown
12231 hardcode_into_libs=no
12232
12233 # when you set need_version to no, make sure it does not cause -set_version
12234 # flags to be left without arguments
12235 need_version=unknown
12236
12237
12238
12239 case $target_os in
12240 aix3*)
12241 version_type=linux # correct to gnu/linux during the next big refactor
12242 library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
12243 shlibpath_var=LIBPATH
12244
12245 # AIX 3 has no versioning support, so we append a major version to the name.
12246 soname_spec='$libname$release$shared_ext$major'
12247 ;;
12248
12249 aix[4-9]*)
12250 version_type=linux # correct to gnu/linux during the next big refactor
12251 need_lib_prefix=no
12252 need_version=no
12253 hardcode_into_libs=yes
12254 if test ia64 = "$target_cpu"; then
12255 # AIX 5 supports IA64
12256 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
12257 shlibpath_var=LD_LIBRARY_PATH
12258 else
12259 # With GCC up to 2.95.x, collect2 would create an import file
12260 # for dependence libraries. The import file would start with
12261 # the line '#! .'. This would cause the generated library to
12262 # depend on '.', always an invalid library. This was fixed in
12263 # development snapshots of GCC prior to 3.0.
12264 case $target_os in
12265 aix4 | aix4.[01] | aix4.[01].*)
12266 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
12267 echo ' yes '
12268 echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
12269 :
12270 else
12271 can_build_shared=no
12272 fi
12273 ;;
12274 esac
12275 # Using Import Files as archive members, it is possible to support
12276 # filename-based versioning of shared library archives on AIX. While
12277 # this would work for both with and without runtime linking, it will
12278 # prevent static linking of such archives. So we do filename-based
12279 # shared library versioning with .so extension only, which is used
12280 # when both runtime linking and shared linking is enabled.
12281 # Unfortunately, runtime linking may impact performance, so we do
12282 # not want this to be the default eventually. Also, we use the
12283 # versioned .so libs for executables only if there is the -brtl
12284 # linker flag in LDFLAGS as well, or --enable-aix-soname=svr4 only.
12285 # To allow for filename-based versioning support, we need to create
12286 # libNAME.so.V as an archive file, containing:
12287 # *) an Import File, referring to the versioned filename of the
12288 # archive as well as the shared archive member, telling the
12289 # bitwidth (32 or 64) of that shared object, and providing the
12290 # list of exported symbols of that shared object, eventually
12291 # decorated with the 'weak' keyword
12292 # *) the shared object with the F_LOADONLY flag set, to really avoid
12293 # it being seen by the linker.
12294 # At run time we better use the real file rather than another symlink,
12295 # but for link time we create the symlink libNAME.so -> libNAME.so.V
12296
12297 case $with_aix_soname,$aix_use_runtimelinking in
12298 # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
12299 # soname into executable. Probably we can add versioning support to
12300 # collect2, so additional links can be useful in future.
12301 aix,yes) # traditional libtool
12302 dynamic_linker='AIX unversionable lib.so'
12303 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
12304 # instead of lib<name>.a to let people know that these are not
12305 # typical AIX shared libraries.
12306 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12307 ;;
12308 aix,no) # traditional AIX only
12309 dynamic_linker='AIX lib.a(lib.so.V)'
12310 # We preserve .a as extension for shared libraries through AIX4.2
12311 # and later when we are not doing run time linking.
12312 library_names_spec='$libname$release.a $libname.a'
12313 soname_spec='$libname$release$shared_ext$major'
12314 ;;
12315 svr4,*) # full svr4 only
12316 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
12317 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12318 # We do not specify a path in Import Files, so LIBPATH fires.
12319 shlibpath_overrides_runpath=yes
12320 ;;
12321 *,yes) # both, prefer svr4
12322 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
12323 library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
12324 # unpreferred sharedlib libNAME.a needs extra handling
12325 postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
12326 postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
12327 # We do not specify a path in Import Files, so LIBPATH fires.
12328 shlibpath_overrides_runpath=yes
12329 ;;
12330 *,no) # both, prefer aix
12331 dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
12332 library_names_spec='$libname$release.a $libname.a'
12333 soname_spec='$libname$release$shared_ext$major'
12334 # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
12335 postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
12336 postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
12337 ;;
12338 esac
12339 shlibpath_var=LIBPATH
12340 fi
12341 ;;
12342
12343 amigaos*)
12344 case $target_cpu in
12345 powerpc)
12346 # Since July 2007 AmigaOS4 officially supports .so libraries.
12347 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
12348 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12349 ;;
12350 m68k)
12351 library_names_spec='$libname.ixlibrary $libname.a'
12352 # Create ${libname}_ixlibrary.a entries in /sys/libs.
12353 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
12354 ;;
12355 esac
12356 ;;
12357
12358 beos*)
12359 library_names_spec='$libname$shared_ext'
12360 dynamic_linker="$target_os ld.so"
12361 shlibpath_var=LIBRARY_PATH
12362 ;;
12363
12364 bsdi[45]*)
12365 version_type=linux # correct to gnu/linux during the next big refactor
12366 need_version=no
12367 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12368 soname_spec='$libname$release$shared_ext$major'
12369 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
12370 shlibpath_var=LD_LIBRARY_PATH
12371 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
12372 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
12373 # the default ld.so.conf also contains /usr/contrib/lib and
12374 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
12375 # libtool to hard-code these into programs
12376 ;;
12377
12378 cygwin* | mingw* | windows* | pw32* | cegcc*)
12379 version_type=windows
12380 shrext_cmds=.dll
12381 need_version=no
12382 need_lib_prefix=no
12383
12384 case $GCC,$cc_basename in
12385 yes,*)
12386 # gcc
12387 library_names_spec='$libname.dll.a'
12388 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12389 # If user builds GCC with multilib enabled,
12390 # it should just install on $(libdir)
12391 # not on $(libdir)/../bin or 32 bits dlls would override 64 bit ones.
12392 if test xyes = x"$multilib"; then
12393 postinstall_cmds='base_file=`basename \$file`~
12394 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
12395 dldir=$destdir/`dirname \$dlpath`~
12396 $install_prog $dir/$dlname $destdir/$dlname~
12397 chmod a+x $destdir/$dlname~
12398 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12399 eval '\''$striplib $destdir/$dlname'\'' || exit \$?;
12400 fi'
12401 else
12402 postinstall_cmds='base_file=`basename \$file`~
12403 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
12404 dldir=$destdir/`dirname \$dlpath`~
12405 test -d \$dldir || mkdir -p \$dldir~
12406 $install_prog $dir/$dlname \$dldir/$dlname~
12407 chmod a+x \$dldir/$dlname~
12408 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12409 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
12410 fi'
12411 fi
12412 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12413 dlpath=$dir/\$dldll~
12414 $RM \$dlpath'
12415 shlibpath_overrides_runpath=yes
12416
12417 case $target_os in
12418 cygwin*)
12419 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
12420 soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12421
12422 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
12423 ;;
12424 mingw* | windows* | cegcc*)
12425 # MinGW DLLs use traditional 'lib' prefix
12426 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12427 ;;
12428 pw32*)
12429 # pw32 DLLs use 'pw' prefix rather than 'lib'
12430 library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12431 ;;
12432 esac
12433 dynamic_linker='Win32 ld.exe'
12434 ;;
12435
12436 *,cl* | *,icl*)
12437 # Native MSVC or ICC
12438 libname_spec='$name'
12439 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
12440 library_names_spec='$libname.dll.lib'
12441
12442 case $build_os in
12443 mingw* | windows*)
12444 sys_lib_search_path_spec=
12445 lt_save_ifs=$IFS
12446 IFS=';'
12447 for lt_path in $LIB
12448 do
12449 IFS=$lt_save_ifs
12450 # Let DOS variable expansion print the short 8.3 style file name.
12451 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
12452 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
12453 done
12454 IFS=$lt_save_ifs
12455 # Convert to MSYS style.
12456 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'`
12457 ;;
12458 cygwin*)
12459 # Convert to unix form, then to dos form, then back to unix form
12460 # but this time dos style (no spaces!) so that the unix form looks
12461 # like /cygdrive/c/PROGRA~1:/cygdr...
12462 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
12463 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
12464 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12465 ;;
12466 *)
12467 sys_lib_search_path_spec=$LIB
12468 if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
12469 # It is most probably a Windows format PATH.
12470 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
12471 else
12472 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
12473 fi
12474 # FIXME: find the short name or the path components, as spaces are
12475 # common. (e.g. "Program Files" -> "PROGRA~1")
12476 ;;
12477 esac
12478
12479 # DLL is installed to $(libdir)/../bin by postinstall_cmds
12480 postinstall_cmds='base_file=`basename \$file`~
12481 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
12482 dldir=$destdir/`dirname \$dlpath`~
12483 test -d \$dldir || mkdir -p \$dldir~
12484 $install_prog $dir/$dlname \$dldir/$dlname'
12485 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
12486 dlpath=$dir/\$dldll~
12487 $RM \$dlpath'
12488 shlibpath_overrides_runpath=yes
12489 dynamic_linker='Win32 link.exe'
12490 ;;
12491
12492 *)
12493 # Assume MSVC and ICC wrapper
12494 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
12495 dynamic_linker='Win32 ld.exe'
12496 ;;
12497 esac
12498 # FIXME: first we should search . and the directory the executable is in
12499 shlibpath_var=PATH
12500 ;;
12501
12502 darwin* | rhapsody*)
12503 dynamic_linker="$target_os dyld"
12504 version_type=darwin
12505 need_lib_prefix=no
12506 need_version=no
12507 library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
12508 soname_spec='$libname$release$major$shared_ext'
12509 shlibpath_overrides_runpath=yes
12510 shlibpath_var=DYLD_LIBRARY_PATH
12511 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
12512
12513 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
12514 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
12515 ;;
12516
12517 dgux*)
12518 version_type=linux # correct to gnu/linux during the next big refactor
12519 need_lib_prefix=no
12520 need_version=no
12521 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12522 soname_spec='$libname$release$shared_ext$major'
12523 shlibpath_var=LD_LIBRARY_PATH
12524 ;;
12525
12526 freebsd* | dragonfly* | midnightbsd*)
12527 # DragonFly does not have aout. When/if they implement a new
12528 # versioning mechanism, adjust this.
12529 if test -x /usr/bin/objformat; then
12530 objformat=`/usr/bin/objformat`
12531 else
12532 case $target_os in
12533 freebsd[23].*) objformat=aout ;;
12534 *) objformat=elf ;;
12535 esac
12536 fi
12537 version_type=freebsd-$objformat
12538 case $version_type in
12539 freebsd-elf*)
12540 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12541 soname_spec='$libname$release$shared_ext$major'
12542 need_version=no
12543 need_lib_prefix=no
12544 ;;
12545 freebsd-*)
12546 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12547 need_version=yes
12548 ;;
12549 esac
12550 case $target_cpu in
12551 powerpc64)
12552 # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
12553 # binaries. See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
12554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12555 /* end confdefs.h. */
12556 int test_pointer_size[sizeof (void *) - 5];
12557
12558 _ACEOF
12559 if ac_fn_c_try_compile "$LINENO"
12560 then :
12561 shlibpath_var=LD_LIBRARY_PATH
12562 else $as_nop
12563 shlibpath_var=LD_32_LIBRARY_PATH
12564 fi
12565 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
12566 ;;
12567 *)
12568 shlibpath_var=LD_LIBRARY_PATH
12569 ;;
12570 esac
12571 case $target_os in
12572 freebsd2.*)
12573 shlibpath_overrides_runpath=yes
12574 ;;
12575 freebsd3.[01]* | freebsdelf3.[01]*)
12576 shlibpath_overrides_runpath=yes
12577 hardcode_into_libs=yes
12578 ;;
12579 freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
12580 freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
12581 shlibpath_overrides_runpath=no
12582 hardcode_into_libs=yes
12583 ;;
12584 *) # from 4.6 on, and DragonFly
12585 shlibpath_overrides_runpath=yes
12586 hardcode_into_libs=yes
12587 ;;
12588 esac
12589 ;;
12590
12591 haiku*)
12592 version_type=linux # correct to gnu/linux during the next big refactor
12593 need_lib_prefix=no
12594 need_version=no
12595 dynamic_linker="$target_os runtime_loader"
12596 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12597 soname_spec='$libname$release$shared_ext$major'
12598 shlibpath_var=LIBRARY_PATH
12599 shlibpath_overrides_runpath=no
12600 sys_lib_search_path_spec='/boot/system/non-packaged/develop/lib /boot/system/develop/lib'
12601 sys_lib_dlsearch_path_spec='/boot/home/config/non-packaged/lib /boot/home/config/lib /boot/system/non-packaged/lib /boot/system/lib'
12602 hardcode_into_libs=no
12603 ;;
12604
12605 hpux9* | hpux10* | hpux11*)
12606 # Give a soname corresponding to the major version so that dld.sl refuses to
12607 # link against other versions.
12608 version_type=sunos
12609 need_lib_prefix=no
12610 need_version=no
12611 case $target_cpu in
12612 ia64*)
12613 shrext_cmds='.so'
12614 hardcode_into_libs=yes
12615 dynamic_linker="$target_os dld.so"
12616 shlibpath_var=LD_LIBRARY_PATH
12617 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12618 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12619 soname_spec='$libname$release$shared_ext$major'
12620 if test 32 = "$HPUX_IA64_MODE"; then
12621 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
12622 sys_lib_dlsearch_path_spec=/usr/lib/hpux32
12623 else
12624 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
12625 sys_lib_dlsearch_path_spec=/usr/lib/hpux64
12626 fi
12627 ;;
12628 hppa*64*)
12629 shrext_cmds='.sl'
12630 hardcode_into_libs=yes
12631 dynamic_linker="$target_os dld.sl"
12632 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
12633 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
12634 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12635 soname_spec='$libname$release$shared_ext$major'
12636 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
12637 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12638 ;;
12639 *)
12640 shrext_cmds='.sl'
12641 dynamic_linker="$target_os dld.sl"
12642 shlibpath_var=SHLIB_PATH
12643 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
12644 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12645 soname_spec='$libname$release$shared_ext$major'
12646 ;;
12647 esac
12648 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
12649 postinstall_cmds='chmod 555 $lib'
12650 # or fails outright, so override atomically:
12651 install_override_mode=555
12652 ;;
12653
12654 interix[3-9]*)
12655 version_type=linux # correct to gnu/linux during the next big refactor
12656 need_lib_prefix=no
12657 need_version=no
12658 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12659 soname_spec='$libname$release$shared_ext$major'
12660 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
12661 shlibpath_var=LD_LIBRARY_PATH
12662 shlibpath_overrides_runpath=no
12663 hardcode_into_libs=yes
12664 ;;
12665
12666 irix5* | irix6* | nonstopux*)
12667 case $target_os in
12668 nonstopux*) version_type=nonstopux ;;
12669 *)
12670 if test yes = "$lt_cv_prog_gnu_ld"; then
12671 version_type=linux # correct to gnu/linux during the next big refactor
12672 else
12673 version_type=irix
12674 fi ;;
12675 esac
12676 need_lib_prefix=no
12677 need_version=no
12678 soname_spec='$libname$release$shared_ext$major'
12679 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
12680 case $target_os in
12681 irix5* | nonstopux*)
12682 libsuff= shlibsuff=
12683 ;;
12684 *)
12685 case $LD in # libtool.m4 will add one of these switches to LD
12686 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
12687 libsuff= shlibsuff= libmagic=32-bit;;
12688 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
12689 libsuff=32 shlibsuff=N32 libmagic=N32;;
12690 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
12691 libsuff=64 shlibsuff=64 libmagic=64-bit;;
12692 *) libsuff= shlibsuff= libmagic=never-match;;
12693 esac
12694 ;;
12695 esac
12696 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
12697 shlibpath_overrides_runpath=no
12698 sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
12699 sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
12700 hardcode_into_libs=yes
12701 ;;
12702
12703 # No shared lib support for Linux oldld, aout, or coff.
12704 linux*oldld* | linux*aout* | linux*coff*)
12705 dynamic_linker=no
12706 ;;
12707
12708 linux*android*)
12709 version_type=none # Android doesn't support versioned libraries.
12710 need_lib_prefix=no
12711 need_version=no
12712 library_names_spec='$libname$release$shared_ext $libname$shared_ext'
12713 soname_spec='$libname$release$shared_ext'
12714 finish_cmds=
12715 shlibpath_var=LD_LIBRARY_PATH
12716 shlibpath_overrides_runpath=yes
12717
12718 # This implies no fast_install, which is unacceptable.
12719 # Some rework will be needed to allow for fast_install
12720 # before this can be enabled.
12721 hardcode_into_libs=yes
12722
12723 dynamic_linker='Android linker'
12724 # -rpath works at least for libraries that are not overridden by
12725 # libraries installed in system locations.
12726 hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
12727 ;;
12728
12729 # This must be glibc/ELF.
12730 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
12731 version_type=linux # correct to gnu/linux during the next big refactor
12732 need_lib_prefix=no
12733 need_version=no
12734 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12735 soname_spec='$libname$release$shared_ext$major'
12736 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
12737 shlibpath_var=LD_LIBRARY_PATH
12738 shlibpath_overrides_runpath=no
12739
12740 # Some binutils ld are patched to set DT_RUNPATH
12741 if test ${lt_cv_shlibpath_overrides_runpath+y}
12742 then :
12743 printf %s "(cached) " >&6
12744 else $as_nop
12745 lt_cv_shlibpath_overrides_runpath=no
12746 save_LDFLAGS=$LDFLAGS
12747 save_libdir=$libdir
12748 eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
12749 LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
12750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12751 /* end confdefs.h. */
12752
12753 int
12754 main (void)
12755 {
12756
12757 ;
12758 return 0;
12759 }
12760 _ACEOF
12761 if ac_fn_c_try_link "$LINENO"
12762 then :
12763 if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null
12764 then :
12765 lt_cv_shlibpath_overrides_runpath=yes
12766 fi
12767 fi
12768 rm -f core conftest.err conftest.$ac_objext conftest.beam \
12769 conftest$ac_exeext conftest.$ac_ext
12770 LDFLAGS=$save_LDFLAGS
12771 libdir=$save_libdir
12772
12773 fi
12774
12775 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
12776
12777 # This implies no fast_install, which is unacceptable.
12778 # Some rework will be needed to allow for fast_install
12779 # before this can be enabled.
12780 hardcode_into_libs=yes
12781
12782 # Ideally, we could use ldconfig to report *all* directories which are
12783 # searched for libraries, however this is still not possible. Aside from not
12784 # being certain /sbin/ldconfig is available, command
12785 # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
12786 # even though it is searched at run-time. Try to do the best guess by
12787 # appending ld.so.conf contents (and includes) to the search path.
12788 if test -f /etc/ld.so.conf; then
12789 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
12790 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
12791 fi
12792
12793 # We used to test for /lib/ld.so.1 and disable shared libraries on
12794 # powerpc, because MkLinux only supported shared libraries with the
12795 # GNU dynamic linker. Since this was broken with cross compilers,
12796 # most powerpc-linux boxes support dynamic linking these days and
12797 # people can always --disable-shared, the test was removed, and we
12798 # assume the GNU/Linux dynamic linker is in use.
12799 dynamic_linker='GNU/Linux ld.so'
12800 ;;
12801
12802 netbsdelf*-gnu)
12803 version_type=linux
12804 need_lib_prefix=no
12805 need_version=no
12806 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12807 soname_spec='$libname$release$shared_ext$major'
12808 shlibpath_var=LD_LIBRARY_PATH
12809 shlibpath_overrides_runpath=no
12810 hardcode_into_libs=yes
12811 dynamic_linker='NetBSD ld.elf_so'
12812 ;;
12813
12814 netbsd*)
12815 version_type=sunos
12816 need_lib_prefix=no
12817 need_version=no
12818 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
12819 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12820 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12821 dynamic_linker='NetBSD (a.out) ld.so'
12822 else
12823 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12824 soname_spec='$libname$release$shared_ext$major'
12825 dynamic_linker='NetBSD ld.elf_so'
12826 fi
12827 shlibpath_var=LD_LIBRARY_PATH
12828 shlibpath_overrides_runpath=yes
12829 hardcode_into_libs=yes
12830 ;;
12831
12832 *-mlibc)
12833 version_type=linux # correct to gnu/linux during the next big refactor
12834 need_lib_prefix=no
12835 need_version=no
12836 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12837 soname_spec='$libname$release$shared_ext$major'
12838 dynamic_linker='mlibc ld.so'
12839 shlibpath_var=LD_LIBRARY_PATH
12840 shlibpath_overrides_runpath=no
12841 hardcode_into_libs=yes
12842 ;;
12843
12844 newsos6)
12845 version_type=linux # correct to gnu/linux during the next big refactor
12846 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12847 shlibpath_var=LD_LIBRARY_PATH
12848 shlibpath_overrides_runpath=yes
12849 ;;
12850
12851 *nto* | *qnx*)
12852 version_type=qnx
12853 need_lib_prefix=no
12854 need_version=no
12855 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12856 soname_spec='$libname$release$shared_ext$major'
12857 shlibpath_var=LD_LIBRARY_PATH
12858 shlibpath_overrides_runpath=no
12859 hardcode_into_libs=yes
12860 dynamic_linker='ldqnx.so'
12861 ;;
12862
12863 openbsd*)
12864 version_type=sunos
12865 sys_lib_dlsearch_path_spec=/usr/lib
12866 need_lib_prefix=no
12867 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
12868 need_version=no
12869 else
12870 need_version=yes
12871 fi
12872 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12873 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
12874 shlibpath_var=LD_LIBRARY_PATH
12875 shlibpath_overrides_runpath=yes
12876 ;;
12877
12878 os2*)
12879 libname_spec='$name'
12880 version_type=windows
12881 shrext_cmds=.dll
12882 need_version=no
12883 need_lib_prefix=no
12884 # OS/2 can only load a DLL with a base name of 8 characters or less.
12885 soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
12886 v=$($ECHO $release$versuffix | tr -d .-);
12887 n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
12888 $ECHO $n$v`$shared_ext'
12889 library_names_spec='${libname}_dll.$libext'
12890 dynamic_linker='OS/2 ld.exe'
12891 shlibpath_var=BEGINLIBPATH
12892 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12893 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12894 postinstall_cmds='base_file=`basename \$file`~
12895 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
12896 dldir=$destdir/`dirname \$dlpath`~
12897 test -d \$dldir || mkdir -p \$dldir~
12898 $install_prog $dir/$dlname \$dldir/$dlname~
12899 chmod a+x \$dldir/$dlname~
12900 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
12901 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
12902 fi'
12903 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
12904 dlpath=$dir/\$dldll~
12905 $RM \$dlpath'
12906 ;;
12907
12908 osf3* | osf4* | osf5*)
12909 version_type=osf
12910 need_lib_prefix=no
12911 need_version=no
12912 soname_spec='$libname$release$shared_ext$major'
12913 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12914 shlibpath_var=LD_LIBRARY_PATH
12915 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
12916 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
12917 ;;
12918
12919 rdos*)
12920 dynamic_linker=no
12921 ;;
12922
12923 serenity*)
12924 version_type=linux # correct to gnu/linux during the next big refactor
12925 need_lib_prefix=no
12926 need_version=no
12927 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12928 soname_spec='$libname$release$shared_ext$major'
12929 shlibpath_var=LD_LIBRARY_PATH
12930 shlibpath_overrides_runpath=no
12931 dynamic_linker='SerenityOS LibELF'
12932 ;;
12933
12934 solaris*)
12935 version_type=linux # correct to gnu/linux during the next big refactor
12936 need_lib_prefix=no
12937 need_version=no
12938 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12939 soname_spec='$libname$release$shared_ext$major'
12940 shlibpath_var=LD_LIBRARY_PATH
12941 shlibpath_overrides_runpath=yes
12942 hardcode_into_libs=yes
12943 # ldd complains unless libraries are executable
12944 postinstall_cmds='chmod +x $lib'
12945 ;;
12946
12947 sunos4*)
12948 version_type=sunos
12949 library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
12950 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
12951 shlibpath_var=LD_LIBRARY_PATH
12952 shlibpath_overrides_runpath=yes
12953 if test yes = "$with_gnu_ld"; then
12954 need_lib_prefix=no
12955 fi
12956 need_version=yes
12957 ;;
12958
12959 sysv4 | sysv4.3*)
12960 version_type=linux # correct to gnu/linux during the next big refactor
12961 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
12962 soname_spec='$libname$release$shared_ext$major'
12963 shlibpath_var=LD_LIBRARY_PATH
12964 case $target_vendor in
12965 sni)
12966 shlibpath_overrides_runpath=no
12967 need_lib_prefix=no
12968 runpath_var=LD_RUN_PATH
12969 ;;
12970 siemens)
12971 need_lib_prefix=no
12972 ;;
12973 motorola)
12974 need_lib_prefix=no
12975 need_version=no
12976 shlibpath_overrides_runpath=no
12977 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
12978 ;;
12979 esac
12980 ;;
12981
12982 sysv4*MP*)
12983 if test -d /usr/nec; then
12984 version_type=linux # correct to gnu/linux during the next big refactor
12985 library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
12986 soname_spec='$libname$shared_ext.$major'
12987 shlibpath_var=LD_LIBRARY_PATH
12988 fi
12989 ;;
12990
12991 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
12992 version_type=sco
12993 need_lib_prefix=no
12994 need_version=no
12995 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
12996 soname_spec='$libname$release$shared_ext$major'
12997 shlibpath_var=LD_LIBRARY_PATH
12998 shlibpath_overrides_runpath=yes
12999 hardcode_into_libs=yes
13000 if test yes = "$with_gnu_ld"; then
13001 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
13002 else
13003 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
13004 case $target_os in
13005 sco3.2v5*)
13006 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
13007 ;;
13008 esac
13009 fi
13010 sys_lib_dlsearch_path_spec='/usr/lib'
13011 ;;
13012
13013 tpf*)
13014 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
13015 version_type=linux # correct to gnu/linux during the next big refactor
13016 need_lib_prefix=no
13017 need_version=no
13018 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13019 shlibpath_var=LD_LIBRARY_PATH
13020 shlibpath_overrides_runpath=no
13021 hardcode_into_libs=yes
13022 ;;
13023
13024 uts4*)
13025 version_type=linux # correct to gnu/linux during the next big refactor
13026 library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
13027 soname_spec='$libname$release$shared_ext$major'
13028 shlibpath_var=LD_LIBRARY_PATH
13029 ;;
13030
13031 emscripten*)
13032 version_type=none
13033 need_lib_prefix=no
13034 need_version=no
13035 library_names_spec='$libname$release$shared_ext'
13036 soname_spec='$libname$release$shared_ext'
13037 finish_cmds=
13038 dynamic_linker="Emscripten linker"
13039 lt_prog_compiler_wl=
13040 lt_prog_compiler_pic=
13041 lt_prog_compiler_static=
13042
13043
13044 if test yes = "$GCC"; then
13045 lt_prog_compiler_wl='-Wl,'
13046 lt_prog_compiler_static='-static'
13047
13048 case $target_os in
13049 aix*)
13050 # All AIX code is PIC.
13051 if test ia64 = "$target_cpu"; then
13052 # AIX 5 now supports IA64 processor
13053 lt_prog_compiler_static='-Bstatic'
13054 fi
13055 lt_prog_compiler_pic='-fPIC'
13056 ;;
13057
13058 amigaos*)
13059 case $target_cpu in
13060 powerpc)
13061 # see comment about AmigaOS4 .so support
13062 lt_prog_compiler_pic='-fPIC'
13063 ;;
13064 m68k)
13065 # FIXME: we need at least 68020 code to build shared libraries, but
13066 # adding the '-m68020' flag to GCC prevents building anything better,
13067 # like '-m68040'.
13068 lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
13069 ;;
13070 esac
13071 ;;
13072
13073 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
13074 # PIC is the default for these OSes.
13075 ;;
13076
13077 mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
13078 # This hack is so that the source file can tell whether it is being
13079 # built for inclusion in a dll (and should export symbols for example).
13080 # Although the cygwin gcc ignores -fPIC, still need this for old-style
13081 # (--disable-auto-import) libraries
13082 lt_prog_compiler_pic='-DDLL_EXPORT'
13083 case $target_os in
13084 os2*)
13085 lt_prog_compiler_static='$wl-static'
13086 ;;
13087 esac
13088 ;;
13089
13090 darwin* | rhapsody*)
13091 # PIC is the default on this platform
13092 # Common symbols not allowed in MH_DYLIB files
13093 lt_prog_compiler_pic='-fno-common'
13094 ;;
13095
13096 haiku*)
13097 # PIC is the default for Haiku.
13098 # The "-static" flag exists, but is broken.
13099 lt_prog_compiler_static=
13100 ;;
13101
13102 hpux*)
13103 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
13104 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
13105 # sets the default TLS model and affects inlining.
13106 case $target_cpu in
13107 hppa*64*)
13108 # +Z the default
13109 ;;
13110 *)
13111 lt_prog_compiler_pic='-fPIC'
13112 ;;
13113 esac
13114 ;;
13115
13116 interix[3-9]*)
13117 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
13118 # Instead, we relocate shared libraries at runtime.
13119 ;;
13120
13121 msdosdjgpp*)
13122 # Just because we use GCC doesn't mean we suddenly get shared libraries
13123 # on systems that don't support them.
13124 lt_prog_compiler_can_build_shared=no
13125 enable_shared=no
13126 ;;
13127
13128 *nto* | *qnx*)
13129 # QNX uses GNU C++, but need to define -shared option too, otherwise
13130 # it will coredump.
13131 lt_prog_compiler_pic='-fPIC -shared'
13132 ;;
13133
13134 sysv4*MP*)
13135 if test -d /usr/nec; then
13136 lt_prog_compiler_pic=-Kconform_pic
13137 fi
13138 ;;
13139
13140 *)
13141 lt_prog_compiler_pic='-fPIC'
13142 ;;
13143 esac
13144
13145 case $cc_basename in
13146 nvcc*) # Cuda Compiler Driver 2.2
13147 lt_prog_compiler_wl='-Xlinker '
13148 if test -n "$lt_prog_compiler_pic"; then
13149 lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic"
13150 fi
13151 ;;
13152 esac
13153 else
13154 # PORTME Check for flag to pass linker flags through the system compiler.
13155 case $target_os in
13156 aix*)
13157 lt_prog_compiler_wl='-Wl,'
13158 if test ia64 = "$target_cpu"; then
13159 # AIX 5 now supports IA64 processor
13160 lt_prog_compiler_static='-Bstatic'
13161 else
13162 lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
13163 fi
13164 ;;
13165
13166 darwin* | rhapsody*)
13167 # PIC is the default on this platform
13168 # Common symbols not allowed in MH_DYLIB files
13169 lt_prog_compiler_pic='-fno-common'
13170 case $cc_basename in
13171 nagfor*)
13172 # NAG Fortran compiler
13173 lt_prog_compiler_wl='-Wl,-Wl,,'
13174 lt_prog_compiler_pic='-PIC'
13175 lt_prog_compiler_static='-Bstatic'
13176 ;;
13177 esac
13178 ;;
13179
13180 mingw* | windows* | cygwin* | pw32* | os2* | cegcc*)
13181 # This hack is so that the source file can tell whether it is being
13182 # built for inclusion in a dll (and should export symbols for example).
13183 lt_prog_compiler_pic='-DDLL_EXPORT'
13184 case $target_os in
13185 os2*)
13186 lt_prog_compiler_static='$wl-static'
13187 ;;
13188 esac
13189 ;;
13190
13191 hpux9* | hpux10* | hpux11*)
13192 lt_prog_compiler_wl='-Wl,'
13193 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
13194 # not for PA HP-UX.
13195 case $target_cpu in
13196 hppa*64*|ia64*)
13197 # +Z the default
13198 ;;
13199 *)
13200 lt_prog_compiler_pic='+Z'
13201 ;;
13202 esac
13203 # Is there a better lt_prog_compiler_static that works with the bundled CC?
13204 lt_prog_compiler_static='$wl-a ${wl}archive'
13205 ;;
13206
13207 irix5* | irix6* | nonstopux*)
13208 lt_prog_compiler_wl='-Wl,'
13209 # PIC (with -KPIC) is the default.
13210 lt_prog_compiler_static='-non_shared'
13211 ;;
13212
13213 linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
13214 case $cc_basename in
13215 # old Intel for x86_64, which still supported -KPIC.
13216 ecc*)
13217 lt_prog_compiler_wl='-Wl,'
13218 lt_prog_compiler_pic='-KPIC'
13219 lt_prog_compiler_static='-static'
13220 ;;
13221 *flang* | ftn | f18* | f95*)
13222 # Flang compiler.
13223 lt_prog_compiler_wl='-Wl,'
13224 lt_prog_compiler_pic='-fPIC'
13225 lt_prog_compiler_static='-static'
13226 ;;
13227 # icc used to be incompatible with GCC.
13228 # ICC 10 doesn't accept -KPIC any more.
13229 icc* | ifort*)
13230 lt_prog_compiler_wl='-Wl,'
13231 lt_prog_compiler_pic='-fPIC'
13232 lt_prog_compiler_static='-static'
13233 ;;
13234 # Lahey Fortran 8.1.
13235 lf95*)
13236 lt_prog_compiler_wl='-Wl,'
13237 lt_prog_compiler_pic='--shared'
13238 lt_prog_compiler_static='--static'
13239 ;;
13240 nagfor*)
13241 # NAG Fortran compiler
13242 lt_prog_compiler_wl='-Wl,-Wl,,'
13243 lt_prog_compiler_pic='-PIC'
13244 lt_prog_compiler_static='-Bstatic'
13245 ;;
13246 tcc*)
13247 # Fabrice Bellard et al's Tiny C Compiler
13248 lt_prog_compiler_wl='-Wl,'
13249 lt_prog_compiler_pic='-fPIC'
13250 lt_prog_compiler_static='-static'
13251 ;;
13252 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
13253 # Portland Group compilers (*not* the Pentium gcc compiler,
13254 # which looks to be a dead project)
13255 lt_prog_compiler_wl='-Wl,'
13256 lt_prog_compiler_pic='-fpic'
13257 lt_prog_compiler_static='-Bstatic'
13258 ;;
13259 ccc*)
13260 lt_prog_compiler_wl='-Wl,'
13261 # All Alpha code is PIC.
13262 lt_prog_compiler_static='-non_shared'
13263 ;;
13264 xl* | bgxl* | bgf* | mpixl*)
13265 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
13266 lt_prog_compiler_wl='-Wl,'
13267 lt_prog_compiler_pic='-qpic'
13268 lt_prog_compiler_static='-qstaticlink'
13269 ;;
13270 *)
13271 case `$CC -V 2>&1 | $SED 5q` in
13272 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*)
13273 # Sun Fortran 8.3 passes all unrecognized flags to the linker
13274 lt_prog_compiler_pic='-KPIC'
13275 lt_prog_compiler_static='-Bstatic'
13276 lt_prog_compiler_wl=''
13277 ;;
13278 *Sun\ F* | *Sun*Fortran*)
13279 lt_prog_compiler_pic='-KPIC'
13280 lt_prog_compiler_static='-Bstatic'
13281 lt_prog_compiler_wl='-Qoption ld '
13282 ;;
13283 *Sun\ C*)
13284 # Sun C 5.9
13285 lt_prog_compiler_pic='-KPIC'
13286 lt_prog_compiler_static='-Bstatic'
13287 lt_prog_compiler_wl='-Wl,'
13288 ;;
13289 *Intel*\ [CF]*Compiler*)
13290 lt_prog_compiler_wl='-Wl,'
13291 lt_prog_compiler_pic='-fPIC'
13292 lt_prog_compiler_static='-static'
13293 ;;
13294 *Portland\ Group*)
13295 lt_prog_compiler_wl='-Wl,'
13296 lt_prog_compiler_pic='-fpic'
13297 lt_prog_compiler_static='-Bstatic'
13298 ;;
13299 esac
13300 ;;
13301 esac
13302 ;;
13303
13304 newsos6)
13305 lt_prog_compiler_pic='-KPIC'
13306 lt_prog_compiler_static='-Bstatic'
13307 ;;
13308
13309 *-mlibc)
13310 lt_prog_compiler_wl='-Wl,'
13311 lt_prog_compiler_pic='-fPIC'
13312 lt_prog_compiler_static='-static'
13313 ;;
13314
13315 *nto* | *qnx*)
13316 # QNX uses GNU C++, but need to define -shared option too, otherwise
13317 # it will coredump.
13318 lt_prog_compiler_pic='-fPIC -shared'
13319 ;;
13320
13321 osf3* | osf4* | osf5*)
13322 lt_prog_compiler_wl='-Wl,'
13323 # All OSF/1 code is PIC.
13324 lt_prog_compiler_static='-non_shared'
13325 ;;
13326
13327 rdos*)
13328 lt_prog_compiler_static='-non_shared'
13329 ;;
13330
13331 serenity*)
13332 ;;
13333
13334 solaris*)
13335 lt_prog_compiler_pic='-KPIC'
13336 lt_prog_compiler_static='-Bstatic'
13337 case $cc_basename in
13338 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
13339 lt_prog_compiler_wl='-Qoption ld ';;
13340 *)
13341 lt_prog_compiler_wl='-Wl,';;
13342 esac
13343 ;;
13344
13345 sunos4*)
13346 lt_prog_compiler_wl='-Qoption ld '
13347 lt_prog_compiler_pic='-PIC'
13348 lt_prog_compiler_static='-Bstatic'
13349 ;;
13350
13351 sysv4 | sysv4.2uw2* | sysv4.3*)
13352 lt_prog_compiler_wl='-Wl,'
13353 lt_prog_compiler_pic='-KPIC'
13354 lt_prog_compiler_static='-Bstatic'
13355 ;;
13356
13357 sysv4*MP*)
13358 if test -d /usr/nec; then
13359 lt_prog_compiler_pic='-Kconform_pic'
13360 lt_prog_compiler_static='-Bstatic'
13361 fi
13362 ;;
13363
13364 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
13365 lt_prog_compiler_wl='-Wl,'
13366 lt_prog_compiler_pic='-KPIC'
13367 lt_prog_compiler_static='-Bstatic'
13368 ;;
13369
13370 unicos*)
13371 lt_prog_compiler_wl='-Wl,'
13372 lt_prog_compiler_can_build_shared=no
13373 ;;
13374
13375 uts4*)
13376 lt_prog_compiler_pic='-pic'
13377 lt_prog_compiler_static='-Bstatic'
13378 ;;
13379
13380 *)
13381 lt_prog_compiler_can_build_shared=no
13382 ;;
13383 esac
13384 fi
13385
13386 case $target_os in
13387 # For platforms that do not support PIC, -DPIC is meaningless:
13388 *djgpp*)
13389 lt_prog_compiler_pic=
13390 ;;
13391 *)
13392 lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
13393 ;;
13394 esac
13395
13396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
13397 printf %s "checking for $compiler option to produce PIC... " >&6; }
13398 if test ${lt_cv_prog_compiler_pic+y}
13399 then :
13400 printf %s "(cached) " >&6
13401 else $as_nop
13402 lt_cv_prog_compiler_pic=$lt_prog_compiler_pic
13403 fi
13404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5
13405 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; }
13406 lt_prog_compiler_pic=$lt_cv_prog_compiler_pic
13407
13408 #
13409 # Check to make sure the PIC flag actually works.
13410 #
13411 if test -n "$lt_prog_compiler_pic"; then
13412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
13413 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
13414 if test ${lt_cv_prog_compiler_pic_works+y}
13415 then :
13416 printf %s "(cached) " >&6
13417 else $as_nop
13418 lt_cv_prog_compiler_pic_works=no
13419 ac_outfile=conftest.$ac_objext
13420 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
13421 lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
13422 # Insert the option either (1) after the last *FLAGS variable, or
13423 # (2) before a word containing "conftest.", or (3) at the end.
13424 # Note that $ac_compile itself does not contain backslashes and begins
13425 # with a dollar sign (not a hyphen), so the echo should work correctly.
13426 # The option is referenced via a variable to avoid confusing sed.
13427 lt_compile=`echo "$ac_compile" | $SED \
13428 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
13429 -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
13430 -e 's:$: $lt_compiler_flag:'`
13431 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5)
13432 (eval "$lt_compile" 2>conftest.err)
13433 ac_status=$?
13434 cat conftest.err >&5
13435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13436 if (exit $ac_status) && test -s "$ac_outfile"; then
13437 # The compiler can only warn and ignore the option if not recognized
13438 # So say no if there are warnings other than the usual output.
13439 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
13440 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13441 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
13442 lt_cv_prog_compiler_pic_works=yes
13443 fi
13444 fi
13445 $RM conftest*
13446
13447 fi
13448 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
13449 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; }
13450
13451 if test yes = "$lt_cv_prog_compiler_pic_works"; then
13452 case $lt_prog_compiler_pic in
13453 "" | " "*) ;;
13454 *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
13455 esac
13456 else
13457 lt_prog_compiler_pic=
13458 lt_prog_compiler_can_build_shared=no
13459 fi
13460
13461 fi
13462
13463
13464
13465
13466
13467 #
13468 # Check to make sure the static flag actually works.
13469 #
13470 wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
13471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
13472 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
13473 if test ${lt_cv_prog_compiler_static_works+y}
13474 then :
13475 printf %s "(cached) " >&6
13476 else $as_nop
13477 lt_cv_prog_compiler_static_works=no
13478 save_LDFLAGS=$LDFLAGS
13479 LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
13480 echo "$lt_simple_link_test_code" > conftest.$ac_ext
13481 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
13482 # The linker can only warn and ignore the option if not recognized
13483 # So say no if there are warnings
13484 if test -s conftest.err; then
13485 # Append any errors to the config.log.
13486 cat conftest.err 1>&5
13487 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
13488 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
13489 if diff conftest.exp conftest.er2 >/dev/null; then
13490 lt_cv_prog_compiler_static_works=yes
13491 fi
13492 else
13493 lt_cv_prog_compiler_static_works=yes
13494 fi
13495 fi
13496 $RM -r conftest*
13497 LDFLAGS=$save_LDFLAGS
13498
13499 fi
13500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
13501 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; }
13502
13503 if test yes = "$lt_cv_prog_compiler_static_works"; then
13504 :
13505 else
13506 lt_prog_compiler_static=
13507 fi
13508
13509
13510
13511 ='-fPIC'
13512 archive_cmds='$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib'
13513 archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -sSIDE_MODULE=2 -shared $libobjs $deplibs $compiler_flags -o $lib -s EXPORTED_FUNCTIONS=@$output_objdir/$soname.expsym'
13514 archive_cmds_need_lc=no
13515 no_undefined_flag=
13516 ;;
13517
13518 *)
13519 dynamic_linker=no
13520 ;;
13521 esac
13522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
13523 printf "%s\n" "$dynamic_linker" >&6; }
13524 test no = "$dynamic_linker" && can_build_shared=no
13525
13526 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
13527 if test yes = "$GCC"; then
13528 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
13529 fi
13530
13531 if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
13532 sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
13533 fi
13534
13535 if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
13536 sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
13537 fi
13538
13539 # remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
13540 configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
13541
13542 # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
13543 func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
13544
13545 # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
13546 configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
13645 printf %s "checking how to hardcode library paths into programs... " >&6; }
13646 hardcode_action=
13647 if test -n "$hardcode_libdir_flag_spec" ||
13648 test -n "$runpath_var" ||
13649 test yes = "$hardcode_automatic"; then
13650
13651 # We can hardcode non-existent directories.
13652 if test no != "$hardcode_direct" &&
13653 # If the only mechanism to avoid hardcoding is shlibpath_var, we
13654 # have to relink, otherwise we might link with an installed library
13655 # when we should be linking with a yet-to-be-installed one
13656 ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
13657 test no != "$hardcode_minus_L"; then
13658 # Linking always hardcodes the temporary library directory.
13659 hardcode_action=relink
13660 else
13661 # We can link without hardcoding, and we can hardcode nonexisting dirs.
13662 hardcode_action=immediate
13663 fi
13664 else
13665 # We cannot hardcode anything, or else we can only hardcode existing
13666 # directories.
13667 hardcode_action=unsupported
13668 fi
13669 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
13670 printf "%s\n" "$hardcode_action" >&6; }
13671
13672 if test relink = "$hardcode_action" ||
13673 test yes = "$inherit_rpath"; then
13674 # Fast installation is not supported
13675 enable_fast_install=no
13676 elif test yes = "$shlibpath_overrides_runpath" ||
13677 test no = "$enable_shared"; then
13678 # Fast installation is not necessary
13679 enable_fast_install=needless
13680 fi
13681
13682
13683
13684
13685
13686
13687 if test yes != "$enable_dlopen"; then
13688 enable_dlopen=unknown
13689 enable_dlopen_self=unknown
13690 enable_dlopen_self_static=unknown
13691 else
13692 lt_cv_dlopen=no
13693 lt_cv_dlopen_libs=
13694
13695 case $target_os in
13696 beos*)
13697 lt_cv_dlopen=load_add_on
13698 lt_cv_dlopen_libs=
13699 lt_cv_dlopen_self=yes
13700 ;;
13701
13702 mingw* | windows* | pw32* | cegcc*)
13703 lt_cv_dlopen=LoadLibrary
13704 lt_cv_dlopen_libs=
13705 ;;
13706
13707 cygwin*)
13708 lt_cv_dlopen=dlopen
13709 lt_cv_dlopen_libs=
13710 ;;
13711
13712 darwin*)
13713 # if libdl is installed we need to link against it
13714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13715 printf %s "checking for dlopen in -ldl... " >&6; }
13716 if test ${ac_cv_lib_dl_dlopen+y}
13717 then :
13718 printf %s "(cached) " >&6
13719 else $as_nop
13720 ac_check_lib_save_LIBS=$LIBS
13721 LIBS="-ldl $LIBS"
13722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13723 /* end confdefs.h. */
13724
13725 /* Override any GCC internal prototype to avoid an error.
13726 Use char because int might match the return type of a GCC
13727 builtin and then its argument prototype would still apply. */
13728 char dlopen ();
13729 int
13730 main (void)
13731 {
13732 return dlopen ();
13733 ;
13734 return 0;
13735 }
13736 _ACEOF
13737 if ac_fn_c_try_link "$LINENO"
13738 then :
13739 ac_cv_lib_dl_dlopen=yes
13740 else $as_nop
13741 ac_cv_lib_dl_dlopen=no
13742 fi
13743 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13744 conftest$ac_exeext conftest.$ac_ext
13745 LIBS=$ac_check_lib_save_LIBS
13746 fi
13747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13748 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
13749 if test "x$ac_cv_lib_dl_dlopen" = xyes
13750 then :
13751 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13752 else $as_nop
13753
13754 lt_cv_dlopen=dyld
13755 lt_cv_dlopen_libs=
13756 lt_cv_dlopen_self=yes
13757
13758 fi
13759
13760 ;;
13761
13762 tpf*)
13763 # Don't try to run any link tests for TPF. We know it's impossible
13764 # because TPF is a cross-compiler, and we know how we open DSOs.
13765 lt_cv_dlopen=dlopen
13766 lt_cv_dlopen_libs=
13767 lt_cv_dlopen_self=no
13768 ;;
13769
13770 *)
13771 ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
13772 if test "x$ac_cv_func_shl_load" = xyes
13773 then :
13774 lt_cv_dlopen=shl_load
13775 else $as_nop
13776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
13777 printf %s "checking for shl_load in -ldld... " >&6; }
13778 if test ${ac_cv_lib_dld_shl_load+y}
13779 then :
13780 printf %s "(cached) " >&6
13781 else $as_nop
13782 ac_check_lib_save_LIBS=$LIBS
13783 LIBS="-ldld $LIBS"
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h. */
13786
13787 /* Override any GCC internal prototype to avoid an error.
13788 Use char because int might match the return type of a GCC
13789 builtin and then its argument prototype would still apply. */
13790 char shl_load ();
13791 int
13792 main (void)
13793 {
13794 return shl_load ();
13795 ;
13796 return 0;
13797 }
13798 _ACEOF
13799 if ac_fn_c_try_link "$LINENO"
13800 then :
13801 ac_cv_lib_dld_shl_load=yes
13802 else $as_nop
13803 ac_cv_lib_dld_shl_load=no
13804 fi
13805 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13806 conftest$ac_exeext conftest.$ac_ext
13807 LIBS=$ac_check_lib_save_LIBS
13808 fi
13809 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
13810 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; }
13811 if test "x$ac_cv_lib_dld_shl_load" = xyes
13812 then :
13813 lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
13814 else $as_nop
13815 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
13816 if test "x$ac_cv_func_dlopen" = xyes
13817 then :
13818 lt_cv_dlopen=dlopen
13819 else $as_nop
13820 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13821 printf %s "checking for dlopen in -ldl... " >&6; }
13822 if test ${ac_cv_lib_dl_dlopen+y}
13823 then :
13824 printf %s "(cached) " >&6
13825 else $as_nop
13826 ac_check_lib_save_LIBS=$LIBS
13827 LIBS="-ldl $LIBS"
13828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13829 /* end confdefs.h. */
13830
13831 /* Override any GCC internal prototype to avoid an error.
13832 Use char because int might match the return type of a GCC
13833 builtin and then its argument prototype would still apply. */
13834 char dlopen ();
13835 int
13836 main (void)
13837 {
13838 return dlopen ();
13839 ;
13840 return 0;
13841 }
13842 _ACEOF
13843 if ac_fn_c_try_link "$LINENO"
13844 then :
13845 ac_cv_lib_dl_dlopen=yes
13846 else $as_nop
13847 ac_cv_lib_dl_dlopen=no
13848 fi
13849 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13850 conftest$ac_exeext conftest.$ac_ext
13851 LIBS=$ac_check_lib_save_LIBS
13852 fi
13853 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13854 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
13855 if test "x$ac_cv_lib_dl_dlopen" = xyes
13856 then :
13857 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
13858 else $as_nop
13859 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
13860 printf %s "checking for dlopen in -lsvld... " >&6; }
13861 if test ${ac_cv_lib_svld_dlopen+y}
13862 then :
13863 printf %s "(cached) " >&6
13864 else $as_nop
13865 ac_check_lib_save_LIBS=$LIBS
13866 LIBS="-lsvld $LIBS"
13867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13868 /* end confdefs.h. */
13869
13870 /* Override any GCC internal prototype to avoid an error.
13871 Use char because int might match the return type of a GCC
13872 builtin and then its argument prototype would still apply. */
13873 char dlopen ();
13874 int
13875 main (void)
13876 {
13877 return dlopen ();
13878 ;
13879 return 0;
13880 }
13881 _ACEOF
13882 if ac_fn_c_try_link "$LINENO"
13883 then :
13884 ac_cv_lib_svld_dlopen=yes
13885 else $as_nop
13886 ac_cv_lib_svld_dlopen=no
13887 fi
13888 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13889 conftest$ac_exeext conftest.$ac_ext
13890 LIBS=$ac_check_lib_save_LIBS
13891 fi
13892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
13893 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; }
13894 if test "x$ac_cv_lib_svld_dlopen" = xyes
13895 then :
13896 lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
13897 else $as_nop
13898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
13899 printf %s "checking for dld_link in -ldld... " >&6; }
13900 if test ${ac_cv_lib_dld_dld_link+y}
13901 then :
13902 printf %s "(cached) " >&6
13903 else $as_nop
13904 ac_check_lib_save_LIBS=$LIBS
13905 LIBS="-ldld $LIBS"
13906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13907 /* end confdefs.h. */
13908
13909 /* Override any GCC internal prototype to avoid an error.
13910 Use char because int might match the return type of a GCC
13911 builtin and then its argument prototype would still apply. */
13912 char dld_link ();
13913 int
13914 main (void)
13915 {
13916 return dld_link ();
13917 ;
13918 return 0;
13919 }
13920 _ACEOF
13921 if ac_fn_c_try_link "$LINENO"
13922 then :
13923 ac_cv_lib_dld_dld_link=yes
13924 else $as_nop
13925 ac_cv_lib_dld_dld_link=no
13926 fi
13927 rm -f core conftest.err conftest.$ac_objext conftest.beam \
13928 conftest$ac_exeext conftest.$ac_ext
13929 LIBS=$ac_check_lib_save_LIBS
13930 fi
13931 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
13932 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; }
13933 if test "x$ac_cv_lib_dld_dld_link" = xyes
13934 then :
13935 lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
13936 fi
13937
13938
13939 fi
13940
13941
13942 fi
13943
13944
13945 fi
13946
13947
13948 fi
13949
13950
13951 fi
13952
13953 ;;
13954 esac
13955
13956 if test no = "$lt_cv_dlopen"; then
13957 enable_dlopen=no
13958 else
13959 enable_dlopen=yes
13960 fi
13961
13962 case $lt_cv_dlopen in
13963 dlopen)
13964 save_CPPFLAGS=$CPPFLAGS
13965 test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
13966
13967 save_LDFLAGS=$LDFLAGS
13968 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
13969
13970 save_LIBS=$LIBS
13971 LIBS="$lt_cv_dlopen_libs $LIBS"
13972
13973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
13974 printf %s "checking whether a program can dlopen itself... " >&6; }
13975 if test ${lt_cv_dlopen_self+y}
13976 then :
13977 printf %s "(cached) " >&6
13978 else $as_nop
13979 if test yes = "$cross_compiling"; then :
13980 lt_cv_dlopen_self=cross
13981 else
13982 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
13983 lt_status=$lt_dlunknown
13984 cat > conftest.$ac_ext <<_LT_EOF
13985 #line $LINENO "configure"
13986 #include "confdefs.h"
13987
13988 #if HAVE_DLFCN_H
13989 #include <dlfcn.h>
13990 #endif
13991
13992 #include <stdio.h>
13993
13994 #ifdef RTLD_GLOBAL
13995 # define LT_DLGLOBAL RTLD_GLOBAL
13996 #else
13997 # ifdef DL_GLOBAL
13998 # define LT_DLGLOBAL DL_GLOBAL
13999 # else
14000 # define LT_DLGLOBAL 0
14001 # endif
14002 #endif
14003
14004 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14005 find out it does not work in some platform. */
14006 #ifndef LT_DLLAZY_OR_NOW
14007 # ifdef RTLD_LAZY
14008 # define LT_DLLAZY_OR_NOW RTLD_LAZY
14009 # else
14010 # ifdef DL_LAZY
14011 # define LT_DLLAZY_OR_NOW DL_LAZY
14012 # else
14013 # ifdef RTLD_NOW
14014 # define LT_DLLAZY_OR_NOW RTLD_NOW
14015 # else
14016 # ifdef DL_NOW
14017 # define LT_DLLAZY_OR_NOW DL_NOW
14018 # else
14019 # define LT_DLLAZY_OR_NOW 0
14020 # endif
14021 # endif
14022 # endif
14023 # endif
14024 #endif
14025
14026 /* When -fvisibility=hidden is used, assume the code has been annotated
14027 correspondingly for the symbols needed. */
14028 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14029 int fnord (void) __attribute__((visibility("default")));
14030 #endif
14031
14032 int fnord (void) { return 42; }
14033 int main (void)
14034 {
14035 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14036 int status = $lt_dlunknown;
14037
14038 if (self)
14039 {
14040 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
14041 else
14042 {
14043 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
14044 else puts (dlerror ());
14045 }
14046 /* dlclose (self); */
14047 }
14048 else
14049 puts (dlerror ());
14050
14051 return status;
14052 }
14053 _LT_EOF
14054 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14055 (eval $ac_link) 2>&5
14056 ac_status=$?
14057 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14058 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14059 (./conftest; exit; ) >&5 2>/dev/null
14060 lt_status=$?
14061 case x$lt_status in
14062 x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
14063 x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
14064 x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
14065 esac
14066 else :
14067 # compilation failed
14068 lt_cv_dlopen_self=no
14069 fi
14070 fi
14071 rm -fr conftest*
14072
14073
14074 fi
14075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
14076 printf "%s\n" "$lt_cv_dlopen_self" >&6; }
14077
14078 if test yes = "$lt_cv_dlopen_self"; then
14079 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
14080 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
14081 printf %s "checking whether a statically linked program can dlopen itself... " >&6; }
14082 if test ${lt_cv_dlopen_self_static+y}
14083 then :
14084 printf %s "(cached) " >&6
14085 else $as_nop
14086 if test yes = "$cross_compiling"; then :
14087 lt_cv_dlopen_self_static=cross
14088 else
14089 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
14090 lt_status=$lt_dlunknown
14091 cat > conftest.$ac_ext <<_LT_EOF
14092 #line $LINENO "configure"
14093 #include "confdefs.h"
14094
14095 #if HAVE_DLFCN_H
14096 #include <dlfcn.h>
14097 #endif
14098
14099 #include <stdio.h>
14100
14101 #ifdef RTLD_GLOBAL
14102 # define LT_DLGLOBAL RTLD_GLOBAL
14103 #else
14104 # ifdef DL_GLOBAL
14105 # define LT_DLGLOBAL DL_GLOBAL
14106 # else
14107 # define LT_DLGLOBAL 0
14108 # endif
14109 #endif
14110
14111 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
14112 find out it does not work in some platform. */
14113 #ifndef LT_DLLAZY_OR_NOW
14114 # ifdef RTLD_LAZY
14115 # define LT_DLLAZY_OR_NOW RTLD_LAZY
14116 # else
14117 # ifdef DL_LAZY
14118 # define LT_DLLAZY_OR_NOW DL_LAZY
14119 # else
14120 # ifdef RTLD_NOW
14121 # define LT_DLLAZY_OR_NOW RTLD_NOW
14122 # else
14123 # ifdef DL_NOW
14124 # define LT_DLLAZY_OR_NOW DL_NOW
14125 # else
14126 # define LT_DLLAZY_OR_NOW 0
14127 # endif
14128 # endif
14129 # endif
14130 # endif
14131 #endif
14132
14133 /* When -fvisibility=hidden is used, assume the code has been annotated
14134 correspondingly for the symbols needed. */
14135 #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
14136 int fnord (void) __attribute__((visibility("default")));
14137 #endif
14138
14139 int fnord (void) { return 42; }
14140 int main (void)
14141 {
14142 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
14143 int status = $lt_dlunknown;
14144
14145 if (self)
14146 {
14147 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
14148 else
14149 {
14150 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
14151 else puts (dlerror ());
14152 }
14153 /* dlclose (self); */
14154 }
14155 else
14156 puts (dlerror ());
14157
14158 return status;
14159 }
14160 _LT_EOF
14161 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14162 (eval $ac_link) 2>&5
14163 ac_status=$?
14164 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14165 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
14166 (./conftest; exit; ) >&5 2>/dev/null
14167 lt_status=$?
14168 case x$lt_status in
14169 x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
14170 x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
14171 x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
14172 esac
14173 else :
14174 # compilation failed
14175 lt_cv_dlopen_self_static=no
14176 fi
14177 fi
14178 rm -fr conftest*
14179
14180
14181 fi
14182 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
14183 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; }
14184 fi
14185
14186 CPPFLAGS=$save_CPPFLAGS
14187 LDFLAGS=$save_LDFLAGS
14188 LIBS=$save_LIBS
14189 ;;
14190 esac
14191
14192 case $lt_cv_dlopen_self in
14193 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
14194 *) enable_dlopen_self=unknown ;;
14195 esac
14196
14197 case $lt_cv_dlopen_self_static in
14198 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
14199 *) enable_dlopen_self_static=unknown ;;
14200 esac
14201 fi
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219 striplib=
14220 old_striplib=
14221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
14222 printf %s "checking whether stripping libraries is possible... " >&6; }
14223 if test -z "$STRIP"; then
14224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14225 printf "%s\n" "no" >&6; }
14226 else
14227 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
14228 old_striplib="$STRIP --strip-debug"
14229 striplib="$STRIP --strip-unneeded"
14230 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14231 printf "%s\n" "yes" >&6; }
14232 else
14233 case $target_os in
14234 darwin*)
14235 # FIXME - insert some real tests, host_os isn't really good enough
14236 striplib="$STRIP -x"
14237 old_striplib="$STRIP -S"
14238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14239 printf "%s\n" "yes" >&6; }
14240 ;;
14241 freebsd*)
14242 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
14243 old_striplib="$STRIP --strip-debug"
14244 striplib="$STRIP --strip-unneeded"
14245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14246 printf "%s\n" "yes" >&6; }
14247 else
14248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14249 printf "%s\n" "no" >&6; }
14250 fi
14251 ;;
14252 *)
14253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14254 printf "%s\n" "no" >&6; }
14255 ;;
14256 esac
14257 fi
14258 fi
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271 # Report what library types will actually be built
14272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
14273 printf %s "checking if libtool supports shared libraries... " >&6; }
14274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
14275 printf "%s\n" "$can_build_shared" >&6; }
14276
14277 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
14278 printf %s "checking whether to build shared libraries... " >&6; }
14279 test no = "$can_build_shared" && enable_shared=no
14280
14281 # On AIX, shared libraries and static libraries use the same namespace, and
14282 # are all built from PIC.
14283 case $target_os in
14284 aix3*)
14285 test yes = "$enable_shared" && enable_static=no
14286 if test -n "$RANLIB"; then
14287 archive_cmds="$archive_cmds~\$RANLIB \$lib"
14288 postinstall_cmds='$RANLIB $lib'
14289 fi
14290 ;;
14291
14292 aix[4-9]*)
14293 if test ia64 != "$target_cpu"; then
14294 case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
14295 yes,aix,yes) ;; # shared object as lib.so file only
14296 yes,svr4,*) ;; # shared object as lib.so archive member only
14297 yes,*) enable_static=no ;; # shared object in lib.a archive as well
14298 esac
14299 fi
14300 ;;
14301 esac
14302 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
14303 printf "%s\n" "$enable_shared" >&6; }
14304
14305 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
14306 printf %s "checking whether to build static libraries... " >&6; }
14307 # Make sure either enable_shared or enable_static is yes.
14308 test yes = "$enable_shared" || enable_static=yes
14309 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
14310 printf "%s\n" "$enable_static" >&6; }
14311
14312
14313
14314
14315 fi
14316 ac_ext=c
14317 ac_cpp='$CPP $CPPFLAGS'
14318 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14319 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14320 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14321
14322 CC=$lt_save_CC
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338 ac_config_commands="$ac_config_commands libtool"
14339
14340
14341
14342
14343 # Only expand once:
14344
14345
14346 CFLAGS="$saved_CFLAGS"
14347 target_os=$old_host_os
14348
14349 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC generates a .note.GNU-stack section" >&5
14350 printf %s "checking if $CC generates a .note.GNU-stack section... " >&6; }
14351 if test ${ocaml_cv_prog_cc_nonexecstack_note+y}
14352 then :
14353 printf %s "(cached) " >&6
14354 else $as_nop
14355
14356 saved_CC="$CC"
14357 saved_CFLAGS="$CFLAGS"
14358 saved_CPPFLAGS="$CPPFLAGS"
14359 saved_LIBS="$LIBS"
14360 saved_ac_ext="$ac_ext"
14361 saved_ac_compile="$ac_compile"
14362 # Move the content of confdefs.h to another file so it does not
14363 # get included
14364 mv confdefs.h confdefs.h.bak
14365 touch confdefs.h
14366
14367
14368 # We write the assembly into the .$ac_objext file as AC_COMPILE_IFELSE
14369 # assumes an error if such a file doesn't exist after compiling
14370 CFLAGS="$CFLAGS -S -o conftest.$ac_objext"
14371
14372 ocaml_cv_prog_cc_nonexecstack_note=no
14373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14374 /* end confdefs.h. */
14375
14376 _ACEOF
14377 if ac_fn_c_try_compile "$LINENO"
14378 then :
14379 if $FGREP .note.GNU-stack conftest.$ac_objext >/dev/null
14380 then :
14381 ocaml_cv_prog_cc_nonexecstack_note=yes
14382 fi
14383 fi
14384 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14385
14386 # Restore the content of confdefs.h
14387 mv confdefs.h.bak confdefs.h
14388 ac_compile="$saved_ac_compile"
14389 ac_ext="$saved_ac_ext"
14390 CPPFLAGS="$saved_CPPFLAGS"
14391 CFLAGS="$saved_CFLAGS"
14392 CC="$saved_CC"
14393 LIBS="$saved_LIBS"
14394
14395 fi
14396 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_nonexecstack_note" >&5
14397 printf "%s\n" "$ocaml_cv_prog_cc_nonexecstack_note" >&6; }
14398
14399 if test "x$ocaml_cv_prog_cc_nonexecstack_note" = xyes
14400 then :
14401 with_nonexecstack_note=true
14402 printf "%s\n" "#define WITH_NONEXECSTACK_NOTE 1" >>confdefs.h
14403
14404 else $as_nop
14405 with_nonexecstack_note=false
14406 fi
14407
14408 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC generates .size and .type asm directives" >&5
14409 printf %s "checking if $CC generates .size and .type asm directives... " >&6; }
14410 if test ${ocaml_cv_prog_cc_asm_size_type_directives+y}
14411 then :
14412 printf %s "(cached) " >&6
14413 else $as_nop
14414
14415 saved_CC="$CC"
14416 saved_CFLAGS="$CFLAGS"
14417 saved_CPPFLAGS="$CPPFLAGS"
14418 saved_LIBS="$LIBS"
14419 saved_ac_ext="$ac_ext"
14420 saved_ac_compile="$ac_compile"
14421 # Move the content of confdefs.h to another file so it does not
14422 # get included
14423 mv confdefs.h confdefs.h.bak
14424 touch confdefs.h
14425
14426
14427 # We write the assembly into the .$ac_objext file as AC_COMPILE_IFELSE
14428 # assumes an error if such a file doesn't exist after compiling
14429 CFLAGS="$CFLAGS -S -o conftest.$ac_objext"
14430
14431 ocaml_cv_prog_cc_asm_size_type_directives=no
14432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14433 /* end confdefs.h. */
14434
14435 int feat_detect_obj;
14436 int feat_detect_func(void) {
14437 return 42;
14438 }
14439
14440 _ACEOF
14441 if ac_fn_c_try_compile "$LINENO"
14442 then :
14443 asm_type_obj_directive=no
14444 asm_type_func_directive=no
14445 asm_size_func_directive=no
14446 # We do not look for a .size directive for the object as it is not
14447 # generated in that simple case for instance by the compiler
14448 # powerpc64le-linux-gnu-gcc 14.2 which emits instead an .lcomm directive
14449 if $GREP '\.type.*feat_detect_obj' conftest.$ac_objext >/dev/null
14450 then :
14451 asm_type_obj_directive=yes
14452 fi
14453 if $GREP '\.type.*feat_detect_func' conftest.$ac_objext >/dev/null
14454 then :
14455 asm_type_func_directive=yes
14456 fi
14457 if $GREP '\.size.*feat_detect_func' conftest.$ac_objext >/dev/null
14458 then :
14459 asm_size_func_directive=yes
14460 fi
14461 case $asm_type_obj_directive,$asm_type_func_directive,$asm_size_func_directive in #(
14462 yes,yes,yes) :
14463 ocaml_cv_prog_cc_asm_size_type_directives=yes ;; #(
14464 no,no,no) :
14465 ocaml_cv_prog_cc_asm_size_type_directives=no ;; #(
14466 *) :
14467 ocaml_cv_prog_cc_asm_size_type_directives=unconclusive ;;
14468 esac
14469 fi
14470 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
14471
14472 # Restore the content of confdefs.h
14473 mv confdefs.h.bak confdefs.h
14474 ac_compile="$saved_ac_compile"
14475 ac_ext="$saved_ac_ext"
14476 CPPFLAGS="$saved_CPPFLAGS"
14477 CFLAGS="$saved_CFLAGS"
14478 CC="$saved_CC"
14479 LIBS="$saved_LIBS"
14480
14481 fi
14482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_asm_size_type_directives" >&5
14483 printf "%s\n" "$ocaml_cv_prog_cc_asm_size_type_directives" >&6; }
14484
14485 case $ocaml_cv_prog_cc_asm_size_type_directives in #(
14486 yes) :
14487 asm_size_type_directives=true
14488 printf "%s\n" "#define ASM_SIZE_TYPE_DIRECTIVES 1" >>confdefs.h
14489 ;; #(
14490 no) :
14491 asm_size_type_directives=false ;; #(
14492 *) :
14493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: found inconsistent results for .size and .type directives" >&5
14494 printf "%s\n" "$as_me: WARNING: found inconsistent results for .size and .type directives" >&2;}
14495 asm_size_type_directives=false ;;
14496 esac
14497
14498
14499 case $host in #(
14500 sparc-sun-solaris*) :
14501 DEP_CC="false" ;; #(
14502 *-pc-windows) :
14503 if test -n "$ac_tool_prefix"; then
14504 for ac_prog in $DEP_CC gcc cc x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc
14505 do
14506 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14507 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14509 printf %s "checking for $ac_word... " >&6; }
14510 if test ${ac_cv_prog_DEP_CC+y}
14511 then :
14512 printf %s "(cached) " >&6
14513 else $as_nop
14514 if test -n "$DEP_CC"; then
14515 ac_cv_prog_DEP_CC="$DEP_CC" # Let the user override the test.
14516 else
14517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14518 for as_dir in $PATH
14519 do
14520 IFS=$as_save_IFS
14521 case $as_dir in #(((
14522 '') as_dir=./ ;;
14523 */) ;;
14524 *) as_dir=$as_dir/ ;;
14525 esac
14526 for ac_exec_ext in '' $ac_executable_extensions; do
14527 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
14528 ac_cv_prog_DEP_CC="$ac_tool_prefix$ac_prog"
14529 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
14530 break 2
14531 fi
14532 done
14533 done
14534 IFS=$as_save_IFS
14535
14536 fi
14537 fi
14538 DEP_CC=$ac_cv_prog_DEP_CC
14539 if test -n "$DEP_CC"; then
14540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEP_CC" >&5
14541 printf "%s\n" "$DEP_CC" >&6; }
14542 else
14543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14544 printf "%s\n" "no" >&6; }
14545 fi
14546
14547
14548 test -n "$DEP_CC" && break
14549 done
14550 fi
14551 if test -z "$DEP_CC"; then
14552 ac_ct_DEP_CC=$DEP_CC
14553 for ac_prog in $DEP_CC gcc cc x86_64-w64-mingw32-gcc i686-w64-mingw32-gcc
14554 do
14555 # Extract the first word of "$ac_prog", so it can be a program name with args.
14556 set dummy $ac_prog; ac_word=$2
14557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14558 printf %s "checking for $ac_word... " >&6; }
14559 if test ${ac_cv_prog_ac_ct_DEP_CC+y}
14560 then :
14561 printf %s "(cached) " >&6
14562 else $as_nop
14563 if test -n "$ac_ct_DEP_CC"; then
14564 ac_cv_prog_ac_ct_DEP_CC="$ac_ct_DEP_CC" # Let the user override the test.
14565 else
14566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14567 for as_dir in $PATH
14568 do
14569 IFS=$as_save_IFS
14570 case $as_dir in #(((
14571 '') as_dir=./ ;;
14572 */) ;;
14573 *) as_dir=$as_dir/ ;;
14574 esac
14575 for ac_exec_ext in '' $ac_executable_extensions; do
14576 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
14577 ac_cv_prog_ac_ct_DEP_CC="$ac_prog"
14578 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
14579 break 2
14580 fi
14581 done
14582 done
14583 IFS=$as_save_IFS
14584
14585 fi
14586 fi
14587 ac_ct_DEP_CC=$ac_cv_prog_ac_ct_DEP_CC
14588 if test -n "$ac_ct_DEP_CC"; then
14589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DEP_CC" >&5
14590 printf "%s\n" "$ac_ct_DEP_CC" >&6; }
14591 else
14592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14593 printf "%s\n" "no" >&6; }
14594 fi
14595
14596
14597 test -n "$ac_ct_DEP_CC" && break
14598 done
14599
14600 if test "x$ac_ct_DEP_CC" = x; then
14601 DEP_CC="false"
14602 else
14603 case $cross_compiling:$ac_tool_warned in
14604 yes:)
14605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14606 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14607 ac_tool_warned=yes ;;
14608 esac
14609 DEP_CC=$ac_ct_DEP_CC
14610 fi
14611 fi
14612 ;; #(
14613 *) :
14614 DEP_CC="$CC" ;;
14615 esac
14616
14617 case $enable_dependency_generation in #(
14618 yes) :
14619 if test "$DEP_CC" = "false"
14620 then :
14621 as_fn_error $? "The MSVC ports cannot generate dependency information. Install gcc (or another CC-like compiler)" "$LINENO" 5
14622 else $as_nop
14623 compute_deps=true
14624 fi ;; #(
14625 no) :
14626 compute_deps=false ;; #(
14627 *) :
14628 if test -e .git
14629 then :
14630 if test "$DEP_CC" = "false"
14631 then :
14632 compute_deps=false
14633 else $as_nop
14634 compute_deps=true
14635 fi
14636 else $as_nop
14637 compute_deps=false
14638 fi ;;
14639 esac
14640
14641 case $target in #(
14642 # In config/Makefile.mingw*, we had:
14643 # TARGET=i686-w64-mingw32 and x86_64-w64-mingw32
14644 # TOOLPREF=$(TARGET)-
14645 # ARCMD=$(TOOLPREF)ar
14646 # However autoconf and libtool seem to use ar
14647 # So we let them do, at the moment
14648 *-pc-windows) :
14649
14650 mkexe_via_cc_extra_cmd=' && $(call MERGEMANIFESTEXE,$(1))'
14651 libext=lib
14652 AR=""
14653 if test "$target_cpu" = "x86_64"
14654 then :
14655 machine="-machine:AMD64 "
14656 else $as_nop
14657 machine=""
14658 fi
14659 mklib="link -lib -nologo $machine /out:\$(1) \$(2)"
14660 ;; #(
14661 *) :
14662
14663 mklib="rm -f \$(1) && ${AR} rc \$(1) \$(2)"
14664 ;;
14665 esac
14666
14667 ## Find vendor of the C compiler
14668 ac_ext=c
14669 ac_cpp='$CPP $CPPFLAGS'
14670 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14671 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14672 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14673 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
14674 printf %s "checking how to run the C preprocessor... " >&6; }
14675 # On Suns, sometimes $CPP names a directory.
14676 if test -n "$CPP" && test -d "$CPP"; then
14677 CPP=
14678 fi
14679 if test -z "$CPP"; then
14680 if test ${ac_cv_prog_CPP+y}
14681 then :
14682 printf %s "(cached) " >&6
14683 else $as_nop
14684 # Double quotes because $CC needs to be expanded
14685 for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp
14686 do
14687 ac_preproc_ok=false
14688 for ac_c_preproc_warn_flag in '' yes
14689 do
14690 # Use a header file that comes with gcc, so configuring glibc
14691 # with a fresh cross-compiler works.
14692 # On the NeXT, cc -E runs the code through the compiler's parser,
14693 # not just through cpp. "Syntax error" is here to catch this case.
14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14695 /* end confdefs.h. */
14696 #include <limits.h>
14697 Syntax error
14698 _ACEOF
14699 if ac_fn_c_try_cpp "$LINENO"
14700 then :
14701
14702 else $as_nop
14703 # Broken: fails on valid input.
14704 continue
14705 fi
14706 rm -f conftest.err conftest.i conftest.$ac_ext
14707
14708 # OK, works on sane cases. Now check whether nonexistent headers
14709 # can be detected and how.
14710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14711 /* end confdefs.h. */
14712 #include <ac_nonexistent.h>
14713 _ACEOF
14714 if ac_fn_c_try_cpp "$LINENO"
14715 then :
14716 # Broken: success on invalid input.
14717 continue
14718 else $as_nop
14719 # Passes both tests.
14720 ac_preproc_ok=:
14721 break
14722 fi
14723 rm -f conftest.err conftest.i conftest.$ac_ext
14724
14725 done
14726 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14727 rm -f conftest.i conftest.err conftest.$ac_ext
14728 if $ac_preproc_ok
14729 then :
14730 break
14731 fi
14732
14733 done
14734 ac_cv_prog_CPP=$CPP
14735
14736 fi
14737 CPP=$ac_cv_prog_CPP
14738 else
14739 ac_cv_prog_CPP=$CPP
14740 fi
14741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
14742 printf "%s\n" "$CPP" >&6; }
14743 ac_preproc_ok=false
14744 for ac_c_preproc_warn_flag in '' yes
14745 do
14746 # Use a header file that comes with gcc, so configuring glibc
14747 # with a fresh cross-compiler works.
14748 # On the NeXT, cc -E runs the code through the compiler's parser,
14749 # not just through cpp. "Syntax error" is here to catch this case.
14750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14751 /* end confdefs.h. */
14752 #include <limits.h>
14753 Syntax error
14754 _ACEOF
14755 if ac_fn_c_try_cpp "$LINENO"
14756 then :
14757
14758 else $as_nop
14759 # Broken: fails on valid input.
14760 continue
14761 fi
14762 rm -f conftest.err conftest.i conftest.$ac_ext
14763
14764 # OK, works on sane cases. Now check whether nonexistent headers
14765 # can be detected and how.
14766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14767 /* end confdefs.h. */
14768 #include <ac_nonexistent.h>
14769 _ACEOF
14770 if ac_fn_c_try_cpp "$LINENO"
14771 then :
14772 # Broken: success on invalid input.
14773 continue
14774 else $as_nop
14775 # Passes both tests.
14776 ac_preproc_ok=:
14777 break
14778 fi
14779 rm -f conftest.err conftest.i conftest.$ac_ext
14780
14781 done
14782 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
14783 rm -f conftest.i conftest.err conftest.$ac_ext
14784 if $ac_preproc_ok
14785 then :
14786
14787 else $as_nop
14788 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14789 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14790 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
14791 See \`config.log' for more details" "$LINENO" 5; }
14792 fi
14793
14794 ac_ext=c
14795 ac_cpp='$CPP $CPPFLAGS'
14796 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14797 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14798 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14799
14800
14801
14802
14803
14804 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking C compiler vendor" >&5
14805 printf %s "checking C compiler vendor... " >&6; }
14806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14807 /* end confdefs.h. */
14808
14809 #if defined(_MSC_VER)
14810 msvc _MSC_VER
14811 # if defined(__clang_major__) && defined(__clang_minor__)
14812 clang __clang_major__ __clang_minor__
14813 # endif
14814 #elif defined(__INTEL_COMPILER)
14815 icc __INTEL_COMPILER
14816 #elif defined(__MINGW32__)
14817 #include <_mingw_mac.h>
14818 mingw __MINGW64_VERSION_MAJOR __MINGW64_VERSION_MINOR
14819 # if defined(__clang_major__) && defined(__clang_minor__)
14820 clang __clang_major__ __clang_minor__
14821 # elif defined(__GNUC__) && defined(__GNUC_MINOR__)
14822 gcc __GNUC__ __GNUC_MINOR__
14823 # endif
14824 #elif defined(__clang_major__) && defined(__clang_minor__)
14825 clang __clang_major__ __clang_minor__
14826 #elif defined(__GNUC__) && defined(__GNUC_MINOR__)
14827 gcc __GNUC__ __GNUC_MINOR__
14828 #elif defined(__xlc__) && defined(__xlC__)
14829 xlc __xlC__ __xlC_ver__
14830 #elif defined(__SUNPRO_C)
14831 sunc __SUNPRO_C __SUNPRO_C
14832 #else
14833 unknown
14834 #endif
14835
14836 _ACEOF
14837 if ac_fn_c_try_cpp "$LINENO"
14838 then :
14839 if test ${ocaml_cv_cc_vendor2+y}
14840 then :
14841 printf %s "(cached) " >&6
14842 else $as_nop
14843 ocaml_cv_cc_vendor2=`sed -e '/^#/d' conftest.i | tr -s '[:space:]' '-' \
14844 | sed -e 's/^-//' -e 's/-$//'`
14845 fi
14846
14847 # Domain of values was changed in #12768, so the cache key became different
14848 # from the variable
14849 ocaml_cc_vendor="$ocaml_cv_cc_vendor2"
14850 else $as_nop
14851 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14852 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
14853 as_fn_error $? "unexpected preprocessor failure
14854 See \`config.log' for more details" "$LINENO" 5; }
14855 fi
14856 rm -f conftest.err conftest.i conftest.$ac_ext
14857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cc_vendor" >&5
14858 printf "%s\n" "$ocaml_cc_vendor" >&6; }
14859
14860
14861 ## In cross-compilation mode, can we run executables produced?
14862 # At the moment, it's required, but the fact is used in C99 function detection
14863
14864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether target executables can be run in the build" >&5
14865 printf %s "checking whether target executables can be run in the build... " >&6; }
14866 old_cross_compiling="$cross_compiling"
14867 cross_compiling='no'
14868 if test "$cross_compiling" = yes
14869 then :
14870 # autoconf displays a warning if this parameter is missing, but
14871 # cross-compilation mode was disabled above.
14872 assert=false
14873 else $as_nop
14874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14875 /* end confdefs.h. */
14876
14877 int
14878 main (void)
14879 {
14880
14881 ;
14882 return 0;
14883 }
14884 _ACEOF
14885 if ac_fn_c_try_run "$LINENO"
14886 then :
14887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14888 printf "%s\n" "yes" >&6; }
14889 target_runnable=true
14890 else $as_nop
14891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
14892 printf "%s\n" "no" >&6; }
14893 target_runnable=false
14894 fi
14895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14896 conftest.$ac_objext conftest.beam conftest.$ac_ext
14897 fi
14898
14899 cross_compiling="$old_cross_compiling"
14900
14901
14902 # Determine how to call the C preprocessor directly.
14903 # Most of the time, calling the C preprocessor through the C compiler is
14904 # desirable and even important.
14905 # In some cases, though, we want to use the C preprocessor only to
14906 # expand macros. In such cases, it is much more convenient to be able
14907 # to invoke it directly rather than through the C compiler, for instance
14908 # because, when invoked directly, the C preprocessor does not require
14909 # to be invoked on a file with a '.c' extension
14910 # We thus figure out how to invoke the C preprocessor directly but
14911 # let the CPP variable untouched, except for the MSVC port where we set it
14912 # manually to make sure the backward compatibility is preserved
14913 case $ocaml_cc_vendor in #(
14914 xlc-*) :
14915 CPP="$CC -E -qnoppline" # suppress incompatible XLC line directives
14916 ocamltest_CPP="$CPP" ;; #(
14917 sunc-*) :
14918 CPP="$CC -E -Qn" # suppress generation of Sun PRO ident string
14919 ocamltest_CPP="$CPP" ;; #(
14920 msvc-*) :
14921 CPP="$CC -nologo -EP -TC"
14922 ocamltest_CPP="$CPP 2> nul" ;; #(
14923 *) :
14924 CPP="$CC -E -P"
14925 ocamltest_CPP="$CPP" ;;
14926 esac
14927
14928 # Absolute path to the toplevel source directory
14929
14930 # A sentinel character (X) is added at the end of the directory name
14931 # and then removed, in case the directory name finishes with an odd character.
14932 # (The $(...) construct strips trailing \n characters.)
14933 # Also, it is important to use `printf` rather than `echo` because the
14934 # behaviour of `echo` is indeterminate and uncontrollable if the
14935 # absolute path contains backslashes, which will definitely be the case
14936 # on Windows
14937 # See https://lists.gnu.org/archive/html/autoconf/2019-07/msg00002.html
14938 # for the detailed explanation.
14939
14940 ocamlsrcdir=$(unset CDPATH; cd -- "$srcdir" && printf %sX "$PWD") || fail
14941 ocamlsrcdir=${ocamlsrcdir%X}
14942
14943 case $host in #(
14944 *-w64-mingw32*|*-pc-windows) :
14945
14946 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a workable solution for ln -sf" >&5
14947 printf %s "checking for a workable solution for ln -sf... " >&6; }
14948 if MSYS=winsymlinks:nativestrict CYGWIN=winsymlinks:nativestrict ln -sf configure conftestLink 2>/dev/null
14949 then :
14950 ln='ln -sf'
14951 else $as_nop
14952 ln='cp -pf'
14953
14954 fi
14955 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ln" >&5
14956 printf "%s\n" "$ln" >&6; }
14957
14958 ocamlsrcdir="$(LC_ALL=C.UTF-8 cygpath -w -- "$ocamlsrcdir")" ;; #(
14959 *) :
14960 ln='ln -sf' ;;
14961 esac
14962
14963 # Whether ar supports @FILE arguments
14964
14965 case $lt_cv_ar_at_file in #(
14966 no) :
14967 ar_supports_response_files=false ;; #(
14968 *) :
14969 ar_supports_response_files=true ;;
14970 esac
14971
14972 # Libraries to build depending on the target
14973
14974 case $target in #(
14975 *-w64-mingw32*|*-pc-windows) :
14976 unix_or_win32="win32"
14977 ocamltest_libunix="Some false"
14978 ocamlyacc_wstr_module="yacc/wstr" ;; #(
14979 *) :
14980 unix_or_win32="unix"
14981 ocamltest_libunix="Some true"
14982 ocamlyacc_wstr_module="" ;;
14983 esac
14984
14985 otherlibraries="dynlink runtime_events"
14986 otherlibs="runtime_events"
14987 optional_libraries="$optional_libraries otherlibs/dynlink/dynlink"
14988 lib_dynlink=true
14989 dldir=otherlibs/dynlink
14990 ac_config_links="$ac_config_links $dldir/dynlink_cmo_format.mli:file_formats/cmo_format.mli $dldir/dynlink_cmxs_format.mli:file_formats/cmxs_format.mli $dldir/dynlink_platform_intf.mli:$dldir/dynlink_platform_intf.ml"
14991
14992 lib_runtime_events=true
14993 if test x"$enable_unix_lib" != "xno"
14994 then :
14995 enable_unix_lib=yes
14996 ac_config_files="$ac_config_files otherlibs/unix/META"
14997
14998 otherlibraries="$otherlibraries unix"
14999 otherlibs="$otherlibs unix"
15000 lib_unix=true
15001 ac_config_links="$ac_config_links otherlibs/unix/unix.ml:otherlibs/unix/unix_${unix_or_win32}.ml"
15002
15003 ocamltest_unix_impl="real"
15004 unix_directory="otherlibs/unix"
15005 unix_library="${unix_directory}/unix"
15006 else $as_nop
15007 ocamltest_libunix="None"
15008 fi
15009
15010 if test x"$enable_str_lib" != "xno"
15011 then :
15012 otherlibraries="$otherlibraries str"
15013 otherlibs="$otherlibs str"
15014 lib_str=true
15015 ac_config_files="$ac_config_files otherlibs/str/META"
15016
15017 fi
15018
15019 # Checks for system services
15020
15021 ## Test whether #! scripts are supported
15022 ## TODO: have two values, one for host and one for target
15023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5
15024 printf %s "checking whether #! works in shell scripts... " >&6; }
15025 if test ${ac_cv_sys_interpreter+y}
15026 then :
15027 printf %s "(cached) " >&6
15028 else $as_nop
15029 echo '#! /bin/cat
15030 exit 69
15031 ' >conftest
15032 chmod u+x conftest
15033 (SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
15034 if test $? -ne 69; then
15035 ac_cv_sys_interpreter=yes
15036 else
15037 ac_cv_sys_interpreter=no
15038 fi
15039 rm -f conftest
15040 fi
15041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5
15042 printf "%s\n" "$ac_cv_sys_interpreter" >&6; }
15043 interpval=$ac_cv_sys_interpreter
15044
15045
15046 shebangscripts=false
15047 launch_method='exe'
15048 if test "x$interpval" = "xyes"
15049 then :
15050 case $target in #(
15051 *-cygwin) :
15052 # Cygwin supports shebangs, which we use for the compiler itself, but
15053 # partially for legacy, and partially so that executables can be easily
15054 # run from outside Cygwin, the executables ocamlc and ocamlopt produce do
15055 # not use shebang scripts
15056 shebangscripts=true
15057 launch_method='sh'
15058 if test x"$target_launch_method" = 'x'
15059 then :
15060 target_launch_method='exe'
15061 fi ;; #(
15062 *-w64-mingw32*|*-pc-windows) :
15063 ;; #(
15064 *) :
15065 shebangscripts=true
15066 launch_method='sh'
15067 ;;
15068 esac
15069
15070 fi
15071
15072 # stdlib/runtime.info and stdlib/target_runtime.info are generated by commands
15073 # in config.status, rather than by the .in mechanism, since the latter cannot
15074 # reliably process binary files.
15075 ac_config_commands="$ac_config_commands shebang"
15076
15077
15078 # Checks for programs
15079
15080 ## Check for the C compiler: done by libtool
15081 ## AC_PROG_CC
15082
15083 ## Check for C99 support: done by libtool
15084 ## AC_PROG_CC_C99
15085
15086 ## Determine which flags to use for the C compiler
15087
15088 case $ocaml_cc_vendor in #(
15089 xlc-*) :
15090 warn_error_flag=''
15091 cc_warnings='-qflag=i:i' ;; #(
15092 # all warnings enabled
15093 sunc-*) :
15094 cc_warnings="" ;; #(
15095 msvc-*) :
15096 case $ocaml_cc_vendor in #(
15097 msvc-*-clang-*) :
15098 cc_warnings='-W4 -Wno-unused-parameter -Wno-sign-compare -Wundef'
15099 warn_error_flag='-WX' ;; #(
15100 *) :
15101 cc_warnings='-W2'
15102 warn_error_flag='-WX -options:strict' ;;
15103 esac ;; #(
15104 *) :
15105 warn_error_flag='-Werror'
15106 cc_warnings="-Wall -Wint-conversion -Wstrict-prototypes \
15107 -Wold-style-definition -Wundef" ;;
15108 esac
15109
15110 case $ocaml_cc_vendor in #(
15111 msvc-*-clang-*) :
15112 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-Wno-cast-function-type-mismatch" | $as_tr_sh`
15113 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wno-cast-function-type-mismatch" >&5
15114 printf %s "checking whether the C compiler accepts -Wno-cast-function-type-mismatch... " >&6; }
15115 if eval test \${$as_CACHEVAR+y}
15116 then :
15117 printf %s "(cached) " >&6
15118 else $as_nop
15119
15120 ax_check_save_flags=$CFLAGS
15121 CFLAGS="$CFLAGS $warn_error_flag -Wno-cast-function-type-mismatch"
15122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15123 /* end confdefs.h. */
15124
15125 int
15126 main (void)
15127 {
15128
15129 ;
15130 return 0;
15131 }
15132 _ACEOF
15133 if ac_fn_c_try_compile "$LINENO"
15134 then :
15135 eval "$as_CACHEVAR=yes"
15136 else $as_nop
15137 eval "$as_CACHEVAR=no"
15138 fi
15139 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15140 CFLAGS=$ax_check_save_flags
15141 fi
15142 eval ac_res=\$$as_CACHEVAR
15143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15144 printf "%s\n" "$ac_res" >&6; }
15145 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
15146 then :
15147 cc_warnings="$cc_warnings -Wno-cast-function-type-mismatch"
15148 else $as_nop
15149 :
15150 fi
15151 ;; #(
15152 *) :
15153 ;;
15154 esac
15155
15156 # Use -Wold-style-declaration if supported
15157 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-Wold-style-declaration" | $as_tr_sh`
15158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -Wold-style-declaration" >&5
15159 printf %s "checking whether the C compiler accepts -Wold-style-declaration... " >&6; }
15160 if eval test \${$as_CACHEVAR+y}
15161 then :
15162 printf %s "(cached) " >&6
15163 else $as_nop
15164
15165 ax_check_save_flags=$CFLAGS
15166 CFLAGS="$CFLAGS $warn_error_flag -Wold-style-declaration"
15167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15168 /* end confdefs.h. */
15169
15170 int
15171 main (void)
15172 {
15173
15174 ;
15175 return 0;
15176 }
15177 _ACEOF
15178 if ac_fn_c_try_compile "$LINENO"
15179 then :
15180 eval "$as_CACHEVAR=yes"
15181 else $as_nop
15182 eval "$as_CACHEVAR=no"
15183 fi
15184 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15185 CFLAGS=$ax_check_save_flags
15186 fi
15187 eval ac_res=\$$as_CACHEVAR
15188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15189 printf "%s\n" "$ac_res" >&6; }
15190 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
15191 then :
15192 cc_warnings="$cc_warnings -Wold-style-declaration"
15193 else $as_nop
15194 :
15195 fi
15196
15197
15198 # Use -Wimplicit-fallthrough if supported
15199 for flag in '-Wimplicit-fallthrough=5' '-Wimplicit-fallthrough'; do
15200 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_$flag" | $as_tr_sh`
15201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts $flag" >&5
15202 printf %s "checking whether the C compiler accepts $flag... " >&6; }
15203 if eval test \${$as_CACHEVAR+y}
15204 then :
15205 printf %s "(cached) " >&6
15206 else $as_nop
15207
15208 ax_check_save_flags=$CFLAGS
15209 CFLAGS="$CFLAGS $warn_error_flag $flag"
15210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15211 /* end confdefs.h. */
15212
15213 int
15214 main (void)
15215 {
15216
15217 ;
15218 return 0;
15219 }
15220 _ACEOF
15221 if ac_fn_c_try_compile "$LINENO"
15222 then :
15223 eval "$as_CACHEVAR=yes"
15224 else $as_nop
15225 eval "$as_CACHEVAR=no"
15226 fi
15227 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15228 CFLAGS=$ax_check_save_flags
15229 fi
15230 eval ac_res=\$$as_CACHEVAR
15231 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15232 printf "%s\n" "$ac_res" >&6; }
15233 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
15234 then :
15235 cc_warnings="$cc_warnings $flag"; break
15236 else $as_nop
15237 :
15238 fi
15239
15240 done
15241
15242 case $enable_warn_error,false in #(
15243 yes,*|,true) :
15244 cc_warnings="$cc_warnings $warn_error_flag" ;; #(
15245 *) :
15246 ;;
15247 esac
15248
15249 case $target in #(
15250 *-w64-mingw32*|*-pc-windows) :
15251 case $WINDOWS_UNICODE_MODE in #(
15252 ansi) :
15253 windows_unicode=0 ;; #(
15254 compatible|"") :
15255 windows_unicode=1 ;; #(
15256 *) :
15257 as_fn_error $? "unexpected windows unicode mode" "$LINENO" 5 ;;
15258 esac ;; #(
15259 *) :
15260 windows_unicode=0 ;;
15261 esac
15262
15263 # We select high optimization levels, provided we can turn off:
15264 # - strict type-based aliasing analysis (too risky for the OCaml runtime)
15265 # - strict no-overflow conditions on signed integer arithmetic
15266 # (the OCaml runtime assumes Java-style behavior of signed integer arith.)
15267 # Concerning optimization level, -O3 is somewhat risky, so take -O2.
15268 # Concerning language version, recent enough versions of GCC and Clang
15269 # default to gnu11 (C11 + GNU extensions) or gnu17, which is fine.
15270 case $ocaml_cc_vendor in #(
15271 clang-*) :
15272 common_cflags="-O2 -fno-strict-aliasing -fwrapv";
15273 internal_cflags="$cc_warnings -fno-common" ;; #(
15274 *gcc-[0123]-*|*gcc-4-[0-8]) :
15275 # No C11 support
15276 as_fn_error 69 "This version of GCC is too old. Please use GCC version 4.9 or above." "$LINENO" 5 ;; #(
15277 gcc-*) :
15278 common_cflags="-O2 -fno-strict-aliasing -fwrapv";
15279 internal_cflags="$cc_warnings -fno-common -fexcess-precision=standard \
15280 -Wvla" ;; #(
15281 mingw-*-*-gcc-*) :
15282 internal_cflags="-Wno-unused $cc_warnings \
15283 -fexcess-precision=standard"
15284 # TODO: see whether the code can be fixed to avoid -Wno-unused
15285 common_cflags="-O2 -fno-strict-aliasing -fwrapv -mms-bitfields"
15286 internal_cppflags='-D__USE_MINGW_ANSI_STDIO=0 -DUNICODE -D_UNICODE'
15287 internal_cppflags="$internal_cppflags -DWINDOWS_UNICODE=$windows_unicode" ;; #(
15288 mingw-*) :
15289 as_fn_error $? "Unsupported C compiler for a MinGW-w64 build" "$LINENO" 5 ;; #(
15290 msvc-0*|msvc-1[0-8]*|msvc-19[012]*|msvc-193[0-7]) :
15291 # No C11 atomics support
15292 as_fn_error 69 "This version of MSVC is too old. Please use Visual Studio version 17.8 or above." "$LINENO" 5 ;; #(
15293 msvc-*) :
15294 common_cflags='-nologo -O2 -Gy- -MD'
15295 common_cppflags="-D_CRT_SECURE_NO_DEPRECATE"
15296 internal_cflags="$cc_warnings"
15297 internal_cppflags='-DUNICODE -D_UNICODE -D_CRT_NONSTDC_NO_WARNINGS'
15298 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-volatileMetadata-" | $as_tr_sh`
15299 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -volatileMetadata-" >&5
15300 printf %s "checking whether the C compiler accepts -volatileMetadata-... " >&6; }
15301 if eval test \${$as_CACHEVAR+y}
15302 then :
15303 printf %s "(cached) " >&6
15304 else $as_nop
15305
15306 ax_check_save_flags=$CFLAGS
15307 CFLAGS="$CFLAGS $warn_error_flag -volatileMetadata-"
15308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15309 /* end confdefs.h. */
15310
15311 int
15312 main (void)
15313 {
15314
15315 ;
15316 return 0;
15317 }
15318 _ACEOF
15319 if ac_fn_c_try_compile "$LINENO"
15320 then :
15321 eval "$as_CACHEVAR=yes"
15322 else $as_nop
15323 eval "$as_CACHEVAR=no"
15324 fi
15325 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15326 CFLAGS=$ax_check_save_flags
15327 fi
15328 eval ac_res=\$$as_CACHEVAR
15329 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15330 printf "%s\n" "$ac_res" >&6; }
15331 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
15332 then :
15333 internal_cflags="$internal_cflags -volatileMetadata-"
15334 else $as_nop
15335 :
15336 fi
15337
15338 internal_cppflags="$internal_cppflags -DWINDOWS_UNICODE=$windows_unicode" ;; #(
15339 xlc-*) :
15340 common_cflags="-O5 -qtune=balanced -qnoipa -qinline";
15341 internal_cflags="$cc_warnings" ;; #(
15342 sunc-*) :
15343 # Optimization should be >= O4 to inline functions
15344 # and prevent unresolved externals
15345 common_cflags="-O4 -xc99=all"
15346 common_cppflags="-D_XPG6"
15347 internal_cflags="$cc_warnings" ;; #(
15348 *) :
15349 common_cflags="-O" ;;
15350 esac
15351
15352 # Enable SSE2 on x86 mingw to avoid using 80-bit registers.
15353 case $target in #(
15354 i686-w64-mingw32*) :
15355 internal_cflags="$internal_cflags -mfpmath=sse -msse2" ;; #(
15356 *) :
15357 ;;
15358 esac
15359
15360 # Use 64-bit file offset if possible
15361 # See also AC_SYS_LARGEFILE
15362 # Problem: flags are added to CC rather than CPPFLAGS
15363 case $target in #(
15364 *-w64-mingw32*|*-pc-windows) :
15365 ;; #(
15366 *) :
15367 common_cppflags="$common_cppflags -D_FILE_OFFSET_BITS=64" ;;
15368 esac
15369
15370 # Adjust according to target
15371
15372 # On Windows we do not take $enable_shared because it does not seem
15373 # to work. This should be better understood later
15374 #AS_CASE([$target],
15375 # [*-pc-windows],
15376 # [enable_shared=yes])
15377
15378 if test x"$enable_shared" = "xno"
15379 then :
15380 supports_shared_libraries=false
15381 case $target in #(
15382 *-pc-windows|*-w64-mingw32*) :
15383 as_fn_error $? "Cannot build native Win32 with --disable-shared" "$LINENO" 5 ;; #(
15384 *) :
15385 ;;
15386 esac
15387 else $as_nop
15388 supports_shared_libraries=true
15389 fi
15390
15391 # Define flexlink chain and flags correctly for the different Windows ports
15392 flexlink_flags=''
15393 case $target in #(
15394 i686-*-cygwin) :
15395 flexdll_chain='cygwin'
15396 flexlink_flags='-merge-manifest -stack 16777216' ;; #(
15397 x86_64-*-cygwin) :
15398 flexdll_chain='cygwin64'
15399 flexlink_flags='-merge-manifest -stack 16777216' ;; #(
15400 i686-w64-mingw32*) :
15401 flexdll_chain='mingw'
15402 flexlink_flags='-stack 16777216' ;; #(
15403 x86_64-w64-mingw32*) :
15404 flexdll_chain='mingw64'
15405 flexlink_flags='-stack 33554432' ;; #(
15406 i686-pc-windows) :
15407 flexdll_chain='msvc'
15408 flexlink_flags='-merge-manifest -stack 16777216' ;; #(
15409 x86_64-pc-windows) :
15410 flexdll_chain='msvc64'
15411 flexlink_flags='-merge-manifest -stack 33554432' ;; #(
15412 *) :
15413 flexdll_chain='' ;;
15414 esac
15415
15416 if test x"$supports_shared_libraries" != 'xfalse'
15417 then :
15418
15419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexdll sources" >&5
15420 printf %s "checking for flexdll sources... " >&6; }
15421 if test x"$with_flexdll" = "xno"
15422 then :
15423 flexdll_source_dir=''
15424 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15425 printf "%s\n" "disabled" >&6; }
15426 else $as_nop
15427 flexmsg=''
15428 case $target in #(
15429 *-*-cygwin|*-w64-mingw32*|*-pc-windows) :
15430 if test x"$with_flexdll" = 'x' || test x"$with_flexdll" = 'xflexdll'
15431 then :
15432 if test -f 'flexdll/flexdll.h'
15433 then :
15434 flexdll_source_dir=flexdll
15435 else $as_nop
15436 if test x"$with_flexdll" != 'x'
15437 then :
15438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5
15439 printf "%s\n" "requested but not available" >&6; }
15440 as_fn_error $? "exiting" "$LINENO" 5
15441 fi
15442 fi
15443 else $as_nop
15444 rm -rf flexdll-sources
15445 if test -f "$with_flexdll/flexdll.h"
15446 then :
15447 mkdir -p flexdll-sources
15448 cp -r "$with_flexdll"/* flexdll-sources/
15449 flexdll_source_dir='flexdll-sources'
15450 flexmsg=" (from $with_flexdll)"
15451 else $as_nop
15452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5
15453 printf "%s\n" "requested but not available" >&6; }
15454 as_fn_error $? "exiting" "$LINENO" 5
15455 fi
15456 fi
15457 if test x"$flexdll_source_dir" = 'x'
15458 then :
15459 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15460 printf "%s\n" "no" >&6; }
15461 else $as_nop
15462 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flexdll_source_dir$flexmsg" >&5
15463 printf "%s\n" "$flexdll_source_dir$flexmsg" >&6; }
15464 bootstrapping_flexdll=true
15465 flexdll_dir=\"+flexdll\"
15466 fi ;; #(
15467 *) :
15468 if test x"$with_flexdll" != 'x'
15469 then :
15470 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not supported" >&5
15471 printf "%s\n" "requested but not supported" >&6; }
15472 as_fn_error $? "exiting" "$LINENO" 5
15473 fi ;;
15474 esac
15475 fi
15476
15477 case $target in #(
15478 *-*-cygwin|*-w64-mingw32*|*-pc-windows) :
15479 # Extract the first word of "flexlink", so it can be a program name with args.
15480 set dummy flexlink; ac_word=$2
15481 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15482 printf %s "checking for $ac_word... " >&6; }
15483 if test ${ac_cv_prog_flexlink+y}
15484 then :
15485 printf %s "(cached) " >&6
15486 else $as_nop
15487 if test -n "$flexlink"; then
15488 ac_cv_prog_flexlink="$flexlink" # Let the user override the test.
15489 else
15490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15491 for as_dir in $PATH
15492 do
15493 IFS=$as_save_IFS
15494 case $as_dir in #(((
15495 '') as_dir=./ ;;
15496 */) ;;
15497 *) as_dir=$as_dir/ ;;
15498 esac
15499 for ac_exec_ext in '' $ac_executable_extensions; do
15500 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15501 ac_cv_prog_flexlink="flexlink"
15502 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15503 break 2
15504 fi
15505 done
15506 done
15507 IFS=$as_save_IFS
15508
15509 fi
15510 fi
15511 flexlink=$ac_cv_prog_flexlink
15512 if test -n "$flexlink"; then
15513 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flexlink" >&5
15514 printf "%s\n" "$flexlink" >&6; }
15515 else
15516 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15517 printf "%s\n" "no" >&6; }
15518 fi
15519
15520 ;; #(
15521 *) :
15522 ;;
15523 esac
15524
15525 if test -n "$flexlink" && test -z "$flexdll_source_dir"
15526 then :
15527
15528
15529
15530 saved_CC="$CC"
15531 saved_CFLAGS="$CFLAGS"
15532 saved_CPPFLAGS="$CPPFLAGS"
15533 saved_LIBS="$LIBS"
15534 saved_ac_ext="$ac_ext"
15535 saved_ac_compile="$ac_compile"
15536 # Move the content of confdefs.h to another file so it does not
15537 # get included
15538 mv confdefs.h confdefs.h.bak
15539 touch confdefs.h
15540
15541
15542 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $flexlink works" >&5
15543 printf %s "checking whether $flexlink works... " >&6; }
15544
15545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15546 /* end confdefs.h. */
15547 int answer = 42;
15548 _ACEOF
15549 if ac_fn_c_try_compile "$LINENO"
15550 then :
15551 # Create conftest1.$ac_objext as a symlink on Cygwin to ensure that native
15552 # flexlink can cope. The reverse test is unnecessary (a Cygwin-compiled
15553 # flexlink can read anything).
15554 mv conftest.$ac_objext conftest1.$ac_objext
15555 case $host in #(
15556 *-*-cygwin) :
15557 ln -s conftest1.$ac_objext conftest2.$ac_objext ;; #(
15558 *) :
15559 cp conftest1.$ac_objext conftest2.$ac_objext ;;
15560 esac
15561
15562 CC="$flexlink -chain $flexdll_chain -exe"
15563 LIBS="conftest2.$ac_objext"
15564 CPPFLAGS="$internal_cppflags $CPPFLAGS"
15565 CFLAGS=""
15566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15567 /* end confdefs.h. */
15568
15569 int
15570 main (void)
15571 {
15572
15573 ;
15574 return 0;
15575 }
15576 _ACEOF
15577 if ac_fn_c_try_link "$LINENO"
15578 then :
15579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15580 printf "%s\n" "yes" >&6; }
15581 else $as_nop
15582 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15583 printf "%s\n" "no" >&6; }
15584 as_fn_error $? "$flexlink does not work" "$LINENO" 5
15585 fi
15586 rm -f core conftest.err conftest.$ac_objext conftest.beam \
15587 conftest$ac_exeext conftest.$ac_ext
15588 else $as_nop
15589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unexpected compile error" >&5
15590 printf "%s\n" "unexpected compile error" >&6; }
15591 as_fn_error $? "error calling the C compiler" "$LINENO" 5
15592 fi
15593 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
15594
15595
15596 # Restore the content of confdefs.h
15597 mv confdefs.h.bak confdefs.h
15598 ac_compile="$saved_ac_compile"
15599 ac_ext="$saved_ac_ext"
15600 CPPFLAGS="$saved_CPPFLAGS"
15601 CFLAGS="$saved_CFLAGS"
15602 CC="$saved_CC"
15603 LIBS="$saved_LIBS"
15604
15605
15606
15607 # When building on Cygwin/MSYS2, flexlink may be a shell script which
15608 # then cannot be executed by ocamlc/ocamlopt. Having located flexlink,
15609 # ensure it can be executed from a native Windows process. The check
15610 # is only necessary when cross-compiling.
15611 if test x"$build" != x"$host"
15612 then :
15613
15614 case $build in #(
15615 *-pc-msys|*-*-cygwin) :
15616 flexlink_where="$(cmd /c "$flexlink" -where 2>/dev/null)"
15617 if test -z "$flexlink_where"
15618 then :
15619 as_fn_error $? "$flexlink is not executable from a native Win32 process" "$LINENO" 5
15620 fi ;; #(
15621 *) :
15622 ;;
15623 esac
15624
15625 fi
15626
15627 fi
15628
15629
15630
15631 saved_CC="$CC"
15632 saved_CFLAGS="$CFLAGS"
15633 saved_CPPFLAGS="$CPPFLAGS"
15634 saved_LIBS="$LIBS"
15635 saved_ac_ext="$ac_ext"
15636 saved_ac_compile="$ac_compile"
15637 # Move the content of confdefs.h to another file so it does not
15638 # get included
15639 mv confdefs.h confdefs.h.bak
15640 touch confdefs.h
15641
15642
15643 if test -n "$flexdll_source_dir"
15644 then :
15645 CPPFLAGS="-I $flexdll_source_dir $CPPFLAGS"
15646 fi
15647 have_flexdll_h=no
15648 ac_fn_c_check_header_compile "$LINENO" "flexdll.h" "ac_cv_header_flexdll_h" "$ac_includes_default"
15649 if test "x$ac_cv_header_flexdll_h" = xyes
15650 then :
15651 have_flexdll_h=yes
15652 else $as_nop
15653 have_flexdll_h=no
15654 fi
15655
15656 if test x"$have_flexdll_h" = 'xno'
15657 then :
15658 if test -n "$flexdll_source_dir"
15659 then :
15660 as_fn_error $? "$flexdll_source_dir/flexdll.h appears unusable" "$LINENO" 5
15661 fi
15662 fi
15663
15664
15665 # Restore the content of confdefs.h
15666 mv confdefs.h.bak confdefs.h
15667 ac_compile="$saved_ac_compile"
15668 ac_ext="$saved_ac_ext"
15669 CPPFLAGS="$saved_CPPFLAGS"
15670 CFLAGS="$saved_CFLAGS"
15671 CC="$saved_CC"
15672 LIBS="$saved_LIBS"
15673
15674
15675
15676 if test -n "$flexlink" && test x"$have_flexdll_h" = 'xno'
15677 then :
15678
15679
15680 saved_CC="$CC"
15681 saved_CFLAGS="$CFLAGS"
15682 saved_CPPFLAGS="$CPPFLAGS"
15683 saved_LIBS="$LIBS"
15684 saved_ac_ext="$ac_ext"
15685 saved_ac_compile="$ac_compile"
15686 # Move the content of confdefs.h to another file so it does not
15687 # get included
15688 mv confdefs.h confdefs.h.bak
15689 touch confdefs.h
15690
15691
15692 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if \"$flexlink -where\" includes flexdll.h" >&5
15693 printf %s "checking if \"$flexlink -where\" includes flexdll.h... " >&6; }
15694 flexlink_where="$($flexlink -where | tr -d '\r')"
15695 CPPFLAGS="$CPPFLAGS -I \"$flexlink_where\""
15696 cat > conftest.c <<"EOF"
15697 #include <flexdll.h>
15698 int
15699 main (void)
15700 {
15701
15702 ;
15703 return 0;
15704 }
15705 EOF
15706 cat > conftest.Makefile <<EOF
15707 all:
15708 $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS
15709 EOF
15710 if make -f conftest.Makefile >/dev/null 2>/dev/null
15711 then :
15712 have_flexdll_h=yes
15713 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15714 printf "%s\n" "yes" >&6; }
15715 else $as_nop
15716 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15717 printf "%s\n" "no" >&6; }
15718 fi
15719
15720
15721 # Restore the content of confdefs.h
15722 mv confdefs.h.bak confdefs.h
15723 ac_compile="$saved_ac_compile"
15724 ac_ext="$saved_ac_ext"
15725 CPPFLAGS="$saved_CPPFLAGS"
15726 CFLAGS="$saved_CFLAGS"
15727 CC="$saved_CC"
15728 LIBS="$saved_LIBS"
15729
15730
15731 if test "x$have_flexdll_h" = 'xyes'
15732 then :
15733 internal_cppflags="$internal_cppflags -I \"$flexlink_where\""
15734 fi
15735
15736 fi
15737
15738 fi
15739
15740 case $have_flexdll_h,$supports_shared_libraries,$target in #(
15741 no,true,*-*-cygwin) :
15742 supports_shared_libraries=false
15743 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: flexdll.h not found: shared library support disabled." >&5
15744 printf "%s\n" "$as_me: WARNING: flexdll.h not found: shared library support disabled." >&2;} ;; #(
15745 no,*,*-w64-mingw32*|no,*,*-pc-windows) :
15746 as_fn_error $? "flexdll.h is required for native Win32" "$LINENO" 5 ;; #(
15747 *) :
15748 ;;
15749 esac
15750
15751 case $flexdll_source_dir,$supports_shared_libraries,$flexlink,$target in #(
15752 ,true,,*-*-cygwin) :
15753 supports_shared_libraries=false
15754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: flexlink not found: shared library support disabled." >&5
15755 printf "%s\n" "$as_me: WARNING: flexlink not found: shared library support disabled." >&2;} ;; #(
15756 ,*,,*-w64-mingw32*|,*,,*-pc-windows) :
15757 as_fn_error $? "flexlink is required for native Win32" "$LINENO" 5 ;; #(
15758 *) :
15759 ;;
15760 esac
15761
15762 mkexe_cmd_exp="$CC"
15763
15764 case $ocaml_cc_vendor,$target in #(
15765 *,x86_64-*-darwin*) :
15766 oc_ldflags='-Wl,-no_compact_unwind';
15767 printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h
15768 ;; #(
15769 *,aarch64-*-darwin*|*,arm64-*-darwin*) :
15770 printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h
15771 ;; #(
15772 *,*-*-cygwin) :
15773 common_cppflags="$common_cppflags -U_WIN32"
15774 if $supports_shared_libraries
15775 then :
15776 mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
15777 mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
15778 mkexe_ldflags_prefix='-link '
15779 else $as_nop
15780 mkexe_extra_flags=''
15781 oc_ldflags='-Wl,--stack,16777216'
15782
15783 fi
15784 ostype="Cygwin" ;; #(
15785 *,*-w64-mingw32*) :
15786 case $target in #(
15787 i686-*-*) :
15788 oc_dll_ldflags="-static-libgcc" ;; #(
15789 *) :
15790 ;;
15791 esac
15792 ostype="Win32"
15793 toolchain="mingw"
15794 mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
15795 mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
15796 mkexe_ldflags_prefix='-link '
15797 oc_exe_ldflags='-municode'
15798 mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags"
15799 SO="dll" ;; #(
15800 *,*-pc-windows) :
15801 toolchain=msvc
15802 ostype="Win32"
15803 mkexe_cmd_exp="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
15804 mkexe_cmd="flexlink -exe -chain ${flexdll_chain} ${flexlink_flags}"
15805 mkexe_ldflags_prefix='-link '
15806 mkexe_via_cc_ldflags_prefix='/link '
15807 oc_exe_ldflags='/ENTRY:wmainCRTStartup'
15808 mkexe_extra_flags="$mkexe_ldflags_prefix$oc_exe_ldflags"
15809 mkexedebugflag='' ;; #(
15810 *,x86_64-*-linux*) :
15811 printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h
15812 ;; #(
15813 xlc-*,powerpc-ibm-aix*) :
15814 oc_ldflags='-brtl -bexpfull'
15815 printf "%s\n" "#define HAS_ARCH_CODE32 1" >>confdefs.h
15816 ;; #(
15817 gcc-*,powerpc-*-linux*) :
15818 oc_ldflags="-mbss-plt" ;; #(
15819 *) :
15820 ;;
15821 esac
15822
15823 # How to build sak
15824
15825 if test x"$build" = x"$target" -o x"$target_runnable" = xtrue
15826 then :
15827 case $target in #(
15828 *-pc-windows) :
15829 SAK_BUILD="\$(CC) \$(OC_CFLAGS) \$(CFLAGS) \$(OC_CPPFLAGS) \$(CPPFLAGS) \$(2) /link /out:\$(1) $oc_exe_ldflags \$(OC_LDFLAGS) \$(LDFLAGS)" ;; #(
15830 *) :
15831 SAK_BUILD='$(MKEXE_VIA_CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(CPPFLAGS)' ;;
15832 esac
15833 SAK="\$(ROOTDIR)/runtime/sak${EXEEXT}"
15834 else $as_nop
15835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: detecting the C toolchain for build" >&5
15836 printf "%s\n" "$as_me: detecting the C toolchain for build" >&6;}
15837
15838 ac_cv_host_exeext=$ac_cv_exeext
15839 if test ${ac_cv_build_exeext+y}
15840 then :
15841 ac_cv_exeext=$ac_cv_build_exeext
15842 else $as_nop
15843 { ac_cv_exeext=; unset ac_cv_exeext;}
15844 fi
15845 ac_cv_host_objext=$ac_cv_objext
15846 if test ${ac_cv_build_objext+y}
15847 then :
15848 ac_cv_objext=$ac_cv_build_objext
15849 else $as_nop
15850 { ac_cv_objext=; unset ac_cv_objext;}
15851 fi
15852 ac_cv_host_c_compiler_gnu=$ac_cv_c_compiler_gnu
15853 if test ${ac_cv_build_c_compiler_gnu+y}
15854 then :
15855 ac_cv_c_compiler_gnu=$ac_cv_build_c_compiler_gnu
15856 else $as_nop
15857 { ac_cv_c_compiler_gnu=; unset ac_cv_c_compiler_gnu;}
15858 fi
15859
15860 cross_compiling_build=no
15861
15862 ac_build_tool_prefix=
15863 if test -n "$build"
15864 then :
15865 ac_build_tool_prefix="$build-"
15866 elif test -n "$build_alias"
15867 then :
15868 ac_build_tool_prefix="$build_alias-"
15869 fi
15870
15871 ac_ext=c
15872 ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
15873 ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
15874 ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
15875 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15876
15877 ac_ext=c
15878 ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
15879 ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
15880 ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
15881 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15882 if test -n "$ac_build_tool_prefix"; then
15883 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
15884 set dummy ${ac_build_tool_prefix}gcc; ac_word=$2
15885 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15886 printf %s "checking for $ac_word... " >&6; }
15887 if test ${ac_cv_prog_CC_FOR_BUILD+y}
15888 then :
15889 printf %s "(cached) " >&6
15890 else $as_nop
15891 if test -n "$CC_FOR_BUILD"; then
15892 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
15893 else
15894 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15895 for as_dir in $PATH
15896 do
15897 IFS=$as_save_IFS
15898 case $as_dir in #(((
15899 '') as_dir=./ ;;
15900 */) ;;
15901 *) as_dir=$as_dir/ ;;
15902 esac
15903 for ac_exec_ext in '' $ac_executable_extensions; do
15904 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15905 ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}gcc"
15906 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15907 break 2
15908 fi
15909 done
15910 done
15911 IFS=$as_save_IFS
15912
15913 fi
15914 fi
15915 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
15916 if test -n "$CC_FOR_BUILD"; then
15917 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
15918 printf "%s\n" "$CC_FOR_BUILD" >&6; }
15919 else
15920 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15921 printf "%s\n" "no" >&6; }
15922 fi
15923
15924
15925 fi
15926 if test -z "$ac_cv_prog_CC_FOR_BUILD"; then
15927 ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD
15928 # Extract the first word of "gcc", so it can be a program name with args.
15929 set dummy gcc; ac_word=$2
15930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15931 printf %s "checking for $ac_word... " >&6; }
15932 if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y}
15933 then :
15934 printf %s "(cached) " >&6
15935 else $as_nop
15936 if test -n "$ac_ct_CC_FOR_BUILD"; then
15937 ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test.
15938 else
15939 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15940 for as_dir in $PATH
15941 do
15942 IFS=$as_save_IFS
15943 case $as_dir in #(((
15944 '') as_dir=./ ;;
15945 */) ;;
15946 *) as_dir=$as_dir/ ;;
15947 esac
15948 for ac_exec_ext in '' $ac_executable_extensions; do
15949 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
15950 ac_cv_prog_ac_ct_CC_FOR_BUILD="gcc"
15951 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
15952 break 2
15953 fi
15954 done
15955 done
15956 IFS=$as_save_IFS
15957
15958 fi
15959 fi
15960 ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD
15961 if test -n "$ac_ct_CC_FOR_BUILD"; then
15962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5
15963 printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; }
15964 else
15965 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
15966 printf "%s\n" "no" >&6; }
15967 fi
15968
15969 if test "x$ac_ct_CC_FOR_BUILD" = x; then
15970 CC_FOR_BUILD=""
15971 else
15972 case $cross_compiling_build:$ac_tool_warned in
15973 yes:)
15974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5
15975 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;}
15976 ac_tool_warned=yes ;;
15977 esac
15978 CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD
15979 fi
15980 else
15981 CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD"
15982 fi
15983
15984 if test -z "$CC_FOR_BUILD"; then
15985 if test -n "$ac_build_tool_prefix"; then
15986 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
15987 set dummy ${ac_build_tool_prefix}cc; ac_word=$2
15988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15989 printf %s "checking for $ac_word... " >&6; }
15990 if test ${ac_cv_prog_CC_FOR_BUILD+y}
15991 then :
15992 printf %s "(cached) " >&6
15993 else $as_nop
15994 if test -n "$CC_FOR_BUILD"; then
15995 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
15996 else
15997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15998 for as_dir in $PATH
15999 do
16000 IFS=$as_save_IFS
16001 case $as_dir in #(((
16002 '') as_dir=./ ;;
16003 */) ;;
16004 *) as_dir=$as_dir/ ;;
16005 esac
16006 for ac_exec_ext in '' $ac_executable_extensions; do
16007 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16008 ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}cc"
16009 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16010 break 2
16011 fi
16012 done
16013 done
16014 IFS=$as_save_IFS
16015
16016 fi
16017 fi
16018 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
16019 if test -n "$CC_FOR_BUILD"; then
16020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
16021 printf "%s\n" "$CC_FOR_BUILD" >&6; }
16022 else
16023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16024 printf "%s\n" "no" >&6; }
16025 fi
16026
16027
16028 fi
16029 fi
16030 if test -z "$CC_FOR_BUILD"; then
16031 # Extract the first word of "cc", so it can be a program name with args.
16032 set dummy cc; ac_word=$2
16033 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16034 printf %s "checking for $ac_word... " >&6; }
16035 if test ${ac_cv_prog_CC_FOR_BUILD+y}
16036 then :
16037 printf %s "(cached) " >&6
16038 else $as_nop
16039 if test -n "$CC_FOR_BUILD"; then
16040 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
16041 else
16042 ac_prog_rejected=no
16043 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16044 for as_dir in $PATH
16045 do
16046 IFS=$as_save_IFS
16047 case $as_dir in #(((
16048 '') as_dir=./ ;;
16049 */) ;;
16050 *) as_dir=$as_dir/ ;;
16051 esac
16052 for ac_exec_ext in '' $ac_executable_extensions; do
16053 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16054 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
16055 ac_prog_rejected=yes
16056 continue
16057 fi
16058 ac_cv_prog_CC_FOR_BUILD="cc"
16059 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16060 break 2
16061 fi
16062 done
16063 done
16064 IFS=$as_save_IFS
16065
16066 if test $ac_prog_rejected = yes; then
16067 # We found a bogon in the path, so make sure we never use it.
16068 set dummy $ac_cv_prog_CC_FOR_BUILD
16069 shift
16070 if test $# != 0; then
16071 # We chose a different compiler from the bogus one.
16072 # However, it has the same basename, so the bogon will be chosen
16073 # first if we set CC_FOR_BUILD to just the basename; use the full file name.
16074 shift
16075 ac_cv_prog_CC_FOR_BUILD="$as_dir$ac_word${1+' '}$@"
16076 fi
16077 fi
16078 fi
16079 fi
16080 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
16081 if test -n "$CC_FOR_BUILD"; then
16082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
16083 printf "%s\n" "$CC_FOR_BUILD" >&6; }
16084 else
16085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16086 printf "%s\n" "no" >&6; }
16087 fi
16088
16089
16090 fi
16091 if test -z "$CC_FOR_BUILD"; then
16092 if test -n "$ac_build_tool_prefix"; then
16093 for ac_prog in cl.exe
16094 do
16095 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16096 set dummy $ac_build_tool_prefix$ac_prog; ac_word=$2
16097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16098 printf %s "checking for $ac_word... " >&6; }
16099 if test ${ac_cv_prog_CC_FOR_BUILD+y}
16100 then :
16101 printf %s "(cached) " >&6
16102 else $as_nop
16103 if test -n "$CC_FOR_BUILD"; then
16104 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
16105 else
16106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16107 for as_dir in $PATH
16108 do
16109 IFS=$as_save_IFS
16110 case $as_dir in #(((
16111 '') as_dir=./ ;;
16112 */) ;;
16113 *) as_dir=$as_dir/ ;;
16114 esac
16115 for ac_exec_ext in '' $ac_executable_extensions; do
16116 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16117 ac_cv_prog_CC_FOR_BUILD="$ac_build_tool_prefix$ac_prog"
16118 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16119 break 2
16120 fi
16121 done
16122 done
16123 IFS=$as_save_IFS
16124
16125 fi
16126 fi
16127 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
16128 if test -n "$CC_FOR_BUILD"; then
16129 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
16130 printf "%s\n" "$CC_FOR_BUILD" >&6; }
16131 else
16132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16133 printf "%s\n" "no" >&6; }
16134 fi
16135
16136
16137 test -n "$CC_FOR_BUILD" && break
16138 done
16139 fi
16140 if test -z "$CC_FOR_BUILD"; then
16141 ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD
16142 for ac_prog in cl.exe
16143 do
16144 # Extract the first word of "$ac_prog", so it can be a program name with args.
16145 set dummy $ac_prog; ac_word=$2
16146 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16147 printf %s "checking for $ac_word... " >&6; }
16148 if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y}
16149 then :
16150 printf %s "(cached) " >&6
16151 else $as_nop
16152 if test -n "$ac_ct_CC_FOR_BUILD"; then
16153 ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test.
16154 else
16155 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16156 for as_dir in $PATH
16157 do
16158 IFS=$as_save_IFS
16159 case $as_dir in #(((
16160 '') as_dir=./ ;;
16161 */) ;;
16162 *) as_dir=$as_dir/ ;;
16163 esac
16164 for ac_exec_ext in '' $ac_executable_extensions; do
16165 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16166 ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_prog"
16167 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16168 break 2
16169 fi
16170 done
16171 done
16172 IFS=$as_save_IFS
16173
16174 fi
16175 fi
16176 ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD
16177 if test -n "$ac_ct_CC_FOR_BUILD"; then
16178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5
16179 printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; }
16180 else
16181 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16182 printf "%s\n" "no" >&6; }
16183 fi
16184
16185
16186 test -n "$ac_ct_CC_FOR_BUILD" && break
16187 done
16188
16189 if test "x$ac_ct_CC_FOR_BUILD" = x; then
16190 CC_FOR_BUILD=""
16191 else
16192 case $cross_compiling_build:$ac_tool_warned in
16193 yes:)
16194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5
16195 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;}
16196 ac_tool_warned=yes ;;
16197 esac
16198 CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD
16199 fi
16200 fi
16201
16202 fi
16203 if test -z "$CC_FOR_BUILD"; then
16204 if test -n "$ac_build_tool_prefix"; then
16205 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
16206 set dummy ${ac_build_tool_prefix}clang; ac_word=$2
16207 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16208 printf %s "checking for $ac_word... " >&6; }
16209 if test ${ac_cv_prog_CC_FOR_BUILD+y}
16210 then :
16211 printf %s "(cached) " >&6
16212 else $as_nop
16213 if test -n "$CC_FOR_BUILD"; then
16214 ac_cv_prog_CC_FOR_BUILD="$CC_FOR_BUILD" # Let the user override the test.
16215 else
16216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16217 for as_dir in $PATH
16218 do
16219 IFS=$as_save_IFS
16220 case $as_dir in #(((
16221 '') as_dir=./ ;;
16222 */) ;;
16223 *) as_dir=$as_dir/ ;;
16224 esac
16225 for ac_exec_ext in '' $ac_executable_extensions; do
16226 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16227 ac_cv_prog_CC_FOR_BUILD="${ac_build_tool_prefix}clang"
16228 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16229 break 2
16230 fi
16231 done
16232 done
16233 IFS=$as_save_IFS
16234
16235 fi
16236 fi
16237 CC_FOR_BUILD=$ac_cv_prog_CC_FOR_BUILD
16238 if test -n "$CC_FOR_BUILD"; then
16239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC_FOR_BUILD" >&5
16240 printf "%s\n" "$CC_FOR_BUILD" >&6; }
16241 else
16242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16243 printf "%s\n" "no" >&6; }
16244 fi
16245
16246
16247 fi
16248 if test -z "$ac_cv_prog_CC_FOR_BUILD"; then
16249 ac_ct_CC_FOR_BUILD=$CC_FOR_BUILD
16250 # Extract the first word of "clang", so it can be a program name with args.
16251 set dummy clang; ac_word=$2
16252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16253 printf %s "checking for $ac_word... " >&6; }
16254 if test ${ac_cv_prog_ac_ct_CC_FOR_BUILD+y}
16255 then :
16256 printf %s "(cached) " >&6
16257 else $as_nop
16258 if test -n "$ac_ct_CC_FOR_BUILD"; then
16259 ac_cv_prog_ac_ct_CC_FOR_BUILD="$ac_ct_CC_FOR_BUILD" # Let the user override the test.
16260 else
16261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16262 for as_dir in $PATH
16263 do
16264 IFS=$as_save_IFS
16265 case $as_dir in #(((
16266 '') as_dir=./ ;;
16267 */) ;;
16268 *) as_dir=$as_dir/ ;;
16269 esac
16270 for ac_exec_ext in '' $ac_executable_extensions; do
16271 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
16272 ac_cv_prog_ac_ct_CC_FOR_BUILD="clang"
16273 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
16274 break 2
16275 fi
16276 done
16277 done
16278 IFS=$as_save_IFS
16279
16280 fi
16281 fi
16282 ac_ct_CC_FOR_BUILD=$ac_cv_prog_ac_ct_CC_FOR_BUILD
16283 if test -n "$ac_ct_CC_FOR_BUILD"; then
16284 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC_FOR_BUILD" >&5
16285 printf "%s\n" "$ac_ct_CC_FOR_BUILD" >&6; }
16286 else
16287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16288 printf "%s\n" "no" >&6; }
16289 fi
16290
16291 if test "x$ac_ct_CC_FOR_BUILD" = x; then
16292 CC_FOR_BUILD=""
16293 else
16294 case $cross_compiling_build:$ac_tool_warned in
16295 yes:)
16296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with build triplet" >&5
16297 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with build triplet" >&2;}
16298 ac_tool_warned=yes ;;
16299 esac
16300 CC_FOR_BUILD=$ac_ct_CC_FOR_BUILD
16301 fi
16302 else
16303 CC_FOR_BUILD="$ac_cv_prog_CC_FOR_BUILD"
16304 fi
16305
16306 fi
16307
16308
16309 test -z "$CC_FOR_BUILD" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16310 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16311 as_fn_error $? "no acceptable C compiler found in \$PATH
16312 See \`config.log' for more details" "$LINENO" 5; }
16313
16314 # Provide some information about the compiler.
16315 printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
16316 set X $ac_compile
16317 ac_compiler=$2
16318 for ac_option in --version -v -V -qversion -version; do
16319 { { ac_try="$ac_compiler $ac_option >&5"
16320 case "(($ac_try" in
16321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16322 *) ac_try_echo=$ac_try;;
16323 esac
16324 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16325 printf "%s\n" "$ac_try_echo"; } >&5
16326 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
16327 ac_status=$?
16328 if test -s conftest.err; then
16329 sed '10a\
16330 ... rest of stderr output deleted ...
16331 10q' conftest.err >conftest.er1
16332 cat conftest.er1 >&5
16333 fi
16334 rm -f conftest.er1 conftest.err
16335 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16336 test $ac_status = 0; }
16337 done
16338
16339 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5
16340 printf %s "checking whether the compiler supports GNU C... " >&6; }
16341 if test ${ac_cv_c_compiler_gnu+y}
16342 then :
16343 printf %s "(cached) " >&6
16344 else $as_nop
16345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16346 /* end confdefs.h. */
16347
16348 int
16349 main (void)
16350 {
16351 #ifndef __GNUC__
16352 choke me
16353 #endif
16354
16355 ;
16356 return 0;
16357 }
16358 _ACEOF
16359 if ac_fn_c_try_compile "$LINENO"
16360 then :
16361 ac_compiler_gnu=yes
16362 else $as_nop
16363 ac_compiler_gnu=no
16364 fi
16365 rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext
16366 ac_cv_c_compiler_gnu=$ac_compiler_gnu
16367
16368 fi
16369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
16370 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; }
16371 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16372
16373 if test $ac_compiler_gnu = yes; then
16374 GCC_FOR_BUILD=yes
16375 else
16376 GCC_FOR_BUILD=
16377 fi
16378 ac_test_CFLAGS=${CFLAGS_FOR_BUILD+y}
16379 ac_save_CFLAGS=$CFLAGS_FOR_BUILD
16380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC_FOR_BUILD accepts -g" >&5
16381 printf %s "checking whether $CC_FOR_BUILD accepts -g... " >&6; }
16382 if test ${ac_cv_build_prog_cc_g+y}
16383 then :
16384 printf %s "(cached) " >&6
16385 else $as_nop
16386 ac_save_c_werror_flag=$ac_c_werror_flag
16387 ac_c_werror_flag=yes
16388 ac_cv_build_prog_cc_g=no
16389 CFLAGS_FOR_BUILD="-g"
16390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16391 /* end confdefs.h. */
16392
16393 int
16394 main (void)
16395 {
16396
16397 ;
16398 return 0;
16399 }
16400 _ACEOF
16401 if ac_fn_c_try_compile "$LINENO"
16402 then :
16403 ac_cv_build_prog_cc_g=yes
16404 else $as_nop
16405 CFLAGS_FOR_BUILD=""
16406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16407 /* end confdefs.h. */
16408
16409 int
16410 main (void)
16411 {
16412
16413 ;
16414 return 0;
16415 }
16416 _ACEOF
16417 if ac_fn_c_try_compile "$LINENO"
16418 then :
16419
16420 else $as_nop
16421 ac_c_werror_flag=$ac_save_c_werror_flag
16422 CFLAGS_FOR_BUILD="-g"
16423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16424 /* end confdefs.h. */
16425
16426 int
16427 main (void)
16428 {
16429
16430 ;
16431 return 0;
16432 }
16433 _ACEOF
16434 if ac_fn_c_try_compile "$LINENO"
16435 then :
16436 ac_cv_build_prog_cc_g=yes
16437 fi
16438 rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext
16439 fi
16440 rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext
16441 fi
16442 rm -f core conftest.err conftest.$ac_build_objext conftest.beam conftest.$ac_ext
16443 ac_c_werror_flag=$ac_save_c_werror_flag
16444 fi
16445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_g" >&5
16446 printf "%s\n" "$ac_cv_build_prog_cc_g" >&6; }
16447 if test $ac_test_CFLAGS; then
16448 CFLAGS_FOR_BUILD=$ac_save_CFLAGS
16449 elif test $ac_cv_build_prog_cc_g = yes; then
16450 if test "$GCC_FOR_BUILD" = yes; then
16451 CFLAGS_FOR_BUILD="-g -O2"
16452 else
16453 CFLAGS_FOR_BUILD="-g"
16454 fi
16455 else
16456 if test "$GCC_FOR_BUILD" = yes; then
16457 CFLAGS_FOR_BUILD="-O2"
16458 else
16459 CFLAGS_FOR_BUILD=
16460 fi
16461 fi
16462 ac_build_prog_cc_stdc=no
16463 if test x$ac_build_prog_cc_stdc = xno
16464 then :
16465 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C11 features" >&5
16466 printf %s "checking for $CC_FOR_BUILD option to enable C11 features... " >&6; }
16467 if test ${ac_cv_build_prog_cc_c11+y}
16468 then :
16469 printf %s "(cached) " >&6
16470 else $as_nop
16471 ac_cv_build_prog_cc_c11=no
16472 ac_save_CC=$CC_FOR_BUILD
16473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16474 /* end confdefs.h. */
16475 $ac_c_conftest_c11_program
16476 _ACEOF
16477 for ac_arg in '' -std=gnu11
16478 do
16479 CC_FOR_BUILD="$ac_save_CC $ac_arg"
16480 if ac_fn_c_try_compile "$LINENO"
16481 then :
16482 ac_cv_build_prog_cc_c11=$ac_arg
16483 fi
16484 rm -f core conftest.err conftest.$ac_build_objext conftest.beam
16485 test "x$ac_cv_build_prog_cc_c11" != "xno" && break
16486 done
16487 rm -f conftest.$ac_ext
16488 CC_FOR_BUILD=$ac_save_CC
16489 fi
16490
16491 if test "x$ac_cv_build_prog_cc_c11" = xno
16492 then :
16493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
16494 printf "%s\n" "unsupported" >&6; }
16495 else $as_nop
16496 if test "x$ac_cv_build_prog_cc_c11" = x
16497 then :
16498 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
16499 printf "%s\n" "none needed" >&6; }
16500 else $as_nop
16501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c11" >&5
16502 printf "%s\n" "$ac_cv_build_prog_cc_c11" >&6; }
16503 CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c11"
16504 fi
16505 ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c11
16506 ac_build_prog_cc_stdc=c11
16507 fi
16508 fi
16509 if test x$ac_build_prog_cc_stdc = xno
16510 then :
16511 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C99 features" >&5
16512 printf %s "checking for $CC_FOR_BUILD option to enable C99 features... " >&6; }
16513 if test ${ac_cv_build_prog_cc_c99+y}
16514 then :
16515 printf %s "(cached) " >&6
16516 else $as_nop
16517 ac_cv_build_prog_cc_c99=no
16518 ac_save_CC=$CC_FOR_BUILD
16519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16520 /* end confdefs.h. */
16521 $ac_c_conftest_c99_program
16522 _ACEOF
16523 for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99=
16524 do
16525 CC_FOR_BUILD="$ac_save_CC $ac_arg"
16526 if ac_fn_c_try_compile "$LINENO"
16527 then :
16528 ac_cv_build_prog_cc_c99=$ac_arg
16529 fi
16530 rm -f core conftest.err conftest.$ac_build_objext conftest.beam
16531 test "x$ac_cv_build_prog_cc_c99" != "xno" && break
16532 done
16533 rm -f conftest.$ac_ext
16534 CC_FOR_BUILD=$ac_save_CC
16535 fi
16536
16537 if test "x$ac_cv_build_prog_cc_c99" = xno
16538 then :
16539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
16540 printf "%s\n" "unsupported" >&6; }
16541 else $as_nop
16542 if test "x$ac_cv_build_prog_cc_c99" = x
16543 then :
16544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
16545 printf "%s\n" "none needed" >&6; }
16546 else $as_nop
16547 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c99" >&5
16548 printf "%s\n" "$ac_cv_build_prog_cc_c99" >&6; }
16549 CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c99"
16550 fi
16551 ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c99
16552 ac_build_prog_cc_stdc=c99
16553 fi
16554 fi
16555 if test x$ac_build_prog_cc_stdc = xno
16556 then :
16557 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC_FOR_BUILD option to enable C89 features" >&5
16558 printf %s "checking for $CC_FOR_BUILD option to enable C89 features... " >&6; }
16559 if test ${ac_cv_build_prog_cc_c89+y}
16560 then :
16561 printf %s "(cached) " >&6
16562 else $as_nop
16563 ac_cv_build_prog_cc_c89=no
16564 ac_save_CC=$CC_FOR_BUILD
16565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16566 /* end confdefs.h. */
16567 $ac_c_conftest_c89_program
16568 _ACEOF
16569 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
16570 do
16571 CC_FOR_BUILD="$ac_save_CC $ac_arg"
16572 if ac_fn_c_try_compile "$LINENO"
16573 then :
16574 ac_cv_build_prog_cc_c89=$ac_arg
16575 fi
16576 rm -f core conftest.err conftest.$ac_build_objext conftest.beam
16577 test "x$ac_cv_build_prog_cc_c89" != "xno" && break
16578 done
16579 rm -f conftest.$ac_ext
16580 CC_FOR_BUILD=$ac_save_CC
16581 fi
16582
16583 if test "x$ac_cv_build_prog_cc_c89" = xno
16584 then :
16585 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
16586 printf "%s\n" "unsupported" >&6; }
16587 else $as_nop
16588 if test "x$ac_cv_build_prog_cc_c89" = x
16589 then :
16590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
16591 printf "%s\n" "none needed" >&6; }
16592 else $as_nop
16593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build_prog_cc_c89" >&5
16594 printf "%s\n" "$ac_cv_build_prog_cc_c89" >&6; }
16595 CC_FOR_BUILD="$CC_FOR_BUILD $ac_cv_build_prog_cc_c89"
16596 fi
16597 ac_cv_build_prog_cc_stdc=$ac_cv_build_prog_cc_c89
16598 ac_build_prog_cc_stdc=c89
16599 fi
16600 fi
16601
16602 ac_ext=c
16603 ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
16604 ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
16605 ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
16606 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16607
16608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16609 /* end confdefs.h. */
16610
16611 int
16612 main (void)
16613 {
16614
16615 ;
16616 return 0;
16617 }
16618 _ACEOF
16619 ac_clean_files_save=$ac_clean_files
16620 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
16621 # Try to create an executable without -o first, disregard a.out.
16622 # It will help us diagnose broken compilers, and finding out an intuition
16623 # of exeext.
16624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
16625 printf %s "checking whether the C compiler works... " >&6; }
16626 ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
16627
16628 # The possible output files:
16629 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
16630
16631 ac_rmfiles=
16632 for ac_file in $ac_files
16633 do
16634 case $ac_file in
16635 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
16636 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
16637 esac
16638 done
16639 rm -f $ac_rmfiles
16640
16641 if { { ac_try="$ac_link_default"
16642 case "(($ac_try" in
16643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16644 *) ac_try_echo=$ac_try;;
16645 esac
16646 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16647 printf "%s\n" "$ac_try_echo"; } >&5
16648 (eval "$ac_link_default") 2>&5
16649 ac_status=$?
16650 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16651 test $ac_status = 0; }
16652 then :
16653 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
16654 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
16655 # in a Makefile. We should not override ac_cv_exeext if it was cached,
16656 # so that the user can short-circuit this test for compilers unknown to
16657 # Autoconf.
16658 for ac_file in $ac_files ''
16659 do
16660 test -f "$ac_file" || continue
16661 case $ac_file in
16662 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
16663 ;;
16664 [ab].out )
16665 # We found the default executable, but exeext='' is most
16666 # certainly right.
16667 break;;
16668 *.* )
16669 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no;
16670 then :; else
16671 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
16672 fi
16673 # We set ac_cv_exeext here because the later test for it is not
16674 # safe: cross compilers may not add the suffix if given an `-o'
16675 # argument, so we may need to know it at that point already.
16676 # Even if this section looks crufty: it has the advantage of
16677 # actually working.
16678 break;;
16679 * )
16680 break;;
16681 esac
16682 done
16683 test "$ac_cv_exeext" = no && ac_cv_exeext=
16684
16685 else $as_nop
16686 ac_file=''
16687 fi
16688 if test -z "$ac_file"
16689 then :
16690 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
16691 printf "%s\n" "no" >&6; }
16692 printf "%s\n" "$as_me: failed program was:" >&5
16693 sed 's/^/| /' conftest.$ac_ext >&5
16694
16695 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16696 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16697 as_fn_error 77 "C compiler cannot create executables
16698 See \`config.log' for more details" "$LINENO" 5; }
16699 else $as_nop
16700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16701 printf "%s\n" "yes" >&6; }
16702 fi
16703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
16704 printf %s "checking for C compiler default output file name... " >&6; }
16705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
16706 printf "%s\n" "$ac_file" >&6; }
16707 ac_build_exeext=$ac_cv_exeext
16708
16709 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
16710 ac_clean_files=$ac_clean_files_save
16711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
16712 printf %s "checking for suffix of executables... " >&6; }
16713 if { { ac_try="$ac_link"
16714 case "(($ac_try" in
16715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16716 *) ac_try_echo=$ac_try;;
16717 esac
16718 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16719 printf "%s\n" "$ac_try_echo"; } >&5
16720 (eval "$ac_link") 2>&5
16721 ac_status=$?
16722 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16723 test $ac_status = 0; }
16724 then :
16725 # If both `conftest.exe' and `conftest' are `present' (well, observable)
16726 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
16727 # work properly (i.e., refer to `conftest.exe'), while it won't with
16728 # `rm'.
16729 for ac_file in conftest.exe conftest conftest.*; do
16730 test -f "$ac_file" || continue
16731 case $ac_file in
16732 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
16733 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
16734 break;;
16735 * ) break;;
16736 esac
16737 done
16738 else $as_nop
16739 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16740 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16741 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
16742 See \`config.log' for more details" "$LINENO" 5; }
16743 fi
16744 rm -f conftest conftest$ac_cv_exeext
16745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
16746 printf "%s\n" "$ac_cv_exeext" >&6; }
16747
16748 rm -f conftest.$ac_ext
16749 EXEEXT=$ac_cv_exeext
16750 ac_build_exeext=$EXEEXT
16751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16752 /* end confdefs.h. */
16753 #include <stdio.h>
16754 int
16755 main (void)
16756 {
16757 FILE *f = fopen ("conftest.out", "w");
16758 return ferror (f) || fclose (f) != 0;
16759
16760 ;
16761 return 0;
16762 }
16763 _ACEOF
16764 ac_clean_files="$ac_clean_files conftest.out"
16765 # Check that the compiler produces executables we can run. If not, either
16766 # the compiler is broken, or we cross compile.
16767 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
16768 printf %s "checking whether we are cross compiling... " >&6; }
16769 if test "$cross_compiling_build" != yes; then
16770 { { ac_try="$ac_link"
16771 case "(($ac_try" in
16772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16773 *) ac_try_echo=$ac_try;;
16774 esac
16775 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16776 printf "%s\n" "$ac_try_echo"; } >&5
16777 (eval "$ac_link") 2>&5
16778 ac_status=$?
16779 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16780 test $ac_status = 0; }
16781 if { ac_try='./conftest$ac_cv_exeext'
16782 { { case "(($ac_try" in
16783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16784 *) ac_try_echo=$ac_try;;
16785 esac
16786 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16787 printf "%s\n" "$ac_try_echo"; } >&5
16788 (eval "$ac_try") 2>&5
16789 ac_status=$?
16790 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16791 test $ac_status = 0; }; }; then
16792 cross_compiling_build=no
16793 else
16794 if test "$cross_compiling_build" = maybe; then
16795 cross_compiling_build=yes
16796 else
16797 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16798 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16799 as_fn_error 77 "cannot run C compiled programs.
16800 If you meant to cross compile, use \`--build'.
16801 See \`config.log' for more details" "$LINENO" 5; }
16802 fi
16803 fi
16804 fi
16805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling_build" >&5
16806 printf "%s\n" "$cross_compiling_build" >&6; }
16807
16808 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
16809 ac_clean_files=$ac_clean_files_save
16810
16811 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
16812 printf %s "checking for suffix of object files... " >&6; }
16813 if test ${ac_cv_objext+y}
16814 then :
16815 printf %s "(cached) " >&6
16816 else $as_nop
16817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16818 /* end confdefs.h. */
16819
16820 int
16821 main (void)
16822 {
16823
16824 ;
16825 return 0;
16826 }
16827 _ACEOF
16828 rm -f conftest.o conftest.obj
16829 if { { ac_try="$ac_compile"
16830 case "(($ac_try" in
16831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16832 *) ac_try_echo=$ac_try;;
16833 esac
16834 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
16835 printf "%s\n" "$ac_try_echo"; } >&5
16836 (eval "$ac_compile") 2>&5
16837 ac_status=$?
16838 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
16839 test $ac_status = 0; }
16840 then :
16841 for ac_file in conftest.o conftest.obj conftest.*; do
16842 test -f "$ac_file" || continue;
16843 case $ac_file in
16844 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
16845 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
16846 break;;
16847 esac
16848 done
16849 else $as_nop
16850 printf "%s\n" "$as_me: failed program was:" >&5
16851 sed 's/^/| /' conftest.$ac_ext >&5
16852
16853 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16854 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16855 as_fn_error $? "cannot compute suffix of object files: cannot compile
16856 See \`config.log' for more details" "$LINENO" 5; }
16857 fi
16858 rm -f conftest.$ac_cv_objext conftest.$ac_ext
16859 fi
16860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
16861 printf "%s\n" "$ac_cv_objext" >&6; }
16862 OBJEXT=$ac_cv_objext
16863 ac_build_objext=$OBJEXT
16864
16865 ac_ext=c
16866 ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
16867 ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
16868 ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
16869 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
16871 printf %s "checking how to run the C preprocessor... " >&6; }
16872 # On Suns, sometimes $CPP names a directory.
16873 if test -n "$CPP_FOR_BUILD" && test -d "$CPP_FOR_BUILD"; then
16874 CPP_FOR_BUILD=
16875 fi
16876 if test -z "$CPP_FOR_BUILD"; then
16877 if test ${ac_cv_build_prog_CPP+y}
16878 then :
16879 printf %s "(cached) " >&6
16880 else $as_nop
16881 # Double quotes because $CC needs to be expanded
16882 for CPP_FOR_BUILD in "$CC_FOR_BUILD -E" "$CC_FOR_BUILD -E -traditional-cpp" cpp /lib/cpp
16883 do
16884 ac_preproc_ok=false
16885 for ac_c_preproc_warn_flag in '' yes
16886 do
16887 # Use a header file that comes with gcc, so configuring glibc
16888 # with a fresh cross-compiler works.
16889 # On the NeXT, cc -E runs the code through the compiler's parser,
16890 # not just through cpp. "Syntax error" is here to catch this case.
16891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16892 /* end confdefs.h. */
16893 #include <limits.h>
16894 Syntax error
16895 _ACEOF
16896 if ac_fn_c_try_cpp "$LINENO"
16897 then :
16898
16899 else $as_nop
16900 # Broken: fails on valid input.
16901 continue
16902 fi
16903 rm -f conftest.err conftest.i conftest.$ac_ext
16904
16905 # OK, works on sane cases. Now check whether nonexistent headers
16906 # can be detected and how.
16907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16908 /* end confdefs.h. */
16909 #include <ac_nonexistent.h>
16910 _ACEOF
16911 if ac_fn_c_try_cpp "$LINENO"
16912 then :
16913 # Broken: success on invalid input.
16914 continue
16915 else $as_nop
16916 # Passes both tests.
16917 ac_preproc_ok=:
16918 break
16919 fi
16920 rm -f conftest.err conftest.i conftest.$ac_ext
16921
16922 done
16923 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16924 rm -f conftest.i conftest.err conftest.$ac_ext
16925 if $ac_preproc_ok
16926 then :
16927 break
16928 fi
16929
16930 done
16931 ac_cv_build_prog_CPP=$CPP_FOR_BUILD
16932
16933 fi
16934 CPP_FOR_BUILD=$ac_cv_build_prog_CPP
16935 else
16936 ac_cv_build_prog_CPP=$CPP_FOR_BUILD
16937 fi
16938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5
16939 printf "%s\n" "$CPP_FOR_BUILD" >&6; }
16940 ac_preproc_ok=false
16941 for ac_c_preproc_warn_flag in '' yes
16942 do
16943 # Use a header file that comes with gcc, so configuring glibc
16944 # with a fresh cross-compiler works.
16945 # On the NeXT, cc -E runs the code through the compiler's parser,
16946 # not just through cpp. "Syntax error" is here to catch this case.
16947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16948 /* end confdefs.h. */
16949 #include <limits.h>
16950 Syntax error
16951 _ACEOF
16952 if ac_fn_c_try_cpp "$LINENO"
16953 then :
16954
16955 else $as_nop
16956 # Broken: fails on valid input.
16957 continue
16958 fi
16959 rm -f conftest.err conftest.i conftest.$ac_ext
16960
16961 # OK, works on sane cases. Now check whether nonexistent headers
16962 # can be detected and how.
16963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16964 /* end confdefs.h. */
16965 #include <ac_nonexistent.h>
16966 _ACEOF
16967 if ac_fn_c_try_cpp "$LINENO"
16968 then :
16969 # Broken: success on invalid input.
16970 continue
16971 else $as_nop
16972 # Passes both tests.
16973 ac_preproc_ok=:
16974 break
16975 fi
16976 rm -f conftest.err conftest.i conftest.$ac_ext
16977
16978 done
16979 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16980 rm -f conftest.i conftest.err conftest.$ac_ext
16981 if $ac_preproc_ok
16982 then :
16983
16984 else $as_nop
16985 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
16986 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
16987 as_fn_error $? "C preprocessor \"$CPP_FOR_BUILD\" fails sanity check
16988 See \`config.log' for more details" "$LINENO" 5; }
16989 fi
16990
16991 ac_ext=c
16992 ac_cpp='$CPP_FOR_BUILD $CPPFLAGS_FOR_BUILD'
16993 ac_compile='$CC_FOR_BUILD -c $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD conftest.$ac_ext >&5'
16994 ac_link='$CC_FOR_BUILD -o conftest$ac_build_exeext $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD $LDFLAGS_FOR_BUILD conftest.$ac_ext $LIBS >&5'
16995 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16996
16997
16998 BUILD_EXEEXT=$ac_cv_exeext
16999 BUILD_OBJEXT=$ac_cv_objext
17000
17001 ac_cv_exeext=$ac_cv_host_exeext
17002 EXEEXT=$ac_cv_host_exeext
17003 ac_cv_objext=$ac_cv_host_objext
17004 OBJEXT=$ac_cv_host_objext
17005 ac_cv_c_compiler_gnu=$ac_cv_host_c_compiler_gnu
17006 ac_compiler_gnu=$ac_cv_host_c_compiler_gnu
17007
17008 ac_ext=c
17009 ac_cpp='$CPP $CPPFLAGS'
17010 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17011 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17012 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17013
17014
17015
17016 # Note that *-pc-windows is not supported for _build_ so we can use '-o'
17017 SAK_BUILD="$CC_FOR_BUILD $LDFLAGS_FOR_BUILD -o \$(1) \$(2) $CFLAGS_FOR_BUILD $CPPFLAGS_FOR_BUILD"
17018 SAK="\$(ROOTDIR)/runtime/sak${BUILD_EXEEXT}"
17019 fi
17020
17021 # sak command to use to encode C literal strings
17022
17023 case $target in #(
17024 *-w64-mingw32*|*-pc-windows) :
17025 encode_C_literal="encode-C-utf16-literal" ;; #(
17026 *) :
17027 encode_C_literal="encode-C-utf8-literal" ;;
17028 esac
17029
17030 # Winpthreads emulation library for the MSVC port
17031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for winpthreads sources" >&5
17032 printf %s "checking for winpthreads sources... " >&6; }
17033 if test x"$with_winpthreads_msvc" = "xno"
17034 then :
17035 winpthreads_source_dir=''
17036 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
17037 printf "%s\n" "disabled" >&6; }
17038 else $as_nop
17039 winpthreadmsg=''
17040 case $target in #(
17041 *-pc-windows) :
17042 if test x"$with_winpthreads_msvc" = 'x' || test x"$with_winpthreads_msvc" = x'winpthreads'
17043 then :
17044 if test -f 'winpthreads/src/winpthread_internal.h'
17045 then :
17046 winpthreads_source_dir=winpthreads
17047 else $as_nop
17048 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: required but not available (uninitialized submodule?)" >&5
17049 printf "%s\n" "required but not available (uninitialized submodule?)" >&6; }
17050 as_fn_error $? "exiting" "$LINENO" 5
17051 fi
17052 else $as_nop
17053 rm -rf winpthreads-sources
17054 if test -f "$with_winpthreads_msvc/src/winpthread_internal.h"
17055 then :
17056 mkdir -p winpthreads-sources/src winpthreads-sources/include
17057 cp "$with_winpthreads_msvc"/src/*.c winpthreads-sources/src
17058 cp "$with_winpthreads_msvc"/src/*.h winpthreads-sources/src
17059 cp "$with_winpthreads_msvc"/include/*.h winpthreads-sources/include
17060 winpthreads_source_dir='winpthreads-sources'
17061 winpthreadsmsg=" (from $with_winpthreads_msvc)"
17062 else $as_nop
17063 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available" >&5
17064 printf "%s\n" "requested but not available" >&6; }
17065 as_fn_error $? "exiting" "$LINENO" 5
17066 fi
17067 fi
17068 if test x"$winpthreads_source_dir" = 'x'
17069 then :
17070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
17071 printf "%s\n" "no" >&6; }
17072 else $as_nop
17073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $winpthreads_source_dir$winpthreadsmsg" >&5
17074 printf "%s\n" "$winpthreads_source_dir$winpthreadsmsg" >&6; }
17075 winpthreads_source_include_dir="$winpthreads_source_dir/include"
17076
17077
17078 saved_CC="$CC"
17079 saved_CFLAGS="$CFLAGS"
17080 saved_CPPFLAGS="$CPPFLAGS"
17081 saved_LIBS="$LIBS"
17082 saved_ac_ext="$ac_ext"
17083 saved_ac_compile="$ac_compile"
17084 # Move the content of confdefs.h to another file so it does not
17085 # get included
17086 mv confdefs.h confdefs.h.bak
17087 touch confdefs.h
17088
17089
17090 if test -n "$winpthreads_source_include_dir"
17091 then :
17092 CPPFLAGS="-I $winpthreads_source_include_dir $CPPFLAGS"
17093 fi
17094 ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
17095 if test "x$ac_cv_header_pthread_h" = xyes
17096 then :
17097
17098 else $as_nop
17099 as_fn_error $? "cannot find or use pthread.h from winpthreads" "$LINENO" 5
17100 fi
17101
17102
17103
17104 # Restore the content of confdefs.h
17105 mv confdefs.h.bak confdefs.h
17106 ac_compile="$saved_ac_compile"
17107 ac_ext="$saved_ac_ext"
17108 CPPFLAGS="$saved_CPPFLAGS"
17109 CFLAGS="$saved_CFLAGS"
17110 CC="$saved_CC"
17111 LIBS="$saved_LIBS"
17112
17113
17114 fi ;; #(
17115 *) :
17116 if test x"$with_winpthreads_msvc" != 'x'
17117 then :
17118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not supported" >&5
17119 printf "%s\n" "requested but not supported" >&6; }
17120 as_fn_error $? "exiting" "$LINENO" 5
17121 else $as_nop
17122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: skipping on that platform" >&5
17123 printf "%s\n" "skipping on that platform" >&6; }
17124 fi ;;
17125 esac
17126 fi
17127
17128 ## Program to use to install files
17129
17130 # Find a good install program. We prefer a C program (faster),
17131 # so one script is as good as another. But avoid the broken or
17132 # incompatible versions:
17133 # SysV /etc/install, /usr/sbin/install
17134 # SunOS /usr/etc/install
17135 # IRIX /sbin/install
17136 # AIX /bin/install
17137 # AmigaOS /C/install, which installs bootblocks on floppy discs
17138 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
17139 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
17140 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
17141 # OS/2's system install, which has a completely different semantic
17142 # ./install, which can be erroneously created by make from ./install.sh.
17143 # Reject install programs that cannot install multiple files.
17144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
17145 printf %s "checking for a BSD-compatible install... " >&6; }
17146 if test -z "$INSTALL"; then
17147 if test ${ac_cv_path_install+y}
17148 then :
17149 printf %s "(cached) " >&6
17150 else $as_nop
17151 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17152 for as_dir in $PATH
17153 do
17154 IFS=$as_save_IFS
17155 case $as_dir in #(((
17156 '') as_dir=./ ;;
17157 */) ;;
17158 *) as_dir=$as_dir/ ;;
17159 esac
17160 # Account for fact that we put trailing slashes in our PATH walk.
17161 case $as_dir in #((
17162 ./ | /[cC]/* | \
17163 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
17164 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
17165 /usr/ucb/* ) ;;
17166 *)
17167 # OSF1 and SCO ODT 3.0 have their own names for install.
17168 # Don't use installbsd from OSF since it installs stuff as root
17169 # by default.
17170 for ac_prog in ginstall scoinst install; do
17171 for ac_exec_ext in '' $ac_executable_extensions; do
17172 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then
17173 if test $ac_prog = install &&
17174 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
17175 # AIX install. It has an incompatible calling convention.
17176 :
17177 elif test $ac_prog = install &&
17178 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
17179 # program-specific install script used by HP pwplus--don't use.
17180 :
17181 else
17182 rm -rf conftest.one conftest.two conftest.dir
17183 echo one > conftest.one
17184 echo two > conftest.two
17185 mkdir conftest.dir
17186 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" &&
17187 test -s conftest.one && test -s conftest.two &&
17188 test -s conftest.dir/conftest.one &&
17189 test -s conftest.dir/conftest.two
17190 then
17191 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c"
17192 break 3
17193 fi
17194 fi
17195 fi
17196 done
17197 done
17198 ;;
17199 esac
17200
17201 done
17202 IFS=$as_save_IFS
17203
17204 rm -rf conftest.one conftest.two conftest.dir
17205
17206 fi
17207 if test ${ac_cv_path_install+y}; then
17208 INSTALL=$ac_cv_path_install
17209 else
17210 # As a last resort, use the slow shell script. Don't cache a
17211 # value for INSTALL within a source directory, because that will
17212 # break other packages using the cache if that directory is
17213 # removed, or if the value is a relative name.
17214 INSTALL=$ac_install_sh
17215 fi
17216 fi
17217 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
17218 printf "%s\n" "$INSTALL" >&6; }
17219
17220 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
17221 # It thinks the first close brace ends the variable substitution.
17222 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
17223
17224 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
17225
17226 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
17227
17228
17229 # Checks for libraries
17230
17231 ## Mathematical library
17232 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing cos" >&5
17233 printf %s "checking for library containing cos... " >&6; }
17234 if test ${ac_cv_search_cos+y}
17235 then :
17236 printf %s "(cached) " >&6
17237 else $as_nop
17238 ac_func_search_save_LIBS=$LIBS
17239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17240 /* end confdefs.h. */
17241
17242 /* Override any GCC internal prototype to avoid an error.
17243 Use char because int might match the return type of a GCC
17244 builtin and then its argument prototype would still apply. */
17245 char cos ();
17246 int
17247 main (void)
17248 {
17249 return cos ();
17250 ;
17251 return 0;
17252 }
17253 _ACEOF
17254 for ac_lib in '' m
17255 do
17256 if test -z "$ac_lib"; then
17257 ac_res="none required"
17258 else
17259 ac_res=-l$ac_lib
17260 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17261 fi
17262 if ac_fn_c_try_link "$LINENO"
17263 then :
17264 ac_cv_search_cos=$ac_res
17265 fi
17266 rm -f core conftest.err conftest.$ac_objext conftest.beam \
17267 conftest$ac_exeext
17268 if test ${ac_cv_search_cos+y}
17269 then :
17270 break
17271 fi
17272 done
17273 if test ${ac_cv_search_cos+y}
17274 then :
17275
17276 else $as_nop
17277 ac_cv_search_cos=no
17278 fi
17279 rm conftest.$ac_ext
17280 LIBS=$ac_func_search_save_LIBS
17281 fi
17282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_cos" >&5
17283 printf "%s\n" "$ac_cv_search_cos" >&6; }
17284 ac_res=$ac_cv_search_cos
17285 if test "$ac_res" != no
17286 then :
17287 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17288 case $ac_cv_search_cos in #(
17289 no) :
17290 as_fn_error $? "Could not locate C math functions" "$LINENO" 5 ;; #(
17291 'none required') :
17292 mathlib="" ;; #(
17293 *) :
17294 mathlib="$ac_cv_search_cos" ;;
17295 esac
17296 fi
17297
17298
17299 # Checks for header files
17300
17301 ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "$ac_includes_default"
17302 if test "x$ac_cv_header_pthread_np_h" = xyes
17303 then :
17304 printf "%s\n" "#define HAS_PTHREAD_NP_H 1" >>confdefs.h
17305
17306 fi
17307
17308 ac_fn_c_check_header_compile "$LINENO" "dirent.h" "ac_cv_header_dirent_h" "#include <sys/types.h>
17309 "
17310 if test "x$ac_cv_header_dirent_h" = xyes
17311 then :
17312 printf "%s\n" "#define HAS_DIRENT 1" >>confdefs.h
17313
17314 fi
17315
17316
17317 ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "#include <sys/types.h>
17318 "
17319 if test "x$ac_cv_header_sys_select_h" = xyes
17320 then :
17321 printf "%s\n" "#define HAS_SYS_SELECT_H 1" >>confdefs.h
17322
17323 fi
17324
17325
17326 ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
17327 if test "x$ac_cv_header_sys_mman_h" = xyes
17328 then :
17329 printf "%s\n" "#define HAS_SYS_MMAN_H 1" >>confdefs.h
17330
17331 fi
17332
17333
17334 case $target in #(
17335 *-*-linux*) :
17336 ac_fn_c_check_header_compile "$LINENO" "linux/futex.h" "ac_cv_header_linux_futex_h" "$ac_includes_default"
17337 if test "x$ac_cv_header_linux_futex_h" = xyes
17338 then :
17339 printf "%s\n" "#define HAS_LINUX_FUTEX_H 1" >>confdefs.h
17340
17341 fi
17342 ;; #(
17343 *) :
17344 ;;
17345 esac
17346
17347 # Checks for types
17348
17349 ## off_t
17350 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
17351 if test "x$ac_cv_type_off_t" = xyes
17352 then :
17353
17354 else $as_nop
17355
17356 printf "%s\n" "#define off_t long int" >>confdefs.h
17357
17358 fi
17359
17360
17361 # Checks for structures
17362
17363 # Checks for compiler characteristics
17364
17365 # The cast to long int works around a bug in the HP C Compiler
17366 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17367 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17368 # This bug is HP SR number 8606223364.
17369 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
17370 printf %s "checking size of int... " >&6; }
17371 if test ${ac_cv_sizeof_int+y}
17372 then :
17373 printf %s "(cached) " >&6
17374 else $as_nop
17375 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"
17376 then :
17377
17378 else $as_nop
17379 if test "$ac_cv_type_int" = yes; then
17380 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17381 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17382 as_fn_error 77 "cannot compute sizeof (int)
17383 See \`config.log' for more details" "$LINENO" 5; }
17384 else
17385 ac_cv_sizeof_int=0
17386 fi
17387 fi
17388
17389 fi
17390 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
17391 printf "%s\n" "$ac_cv_sizeof_int" >&6; }
17392
17393
17394
17395 printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h
17396
17397
17398 # The cast to long int works around a bug in the HP C Compiler
17399 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17400 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17401 # This bug is HP SR number 8606223364.
17402 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
17403 printf %s "checking size of long... " >&6; }
17404 if test ${ac_cv_sizeof_long+y}
17405 then :
17406 printf %s "(cached) " >&6
17407 else $as_nop
17408 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"
17409 then :
17410
17411 else $as_nop
17412 if test "$ac_cv_type_long" = yes; then
17413 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17414 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17415 as_fn_error 77 "cannot compute sizeof (long)
17416 See \`config.log' for more details" "$LINENO" 5; }
17417 else
17418 ac_cv_sizeof_long=0
17419 fi
17420 fi
17421
17422 fi
17423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
17424 printf "%s\n" "$ac_cv_sizeof_long" >&6; }
17425
17426
17427
17428 printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h
17429
17430
17431 # The cast to long int works around a bug in the HP C Compiler
17432 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17433 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17434 # This bug is HP SR number 8606223364.
17435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long *" >&5
17436 printf %s "checking size of long *... " >&6; }
17437 if test ${ac_cv_sizeof_long_p+y}
17438 then :
17439 printf %s "(cached) " >&6
17440 else $as_nop
17441 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long *))" "ac_cv_sizeof_long_p" "$ac_includes_default"
17442 then :
17443
17444 else $as_nop
17445 if test "$ac_cv_type_long_p" = yes; then
17446 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17447 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17448 as_fn_error 77 "cannot compute sizeof (long *)
17449 See \`config.log' for more details" "$LINENO" 5; }
17450 else
17451 ac_cv_sizeof_long_p=0
17452 fi
17453 fi
17454
17455 fi
17456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_p" >&5
17457 printf "%s\n" "$ac_cv_sizeof_long_p" >&6; }
17458
17459
17460
17461 printf "%s\n" "#define SIZEOF_LONG_P $ac_cv_sizeof_long_p" >>confdefs.h
17462
17463
17464 # The cast to long int works around a bug in the HP C Compiler
17465 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17466 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17467 # This bug is HP SR number 8606223364.
17468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
17469 printf %s "checking size of short... " >&6; }
17470 if test ${ac_cv_sizeof_short+y}
17471 then :
17472 printf %s "(cached) " >&6
17473 else $as_nop
17474 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"
17475 then :
17476
17477 else $as_nop
17478 if test "$ac_cv_type_short" = yes; then
17479 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17480 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17481 as_fn_error 77 "cannot compute sizeof (short)
17482 See \`config.log' for more details" "$LINENO" 5; }
17483 else
17484 ac_cv_sizeof_short=0
17485 fi
17486 fi
17487
17488 fi
17489 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
17490 printf "%s\n" "$ac_cv_sizeof_short" >&6; }
17491
17492
17493
17494 printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h
17495
17496
17497 # The cast to long int works around a bug in the HP C Compiler
17498 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
17499 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
17500 # This bug is HP SR number 8606223364.
17501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
17502 printf %s "checking size of long long... " >&6; }
17503 if test ${ac_cv_sizeof_long_long+y}
17504 then :
17505 printf %s "(cached) " >&6
17506 else $as_nop
17507 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"
17508 then :
17509
17510 else $as_nop
17511 if test "$ac_cv_type_long_long" = yes; then
17512 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17513 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17514 as_fn_error 77 "cannot compute sizeof (long long)
17515 See \`config.log' for more details" "$LINENO" 5; }
17516 else
17517 ac_cv_sizeof_long_long=0
17518 fi
17519 fi
17520
17521 fi
17522 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
17523 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; }
17524
17525
17526
17527 printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h
17528
17529
17530
17531 if test "x$ac_cv_sizeof_long_p" = "x4"
17532 then :
17533 bits=32; arch64=false
17534 elif test "x$ac_cv_sizeof_long_p" = "x8"
17535 then :
17536 bits=64; arch64=true
17537 printf "%s\n" "#define ARCH_SIXTYFOUR 1" >>confdefs.h
17538
17539 else $as_nop
17540 as_fn_error $? "Neither 32 nor 64 bits architecture." "$LINENO" 5
17541
17542 fi
17543
17544 if test "x$ac_cv_sizeof_int" != "x4" && test "x$ac_cv_sizeof_long" != "x4" \
17545 && test "x$ac_cv_sizeof_short" != "x4"
17546 then :
17547 as_fn_error $? "Sorry, we can't find a 32-bit integer type." "$LINENO" 5
17548
17549 fi
17550
17551 if test "x$ac_cv_sizeof_long" != "x8" &&
17552 test "x$ac_cv_sizeof_long_long" != "x8"
17553 then :
17554 as_fn_error $? "Sorry, we can't find a 64-bit integer type." "$LINENO" 5
17555
17556 fi
17557
17558 printf "%s\n" "#define SIZEOF_PTR $ac_cv_sizeof_long_p" >>confdefs.h
17559
17560 printf "%s\n" "#define SIZEOF_LONGLONG $ac_cv_sizeof_long_long" >>confdefs.h
17561
17562
17563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Target is a $bits bits architecture" >&5
17564 printf "%s\n" "$as_me: Target is a $bits bits architecture" >&6;}
17565
17566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
17567 printf %s "checking whether byte ordering is bigendian... " >&6; }
17568 if test ${ac_cv_c_bigendian+y}
17569 then :
17570 printf %s "(cached) " >&6
17571 else $as_nop
17572 ac_cv_c_bigendian=unknown
17573 # See if we're dealing with a universal compiler.
17574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17575 /* end confdefs.h. */
17576 #ifndef __APPLE_CC__
17577 not a universal capable compiler
17578 #endif
17579 typedef int dummy;
17580
17581 _ACEOF
17582 if ac_fn_c_try_compile "$LINENO"
17583 then :
17584
17585 # Check for potential -arch flags. It is not universal unless
17586 # there are at least two -arch flags with different values.
17587 ac_arch=
17588 ac_prev=
17589 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
17590 if test -n "$ac_prev"; then
17591 case $ac_word in
17592 i?86 | x86_64 | ppc | ppc64)
17593 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
17594 ac_arch=$ac_word
17595 else
17596 ac_cv_c_bigendian=universal
17597 break
17598 fi
17599 ;;
17600 esac
17601 ac_prev=
17602 elif test "x$ac_word" = "x-arch"; then
17603 ac_prev=arch
17604 fi
17605 done
17606 fi
17607 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17608 if test $ac_cv_c_bigendian = unknown; then
17609 # See if sys/param.h defines the BYTE_ORDER macro.
17610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17611 /* end confdefs.h. */
17612 #include <sys/types.h>
17613 #include <sys/param.h>
17614
17615 int
17616 main (void)
17617 {
17618 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
17619 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
17620 && LITTLE_ENDIAN)
17621 bogus endian macros
17622 #endif
17623
17624 ;
17625 return 0;
17626 }
17627 _ACEOF
17628 if ac_fn_c_try_compile "$LINENO"
17629 then :
17630 # It does; now see whether it defined to BIG_ENDIAN or not.
17631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17632 /* end confdefs.h. */
17633 #include <sys/types.h>
17634 #include <sys/param.h>
17635
17636 int
17637 main (void)
17638 {
17639 #if BYTE_ORDER != BIG_ENDIAN
17640 not big endian
17641 #endif
17642
17643 ;
17644 return 0;
17645 }
17646 _ACEOF
17647 if ac_fn_c_try_compile "$LINENO"
17648 then :
17649 ac_cv_c_bigendian=yes
17650 else $as_nop
17651 ac_cv_c_bigendian=no
17652 fi
17653 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17654 fi
17655 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17656 fi
17657 if test $ac_cv_c_bigendian = unknown; then
17658 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
17659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17660 /* end confdefs.h. */
17661 #include <limits.h>
17662
17663 int
17664 main (void)
17665 {
17666 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
17667 bogus endian macros
17668 #endif
17669
17670 ;
17671 return 0;
17672 }
17673 _ACEOF
17674 if ac_fn_c_try_compile "$LINENO"
17675 then :
17676 # It does; now see whether it defined to _BIG_ENDIAN or not.
17677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17678 /* end confdefs.h. */
17679 #include <limits.h>
17680
17681 int
17682 main (void)
17683 {
17684 #ifndef _BIG_ENDIAN
17685 not big endian
17686 #endif
17687
17688 ;
17689 return 0;
17690 }
17691 _ACEOF
17692 if ac_fn_c_try_compile "$LINENO"
17693 then :
17694 ac_cv_c_bigendian=yes
17695 else $as_nop
17696 ac_cv_c_bigendian=no
17697 fi
17698 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17699 fi
17700 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17701 fi
17702 if test $ac_cv_c_bigendian = unknown; then
17703 # Compile a test program.
17704 if test "$cross_compiling" = yes
17705 then :
17706 # Try to guess by grepping values from an object file.
17707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17708 /* end confdefs.h. */
17709 unsigned short int ascii_mm[] =
17710 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17711 unsigned short int ascii_ii[] =
17712 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17713 int use_ascii (int i) {
17714 return ascii_mm[i] + ascii_ii[i];
17715 }
17716 unsigned short int ebcdic_ii[] =
17717 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17718 unsigned short int ebcdic_mm[] =
17719 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17720 int use_ebcdic (int i) {
17721 return ebcdic_mm[i] + ebcdic_ii[i];
17722 }
17723 extern int foo;
17724
17725 int
17726 main (void)
17727 {
17728 return use_ascii (foo) == use_ebcdic (foo);
17729 ;
17730 return 0;
17731 }
17732 _ACEOF
17733 if ac_fn_c_try_compile "$LINENO"
17734 then :
17735 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
17736 ac_cv_c_bigendian=yes
17737 fi
17738 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
17739 if test "$ac_cv_c_bigendian" = unknown; then
17740 ac_cv_c_bigendian=no
17741 else
17742 # finding both strings is unlikely to happen, but who knows?
17743 ac_cv_c_bigendian=unknown
17744 fi
17745 fi
17746 fi
17747 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
17748 else $as_nop
17749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17750 /* end confdefs.h. */
17751 $ac_includes_default
17752 int
17753 main (void)
17754 {
17755
17756 /* Are we little or big endian? From Harbison&Steele. */
17757 union
17758 {
17759 long int l;
17760 char c[sizeof (long int)];
17761 } u;
17762 u.l = 1;
17763 return u.c[sizeof (long int) - 1] == 1;
17764
17765 ;
17766 return 0;
17767 }
17768 _ACEOF
17769 if ac_fn_c_try_run "$LINENO"
17770 then :
17771 ac_cv_c_bigendian=no
17772 else $as_nop
17773 ac_cv_c_bigendian=yes
17774 fi
17775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17776 conftest.$ac_objext conftest.beam conftest.$ac_ext
17777 fi
17778
17779 fi
17780 fi
17781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
17782 printf "%s\n" "$ac_cv_c_bigendian" >&6; }
17783 case $ac_cv_c_bigendian in #(
17784 yes)
17785
17786 printf "%s\n" "#define ARCH_BIG_ENDIAN 1" >>confdefs.h
17787
17788 endianness="be"
17789 ;; #(
17790 no)
17791 endianness="le" ;; #(
17792 universal)
17793 as_fn_error $? "unable to handle universal endianness" "$LINENO" 5
17794
17795 ;; #(
17796 *)
17797 as_fn_error $? "could not determine endianness." "$LINENO" 5 ;;
17798 esac
17799
17800
17801 # The cast to long int works around a bug in the HP C Compiler,
17802 # see AC_CHECK_SIZEOF for more information.
17803 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of double" >&5
17804 printf %s "checking alignment of double... " >&6; }
17805 if test ${ac_cv_alignof_double+y}
17806 then :
17807 printf %s "(cached) " >&6
17808 else $as_nop
17809 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_double" "$ac_includes_default
17810 typedef struct { char x; double y; } ac__type_alignof_;"
17811 then :
17812
17813 else $as_nop
17814 if test "$ac_cv_type_double" = yes; then
17815 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17816 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17817 as_fn_error 77 "cannot compute alignment of double
17818 See \`config.log' for more details" "$LINENO" 5; }
17819 else
17820 ac_cv_alignof_double=0
17821 fi
17822 fi
17823
17824 fi
17825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_double" >&5
17826 printf "%s\n" "$ac_cv_alignof_double" >&6; }
17827
17828
17829
17830 printf "%s\n" "#define ALIGNOF_DOUBLE $ac_cv_alignof_double" >>confdefs.h
17831
17832
17833 # The cast to long int works around a bug in the HP C Compiler,
17834 # see AC_CHECK_SIZEOF for more information.
17835 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of long" >&5
17836 printf %s "checking alignment of long... " >&6; }
17837 if test ${ac_cv_alignof_long+y}
17838 then :
17839 printf %s "(cached) " >&6
17840 else $as_nop
17841 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default
17842 typedef struct { char x; long y; } ac__type_alignof_;"
17843 then :
17844
17845 else $as_nop
17846 if test "$ac_cv_type_long" = yes; then
17847 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17848 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17849 as_fn_error 77 "cannot compute alignment of long
17850 See \`config.log' for more details" "$LINENO" 5; }
17851 else
17852 ac_cv_alignof_long=0
17853 fi
17854 fi
17855
17856 fi
17857 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5
17858 printf "%s\n" "$ac_cv_alignof_long" >&6; }
17859
17860
17861
17862 printf "%s\n" "#define ALIGNOF_LONG $ac_cv_alignof_long" >>confdefs.h
17863
17864
17865 # The cast to long int works around a bug in the HP C Compiler,
17866 # see AC_CHECK_SIZEOF for more information.
17867 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking alignment of long long" >&5
17868 printf %s "checking alignment of long long... " >&6; }
17869 if test ${ac_cv_alignof_long_long+y}
17870 then :
17871 printf %s "(cached) " >&6
17872 else $as_nop
17873 if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long_long" "$ac_includes_default
17874 typedef struct { char x; long long y; } ac__type_alignof_;"
17875 then :
17876
17877 else $as_nop
17878 if test "$ac_cv_type_long_long" = yes; then
17879 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17880 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
17881 as_fn_error 77 "cannot compute alignment of long long
17882 See \`config.log' for more details" "$LINENO" 5; }
17883 else
17884 ac_cv_alignof_long_long=0
17885 fi
17886 fi
17887
17888 fi
17889 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long_long" >&5
17890 printf "%s\n" "$ac_cv_alignof_long_long" >&6; }
17891
17892
17893
17894 printf "%s\n" "#define ALIGNOF_LONG_LONG $ac_cv_alignof_long_long" >>confdefs.h
17895
17896
17897
17898 align_double=false
17899 align_int64=false
17900
17901 if ! $arch64
17902 then :
17903 case $target_cpu in #(
17904 i686) :
17905 ;; #(
17906 *) :
17907 if test "$ac_cv_alignof_double" -gt 4
17908 then :
17909 align_double=true
17910 printf "%s\n" "#define ARCH_ALIGN_DOUBLE 1" >>confdefs.h
17911
17912 fi
17913 if test "x$ac_cv_sizeof_long" = "x8" &&
17914 test "$ac_cv_alignof_long" -gt 4
17915 then :
17916 align_int64=true
17917 printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h
17918
17919 else $as_nop
17920 if test "x$ac_cv_sizeof_long_long" = "x8" &&
17921 test "$ac_cv_alignof_long_long" -gt 4
17922 then :
17923 align_int64=true
17924 printf "%s\n" "#define ARCH_ALIGN_INT64 1" >>confdefs.h
17925
17926 fi
17927 fi
17928 ;;
17929 esac
17930 fi
17931
17932 ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include <stddef.h>
17933 "
17934 if test "x$ac_cv_type_max_align_t" = xyes
17935 then :
17936
17937 printf "%s\n" "#define HAVE_MAX_ALIGN_T 1" >>confdefs.h
17938
17939
17940 fi
17941
17942
17943 # Atomics library
17944
17945 if ! $arch64
17946 then :
17947 case $ocaml_cc_vendor in #(
17948 gcc-*) :
17949 cclibs="$cclibs -latomic" ;; #(
17950 *) :
17951 ;;
17952 esac
17953 fi
17954
17955 # Support for C11 atomic types
17956
17957
17958
17959 saved_CC="$CC"
17960 saved_CFLAGS="$CFLAGS"
17961 saved_CPPFLAGS="$CPPFLAGS"
17962 saved_LIBS="$LIBS"
17963 saved_ac_ext="$ac_ext"
17964 saved_ac_compile="$ac_compile"
17965 # Move the content of confdefs.h to another file so it does not
17966 # get included
17967 mv confdefs.h confdefs.h.bak
17968 touch confdefs.h
17969
17970
17971 opts=""
17972 if test -n ""
17973 then :
17974 CFLAGS="$CFLAGS "; opts=""
17975 fi
17976 if test -n "$cclibs"
17977 then :
17978 LIBS="$LIBS $cclibs"; opts="${opts:+$opts }$cclibs"
17979 fi
17980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports _Atomic types with ${opts:-no additional options}" >&5
17981 printf %s "checking if $CC supports _Atomic types with ${opts:-no additional options}... " >&6; }
17982
17983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17984 /* end confdefs.h. */
17985
17986 #include <stdint.h>
17987 #include <stdatomic.h>
17988
17989 int
17990 main (void)
17991 {
17992
17993 _Atomic int64_t n;
17994 int m;
17995 int * _Atomic p = &m;
17996 atomic_store_explicit(&n, 123, memory_order_release);
17997 * atomic_exchange(&p, 0) = 45;
17998 if (atomic_load_explicit(&n, memory_order_acquire))
17999 return 1;
18000
18001 ;
18002 return 0;
18003 }
18004 _ACEOF
18005 if ac_fn_c_try_link "$LINENO"
18006 then :
18007 cc_supports_atomic=true
18008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18009 printf "%s\n" "yes" >&6; }
18010 else $as_nop
18011 cc_supports_atomic=false
18012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18013 printf "%s\n" "no" >&6; }
18014 fi
18015 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18016 conftest$ac_exeext conftest.$ac_ext
18017
18018
18019 # Restore the content of confdefs.h
18020 mv confdefs.h.bak confdefs.h
18021 ac_compile="$saved_ac_compile"
18022 ac_ext="$saved_ac_ext"
18023 CPPFLAGS="$saved_CPPFLAGS"
18024 CFLAGS="$saved_CFLAGS"
18025 CC="$saved_CC"
18026 LIBS="$saved_LIBS"
18027
18028
18029 case $cc_supports_atomic,$ocaml_cc_vendor in #(
18030 false,msvc-*) :
18031
18032
18033 saved_CC="$CC"
18034 saved_CFLAGS="$CFLAGS"
18035 saved_CPPFLAGS="$CPPFLAGS"
18036 saved_LIBS="$LIBS"
18037 saved_ac_ext="$ac_ext"
18038 saved_ac_compile="$ac_compile"
18039 # Move the content of confdefs.h to another file so it does not
18040 # get included
18041 mv confdefs.h confdefs.h.bak
18042 touch confdefs.h
18043
18044
18045 opts=""
18046 if test -n "-std:c11"
18047 then :
18048 CFLAGS="$CFLAGS -std:c11"; opts="-std:c11"
18049 fi
18050 if test -n ""
18051 then :
18052 LIBS="$LIBS "; opts="${opts:+$opts }"
18053 fi
18054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports _Atomic types with ${opts:-no additional options}" >&5
18055 printf %s "checking if $CC supports _Atomic types with ${opts:-no additional options}... " >&6; }
18056
18057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18058 /* end confdefs.h. */
18059
18060 #include <stdint.h>
18061 #include <stdatomic.h>
18062
18063 int
18064 main (void)
18065 {
18066
18067 _Atomic int64_t n;
18068 int m;
18069 int * _Atomic p = &m;
18070 atomic_store_explicit(&n, 123, memory_order_release);
18071 * atomic_exchange(&p, 0) = 45;
18072 if (atomic_load_explicit(&n, memory_order_acquire))
18073 return 1;
18074
18075 ;
18076 return 0;
18077 }
18078 _ACEOF
18079 if ac_fn_c_try_link "$LINENO"
18080 then :
18081 cc_supports_atomic=true
18082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18083 printf "%s\n" "yes" >&6; }
18084 else $as_nop
18085 cc_supports_atomic=false
18086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18087 printf "%s\n" "no" >&6; }
18088 fi
18089 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18090 conftest$ac_exeext conftest.$ac_ext
18091
18092
18093 # Restore the content of confdefs.h
18094 mv confdefs.h.bak confdefs.h
18095 ac_compile="$saved_ac_compile"
18096 ac_ext="$saved_ac_ext"
18097 CPPFLAGS="$saved_CPPFLAGS"
18098 CFLAGS="$saved_CFLAGS"
18099 CC="$saved_CC"
18100 LIBS="$saved_LIBS"
18101
18102
18103 if $cc_supports_atomic
18104 then :
18105 common_cflags="$common_cflags -std:c11"
18106 else $as_nop
18107
18108
18109 saved_CC="$CC"
18110 saved_CFLAGS="$CFLAGS"
18111 saved_CPPFLAGS="$CPPFLAGS"
18112 saved_LIBS="$LIBS"
18113 saved_ac_ext="$ac_ext"
18114 saved_ac_compile="$ac_compile"
18115 # Move the content of confdefs.h to another file so it does not
18116 # get included
18117 mv confdefs.h confdefs.h.bak
18118 touch confdefs.h
18119
18120
18121 opts=""
18122 if test -n "-std:c11 -experimental:c11atomics"
18123 then :
18124 CFLAGS="$CFLAGS -std:c11 -experimental:c11atomics"; opts="-std:c11 -experimental:c11atomics"
18125 fi
18126 if test -n ""
18127 then :
18128 LIBS="$LIBS "; opts="${opts:+$opts }"
18129 fi
18130 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports _Atomic types with ${opts:-no additional options}" >&5
18131 printf %s "checking if $CC supports _Atomic types with ${opts:-no additional options}... " >&6; }
18132
18133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18134 /* end confdefs.h. */
18135
18136 #include <stdint.h>
18137 #include <stdatomic.h>
18138
18139 int
18140 main (void)
18141 {
18142
18143 _Atomic int64_t n;
18144 int m;
18145 int * _Atomic p = &m;
18146 atomic_store_explicit(&n, 123, memory_order_release);
18147 * atomic_exchange(&p, 0) = 45;
18148 if (atomic_load_explicit(&n, memory_order_acquire))
18149 return 1;
18150
18151 ;
18152 return 0;
18153 }
18154 _ACEOF
18155 if ac_fn_c_try_link "$LINENO"
18156 then :
18157 cc_supports_atomic=true
18158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18159 printf "%s\n" "yes" >&6; }
18160 else $as_nop
18161 cc_supports_atomic=false
18162 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18163 printf "%s\n" "no" >&6; }
18164 fi
18165 rm -f core conftest.err conftest.$ac_objext conftest.beam \
18166 conftest$ac_exeext conftest.$ac_ext
18167
18168
18169 # Restore the content of confdefs.h
18170 mv confdefs.h.bak confdefs.h
18171 ac_compile="$saved_ac_compile"
18172 ac_ext="$saved_ac_ext"
18173 CPPFLAGS="$saved_CPPFLAGS"
18174 CFLAGS="$saved_CFLAGS"
18175 CC="$saved_CC"
18176 LIBS="$saved_LIBS"
18177
18178
18179 if $cc_supports_atomic
18180 then :
18181 common_cflags="$common_cflags -std:c11 -experimental:c11atomics"
18182 fi
18183
18184 fi ;; #(
18185 *) :
18186 ;;
18187 esac
18188 if ! $cc_supports_atomic
18189 then :
18190 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
18191 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
18192 as_fn_error $? "C11 atomic support is required, use another C compiler
18193 See \`config.log' for more details" "$LINENO" 5; }
18194 fi
18195
18196 # Full support for thread local storage
18197 # macOS and MinGW-w64 have problems with thread local storage accessed from DLLs
18198
18199 case $target in #(
18200 *-apple-darwin*|*-w64-mingw32*|*-pc-windows) :
18201 ;; #(
18202 *) :
18203 printf "%s\n" "#define HAS_FULL_THREAD_VARIABLES 1" >>confdefs.h
18204
18205 ;;
18206 esac
18207
18208 # Shared library support
18209
18210 sharedlib_cflags=''
18211 mkdll='shared-libs-not-available'
18212 mkdll_exp='shared-libs-not-available'
18213 rpath=''
18214 mksharedlibrpath=''
18215 natdynlinkopts=""
18216
18217 if test x"$enable_shared" != "xno"
18218 then :
18219 mkdll=''
18220 case $target in #(
18221 x86_64-apple-darwin*) :
18222 mkdll_flags=\
18223 '-shared -undefined dynamic_lookup -Wl,-no_compact_unwind -Wl,-w'
18224 supports_shared_libraries=true ;; #(
18225 aarch64-apple-darwin*|arm64-apple-darwin*) :
18226 mkdll_flags='-shared -undefined dynamic_lookup -Wl,-w'
18227 supports_shared_libraries=true ;; #(
18228 *-w64-mingw32*|*-pc-windows|*-*-cygwin) :
18229 mkdll_flags="-chain ${flexdll_chain} ${flexlink_flags}"
18230 mkdll_exp="flexlink ${mkdll_flags}"
18231 mkdll="flexlink ${mkdll_flags}"
18232 mkmaindll_exp="flexlink -maindll ${mkdll_flags}"
18233 mkmaindll="flexlink -maindll ${mkdll_flags}" ;; #(
18234 powerpc-ibm-aix*) :
18235 case $ocaml_cc_vendor in #(
18236 xlc*) :
18237 mkdll_flags='-qmkshrobj -G'
18238 supports_shared_libraries=true ;; #(
18239 *) :
18240 ;;
18241 esac ;; #(
18242 *-*-solaris*) :
18243 sharedlib_cflags="-fPIC"
18244 mkdll_flags='-shared'
18245 rpath="-Wl,-rpath,"
18246 mksharedlibrpath="-Wl,-rpath,"
18247 supports_shared_libraries=true ;; #(
18248 *-*-linux*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*\
18249 |*-*-openbsd*|*-*-netbsd*|*-*-dragonfly*|*-*-gnu*|*-*-haiku*) :
18250 sharedlib_cflags="-fPIC"
18251 case $ocaml_cc_vendor,$target in #(
18252 gcc-*,powerpc-*-linux*) :
18253 mkdll_flags='-shared -mbss-plt' ;; #(
18254 *,i[3456]86-*) :
18255 # Disable DT_TEXTREL warnings on Linux and BSD i386
18256 # See https://github.com/ocaml/ocaml/issues/9800
18257 mkdll_flags='-shared -Wl,-z,notext' ;; #(
18258 *) :
18259 mkdll_flags='-shared' ;;
18260 esac
18261 case $target in #(
18262 *-*-openbsd7.[3-9]|*-*-openbsd[89].*) :
18263 mkdll_flags="${mkdll_flags} -Wl,--no-execute-only" ;; #(
18264 *) :
18265 ;;
18266 esac
18267 oc_ldflags="$oc_ldflags -Wl,-E"
18268 rpath="-Wl,-rpath,"
18269 mksharedlibrpath="-Wl,-rpath,"
18270 natdynlinkopts="-Wl,-E"
18271 supports_shared_libraries=true ;; #(
18272 *) :
18273 mkdll='shared-libs-not-available' ;;
18274 esac
18275 if test -z "$mkdll"
18276 then :
18277 mkdll="\$(CC) $mkdll_flags"
18278 mkdll_exp="$CC $mkdll_flags"
18279 fi
18280 fi
18281
18282 if test -z "$mkmaindll"
18283 then :
18284 mkmaindll_exp="$mkdll_exp"
18285 mkmaindll="$mkdll"
18286 fi
18287
18288 # Make sure code sections in OCaml-generated executables are readable
18289 # (required for marshaling of function closures)
18290
18291 case $target in #(
18292 *-*-openbsd7.[3-9]|*-*-openbsd[89].*) :
18293 oc_ldflags="$oc_ldflags -Wl,--no-execute-only"
18294 natdynlinkopts="$natdynlinkopts -Wl,--no-execute-only" ;; #(
18295 *) :
18296 ;;
18297 esac
18298
18299 # Disable control flow integrity
18300
18301 case $target in #(
18302 *-*-openbsd7.[4-9]|*-*-openbsd[89].*) :
18303 oc_ldflags="$oc_ldflags -Wl,-z,nobtcfi"
18304 natdynlinkopts="$natdynlinkopts -Wl,-z,nobtcfi" ;; #(
18305 *) :
18306 ;;
18307 esac
18308
18309
18310 # Configure native dynlink
18311
18312 natdynlink=false
18313
18314 if test x"$supports_shared_libraries" = 'xtrue'
18315 then :
18316 case "$target" in #(
18317 *-*-cygwin) :
18318 natdynlink=true ;; #(
18319 *-w64-mingw32*) :
18320 natdynlink=true ;; #(
18321 *-pc-windows) :
18322 natdynlink=true ;; #(
18323 i[3456]86-*-linux*) :
18324 natdynlink=true ;; #(
18325 x86_64-*-linux*) :
18326 natdynlink=true ;; #(
18327 arm64-*-darwin*) :
18328 natdynlink=true ;; #(
18329 aarch64-*-darwin*) :
18330 natdynlink=true ;; #(
18331 x86_64-*-darwin*) :
18332 natdynlink=true ;; #(
18333 s390x*-*-linux*) :
18334 natdynlink=true ;; #(
18335 powerpc*-*-linux*) :
18336 natdynlink=true ;; #(
18337 x86_64-*-solaris*) :
18338 natdynlink=true ;; #(
18339 i686-*-kfreebsd*) :
18340 natdynlink=true ;; #(
18341 x86_64-*-kfreebsd*) :
18342 natdynlink=true ;; #(
18343 x86_64-*-dragonfly*) :
18344 natdynlink=true ;; #(
18345 i[3456]86-*-freebsd*) :
18346 natdynlink=true ;; #(
18347 x86_64-*-freebsd*) :
18348 natdynlink=true ;; #(
18349 i[3456]86-*-openbsd*) :
18350 natdynlink=true ;; #(
18351 x86_64-*-openbsd*) :
18352 natdynlink=true ;; #(
18353 i[3456]86-*-netbsd*) :
18354 natdynlink=true ;; #(
18355 x86_64-*-netbsd*) :
18356 natdynlink=true ;; #(
18357 i[3456]86-*-haiku*) :
18358 natdynlink=true ;; #(
18359 arm*-*-linux*) :
18360 natdynlink=true ;; #(
18361 arm*-*-freebsd*) :
18362 natdynlink=true ;; #(
18363 earm*-*-netbsd*) :
18364 natdynlink=true ;; #(
18365 aarch64-*-linux*) :
18366 natdynlink=true ;; #(
18367 aarch64-*-freebsd*) :
18368 natdynlink=true ;; #(
18369 aarch64-*-openbsd*) :
18370 natdynlink=true ;; #(
18371 aarch64-*-netbsd*) :
18372 natdynlink=true ;; #(
18373 riscv*-*-linux*) :
18374 natdynlink=true ;; #(
18375 i[3456]86-*-gnu*) :
18376 natdynlink=true ;; #(
18377 x86_64-*-gnu*) :
18378 natdynlink=true ;; #(
18379 *) :
18380 ;;
18381 esac
18382 fi
18383
18384 # Try to work around the Skylake/Kaby Lake processor bug.
18385 case "$ocaml_cc_vendor,$target" in #(
18386 *gcc*,x86_64-*|*gcc*,i686-*) :
18387 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fno-tree-vrp" | $as_tr_sh`
18388 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fno-tree-vrp" >&5
18389 printf %s "checking whether the C compiler accepts -fno-tree-vrp... " >&6; }
18390 if eval test \${$as_CACHEVAR+y}
18391 then :
18392 printf %s "(cached) " >&6
18393 else $as_nop
18394
18395 ax_check_save_flags=$CFLAGS
18396 CFLAGS="$CFLAGS $warn_error_flag -fno-tree-vrp"
18397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18398 /* end confdefs.h. */
18399
18400 int
18401 main (void)
18402 {
18403
18404 ;
18405 return 0;
18406 }
18407 _ACEOF
18408 if ac_fn_c_try_compile "$LINENO"
18409 then :
18410 eval "$as_CACHEVAR=yes"
18411 else $as_nop
18412 eval "$as_CACHEVAR=no"
18413 fi
18414 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18415 CFLAGS=$ax_check_save_flags
18416 fi
18417 eval ac_res=\$$as_CACHEVAR
18418 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18419 printf "%s\n" "$ac_res" >&6; }
18420 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
18421 then :
18422 internal_cflags="$internal_cflags -fno-tree-vrp"
18423 else $as_nop
18424 :
18425 fi
18426 ;; #(
18427 *) :
18428 ;;
18429 esac
18430
18431 ## Check whether __attribute__((optimize("tree-vectorize")))) is supported
18432
18433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))" >&5
18434 printf %s "checking whether the C compiler supports __attribute__((optimize(\"tree-vectorize\")))... " >&6; }
18435 saved_CFLAGS="$CFLAGS"
18436 CFLAGS="$warn_error_flag $CFLAGS"
18437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18438 /* end confdefs.h. */
18439 __attribute__((optimize("tree-vectorize"))) void f(void) {}
18440 int
18441 main (void)
18442 {
18443 f();
18444 ;
18445 return 0;
18446 }
18447 _ACEOF
18448 if ac_fn_c_try_compile "$LINENO"
18449 then :
18450 printf "%s\n" "#define SUPPORTS_TREE_VECTORIZE 1" >>confdefs.h
18451
18452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18453 printf "%s\n" "yes" >&6; }
18454 else $as_nop
18455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18456 printf "%s\n" "no" >&6; }
18457 fi
18458 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18459 CFLAGS="$saved_CFLAGS"
18460
18461
18462 # Check whether the C compiler supports the labels as values extension.
18463
18464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports the labels as values extension" >&5
18465 printf %s "checking whether $CC supports the labels as values extension... " >&6; }
18466 if test ${ocaml_cv_prog_cc_labels_as_values+y}
18467 then :
18468 printf %s "(cached) " >&6
18469 else $as_nop
18470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18471 /* end confdefs.h. */
18472
18473 int
18474 main (void)
18475 {
18476
18477 void *ptr;
18478 ptr = &&foo;
18479 goto *ptr;
18480 return 1;
18481 foo:
18482
18483 ;
18484 return 0;
18485 }
18486 _ACEOF
18487 if ac_fn_c_try_compile "$LINENO"
18488 then :
18489 ocaml_cv_prog_cc_labels_as_values=yes
18490 else $as_nop
18491 ocaml_cv_prog_cc_labels_as_values=no
18492 fi
18493 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
18494
18495 fi
18496 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_prog_cc_labels_as_values" >&5
18497 printf "%s\n" "$ocaml_cv_prog_cc_labels_as_values" >&6; }
18498 if test "x$ocaml_cv_prog_cc_labels_as_values" = xyes; then
18499
18500 printf "%s\n" "#define HAVE_LABELS_AS_VALUES 1" >>confdefs.h
18501
18502 fi
18503
18504
18505 # Configure the native-code compiler
18506
18507 arch=none
18508 model=default
18509 system=unknown
18510
18511 # In all the cases below, if $arch is set so then so too must $system,
18512 # preserving $arch = 'none' <=> $system = 'unknown'
18513 has_native_backend=no
18514 native_ldflags=""
18515 case $target in #(
18516 i[3456]86-*-linux*) :
18517 arch=i386; system=linux ;; #(
18518 i[3456]86-*-freebsd*) :
18519 arch=i386; system=freebsd ;; #(
18520 i[3456]86-*-netbsd*) :
18521 arch=i386; system=netbsd ;; #(
18522 i[3456]86-*-openbsd*) :
18523 arch=i386; system=openbsd ;; #(
18524 i[3456]86-*-haiku*) :
18525 arch=i386; system=beos ;; #(
18526 i[3456]86-*-cygwin) :
18527 arch=i386; system=cygwin ;; #(
18528 i[3456]86-w64-mingw32*) :
18529 arch=i386; system=mingw ;; #(
18530 i[3456]86-*-gnu*) :
18531 arch=i386; system=gnu ;; #(
18532 i686-pc-windows) :
18533 arch=i386; system=win32 ;; #(
18534 x86_64-pc-windows) :
18535 has_native_backend=yes; arch=amd64; system=win64 ;; #(
18536 powerpc64le*-*-linux*) :
18537 has_native_backend=yes; arch=power; model=ppc64le; system=linux ;; #(
18538 powerpc64*-*-linux-musl*) :
18539 has_native_backend=yes; arch=power; model=ppc64; system=linux ;; #(
18540 s390x*-*-linux*) :
18541 has_native_backend=yes; arch=s390x; model=z10; system=linux ;; #(
18542 # expected to match "gnueabihf" as well as "musleabihf"
18543 armv6*-*-linux-*eabihf) :
18544 arch=arm; model=armv6; system=linux ;; #(
18545 armv7*-*-linux-*eabihf) :
18546 arch=arm; model=armv7; system=linux ;; #(
18547 armv8*-*-linux-*eabihf) :
18548 arch=arm; model=armv8; system=linux ;; #(
18549 armv8*-*-linux-*eabi) :
18550 arch=arm; model=armv8; system=linux ;; #(
18551 armv7*-*-linux-*eabi) :
18552 arch=arm; model=armv7; system=linux ;; #(
18553 armv6t2*-*-linux-*eabi) :
18554 arch=arm; model=armv6t2; system=linux ;; #(
18555 armv6*-*-linux-*eabi) :
18556 arch=arm; model=armv6; system=linux ;; #(
18557 armv6*-*-freebsd*) :
18558 arch=arm; model=armv6; system=freebsd ;; #(
18559 earmv6*-*-netbsd*) :
18560 arch=arm; model=armv6; system=netbsd ;; #(
18561 earmv7*-*-netbsd*) :
18562 arch=arm; model=armv7; system=netbsd ;; #(
18563 armv5te*-*-linux-*eabi) :
18564 arch=arm; model=armv5te; system=linux ;; #(
18565 armv5*-*-linux-*eabi) :
18566 arch=arm; model=armv5; system=linux ;; #(
18567 arm*-*-linux-*eabihf) :
18568 arch=arm; system=linux ;; #(
18569 arm*-*-linux-*eabi) :
18570 arch=arm; system=linux ;; #(
18571 arm*-*-openbsd*) :
18572 arch=arm; system=openbsd ;; #(
18573 zaurus*-*-openbsd*) :
18574 arch=arm; system=openbsd ;; #(
18575 x86_64-*-linux*) :
18576 has_native_backend=yes; arch=amd64; system=linux ;; #(
18577 x86_64-*-dragonfly*) :
18578 arch=amd64; system=dragonfly ;; #(
18579 x86_64-*-solaris*) :
18580 has_native_backend=yes; arch=amd64; system=solaris ;; #(
18581 x86_64-*-freebsd*) :
18582 has_native_backend=yes; arch=amd64; system=freebsd ;; #(
18583 x86_64-*-netbsd*) :
18584 has_native_backend=yes; arch=amd64; system=netbsd ;; #(
18585 x86_64-*-openbsd*) :
18586 has_native_backend=yes; arch=amd64; system=openbsd ;; #(
18587 x86_64-*-haiku*) :
18588 arch=amd64; system=beos ;; #(
18589 arm64-*-darwin*) :
18590 has_native_backend=yes; arch=arm64; system=macosx ;; #(
18591 aarch64-*-darwin*) :
18592 has_native_backend=yes; arch=arm64; system=macosx ;; #(
18593 x86_64-*-darwin*) :
18594 has_native_backend=yes; arch=amd64; system=macosx ;; #(
18595 x86_64-w64-mingw32*) :
18596 has_native_backend=yes; arch=amd64; system=mingw64 ;; #(
18597 aarch64-*-linux*) :
18598 if $arch64
18599 then :
18600 has_native_backend=yes; arch=arm64; system=linux
18601 else $as_nop
18602 arch=arm; model=armv8; system=linux
18603 fi ;; #(
18604 aarch64-*-freebsd*) :
18605 has_native_backend=yes; arch=arm64; system=freebsd ;; #(
18606 aarch64-*-openbsd*) :
18607 has_native_backend=yes; arch=arm64; system=openbsd ;; #(
18608 aarch64-*-netbsd*) :
18609 has_native_backend=yes; arch=arm64; system=netbsd ;; #(
18610 x86_64-*-cygwin) :
18611 has_native_backend=yes; arch=amd64; system=cygwin ;; #(
18612 riscv64-*-linux*) :
18613 has_native_backend=yes; arch=riscv; model=riscv64; system=linux ;; #(
18614 x86_64-*-gnu*) :
18615 has_native_backend=yes; arch=amd64; system=gnu
18616 ;; #(
18617 *) :
18618 ;;
18619 esac
18620
18621 case $arch in #(
18622 amd64) :
18623 arch_specific_SOURCES='$(intel_SOURCES)' ;; #(
18624 *) :
18625 arch_specific_SOURCES='' ;;
18626 esac
18627
18628 native_cflags=''
18629 oc_native_cflags=''
18630 oc_native_cppflags="-DNATIVE_CODE\
18631 -DTARGET_${arch} -DMODEL_${model} -DSYS_${system}"
18632 case $ccomp_type in #(
18633 msvc) :
18634 runtime_asm_objects=${arch}nt.${OBJEXT} ;; #(
18635 *) :
18636 runtime_asm_objects=${arch}.${OBJEXT} ;;
18637 esac
18638
18639 case $enable_native_compiler,$has_native_backend in #(
18640 no,*) :
18641 native_compiler=false
18642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the native compiler is disabled" >&5
18643 printf "%s\n" "$as_me: the native compiler is disabled" >&6;} ;; #(
18644 yes,no) :
18645 as_fn_error 69 "the native compiler is not supported on this platform" "$LINENO" 5 ;; #(
18646 *,no) :
18647 native_compiler=false
18648 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the native compiler is not supported on this platform" >&5
18649 printf "%s\n" "$as_me: the native compiler is not supported on this platform" >&6;} ;; #(
18650 *) :
18651 native_compiler=true ;;
18652 esac
18653
18654 if $native_compiler
18655 then :
18656 default_build_target=world.opt
18657 else $as_nop
18658 default_build_target=world
18659 fi
18660
18661 if ! $native_compiler
18662 then :
18663 natdynlink=false
18664 fi
18665
18666 if $natdynlink
18667 then :
18668 cmxs="cmxs"
18669 else $as_nop
18670 cmxs="cmx"
18671 fi
18672 if $natdynlink
18673 then :
18674 natdynlink_archive="dynlink.cmxa"
18675 else $as_nop
18676 natdynlink_archive=""
18677 fi
18678
18679 case $enable_native_toplevel,$natdynlink in #(
18680 yes,false) :
18681 as_fn_error $? "The native toplevel requires native dynlink support" "$LINENO" 5 ;; #(
18682 yes,*) :
18683 install_ocamlnat=true ;; #(
18684 *) :
18685 install_ocamlnat=false ;;
18686 esac
18687
18688 printf "%s\n" "#define OCAML_OS_TYPE \"$ostype\"" >>confdefs.h
18689
18690 target_os_type="$ostype"
18691
18692 if $cross_compiler
18693 then :
18694 # Extract the first word of "$target_alias-ld", so it can be a program name with args.
18695 set dummy $target_alias-ld; ac_word=$2
18696 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18697 printf %s "checking for $ac_word... " >&6; }
18698 if test ${ac_cv_prog_DIRECT_LD+y}
18699 then :
18700 printf %s "(cached) " >&6
18701 else $as_nop
18702 if test -n "$DIRECT_LD"; then
18703 ac_cv_prog_DIRECT_LD="$DIRECT_LD" # Let the user override the test.
18704 else
18705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18706 for as_dir in $PATH
18707 do
18708 IFS=$as_save_IFS
18709 case $as_dir in #(((
18710 '') as_dir=./ ;;
18711 */) ;;
18712 *) as_dir=$as_dir/ ;;
18713 esac
18714 for ac_exec_ext in '' $ac_executable_extensions; do
18715 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18716 ac_cv_prog_DIRECT_LD="$target_alias-ld"
18717 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18718 break 2
18719 fi
18720 done
18721 done
18722 IFS=$as_save_IFS
18723
18724 fi
18725 fi
18726 DIRECT_LD=$ac_cv_prog_DIRECT_LD
18727 if test -n "$DIRECT_LD"; then
18728 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DIRECT_LD" >&5
18729 printf "%s\n" "$DIRECT_LD" >&6; }
18730 else
18731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732 printf "%s\n" "no" >&6; }
18733 fi
18734
18735
18736 if test -z "$ac_cv_prog_DIRECT_LD"; then
18737 if test "$build" = "$target"; then
18738 ac_ct_DIRECT_LD=$DIRECT_LD
18739 # Extract the first word of "ld", so it can be a program name with args.
18740 set dummy ld; ac_word=$2
18741 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18742 printf %s "checking for $ac_word... " >&6; }
18743 if test ${ac_cv_prog_ac_ct_DIRECT_LD+y}
18744 then :
18745 printf %s "(cached) " >&6
18746 else $as_nop
18747 if test -n "$ac_ct_DIRECT_LD"; then
18748 ac_cv_prog_ac_ct_DIRECT_LD="$ac_ct_DIRECT_LD" # Let the user override the test.
18749 else
18750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18751 for as_dir in $PATH
18752 do
18753 IFS=$as_save_IFS
18754 case $as_dir in #(((
18755 '') as_dir=./ ;;
18756 */) ;;
18757 *) as_dir=$as_dir/ ;;
18758 esac
18759 for ac_exec_ext in '' $ac_executable_extensions; do
18760 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18761 ac_cv_prog_ac_ct_DIRECT_LD="ld"
18762 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18763 break 2
18764 fi
18765 done
18766 done
18767 IFS=$as_save_IFS
18768
18769 test -z "$ac_cv_prog_ac_ct_DIRECT_LD" && ac_cv_prog_ac_ct_DIRECT_LD="false"
18770 fi
18771 fi
18772 ac_ct_DIRECT_LD=$ac_cv_prog_ac_ct_DIRECT_LD
18773 if test -n "$ac_ct_DIRECT_LD"; then
18774 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DIRECT_LD" >&5
18775 printf "%s\n" "$ac_ct_DIRECT_LD" >&6; }
18776 else
18777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18778 printf "%s\n" "no" >&6; }
18779 fi
18780
18781 DIRECT_LD=$ac_ct_DIRECT_LD
18782 else
18783 DIRECT_LD="false"
18784 fi
18785 else
18786 DIRECT_LD="$ac_cv_prog_DIRECT_LD"
18787 fi
18788
18789 else $as_nop
18790 if test -n "$ac_tool_prefix"; then
18791 # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
18792 set dummy ${ac_tool_prefix}ld; ac_word=$2
18793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18794 printf %s "checking for $ac_word... " >&6; }
18795 if test ${ac_cv_prog_DIRECT_LD+y}
18796 then :
18797 printf %s "(cached) " >&6
18798 else $as_nop
18799 if test -n "$DIRECT_LD"; then
18800 ac_cv_prog_DIRECT_LD="$DIRECT_LD" # Let the user override the test.
18801 else
18802 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18803 for as_dir in $PATH
18804 do
18805 IFS=$as_save_IFS
18806 case $as_dir in #(((
18807 '') as_dir=./ ;;
18808 */) ;;
18809 *) as_dir=$as_dir/ ;;
18810 esac
18811 for ac_exec_ext in '' $ac_executable_extensions; do
18812 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18813 ac_cv_prog_DIRECT_LD="${ac_tool_prefix}ld"
18814 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18815 break 2
18816 fi
18817 done
18818 done
18819 IFS=$as_save_IFS
18820
18821 fi
18822 fi
18823 DIRECT_LD=$ac_cv_prog_DIRECT_LD
18824 if test -n "$DIRECT_LD"; then
18825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DIRECT_LD" >&5
18826 printf "%s\n" "$DIRECT_LD" >&6; }
18827 else
18828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18829 printf "%s\n" "no" >&6; }
18830 fi
18831
18832
18833 fi
18834 if test -z "$ac_cv_prog_DIRECT_LD"; then
18835 ac_ct_DIRECT_LD=$DIRECT_LD
18836 # Extract the first word of "ld", so it can be a program name with args.
18837 set dummy ld; ac_word=$2
18838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18839 printf %s "checking for $ac_word... " >&6; }
18840 if test ${ac_cv_prog_ac_ct_DIRECT_LD+y}
18841 then :
18842 printf %s "(cached) " >&6
18843 else $as_nop
18844 if test -n "$ac_ct_DIRECT_LD"; then
18845 ac_cv_prog_ac_ct_DIRECT_LD="$ac_ct_DIRECT_LD" # Let the user override the test.
18846 else
18847 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18848 for as_dir in $PATH
18849 do
18850 IFS=$as_save_IFS
18851 case $as_dir in #(((
18852 '') as_dir=./ ;;
18853 */) ;;
18854 *) as_dir=$as_dir/ ;;
18855 esac
18856 for ac_exec_ext in '' $ac_executable_extensions; do
18857 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
18858 ac_cv_prog_ac_ct_DIRECT_LD="ld"
18859 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
18860 break 2
18861 fi
18862 done
18863 done
18864 IFS=$as_save_IFS
18865
18866 fi
18867 fi
18868 ac_ct_DIRECT_LD=$ac_cv_prog_ac_ct_DIRECT_LD
18869 if test -n "$ac_ct_DIRECT_LD"; then
18870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DIRECT_LD" >&5
18871 printf "%s\n" "$ac_ct_DIRECT_LD" >&6; }
18872 else
18873 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
18874 printf "%s\n" "no" >&6; }
18875 fi
18876
18877 if test "x$ac_ct_DIRECT_LD" = x; then
18878 DIRECT_LD=""
18879 else
18880 case $cross_compiling:$ac_tool_warned in
18881 yes:)
18882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18883 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18884 ac_tool_warned=yes ;;
18885 esac
18886 DIRECT_LD=$ac_ct_DIRECT_LD
18887 fi
18888 else
18889 DIRECT_LD="$ac_cv_prog_DIRECT_LD"
18890 fi
18891
18892 fi
18893 if test -z "$PARTIALLD"
18894 then :
18895 case "$target,$ocaml_cc_vendor" in #(
18896 x86_64-*-darwin*,gcc-*) :
18897 PACKLD_FLAGS=' -arch x86_64' ;; #(
18898 powerpc64le*-*-linux*,gcc-*) :
18899 PACKLD_FLAGS=' -m elf64lppc' ;; #(
18900 powerpc*-*-linux*,gcc-*) :
18901 if $arch64
18902 then :
18903 PACKLD_FLAGS=' -m elf64ppc'
18904 else $as_nop
18905 PACKLD_FLAGS=' -m elf32ppclinux'
18906 fi ;; #(
18907 *) :
18908 PACKLD_FLAGS='' ;;
18909 esac
18910 # The string for PACKLD must be capable of being concatenated with the
18911 # output filename. Don't assume that all C compilers understand GNU -ofoo
18912 # form, so ensure that the definition includes a space at the end (which is
18913 # achieved using the $(EMPTY) expansion trick in Makefile.config.in).
18914 case "$ocaml_cc_vendor" in #(
18915 msvc-*) :
18916 # For the Microsoft C compiler there must be no space at the end of the
18917 # string.
18918 PACKLD="link -lib -nologo $machine -out:" ;; #(
18919 *) :
18920 PACKLD="$DIRECT_LD -r$PACKLD_FLAGS -o " ;;
18921 esac
18922 else $as_nop
18923 PACKLD="$PARTIALLD -o "
18924 fi
18925
18926 # Disable PIE at link time when ocamlopt does not produce position-independent
18927 # code and the system produces PIE executables by default and demands PIC
18928 # object files to do so.
18929 # This issue does not affect amd64 (x86_64), aarch64 (arm64)
18930 # and s390x (Z systems), since ocamlopt produces PIC object files by default.
18931 # Currently the problem is known for Alpine Linux on other platforms
18932 # (issue #7562), and probably affects all Linux distributions that use
18933 # the musl standard library and dynamic loader.
18934 # Other systems have PIE by default but can cope with non-PIC object files,
18935 # e.g. Ubuntu >= 17.10 for i386, which uses the glibc dynamic loader.
18936
18937 case $arch in #(
18938 amd64|arm64|s390x|none) :
18939 # ocamlopt generates PIC code or doesn't generate code at all
18940 ;; #(
18941 *) :
18942 case $target in #(
18943 # expected to match "*-linux-musl" as well as "*-linux-musleabi*"
18944 *-linux-musl*) :
18945 # Alpine and other musl-based Linux distributions
18946 common_cflags="-no-pie $common_cflags" ;; #(
18947 *) :
18948 ;;
18949 esac ;;
18950 esac
18951
18952 # Assembler
18953
18954 if test -n "$target_alias"
18955 then :
18956 toolpref="${target_alias}-"
18957 as_target="$target"
18958 as_cpu="$target_cpu"
18959 else $as_nop
18960 if test -n "$host_alias"
18961 then :
18962 toolpref="${host_alias}-"
18963 as_target="$host"
18964 as_cpu="$host_cpu"
18965 else $as_nop
18966 toolpref=""
18967 as_target="$build"
18968 as_cpu="$build_cpu"
18969 fi
18970 fi
18971
18972 # Finding the assembler
18973 # The OCaml build system distinguishes two different assemblers:
18974 # 1. AS, used to assemble the code generated by the ocamlopt native compiler
18975 # 2. ASPP, to assemble other assembly files that may require preprocessing
18976 # In general, "$CC -c" is used as a default value for both AS and ASPP.
18977 # On a few platforms (Windows) both values are overridden.
18978 # On other platforms, (Linux with GCC) the assembler AS is called directly
18979 # to avoiding forking a C compiler process for each compilation by ocamlopt.
18980 # Both AS and ASPP can be overridden by the user.
18981
18982 default_as="$CC -c"
18983 default_aspp="$CC -c"
18984
18985 case $as_target,$ocaml_cc_vendor in #(
18986 *-*-linux*,gcc-*) :
18987 case $as_cpu in #(
18988 x86_64|arm*|aarch64*|i[3-6]86|riscv*) :
18989 default_as="${toolpref}as" ;; #(
18990 *) :
18991 ;;
18992 esac ;; #(
18993 i686-pc-windows,*) :
18994 default_as="ml -nologo -coff -Cp -c -Fo"
18995 default_aspp="$default_as" ;; #(
18996 x86_64-pc-windows,*) :
18997 default_as="ml64 -nologo -Cp -c -Fo"
18998 default_aspp="$default_as" ;; #(
18999 *-*-darwin*,clang-*) :
19000 default_as="$default_as -Wno-trigraphs"
19001 default_aspp="$default_as" ;; #(
19002 *) :
19003 ;;
19004 esac
19005
19006 if test "$with_pic"
19007 then :
19008 fpic=true
19009 printf "%s\n" "#define CAML_WITH_FPIC 1" >>confdefs.h
19010
19011 internal_cflags="$internal_cflags $sharedlib_cflags"
19012 default_aspp="$default_aspp $sharedlib_cflags"
19013 else $as_nop
19014 fpic=false
19015 fi
19016
19017 if test -z "$AS"
19018 then :
19019 AS="$default_as"
19020 fi
19021
19022 if test -z "$ASPP"
19023 then :
19024 ASPP="$default_aspp"
19025 fi
19026
19027 # Utilities
19028 # Extract the first word of "rlwrap", so it can be a program name with args.
19029 set dummy rlwrap; ac_word=$2
19030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19031 printf %s "checking for $ac_word... " >&6; }
19032 if test ${ac_cv_prog_rlwrap+y}
19033 then :
19034 printf %s "(cached) " >&6
19035 else $as_nop
19036 if test -n "$rlwrap"; then
19037 ac_cv_prog_rlwrap="$rlwrap" # Let the user override the test.
19038 else
19039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19040 for as_dir in $PATH
19041 do
19042 IFS=$as_save_IFS
19043 case $as_dir in #(((
19044 '') as_dir=./ ;;
19045 */) ;;
19046 *) as_dir=$as_dir/ ;;
19047 esac
19048 for ac_exec_ext in '' $ac_executable_extensions; do
19049 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
19050 ac_cv_prog_rlwrap="rlwrap"
19051 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
19052 break 2
19053 fi
19054 done
19055 done
19056 IFS=$as_save_IFS
19057
19058 fi
19059 fi
19060 rlwrap=$ac_cv_prog_rlwrap
19061 if test -n "$rlwrap"; then
19062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $rlwrap" >&5
19063 printf "%s\n" "$rlwrap" >&6; }
19064 else
19065 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19066 printf "%s\n" "no" >&6; }
19067 fi
19068
19069
19070 case $rlwrap,$system in #(
19071 rlwrap,win*|rlwrap,mingw*) :
19072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: rlwrap doesn't work with native win32 - disabling" >&5
19073 printf "%s\n" "$as_me: rlwrap doesn't work with native win32 - disabling" >&6;}
19074 rlwrap='' ;; #(
19075 *) :
19076 ;;
19077 esac
19078
19079 # Checks for library functions
19080
19081 ## Check the semantics of signal handlers
19082
19083 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking semantics of signal handlers" >&5
19084 printf "%s\n" "$as_me: checking semantics of signal handlers" >&6;}
19085 ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction"
19086 if test "x$ac_cv_func_sigaction" = xyes
19087 then :
19088 has_sigaction=true
19089 else $as_nop
19090 has_sigaction=false
19091 fi
19092
19093 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
19094 if test "x$ac_cv_func_sigprocmask" = xyes
19095 then :
19096 has_sigprocmask=true
19097 else $as_nop
19098 has_sigprocmask=false
19099 fi
19100
19101 if $has_sigaction && $has_sigprocmask
19102 then :
19103 printf "%s\n" "#define POSIX_SIGNALS 1" >>confdefs.h
19104
19105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: POSIX signal handling found." >&5
19106 printf "%s\n" "$as_me: POSIX signal handling found." >&6;}
19107 else $as_nop
19108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: assuming signals have the System V semantics." >&5
19109 printf "%s\n" "$as_me: assuming signals have the System V semantics." >&6;}
19110
19111
19112 fi
19113
19114
19115 ## Check for C99 float ops
19116
19117 has_c99_float_ops=true
19118
19119 for ac_func in expm1 log1p hypot fma exp2 log2 cbrt acosh asinh atanh erf erfc trunc round copysign
19120 do :
19121 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
19122 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
19123 if eval test \"x\$"$as_ac_var"\" = x"yes"
19124 then :
19125 cat >>confdefs.h <<_ACEOF
19126 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
19127 _ACEOF
19128
19129 else $as_nop
19130 has_c99_float_ops=false
19131 fi
19132
19133 done
19134
19135 if $has_c99_float_ops
19136 then :
19137 printf "%s\n" "#define HAS_C99_FLOAT_OPS 1" >>confdefs.h
19138
19139 # Check whether round works (known bug in mingw-w64)
19140
19141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether round works" >&5
19142 printf %s "checking whether round works... " >&6; }
19143
19144 old_cross_compiling="$cross_compiling"
19145 if test "x$target_runnable" = 'xtrue'
19146 then :
19147 cross_compiling='no'
19148 fi
19149 if test "$cross_compiling" = yes
19150 then :
19151 case $target in #(
19152 x86_64-w64-mingw32*) :
19153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5
19154 printf "%s\n" "cross-compiling; assume not" >&6; } ;; #(
19155 *) :
19156 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5
19157 printf "%s\n" "cross-compiling; assume yes" >&6; }
19158 printf "%s\n" "#define HAS_WORKING_ROUND 1" >>confdefs.h
19159 ;;
19160 esac
19161 else $as_nop
19162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19163 /* end confdefs.h. */
19164 #include <math.h>
19165 int
19166 main (void)
19167 {
19168
19169 static volatile double d = 0.49999999999999994449;
19170 if (fpclassify(round(d)) != FP_ZERO) return 1;
19171
19172 ;
19173 return 0;
19174 }
19175 _ACEOF
19176 if ac_fn_c_try_run "$LINENO"
19177 then :
19178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19179 printf "%s\n" "yes" >&6; }
19180 printf "%s\n" "#define HAS_WORKING_ROUND 1" >>confdefs.h
19181
19182 else $as_nop
19183 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19184 printf "%s\n" "no" >&6; }
19185 case $enable_imprecise_c99_float_ops,$target in #(
19186 no,*) :
19187 hard_error=true ;; #(
19188 yes,*) :
19189 hard_error=false ;; #(
19190 *,x86_64-w64-mingw32*) :
19191 hard_error=false ;; #(
19192 *) :
19193 hard_error=true ;;
19194 esac
19195 if test x"$hard_error" = "xtrue"
19196 then :
19197 as_fn_error $? "round does not work, enable emulation with --enable-imprecise-c99-float-ops" "$LINENO" 5
19198 else $as_nop
19199 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: round does not work; emulation enabled" >&5
19200 printf "%s\n" "$as_me: WARNING: round does not work; emulation enabled" >&2;}
19201 fi
19202 fi
19203 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19204 conftest.$ac_objext conftest.beam conftest.$ac_ext
19205 fi
19206
19207 cross_compiling="$old_cross_compiling"
19208
19209
19210 # Check whether fma works (regressed in mingw-w64 8.0.0; and present but
19211 # unimplemented in Cygwin64)
19212
19213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fma works" >&5
19214 printf %s "checking whether fma works... " >&6; }
19215
19216 old_cross_compiling="$cross_compiling"
19217 if test "x$target_runnable" = 'xtrue'
19218 then :
19219 cross_compiling='no'
19220 fi
19221 if test "$cross_compiling" = yes
19222 then :
19223 case $target in #(
19224 x86_64-w64-mingw32*|x86_64-*-cygwin) :
19225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume not" >&5
19226 printf "%s\n" "cross-compiling; assume not" >&6; } ;; #(
19227 *) :
19228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross-compiling; assume yes" >&5
19229 printf "%s\n" "cross-compiling; assume yes" >&6; }
19230 printf "%s\n" "#define HAS_WORKING_FMA 1" >>confdefs.h
19231 ;;
19232 esac
19233 else $as_nop
19234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19235 /* end confdefs.h. */
19236 #include <math.h>
19237 int
19238 main (void)
19239 {
19240
19241 /* Tests 264-266 from testsuite/tests/fma/fma.ml. These tests trigger the
19242 broken implementations of Cygwin64 and mingw-w64 (x86_64).
19243 The static volatile variables aim to thwart GCC's constant folding. */
19244 static volatile double x, y, z;
19245 volatile double t264, t265, t266;
19246 x = 0x3.bd5b7dde5fddap-496;
19247 y = 0x3.bd5b7dde5fddap-496;
19248 z = -0xd.fc352bc352bap-992;
19249 t264 = fma(x, y, z);
19250 x = 0x3.bd5b7dde5fddap-504;
19251 y = 0x3.bd5b7dde5fddap-504;
19252 z = -0xd.fc352bc352bap-1008;
19253 t265 = fma(x, y, z);
19254 x = 0x8p-540;
19255 y = 0x4p-540;
19256 z = 0x4p-1076;
19257 t266 = fma(x, y, z);
19258 if (!(t264 == 0x1.0989687cp-1044 ||
19259 t264 == 0x0.000004277ca1fp-1022 || /* Acceptable emulated values */
19260 t264 == 0x0.00000428p-1022)
19261 || !(t265 == 0x1.0988p-1060 ||
19262 t265 == 0x0.0000000004278p-1022 || /* Acceptable emulated values */
19263 t265 == 0x0.000000000428p-1022)
19264 || !(t266 == 0x8p-1076))
19265 return 1;
19266
19267 ;
19268 return 0;
19269 }
19270 _ACEOF
19271 if ac_fn_c_try_run "$LINENO"
19272 then :
19273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19274 printf "%s\n" "yes" >&6; }
19275 printf "%s\n" "#define HAS_WORKING_FMA 1" >>confdefs.h
19276
19277 else $as_nop
19278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
19279 printf "%s\n" "no" >&6; }
19280 case $enable_imprecise_c99_float_ops,$target in #(
19281 no,*) :
19282 hard_error=true ;; #(
19283 yes,*) :
19284 hard_error=false ;; #(
19285 *,x86_64-w64-mingw32*|*,x86_64-*-cygwin) :
19286 hard_error=false ;; #(
19287 *) :
19288 hard_error=true ;;
19289 esac
19290 if test x"$hard_error" = "xtrue"
19291 then :
19292 as_fn_error $? "fma does not work, enable emulation with --enable-imprecise-c99-float-ops" "$LINENO" 5
19293 else $as_nop
19294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: fma does not work; emulation enabled" >&5
19295 printf "%s\n" "$as_me: WARNING: fma does not work; emulation enabled" >&2;}
19296 fi
19297 fi
19298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19299 conftest.$ac_objext conftest.beam conftest.$ac_ext
19300 fi
19301
19302 cross_compiling="$old_cross_compiling"
19303
19304
19305 else $as_nop
19306 if test x"$enable_imprecise_c99_float_ops" != "xyes"
19307 then :
19308 as_fn_error $? "C99 float ops unavailable, enable replacements with --enable-imprecise-c99-float-ops" "$LINENO" 5
19309 fi
19310 fi
19311
19312 ## getentropy
19313 ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy"
19314 if test "x$ac_cv_func_getentropy" = xyes
19315 then :
19316 printf "%s\n" "#define HAS_GETENTROPY 1" >>confdefs.h
19317
19318 fi
19319
19320
19321 ## getrusage
19322 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
19323 if test "x$ac_cv_func_getrusage" = xyes
19324 then :
19325 printf "%s\n" "#define HAS_GETRUSAGE 1" >>confdefs.h
19326
19327 fi
19328
19329
19330 ## times
19331 ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times"
19332 if test "x$ac_cv_func_times" = xyes
19333 then :
19334 printf "%s\n" "#define HAS_TIMES 1" >>confdefs.h
19335
19336 fi
19337
19338
19339 ## secure_getenv and __secure_getenv
19340
19341 saved_CPPFLAGS="$CPPFLAGS"
19342 CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
19343
19344 ac_fn_c_check_func "$LINENO" "secure_getenv" "ac_cv_func_secure_getenv"
19345 if test "x$ac_cv_func_secure_getenv" = xyes
19346 then :
19347 printf "%s\n" "#define HAS_SECURE_GETENV 1" >>confdefs.h
19348
19349 else $as_nop
19350 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
19351 if test "x$ac_cv_func___secure_getenv" = xyes
19352 then :
19353 printf "%s\n" "#define HAS___SECURE_GETENV 1" >>confdefs.h
19354
19355 fi
19356
19357 fi
19358
19359
19360 CPPFLAGS="$saved_CPPFLAGS"
19361
19362 ## issetugid
19363
19364 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
19365 if test "x$ac_cv_func_issetugid" = xyes
19366 then :
19367 printf "%s\n" "#define HAS_ISSETUGID 1" >>confdefs.h
19368
19369 fi
19370
19371
19372 ## Checking for monotonic clock source
19373 ## On Windows MSVC, QueryPerformanceCounter and QueryPerformanceFrequency
19374 ## are always available.
19375 ## On Unix platforms, we check for the appropriate POSIX feature-test macros.
19376 ## On MacOS clock_gettime's CLOCK_MONOTONIC flag is not actually monotonic.
19377
19378 case $target in #(
19379 *-pc-windows) :
19380 has_monotonic_clock=true ;; #(
19381 *-apple-darwin*) :
19382
19383
19384 for ac_func in clock_gettime_nsec_np
19385 do :
19386 ac_fn_c_check_func "$LINENO" "clock_gettime_nsec_np" "ac_cv_func_clock_gettime_nsec_np"
19387 if test "x$ac_cv_func_clock_gettime_nsec_np" = xyes
19388 then :
19389 printf "%s\n" "#define HAVE_CLOCK_GETTIME_NSEC_NP 1" >>confdefs.h
19390
19391 has_monotonic_clock=true
19392 printf "%s\n" "#define HAS_CLOCK_GETTIME_NSEC_NP 1" >>confdefs.h
19393
19394
19395 else $as_nop
19396 has_monotonic_clock=false
19397 fi
19398
19399 done ;; #(
19400 *) :
19401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19402 /* end confdefs.h. */
19403
19404 #include <unistd.h>
19405 #include <time.h>
19406 #if !(defined(_POSIX_TIMERS) && defined(_POSIX_MONOTONIC_CLOCK) \
19407 && _POSIX_MONOTONIC_CLOCK != (-1))
19408 #error "no monotonic clock source"
19409 #endif
19410
19411 int
19412 main (void)
19413 {
19414
19415 ;
19416 return 0;
19417 }
19418 _ACEOF
19419 if ac_fn_c_try_cpp "$LINENO"
19420 then :
19421
19422 has_monotonic_clock=true
19423 printf "%s\n" "#define HAS_POSIX_MONOTONIC_CLOCK 1" >>confdefs.h
19424
19425
19426 else $as_nop
19427 has_monotonic_clock=false
19428 fi
19429 rm -f conftest.err conftest.i conftest.$ac_ext
19430
19431 ;;
19432 esac
19433
19434 # The instrumented runtime is built by default
19435 # if the proper clock source is found.
19436 # If asked via --enable-instrumented-runtime, configuration fails if the proper
19437 # clock source is missing.
19438 if test "x$enable_instrumented_runtime" != "xno"
19439 then :
19440
19441 case $target in #(
19442 sparc-sun-solaris*) :
19443 instrumented_runtime=false ;; #(
19444 *-pc-windows) :
19445 instrumented_runtime=true ;; #(
19446 *-apple-darwin*) :
19447
19448 case $enable_instrumented_runtime,$has_monotonic_clock in #(
19449 *,true) :
19450 instrumented_runtime=true ;; #(
19451 yes,false) :
19452 as_fn_error $? "Instrumented runtime support requested but no proper monotonic clock source was found." "$LINENO" 5 ;; #(
19453 auto,false) :
19454 instrumented_runtime=false
19455 ;; #(
19456 *) :
19457 ;;
19458 esac ;; #(
19459 *) :
19460 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
19461 printf %s "checking for library containing clock_gettime... " >&6; }
19462 if test ${ac_cv_search_clock_gettime+y}
19463 then :
19464 printf %s "(cached) " >&6
19465 else $as_nop
19466 ac_func_search_save_LIBS=$LIBS
19467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19468 /* end confdefs.h. */
19469
19470 /* Override any GCC internal prototype to avoid an error.
19471 Use char because int might match the return type of a GCC
19472 builtin and then its argument prototype would still apply. */
19473 char clock_gettime ();
19474 int
19475 main (void)
19476 {
19477 return clock_gettime ();
19478 ;
19479 return 0;
19480 }
19481 _ACEOF
19482 for ac_lib in '' rt
19483 do
19484 if test -z "$ac_lib"; then
19485 ac_res="none required"
19486 else
19487 ac_res=-l$ac_lib
19488 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19489 fi
19490 if ac_fn_c_try_link "$LINENO"
19491 then :
19492 ac_cv_search_clock_gettime=$ac_res
19493 fi
19494 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19495 conftest$ac_exeext
19496 if test ${ac_cv_search_clock_gettime+y}
19497 then :
19498 break
19499 fi
19500 done
19501 if test ${ac_cv_search_clock_gettime+y}
19502 then :
19503
19504 else $as_nop
19505 ac_cv_search_clock_gettime=no
19506 fi
19507 rm conftest.$ac_ext
19508 LIBS=$ac_func_search_save_LIBS
19509 fi
19510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
19511 printf "%s\n" "$ac_cv_search_clock_gettime" >&6; }
19512 ac_res=$ac_cv_search_clock_gettime
19513 if test "$ac_res" != no
19514 then :
19515 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
19516 has_clock_gettime=true
19517 else $as_nop
19518 has_clock_gettime=false
19519 fi
19520
19521 case $enable_instrumented_runtime,$has_clock_gettime,$has_monotonic_clock in #(
19522 auto,false,*) :
19523 instrumented_runtime=false ;; #(
19524 auto,*,false) :
19525 instrumented_runtime=false ;; #(
19526 *,true,true) :
19527
19528 instrumented_runtime=true
19529 if test "x$ac_cv_search_clock_gettime" = "xnone required"
19530 then :
19531 instrumented_runtime_libs=""
19532 else $as_nop
19533 instrumented_runtime_libs=$ac_cv_search_clock_gettime
19534
19535 fi
19536 ;; #(
19537 yes,false,*) :
19538 as_fn_error $? "Instrumented runtime support requested but clock_gettime is missing." "$LINENO" 5 ;; #(
19539 yes,*,false) :
19540 as_fn_error $? "Instrumented runtime support requested but no proper monotonic clock source was found." "$LINENO" 5
19541 ;; #(
19542 *) :
19543 ;;
19544 esac
19545 ;;
19546 esac
19547
19548 fi
19549
19550 # ThreadSanitizer support is currently only available for Linux/FreeBSD/macOS
19551 # on amd64, Linux/macOS on arm64 and Linux on POWER, riscv64 and s390x.
19552 if test "x$enable_tsan" = "xyes"
19553 then :
19554 case "$arch" in #(
19555 amd64) :
19556 case "$system" in #(
19557 freebsd|linux|macosx) :
19558 case "$ocaml_cc_vendor" in #(
19559 gcc-*|clang-*) :
19560 tsan=true ;; #(
19561 *) :
19562 as_fn_error $? "thread sanitizer not supported with vendor=$ocaml_cc_vendor\"" "$LINENO" 5
19563 ;;
19564 esac ;; #(
19565 *) :
19566 as_fn_error $? "thread sanitizer not supported on system $system" "$LINENO" 5
19567 ;;
19568 esac ;; #(
19569 arm64) :
19570 case "$system" in #(
19571 linux|macosx) :
19572 case "$ocaml_cc_vendor" in #(
19573 gcc-*|clang-*) :
19574 tsan=true ;; #(
19575 *) :
19576 as_fn_error $? "thread sanitizer not supported with vendor=$ocaml_cc_vendor\"" "$LINENO" 5
19577 ;;
19578 esac ;; #(
19579 *) :
19580 as_fn_error $? "thread sanitizer not supported on system $system" "$LINENO" 5
19581 ;;
19582 esac ;; #(
19583 power) :
19584 case "$system" in #(
19585 linux) :
19586 case "$ocaml_cc_vendor" in #(
19587 gcc-*|clang-*) :
19588 tsan=true ;; #(
19589 *) :
19590 as_fn_error $? "thread sanitizer not supported with vendor=$ocaml_cc_vendor\"" "$LINENO" 5
19591 ;;
19592 esac ;; #(
19593 *) :
19594 as_fn_error $? "thread sanitizer not supported on system $system" "$LINENO" 5
19595 ;;
19596 esac ;; #(
19597 riscv) :
19598 case "$system" in #(
19599 linux) :
19600 case "$ocaml_cc_vendor" in #(
19601 gcc-*|clang-*) :
19602 tsan=true ;; #(
19603 *) :
19604 as_fn_error $? "thread sanitizer not supported with vendor=$ocaml_cc_vendor\"" "$LINENO" 5
19605 ;;
19606 esac ;; #(
19607 *) :
19608 as_fn_error $? "thread sanitizer not supported on system $system" "$LINENO" 5
19609 ;;
19610 esac ;; #(
19611 s390x) :
19612 case "$system" in #(
19613 linux) :
19614 case "$ocaml_cc_vendor" in #(
19615 gcc-*|clang-*) :
19616 tsan=true ;; #(
19617 *) :
19618 as_fn_error $? "thread sanitizer not supported with vendor=$ocaml_cc_vendor\"" "$LINENO" 5
19619 ;;
19620 esac ;; #(
19621 *) :
19622 as_fn_error $? "thread sanitizer not supported on system $system" "$LINENO" 5
19623 ;;
19624 esac ;; #(
19625 *) :
19626 as_fn_error $? "thread sanitizer not supported on arch $arch" "$LINENO" 5
19627 ;;
19628 esac
19629 else $as_nop
19630 tsan=false
19631 fi
19632
19633 if $tsan
19634 then :
19635 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using thread sanitizer with vendor=$ocaml_cc_vendor" >&5
19636 printf "%s\n" "$as_me: using thread sanitizer with vendor=$ocaml_cc_vendor" >&6;}
19637
19638 # Check for libtsan library files (necessary on some Linux distributions)
19639 SAVED_LDFLAGS="$LDFLAGS"
19640 LDFLAGS="$LDFLAGS -fsanitize=thread"
19641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19642 /* end confdefs.h. */
19643 void __tsan_func_entry(void *retaddr);
19644 int
19645 main (void)
19646 {
19647 __tsan_func_entry((void *)0);
19648 ;
19649 return 0;
19650 }
19651 _ACEOF
19652 if ac_fn_c_try_link "$LINENO"
19653 then :
19654
19655 else $as_nop
19656 as_fn_error $? "libtsan is necessary for TSan but cannot be found.
19657 Try installing it on your system." "$LINENO" 5
19658 fi
19659 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19660 conftest$ac_exeext conftest.$ac_ext
19661 LDFLAGS="$SAVED_LDFLAGS"
19662
19663 # We use tsan builtins which are internal functions and might not be
19664 # backwards compatible. We explicitly check if the compiler uses the
19665 # same declarations we expect.
19666 # Some tsan builtins like __tsan_func_exit() have either of two
19667 # signatures, void (void) or void (void *) (PR #14082).
19668 # We first do a single check for all builtins for which we expect
19669 # only one signature, then we check builtins for which we expect one
19670 # of multiple signatures and set a preprocessor definition according
19671 # to which one is found.
19672 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ThreadSanitizer builtins" >&5
19673 printf %s "checking for ThreadSanitizer builtins... " >&6; }
19674 if test ${ocaml_cv_tsan_builtins+y}
19675 then :
19676 printf %s "(cached) " >&6
19677 else $as_nop
19678 saved_LDFLAGS="$LDFLAGS"
19679 LDFLAGS="$LDFLAGS -fsanitize=thread $warn_error_flag"
19680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19681 /* end confdefs.h. */
19682
19683 void AnnotateHappensBefore(const char *f, int l, void *addr);
19684 void AnnotateHappensAfter (const char *f, int l, void *addr);
19685 void __tsan_func_entry (void *);
19686 void __tsan_write8 (void *location);
19687
19688 int
19689 main (void)
19690 {
19691
19692 AnnotateHappensBefore(__FILE__, __LINE__, (void*)0);
19693 AnnotateHappensAfter (__FILE__, __LINE__, (void*)0);
19694 __tsan_func_entry ((void*)0);
19695 __tsan_write8 ((void*)0);
19696
19697 ;
19698 return 0;
19699 }
19700 _ACEOF
19701 if ac_fn_c_try_link "$LINENO"
19702 then :
19703 ocaml_cv_tsan_builtins=yes
19704 else $as_nop
19705 ocaml_cv_tsan_builtins=no
19706 fi
19707 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19708 conftest$ac_exeext conftest.$ac_ext
19709 LDFLAGS="$saved_LDFLAGS"
19710 fi
19711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_tsan_builtins" >&5
19712 printf "%s\n" "$ocaml_cv_tsan_builtins" >&6; }
19713
19714 if test "$ocaml_cv_tsan_builtins" = no
19715 then :
19716 as_fn_error $? "libtsan doesn't provide the expected builtins" "$LINENO" 5
19717 fi
19718
19719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how many arguments __tsan_func_exit() takes" >&5
19720 printf %s "checking how many arguments __tsan_func_exit() takes... " >&6; }
19721 if test ${ocaml_cv_func_which___tsan_func_exit+y}
19722 then :
19723 printf %s "(cached) " >&6
19724 else $as_nop
19725 saved_LDFLAGS="$LDFLAGS"
19726
19727 # We need warning flags as using the wrong builtins is often a warning
19728 LDFLAGS="$LDFLAGS -fsanitize=thread $warn_error_flag"
19729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19730 /* end confdefs.h. */
19731 void __tsan_func_exit(void);
19732 int
19733 main (void)
19734 {
19735 __tsan_func_exit();
19736 ;
19737 return 0;
19738 }
19739 _ACEOF
19740 if ac_fn_c_try_link "$LINENO"
19741 then :
19742 ocaml_cv_func_which___tsan_func_exit=void_void
19743 else $as_nop
19744 # Else branch if the first program fails to link
19745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19746 /* end confdefs.h. */
19747 void __tsan_func_exit(void *);
19748 int
19749 main (void)
19750 {
19751 __tsan_func_exit((void *)0);
19752 ;
19753 return 0;
19754 }
19755 _ACEOF
19756 if ac_fn_c_try_link "$LINENO"
19757 then :
19758 ocaml_cv_func_which___tsan_func_exit=void_void_p
19759 else $as_nop
19760 ocaml_cv_func_which___tsan_func_exit=no
19761 fi
19762 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19763 conftest$ac_exeext conftest.$ac_ext
19764 fi
19765 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19766 conftest$ac_exeext conftest.$ac_ext
19767 LDFLAGS="$saved_LDFLAGS"
19768 fi
19769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ocaml_cv_func_which___tsan_func_exit" >&5
19770 printf "%s\n" "$ocaml_cv_func_which___tsan_func_exit" >&6; }
19771
19772 # Define a C macro based on the detected __tsan_func_exit signature
19773 case $ocaml_cv_func_which___tsan_func_exit in #(
19774 void_void_p) :
19775
19776 printf "%s\n" "#define HAVE___TSAN_FUNC_EXIT_VOID_VOID_P 1" >>confdefs.h
19777 ;; #(
19778 void_void) :
19779
19780 printf "%s\n" "#define HAVE___TSAN_FUNC_EXIT_VOID_VOID 1" >>confdefs.h
19781 ;; #(
19782 *) :
19783 as_fn_error $? "libtsan uses an unexpected signature for __tsan_func_exit" "$LINENO" 5 ;;
19784 esac
19785
19786 case $ocaml_cc_vendor in #(
19787 gcc-[0123456789]-*|gcc-10-*|clang-*) :
19788 ;; #(
19789 *) :
19790 tsan_cflags="$tsan_cflags -Wno-tsan" ;;
19791 esac
19792 case $ocaml_cc_vendor in #(
19793 gcc*) :
19794 tsan_distinguish_volatile_cflags="--param=tsan-distinguish-volatile=1" ;; #(
19795 clang*) :
19796 tsan_distinguish_volatile_cflags="-mllvm -tsan-distinguish-volatile" ;; #(
19797 *) :
19798 ;;
19799 esac
19800 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fsanitize=thread $tsan_distinguish_volatile_cflags" | $as_tr_sh`
19801 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fsanitize=thread $tsan_distinguish_volatile_cflags" >&5
19802 printf %s "checking whether the C compiler accepts -fsanitize=thread $tsan_distinguish_volatile_cflags... " >&6; }
19803 if eval test \${$as_CACHEVAR+y}
19804 then :
19805 printf %s "(cached) " >&6
19806 else $as_nop
19807
19808 ax_check_save_flags=$CFLAGS
19809 CFLAGS="$CFLAGS $warn_error_flag -fsanitize=thread $tsan_distinguish_volatile_cflags"
19810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19811 /* end confdefs.h. */
19812
19813 int
19814 main (void)
19815 {
19816
19817 ;
19818 return 0;
19819 }
19820 _ACEOF
19821 if ac_fn_c_try_compile "$LINENO"
19822 then :
19823 eval "$as_CACHEVAR=yes"
19824 else $as_nop
19825 eval "$as_CACHEVAR=no"
19826 fi
19827 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
19828 CFLAGS=$ax_check_save_flags
19829 fi
19830 eval ac_res=\$$as_CACHEVAR
19831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19832 printf "%s\n" "$ac_res" >&6; }
19833 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
19834 then :
19835 :
19836 else $as_nop
19837 as_fn_error $? "The C compiler does not support the \`$tsan_distinguish_volatile_cflags' flag. Try upgrading to GCC >= 11, or to Clang >= 11." "$LINENO" 5
19838 fi
19839
19840 tsan_cflags="$tsan_cflags $tsan_distinguish_volatile_cflags"
19841 oc_native_cppflags="$oc_native_cppflags $tsan_cppflags"
19842 oc_native_cflags="$oc_native_cflags $tsan_cflags"
19843 native_cflags="$native_cflags $tsan_cflags"
19844 native_ldflags="$native_ldflags $tsan_ldflags"
19845 tsan_native_runtime_c_sources="tsan"
19846 else $as_nop
19847 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not using thread sanitizer" >&5
19848 printf "%s\n" "$as_me: not using thread sanitizer" >&6;}
19849 tsan_native_runtime_c_sources=""
19850
19851 fi
19852
19853 # libunwind detection when TSan is enabled
19854 libunwind_cppflags=""
19855 libunwind_ldflags=""
19856
19857 if $tsan
19858 then :
19859 if test "$system" = "macosx"
19860 then :
19861 if test x"$LIBUNWIND_CPPFLAGS" != x -o \
19862 x"$LIBUNWIND_LDFLAGS" != x
19863 then :
19864 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: On MacOSX, specifying paths for libunwind headers or libraries is strongly discouraged. It is recommended to rely on the defaults provided by the configure script" >&5
19865 printf "%s\n" "$as_me: WARNING: On MacOSX, specifying paths for libunwind headers or libraries is strongly discouraged. It is recommended to rely on the defaults provided by the configure script" >&2;}
19866 fi
19867 fi
19868
19869 if test x"$LIBUNWIND_CPPFLAGS" != x
19870 then :
19871 libunwind_cppflags="$LIBUNWIND_CPPFLAGS"
19872 else $as_nop
19873 libunwind_cppflags=""
19874 fi
19875
19876 case "$system" in #(
19877 "freebsd") :
19878 libunwind_ldflags="-lgcc_eh" ;; #(
19879 "macosx") :
19880 libunwind_ldflags="-framework System" ;; #(
19881 *) :
19882 case "$arch" in #(
19883 "amd64") :
19884 libunwind_ldflags="-lunwind -lunwind-x86_64" ;; #(
19885 "arm64") :
19886 libunwind_ldflags="-lunwind -lunwind-aarch64" ;; #(
19887 "power") :
19888 libunwind_ldflags="-lunwind -lunwind-ppc64" ;; #(
19889 "riscv") :
19890 libunwind_ldflags="-lunwind -lunwind-riscv" ;; #(
19891 "s390x") :
19892 libunwind_ldflags="-lunwind -lunwind-s390x" ;; #(
19893 *) :
19894 ;;
19895 esac ;;
19896 esac
19897
19898 if test x"$LIBUNWIND_LDFLAGS" != x
19899 then :
19900 libunwind_ldflags="$LIBUNWIND_LDFLAGS $libunwind_ldflags"
19901 fi
19902
19903 oc_native_cppflags="$oc_native_cppflags $libunwind_cppflags"
19904 native_ldflags="$native_ldflags $libunwind_ldflags"
19905
19906
19907 SAVED_CPPFLAGS="$CPPFLAGS"
19908 SAVED_LDFLAGS="$LDFLAGS"
19909 CPPFLAGS="$CPPFLAGS $libunwind_cppflags"
19910 LDFLAGS="$LDFLAGS $libunwind_ldflags"
19911 ac_fn_c_check_header_compile "$LINENO" "libunwind.h" "ac_cv_header_libunwind_h" "$ac_includes_default"
19912 if test "x$ac_cv_header_libunwind_h" = xyes
19913 then :
19914 printf "%s\n" "#define HAS_LIBUNWIND 1" >>confdefs.h
19915
19916 libunwind_available=true
19917 else $as_nop
19918 libunwind_available=false
19919 fi
19920
19921 LDFLAGS="$SAVED_LDFLAGS"
19922 CPPFLAGS="$SAVED_CPPFLAGS"
19923
19924
19925 if ! $libunwind_available
19926 then :
19927 as_fn_error $? "libunwind is necessary for TSan but cannot be found" "$LINENO" 5
19928 fi
19929
19930 # We need unwinding information at runtime, but since we use
19931 # -no_compact_unwind, we also need -keep_dwarf_unwind otherwise
19932 # the OS X linker will chuck away the DWARF-like (.eh_frame)
19933 # information. (Older versions of OS X don't provide this.)
19934
19935 if $libunwind_available && test x"$system" = "xmacosx"
19936 then :
19937 extra_flags="-Wl,-keep_dwarf_unwind"
19938 mkexe="$mkexe $extra_flags"
19939 mksharedlib="$mksharedlib $extra_flags"
19940 fi
19941
19942 fi
19943
19944 ## Sockets
19945
19946 ## TODO: check whether the different libraries are really useful
19947
19948 sockets=true
19949
19950 case $target in #(
19951 *-w64-mingw32*) :
19952 cclibs="$cclibs -lws2_32"
19953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
19954 printf %s "checking for library containing socket... " >&6; }
19955 if test ${ac_cv_search_socket+y}
19956 then :
19957 printf %s "(cached) " >&6
19958 else $as_nop
19959 ac_func_search_save_LIBS=$LIBS
19960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19961 /* end confdefs.h. */
19962
19963 /* Override any GCC internal prototype to avoid an error.
19964 Use char because int might match the return type of a GCC
19965 builtin and then its argument prototype would still apply. */
19966 char socket ();
19967 int
19968 main (void)
19969 {
19970 return socket ();
19971 ;
19972 return 0;
19973 }
19974 _ACEOF
19975 for ac_lib in '' ws2_32
19976 do
19977 if test -z "$ac_lib"; then
19978 ac_res="none required"
19979 else
19980 ac_res=-l$ac_lib
19981 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
19982 fi
19983 if ac_fn_c_try_link "$LINENO"
19984 then :
19985 ac_cv_search_socket=$ac_res
19986 fi
19987 rm -f core conftest.err conftest.$ac_objext conftest.beam \
19988 conftest$ac_exeext
19989 if test ${ac_cv_search_socket+y}
19990 then :
19991 break
19992 fi
19993 done
19994 if test ${ac_cv_search_socket+y}
19995 then :
19996
19997 else $as_nop
19998 ac_cv_search_socket=no
19999 fi
20000 rm conftest.$ac_ext
20001 LIBS=$ac_func_search_save_LIBS
20002 fi
20003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
20004 printf "%s\n" "$ac_cv_search_socket" >&6; }
20005 ac_res=$ac_cv_search_socket
20006 if test "$ac_res" != no
20007 then :
20008 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20009
20010 fi
20011
20012 ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
20013 if test "x$ac_cv_func_socketpair" = xyes
20014 then :
20015 printf "%s\n" "#define HAS_SOCKETPAIR 1" >>confdefs.h
20016
20017 fi
20018 ;; #(
20019 *-pc-windows) :
20020 cclibs="$cclibs ws2_32.lib"
20021 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
20022 printf %s "checking for library containing socket... " >&6; }
20023 if test ${ac_cv_search_socket+y}
20024 then :
20025 printf %s "(cached) " >&6
20026 else $as_nop
20027 ac_func_search_save_LIBS=$LIBS
20028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20029 /* end confdefs.h. */
20030
20031 /* Override any GCC internal prototype to avoid an error.
20032 Use char because int might match the return type of a GCC
20033 builtin and then its argument prototype would still apply. */
20034 char socket ();
20035 int
20036 main (void)
20037 {
20038 return socket ();
20039 ;
20040 return 0;
20041 }
20042 _ACEOF
20043 for ac_lib in '' ws2_32
20044 do
20045 if test -z "$ac_lib"; then
20046 ac_res="none required"
20047 else
20048 ac_res=-l$ac_lib
20049 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20050 fi
20051 if ac_fn_c_try_link "$LINENO"
20052 then :
20053 ac_cv_search_socket=$ac_res
20054 fi
20055 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20056 conftest$ac_exeext
20057 if test ${ac_cv_search_socket+y}
20058 then :
20059 break
20060 fi
20061 done
20062 if test ${ac_cv_search_socket+y}
20063 then :
20064
20065 else $as_nop
20066 ac_cv_search_socket=no
20067 fi
20068 rm conftest.$ac_ext
20069 LIBS=$ac_func_search_save_LIBS
20070 fi
20071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
20072 printf "%s\n" "$ac_cv_search_socket" >&6; }
20073 ac_res=$ac_cv_search_socket
20074 if test "$ac_res" != no
20075 then :
20076 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20077
20078 fi
20079
20080 ac_fn_c_check_func "$LINENO" "socketpair" "ac_cv_func_socketpair"
20081 if test "x$ac_cv_func_socketpair" = xyes
20082 then :
20083 printf "%s\n" "#define HAS_SOCKETPAIR 1" >>confdefs.h
20084
20085 fi
20086 ;; #(
20087 *-*-haiku) :
20088 cclibs="$cclibs -lnetwork"
20089 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
20090 printf %s "checking for library containing socket... " >&6; }
20091 if test ${ac_cv_search_socket+y}
20092 then :
20093 printf %s "(cached) " >&6
20094 else $as_nop
20095 ac_func_search_save_LIBS=$LIBS
20096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20097 /* end confdefs.h. */
20098
20099 /* Override any GCC internal prototype to avoid an error.
20100 Use char because int might match the return type of a GCC
20101 builtin and then its argument prototype would still apply. */
20102 char socket ();
20103 int
20104 main (void)
20105 {
20106 return socket ();
20107 ;
20108 return 0;
20109 }
20110 _ACEOF
20111 for ac_lib in '' network
20112 do
20113 if test -z "$ac_lib"; then
20114 ac_res="none required"
20115 else
20116 ac_res=-l$ac_lib
20117 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20118 fi
20119 if ac_fn_c_try_link "$LINENO"
20120 then :
20121 ac_cv_search_socket=$ac_res
20122 fi
20123 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20124 conftest$ac_exeext
20125 if test ${ac_cv_search_socket+y}
20126 then :
20127 break
20128 fi
20129 done
20130 if test ${ac_cv_search_socket+y}
20131 then :
20132
20133 else $as_nop
20134 ac_cv_search_socket=no
20135 fi
20136 rm conftest.$ac_ext
20137 LIBS=$ac_func_search_save_LIBS
20138 fi
20139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
20140 printf "%s\n" "$ac_cv_search_socket" >&6; }
20141 ac_res=$ac_cv_search_socket
20142 if test "$ac_res" != no
20143 then :
20144 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20145
20146 fi
20147 ;; #(
20148 *-*-solaris*) :
20149 cclibs="$cclibs -lsocket -lnsl"
20150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
20151 printf %s "checking for library containing socket... " >&6; }
20152 if test ${ac_cv_search_socket+y}
20153 then :
20154 printf %s "(cached) " >&6
20155 else $as_nop
20156 ac_func_search_save_LIBS=$LIBS
20157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20158 /* end confdefs.h. */
20159
20160 /* Override any GCC internal prototype to avoid an error.
20161 Use char because int might match the return type of a GCC
20162 builtin and then its argument prototype would still apply. */
20163 char socket ();
20164 int
20165 main (void)
20166 {
20167 return socket ();
20168 ;
20169 return 0;
20170 }
20171 _ACEOF
20172 for ac_lib in '' socket
20173 do
20174 if test -z "$ac_lib"; then
20175 ac_res="none required"
20176 else
20177 ac_res=-l$ac_lib
20178 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20179 fi
20180 if ac_fn_c_try_link "$LINENO"
20181 then :
20182 ac_cv_search_socket=$ac_res
20183 fi
20184 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20185 conftest$ac_exeext
20186 if test ${ac_cv_search_socket+y}
20187 then :
20188 break
20189 fi
20190 done
20191 if test ${ac_cv_search_socket+y}
20192 then :
20193
20194 else $as_nop
20195 ac_cv_search_socket=no
20196 fi
20197 rm conftest.$ac_ext
20198 LIBS=$ac_func_search_save_LIBS
20199 fi
20200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
20201 printf "%s\n" "$ac_cv_search_socket" >&6; }
20202 ac_res=$ac_cv_search_socket
20203 if test "$ac_res" != no
20204 then :
20205 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20206
20207 fi
20208
20209 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
20210 printf %s "checking for library containing inet_ntop... " >&6; }
20211 if test ${ac_cv_search_inet_ntop+y}
20212 then :
20213 printf %s "(cached) " >&6
20214 else $as_nop
20215 ac_func_search_save_LIBS=$LIBS
20216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20217 /* end confdefs.h. */
20218
20219 /* Override any GCC internal prototype to avoid an error.
20220 Use char because int might match the return type of a GCC
20221 builtin and then its argument prototype would still apply. */
20222 char inet_ntop ();
20223 int
20224 main (void)
20225 {
20226 return inet_ntop ();
20227 ;
20228 return 0;
20229 }
20230 _ACEOF
20231 for ac_lib in '' nsl
20232 do
20233 if test -z "$ac_lib"; then
20234 ac_res="none required"
20235 else
20236 ac_res=-l$ac_lib
20237 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20238 fi
20239 if ac_fn_c_try_link "$LINENO"
20240 then :
20241 ac_cv_search_inet_ntop=$ac_res
20242 fi
20243 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20244 conftest$ac_exeext
20245 if test ${ac_cv_search_inet_ntop+y}
20246 then :
20247 break
20248 fi
20249 done
20250 if test ${ac_cv_search_inet_ntop+y}
20251 then :
20252
20253 else $as_nop
20254 ac_cv_search_inet_ntop=no
20255 fi
20256 rm conftest.$ac_ext
20257 LIBS=$ac_func_search_save_LIBS
20258 fi
20259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
20260 printf "%s\n" "$ac_cv_search_inet_ntop" >&6; }
20261 ac_res=$ac_cv_search_inet_ntop
20262 if test "$ac_res" != no
20263 then :
20264 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20265
20266 fi
20267 ;; #(
20268 *) :
20269
20270
20271 for ac_func in socket socketpair bind listen accept connect
20272 do :
20273 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
20274 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20275 if eval test \"x\$"$as_ac_var"\" = x"yes"
20276 then :
20277 cat >>confdefs.h <<_ACEOF
20278 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
20279 _ACEOF
20280
20281 else $as_nop
20282 sockets=false
20283 fi
20284
20285 done
20286
20287 ;;
20288 esac
20289
20290 if $sockets
20291 then :
20292 printf "%s\n" "#define HAS_SOCKETS 1" >>confdefs.h
20293
20294 fi
20295
20296 ## socklen_t
20297
20298 case $target in #(
20299 *-w64-mingw32*|*-pc-windows) :
20300 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <ws2tcpip.h>
20301 "
20302 if test "x$ac_cv_type_socklen_t" = xyes
20303 then :
20304 printf "%s\n" "#define HAS_SOCKLEN_T 1" >>confdefs.h
20305
20306 fi
20307 ;; #(
20308 *) :
20309 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/socket.h>
20310 "
20311 if test "x$ac_cv_type_socklen_t" = xyes
20312 then :
20313 printf "%s\n" "#define HAS_SOCKLEN_T 1" >>confdefs.h
20314
20315 fi
20316 ;;
20317 esac
20318
20319 ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton"
20320 if test "x$ac_cv_func_inet_aton" = xyes
20321 then :
20322 printf "%s\n" "#define HAS_INET_ATON 1" >>confdefs.h
20323
20324 fi
20325
20326
20327 ## Unix domain sockets support on Windows
20328
20329 case $target in #(
20330 *-w64-mingw32*|*-pc-windows) :
20331 for ac_header in afunix.h
20332 do :
20333 ac_fn_c_check_header_compile "$LINENO" "afunix.h" "ac_cv_header_afunix_h" "#include <winsock2.h>
20334 "
20335 if test "x$ac_cv_header_afunix_h" = xyes
20336 then :
20337 printf "%s\n" "#define HAVE_AFUNIX_H 1" >>confdefs.h
20338 printf "%s\n" "#define HAS_AFUNIX_H 1" >>confdefs.h
20339
20340 fi
20341
20342 done ;; #(
20343 *) :
20344 ;;
20345 esac
20346
20347 ## IPv6 support
20348
20349 ipv6=true
20350
20351 case $target in #(
20352 *-w64-mingw32*|*-pc-windows) :
20353 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "#include <ws2tcpip.h>
20354 "
20355 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes
20356 then :
20357
20358 else $as_nop
20359 ipv6=false
20360 fi
20361 ;; #(
20362 *) :
20363 ac_fn_c_check_type "$LINENO" "struct sockaddr_in6" "ac_cv_type_struct_sockaddr_in6" "
20364 #include <sys/types.h>
20365 #include <sys/socket.h>
20366 #include <netinet/in.h>
20367
20368
20369 "
20370 if test "x$ac_cv_type_struct_sockaddr_in6" = xyes
20371 then :
20372
20373 else $as_nop
20374 ipv6=false
20375 fi
20376
20377 ;;
20378 esac
20379
20380 if $ipv6
20381 then :
20382
20383 for ac_func in getaddrinfo getnameinfo inet_pton inet_ntop
20384 do :
20385 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh`
20386 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20387 if eval test \"x\$"$as_ac_var"\" = x"yes"
20388 then :
20389 cat >>confdefs.h <<_ACEOF
20390 #define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1
20391 _ACEOF
20392
20393 else $as_nop
20394 ipv6=false
20395 fi
20396
20397 done
20398 fi
20399 if $ipv6
20400 then :
20401 printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h
20402
20403 fi
20404
20405 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
20406 if test "x$ac_cv_func_rewinddir" = xyes
20407 then :
20408 printf "%s\n" "#define HAS_REWINDDIR 1" >>confdefs.h
20409
20410 fi
20411
20412
20413 ac_fn_c_check_func "$LINENO" "lockf" "ac_cv_func_lockf"
20414 if test "x$ac_cv_func_lockf" = xyes
20415 then :
20416 printf "%s\n" "#define HAS_LOCKF 1" >>confdefs.h
20417
20418 fi
20419
20420
20421 ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo"
20422 if test "x$ac_cv_func_mkfifo" = xyes
20423 then :
20424 printf "%s\n" "#define HAS_MKFIFO 1" >>confdefs.h
20425
20426 fi
20427
20428
20429 ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
20430 if test "x$ac_cv_func_getcwd" = xyes
20431 then :
20432 printf "%s\n" "#define HAS_GETCWD 1" >>confdefs.h
20433
20434 fi
20435
20436
20437 ac_fn_c_check_func "$LINENO" "system" "ac_cv_func_system"
20438 if test "x$ac_cv_func_system" = xyes
20439 then :
20440 printf "%s\n" "#define HAS_SYSTEM 1" >>confdefs.h
20441
20442 fi
20443
20444
20445 ## utime
20446 ## Note: this was defined in config/s-nt.h but the autoconf macros do not
20447 # seem to detect it properly on Windows so we hardcode the definition
20448 # of HAS_UTIME on Windows but this will probably need to be clarified
20449 case $target in #(
20450 *-w64-mingw32*|*-pc-windows) :
20451 printf "%s\n" "#define HAS_UTIME 1" >>confdefs.h
20452 ;; #(
20453 *) :
20454 ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default"
20455 if test "x$ac_cv_header_sys_types_h" = xyes
20456 then :
20457 ac_fn_c_check_header_compile "$LINENO" "utime.h" "ac_cv_header_utime_h" "$ac_includes_default"
20458 if test "x$ac_cv_header_utime_h" = xyes
20459 then :
20460 ac_fn_c_check_func "$LINENO" "utime" "ac_cv_func_utime"
20461 if test "x$ac_cv_func_utime" = xyes
20462 then :
20463 printf "%s\n" "#define HAS_UTIME 1" >>confdefs.h
20464
20465 fi
20466
20467 fi
20468
20469 fi
20470 ;;
20471 esac
20472
20473 ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
20474 if test "x$ac_cv_func_utimes" = xyes
20475 then :
20476 printf "%s\n" "#define HAS_UTIMES 1" >>confdefs.h
20477
20478 fi
20479
20480
20481 ac_fn_c_check_func "$LINENO" "fchmod" "ac_cv_func_fchmod"
20482 if test "x$ac_cv_func_fchmod" = xyes
20483 then :
20484 ac_fn_c_check_func "$LINENO" "fchown" "ac_cv_func_fchown"
20485 if test "x$ac_cv_func_fchown" = xyes
20486 then :
20487 printf "%s\n" "#define HAS_FCHMOD 1" >>confdefs.h
20488
20489 fi
20490
20491 fi
20492
20493
20494 ac_fn_c_check_func "$LINENO" "truncate" "ac_cv_func_truncate"
20495 if test "x$ac_cv_func_truncate" = xyes
20496 then :
20497 ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate"
20498 if test "x$ac_cv_func_ftruncate" = xyes
20499 then :
20500 printf "%s\n" "#define HAS_TRUNCATE 1" >>confdefs.h
20501
20502 fi
20503
20504 fi
20505
20506
20507 ## select
20508 ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select"
20509 if test "x$ac_cv_func_select" = xyes
20510 then :
20511 ac_fn_c_check_type "$LINENO" "fd_set" "ac_cv_type_fd_set" "
20512 #include <sys/types.h>
20513 #include <sys/select.h>
20514
20515 "
20516 if test "x$ac_cv_type_fd_set" = xyes
20517 then :
20518 printf "%s\n" "#define HAS_SELECT 1" >>confdefs.h
20519
20520 fi
20521
20522 fi
20523
20524
20525 ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep"
20526 if test "x$ac_cv_func_nanosleep" = xyes
20527 then :
20528 printf "%s\n" "#define HAS_NANOSLEEP 1" >>confdefs.h
20529
20530 fi
20531
20532
20533 ac_fn_c_check_func "$LINENO" "symlink" "ac_cv_func_symlink"
20534 if test "x$ac_cv_func_symlink" = xyes
20535 then :
20536 ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink"
20537 if test "x$ac_cv_func_readlink" = xyes
20538 then :
20539 ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
20540 if test "x$ac_cv_func_lstat" = xyes
20541 then :
20542 printf "%s\n" "#define HAS_SYMLINK 1" >>confdefs.h
20543
20544 fi
20545
20546 fi
20547
20548 fi
20549
20550
20551 ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
20552 if test "x$ac_cv_func_realpath" = xyes
20553 then :
20554 printf "%s\n" "#define HAS_REALPATH 1" >>confdefs.h
20555
20556 fi
20557
20558
20559 # wait
20560 ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
20561 if test "x$ac_cv_func_waitpid" = xyes
20562 then :
20563
20564 wait=true
20565 printf "%s\n" "#define HAS_WAITPID 1" >>confdefs.h
20566
20567
20568 else $as_nop
20569 wait=false
20570 fi
20571
20572
20573 ac_fn_c_check_func "$LINENO" "wait4" "ac_cv_func_wait4"
20574 if test "x$ac_cv_func_wait4" = xyes
20575 then :
20576
20577 has_wait=true
20578 printf "%s\n" "#define HAS_WAIT4 1" >>confdefs.h
20579
20580
20581 fi
20582
20583
20584 ## getgroups
20585 ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups"
20586 if test "x$ac_cv_func_getgroups" = xyes
20587 then :
20588 printf "%s\n" "#define HAS_GETGROUPS 1" >>confdefs.h
20589
20590 fi
20591
20592
20593 ## setgroups
20594 ac_fn_c_check_func "$LINENO" "setgroups" "ac_cv_func_setgroups"
20595 if test "x$ac_cv_func_setgroups" = xyes
20596 then :
20597 printf "%s\n" "#define HAS_SETGROUPS 1" >>confdefs.h
20598
20599 fi
20600
20601
20602 ## initgroups
20603 ac_fn_c_check_func "$LINENO" "initgroups" "ac_cv_func_initgroups"
20604 if test "x$ac_cv_func_initgroups" = xyes
20605 then :
20606 printf "%s\n" "#define HAS_INITGROUPS 1" >>confdefs.h
20607
20608 fi
20609
20610
20611 ## termios
20612
20613 ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default"
20614 if test "x$ac_cv_header_termios_h" = xyes
20615 then :
20616 ac_fn_c_check_func "$LINENO" "tcgetattr" "ac_cv_func_tcgetattr"
20617 if test "x$ac_cv_func_tcgetattr" = xyes
20618 then :
20619 ac_fn_c_check_func "$LINENO" "tcsetattr" "ac_cv_func_tcsetattr"
20620 if test "x$ac_cv_func_tcsetattr" = xyes
20621 then :
20622 ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
20623 if test "x$ac_cv_func_tcsendbreak" = xyes
20624 then :
20625 ac_fn_c_check_func "$LINENO" "tcflush" "ac_cv_func_tcflush"
20626 if test "x$ac_cv_func_tcflush" = xyes
20627 then :
20628 ac_fn_c_check_func "$LINENO" "tcflow" "ac_cv_func_tcflow"
20629 if test "x$ac_cv_func_tcflow" = xyes
20630 then :
20631 printf "%s\n" "#define HAS_TERMIOS 1" >>confdefs.h
20632
20633 fi
20634
20635 fi
20636
20637 fi
20638
20639 fi
20640
20641 fi
20642
20643 fi
20644
20645
20646 ## setitimer
20647
20648 ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer"
20649 if test "x$ac_cv_func_setitimer" = xyes
20650 then :
20651
20652 setitimer=true
20653 printf "%s\n" "#define HAS_SETITIMER 1" >>confdefs.h
20654
20655
20656 else $as_nop
20657 setitimer=false
20658 fi
20659
20660
20661 ## gethostname
20662 # Note: detection fails on Windows so hardcoding the result
20663 # (should be debugged later)
20664 case $target in #(
20665 *-w64-mingw32*|*-pc-windows) :
20666 printf "%s\n" "#define HAS_GETHOSTNAME 1" >>confdefs.h
20667 ;; #(
20668 *) :
20669 ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname"
20670 if test "x$ac_cv_func_gethostname" = xyes
20671 then :
20672 printf "%s\n" "#define HAS_GETHOSTNAME 1" >>confdefs.h
20673
20674 fi
20675 ;;
20676 esac
20677
20678 ## uname
20679
20680 ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default"
20681 if test "x$ac_cv_header_sys_utsname_h" = xyes
20682 then :
20683 ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname"
20684 if test "x$ac_cv_func_uname" = xyes
20685 then :
20686 printf "%s\n" "#define HAS_UNAME 1" >>confdefs.h
20687
20688 fi
20689
20690 fi
20691
20692
20693 ## gettimeofday
20694
20695 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
20696 if test "x$ac_cv_func_gettimeofday" = xyes
20697 then :
20698
20699 gettimeofday=true
20700 printf "%s\n" "#define HAS_GETTIMEOFDAY 1" >>confdefs.h
20701
20702
20703 else $as_nop
20704 gettimeofday=false
20705 fi
20706
20707
20708 ## mktime
20709
20710 ac_fn_c_check_func "$LINENO" "mktime" "ac_cv_func_mktime"
20711 if test "x$ac_cv_func_mktime" = xyes
20712 then :
20713 printf "%s\n" "#define HAS_MKTIME 1" >>confdefs.h
20714
20715 fi
20716
20717
20718 ## setsid
20719
20720 case $target in #(
20721 *-*-cygwin|*-w64-mingw32*|*-pc-windows) :
20722 ;; #(
20723 *) :
20724 ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid"
20725 if test "x$ac_cv_func_setsid" = xyes
20726 then :
20727 printf "%s\n" "#define HAS_SETSID 1" >>confdefs.h
20728
20729 fi
20730 ;;
20731 esac
20732
20733 ## putenv
20734
20735 ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv"
20736 if test "x$ac_cv_func_putenv" = xyes
20737 then :
20738 printf "%s\n" "#define HAS_PUTENV 1" >>confdefs.h
20739
20740 fi
20741
20742
20743 ## setenv and unsetenv
20744
20745 ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv"
20746 if test "x$ac_cv_func_setenv" = xyes
20747 then :
20748 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
20749 if test "x$ac_cv_func_unsetenv" = xyes
20750 then :
20751 printf "%s\n" "#define HAS_SETENV_UNSETENV 1" >>confdefs.h
20752
20753 fi
20754
20755 fi
20756
20757
20758 ## newlocale() and <locale.h>
20759 # Note: the detection fails on msvc so we hardcode the result
20760 # (should be debugged later)
20761 case $target in #(
20762 *-pc-windows) :
20763 printf "%s\n" "#define HAS_LOCALE_H 1" >>confdefs.h
20764 ;; #(
20765 *) :
20766 ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
20767 if test "x$ac_cv_header_locale_h" = xyes
20768 then :
20769 ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
20770 if test "x$ac_cv_func_newlocale" = xyes
20771 then :
20772 ac_fn_c_check_func "$LINENO" "freelocale" "ac_cv_func_freelocale"
20773 if test "x$ac_cv_func_freelocale" = xyes
20774 then :
20775 ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
20776 if test "x$ac_cv_func_uselocale" = xyes
20777 then :
20778 printf "%s\n" "#define HAS_LOCALE_H 1" >>confdefs.h
20779
20780 fi
20781
20782 fi
20783
20784 fi
20785
20786 fi
20787 ;;
20788 esac
20789
20790 ac_fn_c_check_header_compile "$LINENO" "xlocale.h" "ac_cv_header_xlocale_h" "$ac_includes_default"
20791 if test "x$ac_cv_header_xlocale_h" = xyes
20792 then :
20793 ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale"
20794 if test "x$ac_cv_func_newlocale" = xyes
20795 then :
20796 ac_fn_c_check_func "$LINENO" "freelocale" "ac_cv_func_freelocale"
20797 if test "x$ac_cv_func_freelocale" = xyes
20798 then :
20799 ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale"
20800 if test "x$ac_cv_func_uselocale" = xyes
20801 then :
20802 printf "%s\n" "#define HAS_XLOCALE_H 1" >>confdefs.h
20803
20804 fi
20805
20806 fi
20807
20808 fi
20809
20810 fi
20811
20812
20813 ## strtod_l
20814 # Note: not detected on MSVC so hardcoding the result
20815 # (should be debugged later)
20816 case $target in #(
20817 *-pc-windows) :
20818 printf "%s\n" "#define HAS_STRTOD_L 1" >>confdefs.h
20819 ;; #(
20820 *) :
20821 ac_fn_c_check_func "$LINENO" "strtod_l" "ac_cv_func_strtod_l"
20822 if test "x$ac_cv_func_strtod_l" = xyes
20823 then :
20824 printf "%s\n" "#define HAS_STRTOD_L 1" >>confdefs.h
20825
20826 fi
20827 ;;
20828 esac
20829
20830 ## shared library support
20831 if $supports_shared_libraries
20832 then :
20833 case $target in #(
20834 *-w64-mingw32*|*-pc-windows|*-*-cygwin) :
20835 DLLIBS="" ;; #(
20836 *) :
20837 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
20838 if test "x$ac_cv_func_dlopen" = xyes
20839 then :
20840 supports_shared_libraries=true DLLIBS=""
20841 else $as_nop
20842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
20843 printf %s "checking for dlopen in -ldl... " >&6; }
20844 if test ${ac_cv_lib_dl_dlopen+y}
20845 then :
20846 printf %s "(cached) " >&6
20847 else $as_nop
20848 ac_check_lib_save_LIBS=$LIBS
20849 LIBS="-ldl $LIBS"
20850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20851 /* end confdefs.h. */
20852
20853 /* Override any GCC internal prototype to avoid an error.
20854 Use char because int might match the return type of a GCC
20855 builtin and then its argument prototype would still apply. */
20856 char dlopen ();
20857 int
20858 main (void)
20859 {
20860 return dlopen ();
20861 ;
20862 return 0;
20863 }
20864 _ACEOF
20865 if ac_fn_c_try_link "$LINENO"
20866 then :
20867 ac_cv_lib_dl_dlopen=yes
20868 else $as_nop
20869 ac_cv_lib_dl_dlopen=no
20870 fi
20871 rm -f core conftest.err conftest.$ac_objext conftest.beam \
20872 conftest$ac_exeext conftest.$ac_ext
20873 LIBS=$ac_check_lib_save_LIBS
20874 fi
20875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
20876 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; }
20877 if test "x$ac_cv_lib_dl_dlopen" = xyes
20878 then :
20879 supports_shared_libraries=true DLLIBS="-ldl $DLLIBS"
20880 else $as_nop
20881 supports_shared_libraries=false
20882 fi
20883
20884 fi
20885 ;;
20886 esac
20887 else $as_nop
20888 supports_shared_libraries=false
20889 fi
20890
20891 if $supports_shared_libraries
20892 then :
20893 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is supported." >&5
20894 printf "%s\n" "$as_me: Dynamic loading of shared libraries is supported." >&6;}
20895 printf "%s\n" "#define SUPPORT_DYNAMIC_LINKING 1" >>confdefs.h
20896
20897 else $as_nop
20898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Dynamic loading of shared libraries is not supported." >&5
20899 printf "%s\n" "$as_me: Dynamic loading of shared libraries is not supported." >&6;}
20900 fi
20901
20902 ## mmap
20903
20904 ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default"
20905 if test "x$ac_cv_header_sys_mman_h" = xyes
20906 then :
20907 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
20908 if test "x$ac_cv_func_mmap" = xyes
20909 then :
20910 ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap"
20911 if test "x$ac_cv_func_munmap" = xyes
20912 then :
20913 printf "%s\n" "#define HAS_MMAP 1" >>confdefs.h
20914
20915 fi
20916
20917 fi
20918
20919 fi
20920
20921
20922 ## pwrite
20923
20924 ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite"
20925 if test "x$ac_cv_func_pwrite" = xyes
20926 then :
20927 printf "%s\n" "#define HAS_PWRITE 1" >>confdefs.h
20928
20929 fi
20930
20931
20932 ## -fdebug-prefix-map support by the C compiler
20933 case $ocaml_cc_vendor,$target in #(
20934 *,*-w64-mingw32*) :
20935 cc_has_debug_prefix_map=false ;; #(
20936 *,*-pc-windows) :
20937 cc_has_debug_prefix_map=false ;; #(
20938 xlc*,powerpc-ibm-aix*) :
20939 cc_has_debug_prefix_map=false ;; #(
20940 sunc*,sparc-sun-*) :
20941 cc_has_debug_prefix_map=false ;; #(
20942 *) :
20943 as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$warn_error_flag_-fdebug-prefix-map=old=new" | $as_tr_sh`
20944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler accepts -fdebug-prefix-map=old=new" >&5
20945 printf %s "checking whether the C compiler accepts -fdebug-prefix-map=old=new... " >&6; }
20946 if eval test \${$as_CACHEVAR+y}
20947 then :
20948 printf %s "(cached) " >&6
20949 else $as_nop
20950
20951 ax_check_save_flags=$CFLAGS
20952 CFLAGS="$CFLAGS $warn_error_flag -fdebug-prefix-map=old=new"
20953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20954 /* end confdefs.h. */
20955
20956 int
20957 main (void)
20958 {
20959
20960 ;
20961 return 0;
20962 }
20963 _ACEOF
20964 if ac_fn_c_try_compile "$LINENO"
20965 then :
20966 eval "$as_CACHEVAR=yes"
20967 else $as_nop
20968 eval "$as_CACHEVAR=no"
20969 fi
20970 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
20971 CFLAGS=$ax_check_save_flags
20972 fi
20973 eval ac_res=\$$as_CACHEVAR
20974 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20975 printf "%s\n" "$ac_res" >&6; }
20976 if eval test \"x\$"$as_CACHEVAR"\" = x"yes"
20977 then :
20978 cc_has_debug_prefix_map=true
20979 else $as_nop
20980 cc_has_debug_prefix_map=false
20981 fi
20982 ;;
20983 esac
20984
20985 ## Does stat support nanosecond precision
20986
20987 stat_has_ns_precision=false
20988 ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "
20989 $ac_includes_default
20990 #include <sys/stat.h>
20991 "
20992 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
20993 then :
20994
20995 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h
20996
20997 stat_has_ns_precision=true
20998 fi
20999 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "
21000 $ac_includes_default
21001 #include <sys/stat.h>
21002 "
21003 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
21004 then :
21005
21006 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h
21007
21008 stat_has_ns_precision=true
21009 fi
21010 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "
21011 $ac_includes_default
21012 #include <sys/stat.h>
21013 "
21014 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
21015 then :
21016
21017 printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h
21018
21019 stat_has_ns_precision=true
21020 fi
21021
21022 if $stat_has_ns_precision
21023 then :
21024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: stat supports nanosecond precision" >&5
21025 printf "%s\n" "$as_me: stat supports nanosecond precision" >&6;}
21026 else $as_nop
21027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: stat does not support nanosecond precision" >&5
21028 printf "%s\n" "$as_me: stat does not support nanosecond precision" >&6;}
21029 fi
21030
21031 # Number of arguments of gethostbyname_r
21032
21033
21034
21035 ac_ext=c
21036 ac_cpp='$CPP $CPPFLAGS'
21037 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21038 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21039 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21040
21041 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyname_r() takes" >&5
21042 printf %s "checking how many arguments gethostbyname_r() takes... " >&6; }
21043
21044 if test ${ac_cv_func_which_gethostbyname_r+y}
21045 then :
21046 printf %s "(cached) " >&6
21047 else $as_nop
21048
21049
21050 ################################################################
21051
21052 ac_cv_func_which_gethostbyname_r=unknown
21053
21054 #
21055 # ONE ARGUMENT (sanity check)
21056 #
21057
21058 # This should fail, as there is no variant of gethostbyname_r() that takes
21059 # a single argument. If it actually compiles, then we can assume that
21060 # netdb.h is not declaring the function, and the compiler is thereby
21061 # assuming an implicit prototype. In which case, we're out of luck.
21062 #
21063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21064 /* end confdefs.h. */
21065 #include <netdb.h>
21066 int
21067 main (void)
21068 {
21069
21070 char *name = "www.gnu.org";
21071 (void)gethostbyname_r(name) /* ; */
21072
21073 ;
21074 return 0;
21075 }
21076 _ACEOF
21077 if ac_fn_c_try_compile "$LINENO"
21078 then :
21079 ac_cv_func_which_gethostbyname_r=no
21080 fi
21081 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21082
21083 #
21084 # SIX ARGUMENTS
21085 # (e.g. Linux)
21086 #
21087
21088 if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
21089
21090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21091 /* end confdefs.h. */
21092 #include <netdb.h>
21093 int
21094 main (void)
21095 {
21096
21097 char *name = "www.gnu.org";
21098 struct hostent ret, *retp;
21099 char buf[1024];
21100 int buflen = 1024;
21101 int my_h_errno;
21102 (void)gethostbyname_r(name, &ret, buf, buflen, &retp, &my_h_errno) /* ; */
21103
21104 ;
21105 return 0;
21106 }
21107 _ACEOF
21108 if ac_fn_c_try_compile "$LINENO"
21109 then :
21110 ac_cv_func_which_gethostbyname_r=six
21111 fi
21112 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21113
21114 fi
21115
21116 #
21117 # FIVE ARGUMENTS
21118 # (e.g. Solaris)
21119 #
21120
21121 if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
21122
21123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21124 /* end confdefs.h. */
21125 #include <netdb.h>
21126 int
21127 main (void)
21128 {
21129
21130 char *name = "www.gnu.org";
21131 struct hostent ret;
21132 char buf[1024];
21133 int buflen = 1024;
21134 int my_h_errno;
21135 (void)gethostbyname_r(name, &ret, buf, buflen, &my_h_errno) /* ; */
21136
21137 ;
21138 return 0;
21139 }
21140 _ACEOF
21141 if ac_fn_c_try_compile "$LINENO"
21142 then :
21143 ac_cv_func_which_gethostbyname_r=five
21144 fi
21145 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21146
21147 fi
21148
21149 #
21150 # THREE ARGUMENTS
21151 # (e.g. AIX, HP-UX, Tru64)
21152 #
21153
21154 if test "$ac_cv_func_which_gethostbyname_r" = "unknown"; then
21155
21156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21157 /* end confdefs.h. */
21158 #include <netdb.h>
21159 int
21160 main (void)
21161 {
21162
21163 char *name = "www.gnu.org";
21164 struct hostent ret;
21165 struct hostent_data data;
21166 (void)gethostbyname_r(name, &ret, &data) /* ; */
21167
21168 ;
21169 return 0;
21170 }
21171 _ACEOF
21172 if ac_fn_c_try_compile "$LINENO"
21173 then :
21174 ac_cv_func_which_gethostbyname_r=three
21175 fi
21176 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21177
21178 fi
21179
21180 ################################################################
21181
21182
21183 fi
21184
21185 case "$ac_cv_func_which_gethostbyname_r" in
21186 three|five|six)
21187
21188 printf "%s\n" "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
21189
21190 ;;
21191 esac
21192
21193 case "$ac_cv_func_which_gethostbyname_r" in
21194 three)
21195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: three" >&5
21196 printf "%s\n" "three" >&6; }
21197
21198 printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_3 1" >>confdefs.h
21199
21200 ;;
21201
21202 five)
21203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: five" >&5
21204 printf "%s\n" "five" >&6; }
21205
21206 printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_5 1" >>confdefs.h
21207
21208 ;;
21209
21210 six)
21211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: six" >&5
21212 printf "%s\n" "six" >&6; }
21213
21214 printf "%s\n" "#define HAVE_FUNC_GETHOSTBYNAME_R_6 1" >>confdefs.h
21215
21216 ;;
21217
21218 no)
21219 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in netdb.h" >&5
21220 printf "%s\n" "cannot find function declaration in netdb.h" >&6; }
21221 ;;
21222
21223 unknown)
21224 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5
21225 printf "%s\n" "can't tell" >&6; }
21226 ;;
21227
21228 *)
21229 as_fn_error $? "internal error" "$LINENO" 5
21230 ;;
21231 esac
21232
21233 ac_ext=c
21234 ac_cpp='$CPP $CPPFLAGS'
21235 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21236 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21237 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21238
21239
21240
21241
21242 case $ac_cv_func_which_gethostbyname_r in #(
21243 six) :
21244 printf "%s\n" "#define HAS_GETHOSTBYNAME_R 6" >>confdefs.h
21245 ;; #(
21246 five) :
21247 printf "%s\n" "#define HAS_GETHOSTBYNAME_R 5" >>confdefs.h
21248 ;; #(
21249 three) :
21250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: OCaml does not support this variant" >&5
21251 printf "%s\n" "$as_me: WARNING: OCaml does not support this variant" >&2;} ;; #(
21252 *) :
21253 ;;
21254 esac
21255
21256 # Number of arguments of gethostbyaddr_r
21257
21258
21259
21260 ac_ext=c
21261 ac_cpp='$CPP $CPPFLAGS'
21262 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21263 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21264 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21265
21266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how many arguments gethostbyaddr_r() takes" >&5
21267 printf %s "checking how many arguments gethostbyaddr_r() takes... " >&6; }
21268
21269 if test ${ac_cv_func_which_gethostbyaddr_r+y}
21270 then :
21271 printf %s "(cached) " >&6
21272 else $as_nop
21273
21274
21275 ################################################################
21276
21277 ac_cv_func_which_gethostbyaddr_r=unknown
21278
21279 #
21280 # ONE ARGUMENT (sanity check)
21281 #
21282
21283 # This should fail, as there is no variant of gethostbyaddr_r() that takes
21284 # a single argument. If it actually compiles, then we can assume that
21285 # netdb.h is not declaring the function, and the compiler is thereby
21286 # assuming an implicit prototype. In which case, we're out of luck.
21287 #
21288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21289 /* end confdefs.h. */
21290 #include <netdb.h>
21291 int
21292 main (void)
21293 {
21294
21295 char *addr = "192.168.1.1";
21296 (void)gethostbyaddr_r(addr) /* ; */
21297
21298 ;
21299 return 0;
21300 }
21301 _ACEOF
21302 if ac_fn_c_try_compile "$LINENO"
21303 then :
21304 ac_cv_func_which_gethostbyaddr_r=no
21305 fi
21306 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21307
21308 #
21309 # EIGHT ARGUMENTS
21310 # (e.g. Linux)
21311 #
21312
21313 if test "$ac_cv_func_which_gethostbyaddr_r" = "unknown"; then
21314
21315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21316 /* end confdefs.h. */
21317 #include <netdb.h>
21318 int
21319 main (void)
21320 {
21321
21322 char *addr = "192.168.1.1";
21323 struct hostent ret, *retp;
21324 char buf[1024];
21325 int buflen = 1024;
21326 int my_h_errno;
21327 (void)gethostbyaddr_r(
21328 addr, 10, 10, retp, buf, buflen, &retp, &my_h_errno) /* ; */
21329
21330 ;
21331 return 0;
21332 }
21333 _ACEOF
21334 if ac_fn_c_try_compile "$LINENO"
21335 then :
21336 ac_cv_func_which_gethostbyaddr_r=eight
21337 fi
21338 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21339
21340 fi
21341
21342 #
21343 # SEVEN ARGUMENTS
21344 # (e.g. Solaris)
21345 #
21346
21347 if test "$ac_cv_func_which_gethostbyaddr_r" = "unknown"; then
21348
21349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21350 /* end confdefs.h. */
21351 #include <netdb.h>
21352 int
21353 main (void)
21354 {
21355
21356 char *addr = "192.168.1.1";
21357 struct hostent ret;
21358 char buf[1024];
21359 int buflen = 1024;
21360 int my_h_errno;
21361 (void)gethostbyaddr_r(
21362 addr, 10, 10, buf, buflen, &my_h_errno, 0) /* ; */
21363
21364 ;
21365 return 0;
21366 }
21367 _ACEOF
21368 if ac_fn_c_try_compile "$LINENO"
21369 then :
21370 ac_cv_func_which_gethostbyaddr_r=seven
21371 fi
21372 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21373
21374 fi
21375
21376 ################################################################
21377
21378
21379 fi
21380
21381 case "$ac_cv_func_which_gethostbyaddr_r" in
21382 seven|eight)
21383
21384 printf "%s\n" "#define HAVE_GETHOSTBYADDR_R 1" >>confdefs.h
21385
21386 ;;
21387 esac
21388
21389 case "$ac_cv_func_which_gethostbyaddr_r" in
21390 eight)
21391 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: eight" >&5
21392 printf "%s\n" "eight" >&6; }
21393
21394 printf "%s\n" "#define HAVE_FUNC_GETHOSTBYADDR_R_8 1" >>confdefs.h
21395
21396 ;;
21397
21398 seven)
21399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: seven" >&5
21400 printf "%s\n" "seven" >&6; }
21401
21402 printf "%s\n" "#define HAVE_FUNC_GETHOSTBYADDR_R_7 1" >>confdefs.h
21403
21404 ;;
21405
21406 no)
21407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot find function declaration in netdb.h" >&5
21408 printf "%s\n" "cannot find function declaration in netdb.h" >&6; }
21409 ;;
21410
21411 unknown)
21412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: can't tell" >&5
21413 printf "%s\n" "can't tell" >&6; }
21414 ;;
21415
21416 *)
21417 as_fn_error $? "internal error" "$LINENO" 5
21418 ;;
21419 esac
21420
21421 ac_ext=c
21422 ac_cpp='$CPP $CPPFLAGS'
21423 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21424 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21425 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21426
21427
21428
21429
21430 case $ac_cv_func_which_gethostbyaddr_r in #(
21431 eight) :
21432 printf "%s\n" "#define HAS_GETHOSTBYADDR_R 8" >>confdefs.h
21433 ;; #(
21434 seven) :
21435 printf "%s\n" "#define HAS_GETHOSTBYADDR_R 7" >>confdefs.h
21436 ;; #(
21437 *) :
21438 ;;
21439 esac
21440
21441 ## mkstemp
21442
21443 ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp"
21444 if test "x$ac_cv_func_mkstemp" = xyes
21445 then :
21446 printf "%s\n" "#define HAS_MKSTEMP 1" >>confdefs.h
21447
21448 fi
21449
21450
21451 ## nice
21452
21453 ac_fn_c_check_func "$LINENO" "nice" "ac_cv_func_nice"
21454 if test "x$ac_cv_func_nice" = xyes
21455 then :
21456 printf "%s\n" "#define HAS_NICE 1" >>confdefs.h
21457
21458 fi
21459
21460
21461 ## dup3
21462
21463 ac_fn_c_check_func "$LINENO" "dup3" "ac_cv_func_dup3"
21464 if test "x$ac_cv_func_dup3" = xyes
21465 then :
21466 printf "%s\n" "#define HAS_DUP3 1" >>confdefs.h
21467
21468 fi
21469
21470
21471 ## pipe2
21472
21473 ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2"
21474 if test "x$ac_cv_func_pipe2" = xyes
21475 then :
21476 printf "%s\n" "#define HAS_PIPE2 1" >>confdefs.h
21477
21478 fi
21479
21480
21481 ## accept4
21482
21483 ac_fn_c_check_func "$LINENO" "accept4" "ac_cv_func_accept4"
21484 if test "x$ac_cv_func_accept4" = xyes
21485 then :
21486 printf "%s\n" "#define HAS_ACCEPT4 1" >>confdefs.h
21487
21488 fi
21489
21490
21491 ## getauxval
21492
21493 ac_fn_c_check_func "$LINENO" "getauxval" "ac_cv_func_getauxval"
21494 if test "x$ac_cv_func_getauxval" = xyes
21495 then :
21496 printf "%s\n" "#define HAS_GETAUXVAL 1" >>confdefs.h
21497
21498 fi
21499
21500
21501 ## shmat
21502 ac_fn_c_check_header_compile "$LINENO" "sys/shm.h" "ac_cv_header_sys_shm_h" "$ac_includes_default"
21503 if test "x$ac_cv_header_sys_shm_h" = xyes
21504 then :
21505
21506 printf "%s\n" "#define HAS_SYS_SHM_H 1" >>confdefs.h
21507
21508 ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
21509 if test "x$ac_cv_func_shmat" = xyes
21510 then :
21511 printf "%s\n" "#define HAS_SHMAT 1" >>confdefs.h
21512
21513 fi
21514
21515
21516 fi
21517
21518
21519 ## execvpe
21520
21521 ac_fn_c_check_func "$LINENO" "execvpe" "ac_cv_func_execvpe"
21522 if test "x$ac_cv_func_execvpe" = xyes
21523 then :
21524 printf "%s\n" "#define HAS_EXECVPE 1" >>confdefs.h
21525
21526 fi
21527
21528
21529 ## posix_spawn
21530
21531 ac_fn_c_check_header_compile "$LINENO" "spawn.h" "ac_cv_header_spawn_h" "$ac_includes_default"
21532 if test "x$ac_cv_header_spawn_h" = xyes
21533 then :
21534 ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
21535 if test "x$ac_cv_func_posix_spawn" = xyes
21536 then :
21537 ac_fn_c_check_func "$LINENO" "posix_spawnp" "ac_cv_func_posix_spawnp"
21538 if test "x$ac_cv_func_posix_spawnp" = xyes
21539 then :
21540 printf "%s\n" "#define HAS_POSIX_SPAWN 1" >>confdefs.h
21541
21542 fi
21543
21544 fi
21545
21546 fi
21547
21548
21549 if $cross_compiler
21550 then :
21551 # Extract the first word of "$target_alias-pkg-config", so it can be a program name with args.
21552 set dummy $target_alias-pkg-config; ac_word=$2
21553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21554 printf %s "checking for $ac_word... " >&6; }
21555 if test ${ac_cv_path_PKG_CONFIG+y}
21556 then :
21557 printf %s "(cached) " >&6
21558 else $as_nop
21559 case $PKG_CONFIG in
21560 [\\/]* | ?:[\\/]*)
21561 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
21562 ;;
21563 *)
21564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21565 for as_dir in $PATH
21566 do
21567 IFS=$as_save_IFS
21568 case $as_dir in #(((
21569 '') as_dir=./ ;;
21570 */) ;;
21571 *) as_dir=$as_dir/ ;;
21572 esac
21573 for ac_exec_ext in '' $ac_executable_extensions; do
21574 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
21575 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
21576 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
21577 break 2
21578 fi
21579 done
21580 done
21581 IFS=$as_save_IFS
21582
21583 ;;
21584 esac
21585 fi
21586 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
21587 if test -n "$PKG_CONFIG"; then
21588 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
21589 printf "%s\n" "$PKG_CONFIG" >&6; }
21590 else
21591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21592 printf "%s\n" "no" >&6; }
21593 fi
21594
21595
21596 if test -z "$ac_cv_path_PKG_CONFIG"; then
21597 if test "$build" = "$target"; then
21598 ac_pt_PKG_CONFIG=$PKG_CONFIG
21599 # Extract the first word of "pkg-config", so it can be a program name with args.
21600 set dummy pkg-config; ac_word=$2
21601 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21602 printf %s "checking for $ac_word... " >&6; }
21603 if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
21604 then :
21605 printf %s "(cached) " >&6
21606 else $as_nop
21607 case $ac_pt_PKG_CONFIG in
21608 [\\/]* | ?:[\\/]*)
21609 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
21610 ;;
21611 *)
21612 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21613 for as_dir in $PATH
21614 do
21615 IFS=$as_save_IFS
21616 case $as_dir in #(((
21617 '') as_dir=./ ;;
21618 */) ;;
21619 *) as_dir=$as_dir/ ;;
21620 esac
21621 for ac_exec_ext in '' $ac_executable_extensions; do
21622 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
21623 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
21624 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
21625 break 2
21626 fi
21627 done
21628 done
21629 IFS=$as_save_IFS
21630
21631 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="false"
21632 ;;
21633 esac
21634 fi
21635 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
21636 if test -n "$ac_pt_PKG_CONFIG"; then
21637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
21638 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
21639 else
21640 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21641 printf "%s\n" "no" >&6; }
21642 fi
21643
21644 PKG_CONFIG=$ac_pt_PKG_CONFIG
21645 else
21646 PKG_CONFIG="false"
21647 fi
21648 else
21649 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
21650 fi
21651
21652 else $as_nop
21653 if test -n "$ac_tool_prefix"; then
21654 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
21655 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
21656 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21657 printf %s "checking for $ac_word... " >&6; }
21658 if test ${ac_cv_path_PKG_CONFIG+y}
21659 then :
21660 printf %s "(cached) " >&6
21661 else $as_nop
21662 case $PKG_CONFIG in
21663 [\\/]* | ?:[\\/]*)
21664 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
21665 ;;
21666 *)
21667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21668 for as_dir in $PATH
21669 do
21670 IFS=$as_save_IFS
21671 case $as_dir in #(((
21672 '') as_dir=./ ;;
21673 */) ;;
21674 *) as_dir=$as_dir/ ;;
21675 esac
21676 for ac_exec_ext in '' $ac_executable_extensions; do
21677 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
21678 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
21679 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
21680 break 2
21681 fi
21682 done
21683 done
21684 IFS=$as_save_IFS
21685
21686 ;;
21687 esac
21688 fi
21689 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
21690 if test -n "$PKG_CONFIG"; then
21691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
21692 printf "%s\n" "$PKG_CONFIG" >&6; }
21693 else
21694 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21695 printf "%s\n" "no" >&6; }
21696 fi
21697
21698
21699 fi
21700 if test -z "$ac_cv_path_PKG_CONFIG"; then
21701 ac_pt_PKG_CONFIG=$PKG_CONFIG
21702 # Extract the first word of "pkg-config", so it can be a program name with args.
21703 set dummy pkg-config; ac_word=$2
21704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21705 printf %s "checking for $ac_word... " >&6; }
21706 if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
21707 then :
21708 printf %s "(cached) " >&6
21709 else $as_nop
21710 case $ac_pt_PKG_CONFIG in
21711 [\\/]* | ?:[\\/]*)
21712 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
21713 ;;
21714 *)
21715 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21716 for as_dir in $PATH
21717 do
21718 IFS=$as_save_IFS
21719 case $as_dir in #(((
21720 '') as_dir=./ ;;
21721 */) ;;
21722 *) as_dir=$as_dir/ ;;
21723 esac
21724 for ac_exec_ext in '' $ac_executable_extensions; do
21725 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
21726 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
21727 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
21728 break 2
21729 fi
21730 done
21731 done
21732 IFS=$as_save_IFS
21733
21734 ;;
21735 esac
21736 fi
21737 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
21738 if test -n "$ac_pt_PKG_CONFIG"; then
21739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
21740 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
21741 else
21742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21743 printf "%s\n" "no" >&6; }
21744 fi
21745
21746 if test "x$ac_pt_PKG_CONFIG" = x; then
21747 PKG_CONFIG="false"
21748 else
21749 case $cross_compiling:$ac_tool_warned in
21750 yes:)
21751 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
21752 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
21753 ac_tool_warned=yes ;;
21754 esac
21755 PKG_CONFIG=$ac_pt_PKG_CONFIG
21756 fi
21757 else
21758 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
21759 fi
21760
21761 fi
21762
21763 ## ZSTD compression library
21764
21765 zstd_status=""
21766 zstd_libs=""
21767
21768 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5
21769 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; }
21770 if test ${ac_cv_c_undeclared_builtin_options+y}
21771 then :
21772 printf %s "(cached) " >&6
21773 else $as_nop
21774 ac_save_CFLAGS=$CFLAGS
21775 ac_cv_c_undeclared_builtin_options='cannot detect'
21776 for ac_arg in '' -fno-builtin; do
21777 CFLAGS="$ac_save_CFLAGS $ac_arg"
21778 # This test program should *not* compile successfully.
21779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21780 /* end confdefs.h. */
21781
21782 int
21783 main (void)
21784 {
21785 (void) strchr;
21786 ;
21787 return 0;
21788 }
21789 _ACEOF
21790 if ac_fn_c_try_compile "$LINENO"
21791 then :
21792
21793 else $as_nop
21794 # This test program should compile successfully.
21795 # No library function is consistently available on
21796 # freestanding implementations, so test against a dummy
21797 # declaration. Include always-available headers on the
21798 # off chance that they somehow elicit warnings.
21799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21800 /* end confdefs.h. */
21801 #include <float.h>
21802 #include <limits.h>
21803 #include <stdarg.h>
21804 #include <stddef.h>
21805 extern void ac_decl (int, char *);
21806
21807 int
21808 main (void)
21809 {
21810 (void) ac_decl (0, (char *) 0);
21811 (void) ac_decl;
21812
21813 ;
21814 return 0;
21815 }
21816 _ACEOF
21817 if ac_fn_c_try_compile "$LINENO"
21818 then :
21819 if test x"$ac_arg" = x
21820 then :
21821 ac_cv_c_undeclared_builtin_options='none needed'
21822 else $as_nop
21823 ac_cv_c_undeclared_builtin_options=$ac_arg
21824 fi
21825 break
21826 fi
21827 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21828 fi
21829 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
21830 done
21831 CFLAGS=$ac_save_CFLAGS
21832
21833 fi
21834 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5
21835 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; }
21836 case $ac_cv_c_undeclared_builtin_options in #(
21837 'cannot detect') :
21838 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21839 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;}
21840 as_fn_error $? "cannot make $CC report undeclared builtins
21841 See \`config.log' for more details" "$LINENO" 5; } ;; #(
21842 'none needed') :
21843 ac_c_undeclared_builtin_options='' ;; #(
21844 *) :
21845 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;;
21846 esac
21847
21848 if test x"$with_zstd" != "xno"
21849 then :
21850 # Try pkg-config first, as it gives the most reliable results
21851 if ${PKG_CONFIG} libzstd 2>/dev/null
21852 then :
21853 # Now check the version
21854 if ${PKG_CONFIG} --atleast-version 1.4 libzstd
21855 then :
21856 zstd_libs=`${PKG_CONFIG} --libs libzstd`
21857 zstd_flags=`${PKG_CONFIG} --cflags libzstd`
21858 zstd_status="ok"
21859 else $as_nop
21860 zstd_status="zstd library too old: version 1.4 or later is needed"
21861 fi
21862 else $as_nop
21863 # Otherwise, try to find zstd the old way,
21864 # assuming it is installed in default places
21865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ZSTD_createCCtx in -lzstd" >&5
21866 printf %s "checking for ZSTD_createCCtx in -lzstd... " >&6; }
21867 if test ${ac_cv_lib_zstd_ZSTD_createCCtx+y}
21868 then :
21869 printf %s "(cached) " >&6
21870 else $as_nop
21871 ac_check_lib_save_LIBS=$LIBS
21872 LIBS="-lzstd $LIBS"
21873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21874 /* end confdefs.h. */
21875
21876 /* Override any GCC internal prototype to avoid an error.
21877 Use char because int might match the return type of a GCC
21878 builtin and then its argument prototype would still apply. */
21879 char ZSTD_createCCtx ();
21880 int
21881 main (void)
21882 {
21883 return ZSTD_createCCtx ();
21884 ;
21885 return 0;
21886 }
21887 _ACEOF
21888 if ac_fn_c_try_link "$LINENO"
21889 then :
21890 ac_cv_lib_zstd_ZSTD_createCCtx=yes
21891 else $as_nop
21892 ac_cv_lib_zstd_ZSTD_createCCtx=no
21893 fi
21894 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21895 conftest$ac_exeext conftest.$ac_ext
21896 LIBS=$ac_check_lib_save_LIBS
21897 fi
21898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_zstd_ZSTD_createCCtx" >&5
21899 printf "%s\n" "$ac_cv_lib_zstd_ZSTD_createCCtx" >&6; }
21900 if test "x$ac_cv_lib_zstd_ZSTD_createCCtx" = xyes
21901 then :
21902 ac_fn_check_decl "$LINENO" "ZSTD_compressStream2" "ac_cv_have_decl_ZSTD_compressStream2" "#include <zstd.h>
21903 " "$ac_c_undeclared_builtin_options" "CFLAGS"
21904 if test "x$ac_cv_have_decl_ZSTD_compressStream2" = xyes
21905 then :
21906 zstd_libs="-lzstd"
21907 zstd_flags=""
21908 zstd_status="ok"
21909 else $as_nop
21910 zstd_status="zstd library too old: version 1.4 or later is needed"
21911 fi
21912 else $as_nop
21913 zstd_status="zstd library not found"
21914 fi
21915
21916 fi
21917 fi
21918
21919 # When building the mingw-w64 port in Cygwin, it is very easy to have the
21920 # library available, but not have the DLL in PATH. This then causes the build to
21921 # fail as soon as ocamlrun is first executed. This check avoids automatically
21922 # enabling zstd when the resulting executable doesn't actually work.
21923 case $target in #(
21924 *-w64-mingw32*|*-pc-windows) :
21925 check_zstd_runs=$target_runnable ;; #(
21926 *) :
21927 check_zstd_runs=false ;;
21928 esac
21929
21930 if test x"$zstd_status" = "xok"
21931 then :
21932
21933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether programs can be linked with zstd" >&5
21934 printf %s "checking whether programs can be linked with zstd... " >&6; }
21935
21936 saved_CC="$CC"
21937 saved_CFLAGS="$CFLAGS"
21938 saved_CPPFLAGS="$CPPFLAGS"
21939 saved_LIBS="$LIBS"
21940 saved_ac_ext="$ac_ext"
21941 saved_ac_compile="$ac_compile"
21942 # Move the content of confdefs.h to another file so it does not
21943 # get included
21944 mv confdefs.h confdefs.h.bak
21945 touch confdefs.h
21946
21947 LIBS="$LIBS $zstd_libs"
21948 CFLAGS="$CFLAGS $zstd_flags"
21949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21950 /* end confdefs.h. */
21951
21952 #include <zstd.h>
21953 int main(void) {
21954 return (ZSTD_versionNumber() == 0);
21955 }
21956
21957 _ACEOF
21958 if ac_fn_c_try_link "$LINENO"
21959 then :
21960 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21961 printf "%s\n" "yes" >&6; }
21962 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether programs linked with zstd can execute" >&5
21963 printf %s "checking whether programs linked with zstd can execute... " >&6; }
21964 if $check_zstd_runs
21965 then :
21966 if ac_fn_c_try_run LINENO
21967 then :
21968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21969 printf "%s\n" "yes" >&6; }
21970 else $as_nop
21971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21972 printf "%s\n" "no" >&6; }
21973 zstd_libs=''
21974 zstd_flags=''
21975 zstd_status=\
21976 "programs linked with zstd do not appear to be executable."
21977 fi
21978 else $as_nop
21979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: skipped" >&5
21980 printf "%s\n" "skipped" >&6; }
21981 fi
21982 else $as_nop
21983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
21984 printf "%s\n" "no" >&6; }
21985 zstd_libs=''
21986 zstd_flags=''
21987 zstd_status="zstd found, but programs cannot be linked with it."
21988 fi
21989 rm -f core conftest.err conftest.$ac_objext conftest.beam \
21990 conftest$ac_exeext conftest.$ac_ext
21991
21992 # Restore the content of confdefs.h
21993 mv confdefs.h.bak confdefs.h
21994 ac_compile="$saved_ac_compile"
21995 ac_ext="$saved_ac_ext"
21996 CPPFLAGS="$saved_CPPFLAGS"
21997 CFLAGS="$saved_CFLAGS"
21998 CC="$saved_CC"
21999 LIBS="$saved_LIBS"
22000
22001 fi
22002
22003 if test x"$zstd_status" = "xok"
22004 then :
22005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: compressed compilation artefacts supported" >&5
22006 printf "%s\n" "$as_me: compressed compilation artefacts supported" >&6;}
22007 internal_cppflags="$internal_cppflags $zstd_flags"
22008 printf "%s\n" "#define HAS_ZSTD 1" >>confdefs.h
22009
22010 else $as_nop
22011 case "$with_zstd" in #(
22012 no) :
22013 ;; #(
22014 yes) :
22015 as_fn_error $? "$zstd_status" "$LINENO" 5 ;; #(
22016 *) :
22017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $zstd_status" >&5
22018 printf "%s\n" "$as_me: WARNING: $zstd_status" >&2;}
22019 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: compressed compilation artefacts not supported" >&5
22020 printf "%s\n" "$as_me: WARNING: compressed compilation artefacts not supported" >&2;} ;;
22021 esac
22022 fi
22023
22024 ## Determine whether the debugger should/can be built
22025
22026 case $enable_ocamldebug in #(
22027 no) :
22028 with_debugger=""
22029 build_ocamldebug=false
22030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ocamldebug disabled" >&5
22031 printf "%s\n" "$as_me: ocamldebug disabled" >&6;} ;; #(
22032 *) :
22033 if $sockets
22034 then :
22035 with_debugger="ocamldebug"
22036 build_ocamldebug=true
22037 optional_bytecode_tools="$optional_bytecode_tools debugger/ocamldebug"
22038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ocamldebug supported" >&5
22039 printf "%s\n" "$as_me: ocamldebug supported" >&6;}
22040 else $as_nop
22041 with_debugger=""
22042 build_ocamldebug=false
22043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: ocamldebug not supported" >&5
22044 printf "%s\n" "$as_me: ocamldebug not supported" >&6;}
22045 fi
22046 ;;
22047 esac
22048
22049 ## Should the runtime with debugging support be built
22050 case $enable_debug_runtime in #(
22051 no) :
22052 debug_runtime=false ;; #(
22053 *) :
22054 debug_runtime=true ;;
22055 esac
22056
22057 ## Should the codegen with debugging support be built
22058 case $enable_codegen_invariants in #(
22059 no) :
22060 codegen_invariants=false ;; #(
22061 *) :
22062 codegen_invariants=true ;;
22063 esac
22064
22065 ## Determine how to link with the POSIX threads library
22066
22067 case $target in #(
22068 *-w64-mingw32*) :
22069 link_gcc_eh=''
22070 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for printf in -lgcc_eh" >&5
22071 printf %s "checking for printf in -lgcc_eh... " >&6; }
22072 if test ${ac_cv_lib_gcc_eh_printf+y}
22073 then :
22074 printf %s "(cached) " >&6
22075 else $as_nop
22076 ac_check_lib_save_LIBS=$LIBS
22077 LIBS="-lgcc_eh $LIBS"
22078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22079 /* end confdefs.h. */
22080
22081 /* Override any GCC internal prototype to avoid an error.
22082 Use char because int might match the return type of a GCC
22083 builtin and then its argument prototype would still apply. */
22084 char printf ();
22085 int
22086 main (void)
22087 {
22088 return printf ();
22089 ;
22090 return 0;
22091 }
22092 _ACEOF
22093 if ac_fn_c_try_link "$LINENO"
22094 then :
22095 ac_cv_lib_gcc_eh_printf=yes
22096 else $as_nop
22097 ac_cv_lib_gcc_eh_printf=no
22098 fi
22099 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22100 conftest$ac_exeext conftest.$ac_ext
22101 LIBS=$ac_check_lib_save_LIBS
22102 fi
22103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcc_eh_printf" >&5
22104 printf "%s\n" "$ac_cv_lib_gcc_eh_printf" >&6; }
22105 if test "x$ac_cv_lib_gcc_eh_printf" = xyes
22106 then :
22107 link_gcc_eh="-lgcc_eh"
22108 fi
22109
22110 PTHREAD_LIBS="-l:libpthread.a $link_gcc_eh" ;; #(
22111 *-pc-windows) :
22112 PTHREAD_LIBS='' ;; #(
22113 *) :
22114
22115
22116
22117
22118 ac_ext=c
22119 ac_cpp='$CPP $CPPFLAGS'
22120 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22121 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22122 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22123
22124 ax_pthread_ok=no
22125
22126 # We used to check for pthread.h first, but this fails if pthread.h
22127 # requires special compiler flags (e.g. on Tru64 or Sequent).
22128 # It gets checked for in the link test anyway.
22129
22130 # First of all, check if the user has set any of the PTHREAD_LIBS,
22131 # etcetera environment variables, and if threads linking works using
22132 # them:
22133 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
22134 ax_pthread_save_CC="$CC"
22135 ax_pthread_save_CFLAGS="$CFLAGS"
22136 ax_pthread_save_LIBS="$LIBS"
22137 if test "x$PTHREAD_CC" != "x"
22138 then :
22139 CC="$PTHREAD_CC"
22140 fi
22141 if test "x$PTHREAD_CXX" != "x"
22142 then :
22143 CXX="$PTHREAD_CXX"
22144 fi
22145 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22146 LIBS="$PTHREAD_LIBS $LIBS"
22147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
22148 printf %s "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
22149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22150 /* end confdefs.h. */
22151
22152 /* Override any GCC internal prototype to avoid an error.
22153 Use char because int might match the return type of a GCC
22154 builtin and then its argument prototype would still apply. */
22155 char pthread_join ();
22156 int
22157 main (void)
22158 {
22159 return pthread_join ();
22160 ;
22161 return 0;
22162 }
22163 _ACEOF
22164 if ac_fn_c_try_link "$LINENO"
22165 then :
22166 ax_pthread_ok=yes
22167 fi
22168 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22169 conftest$ac_exeext conftest.$ac_ext
22170 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
22171 printf "%s\n" "$ax_pthread_ok" >&6; }
22172 if test "x$ax_pthread_ok" = "xno"; then
22173 PTHREAD_LIBS=""
22174 PTHREAD_CFLAGS=""
22175 fi
22176 CC="$ax_pthread_save_CC"
22177 CFLAGS="$ax_pthread_save_CFLAGS"
22178 LIBS="$ax_pthread_save_LIBS"
22179 fi
22180
22181 # We must check for the threads library under a number of different
22182 # names; the ordering is very important because some systems
22183 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
22184 # libraries is broken (non-POSIX).
22185
22186 # Create a list of thread flags to try. Items with a "," contain both
22187 # C compiler flags (before ",") and linker flags (after ","). Other items
22188 # starting with a "-" are C compiler flags, and remaining items are
22189 # library names, except for "none" which indicates that we try without
22190 # any flags at all, and "pthread-config" which is a program returning
22191 # the flags for the Pth emulation library.
22192
22193 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
22194
22195 # The ordering *is* (sometimes) important. Some notes on the
22196 # individual items follow:
22197
22198 # pthreads: AIX (must check this before -lpthread)
22199 # none: in case threads are in libc; should be tried before -Kthread and
22200 # other compiler flags to prevent continual compiler warnings
22201 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
22202 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
22203 # (Note: HP C rejects this with "bad form for `-t' option")
22204 # -pthreads: Solaris/gcc (Note: HP C also rejects)
22205 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
22206 # doesn't hurt to check since this sometimes defines pthreads and
22207 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
22208 # is present but should not be used directly; and before -mthreads,
22209 # because the compiler interprets this as "-mt" + "-hreads")
22210 # -mthreads: Mingw32/gcc, Lynx/gcc
22211 # pthread: Linux, etcetera
22212 # --thread-safe: KAI C++
22213 # pthread-config: use pthread-config program (for GNU Pth library)
22214
22215 case $host_os in
22216
22217 freebsd*)
22218
22219 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
22220 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
22221
22222 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
22223 ;;
22224
22225 hpux*)
22226
22227 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
22228 # multi-threading and also sets -lpthread."
22229
22230 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
22231 ;;
22232
22233 openedition*)
22234
22235 # IBM z/OS requires a feature-test macro to be defined in order to
22236 # enable POSIX threads at all, so give the user a hint if this is
22237 # not set. (We don't define these ourselves, as they can affect
22238 # other portions of the system API in unpredictable ways.)
22239
22240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22241 /* end confdefs.h. */
22242
22243 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
22244 AX_PTHREAD_ZOS_MISSING
22245 # endif
22246
22247 _ACEOF
22248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22249 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1
22250 then :
22251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
22252 printf "%s\n" "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
22253 fi
22254 rm -rf conftest*
22255
22256 ;;
22257
22258 solaris*)
22259
22260 # On Solaris (at least, for some versions), libc contains stubbed
22261 # (non-functional) versions of the pthreads routines, so link-based
22262 # tests will erroneously succeed. (N.B.: The stubs are missing
22263 # pthread_cleanup_push, or rather a function called by this macro,
22264 # so we could check for that, but who knows whether they'll stub
22265 # that too in a future libc.) So we'll check first for the
22266 # standard Solaris way of linking pthreads (-mt -lpthread).
22267
22268 ax_pthread_flags="-mt,-lpthread pthread $ax_pthread_flags"
22269 ;;
22270 esac
22271
22272 # Are we compiling with Clang?
22273
22274 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
22275 printf %s "checking whether $CC is Clang... " >&6; }
22276 if test ${ax_cv_PTHREAD_CLANG+y}
22277 then :
22278 printf %s "(cached) " >&6
22279 else $as_nop
22280 ax_cv_PTHREAD_CLANG=no
22281 # Note that Autoconf sets GCC=yes for Clang as well as GCC
22282 if test "x$GCC" = "xyes"; then
22283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22284 /* end confdefs.h. */
22285 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
22286 # if defined(__clang__) && defined(__llvm__)
22287 AX_PTHREAD_CC_IS_CLANG
22288 # endif
22289
22290 _ACEOF
22291 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22292 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1
22293 then :
22294 ax_cv_PTHREAD_CLANG=yes
22295 fi
22296 rm -rf conftest*
22297
22298 fi
22299
22300 fi
22301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
22302 printf "%s\n" "$ax_cv_PTHREAD_CLANG" >&6; }
22303 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
22304
22305
22306 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
22307
22308 # Note that for GCC and Clang -pthread generally implies -lpthread,
22309 # except when -nostdlib is passed.
22310 # This is problematic using libtool to build C++ shared libraries with pthread:
22311 # [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25460
22312 # [2] https://bugzilla.redhat.com/show_bug.cgi?id=661333
22313 # [3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=468555
22314 # To solve this, first try -pthread together with -lpthread for GCC
22315
22316 if test "x$GCC" = "xyes"
22317 then :
22318 ax_pthread_flags="-pthread,-lpthread -pthread -pthreads $ax_pthread_flags"
22319 fi
22320
22321 # Clang takes -pthread (never supported any other flag), but we'll try with -lpthread first
22322
22323 if test "x$ax_pthread_clang" = "xyes"
22324 then :
22325 ax_pthread_flags="-pthread,-lpthread -pthread"
22326 fi
22327
22328
22329 # The presence of a feature test macro requesting re-entrant function
22330 # definitions is, on some systems, a strong hint that pthreads support is
22331 # correctly enabled
22332
22333 case $host_os in
22334 darwin* | hpux* | linux* | osf* | solaris*)
22335 ax_pthread_check_macro="_REENTRANT"
22336 ;;
22337
22338 aix*)
22339 ax_pthread_check_macro="_THREAD_SAFE"
22340 ;;
22341
22342 *)
22343 ax_pthread_check_macro="--"
22344 ;;
22345 esac
22346 if test "x$ax_pthread_check_macro" = "x--"
22347 then :
22348 ax_pthread_check_cond=0
22349 else $as_nop
22350 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
22351 fi
22352
22353
22354 if test "x$ax_pthread_ok" = "xno"; then
22355 for ax_pthread_try_flag in $ax_pthread_flags; do
22356
22357 case $ax_pthread_try_flag in
22358 none)
22359 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
22360 printf %s "checking whether pthreads work without any flags... " >&6; }
22361 ;;
22362
22363 *,*)
22364 PTHREAD_CFLAGS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\1/"`
22365 PTHREAD_LIBS=`echo $ax_pthread_try_flag | sed "s/^\(.*\),\(.*\)$/\2/"`
22366 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"" >&5
22367 printf %s "checking whether pthreads work with \"$PTHREAD_CFLAGS\" and \"$PTHREAD_LIBS\"... " >&6; }
22368 ;;
22369
22370 -*)
22371 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
22372 printf %s "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
22373 PTHREAD_CFLAGS="$ax_pthread_try_flag"
22374 ;;
22375
22376 pthread-config)
22377 # Extract the first word of "pthread-config", so it can be a program name with args.
22378 set dummy pthread-config; ac_word=$2
22379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22380 printf %s "checking for $ac_word... " >&6; }
22381 if test ${ac_cv_prog_ax_pthread_config+y}
22382 then :
22383 printf %s "(cached) " >&6
22384 else $as_nop
22385 if test -n "$ax_pthread_config"; then
22386 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
22387 else
22388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22389 for as_dir in $PATH
22390 do
22391 IFS=$as_save_IFS
22392 case $as_dir in #(((
22393 '') as_dir=./ ;;
22394 */) ;;
22395 *) as_dir=$as_dir/ ;;
22396 esac
22397 for ac_exec_ext in '' $ac_executable_extensions; do
22398 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22399 ac_cv_prog_ax_pthread_config="yes"
22400 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22401 break 2
22402 fi
22403 done
22404 done
22405 IFS=$as_save_IFS
22406
22407 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
22408 fi
22409 fi
22410 ax_pthread_config=$ac_cv_prog_ax_pthread_config
22411 if test -n "$ax_pthread_config"; then
22412 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
22413 printf "%s\n" "$ax_pthread_config" >&6; }
22414 else
22415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22416 printf "%s\n" "no" >&6; }
22417 fi
22418
22419
22420 if test "x$ax_pthread_config" = "xno"
22421 then :
22422 continue
22423 fi
22424 PTHREAD_CFLAGS="`pthread-config --cflags`"
22425 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
22426 ;;
22427
22428 *)
22429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
22430 printf %s "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
22431 PTHREAD_LIBS="-l$ax_pthread_try_flag"
22432 ;;
22433 esac
22434
22435 ax_pthread_save_CFLAGS="$CFLAGS"
22436 ax_pthread_save_LIBS="$LIBS"
22437 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22438 LIBS="$PTHREAD_LIBS $LIBS"
22439
22440 # Check for various functions. We must include pthread.h,
22441 # since some functions may be macros. (On the Sequent, we
22442 # need a special flag -Kthread to make this header compile.)
22443 # We check for pthread_join because it is in -lpthread on IRIX
22444 # while pthread_create is in libc. We check for pthread_attr_init
22445 # due to DEC craziness with -lpthreads. We check for
22446 # pthread_cleanup_push because it is one of the few pthread
22447 # functions on Solaris that doesn't have a non-functional libc stub.
22448 # We try pthread_create on general principles.
22449
22450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22451 /* end confdefs.h. */
22452 #include <pthread.h>
22453 # if $ax_pthread_check_cond
22454 # error "$ax_pthread_check_macro must be defined"
22455 # endif
22456 static void *some_global = NULL;
22457 static void routine(void *a)
22458 {
22459 /* To avoid any unused-parameter or
22460 unused-but-set-parameter warning. */
22461 some_global = a;
22462 }
22463 static void *start_routine(void *a) { return a; }
22464 int
22465 main (void)
22466 {
22467 pthread_t th; pthread_attr_t attr;
22468 pthread_create(&th, 0, start_routine, 0);
22469 pthread_join(th, 0);
22470 pthread_attr_init(&attr);
22471 pthread_cleanup_push(routine, 0);
22472 pthread_cleanup_pop(0) /* ; */
22473 ;
22474 return 0;
22475 }
22476 _ACEOF
22477 if ac_fn_c_try_link "$LINENO"
22478 then :
22479 ax_pthread_ok=yes
22480 fi
22481 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22482 conftest$ac_exeext conftest.$ac_ext
22483
22484 CFLAGS="$ax_pthread_save_CFLAGS"
22485 LIBS="$ax_pthread_save_LIBS"
22486
22487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
22488 printf "%s\n" "$ax_pthread_ok" >&6; }
22489 if test "x$ax_pthread_ok" = "xyes"
22490 then :
22491 break
22492 fi
22493
22494 PTHREAD_LIBS=""
22495 PTHREAD_CFLAGS=""
22496 done
22497 fi
22498
22499
22500 # Clang needs special handling, because older versions handle the -pthread
22501 # option in a rather... idiosyncratic way
22502
22503 if test "x$ax_pthread_clang" = "xyes"; then
22504
22505 # Clang takes -pthread; it has never supported any other flag
22506
22507 # (Note 1: This will need to be revisited if a system that Clang
22508 # supports has POSIX threads in a separate library. This tends not
22509 # to be the way of modern systems, but it's conceivable.)
22510
22511 # (Note 2: On some systems, notably Darwin, -pthread is not needed
22512 # to get POSIX threads support; the API is always present and
22513 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
22514 # -pthread does define _REENTRANT, and while the Darwin headers
22515 # ignore this macro, third-party headers might not.)
22516
22517 # However, older versions of Clang make a point of warning the user
22518 # that, in an invocation where only linking and no compilation is
22519 # taking place, the -pthread option has no effect ("argument unused
22520 # during compilation"). They expect -pthread to be passed in only
22521 # when source code is being compiled.
22522 #
22523 # Problem is, this is at odds with the way Automake and most other
22524 # C build frameworks function, which is that the same flags used in
22525 # compilation (CFLAGS) are also used in linking. Many systems
22526 # supported by AX_PTHREAD require exactly this for POSIX threads
22527 # support, and in fact it is often not straightforward to specify a
22528 # flag that is used only in the compilation phase and not in
22529 # linking. Such a scenario is extremely rare in practice.
22530 #
22531 # Even though use of the -pthread flag in linking would only print
22532 # a warning, this can be a nuisance for well-run software projects
22533 # that build with -Werror. So if the active version of Clang has
22534 # this misfeature, we search for an option to squash it.
22535
22536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
22537 printf %s "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
22538 if test ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+y}
22539 then :
22540 printf %s "(cached) " >&6
22541 else $as_nop
22542 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
22543 # Create an alternate version of $ac_link that compiles and
22544 # links in two steps (.c -> .o, .o -> exe) instead of one
22545 # (.c -> exe), because the warning occurs only in the second
22546 # step
22547 ax_pthread_save_ac_link="$ac_link"
22548 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
22549 ax_pthread_link_step=`printf "%s\n" "$ac_link" | sed "$ax_pthread_sed"`
22550 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
22551 ax_pthread_save_CFLAGS="$CFLAGS"
22552 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
22553 if test "x$ax_pthread_try" = "xunknown"
22554 then :
22555 break
22556 fi
22557 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
22558 ac_link="$ax_pthread_save_ac_link"
22559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22560 /* end confdefs.h. */
22561 int main(void){return 0;}
22562 _ACEOF
22563 if ac_fn_c_try_link "$LINENO"
22564 then :
22565 ac_link="$ax_pthread_2step_ac_link"
22566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22567 /* end confdefs.h. */
22568 int main(void){return 0;}
22569 _ACEOF
22570 if ac_fn_c_try_link "$LINENO"
22571 then :
22572 break
22573 fi
22574 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22575 conftest$ac_exeext conftest.$ac_ext
22576
22577 fi
22578 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22579 conftest$ac_exeext conftest.$ac_ext
22580 done
22581 ac_link="$ax_pthread_save_ac_link"
22582 CFLAGS="$ax_pthread_save_CFLAGS"
22583 if test "x$ax_pthread_try" = "x"
22584 then :
22585 ax_pthread_try=no
22586 fi
22587 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
22588
22589 fi
22590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
22591 printf "%s\n" "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
22592
22593 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
22594 no | unknown) ;;
22595 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
22596 esac
22597
22598 fi # $ax_pthread_clang = yes
22599
22600
22601
22602 # Various other checks:
22603 if test "x$ax_pthread_ok" = "xyes"; then
22604 ax_pthread_save_CFLAGS="$CFLAGS"
22605 ax_pthread_save_LIBS="$LIBS"
22606 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22607 LIBS="$PTHREAD_LIBS $LIBS"
22608
22609 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
22610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
22611 printf %s "checking for joinable pthread attribute... " >&6; }
22612 if test ${ax_cv_PTHREAD_JOINABLE_ATTR+y}
22613 then :
22614 printf %s "(cached) " >&6
22615 else $as_nop
22616 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
22617 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
22618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22619 /* end confdefs.h. */
22620 #include <pthread.h>
22621 int
22622 main (void)
22623 {
22624 int attr = $ax_pthread_attr; return attr /* ; */
22625 ;
22626 return 0;
22627 }
22628 _ACEOF
22629 if ac_fn_c_try_link "$LINENO"
22630 then :
22631 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
22632 fi
22633 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22634 conftest$ac_exeext conftest.$ac_ext
22635 done
22636
22637 fi
22638 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
22639 printf "%s\n" "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
22640 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
22641 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
22642 test "x$ax_pthread_joinable_attr_defined" != "xyes"
22643 then :
22644
22645 printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR" >>confdefs.h
22646
22647 ax_pthread_joinable_attr_defined=yes
22648
22649 fi
22650
22651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
22652 printf %s "checking whether more special flags are required for pthreads... " >&6; }
22653 if test ${ax_cv_PTHREAD_SPECIAL_FLAGS+y}
22654 then :
22655 printf %s "(cached) " >&6
22656 else $as_nop
22657 ax_cv_PTHREAD_SPECIAL_FLAGS=no
22658 case $host_os in
22659 solaris*)
22660 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
22661 ;;
22662 esac
22663
22664 fi
22665 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
22666 printf "%s\n" "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
22667 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
22668 test "x$ax_pthread_special_flags_added" != "xyes"
22669 then :
22670 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
22671 ax_pthread_special_flags_added=yes
22672 fi
22673
22674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
22675 printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; }
22676 if test ${ax_cv_PTHREAD_PRIO_INHERIT+y}
22677 then :
22678 printf %s "(cached) " >&6
22679 else $as_nop
22680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22681 /* end confdefs.h. */
22682 #include <pthread.h>
22683 int
22684 main (void)
22685 {
22686 int i = PTHREAD_PRIO_INHERIT;
22687 return i;
22688 ;
22689 return 0;
22690 }
22691 _ACEOF
22692 if ac_fn_c_try_link "$LINENO"
22693 then :
22694 ax_cv_PTHREAD_PRIO_INHERIT=yes
22695 else $as_nop
22696 ax_cv_PTHREAD_PRIO_INHERIT=no
22697 fi
22698 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22699 conftest$ac_exeext conftest.$ac_ext
22700
22701 fi
22702 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
22703 printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
22704 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
22705 test "x$ax_pthread_prio_inherit_defined" != "xyes"
22706 then :
22707
22708 printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
22709
22710 ax_pthread_prio_inherit_defined=yes
22711
22712 fi
22713
22714 CFLAGS="$ax_pthread_save_CFLAGS"
22715 LIBS="$ax_pthread_save_LIBS"
22716
22717 # More AIX lossage: compile with *_r variant
22718 if test "x$GCC" != "xyes"; then
22719 case $host_os in
22720 aix*)
22721 case "x/$CC" in #(
22722 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
22723 #handle absolute path differently from PATH based program lookup
22724 case "x$CC" in #(
22725 x/*) :
22726
22727 if as_fn_executable_p ${CC}_r
22728 then :
22729 PTHREAD_CC="${CC}_r"
22730 fi
22731 if test "x${CXX}" != "x"
22732 then :
22733 if as_fn_executable_p ${CXX}_r
22734 then :
22735 PTHREAD_CXX="${CXX}_r"
22736 fi
22737 fi
22738 ;; #(
22739 *) :
22740
22741 for ac_prog in ${CC}_r
22742 do
22743 # Extract the first word of "$ac_prog", so it can be a program name with args.
22744 set dummy $ac_prog; ac_word=$2
22745 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22746 printf %s "checking for $ac_word... " >&6; }
22747 if test ${ac_cv_prog_PTHREAD_CC+y}
22748 then :
22749 printf %s "(cached) " >&6
22750 else $as_nop
22751 if test -n "$PTHREAD_CC"; then
22752 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
22753 else
22754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22755 for as_dir in $PATH
22756 do
22757 IFS=$as_save_IFS
22758 case $as_dir in #(((
22759 '') as_dir=./ ;;
22760 */) ;;
22761 *) as_dir=$as_dir/ ;;
22762 esac
22763 for ac_exec_ext in '' $ac_executable_extensions; do
22764 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22765 ac_cv_prog_PTHREAD_CC="$ac_prog"
22766 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22767 break 2
22768 fi
22769 done
22770 done
22771 IFS=$as_save_IFS
22772
22773 fi
22774 fi
22775 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
22776 if test -n "$PTHREAD_CC"; then
22777 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
22778 printf "%s\n" "$PTHREAD_CC" >&6; }
22779 else
22780 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22781 printf "%s\n" "no" >&6; }
22782 fi
22783
22784
22785 test -n "$PTHREAD_CC" && break
22786 done
22787 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
22788
22789 if test "x${CXX}" != "x"
22790 then :
22791 for ac_prog in ${CXX}_r
22792 do
22793 # Extract the first word of "$ac_prog", so it can be a program name with args.
22794 set dummy $ac_prog; ac_word=$2
22795 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22796 printf %s "checking for $ac_word... " >&6; }
22797 if test ${ac_cv_prog_PTHREAD_CXX+y}
22798 then :
22799 printf %s "(cached) " >&6
22800 else $as_nop
22801 if test -n "$PTHREAD_CXX"; then
22802 ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test.
22803 else
22804 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22805 for as_dir in $PATH
22806 do
22807 IFS=$as_save_IFS
22808 case $as_dir in #(((
22809 '') as_dir=./ ;;
22810 */) ;;
22811 *) as_dir=$as_dir/ ;;
22812 esac
22813 for ac_exec_ext in '' $ac_executable_extensions; do
22814 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
22815 ac_cv_prog_PTHREAD_CXX="$ac_prog"
22816 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
22817 break 2
22818 fi
22819 done
22820 done
22821 IFS=$as_save_IFS
22822
22823 fi
22824 fi
22825 PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX
22826 if test -n "$PTHREAD_CXX"; then
22827 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5
22828 printf "%s\n" "$PTHREAD_CXX" >&6; }
22829 else
22830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
22831 printf "%s\n" "no" >&6; }
22832 fi
22833
22834
22835 test -n "$PTHREAD_CXX" && break
22836 done
22837 test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
22838
22839 fi
22840
22841 ;;
22842 esac
22843 ;; #(
22844 *) :
22845 ;;
22846 esac
22847 ;;
22848 esac
22849 fi
22850 fi
22851
22852 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
22853 test -n "$PTHREAD_CXX" || PTHREAD_CXX="$CXX"
22854
22855
22856
22857
22858
22859
22860 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
22861 if test "x$ax_pthread_ok" = "xyes"; then
22862
22863 # The two following lines add flags and libraries for pthread to the
22864 # global CFLAGS and LIBS variables. This means that all the subsequent
22865 # tests can rely on the assumption that pthread is enabled.
22866 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
22867 LIBS="$LIBS $PTHREAD_LIBS"
22868 :
22869 else
22870 ax_pthread_ok=no
22871 as_fn_error $? "POSIX threads are required but not supported on this platform" "$LINENO" 5
22872 fi
22873 ac_ext=c
22874 ac_cpp='$CPP $CPPFLAGS'
22875 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22876 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22877 ac_compiler_gnu=$ac_cv_c_compiler_gnu
22878
22879 ;;
22880 esac
22881
22882 ## pthread_getaffinity_np, args differ from GNU and BSD
22883 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking arguments for pthread_getaffinity_np" >&5
22884 printf %s "checking arguments for pthread_getaffinity_np... " >&6; }
22885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22886 /* end confdefs.h. */
22887 #define _GNU_SOURCE
22888 #include <sched.h>
22889 #ifdef HAS_PTHREAD_NP_H
22890 #include <pthread_np.h>
22891 #endif
22892 #include <pthread.h>
22893 int
22894 main (void)
22895 {
22896 cpu_set_t cs;
22897 CPU_ZERO(&cs);
22898 CPU_COUNT(&cs);
22899 pthread_getaffinity_np(pthread_self(), sizeof(cs), &cs);
22900 ;
22901 return 0;
22902 }
22903 _ACEOF
22904 if ac_fn_c_try_link "$LINENO"
22905 then :
22906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: GNU" >&5
22907 printf "%s\n" "GNU" >&6; }
22908 printf "%s\n" "#define HAS_GNU_GETAFFINITY_NP 1" >>confdefs.h
22909
22910 else $as_nop
22911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22912 /* end confdefs.h. */
22913 #include <pthread.h>
22914 #include <pthread_np.h>
22915 #include <sys/cpuset.h>
22916 int
22917 main (void)
22918 {
22919 cpuset_t cs;
22920 /* Not every BSD has CPU_ZERO and CPU_COUNT (NetBSD) */
22921 CPU_ZERO(&cs);
22922 CPU_COUNT(&cs);
22923 pthread_getaffinity_np(pthread_self(), sizeof(cs), &cs);
22924 ;
22925 return 0;
22926 }
22927 _ACEOF
22928 if ac_fn_c_try_link "$LINENO"
22929 then :
22930 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: BSD" >&5
22931 printf "%s\n" "BSD" >&6; }
22932 printf "%s\n" "#define HAS_BSD_GETAFFINITY_NP 1" >>confdefs.h
22933
22934 else $as_nop
22935 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pthread_getaffinity_np not found" >&5
22936 printf "%s\n" "pthread_getaffinity_np not found" >&6; }
22937 fi
22938 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22939 conftest$ac_exeext conftest.$ac_ext
22940 fi
22941 rm -f core conftest.err conftest.$ac_objext conftest.beam \
22942 conftest$ac_exeext conftest.$ac_ext
22943
22944 ## prctl
22945
22946 for ac_func in prctl
22947 do :
22948 ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
22949 if test "x$ac_cv_func_prctl" = xyes
22950 then :
22951 printf "%s\n" "#define HAVE_PRCTL 1" >>confdefs.h
22952 printf "%s\n" "#define HAS_PRCTL 1" >>confdefs.h
22953
22954 fi
22955
22956 done
22957
22958 ## pthread_setname_np
22959
22960 for ac_func in pthread_setname_np
22961 do :
22962 ac_fn_c_check_func "$LINENO" "pthread_setname_np" "ac_cv_func_pthread_setname_np"
22963 if test "x$ac_cv_func_pthread_setname_np" = xyes
22964 then :
22965 printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP 1" >>confdefs.h
22966 printf "%s\n" "#define HAS_PTHREAD_SETNAME_NP 1" >>confdefs.h
22967
22968 fi
22969
22970 done
22971
22972 ## pthread_set_name_np
22973
22974 for ac_func in pthread_set_name_np
22975 do :
22976 ac_fn_c_check_func "$LINENO" "pthread_set_name_np" "ac_cv_func_pthread_set_name_np"
22977 if test "x$ac_cv_func_pthread_set_name_np" = xyes
22978 then :
22979 printf "%s\n" "#define HAVE_PTHREAD_SET_NAME_NP 1" >>confdefs.h
22980 printf "%s\n" "#define HAS_PTHREAD_SET_NAME_NP 1" >>confdefs.h
22981
22982 fi
22983
22984 done
22985
22986 ## SetThreadDescription
22987
22988 for ac_func in SetThreadDescription
22989 do :
22990 ac_fn_c_check_func "$LINENO" "SetThreadDescription" "ac_cv_func_SetThreadDescription"
22991 if test "x$ac_cv_func_SetThreadDescription" = xyes
22992 then :
22993 printf "%s\n" "#define HAVE_SETTHREADDESCRIPTION 1" >>confdefs.h
22994 printf "%s\n" "#define HAS_SETTHREADDESCRIPTION 1" >>confdefs.h
22995
22996 ac_fn_check_decl "$LINENO" "SetThreadDescription" "ac_cv_have_decl_SetThreadDescription" "#define WIN32_LEAN_AND_MEAN
22997 #include <windows.h>
22998 #include <processthreadsapi.h>
22999 " "$ac_c_undeclared_builtin_options" "CFLAGS"
23000 if test "x$ac_cv_have_decl_SetThreadDescription" = xyes
23001 then :
23002 printf "%s\n" "#define HAS_DECL_SETTHREADDESCRIPTION 1" >>confdefs.h
23003
23004 fi
23005 fi
23006
23007 done
23008
23009 ## Activate the systhread library
23010
23011 case $enable_systhreads,$enable_unix_lib in #(
23012 yes,no) :
23013 systhread_support=false
23014 as_fn_error $? "the threads library requires the unix library" "$LINENO" 5 ;; #(
23015 no,*|*,no) :
23016 systhread_support=false
23017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the threads library is disabled" >&5
23018 printf "%s\n" "$as_me: the threads library is disabled" >&6;} ;; #(
23019 *) :
23020 systhread_support=true
23021 ac_config_files="$ac_config_files otherlibs/systhreads/META"
23022
23023 otherlibraries="$otherlibraries systhreads"
23024 otherlibs="$otherlibs systhreads"
23025 lib_systhreads=true
23026 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: the threads library is supported" >&5
23027 printf "%s\n" "$as_me: the threads library is supported" >&6;} ;;
23028 esac
23029
23030 ## Does the assembler support debug prefix map and CFI directives
23031 as_has_debug_prefix_map=false
23032 asm_cfi_supported=false
23033 if $native_compiler
23034 then :
23035 case $target in #(
23036 *-w64-mingw32*|*-pc-windows) :
23037 ;; #(
23038 *) :
23039
23040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports --debug-prefix-map" >&5
23041 printf %s "checking whether the assembler supports --debug-prefix-map... " >&6; }
23042
23043
23044 saved_CC="$CC"
23045 saved_CFLAGS="$CFLAGS"
23046 saved_CPPFLAGS="$CPPFLAGS"
23047 saved_LIBS="$LIBS"
23048 saved_ac_ext="$ac_ext"
23049 saved_ac_compile="$ac_compile"
23050 # Move the content of confdefs.h to another file so it does not
23051 # get included
23052 mv confdefs.h confdefs.h.bak
23053 touch confdefs.h
23054
23055
23056 # Modify C-compiler variables to use the assembler
23057 CC="$AS"
23058 CFLAGS="--debug-prefix-map old=new -o conftest.$ac_objext"
23059 CPPFLAGS=""
23060 ac_ext="S"
23061 ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23062
23063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23064 /* end confdefs.h. */
23065
23066 camlPervasives__loop_1128:
23067 .file 1 "pervasives.ml"
23068 .loc 1 193
23069
23070 _ACEOF
23071 if ac_fn_c_try_compile "$LINENO"
23072 then :
23073 as_has_debug_prefix_map=true
23074 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23075 printf "%s\n" "yes" >&6; }
23076 else $as_nop
23077 as_has_debug_prefix_map=false
23078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23079 printf "%s\n" "no" >&6; }
23080 fi
23081 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23082
23083
23084 # Restore the content of confdefs.h
23085 mv confdefs.h.bak confdefs.h
23086 ac_compile="$saved_ac_compile"
23087 ac_ext="$saved_ac_ext"
23088 CPPFLAGS="$saved_CPPFLAGS"
23089 CFLAGS="$saved_CFLAGS"
23090 CC="$saved_CC"
23091 LIBS="$saved_LIBS"
23092
23093
23094
23095 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the assembler supports CFI directives" >&5
23096 printf %s "checking whether the assembler supports CFI directives... " >&6; }
23097
23098 if test x"$enable_cfi" = "xno"
23099 then :
23100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23101 printf "%s\n" "disabled" >&6; }
23102 else $as_nop
23103
23104 saved_CC="$CC"
23105 saved_CFLAGS="$CFLAGS"
23106 saved_CPPFLAGS="$CPPFLAGS"
23107 saved_LIBS="$LIBS"
23108 saved_ac_ext="$ac_ext"
23109 saved_ac_compile="$ac_compile"
23110 # Move the content of confdefs.h to another file so it does not
23111 # get included
23112 mv confdefs.h confdefs.h.bak
23113 touch confdefs.h
23114
23115
23116 # Modify C-compiler variables to use the assembler
23117 CC="$ASPP"
23118 CFLAGS="-o conftest.$ac_objext"
23119 CPPFLAGS=""
23120 ac_ext="S"
23121 ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23122
23123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23124 /* end confdefs.h. */
23125
23126 camlPervasives__loop_1128:
23127 .file 1 "pervasives.ml"
23128 .loc 1 193
23129 .cfi_startproc
23130 .cfi_adjust_cfa_offset 8
23131 .cfi_endproc
23132
23133 _ACEOF
23134 if ac_fn_c_try_compile "$LINENO"
23135 then :
23136 aspp_ok=true
23137 else $as_nop
23138 aspp_ok=false
23139 fi
23140 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23141
23142 if test "$AS" = "$ASPP"
23143 then :
23144 as_ok="$aspp_ok"
23145 else $as_nop
23146 CC="$AS"
23147 ac_compile='$CC $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23149 /* end confdefs.h. */
23150
23151 camlPervasives__loop_1128:
23152 .file 1 "pervasives.ml"
23153 .loc 1 193
23154 .cfi_startproc
23155 .cfi_adjust_cfa_offset 8
23156 .cfi_endproc
23157
23158 _ACEOF
23159 if ac_fn_c_try_compile "$LINENO"
23160 then :
23161 as_ok=true
23162 else $as_nop
23163 as_ok=false
23164 fi
23165 rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
23166 fi
23167
23168
23169 # Restore the content of confdefs.h
23170 mv confdefs.h.bak confdefs.h
23171 ac_compile="$saved_ac_compile"
23172 ac_ext="$saved_ac_ext"
23173 CPPFLAGS="$saved_CPPFLAGS"
23174 CFLAGS="$saved_CFLAGS"
23175 CC="$saved_CC"
23176 LIBS="$saved_LIBS"
23177
23178
23179 if $aspp_ok && $as_ok
23180 then :
23181 asm_cfi_supported=true
23182 printf "%s\n" "#define ASM_CFI_SUPPORTED 1" >>confdefs.h
23183
23184 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23185 printf "%s\n" "yes" >&6; }
23186 else $as_nop
23187 if test x"$enable_cfi" = "xyes"
23188 then :
23189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: requested but not available
23190 as_fn_error $? "exiting" "$LINENO" 5" >&5
23191 printf "%s\n" "requested but not available
23192 as_fn_error $? "exiting" "$LINENO" 5" >&6; }
23193 else $as_nop
23194 asm_cfi_supported=false
23195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23196 printf "%s\n" "no" >&6; }
23197 fi
23198 fi
23199
23200 fi ;;
23201 esac
23202 fi
23203
23204 ## Frame pointers
23205
23206 if test x"$enable_frame_pointers" = "xyes"
23207 then :
23208 case $target in #(
23209 x86_64-*-linux*|x86_64-*-darwin*|aarch64-*-linux*|aarch64-*-darwin*) :
23210 case $ocaml_cc_vendor in #(
23211 clang-*|gcc-*) :
23212 common_cflags="$common_cflags -g -fno-omit-frame-pointer"
23213 frame_pointers=true
23214 printf "%s\n" "#define WITH_FRAME_POINTERS 1" >>confdefs.h
23215
23216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using frame pointers" >&5
23217 printf "%s\n" "$as_me: using frame pointers" >&6;} ;; #(
23218 *) :
23219 as_fn_error $? "frame pointers not supported on this platform" "$LINENO" 5
23220 ;;
23221 esac ;; #(
23222 *) :
23223 as_fn_error $? "frame pointers not supported on this platform" "$LINENO" 5
23224 ;;
23225 esac
23226 else $as_nop
23227 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not using frame pointers" >&5
23228 printf "%s\n" "$as_me: not using frame pointers" >&6;}
23229 frame_pointers=false
23230 fi
23231
23232 ## Check for mmap support for huge pages and contiguous heap
23233
23234 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mmap supports huge pages" >&5
23235 printf %s "checking whether mmap supports huge pages... " >&6; }
23236 if test "$cross_compiling" = yes
23237 then :
23238 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no assumed" >&5
23239 printf "%s\n" "no assumed" >&6; }
23240 else $as_nop
23241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23242 /* end confdefs.h. */
23243
23244 #include <sys/mman.h>
23245 #include <stdio.h>
23246 #include <stdlib.h>
23247
23248 #define huge_page_size (4 * 1024 * 1024)
23249
23250 /* Test for the possible availability of huge pages. Answer yes
23251 if the OS knows about huge pages, even if they are not available
23252 on the build machine at configure time, because (on Linux) huge
23253 pages can be activated and deactivated easily while the system
23254 is running.
23255 */
23256
23257 int
23258 main (void)
23259 {
23260
23261 void *block;
23262 char *p;
23263 int i, res;
23264 block = mmap (NULL, huge_page_size, PROT_READ | PROT_WRITE,
23265 MAP_PRIVATE | MAP_ANONYMOUS | MAP_HUGETLB,
23266 -1, 0);
23267 if (block == MAP_FAILED){
23268 block = mmap (NULL, huge_page_size, PROT_READ | PROT_WRITE,
23269 MAP_PRIVATE | MAP_ANONYMOUS,
23270 -1, 0);
23271 }
23272 if (block == MAP_FAILED){
23273 perror ("mmap");
23274 return 3;
23275 }
23276 /*printf ("block = %p\n", block);*/
23277 p = (char *) block;
23278 for (i = 0; i < huge_page_size; i += 4096){
23279 p[i] = (char) i;
23280 }
23281
23282 ;
23283 return 0;
23284 }
23285 _ACEOF
23286 if ac_fn_c_try_run "$LINENO"
23287 then :
23288 printf "%s\n" "#define HAS_HUGE_PAGES 1" >>confdefs.h
23289
23290 printf "%s\n" "#define HUGE_PAGE_SIZE (4 * 1024 * 1024)" >>confdefs.h
23291
23292 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23293 printf "%s\n" "yes" >&6; }
23294 else $as_nop
23295 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23296 printf "%s\n" "no" >&6; }
23297 fi
23298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23299 conftest.$ac_objext conftest.beam conftest.$ac_ext
23300 fi
23301
23302
23303
23304 printf "%s\n" "#define HEADER_RESERVED_BITS $reserved_header_bits" >>confdefs.h
23305
23306
23307 if test x"$enable_installing_bytecode_programs" = "xno"
23308 then :
23309 install_bytecode_programs=false
23310 else $as_nop
23311 install_bytecode_programs=true
23312 fi
23313
23314 if test x"$enable_installing_source_artifacts" = "xno"
23315 then :
23316 install_source_artifacts=false
23317 else $as_nop
23318 install_source_artifacts=true
23319 fi
23320
23321 if test x"$enable_stdlib_manpages" != "xno"
23322 then :
23323 build_libraries_manpages=true
23324 else $as_nop
23325 build_libraries_manpages=false
23326 fi
23327
23328 documentation_tool_cmd=''
23329
23330 # Check whether --with-odoc was given.
23331 if test ${with_odoc+y}
23332 then :
23333 withval=$with_odoc; case $withval in #(
23334 yes) :
23335 documentation_tool='odoc' ;; #(
23336 no) :
23337 documentation_tool='ocamldoc' ;; #(
23338 *) :
23339 documentation_tool_cmd="$withval"
23340 documentation_tool='odoc' ;;
23341 esac
23342 else $as_nop
23343 documentation_tool='ocamldoc'
23344 fi
23345
23346 if test "x$documentation_tool_cmd" = 'x'
23347 documentation_tool_cmd="$documentation_tool"
23348 then :
23349
23350 fi
23351
23352 if test x"$enable_ocamlobjinfo" != 'xno'
23353 then :
23354 build_ocamlobjinfo=true
23355 else $as_nop
23356 build_ocamlobjinfo=false
23357 fi
23358
23359 case $enable_ocamltest,false in #(
23360 yes,*|,true) :
23361 build_ocamltest=true
23362 ocamltest_target=ocamltest
23363 ocamltest_opt_target=ocamltest.opt
23364 ocamltest='ocamltest'
23365 testsuite_tools='testsuite/tools/codegen testsuite/tools/expect'
23366 optional_bytecode_tools="$optional_bytecode_tools $testsuite_tools" ;; #(
23367 *) :
23368 build_ocamltest=false
23369 ocamltest='' ;;
23370 esac
23371
23372 if $build_ocamltest
23373 then :
23374 optional_libraries="$optional_libraries testsuite/lib/testing"
23375 ocamltest_unix_mod="ocamltest/ocamltest_unix_${ocamltest_unix_impl}.ml"
23376 ac_config_links="$ac_config_links ocamltest/ocamltest_unix.ml:${ocamltest_unix_mod}"
23377
23378 for ac_prog in patdiff diff
23379 do
23380 # Extract the first word of "$ac_prog", so it can be a program name with args.
23381 set dummy $ac_prog; ac_word=$2
23382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23383 printf %s "checking for $ac_word... " >&6; }
23384 if test ${ac_cv_prog_DIFF+y}
23385 then :
23386 printf %s "(cached) " >&6
23387 else $as_nop
23388 if test -n "$DIFF"; then
23389 ac_cv_prog_DIFF="$DIFF" # Let the user override the test.
23390 else
23391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23392 for as_dir in $PATH
23393 do
23394 IFS=$as_save_IFS
23395 case $as_dir in #(((
23396 '') as_dir=./ ;;
23397 */) ;;
23398 *) as_dir=$as_dir/ ;;
23399 esac
23400 for ac_exec_ext in '' $ac_executable_extensions; do
23401 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
23402 ac_cv_prog_DIFF="$ac_prog"
23403 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
23404 break 2
23405 fi
23406 done
23407 done
23408 IFS=$as_save_IFS
23409
23410 fi
23411 fi
23412 DIFF=$ac_cv_prog_DIFF
23413 if test -n "$DIFF"; then
23414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
23415 printf "%s\n" "$DIFF" >&6; }
23416 else
23417 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23418 printf "%s\n" "no" >&6; }
23419 fi
23420
23421
23422 test -n "$DIFF" && break
23423 done
23424 test -n "$DIFF" || DIFF="none"
23425
23426 DIFF_FLAGS=""
23427 flags=""
23428 case $DIFF in #(
23429 diff) :
23430 flags="--strip-trailing-cr -u" ;; #(
23431 none) :
23432 as_fn_error $? "ocamltest requires a diff tool" "$LINENO" 5 ;; #(
23433 *) :
23434 ;;
23435 esac
23436 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $DIFF supports --color={auto,always,never}" >&5
23437 printf %s "checking whether $DIFF supports --color={auto,always,never}... " >&6; }
23438 if $DIFF --color=auto $0 $0 > /dev/null 2>&1
23439 then :
23440 diff_supports_color=true; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23441 printf "%s\n" "yes" >&6; }
23442 else $as_nop
23443 diff_supports_color=false; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23444 printf "%s\n" "no" >&6; }
23445 fi
23446 for flag in ${flags}; do
23447 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $DIFF supports $flag" >&5
23448 printf %s "checking whether $DIFF supports $flag... " >&6; };
23449 if $DIFF $DIFF_FLAGS $flag $0 $0 > /dev/null 2>&1
23450 then :
23451 DIFF_FLAGS="$DIFF_FLAGS $flag"
23452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23453 printf "%s\n" "yes" >&6; }
23454 else $as_nop
23455 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23456 printf "%s\n" "no" >&6; }
23457 fi
23458 done
23459 fi
23460
23461 if test x"$enable_flambda" = "xyes"
23462 then :
23463 flambda=true
23464 if test x"$enable_flambda_invariants" = "xyes"
23465 then :
23466 flambda_invariants=true
23467 else $as_nop
23468 flambda_invariants=false
23469 fi
23470 else $as_nop
23471 flambda=false
23472 flambda_invariants=false
23473 fi
23474
23475 if $flambda
23476 then :
23477 CMX_MAGIC_NUMBER=Caml1999y036
23478 CMXA_MAGIC_NUMBER=Caml1999z036
23479 else $as_nop
23480 CMX_MAGIC_NUMBER=Caml1999Y036
23481 CMXA_MAGIC_NUMBER=Caml1999Z036
23482 fi
23483
23484 if test x"$enable_cmm_invariants" = "xyes"
23485 then :
23486 cmm_invariants=true
23487 else $as_nop
23488 cmm_invariants=false
23489 fi
23490
23491 if test x"$enable_flat_float_array" = "xno"
23492 then :
23493 flat_float_array=false
23494 else $as_nop
23495 printf "%s\n" "#define FLAT_FLOAT_ARRAY 1" >>confdefs.h
23496
23497 flat_float_array=true
23498 fi
23499
23500
23501 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mmap supports MAP_STACK" >&5
23502 printf %s "checking whether mmap supports MAP_STACK... " >&6; }
23503 if test "$cross_compiling" = yes
23504 then :
23505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no assumed" >&5
23506 printf "%s\n" "no assumed" >&6; }
23507 else $as_nop
23508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23509 /* end confdefs.h. */
23510
23511 #include <sys/mman.h>
23512 #include <stdio.h>
23513 #include <stdlib.h>
23514
23515 int
23516 main (void)
23517 {
23518
23519 void *block;
23520 block = mmap (NULL, 4096, PROT_READ | PROT_WRITE,
23521 MAP_ANONYMOUS | MAP_PRIVATE | MAP_STACK,
23522 -1, 0);
23523 if (block == MAP_FAILED)
23524 return 1;
23525
23526 ;
23527 return 0;
23528 }
23529 _ACEOF
23530 if ac_fn_c_try_run "$LINENO"
23531 then :
23532 has_mmap_map_stack=true
23533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23534 printf "%s\n" "yes" >&6; }
23535 else $as_nop
23536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
23537 printf "%s\n" "no" >&6; }
23538 fi
23539 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23540 conftest.$ac_objext conftest.beam conftest.$ac_ext
23541 fi
23542
23543
23544 if test x"$enable_mmap_map_stack" = "xyes"
23545 then :
23546 if test x"$has_mmap_map_stack" = "xtrue"
23547 then :
23548 case $target in #(
23549 *-freebsd*) :
23550 as_fn_error $? "mmap MAP_STACK not supported on FreeBSD" "$LINENO" 5 ;; #(
23551 *) :
23552 with_mmap_map_stack=true;
23553 printf "%s\n" "#define USE_MMAP_MAP_STACK 1" >>confdefs.h
23554 ;;
23555 esac
23556 else $as_nop
23557 as_fn_error $? "mmap MAP_STACK requested but not found on $target" "$LINENO" 5
23558 fi
23559
23560 else $as_nop
23561 case $target in #(
23562 *-openbsd*) :
23563 with_mmap_map_stack=true;
23564 printf "%s\n" "#define USE_MMAP_MAP_STACK 1" >>confdefs.h
23565
23566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using MAP_STACK on OpenBSD due to stack checking" >&5
23567 printf "%s\n" "$as_me: using MAP_STACK on OpenBSD due to stack checking" >&6;} ;; #(
23568 *) :
23569 with_mmap_map_stack=false ;;
23570 esac
23571
23572 fi
23573
23574 oc_native_compflags=''
23575
23576 if test x"$enable_function_sections" = "xno"
23577 then :
23578 function_sections=false
23579 else $as_nop
23580 case $arch in #(
23581 amd64|arm64|power|riscv|s390x) :
23582 # not supported on arm32, see issue #9124.
23583 case $target in #(
23584 *-*-cygwin|*-w64-mingw32*|*-pc-windows|*-apple-darwin*) :
23585 function_sections=false;
23586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: No support for function sections on $target." >&5
23587 printf "%s\n" "$as_me: No support for function sections on $target." >&6;} ;; #(
23588 *) :
23589 case $ocaml_cc_vendor in #(
23590 gcc-0123-*|gcc-4-01234567) :
23591 function_sections=false;
23592 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Function sections are not
23593 supported in GCC prior to version 4.8." >&5
23594 printf "%s\n" "$as_me: Function sections are not
23595 supported in GCC prior to version 4.8." >&6;} ;; #(
23596 clang-012-*|clang-3-01234) :
23597 function_sections=false;
23598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Function sections are not supported
23599 in Clang prior to version 3.5." >&5
23600 printf "%s\n" "$as_me: Function sections are not supported
23601 in Clang prior to version 3.5." >&6;} ;; #(
23602 gcc-*|clang-*) :
23603 function_sections=true;
23604 oc_native_compflags='-function-sections'
23605 internal_cflags="$internal_cflags -ffunction-sections";
23606 printf "%s\n" "#define FUNCTION_SECTIONS 1" >>confdefs.h
23607 ;; #(
23608 *) :
23609 function_sections=false;
23610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Function sections are not supported by
23611 $ocaml_cc_vendor." >&5
23612 printf "%s\n" "$as_me: Function sections are not supported by
23613 $ocaml_cc_vendor." >&6;} ;;
23614 esac ;;
23615 esac ;; #(
23616 *) :
23617 function_sections=false ;;
23618 esac;
23619 if test x"$function_sections" = "xfalse"
23620 then :
23621 if test x"$enable_function_sections" = "xyes"
23622 then :
23623 as_fn_error $? "Function sections are not supported." "$LINENO" 5
23624 else $as_nop
23625 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling function sections." >&5
23626 printf "%s\n" "$as_me: Disabling function sections." >&6;}
23627 fi
23628 fi
23629 fi
23630
23631 if test x"$with_afl" = "xyes"
23632 then :
23633 afl=true
23634 else $as_nop
23635 afl=false
23636 fi
23637
23638 # Enable debugging support
23639 # TODO: add a --disable-debug-info configure option that disables debugging
23640 # info for both C and OCaml
23641 if test "$ccomp_type" != "msvc"
23642 then :
23643 internal_cflags="-g $internal_cflags"
23644 fi
23645
23646 oc_cflags="$common_cflags $internal_cflags"
23647 oc_cppflags="$common_cppflags $internal_cppflags"
23648
23649 oc_bytecode_cflags="$oc_cflags"
23650 oc_bytecode_cppflags="$oc_cppflags"
23651
23652 oc_native_cflags="$oc_cflags $oc_native_cflags"
23653 oc_native_cppflags="$oc_cppflags $oc_native_cppflags"
23654
23655 bytecode_cflags="$common_cflags $sharedlib_cflags $bytecode_cflags\
23656 $PTHREAD_CFLAGS $COMPILER_BYTECODE_CFLAGS"
23657 native_cflags="$common_cflags $sharedlib_cflags $native_cflags\
23658 $PTHREAD_CFLAGS $COMPILER_NATIVE_CFLAGS"
23659
23660 bytecode_cppflags="$common_cppflags $COMPILER_BYTECODE_CPPFLAGS"
23661 native_cppflags="$common_cppflags $COMPILER_NATIVE_CPPFLAGS"
23662
23663 case $target in #(
23664 *-w64-mingw32*) :
23665 cclibs="$cclibs -lole32 -luuid -lversion -lshlwapi -lsynchronization" ;; #(
23666 *-pc-windows) :
23667 # For whatever reason, flexlink includes -ladvapi32 and -lshell32 for
23668 # mingw-w64, but doesn't include advapi32.lib and shell32.lib for MSVC
23669 cclibs="$cclibs ole32.lib uuid.lib advapi32.lib shell32.lib version.lib \
23670 shlwapi.lib synchronization.lib" ;; #(
23671 *) :
23672 ;;
23673 esac
23674
23675
23676
23677 if test x"$libdir" = x'${exec_prefix}/lib'
23678 then :
23679 libdir="$libdir"/ocaml
23680 fi
23681
23682 if test x"$TARGET_LIBDIR" = x
23683 then :
23684 TARGET_LIBDIR="$libdir"
23685 fi
23686
23687 if test x"$mandir" = x'${datarootdir}/man'
23688 then :
23689 mandir='${prefix}/man'
23690 fi
23691
23692 # Define default prefix correctly for the different Windows ports
23693 if test x"$prefix" = "xNONE"
23694 then :
23695 case $host in #(
23696 i686-w64-mingw32*) :
23697 prefix='C:/ocamlmgw' ;; #(
23698 x86_64-w64-mingw32*) :
23699 prefix='C:/ocamlmgw64' ;; #(
23700 i686-pc-windows) :
23701 prefix='C:/ocamlms' ;; #(
23702 x86_64-pc-windows) :
23703 prefix='C:/ocamlms64' ;; #(
23704 *) :
23705 ;;
23706 esac
23707 else $as_nop
23708 case $build,$host in #(
23709 *-*-cygwin,*-w64-mingw32*|*-*-cygwin,*-pc-windows) :
23710 prefix="$(LC_ALL=C.UTF-8 cygpath -m "$prefix")" ;; #(
23711 *) :
23712 ;;
23713 esac
23714 fi
23715
23716 # Define a few macros that were defined in config/m-nt.h
23717 # but whose value is not guessed properly by configure
23718 # (all this should be understood and fixed)
23719 case $target in #(
23720 *-w64-mingw32*) :
23721 printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h
23722
23723 printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h
23724
23725 printf "%s\n" "#define HAS_NICE 1" >>confdefs.h
23726 ;; #(
23727 *-pc-windows) :
23728 printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h
23729
23730 printf "%s\n" "#define HAS_IPV6 1" >>confdefs.h
23731
23732 printf "%s\n" "#define HAS_NICE 1" >>confdefs.h
23733 ;; #(
23734 *-*-solaris*) :
23735 # This is required as otherwise floats are printed
23736 # as "Infinity" and "Inf" instead of the expected "inf"
23737 printf "%s\n" "#define HAS_BROKEN_PRINTF 1" >>confdefs.h
23738 ;; #(
23739 *) :
23740 ;;
23741 esac
23742
23743 # Do not permanently cache the result of flexdll.h
23744 unset ac_cv_header_flexdll_h
23745
23746 # Evaluate install directories
23747 # (this is needed for the OCaml configuration module)
23748
23749
23750 # Just before config.status is generated, determine the final values for MKEXE,
23751 # MKDLL, MKMAINDLL and MKEXE_VIA_CC. The final variables controlling these are:
23752 # $mkexe - the linking command and munged CFLAGS + any extra flexlink flags
23753 # $mkexe_exp: same as above but expanded
23754 # $mkdll - the full linking command for DLLs
23755 # $mkdll_exp: same as above but expanded
23756 # $mkmaindll - the full linking command for main program in DLL
23757 # $oc_ldflags $oc_dll_ldflags are handled as $(OC_LDFLAGS) and
23758 # $(OC_DLL_LDFLAGS) and can be overridden in the build.
23759
23760
23761 cat >confcache <<\_ACEOF
23762 # This file is a shell script that caches the results of configure
23763 # tests run on this system so they can be shared between configure
23764 # scripts and configure runs, see configure's option --config-cache.
23765 # It is not useful on other systems. If it contains results you don't
23766 # want to keep, you may remove or edit it.
23767 #
23768 # config.status only pays attention to the cache file if you give it
23769 # the --recheck option to rerun configure.
23770 #
23771 # `ac_cv_env_foo' variables (set or unset) will be overridden when
23772 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23773 # following values.
23774
23775 _ACEOF
23776
23777 # The following way of writing the cache mishandles newlines in values,
23778 # but we know of no workaround that is simple, portable, and efficient.
23779 # So, we kill variables containing newlines.
23780 # Ultrix sh set writes to stderr and can't be redirected directly,
23781 # and sets the high bit in the cache file unless we assign to the vars.
23782 (
23783 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
23784 eval ac_val=\$$ac_var
23785 case $ac_val in #(
23786 *${as_nl}*)
23787 case $ac_var in #(
23788 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
23789 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
23790 esac
23791 case $ac_var in #(
23792 _ | IFS | as_nl) ;; #(
23793 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
23794 *) { eval $ac_var=; unset $ac_var;} ;;
23795 esac ;;
23796 esac
23797 done
23798
23799 (set) 2>&1 |
23800 case $as_nl`(ac_space=' '; set) 2>&1` in #(
23801 *${as_nl}ac_space=\ *)
23802 # `set' does not quote correctly, so add quotes: double-quote
23803 # substitution turns \\\\ into \\, and sed turns \\ into \.
23804 sed -n \
23805 "s/'/'\\\\''/g;
23806 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23807 ;; #(
23808 *)
23809 # `set' quotes correctly as required by POSIX, so do not add quotes.
23810 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
23811 ;;
23812 esac |
23813 sort
23814 ) |
23815 sed '
23816 /^ac_cv_env_/b end
23817 t clear
23818 :clear
23819 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/
23820 t end
23821 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23822 :end' >>confcache
23823 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
23824 if test -w "$cache_file"; then
23825 if test "x$cache_file" != "x/dev/null"; then
23826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
23827 printf "%s\n" "$as_me: updating cache $cache_file" >&6;}
23828 if test ! -f "$cache_file" || test -h "$cache_file"; then
23829 cat confcache >"$cache_file"
23830 else
23831 case $cache_file in #(
23832 */* | ?:*)
23833 mv -f confcache "$cache_file"$$ &&
23834 mv -f "$cache_file"$$ "$cache_file" ;; #(
23835 *)
23836 mv -f confcache "$cache_file" ;;
23837 esac
23838 fi
23839 fi
23840 else
23841 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
23842 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;}
23843 fi
23844 fi
23845 rm -f confcache
23846
23847 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23848 # Let make expand exec_prefix.
23849 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23850
23851 DEFS=-DHAVE_CONFIG_H
23852
23853 ac_libobjs=
23854 ac_ltlibobjs=
23855 U=
23856 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
23857 # 1. Remove the extension, and $U if already installed.
23858 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
23859 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"`
23860 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
23861 # will be set to the directory where LIBOBJS objects are built.
23862 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
23863 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
23864 done
23865 LIBOBJS=$ac_libobjs
23866
23867 LTLIBOBJS=$ac_ltlibobjs
23868
23869
23870
23871 # Go through ac_subst_vars and put all the values to be substituted in
23872 # $all_values.
23873 QS=''
23874 all_values=''
23875 for name in $ac_subst_vars; do
23876 eval "value=\$${name}"
23877 all_values="$all_values $value"
23878 done
23879
23880 # Keep adding 'o' to $QS until |$QS} doesn't appear in any substitution.
23881 test_string=''
23882 while test "x${test_string}" != "x${all_values}"; do
23883 test_string="$all_values"
23884 eval "test_string=\"\${test_string##*\|${QS}\}}\""
23885 if test "x${test_string}" != "x${all_values}"; then
23886 QS="o${QS}"
23887 fi
23888 done
23889
23890 cclibs="$cclibs $mathlib $DLLIBS $PTHREAD_LIBS"
23891
23892 saved_exec_prefix="$exec_prefix"
23893 saved_prefix="$prefix"
23894 if test "x$prefix" = "xNONE"
23895 then :
23896 prefix="$ac_default_prefix"
23897 fi
23898 if test "x$exec_prefix" = "xNONE"
23899 then :
23900 exec_prefix="$prefix"
23901 fi
23902 eval "exec_prefix=\"$exec_prefix\""
23903 eval "ocaml_bindir=\"$bindir\""
23904 eval "ocaml_libdir=\"$libdir\""
23905 if test x"$TARGET_BINDIR" = 'x'
23906 then :
23907 TARGET_BINDIR="$ocaml_bindir"
23908 fi
23909 if test x"$target_launch_method" = 'x'
23910 then :
23911 target_launch_method="$launch_method"
23912 fi
23913 prefix="$saved_prefix"
23914 exec_prefix="$saved_exec_prefix"
23915
23916 # Construct $mkexe
23917 mkexe="$mkexe_cmd"
23918 mkexe_exp="$mkexe_cmd_exp"
23919 if test -n "$mkexe_extra_flags"
23920 then :
23921 mkexe="$mkexe $mkexe_extra_flags"
23922 mkexe_exp="$mkexe_exp $mkexe_extra_flags"
23923 fi
23924 # If $mkexe_ldflags_prefix is given, apply it to $oc_ldflags and $oc_dllflags
23925 # and ensure that LDFLAGS is passed using it. This is used for flexlink. where
23926 # linker flags need to be prefixed with -link.
23927 if test -n "$mkexe_ldflags_prefix"
23928 then :
23929
23930 if test -n "$mkexedebugflag"
23931 then :
23932 mkexedebugflag="${mkexe_ldflags_prefix}${mkexedebugflag}"
23933 fi
23934 mkdll_ldflags=""
23935 if test -n "${LDFLAGS}"
23936 then :
23937 for flag in ${LDFLAGS}; do
23938 mkdll_ldflags="${mkdll_ldflags} ${mkexe_ldflags_prefix}${flag}"
23939 done
23940 mkdll_ldflags_exp="$mkdll_ldflags"
23941 fi
23942 tmp_oc_ldflags=""
23943 if test -n "${oc_ldflags}"
23944 then :
23945 for flag in ${oc_ldflags}; do
23946 tmp_oc_ldflags="$tmp_oc_ldflags ${mkexe_ldflags_prefix}${flag}"
23947 done
23948 mkdll_ldflags_exp="$mkdll_ldflags_exp $tmp_oc_ldflags"
23949 fi
23950 tmp_oc_dll_ldflags=""
23951 if test -n "${oc_dll_ldflags}"
23952 then :
23953 for flag in ${oc_dll_ldflags}; do
23954 tmp_oc_dll_ldflags="$tmp_oc_dll_ldflags ${mkexe_ldflags_prefix}${flag}"
23955 done
23956 mkdll_ldflags_exp="$mkdll_ldflags_exp $tmp_oc_dll_ldflags"
23957 fi
23958 mkexe_ldflags=\
23959 "\$(addprefix ${mkexe_ldflags_prefix},\$(OC_LDFLAGS))${mkdll_ldflags}"
23960 mkexe_ldflags_exp=\
23961 "${tmp_oc_ldflags} ${mkdll_ldflags}"
23962
23963 mkdll_ldflags="\$(addprefix ${mkexe_ldflags_prefix},\$(OC_DLL_LDFLAGS)) \
23964 ${mkdll_ldflags}"
23965
23966 else $as_nop
23967
23968 mkdll_ldflags='$(OC_DLL_LDFLAGS) $(LDFLAGS)'
23969 mkdll_ldflags_exp="${oc_dll_ldflags}"
23970 if test -n "${LDFLAGS}"
23971 then :
23972 mkdll_ldflags_exp="$mkdll_ldflags_exp $LDFLAGS"
23973 fi
23974 mkexe_ldflags="\$(OC_LDFLAGS) \$(LDFLAGS)"
23975 mkexe_ldflags_exp="${oc_ldflags} ${LDFLAGS}"
23976
23977 fi
23978 mkexe="$mkexe $mkexe_ldflags"
23979 mkexe_exp="$mkexe_exp $mkexe_ldflags_exp"
23980 mkdll="$mkdll $mkdll_ldflags"
23981 mkdll_exp="$mkdll_exp $mkdll_ldflags_exp"
23982 mkmaindll="$mkmaindll $mkdll_ldflags_exp"
23983 mkmaindll_exp="$mkmaindll_exp $mkdll_ldflags_exp"
23984 mkexe_via_cc_ldflags="${mkexe_via_cc_ldflags_prefix}"
23985 if test -n "${oc_exe_ldflags}"
23986 then :
23987 mkexe_via_cc_ldflags="${mkexe_via_cc_ldflags}${oc_exe_ldflags} "
23988 fi
23989 mkexe_via_cc_ldflags="${mkexe_via_cc_ldflags}\$(OC_LDFLAGS) \$(LDFLAGS)"
23990 # cl requires linker flags after the objects.
23991 if test "$ccomp_type" = 'msvc'
23992 then :
23993 mkexe_via_cc_ldflags=\
23994 "/nologo \$(OUTPUTEXE)\$(1) \$(2) $mkexe_via_cc_ldflags"
23995 else $as_nop
23996 mkexe_via_cc_ldflags=\
23997 "$mkexe_via_cc_ldflags \$(OUTPUTEXE)\$(1) \$(2)"
23998 fi
23999
24000
24001 : "${CONFIG_STATUS=./config.status}"
24002 ac_write_fail=0
24003 ac_clean_files_save=$ac_clean_files
24004 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
24006 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;}
24007 as_write_fail=0
24008 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
24009 #! $SHELL
24010 # Generated by $as_me.
24011 # Run this file to recreate the current configuration.
24012 # Compiler output produced by configure, useful for debugging
24013 # configure, is in config.log if it exists.
24014
24015 debug=false
24016 ac_cs_recheck=false
24017 ac_cs_silent=false
24018
24019 SHELL=\${CONFIG_SHELL-$SHELL}
24020 export SHELL
24021 _ASEOF
24022 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
24023 ## -------------------- ##
24024 ## M4sh Initialization. ##
24025 ## -------------------- ##
24026
24027 # Be more Bourne compatible
24028 DUALCASE=1; export DUALCASE # for MKS sh
24029 as_nop=:
24030 if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1
24031 then :
24032 emulate sh
24033 NULLCMD=:
24034 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24035 # is contrary to our usage. Disable this feature.
24036 alias -g '${1+"$@"}'='"$@"'
24037 setopt NO_GLOB_SUBST
24038 else $as_nop
24039 case `(set -o) 2>/dev/null` in #(
24040 *posix*) :
24041 set -o posix ;; #(
24042 *) :
24043 ;;
24044 esac
24045 fi
24046
24047
24048
24049 # Reset variables that may have inherited troublesome values from
24050 # the environment.
24051
24052 # IFS needs to be set, to space, tab, and newline, in precisely that order.
24053 # (If _AS_PATH_WALK were called with IFS unset, it would have the
24054 # side effect of setting IFS to empty, thus disabling word splitting.)
24055 # Quoting is to prevent editors from complaining about space-tab.
24056 as_nl='
24057 '
24058 export as_nl
24059 IFS=" "" $as_nl"
24060
24061 PS1='$ '
24062 PS2='> '
24063 PS4='+ '
24064
24065 # Ensure predictable behavior from utilities with locale-dependent output.
24066 LC_ALL=C
24067 export LC_ALL
24068 LANGUAGE=C
24069 export LANGUAGE
24070
24071 # We cannot yet rely on "unset" to work, but we need these variables
24072 # to be unset--not just set to an empty or harmless value--now, to
24073 # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct
24074 # also avoids known problems related to "unset" and subshell syntax
24075 # in other old shells (e.g. bash 2.01 and pdksh 5.2.14).
24076 for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH
24077 do eval test \${$as_var+y} \
24078 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
24079 done
24080
24081 # Ensure that fds 0, 1, and 2 are open.
24082 if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi
24083 if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi
24084 if (exec 3>&2) ; then :; else exec 2>/dev/null; fi
24085
24086 # The user is always right.
24087 if ${PATH_SEPARATOR+false} :; then
24088 PATH_SEPARATOR=:
24089 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
24090 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
24091 PATH_SEPARATOR=';'
24092 }
24093 fi
24094
24095
24096 # Find who we are. Look in the path if we contain no directory separator.
24097 as_myself=
24098 case $0 in #((
24099 *[\\/]* ) as_myself=$0 ;;
24100 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24101 for as_dir in $PATH
24102 do
24103 IFS=$as_save_IFS
24104 case $as_dir in #(((
24105 '') as_dir=./ ;;
24106 */) ;;
24107 *) as_dir=$as_dir/ ;;
24108 esac
24109 test -r "$as_dir$0" && as_myself=$as_dir$0 && break
24110 done
24111 IFS=$as_save_IFS
24112
24113 ;;
24114 esac
24115 # We did not find ourselves, most probably we were run as `sh COMMAND'
24116 # in which case we are not to be found in the path.
24117 if test "x$as_myself" = x; then
24118 as_myself=$0
24119 fi
24120 if test ! -f "$as_myself"; then
24121 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
24122 exit 1
24123 fi
24124
24125
24126
24127 # as_fn_error STATUS ERROR [LINENO LOG_FD]
24128 # ----------------------------------------
24129 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
24130 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
24131 # script with STATUS, using 1 if that was 0.
24132 as_fn_error ()
24133 {
24134 as_status=$1; test $as_status -eq 0 && as_status=1
24135 if test "$4"; then
24136 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
24137 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
24138 fi
24139 printf "%s\n" "$as_me: error: $2" >&2
24140 as_fn_exit $as_status
24141 } # as_fn_error
24142
24143
24144
24145 # as_fn_set_status STATUS
24146 # -----------------------
24147 # Set $? to STATUS, without forking.
24148 as_fn_set_status ()
24149 {
24150 return $1
24151 } # as_fn_set_status
24152
24153 # as_fn_exit STATUS
24154 # -----------------
24155 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
24156 as_fn_exit ()
24157 {
24158 set +e
24159 as_fn_set_status $1
24160 exit $1
24161 } # as_fn_exit
24162
24163 # as_fn_unset VAR
24164 # ---------------
24165 # Portably unset VAR.
24166 as_fn_unset ()
24167 {
24168 { eval $1=; unset $1;}
24169 }
24170 as_unset=as_fn_unset
24171
24172 # as_fn_append VAR VALUE
24173 # ----------------------
24174 # Append the text in VALUE to the end of the definition contained in VAR. Take
24175 # advantage of any shell optimizations that allow amortized linear growth over
24176 # repeated appends, instead of the typical quadratic growth present in naive
24177 # implementations.
24178 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null
24179 then :
24180 eval 'as_fn_append ()
24181 {
24182 eval $1+=\$2
24183 }'
24184 else $as_nop
24185 as_fn_append ()
24186 {
24187 eval $1=\$$1\$2
24188 }
24189 fi # as_fn_append
24190
24191 # as_fn_arith ARG...
24192 # ------------------
24193 # Perform arithmetic evaluation on the ARGs, and store the result in the
24194 # global $as_val. Take advantage of shells that can avoid forks. The arguments
24195 # must be portable across $(()) and expr.
24196 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null
24197 then :
24198 eval 'as_fn_arith ()
24199 {
24200 as_val=$(( $* ))
24201 }'
24202 else $as_nop
24203 as_fn_arith ()
24204 {
24205 as_val=`expr "$@" || test $? -eq 1`
24206 }
24207 fi # as_fn_arith
24208
24209
24210 if expr a : '\(a\)' >/dev/null 2>&1 &&
24211 test "X`expr 00001 : '.*\(...\)'`" = X001; then
24212 as_expr=expr
24213 else
24214 as_expr=false
24215 fi
24216
24217 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
24218 as_basename=basename
24219 else
24220 as_basename=false
24221 fi
24222
24223 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
24224 as_dirname=dirname
24225 else
24226 as_dirname=false
24227 fi
24228
24229 as_me=`$as_basename -- "$0" ||
24230 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
24231 X"$0" : 'X\(//\)$' \| \
24232 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
24233 printf "%s\n" X/"$0" |
24234 sed '/^.*\/\([^/][^/]*\)\/*$/{
24235 s//\1/
24236 q
24237 }
24238 /^X\/\(\/\/\)$/{
24239 s//\1/
24240 q
24241 }
24242 /^X\/\(\/\).*/{
24243 s//\1/
24244 q
24245 }
24246 s/.*/./; q'`
24247
24248 # Avoid depending upon Character Ranges.
24249 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
24250 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
24251 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
24252 as_cr_digits='0123456789'
24253 as_cr_alnum=$as_cr_Letters$as_cr_digits
24254
24255
24256 # Determine whether it's possible to make 'echo' print without a newline.
24257 # These variables are no longer used directly by Autoconf, but are AC_SUBSTed
24258 # for compatibility with existing Makefiles.
24259 ECHO_C= ECHO_N= ECHO_T=
24260 case `echo -n x` in #(((((
24261 -n*)
24262 case `echo 'xy\c'` in
24263 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
24264 xy) ECHO_C='\c';;
24265 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
24266 ECHO_T=' ';;
24267 esac;;
24268 *)
24269 ECHO_N='-n';;
24270 esac
24271
24272 # For backward compatibility with old third-party macros, we provide
24273 # the shell variables $as_echo and $as_echo_n. New code should use
24274 # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively.
24275 as_echo='printf %s\n'
24276 as_echo_n='printf %s'
24277
24278 rm -f conf$$ conf$$.exe conf$$.file
24279 if test -d conf$$.dir; then
24280 rm -f conf$$.dir/conf$$.file
24281 else
24282 rm -f conf$$.dir
24283 mkdir conf$$.dir 2>/dev/null
24284 fi
24285 if (echo >conf$$.file) 2>/dev/null; then
24286 if ln -s conf$$.file conf$$ 2>/dev/null; then
24287 as_ln_s='ln -s'
24288 # ... but there are two gotchas:
24289 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
24290 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
24291 # In both cases, we have to default to `cp -pR'.
24292 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
24293 as_ln_s='cp -pR'
24294 elif ln conf$$.file conf$$ 2>/dev/null; then
24295 as_ln_s=ln
24296 else
24297 as_ln_s='cp -pR'
24298 fi
24299 else
24300 as_ln_s='cp -pR'
24301 fi
24302 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
24303 rmdir conf$$.dir 2>/dev/null
24304
24305
24306 # as_fn_mkdir_p
24307 # -------------
24308 # Create "$as_dir" as a directory, including parents if necessary.
24309 as_fn_mkdir_p ()
24310 {
24311
24312 case $as_dir in #(
24313 -*) as_dir=./$as_dir;;
24314 esac
24315 test -d "$as_dir" || eval $as_mkdir_p || {
24316 as_dirs=
24317 while :; do
24318 case $as_dir in #(
24319 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
24320 *) as_qdir=$as_dir;;
24321 esac
24322 as_dirs="'$as_qdir' $as_dirs"
24323 as_dir=`$as_dirname -- "$as_dir" ||
24324 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24325 X"$as_dir" : 'X\(//\)[^/]' \| \
24326 X"$as_dir" : 'X\(//\)$' \| \
24327 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
24328 printf "%s\n" X"$as_dir" |
24329 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
24330 s//\1/
24331 q
24332 }
24333 /^X\(\/\/\)[^/].*/{
24334 s//\1/
24335 q
24336 }
24337 /^X\(\/\/\)$/{
24338 s//\1/
24339 q
24340 }
24341 /^X\(\/\).*/{
24342 s//\1/
24343 q
24344 }
24345 s/.*/./; q'`
24346 test -d "$as_dir" && break
24347 done
24348 test -z "$as_dirs" || eval "mkdir $as_dirs"
24349 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
24350
24351
24352 } # as_fn_mkdir_p
24353 if mkdir -p . 2>/dev/null; then
24354 as_mkdir_p='mkdir -p "$as_dir"'
24355 else
24356 test -d ./-p && rmdir ./-p
24357 as_mkdir_p=false
24358 fi
24359
24360
24361 # as_fn_executable_p FILE
24362 # -----------------------
24363 # Test if FILE is an executable regular file.
24364 as_fn_executable_p ()
24365 {
24366 test -f "$1" && test -x "$1"
24367 } # as_fn_executable_p
24368 as_test_x='test -x'
24369 as_executable_p=as_fn_executable_p
24370
24371 # Sed expression to map a string onto a valid CPP name.
24372 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
24373
24374 # Sed expression to map a string onto a valid variable name.
24375 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
24376
24377
24378 exec 6>&1
24379 ## ----------------------------------- ##
24380 ## Main body of $CONFIG_STATUS script. ##
24381 ## ----------------------------------- ##
24382 _ASEOF
24383 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
24384
24385 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24386 # Save the log message, to keep $0 and so on meaningful, and to
24387 # report actual input values of CONFIG_FILES etc. instead of their
24388 # values after options handling.
24389 ac_log="
24390 This file was extended by OCaml $as_me 5.4.1, which was
24391 generated by GNU Autoconf 2.71. Invocation command line was
24392
24393 CONFIG_FILES = $CONFIG_FILES
24394 CONFIG_HEADERS = $CONFIG_HEADERS
24395 CONFIG_LINKS = $CONFIG_LINKS
24396 CONFIG_COMMANDS = $CONFIG_COMMANDS
24397 $ $0 $@
24398
24399 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24400 "
24401
24402 _ACEOF
24403
24404 case $ac_config_files in *"
24405 "*) set x $ac_config_files; shift; ac_config_files=$*;;
24406 esac
24407
24408 case $ac_config_headers in *"
24409 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
24410 esac
24411
24412
24413 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24414 # Files that config.status was made for.
24415 config_files="$ac_config_files"
24416 config_headers="$ac_config_headers"
24417 config_links="$ac_config_links"
24418 config_commands="$ac_config_commands"
24419
24420 _ACEOF
24421
24422 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24423 ac_cs_usage="\
24424 \`$as_me' instantiates files and other configuration actions
24425 from templates according to the current configuration. Unless the files
24426 and actions are specified as TAGs, all are instantiated by default.
24427
24428 Usage: $0 [OPTION]... [TAG]...
24429
24430 -h, --help print this help, then exit
24431 -V, --version print version number and configuration settings, then exit
24432 --config print configuration, then exit
24433 -q, --quiet, --silent
24434 do not print progress messages
24435 -d, --debug don't remove temporary files
24436 --recheck update $as_me by reconfiguring in the same conditions
24437 --file=FILE[:TEMPLATE]
24438 instantiate the configuration file FILE
24439 --header=FILE[:TEMPLATE]
24440 instantiate the configuration header FILE
24441
24442 Configuration files:
24443 $config_files
24444
24445 Configuration headers:
24446 $config_headers
24447
24448 Configuration links:
24449 $config_links
24450
24451 Configuration commands:
24452 $config_commands
24453
24454 Report bugs to <[email protected]>.
24455 OCaml home page: <http://www.ocaml.org>."
24456
24457 _ACEOF
24458 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"`
24459 ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"`
24460 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24461 ac_cs_config='$ac_cs_config_escaped'
24462 ac_cs_version="\\
24463 OCaml config.status 5.4.1
24464 configured by $0, generated by GNU Autoconf 2.71,
24465 with options \\"\$ac_cs_config\\"
24466
24467 Copyright (C) 2021 Free Software Foundation, Inc.
24468 This config.status script is free software; the Free Software Foundation
24469 gives unlimited permission to copy, distribute and modify it."
24470
24471 ac_pwd='$ac_pwd'
24472 srcdir='$srcdir'
24473 INSTALL='$INSTALL'
24474 AWK='$AWK'
24475 test -n "\$AWK" || AWK=awk
24476 _ACEOF
24477
24478 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24479 # The default lists apply if the user does not specify any file.
24480 ac_need_defaults=:
24481 while test $# != 0
24482 do
24483 case $1 in
24484 --*=?*)
24485 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24486 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
24487 ac_shift=:
24488 ;;
24489 --*=)
24490 ac_option=`expr "X$1" : 'X\([^=]*\)='`
24491 ac_optarg=
24492 ac_shift=:
24493 ;;
24494 *)
24495 ac_option=$1
24496 ac_optarg=$2
24497 ac_shift=shift
24498 ;;
24499 esac
24500
24501 case $ac_option in
24502 # Handling of the options.
24503 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24504 ac_cs_recheck=: ;;
24505 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
24506 printf "%s\n" "$ac_cs_version"; exit ;;
24507 --config | --confi | --conf | --con | --co | --c )
24508 printf "%s\n" "$ac_cs_config"; exit ;;
24509 --debug | --debu | --deb | --de | --d | -d )
24510 debug=: ;;
24511 --file | --fil | --fi | --f )
24512 $ac_shift
24513 case $ac_optarg in
24514 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24515 '') as_fn_error $? "missing file argument" ;;
24516 esac
24517 as_fn_append CONFIG_FILES " '$ac_optarg'"
24518 ac_need_defaults=false;;
24519 --header | --heade | --head | --hea )
24520 $ac_shift
24521 case $ac_optarg in
24522 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
24523 esac
24524 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
24525 ac_need_defaults=false;;
24526 --he | --h)
24527 # Conflict between --help and --header
24528 as_fn_error $? "ambiguous option: \`$1'
24529 Try \`$0 --help' for more information.";;
24530 --help | --hel | -h )
24531 printf "%s\n" "$ac_cs_usage"; exit ;;
24532 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
24533 | -silent | --silent | --silen | --sile | --sil | --si | --s)
24534 ac_cs_silent=: ;;
24535
24536 # This is an error.
24537 -*) as_fn_error $? "unrecognized option: \`$1'
24538 Try \`$0 --help' for more information." ;;
24539
24540 *) as_fn_append ac_config_targets " $1"
24541 ac_need_defaults=false ;;
24542
24543 esac
24544 shift
24545 done
24546
24547 ac_configure_extra_args=
24548
24549 if $ac_cs_silent; then
24550 exec 6>/dev/null
24551 ac_configure_extra_args="$ac_configure_extra_args --silent"
24552 fi
24553
24554 _ACEOF
24555 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24556 if \$ac_cs_recheck; then
24557 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
24558 shift
24559 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6
24560 CONFIG_SHELL='$SHELL'
24561 export CONFIG_SHELL
24562 exec "\$@"
24563 fi
24564
24565 _ACEOF
24566 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24567 exec 5>>config.log
24568 {
24569 echo
24570 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
24571 ## Running $as_me. ##
24572 _ASBOX
24573 printf "%s\n" "$ac_log"
24574 } >&5
24575
24576 _ACEOF
24577 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
24578 #
24579 # INIT-COMMANDS
24580 #
24581 export CYGWIN="\$CYGWIN\${CYGWIN:+ }winsymlinks:nativestrict"
24582 export MSYS="\$MSYS\${MSYS:+ }winsymlinks:nativestrict"
24583
24584
24585 # The HP-UX ksh and POSIX shell print the target directory to stdout
24586 # if CDPATH is set.
24587 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
24588
24589 sed_quote_subst='$sed_quote_subst'
24590 double_quote_subst='$double_quote_subst'
24591 delay_variable_subst='$delay_variable_subst'
24592 macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`'
24593 macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`'
24594 enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
24595 enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
24596 pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
24597 enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
24598 shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
24599 SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
24600 ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
24601 PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
24602 host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`'
24603 host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`'
24604 host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`'
24605 build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`'
24606 build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`'
24607 build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`'
24608 SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`'
24609 Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`'
24610 GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`'
24611 EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`'
24612 FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`'
24613 LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`'
24614 NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`'
24615 LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`'
24616 max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`'
24617 ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`'
24618 exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`'
24619 lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`'
24620 lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`'
24621 lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`'
24622 lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`'
24623 lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`'
24624 reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`'
24625 reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`'
24626 FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`'
24627 OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`'
24628 deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`'
24629 file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`'
24630 file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`'
24631 want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`'
24632 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
24633 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
24634 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
24635 lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
24636 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
24637 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
24638 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
24639 RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`'
24640 old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`'
24641 old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
24642 old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`'
24643 lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`'
24644 CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`'
24645 CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`'
24646 compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
24647 GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
24648 lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
24649 lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
24650 lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
24651 lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
24652 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
24653 lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
24654 nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
24655 lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
24656 lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
24657 objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
24658 MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
24659 lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
24660 lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`'
24661 lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`'
24662 lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`'
24663 lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`'
24664 need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`'
24665 MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`'
24666 DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`'
24667 NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`'
24668 LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`'
24669 OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`'
24670 OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`'
24671 libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`'
24672 shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`'
24673 extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
24674 archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`'
24675 enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`'
24676 export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`'
24677 whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`'
24678 compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`'
24679 old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`'
24680 old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`'
24681 archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`'
24682 archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`'
24683 module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`'
24684 module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`'
24685 with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`'
24686 allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`'
24687 no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`'
24688 hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`'
24689 hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`'
24690 hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`'
24691 hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`'
24692 hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`'
24693 hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`'
24694 hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`'
24695 inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`'
24696 link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`'
24697 always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`'
24698 export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`'
24699 exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`'
24700 include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`'
24701 prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`'
24702 postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`'
24703 file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`'
24704 variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`'
24705 need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`'
24706 need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`'
24707 version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`'
24708 runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`'
24709 shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`'
24710 shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`'
24711 libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`'
24712 library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`'
24713 soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`'
24714 install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`'
24715 postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`'
24716 postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`'
24717 finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
24718 finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
24719 hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
24720 sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
24721 configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
24722 configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
24723 hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
24724 enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
24725 enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
24726 enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`'
24727 old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`'
24728 striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`'
24729
24730 LTCC='$LTCC'
24731 LTCFLAGS='$LTCFLAGS'
24732 compiler='$compiler_DEFAULT'
24733
24734 # A function that is used when there is no print builtin or printf.
24735 func_fallback_echo ()
24736 {
24737 eval 'cat <<_LTECHO_EOF
24738 \$1
24739 _LTECHO_EOF'
24740 }
24741
24742 # Quote evaled strings.
24743 for var in SHELL \
24744 ECHO \
24745 PATH_SEPARATOR \
24746 SED \
24747 GREP \
24748 EGREP \
24749 FGREP \
24750 LD \
24751 NM \
24752 LN_S \
24753 lt_SP2NL \
24754 lt_NL2SP \
24755 reload_flag \
24756 FILECMD \
24757 OBJDUMP \
24758 deplibs_check_method \
24759 file_magic_cmd \
24760 file_magic_glob \
24761 want_nocaseglob \
24762 DLLTOOL \
24763 sharedlib_from_linklib_cmd \
24764 AR \
24765 archiver_list_spec \
24766 STRIP \
24767 RANLIB \
24768 CC \
24769 CFLAGS \
24770 compiler \
24771 lt_cv_sys_global_symbol_pipe \
24772 lt_cv_sys_global_symbol_to_cdecl \
24773 lt_cv_sys_global_symbol_to_import \
24774 lt_cv_sys_global_symbol_to_c_name_address \
24775 lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
24776 lt_cv_nm_interface \
24777 nm_file_list_spec \
24778 lt_cv_truncate_bin \
24779 lt_prog_compiler_no_builtin_flag \
24780 lt_prog_compiler_pic \
24781 lt_prog_compiler_wl \
24782 lt_prog_compiler_static \
24783 lt_cv_prog_compiler_c_o \
24784 need_locks \
24785 MANIFEST_TOOL \
24786 DSYMUTIL \
24787 NMEDIT \
24788 LIPO \
24789 OTOOL \
24790 OTOOL64 \
24791 shrext_cmds \
24792 export_dynamic_flag_spec \
24793 whole_archive_flag_spec \
24794 compiler_needs_object \
24795 with_gnu_ld \
24796 allow_undefined_flag \
24797 no_undefined_flag \
24798 hardcode_libdir_flag_spec \
24799 hardcode_libdir_separator \
24800 exclude_expsyms \
24801 include_expsyms \
24802 file_list_spec \
24803 variables_saved_for_relink \
24804 libname_spec \
24805 library_names_spec \
24806 soname_spec \
24807 install_override_mode \
24808 finish_eval \
24809 old_striplib \
24810 striplib; do
24811 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
24812 *[\\\\\\\`\\"\\\$]*)
24813 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
24814 ;;
24815 *)
24816 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
24817 ;;
24818 esac
24819 done
24820
24821 # Double-quote double-evaled strings.
24822 for var in reload_cmds \
24823 old_postinstall_cmds \
24824 old_postuninstall_cmds \
24825 old_archive_cmds \
24826 extract_expsyms_cmds \
24827 old_archive_from_new_cmds \
24828 old_archive_from_expsyms_cmds \
24829 archive_cmds \
24830 archive_expsym_cmds \
24831 module_cmds \
24832 module_expsym_cmds \
24833 export_symbols_cmds \
24834 prelink_cmds \
24835 postlink_cmds \
24836 postinstall_cmds \
24837 postuninstall_cmds \
24838 finish_cmds \
24839 sys_lib_search_path_spec \
24840 configure_time_dlsearch_path \
24841 configure_time_lt_sys_library_path; do
24842 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
24843 *[\\\\\\\`\\"\\\$]*)
24844 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
24845 ;;
24846 *)
24847 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
24848 ;;
24849 esac
24850 done
24851
24852 ac_aux_dir='$ac_aux_dir'
24853
24854 # See if we are running on zsh, and set the options that allow our
24855 # commands through without removal of \ escapes INIT.
24856 if test -n "\${ZSH_VERSION+set}"; then
24857 setopt NO_GLOB_SUBST
24858 fi
24859
24860
24861 PACKAGE='$PACKAGE'
24862 VERSION='$VERSION'
24863 RM='$RM'
24864 ofile='$ofile'
24865
24866
24867
24868 launch_method='$(echo "$launch_method" | sed -e "s/'/'\"'\"'/g")'
24869 target_launch_method=\
24870 '$(echo "$target_launch_method" | sed -e "s/'/'\"'\"'/g")'
24871 ocaml_bindir='$(echo "$ocaml_bindir" | sed -e "s/'/'\"'\"'/g")'
24872 TARGET_BINDIR='$(echo "$TARGET_BINDIR" | sed -e "s/'/'\"'\"'/g")'
24873
24874 _ACEOF
24875
24876 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
24877
24878 # Handling of arguments.
24879 for ac_config_target in $ac_config_targets
24880 do
24881 case $ac_config_target in
24882 "Makefile.build_config") CONFIG_FILES="$CONFIG_FILES Makefile.build_config" ;;
24883 "Makefile.config") CONFIG_FILES="$CONFIG_FILES Makefile.config" ;;
24884 "stdlib/sys.ml") CONFIG_FILES="$CONFIG_FILES stdlib/sys.ml" ;;
24885 "manual/src/version.tex") CONFIG_FILES="$CONFIG_FILES manual/src/version.tex" ;;
24886 "manual/src/html_processing/src/common.ml") CONFIG_FILES="$CONFIG_FILES manual/src/html_processing/src/common.ml" ;;
24887 "ocamltest/ocamltest_config.ml") CONFIG_FILES="$CONFIG_FILES ocamltest/ocamltest_config.ml" ;;
24888 "otherlibs/dynlink/dynlink_config.ml") CONFIG_FILES="$CONFIG_FILES otherlibs/dynlink/dynlink_config.ml" ;;
24889 "utils/config.common.ml") CONFIG_FILES="$CONFIG_FILES utils/config.common.ml" ;;
24890 "utils/config.generated.ml") CONFIG_FILES="$CONFIG_FILES utils/config.generated.ml" ;;
24891 "runtime/caml/exec.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/exec.h" ;;
24892 "runtime/caml/m.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/m.h" ;;
24893 "runtime/caml/s.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/s.h" ;;
24894 "runtime/caml/version.h") CONFIG_HEADERS="$CONFIG_HEADERS runtime/caml/version.h" ;;
24895 "compilerlibs/META") CONFIG_FILES="$CONFIG_FILES compilerlibs/META" ;;
24896 "otherlibs/dynlink/META") CONFIG_FILES="$CONFIG_FILES otherlibs/dynlink/META" ;;
24897 "otherlibs/runtime_events/META") CONFIG_FILES="$CONFIG_FILES otherlibs/runtime_events/META" ;;
24898 "stdlib/META") CONFIG_FILES="$CONFIG_FILES stdlib/META" ;;
24899 "native-symlinks") CONFIG_COMMANDS="$CONFIG_COMMANDS native-symlinks" ;;
24900 "ocamldoc/META") CONFIG_FILES="$CONFIG_FILES ocamldoc/META" ;;
24901 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
24902 "$dldir/dynlink_cmo_format.mli") CONFIG_LINKS="$CONFIG_LINKS $dldir/dynlink_cmo_format.mli:file_formats/cmo_format.mli" ;;
24903 "$dldir/dynlink_cmxs_format.mli") CONFIG_LINKS="$CONFIG_LINKS $dldir/dynlink_cmxs_format.mli:file_formats/cmxs_format.mli" ;;
24904 "$dldir/dynlink_platform_intf.mli") CONFIG_LINKS="$CONFIG_LINKS $dldir/dynlink_platform_intf.mli:$dldir/dynlink_platform_intf.ml" ;;
24905 "otherlibs/unix/META") CONFIG_FILES="$CONFIG_FILES otherlibs/unix/META" ;;
24906 "otherlibs/unix/unix.ml") CONFIG_LINKS="$CONFIG_LINKS otherlibs/unix/unix.ml:otherlibs/unix/unix_${unix_or_win32}.ml" ;;
24907 "otherlibs/str/META") CONFIG_FILES="$CONFIG_FILES otherlibs/str/META" ;;
24908 "shebang") CONFIG_COMMANDS="$CONFIG_COMMANDS shebang" ;;
24909 "otherlibs/systhreads/META") CONFIG_FILES="$CONFIG_FILES otherlibs/systhreads/META" ;;
24910 "ocamltest/ocamltest_unix.ml") CONFIG_LINKS="$CONFIG_LINKS ocamltest/ocamltest_unix.ml:${ocamltest_unix_mod}" ;;
24911
24912 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
24913 esac
24914 done
24915
24916
24917 # If the user did not use the arguments to specify the items to instantiate,
24918 # then the envvar interface is used. Set only those that are not.
24919 # We use the long form for the default assignment because of an extremely
24920 # bizarre bug on SunOS 4.1.3.
24921 if $ac_need_defaults; then
24922 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files
24923 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers
24924 test ${CONFIG_LINKS+y} || CONFIG_LINKS=$config_links
24925 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands
24926 fi
24927
24928 # Have a temporary directory for convenience. Make it in the build tree
24929 # simply because there is no reason against having it here, and in addition,
24930 # creating and moving files from /tmp can sometimes cause problems.
24931 # Hook for its removal unless debugging.
24932 # Note that there is a small window in which the directory will not be cleaned:
24933 # after its creation but before its name has been assigned to `$tmp'.
24934 $debug ||
24935 {
24936 tmp= ac_tmp=
24937 trap 'exit_status=$?
24938 : "${ac_tmp:=$tmp}"
24939 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
24940 ' 0
24941 trap 'as_fn_exit 1' 1 2 13 15
24942 }
24943 # Create a (secure) tmp directory for tmp files.
24944
24945 {
24946 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
24947 test -d "$tmp"
24948 } ||
24949 {
24950 tmp=./conf$$-$RANDOM
24951 (umask 077 && mkdir "$tmp")
24952 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
24953 ac_tmp=$tmp
24954
24955 # Set up the scripts for CONFIG_FILES section.
24956 # No need to generate them if there are no CONFIG_FILES.
24957 # This happens for instance with `./config.status config.h'.
24958 if test -n "$CONFIG_FILES"; then
24959
24960
24961 ac_cr=`echo X | tr X '\015'`
24962 # On cygwin, bash can eat \r inside `` if the user requested igncr.
24963 # But we know of no other shell where ac_cr would be empty at this
24964 # point, so we can use a bashism as a fallback.
24965 if test "x$ac_cr" = x; then
24966 eval ac_cr=\$\'\\r\'
24967 fi
24968 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
24969 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
24970 ac_cs_awk_cr='\\r'
24971 else
24972 ac_cs_awk_cr=$ac_cr
24973 fi
24974
24975 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
24976 _ACEOF
24977
24978
24979 {
24980 echo "cat >conf$$subs.awk <<_ACEOF" &&
24981 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
24982 echo "_ACEOF"
24983 } >conf$$subs.sh ||
24984 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
24985 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
24986 ac_delim='%!_!# '
24987 for ac_last_try in false false false false false :; do
24988 . ./conf$$subs.sh ||
24989 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
24990
24991 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
24992 if test $ac_delim_n = $ac_delim_num; then
24993 break
24994 elif $ac_last_try; then
24995 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
24996 else
24997 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
24998 fi
24999 done
25000 rm -f conf$$subs.sh
25001
25002 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25003 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
25004 _ACEOF
25005 sed -n '
25006 h
25007 s/^/S["/; s/!.*/"]=/
25008 p
25009 g
25010 s/^[^!]*!//
25011 :repl
25012 t repl
25013 s/'"$ac_delim"'$//
25014 t delim
25015 :nl
25016 h
25017 s/\(.\{148\}\)..*/\1/
25018 t more1
25019 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
25020 p
25021 n
25022 b repl
25023 :more1
25024 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25025 p
25026 g
25027 s/.\{148\}//
25028 t nl
25029 :delim
25030 h
25031 s/\(.\{148\}\)..*/\1/
25032 t more2
25033 s/["\\]/\\&/g; s/^/"/; s/$/"/
25034 p
25035 b
25036 :more2
25037 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
25038 p
25039 g
25040 s/.\{148\}//
25041 t delim
25042 ' <conf$$subs.awk | sed '
25043 /^[^""]/{
25044 N
25045 s/\n//
25046 }
25047 ' >>$CONFIG_STATUS || ac_write_fail=1
25048 rm -f conf$$subs.awk
25049 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25050 _ACAWK
25051 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
25052 for (key in S) S_is_set[key] = 1
25053 FS = ""
25054
25055 }
25056 {
25057 line = $ 0
25058 nfields = split(line, field, "@")
25059 substed = 0
25060 len = length(field[1])
25061 for (i = 2; i < nfields; i++) {
25062 key = field[i]
25063 keylen = length(key)
25064 if (S_is_set[key]) {
25065 value = S[key]
25066 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
25067 len += length(value) + length(field[++i])
25068 substed = 1
25069 } else
25070 len += 1 + keylen
25071 }
25072
25073 print line
25074 }
25075
25076 _ACAWK
25077 _ACEOF
25078 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25079 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
25080 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
25081 else
25082 cat
25083 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
25084 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
25085 _ACEOF
25086
25087 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
25088 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
25089 # trailing colons and then remove the whole line if VPATH becomes empty
25090 # (actually we leave an empty line to preserve line numbers).
25091 if test "x$srcdir" = x.; then
25092 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
25093 h
25094 s///
25095 s/^/:/
25096 s/[ ]*$/:/
25097 s/:\$(srcdir):/:/g
25098 s/:\${srcdir}:/:/g
25099 s/:@srcdir@:/:/g
25100 s/^:*//
25101 s/:*$//
25102 x
25103 s/\(=[ ]*\).*/\1/
25104 G
25105 s/\n//
25106 s/^[^=]*=[ ]*$//
25107 }'
25108 fi
25109
25110 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25111 fi # test -n "$CONFIG_FILES"
25112
25113 # Set up the scripts for CONFIG_HEADERS section.
25114 # No need to generate them if there are no CONFIG_HEADERS.
25115 # This happens for instance with `./config.status Makefile'.
25116 if test -n "$CONFIG_HEADERS"; then
25117 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
25118 BEGIN {
25119 _ACEOF
25120
25121 # Transform confdefs.h into an awk script `defines.awk', embedded as
25122 # here-document in config.status, that substitutes the proper values into
25123 # config.h.in to produce config.h.
25124
25125 # Create a delimiter string that does not exist in confdefs.h, to ease
25126 # handling of long lines.
25127 ac_delim='%!_!# '
25128 for ac_last_try in false false :; do
25129 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
25130 if test -z "$ac_tt"; then
25131 break
25132 elif $ac_last_try; then
25133 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
25134 else
25135 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
25136 fi
25137 done
25138
25139 # For the awk script, D is an array of macro values keyed by name,
25140 # likewise P contains macro parameters if any. Preserve backslash
25141 # newline sequences.
25142
25143 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
25144 sed -n '
25145 s/.\{148\}/&'"$ac_delim"'/g
25146 t rset
25147 :rset
25148 s/^[ ]*#[ ]*define[ ][ ]*/ /
25149 t def
25150 d
25151 :def
25152 s/\\$//
25153 t bsnl
25154 s/["\\]/\\&/g
25155 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25156 D["\1"]=" \3"/p
25157 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
25158 d
25159 :bsnl
25160 s/["\\]/\\&/g
25161 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
25162 D["\1"]=" \3\\\\\\n"\\/p
25163 t cont
25164 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
25165 t cont
25166 d
25167 :cont
25168 n
25169 s/.\{148\}/&'"$ac_delim"'/g
25170 t clear
25171 :clear
25172 s/\\$//
25173 t bsnlc
25174 s/["\\]/\\&/g; s/^/"/; s/$/"/p
25175 d
25176 :bsnlc
25177 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
25178 b cont
25179 ' <confdefs.h | sed '
25180 s/'"$ac_delim"'/"\\\
25181 "/g' >>$CONFIG_STATUS || ac_write_fail=1
25182
25183 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25184 for (key in D) D_is_set[key] = 1
25185 FS = ""
25186 }
25187 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\r?\$)/ {
25188 line = \$ 0
25189 split(line, arg, /[ \r\t]/)
25190 if (arg[1] == "#") {
25191 defundef = arg[2]
25192 mac1 = arg[3]
25193 } else {
25194 defundef = substr(arg[1], 2)
25195 mac1 = arg[2]
25196 }
25197 split(mac1, mac2, "(") #)
25198 macro = mac2[1]
25199 prefix = substr(line, 1, index(line, defundef) - 1)
25200 if (D_is_set[macro]) {
25201 # Preserve the white space surrounding the "#".
25202 print prefix "define", macro P[macro] D[macro]
25203 next
25204 } else {
25205 # Replace #undef with comments. This is necessary, for example,
25206 # in the case of _POSIX_SOURCE, which is predefined and required
25207 # on some systems where configure will not decide to define it.
25208 if (defundef == "undef") {
25209 print "/*", prefix defundef, macro, "*/"
25210 next
25211 }
25212 }
25213 }
25214 { print }
25215 _ACAWK
25216 _ACEOF
25217 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25218 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
25219 fi # test -n "$CONFIG_HEADERS"
25220
25221
25222 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
25223 shift
25224 for ac_tag
25225 do
25226 case $ac_tag in
25227 :[FHLC]) ac_mode=$ac_tag; continue;;
25228 esac
25229 case $ac_mode$ac_tag in
25230 :[FHL]*:*);;
25231 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
25232 :[FH]-) ac_tag=-:-;;
25233 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
25234 esac
25235 ac_save_IFS=$IFS
25236 IFS=:
25237 set x $ac_tag
25238 IFS=$ac_save_IFS
25239 shift
25240 ac_file=$1
25241 shift
25242
25243 case $ac_mode in
25244 :L) ac_source=$1;;
25245 :[FH])
25246 ac_file_inputs=
25247 for ac_f
25248 do
25249 case $ac_f in
25250 -) ac_f="$ac_tmp/stdin";;
25251 *) # Look for the file first in the build tree, then in the source tree
25252 # (if the path is not absolute). The absolute path cannot be DOS-style,
25253 # because $ac_f cannot contain `:'.
25254 test -f "$ac_f" ||
25255 case $ac_f in
25256 [\\/$]*) false;;
25257 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
25258 esac ||
25259 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
25260 esac
25261 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
25262 as_fn_append ac_file_inputs " '$ac_f'"
25263 done
25264
25265 # Let's still pretend it is `configure' which instantiates (i.e., don't
25266 # use $as_me), people would be surprised to read:
25267 # /* config.h. Generated by config.status. */
25268 configure_input='Generated from '`
25269 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
25270 `' by configure.'
25271 if test x"$ac_file" != x-; then
25272 configure_input="$ac_file. $configure_input"
25273 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
25274 printf "%s\n" "$as_me: creating $ac_file" >&6;}
25275 fi
25276 # Neutralize special characters interpreted by sed in replacement strings.
25277 case $configure_input in #(
25278 *\&* | *\|* | *\\* )
25279 ac_sed_conf_input=`printf "%s\n" "$configure_input" |
25280 sed 's/[\\\\&|]/\\\\&/g'`;; #(
25281 *) ac_sed_conf_input=$configure_input;;
25282 esac
25283
25284 case $ac_tag in
25285 *:-:* | *:-) cat >"$ac_tmp/stdin" \
25286 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
25287 esac
25288 ;;
25289 esac
25290
25291 ac_dir=`$as_dirname -- "$ac_file" ||
25292 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25293 X"$ac_file" : 'X\(//\)[^/]' \| \
25294 X"$ac_file" : 'X\(//\)$' \| \
25295 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
25296 printf "%s\n" X"$ac_file" |
25297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
25298 s//\1/
25299 q
25300 }
25301 /^X\(\/\/\)[^/].*/{
25302 s//\1/
25303 q
25304 }
25305 /^X\(\/\/\)$/{
25306 s//\1/
25307 q
25308 }
25309 /^X\(\/\).*/{
25310 s//\1/
25311 q
25312 }
25313 s/.*/./; q'`
25314 as_dir="$ac_dir"; as_fn_mkdir_p
25315 ac_builddir=.
25316
25317 case "$ac_dir" in
25318 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
25319 *)
25320 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'`
25321 # A ".." for each directory in $ac_dir_suffix.
25322 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
25323 case $ac_top_builddir_sub in
25324 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
25325 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
25326 esac ;;
25327 esac
25328 ac_abs_top_builddir=$ac_pwd
25329 ac_abs_builddir=$ac_pwd$ac_dir_suffix
25330 # for backward compatibility:
25331 ac_top_builddir=$ac_top_build_prefix
25332
25333 case $srcdir in
25334 .) # We are building in place.
25335 ac_srcdir=.
25336 ac_top_srcdir=$ac_top_builddir_sub
25337 ac_abs_top_srcdir=$ac_pwd ;;
25338 [\\/]* | ?:[\\/]* ) # Absolute name.
25339 ac_srcdir=$srcdir$ac_dir_suffix;
25340 ac_top_srcdir=$srcdir
25341 ac_abs_top_srcdir=$srcdir ;;
25342 *) # Relative name.
25343 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
25344 ac_top_srcdir=$ac_top_build_prefix$srcdir
25345 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
25346 esac
25347 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
25348
25349
25350 case $ac_mode in
25351 :F)
25352 #
25353 # CONFIG_FILE
25354 #
25355
25356 case $INSTALL in
25357 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25358 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
25359 esac
25360 _ACEOF
25361
25362 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25363 # If the template does not know about datarootdir, expand it.
25364 # FIXME: This hack should be removed a few years after 2.60.
25365 ac_datarootdir_hack=; ac_datarootdir_seen=
25366 ac_sed_dataroot='
25367 /datarootdir/ {
25368 p
25369 q
25370 }
25371 /@datadir@/p
25372 /@docdir@/p
25373 /@infodir@/p
25374 /@localedir@/p
25375 /@mandir@/p'
25376 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
25377 *datarootdir*) ac_datarootdir_seen=yes;;
25378 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
25379 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
25380 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
25381 _ACEOF
25382 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25383 ac_datarootdir_hack='
25384 s&@datadir@&$datadir&g
25385 s&@docdir@&$docdir&g
25386 s&@infodir@&$infodir&g
25387 s&@localedir@&$localedir&g
25388 s&@mandir@&$mandir&g
25389 s&\\\${datarootdir}&$datarootdir&g' ;;
25390 esac
25391 _ACEOF
25392
25393 # Neutralize VPATH when `$srcdir' = `.'.
25394 # Shell code in configure.ac might set extrasub.
25395 # FIXME: do we really want to maintain this feature?
25396 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
25397 ac_sed_extra="$ac_vpsub
25398 $extrasub
25399 _ACEOF
25400 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25401 :t
25402 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25403 s|@configure_input@|$ac_sed_conf_input|;t t
25404 s&@top_builddir@&$ac_top_builddir_sub&;t t
25405 s&@top_build_prefix@&$ac_top_build_prefix&;t t
25406 s&@srcdir@&$ac_srcdir&;t t
25407 s&@abs_srcdir@&$ac_abs_srcdir&;t t
25408 s&@top_srcdir@&$ac_top_srcdir&;t t
25409 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
25410 s&@builddir@&$ac_builddir&;t t
25411 s&@abs_builddir@&$ac_abs_builddir&;t t
25412 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
25413 s&@INSTALL@&$ac_INSTALL&;t t
25414 $ac_datarootdir_hack
25415 "
25416 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
25417 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25418
25419 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
25420 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
25421 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
25422 "$ac_tmp/out"`; test -z "$ac_out"; } &&
25423 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25424 which seems to be undefined. Please make sure it is defined" >&5
25425 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
25426 which seems to be undefined. Please make sure it is defined" >&2;}
25427
25428 rm -f "$ac_tmp/stdin"
25429 case $ac_file in
25430 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
25431 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
25432 esac \
25433 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25434 ;;
25435 :H)
25436 #
25437 # CONFIG_HEADER
25438 #
25439 if test x"$ac_file" != x-; then
25440 {
25441 printf "%s\n" "/* $configure_input */" >&1 \
25442 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
25443 } >"$ac_tmp/config.h" \
25444 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25445 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
25446 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
25447 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;}
25448 else
25449 rm -f "$ac_file"
25450 mv "$ac_tmp/config.h" "$ac_file" \
25451 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
25452 fi
25453 else
25454 printf "%s\n" "/* $configure_input */" >&1 \
25455 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
25456 || as_fn_error $? "could not create -" "$LINENO" 5
25457 fi
25458 ;;
25459 :L)
25460 #
25461 # CONFIG_LINK
25462 #
25463
25464 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
25465 :
25466 else
25467 # Prefer the file from the source tree if names are identical.
25468 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
25469 ac_source=$srcdir/$ac_source
25470 fi
25471
25472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
25473 printf "%s\n" "$as_me: linking $ac_source to $ac_file" >&6;}
25474
25475 if test ! -r "$ac_source"; then
25476 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
25477 fi
25478 rm -f "$ac_file"
25479
25480 # Try a relative symlink, then a hard link, then a copy.
25481 case $ac_source in
25482 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
25483 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
25484 esac
25485 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
25486 ln "$ac_source" "$ac_file" 2>/dev/null ||
25487 cp -p "$ac_source" "$ac_file" ||
25488 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
25489 fi
25490 ;;
25491 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
25492 printf "%s\n" "$as_me: executing $ac_file commands" >&6;}
25493 ;;
25494 esac
25495
25496
25497 case $ac_file$ac_mode in
25498 "libtool":C)
25499
25500 # See if we are running on zsh, and set the options that allow our
25501 # commands through without removal of \ escapes.
25502 if test -n "${ZSH_VERSION+set}"; then
25503 setopt NO_GLOB_SUBST
25504 fi
25505
25506 cfgfile=${ofile}T
25507 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
25508 $RM "$cfgfile"
25509
25510 cat <<_LT_EOF >> "$cfgfile"
25511 #! $SHELL
25512 # Generated automatically by $as_me ($PACKAGE) $VERSION
25513 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
25514
25515 # Provide generalized library-building support services.
25516 # Written by Gordon Matzigkeit, 1996
25517
25518 # Copyright (C) 2024 Free Software Foundation, Inc.
25519 # This is free software; see the source for copying conditions. There is NO
25520 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25521
25522 # GNU Libtool is free software; you can redistribute it and/or modify
25523 # it under the terms of the GNU General Public License as published by
25524 # the Free Software Foundation; either version 2 of the License, or
25525 # (at your option) any later version.
25526 #
25527 # As a special exception to the GNU General Public License, if you
25528 # distribute this file as part of a program or library that is built
25529 # using GNU Libtool, you may include this file under the same
25530 # distribution terms that you use for the rest of that program.
25531 #
25532 # GNU Libtool is distributed in the hope that it will be useful, but
25533 # WITHOUT ANY WARRANTY; without even the implied warranty of
25534 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25535 # GNU General Public License for more details.
25536 #
25537 # You should have received a copy of the GNU General Public License
25538 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25539
25540
25541 # The names of the tagged configurations supported by this script.
25542 available_tags=''
25543
25544 # Configured defaults for sys_lib_dlsearch_path munging.
25545 : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
25546
25547 # ### BEGIN LIBTOOL CONFIG
25548
25549 # Which release of libtool.m4 was used?
25550 macro_version=$macro_version
25551 macro_revision=$macro_revision
25552
25553 # Whether or not to build shared libraries.
25554 build_libtool_libs=$enable_shared
25555
25556 # Whether or not to build static libraries.
25557 build_old_libs=$enable_static
25558
25559 # What type of objects to build.
25560 pic_mode=$pic_mode
25561
25562 # Whether or not to optimize for fast installation.
25563 fast_install=$enable_fast_install
25564
25565 # Shared archive member basename,for filename based shared library versioning on AIX.
25566 shared_archive_member_spec=$shared_archive_member_spec
25567
25568 # Shell to use when invoking shell scripts.
25569 SHELL=$lt_SHELL
25570
25571 # An echo program that protects backslashes.
25572 ECHO=$lt_ECHO
25573
25574 # The PATH separator for the build system.
25575 PATH_SEPARATOR=$lt_PATH_SEPARATOR
25576
25577 # The host system.
25578 host_alias=$host_alias
25579 host=$host
25580 host_os=$host_os
25581
25582 # The build system.
25583 build_alias=$build_alias
25584 build=$build
25585 build_os=$build_os
25586
25587 # A sed program that does not truncate output.
25588 SED=$lt_SED
25589
25590 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
25591 Xsed="\$SED -e 1s/^X//"
25592
25593 # A grep program that handles long lines.
25594 GREP=$lt_GREP
25595
25596 # An ERE matcher.
25597 EGREP=$lt_EGREP
25598
25599 # A literal string matcher.
25600 FGREP=$lt_FGREP
25601
25602 # A BSD- or MS-compatible name lister.
25603 NM=$lt_NM
25604
25605 # Whether we need soft or hard links.
25606 LN_S=$lt_LN_S
25607
25608 # What is the maximum length of a command?
25609 max_cmd_len=$max_cmd_len
25610
25611 # Object file suffix (normally "o").
25612 objext=$ac_objext
25613
25614 # Executable file suffix (normally "").
25615 exeext=$exeext
25616
25617 # whether the shell understands "unset".
25618 lt_unset=$lt_unset
25619
25620 # turn spaces into newlines.
25621 SP2NL=$lt_lt_SP2NL
25622
25623 # turn newlines into spaces.
25624 NL2SP=$lt_lt_NL2SP
25625
25626 # convert \$build file names to \$host format.
25627 to_host_file_cmd=$lt_cv_to_host_file_cmd
25628
25629 # convert \$build files to toolchain format.
25630 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
25631
25632 # A file(cmd) program that detects file types.
25633 FILECMD=$lt_FILECMD
25634
25635 # An object symbol dumper.
25636 OBJDUMP=$lt_OBJDUMP
25637
25638 # Method to check whether dependent libraries are shared objects.
25639 deplibs_check_method=$lt_deplibs_check_method
25640
25641 # Command to use when deplibs_check_method = "file_magic".
25642 file_magic_cmd=$lt_file_magic_cmd
25643
25644 # How to find potential files when deplibs_check_method = "file_magic".
25645 file_magic_glob=$lt_file_magic_glob
25646
25647 # Find potential files using nocaseglob when deplibs_check_method = "file_magic".
25648 want_nocaseglob=$lt_want_nocaseglob
25649
25650 # DLL creation program.
25651 DLLTOOL=$lt_DLLTOOL
25652
25653 # Command to associate shared and link libraries.
25654 sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd
25655
25656 # The archiver.
25657 AR=$lt_AR
25658
25659 # Flags to create an archive (by configure).
25660 lt_ar_flags=$lt_ar_flags
25661
25662 # Flags to create an archive.
25663 AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
25664
25665 # How to feed a file listing to the archiver.
25666 archiver_list_spec=$lt_archiver_list_spec
25667
25668 # A symbol stripping program.
25669 STRIP=$lt_STRIP
25670
25671 # Commands used to install an old-style archive.
25672 RANLIB=$lt_RANLIB
25673 old_postinstall_cmds=$lt_old_postinstall_cmds
25674 old_postuninstall_cmds=$lt_old_postuninstall_cmds
25675
25676 # Whether to use a lock for old archive extraction.
25677 lock_old_archive_extraction=$lock_old_archive_extraction
25678
25679 # A C compiler.
25680 LTCC=$lt_CC
25681
25682 # LTCC compiler flags.
25683 LTCFLAGS=$lt_CFLAGS
25684
25685 # Take the output of nm and produce a listing of raw symbols and C names.
25686 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
25687
25688 # Transform the output of nm in a proper C declaration.
25689 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
25690
25691 # Transform the output of nm into a list of symbols to manually relocate.
25692 global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
25693
25694 # Transform the output of nm in a C name address pair.
25695 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
25696
25697 # Transform the output of nm in a C name address pair when lib prefix is needed.
25698 global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
25699
25700 # The name lister interface.
25701 nm_interface=$lt_lt_cv_nm_interface
25702
25703 # Specify filename containing input files for \$NM.
25704 nm_file_list_spec=$lt_nm_file_list_spec
25705
25706 # The root where to search for dependent libraries,and where our libraries should be installed.
25707 lt_sysroot=$lt_sysroot
25708
25709 # Command to truncate a binary pipe.
25710 lt_truncate_bin=$lt_lt_cv_truncate_bin
25711
25712 # The name of the directory that contains temporary libtool files.
25713 objdir=$objdir
25714
25715 # Used to examine libraries when file_magic_cmd begins with "file".
25716 MAGIC_CMD=$MAGIC_CMD
25717
25718 # Must we lock files when doing compilation?
25719 need_locks=$lt_need_locks
25720
25721 # Manifest tool.
25722 MANIFEST_TOOL=$lt_MANIFEST_TOOL
25723
25724 # Tool to manipulate archived DWARF debug symbol files on Mac OS X.
25725 DSYMUTIL=$lt_DSYMUTIL
25726
25727 # Tool to change global to local symbols on Mac OS X.
25728 NMEDIT=$lt_NMEDIT
25729
25730 # Tool to manipulate fat objects and archives on Mac OS X.
25731 LIPO=$lt_LIPO
25732
25733 # ldd/readelf like tool for Mach-O binaries on Mac OS X.
25734 OTOOL=$lt_OTOOL
25735
25736 # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
25737 OTOOL64=$lt_OTOOL64
25738
25739 # Old archive suffix (normally "a").
25740 libext=$libext
25741
25742 # Shared library suffix (normally ".so").
25743 shrext_cmds=$lt_shrext_cmds
25744
25745 # The commands to extract the exported symbol list from a shared archive.
25746 extract_expsyms_cmds=$lt_extract_expsyms_cmds
25747
25748 # Variables whose values should be saved in libtool wrapper scripts and
25749 # restored at link time.
25750 variables_saved_for_relink=$lt_variables_saved_for_relink
25751
25752 # Do we need the "lib" prefix for modules?
25753 need_lib_prefix=$need_lib_prefix
25754
25755 # Do we need a version for libraries?
25756 need_version=$need_version
25757
25758 # Library versioning type.
25759 version_type=$version_type
25760
25761 # Shared library runtime path variable.
25762 runpath_var=$runpath_var
25763
25764 # Shared library path variable.
25765 shlibpath_var=$shlibpath_var
25766
25767 # Is shlibpath searched before the hard-coded library search path?
25768 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
25769
25770 # Format of library name prefix.
25771 libname_spec=$lt_libname_spec
25772
25773 # List of archive names. First name is the real one, the rest are links.
25774 # The last name is the one that the linker finds with -lNAME
25775 library_names_spec=$lt_library_names_spec
25776
25777 # The coded name of the library, if different from the real name.
25778 soname_spec=$lt_soname_spec
25779
25780 # Permission mode override for installation of shared libraries.
25781 install_override_mode=$lt_install_override_mode
25782
25783 # Command to use after installation of a shared archive.
25784 postinstall_cmds=$lt_postinstall_cmds
25785
25786 # Command to use after uninstallation of a shared archive.
25787 postuninstall_cmds=$lt_postuninstall_cmds
25788
25789 # Commands used to finish a libtool library installation in a directory.
25790 finish_cmds=$lt_finish_cmds
25791
25792 # As "finish_cmds", except a single script fragment to be evaled but
25793 # not shown.
25794 finish_eval=$lt_finish_eval
25795
25796 # Whether we should hardcode library paths into libraries.
25797 hardcode_into_libs=$hardcode_into_libs
25798
25799 # Compile-time system search path for libraries.
25800 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
25801
25802 # Detected run-time system search path for libraries.
25803 sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
25804
25805 # Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
25806 configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
25807
25808 # Whether dlopen is supported.
25809 dlopen_support=$enable_dlopen
25810
25811 # Whether dlopen of programs is supported.
25812 dlopen_self=$enable_dlopen_self
25813
25814 # Whether dlopen of statically linked programs is supported.
25815 dlopen_self_static=$enable_dlopen_self_static
25816
25817 # Commands to strip libraries.
25818 old_striplib=$lt_old_striplib
25819 striplib=$lt_striplib
25820
25821
25822 # The linker used to build libraries.
25823 LD=$lt_LD
25824
25825 # How to create reloadable object files.
25826 reload_flag=$lt_reload_flag
25827 reload_cmds=$lt_reload_cmds
25828
25829 # Commands used to build an old-style archive.
25830 old_archive_cmds=$lt_old_archive_cmds
25831
25832 # A language specific compiler.
25833 CC=$lt_compiler
25834
25835 # Is the compiler the GNU compiler?
25836 with_gcc=$GCC
25837
25838 # Compiler flag to turn off builtin functions.
25839 no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
25840
25841 # Additional compiler flags for building library objects.
25842 pic_flag=$lt_lt_prog_compiler_pic
25843
25844 # How to pass a linker flag through the compiler.
25845 wl=$lt_lt_prog_compiler_wl
25846
25847 # Compiler flag to prevent dynamic linking.
25848 link_static_flag=$lt_lt_prog_compiler_static
25849
25850 # Does compiler simultaneously support -c and -o options?
25851 compiler_c_o=$lt_lt_cv_prog_compiler_c_o
25852
25853 # Whether or not to add -lc for building shared libraries.
25854 build_libtool_need_lc=$archive_cmds_need_lc
25855
25856 # Whether or not to disallow shared libs when runtime libs are static.
25857 allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
25858
25859 # Compiler flag to allow reflexive dlopens.
25860 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
25861
25862 # Compiler flag to generate shared objects directly from archives.
25863 whole_archive_flag_spec=$lt_whole_archive_flag_spec
25864
25865 # Whether the compiler copes with passing no objects directly.
25866 compiler_needs_object=$lt_compiler_needs_object
25867
25868 # Create an old-style archive from a shared archive.
25869 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
25870
25871 # Create a temporary old-style archive to link instead of a shared archive.
25872 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
25873
25874 # Commands used to build a shared archive.
25875 archive_cmds=$lt_archive_cmds
25876 archive_expsym_cmds=$lt_archive_expsym_cmds
25877
25878 # Commands used to build a loadable module if different from building
25879 # a shared archive.
25880 module_cmds=$lt_module_cmds
25881 module_expsym_cmds=$lt_module_expsym_cmds
25882
25883 # Whether we are building with GNU ld or not.
25884 with_gnu_ld=$lt_with_gnu_ld
25885
25886 # Flag that allows shared libraries with undefined symbols to be built.
25887 allow_undefined_flag=$lt_allow_undefined_flag
25888
25889 # Flag that enforces no undefined symbols.
25890 no_undefined_flag=$lt_no_undefined_flag
25891
25892 # Flag to hardcode \$libdir into a binary during linking.
25893 # This must work even if \$libdir does not exist
25894 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
25895
25896 # Whether we need a single "-rpath" flag with a separated argument.
25897 hardcode_libdir_separator=$lt_hardcode_libdir_separator
25898
25899 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
25900 # DIR into the resulting binary.
25901 hardcode_direct=$hardcode_direct
25902
25903 # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
25904 # DIR into the resulting binary and the resulting library dependency is
25905 # "absolute",i.e. impossible to change by setting \$shlibpath_var if the
25906 # library is relocated.
25907 hardcode_direct_absolute=$hardcode_direct_absolute
25908
25909 # Set to "yes" if using the -LDIR flag during linking hardcodes DIR
25910 # into the resulting binary.
25911 hardcode_minus_L=$hardcode_minus_L
25912
25913 # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
25914 # into the resulting binary.
25915 hardcode_shlibpath_var=$hardcode_shlibpath_var
25916
25917 # Set to "yes" if building a shared library automatically hardcodes DIR
25918 # into the library and all subsequent libraries and executables linked
25919 # against it.
25920 hardcode_automatic=$hardcode_automatic
25921
25922 # Set to yes if linker adds runtime paths of dependent libraries
25923 # to runtime path list.
25924 inherit_rpath=$inherit_rpath
25925
25926 # Whether libtool must link a program against all its dependency libraries.
25927 link_all_deplibs=$link_all_deplibs
25928
25929 # Set to "yes" if exported symbols are required.
25930 always_export_symbols=$always_export_symbols
25931
25932 # The commands to list exported symbols.
25933 export_symbols_cmds=$lt_export_symbols_cmds
25934
25935 # Symbols that should not be listed in the preloaded symbols.
25936 exclude_expsyms=$lt_exclude_expsyms
25937
25938 # Symbols that must always be exported.
25939 include_expsyms=$lt_include_expsyms
25940
25941 # Commands necessary for linking programs (against libraries) with templates.
25942 prelink_cmds=$lt_prelink_cmds
25943
25944 # Commands necessary for finishing linking programs.
25945 postlink_cmds=$lt_postlink_cmds
25946
25947 # Specify filename containing input files.
25948 file_list_spec=$lt_file_list_spec
25949
25950 # How to hardcode a shared library path into an executable.
25951 hardcode_action=$hardcode_action
25952
25953 # ### END LIBTOOL CONFIG
25954
25955 _LT_EOF
25956
25957 cat <<'_LT_EOF' >> "$cfgfile"
25958
25959 # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
25960
25961 # func_munge_path_list VARIABLE PATH
25962 # -----------------------------------
25963 # VARIABLE is name of variable containing _space_ separated list of
25964 # directories to be munged by the contents of PATH, which is string
25965 # having a format:
25966 # "DIR[:DIR]:"
25967 # string "DIR[ DIR]" will be prepended to VARIABLE
25968 # ":DIR[:DIR]"
25969 # string "DIR[ DIR]" will be appended to VARIABLE
25970 # "DIRP[:DIRP]::[DIRA:]DIRA"
25971 # string "DIRP[ DIRP]" will be prepended to VARIABLE and string
25972 # "DIRA[ DIRA]" will be appended to VARIABLE
25973 # "DIR[:DIR]"
25974 # VARIABLE will be replaced by "DIR[ DIR]"
25975 func_munge_path_list ()
25976 {
25977 case x$2 in
25978 x)
25979 ;;
25980 *:)
25981 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
25982 ;;
25983 x:*)
25984 eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
25985 ;;
25986 *::*)
25987 eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
25988 eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
25989 ;;
25990 *)
25991 eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
25992 ;;
25993 esac
25994 }
25995
25996
25997 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
25998 func_cc_basename ()
25999 {
26000 for cc_temp in $*""; do
26001 case $cc_temp in
26002 compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
26003 distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
26004 \-*) ;;
26005 *) break;;
26006 esac
26007 done
26008 func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
26009 }
26010
26011
26012 # ### END FUNCTIONS SHARED WITH CONFIGURE
26013
26014 _LT_EOF
26015
26016 case $host_os in
26017 aix3*)
26018 cat <<\_LT_EOF >> "$cfgfile"
26019 # AIX sometimes has problems with the GCC collect2 program. For some
26020 # reason, if we set the COLLECT_NAMES environment variable, the problems
26021 # vanish in a puff of smoke.
26022 if test set != "${COLLECT_NAMES+set}"; then
26023 COLLECT_NAMES=
26024 export COLLECT_NAMES
26025 fi
26026 _LT_EOF
26027 ;;
26028 esac
26029
26030
26031
26032 ltmain=$ac_aux_dir/ltmain.sh
26033
26034
26035 # We use sed instead of cat because bash on DJGPP gets confused if
26036 # if finds mixed CR/LF and LF-only lines. Since sed operates in
26037 # text mode, it properly converts lines to CR/LF. This bash problem
26038 # is reportedly fixed, but why not run on old versions too?
26039 $SED '$q' "$ltmain" >> "$cfgfile" \
26040 || (rm -f "$cfgfile"; exit 1)
26041
26042 mv -f "$cfgfile" "$ofile" ||
26043 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
26044 chmod +x "$ofile"
26045
26046 ;;
26047 "shebang":C) printf '%s\n%s\000\n' "$launch_method" "$ocaml_bindir" \
26048 > stdlib/runtime.info
26049 printf '%s\n%s\000\n' "$target_launch_method" "$TARGET_BINDIR" \
26050 > stdlib/target_runtime.info ;;
26051
26052 esac
26053 done # for ac_tag
26054
26055
26056 as_fn_exit 0
26057 _ACEOF
26058 ac_clean_files=$ac_clean_files_save
26059
26060 test $ac_write_fail = 0 ||
26061 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
26062
26063
26064 # configure is writing to config.log, and then calls config.status.
26065 # config.status does its own redirection, appending to config.log.
26066 # Unfortunately, on DOS this fails, as config.log is still kept open
26067 # by configure, so config.status won't be able to write to it; its
26068 # output is simply discarded. So we exec the FD to /dev/null,
26069 # effectively closing config.log, so it can be properly (re)opened and
26070 # appended to by config.status. When coming back to configure, we
26071 # need to make the FD available again.
26072 if test "$no_create" != yes; then
26073 ac_cs_success=:
26074 ac_config_status_args=
26075 test "$silent" = yes &&
26076 ac_config_status_args="$ac_config_status_args --quiet"
26077 exec 5>/dev/null
26078 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
26079 exec 5>>config.log
26080 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26081 # would make configure fail if this is the last instruction.
26082 $ac_cs_success || as_fn_exit 1
26083 fi
26084 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26086 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26087 fi
26088
26089