gdb: defer commit resume until all available events are consumed
[deliverable/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="main.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 enable_option_checking=no
623 ac_header_list=
624 ac_subst_vars='LTLIBOBJS
625 LIBOBJS
626 GCORE_TRANSFORM_NAME
627 GDB_TRANSFORM_NAME
628 XSLTPROC
629 NM_H
630 GDB_NM_FILE
631 LTLIBXXHASH
632 LIBXXHASH
633 HAVE_LIBXXHASH
634 CTF_DEPS
635 LIBCTF
636 ENABLE_LIBCTF
637 LTLIBBABELTRACE
638 LIBBABELTRACE
639 HAVE_LIBBABELTRACE
640 HAVE_NATIVE_GCORE_HOST
641 NAT_GENERATED_FILES
642 XM_CLIBS
643 MH_CFLAGS
644 LOADLIBES
645 NAT_CDEPS
646 NATDEPFILES
647 NAT_FILE
648 target_subdir
649 CONFIG_UNINSTALL
650 CONFIG_INSTALL
651 CONFIG_CLEAN
652 CONFIG_ALL
653 CONFIG_SRCS
654 CONFIG_DEPS
655 CONFIG_OBS
656 PROFILE_CFLAGS
657 ENABLE_CFLAGS
658 SIM_OBS
659 SIM
660 XMKMF
661 GDBTK_SRC_DIR
662 GDBTK_CFLAGS
663 GDBTKLIBS
664 X_LIBS
665 X_LDFLAGS
666 X_CFLAGS
667 TK_XINCLUDES
668 TK_DEPS
669 TK_LIBRARY
670 TK_INCLUDE
671 TK_STUB_LIB_SPEC
672 TK_STUB_LIB_FLAG
673 TK_STUB_LIB_FILE
674 TK_LIB_SPEC
675 TK_LIB_FLAG
676 TK_LIB_FILE
677 TK_SRC_DIR
678 TK_BIN_DIR
679 TK_VERSION
680 TCL_DEPS
681 TCL_LIBRARY
682 TCL_INCLUDE
683 TCL_STUB_LIB_SPEC
684 TCL_STUB_LIB_FLAG
685 TCL_STUB_LIB_FILE
686 TCL_LIB_SPEC
687 TCL_LIB_FLAG
688 TCL_LIB_FILE
689 TCL_SRC_DIR
690 TCL_BIN_DIR
691 TCL_PATCH_LEVEL
692 TCL_VERSION
693 WIN32LDAPP
694 WIN32LIBS
695 GUI_CFLAGS_X
696 LIBGUI
697 LTLIBLZMA
698 LIBLZMA
699 HAVE_LIBLZMA
700 SER_HARDWIRE
701 WERROR_CFLAGS
702 WARN_CFLAGS
703 SYSTEM_GDBINIT_DIR
704 SYSTEM_GDBINIT
705 TARGET_SYSTEM_ROOT
706 CONFIG_LDFLAGS
707 RDYNAMIC
708 LTLIBIPT
709 LIBIPT
710 HAVE_LIBIPT
711 PTHREAD_CFLAGS
712 PTHREAD_LIBS
713 PTHREAD_CC
714 ax_pthread_config
715 SED
716 ALLOCA
717 SRCHIGH_CFLAGS
718 SRCHIGH_LIBS
719 HAVE_GUILE_FALSE
720 HAVE_GUILE_TRUE
721 GUILE_LIBS
722 GUILE_CPPFLAGS
723 GUILD_TARGET_FLAG
724 GUILD
725 pkg_config_prog_path
726 HAVE_PYTHON_FALSE
727 HAVE_PYTHON_TRUE
728 PYTHON_LIBS
729 PYTHON_CPPFLAGS
730 PYTHON_CFLAGS
731 python_prog_path
732 LTLIBMPFR
733 LIBMPFR
734 HAVE_LIBMPFR
735 LTLIBEXPAT
736 LIBEXPAT
737 HAVE_LIBEXPAT
738 JIT_READER_DIR
739 TARGET_PTR
740 READLINE_TEXI_INCFLAG
741 READLINE_CFLAGS
742 READLINE_DEPS
743 READLINE
744 LTLIBICONV
745 LIBICONV
746 zlibinc
747 zlibdir
748 MIG
749 WINDRES
750 DLLTOOL
751 AR
752 YFLAGS
753 YACC
754 RANLIB
755 LN_S
756 INSTALL_DATA
757 INSTALL_SCRIPT
758 INSTALL_PROGRAM
759 AWK
760 REPORT_BUGS_TEXI
761 REPORT_BUGS_TO
762 PKGVERSION
763 CODESIGN_CERT
764 LIBDEBUGINFOD
765 HAVE_NATIVE_GCORE_TARGET
766 TARGET_OBS
767 subdirs
768 GDB_DATADIR
769 DEBUGDIR
770 MAKEINFO_EXTRA_FLAGS
771 MAKEINFOFLAGS
772 MAKEINFO
773 PACKAGE
774 CATOBJEXT
775 GENCAT
776 INSTOBJEXT
777 DATADIRNAME
778 CATALOGS
779 POSUB
780 GMSGFMT
781 XGETTEXT
782 INCINTL
783 LIBINTL_DEP
784 LIBINTL
785 USE_NLS
786 CCDEPMODE
787 DEPDIR
788 am__leading_dot
789 CXX_DIALECT
790 HAVE_CXX11
791 INSTALL_STRIP_PROGRAM
792 STRIP
793 install_sh
794 target_os
795 target_vendor
796 target_cpu
797 target
798 host_os
799 host_vendor
800 host_cpu
801 host
802 build_os
803 build_vendor
804 build_cpu
805 build
806 EGREP
807 GREP
808 CPP
809 ac_ct_CXX
810 CXXFLAGS
811 CXX
812 OBJEXT
813 EXEEXT
814 ac_ct_CC
815 CPPFLAGS
816 LDFLAGS
817 CFLAGS
818 CC
819 MAINT
820 MAINTAINER_MODE_FALSE
821 MAINTAINER_MODE_TRUE
822 target_alias
823 host_alias
824 build_alias
825 LIBS
826 ECHO_T
827 ECHO_N
828 ECHO_C
829 DEFS
830 mandir
831 localedir
832 libdir
833 psdir
834 pdfdir
835 dvidir
836 htmldir
837 infodir
838 docdir
839 oldincludedir
840 includedir
841 localstatedir
842 sharedstatedir
843 sysconfdir
844 datadir
845 datarootdir
846 libexecdir
847 sbindir
848 bindir
849 program_transform_name
850 prefix
851 exec_prefix
852 PACKAGE_URL
853 PACKAGE_BUGREPORT
854 PACKAGE_STRING
855 PACKAGE_VERSION
856 PACKAGE_TARNAME
857 PACKAGE_NAME
858 PATH_SEPARATOR
859 SHELL'
860 ac_subst_files='nat_makefile_frag'
861 ac_user_opts='
862 enable_option_checking
863 enable_maintainer_mode
864 enable_plugins
865 enable_largefile
866 with_separate_debug_dir
867 with_gdb_datadir
868 with_relocated_sources
869 with_auto_load_dir
870 with_auto_load_safe_path
871 enable_targets
872 enable_64_bit_bfd
873 enable_gdbmi
874 enable_tui
875 enable_gdbtk
876 with_debuginfod
877 with_libunwind_ia64
878 with_curses
879 enable_profiling
880 enable_codesign
881 with_pkgversion
882 with_bugurl
883 with_system_zlib
884 with_gnu_ld
885 enable_rpath
886 with_libiconv_prefix
887 with_libiconv_type
888 with_iconv_bin
889 with_system_readline
890 with_jit_reader_dir
891 with_expat
892 with_libexpat_prefix
893 with_libexpat_type
894 with_mpfr
895 with_libmpfr_prefix
896 with_libmpfr_type
897 with_python
898 with_python_libdir
899 with_guile
900 enable_source_highlight
901 with_intel_pt
902 with_libipt_prefix
903 with_libipt_type
904 with_included_regex
905 with_sysroot
906 with_system_gdbinit
907 with_system_gdbinit_dir
908 enable_werror
909 enable_build_warnings
910 enable_gdb_build_warnings
911 enable_ubsan
912 with_lzma
913 with_liblzma_prefix
914 with_liblzma_type
915 with_tcl
916 with_tk
917 with_x
918 enable_sim
919 with_babeltrace
920 with_libbabeltrace_prefix
921 with_libbabeltrace_type
922 with_xxhash
923 enable_libctf
924 with_libxxhash_prefix
925 with_libxxhash_type
926 enable_unit_tests
927 '
928 ac_precious_vars='build_alias
929 host_alias
930 target_alias
931 CC
932 CFLAGS
933 LDFLAGS
934 LIBS
935 CPPFLAGS
936 CXX
937 CXXFLAGS
938 CCC
939 CPP
940 MAKEINFO
941 MAKEINFOFLAGS
942 YACC
943 YFLAGS
944 XMKMF'
945 ac_subdirs_all='testsuite
946 gdbtk'
947
948 # Initialize some variables set by options.
949 ac_init_help=
950 ac_init_version=false
951 ac_unrecognized_opts=
952 ac_unrecognized_sep=
953 # The variables have the same names as the options, with
954 # dashes changed to underlines.
955 cache_file=/dev/null
956 exec_prefix=NONE
957 no_create=
958 no_recursion=
959 prefix=NONE
960 program_prefix=NONE
961 program_suffix=NONE
962 program_transform_name=s,x,x,
963 silent=
964 site=
965 srcdir=
966 verbose=
967 x_includes=NONE
968 x_libraries=NONE
969
970 # Installation directory options.
971 # These are left unexpanded so users can "make install exec_prefix=/foo"
972 # and all the variables that are supposed to be based on exec_prefix
973 # by default will actually change.
974 # Use braces instead of parens because sh, perl, etc. also accept them.
975 # (The list follows the same order as the GNU Coding Standards.)
976 bindir='${exec_prefix}/bin'
977 sbindir='${exec_prefix}/sbin'
978 libexecdir='${exec_prefix}/libexec'
979 datarootdir='${prefix}/share'
980 datadir='${datarootdir}'
981 sysconfdir='${prefix}/etc'
982 sharedstatedir='${prefix}/com'
983 localstatedir='${prefix}/var'
984 includedir='${prefix}/include'
985 oldincludedir='/usr/include'
986 docdir='${datarootdir}/doc/${PACKAGE}'
987 infodir='${datarootdir}/info'
988 htmldir='${docdir}'
989 dvidir='${docdir}'
990 pdfdir='${docdir}'
991 psdir='${docdir}'
992 libdir='${exec_prefix}/lib'
993 localedir='${datarootdir}/locale'
994 mandir='${datarootdir}/man'
995
996 ac_prev=
997 ac_dashdash=
998 for ac_option
999 do
1000 # If the previous option needs an argument, assign it.
1001 if test -n "$ac_prev"; then
1002 eval $ac_prev=\$ac_option
1003 ac_prev=
1004 continue
1005 fi
1006
1007 case $ac_option in
1008 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1009 *=) ac_optarg= ;;
1010 *) ac_optarg=yes ;;
1011 esac
1012
1013 # Accept the important Cygnus configure options, so we can diagnose typos.
1014
1015 case $ac_dashdash$ac_option in
1016 --)
1017 ac_dashdash=yes ;;
1018
1019 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1020 ac_prev=bindir ;;
1021 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1022 bindir=$ac_optarg ;;
1023
1024 -build | --build | --buil | --bui | --bu)
1025 ac_prev=build_alias ;;
1026 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1027 build_alias=$ac_optarg ;;
1028
1029 -cache-file | --cache-file | --cache-fil | --cache-fi \
1030 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1031 ac_prev=cache_file ;;
1032 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1033 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1034 cache_file=$ac_optarg ;;
1035
1036 --config-cache | -C)
1037 cache_file=config.cache ;;
1038
1039 -datadir | --datadir | --datadi | --datad)
1040 ac_prev=datadir ;;
1041 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1042 datadir=$ac_optarg ;;
1043
1044 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1045 | --dataroo | --dataro | --datar)
1046 ac_prev=datarootdir ;;
1047 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1048 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1049 datarootdir=$ac_optarg ;;
1050
1051 -disable-* | --disable-*)
1052 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1053 # Reject names that are not valid shell variable names.
1054 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1055 as_fn_error $? "invalid feature name: $ac_useropt"
1056 ac_useropt_orig=$ac_useropt
1057 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1058 case $ac_user_opts in
1059 *"
1060 "enable_$ac_useropt"
1061 "*) ;;
1062 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1063 ac_unrecognized_sep=', ';;
1064 esac
1065 eval enable_$ac_useropt=no ;;
1066
1067 -docdir | --docdir | --docdi | --doc | --do)
1068 ac_prev=docdir ;;
1069 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1070 docdir=$ac_optarg ;;
1071
1072 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1073 ac_prev=dvidir ;;
1074 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1075 dvidir=$ac_optarg ;;
1076
1077 -enable-* | --enable-*)
1078 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1079 # Reject names that are not valid shell variable names.
1080 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1081 as_fn_error $? "invalid feature name: $ac_useropt"
1082 ac_useropt_orig=$ac_useropt
1083 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1084 case $ac_user_opts in
1085 *"
1086 "enable_$ac_useropt"
1087 "*) ;;
1088 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1089 ac_unrecognized_sep=', ';;
1090 esac
1091 eval enable_$ac_useropt=\$ac_optarg ;;
1092
1093 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1094 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1095 | --exec | --exe | --ex)
1096 ac_prev=exec_prefix ;;
1097 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1098 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1099 | --exec=* | --exe=* | --ex=*)
1100 exec_prefix=$ac_optarg ;;
1101
1102 -gas | --gas | --ga | --g)
1103 # Obsolete; use --with-gas.
1104 with_gas=yes ;;
1105
1106 -help | --help | --hel | --he | -h)
1107 ac_init_help=long ;;
1108 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1109 ac_init_help=recursive ;;
1110 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1111 ac_init_help=short ;;
1112
1113 -host | --host | --hos | --ho)
1114 ac_prev=host_alias ;;
1115 -host=* | --host=* | --hos=* | --ho=*)
1116 host_alias=$ac_optarg ;;
1117
1118 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1119 ac_prev=htmldir ;;
1120 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1121 | --ht=*)
1122 htmldir=$ac_optarg ;;
1123
1124 -includedir | --includedir | --includedi | --included | --include \
1125 | --includ | --inclu | --incl | --inc)
1126 ac_prev=includedir ;;
1127 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1128 | --includ=* | --inclu=* | --incl=* | --inc=*)
1129 includedir=$ac_optarg ;;
1130
1131 -infodir | --infodir | --infodi | --infod | --info | --inf)
1132 ac_prev=infodir ;;
1133 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1134 infodir=$ac_optarg ;;
1135
1136 -libdir | --libdir | --libdi | --libd)
1137 ac_prev=libdir ;;
1138 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1139 libdir=$ac_optarg ;;
1140
1141 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1142 | --libexe | --libex | --libe)
1143 ac_prev=libexecdir ;;
1144 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1145 | --libexe=* | --libex=* | --libe=*)
1146 libexecdir=$ac_optarg ;;
1147
1148 -localedir | --localedir | --localedi | --localed | --locale)
1149 ac_prev=localedir ;;
1150 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1151 localedir=$ac_optarg ;;
1152
1153 -localstatedir | --localstatedir | --localstatedi | --localstated \
1154 | --localstate | --localstat | --localsta | --localst | --locals)
1155 ac_prev=localstatedir ;;
1156 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1157 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1158 localstatedir=$ac_optarg ;;
1159
1160 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1161 ac_prev=mandir ;;
1162 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1163 mandir=$ac_optarg ;;
1164
1165 -nfp | --nfp | --nf)
1166 # Obsolete; use --without-fp.
1167 with_fp=no ;;
1168
1169 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1170 | --no-cr | --no-c | -n)
1171 no_create=yes ;;
1172
1173 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1174 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1175 no_recursion=yes ;;
1176
1177 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1178 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1179 | --oldin | --oldi | --old | --ol | --o)
1180 ac_prev=oldincludedir ;;
1181 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1182 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1183 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1184 oldincludedir=$ac_optarg ;;
1185
1186 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1187 ac_prev=prefix ;;
1188 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1189 prefix=$ac_optarg ;;
1190
1191 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1192 | --program-pre | --program-pr | --program-p)
1193 ac_prev=program_prefix ;;
1194 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1195 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1196 program_prefix=$ac_optarg ;;
1197
1198 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1199 | --program-suf | --program-su | --program-s)
1200 ac_prev=program_suffix ;;
1201 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1202 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1203 program_suffix=$ac_optarg ;;
1204
1205 -program-transform-name | --program-transform-name \
1206 | --program-transform-nam | --program-transform-na \
1207 | --program-transform-n | --program-transform- \
1208 | --program-transform | --program-transfor \
1209 | --program-transfo | --program-transf \
1210 | --program-trans | --program-tran \
1211 | --progr-tra | --program-tr | --program-t)
1212 ac_prev=program_transform_name ;;
1213 -program-transform-name=* | --program-transform-name=* \
1214 | --program-transform-nam=* | --program-transform-na=* \
1215 | --program-transform-n=* | --program-transform-=* \
1216 | --program-transform=* | --program-transfor=* \
1217 | --program-transfo=* | --program-transf=* \
1218 | --program-trans=* | --program-tran=* \
1219 | --progr-tra=* | --program-tr=* | --program-t=*)
1220 program_transform_name=$ac_optarg ;;
1221
1222 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1223 ac_prev=pdfdir ;;
1224 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1225 pdfdir=$ac_optarg ;;
1226
1227 -psdir | --psdir | --psdi | --psd | --ps)
1228 ac_prev=psdir ;;
1229 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1230 psdir=$ac_optarg ;;
1231
1232 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1233 | -silent | --silent | --silen | --sile | --sil)
1234 silent=yes ;;
1235
1236 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1237 ac_prev=sbindir ;;
1238 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1239 | --sbi=* | --sb=*)
1240 sbindir=$ac_optarg ;;
1241
1242 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1243 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1244 | --sharedst | --shareds | --shared | --share | --shar \
1245 | --sha | --sh)
1246 ac_prev=sharedstatedir ;;
1247 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1248 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1249 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1250 | --sha=* | --sh=*)
1251 sharedstatedir=$ac_optarg ;;
1252
1253 -site | --site | --sit)
1254 ac_prev=site ;;
1255 -site=* | --site=* | --sit=*)
1256 site=$ac_optarg ;;
1257
1258 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1259 ac_prev=srcdir ;;
1260 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1261 srcdir=$ac_optarg ;;
1262
1263 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1264 | --syscon | --sysco | --sysc | --sys | --sy)
1265 ac_prev=sysconfdir ;;
1266 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1267 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1268 sysconfdir=$ac_optarg ;;
1269
1270 -target | --target | --targe | --targ | --tar | --ta | --t)
1271 ac_prev=target_alias ;;
1272 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1273 target_alias=$ac_optarg ;;
1274
1275 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1276 verbose=yes ;;
1277
1278 -version | --version | --versio | --versi | --vers | -V)
1279 ac_init_version=: ;;
1280
1281 -with-* | --with-*)
1282 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1283 # Reject names that are not valid shell variable names.
1284 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1285 as_fn_error $? "invalid package name: $ac_useropt"
1286 ac_useropt_orig=$ac_useropt
1287 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1288 case $ac_user_opts in
1289 *"
1290 "with_$ac_useropt"
1291 "*) ;;
1292 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1293 ac_unrecognized_sep=', ';;
1294 esac
1295 eval with_$ac_useropt=\$ac_optarg ;;
1296
1297 -without-* | --without-*)
1298 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1299 # Reject names that are not valid shell variable names.
1300 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1301 as_fn_error $? "invalid package name: $ac_useropt"
1302 ac_useropt_orig=$ac_useropt
1303 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1304 case $ac_user_opts in
1305 *"
1306 "with_$ac_useropt"
1307 "*) ;;
1308 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1309 ac_unrecognized_sep=', ';;
1310 esac
1311 eval with_$ac_useropt=no ;;
1312
1313 --x)
1314 # Obsolete; use --with-x.
1315 with_x=yes ;;
1316
1317 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1318 | --x-incl | --x-inc | --x-in | --x-i)
1319 ac_prev=x_includes ;;
1320 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1321 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1322 x_includes=$ac_optarg ;;
1323
1324 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1325 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1326 ac_prev=x_libraries ;;
1327 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1328 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1329 x_libraries=$ac_optarg ;;
1330
1331 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1332 Try \`$0 --help' for more information"
1333 ;;
1334
1335 *=*)
1336 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1337 # Reject names that are not valid shell variable names.
1338 case $ac_envvar in #(
1339 '' | [0-9]* | *[!_$as_cr_alnum]* )
1340 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1341 esac
1342 eval $ac_envvar=\$ac_optarg
1343 export $ac_envvar ;;
1344
1345 *)
1346 # FIXME: should be removed in autoconf 3.0.
1347 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1348 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1349 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1350 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1351 ;;
1352
1353 esac
1354 done
1355
1356 if test -n "$ac_prev"; then
1357 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1358 as_fn_error $? "missing argument to $ac_option"
1359 fi
1360
1361 if test -n "$ac_unrecognized_opts"; then
1362 case $enable_option_checking in
1363 no) ;;
1364 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1365 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1366 esac
1367 fi
1368
1369 # Check all directory arguments for consistency.
1370 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1371 datadir sysconfdir sharedstatedir localstatedir includedir \
1372 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1373 libdir localedir mandir
1374 do
1375 eval ac_val=\$$ac_var
1376 # Remove trailing slashes.
1377 case $ac_val in
1378 */ )
1379 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1380 eval $ac_var=\$ac_val;;
1381 esac
1382 # Be sure to have absolute directory names.
1383 case $ac_val in
1384 [\\/$]* | ?:[\\/]* ) continue;;
1385 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1386 esac
1387 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1388 done
1389
1390 # There might be people who depend on the old broken behavior: `$host'
1391 # used to hold the argument of --host etc.
1392 # FIXME: To remove some day.
1393 build=$build_alias
1394 host=$host_alias
1395 target=$target_alias
1396
1397 # FIXME: To remove some day.
1398 if test "x$host_alias" != x; then
1399 if test "x$build_alias" = x; then
1400 cross_compiling=maybe
1401 elif test "x$build_alias" != "x$host_alias"; then
1402 cross_compiling=yes
1403 fi
1404 fi
1405
1406 ac_tool_prefix=
1407 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1408
1409 test "$silent" = yes && exec 6>/dev/null
1410
1411
1412 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1413 ac_ls_di=`ls -di .` &&
1414 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1415 as_fn_error $? "working directory cannot be determined"
1416 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1417 as_fn_error $? "pwd does not report name of working directory"
1418
1419
1420 # Find the source files, if location was not specified.
1421 if test -z "$srcdir"; then
1422 ac_srcdir_defaulted=yes
1423 # Try the directory containing this script, then the parent directory.
1424 ac_confdir=`$as_dirname -- "$as_myself" ||
1425 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1426 X"$as_myself" : 'X\(//\)[^/]' \| \
1427 X"$as_myself" : 'X\(//\)$' \| \
1428 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1429 $as_echo X"$as_myself" |
1430 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1431 s//\1/
1432 q
1433 }
1434 /^X\(\/\/\)[^/].*/{
1435 s//\1/
1436 q
1437 }
1438 /^X\(\/\/\)$/{
1439 s//\1/
1440 q
1441 }
1442 /^X\(\/\).*/{
1443 s//\1/
1444 q
1445 }
1446 s/.*/./; q'`
1447 srcdir=$ac_confdir
1448 if test ! -r "$srcdir/$ac_unique_file"; then
1449 srcdir=..
1450 fi
1451 else
1452 ac_srcdir_defaulted=no
1453 fi
1454 if test ! -r "$srcdir/$ac_unique_file"; then
1455 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1456 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1457 fi
1458 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1459 ac_abs_confdir=`(
1460 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1461 pwd)`
1462 # When building in place, set srcdir=.
1463 if test "$ac_abs_confdir" = "$ac_pwd"; then
1464 srcdir=.
1465 fi
1466 # Remove unnecessary trailing slashes from srcdir.
1467 # Double slashes in file names in object file debugging info
1468 # mess up M-x gdb in Emacs.
1469 case $srcdir in
1470 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1471 esac
1472 for ac_var in $ac_precious_vars; do
1473 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1474 eval ac_env_${ac_var}_value=\$${ac_var}
1475 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1476 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1477 done
1478
1479 #
1480 # Report the --help message.
1481 #
1482 if test "$ac_init_help" = "long"; then
1483 # Omit some internal or obsolete options to make the list less imposing.
1484 # This message is too long to be a string in the A/UX 3.1 sh.
1485 cat <<_ACEOF
1486 \`configure' configures this package to adapt to many kinds of systems.
1487
1488 Usage: $0 [OPTION]... [VAR=VALUE]...
1489
1490 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1491 VAR=VALUE. See below for descriptions of some of the useful variables.
1492
1493 Defaults for the options are specified in brackets.
1494
1495 Configuration:
1496 -h, --help display this help and exit
1497 --help=short display options specific to this package
1498 --help=recursive display the short help of all the included packages
1499 -V, --version display version information and exit
1500 -q, --quiet, --silent do not print \`checking ...' messages
1501 --cache-file=FILE cache test results in FILE [disabled]
1502 -C, --config-cache alias for \`--cache-file=config.cache'
1503 -n, --no-create do not create output files
1504 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1505
1506 Installation directories:
1507 --prefix=PREFIX install architecture-independent files in PREFIX
1508 [$ac_default_prefix]
1509 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1510 [PREFIX]
1511
1512 By default, \`make install' will install all the files in
1513 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1514 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1515 for instance \`--prefix=\$HOME'.
1516
1517 For better control, use the options below.
1518
1519 Fine tuning of the installation directories:
1520 --bindir=DIR user executables [EPREFIX/bin]
1521 --sbindir=DIR system admin executables [EPREFIX/sbin]
1522 --libexecdir=DIR program executables [EPREFIX/libexec]
1523 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1524 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1525 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1526 --libdir=DIR object code libraries [EPREFIX/lib]
1527 --includedir=DIR C header files [PREFIX/include]
1528 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1529 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1530 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1531 --infodir=DIR info documentation [DATAROOTDIR/info]
1532 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1533 --mandir=DIR man documentation [DATAROOTDIR/man]
1534 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1535 --htmldir=DIR html documentation [DOCDIR]
1536 --dvidir=DIR dvi documentation [DOCDIR]
1537 --pdfdir=DIR pdf documentation [DOCDIR]
1538 --psdir=DIR ps documentation [DOCDIR]
1539 _ACEOF
1540
1541 cat <<\_ACEOF
1542
1543 Program names:
1544 --program-prefix=PREFIX prepend PREFIX to installed program names
1545 --program-suffix=SUFFIX append SUFFIX to installed program names
1546 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1547
1548 X features:
1549 --x-includes=DIR X include files are in DIR
1550 --x-libraries=DIR X library files are in DIR
1551
1552 System types:
1553 --build=BUILD configure for building on BUILD [guessed]
1554 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1555 --target=TARGET configure for building compilers for TARGET [HOST]
1556 _ACEOF
1557 fi
1558
1559 if test -n "$ac_init_help"; then
1560
1561 cat <<\_ACEOF
1562
1563 Optional Features:
1564 --disable-option-checking ignore unrecognized --enable/--with options
1565 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1566 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1567 --enable-maintainer-mode
1568 enable make rules and dependencies not useful (and
1569 sometimes confusing) to the casual installer
1570 --enable-plugins Enable support for plugins
1571 --disable-largefile omit support for large files
1572 --enable-targets=TARGETS
1573 alternative target configurations
1574 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1575 --disable-gdbmi disable machine-interface (MI)
1576 --enable-tui enable full-screen terminal user interface (TUI)
1577 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1578 --enable-profiling enable profiling of GDB
1579 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1580 --disable-rpath do not hardcode runtime library paths
1581 --enable-source-highlight
1582 enable source-highlight for source listings
1583 --enable-werror treat compile warnings as errors
1584 --enable-build-warnings enable build-time compiler warnings if gcc is used
1585 --enable-gdb-build-warnings
1586 enable GDB specific build-time compiler warnings if
1587 gcc is used
1588 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1589 --enable-sim link gdb with simulator
1590 --enable-libctf Handle .ctf type-info sections [default=yes]
1591 --enable-unit-tests Enable the inclusion of unit tests when compiling
1592 GDB
1593
1594 Optional Packages:
1595 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1596 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1597 --with-separate-debug-dir=PATH
1598 look for global separate debug info in this path
1599 [LIBDIR/debug]
1600 --with-gdb-datadir=PATH look for global separate data files in this path
1601 [DATADIR/gdb]
1602 --with-relocated-sources=PATH
1603 automatically relocate this path for source files
1604 --with-auto-load-dir=PATH
1605 directories from which to load auto-loaded scripts
1606 [$debugdir:$datadir/auto-load]
1607 --with-auto-load-safe-path=PATH
1608 directories safe to hold auto-loaded files
1609 [--with-auto-load-dir]
1610 --without-auto-load-safe-path
1611 do not restrict auto-loaded files locations
1612 --with-debuginfod Enable debuginfo lookups with debuginfod
1613 (auto/yes/no)
1614 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1615 --with-curses use the curses library instead of the termcap
1616 library
1617 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1618 --with-bugurl=URL Direct users to URL to report a bug
1619 --with-system-zlib use installed libz
1620 --with-gnu-ld assume the C compiler uses GNU ld default=no
1621 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1622 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1623 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1624 --with-iconv-bin=PATH specify where to find the iconv program
1625 --with-system-readline use installed readline library
1626 --with-jit-reader-dir=PATH
1627 directory to load the JIT readers from
1628 --with-expat include expat support (auto/yes/no)
1629 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1630 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1631 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1632 --with-mpfr include MPFR support (auto/yes/no)
1633 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1634 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1635 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1636 --with-python[=PYTHON] include python support
1637 (auto/yes/no/<python-program>)
1638 --with-python-libdir[=DIR]
1639 search for python's libraries in DIR
1640 --with-guile[=GUILE] include guile support
1641 (auto/yes/no/<guile-version>/<pkg-config-program>)
1642 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1643 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1644 --without-libipt-prefix don't search for libipt in includedir and libdir
1645 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1646 --without-included-regex
1647 don't use included regex; this is the default on
1648 systems with version 2 of the GNU C library (use
1649 with caution on other system)
1650 --with-sysroot[=DIR] search for usr/lib et al within DIR
1651 --with-system-gdbinit=PATH
1652 automatically load a system-wide gdbinit file
1653 --with-system-gdbinit-dir=PATH
1654 automatically load system-wide gdbinit files from
1655 this directory
1656 --with-lzma support lzma compression (auto/yes/no)
1657 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1658 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1659 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1660 --with-tcl directory containing tcl configuration (tclConfig.sh)
1661 --with-tk directory containing tk configuration (tkConfig.sh)
1662 --with-x use the X Window System
1663 --with-babeltrace include babeltrace support (auto/yes/no)
1664 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1665 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1666 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1667 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1668 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1669 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1670 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1671
1672 Some influential environment variables:
1673 CC C compiler command
1674 CFLAGS C compiler flags
1675 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1676 nonstandard directory <lib dir>
1677 LIBS libraries to pass to the linker, e.g. -l<library>
1678 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1679 you have headers in a nonstandard directory <include dir>
1680 CXX C++ compiler command
1681 CXXFLAGS C++ compiler flags
1682 CPP C preprocessor
1683 MAKEINFO Parent configure detects if it is of sufficient version.
1684 MAKEINFOFLAGS
1685 Parameters for MAKEINFO.
1686 YACC The `Yet Another Compiler Compiler' implementation to use.
1687 Defaults to the first program found out of: `bison -y', `byacc',
1688 `yacc'.
1689 YFLAGS The list of arguments that will be passed by default to $YACC.
1690 This script will default YFLAGS to the empty string to avoid a
1691 default value of `-d' given by some make applications.
1692 XMKMF Path to xmkmf, Makefile generator for X Window System
1693
1694 Use these variables to override the choices made by `configure' or to help
1695 it to find libraries and programs with nonstandard names/locations.
1696
1697 Report bugs to the package provider.
1698 _ACEOF
1699 ac_status=$?
1700 fi
1701
1702 if test "$ac_init_help" = "recursive"; then
1703 # If there are subdirs, report their specific --help.
1704 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1705 test -d "$ac_dir" ||
1706 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1707 continue
1708 ac_builddir=.
1709
1710 case "$ac_dir" in
1711 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1712 *)
1713 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1714 # A ".." for each directory in $ac_dir_suffix.
1715 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1716 case $ac_top_builddir_sub in
1717 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1718 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1719 esac ;;
1720 esac
1721 ac_abs_top_builddir=$ac_pwd
1722 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1723 # for backward compatibility:
1724 ac_top_builddir=$ac_top_build_prefix
1725
1726 case $srcdir in
1727 .) # We are building in place.
1728 ac_srcdir=.
1729 ac_top_srcdir=$ac_top_builddir_sub
1730 ac_abs_top_srcdir=$ac_pwd ;;
1731 [\\/]* | ?:[\\/]* ) # Absolute name.
1732 ac_srcdir=$srcdir$ac_dir_suffix;
1733 ac_top_srcdir=$srcdir
1734 ac_abs_top_srcdir=$srcdir ;;
1735 *) # Relative name.
1736 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1737 ac_top_srcdir=$ac_top_build_prefix$srcdir
1738 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1739 esac
1740 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1741
1742 cd "$ac_dir" || { ac_status=$?; continue; }
1743 # Check for guested configure.
1744 if test -f "$ac_srcdir/configure.gnu"; then
1745 echo &&
1746 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1747 elif test -f "$ac_srcdir/configure"; then
1748 echo &&
1749 $SHELL "$ac_srcdir/configure" --help=recursive
1750 else
1751 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1752 fi || ac_status=$?
1753 cd "$ac_pwd" || { ac_status=$?; break; }
1754 done
1755 fi
1756
1757 test -n "$ac_init_help" && exit $ac_status
1758 if $ac_init_version; then
1759 cat <<\_ACEOF
1760 configure
1761 generated by GNU Autoconf 2.69
1762
1763 Copyright (C) 2012 Free Software Foundation, Inc.
1764 This configure script is free software; the Free Software Foundation
1765 gives unlimited permission to copy, distribute and modify it.
1766 _ACEOF
1767 exit
1768 fi
1769
1770 ## ------------------------ ##
1771 ## Autoconf initialization. ##
1772 ## ------------------------ ##
1773
1774 # ac_fn_c_try_compile LINENO
1775 # --------------------------
1776 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1777 ac_fn_c_try_compile ()
1778 {
1779 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1780 rm -f conftest.$ac_objext
1781 if { { ac_try="$ac_compile"
1782 case "(($ac_try" in
1783 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1784 *) ac_try_echo=$ac_try;;
1785 esac
1786 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1787 $as_echo "$ac_try_echo"; } >&5
1788 (eval "$ac_compile") 2>conftest.err
1789 ac_status=$?
1790 if test -s conftest.err; then
1791 grep -v '^ *+' conftest.err >conftest.er1
1792 cat conftest.er1 >&5
1793 mv -f conftest.er1 conftest.err
1794 fi
1795 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1796 test $ac_status = 0; } && {
1797 test -z "$ac_c_werror_flag" ||
1798 test ! -s conftest.err
1799 } && test -s conftest.$ac_objext; then :
1800 ac_retval=0
1801 else
1802 $as_echo "$as_me: failed program was:" >&5
1803 sed 's/^/| /' conftest.$ac_ext >&5
1804
1805 ac_retval=1
1806 fi
1807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1808 as_fn_set_status $ac_retval
1809
1810 } # ac_fn_c_try_compile
1811
1812 # ac_fn_cxx_try_compile LINENO
1813 # ----------------------------
1814 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1815 ac_fn_cxx_try_compile ()
1816 {
1817 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818 rm -f conftest.$ac_objext
1819 if { { ac_try="$ac_compile"
1820 case "(($ac_try" in
1821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1822 *) ac_try_echo=$ac_try;;
1823 esac
1824 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1825 $as_echo "$ac_try_echo"; } >&5
1826 (eval "$ac_compile") 2>conftest.err
1827 ac_status=$?
1828 if test -s conftest.err; then
1829 grep -v '^ *+' conftest.err >conftest.er1
1830 cat conftest.er1 >&5
1831 mv -f conftest.er1 conftest.err
1832 fi
1833 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1834 test $ac_status = 0; } && {
1835 test -z "$ac_cxx_werror_flag" ||
1836 test ! -s conftest.err
1837 } && test -s conftest.$ac_objext; then :
1838 ac_retval=0
1839 else
1840 $as_echo "$as_me: failed program was:" >&5
1841 sed 's/^/| /' conftest.$ac_ext >&5
1842
1843 ac_retval=1
1844 fi
1845 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1846 as_fn_set_status $ac_retval
1847
1848 } # ac_fn_cxx_try_compile
1849
1850 # ac_fn_c_try_cpp LINENO
1851 # ----------------------
1852 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1853 ac_fn_c_try_cpp ()
1854 {
1855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1856 if { { ac_try="$ac_cpp conftest.$ac_ext"
1857 case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860 esac
1861 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862 $as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1864 ac_status=$?
1865 if test -s conftest.err; then
1866 grep -v '^ *+' conftest.err >conftest.er1
1867 cat conftest.er1 >&5
1868 mv -f conftest.er1 conftest.err
1869 fi
1870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1871 test $ac_status = 0; } > conftest.i && {
1872 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1873 test ! -s conftest.err
1874 }; then :
1875 ac_retval=0
1876 else
1877 $as_echo "$as_me: failed program was:" >&5
1878 sed 's/^/| /' conftest.$ac_ext >&5
1879
1880 ac_retval=1
1881 fi
1882 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1883 as_fn_set_status $ac_retval
1884
1885 } # ac_fn_c_try_cpp
1886
1887 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1888 # -------------------------------------------------------
1889 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1890 # the include files in INCLUDES and setting the cache variable VAR
1891 # accordingly.
1892 ac_fn_c_check_header_mongrel ()
1893 {
1894 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1895 if eval \${$3+:} false; then :
1896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1897 $as_echo_n "checking for $2... " >&6; }
1898 if eval \${$3+:} false; then :
1899 $as_echo_n "(cached) " >&6
1900 fi
1901 eval ac_res=\$$3
1902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1903 $as_echo "$ac_res" >&6; }
1904 else
1905 # Is the header compilable?
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1907 $as_echo_n "checking $2 usability... " >&6; }
1908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1909 /* end confdefs.h. */
1910 $4
1911 #include <$2>
1912 _ACEOF
1913 if ac_fn_c_try_compile "$LINENO"; then :
1914 ac_header_compiler=yes
1915 else
1916 ac_header_compiler=no
1917 fi
1918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1920 $as_echo "$ac_header_compiler" >&6; }
1921
1922 # Is the header present?
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1924 $as_echo_n "checking $2 presence... " >&6; }
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926 /* end confdefs.h. */
1927 #include <$2>
1928 _ACEOF
1929 if ac_fn_c_try_cpp "$LINENO"; then :
1930 ac_header_preproc=yes
1931 else
1932 ac_header_preproc=no
1933 fi
1934 rm -f conftest.err conftest.i conftest.$ac_ext
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1936 $as_echo "$ac_header_preproc" >&6; }
1937
1938 # So? What about this header?
1939 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1940 yes:no: )
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1942 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1944 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1945 ;;
1946 no:yes:* )
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1948 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1950 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1952 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1954 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1956 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1957 ;;
1958 esac
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1960 $as_echo_n "checking for $2... " >&6; }
1961 if eval \${$3+:} false; then :
1962 $as_echo_n "(cached) " >&6
1963 else
1964 eval "$3=\$ac_header_compiler"
1965 fi
1966 eval ac_res=\$$3
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1968 $as_echo "$ac_res" >&6; }
1969 fi
1970 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1971
1972 } # ac_fn_c_check_header_mongrel
1973
1974 # ac_fn_c_try_run LINENO
1975 # ----------------------
1976 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1977 # that executables *can* be run.
1978 ac_fn_c_try_run ()
1979 {
1980 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1981 if { { ac_try="$ac_link"
1982 case "(($ac_try" in
1983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1984 *) ac_try_echo=$ac_try;;
1985 esac
1986 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1987 $as_echo "$ac_try_echo"; } >&5
1988 (eval "$ac_link") 2>&5
1989 ac_status=$?
1990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1991 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1992 { { case "(($ac_try" in
1993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1994 *) ac_try_echo=$ac_try;;
1995 esac
1996 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1997 $as_echo "$ac_try_echo"; } >&5
1998 (eval "$ac_try") 2>&5
1999 ac_status=$?
2000 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2001 test $ac_status = 0; }; }; then :
2002 ac_retval=0
2003 else
2004 $as_echo "$as_me: program exited with status $ac_status" >&5
2005 $as_echo "$as_me: failed program was:" >&5
2006 sed 's/^/| /' conftest.$ac_ext >&5
2007
2008 ac_retval=$ac_status
2009 fi
2010 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2011 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2012 as_fn_set_status $ac_retval
2013
2014 } # ac_fn_c_try_run
2015
2016 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2017 # -------------------------------------------------------
2018 # Tests whether HEADER exists and can be compiled using the include files in
2019 # INCLUDES, setting the cache variable VAR accordingly.
2020 ac_fn_c_check_header_compile ()
2021 {
2022 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2024 $as_echo_n "checking for $2... " >&6; }
2025 if eval \${$3+:} false; then :
2026 $as_echo_n "(cached) " >&6
2027 else
2028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2029 /* end confdefs.h. */
2030 $4
2031 #include <$2>
2032 _ACEOF
2033 if ac_fn_c_try_compile "$LINENO"; then :
2034 eval "$3=yes"
2035 else
2036 eval "$3=no"
2037 fi
2038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2039 fi
2040 eval ac_res=\$$3
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2042 $as_echo "$ac_res" >&6; }
2043 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2044
2045 } # ac_fn_c_check_header_compile
2046
2047 # ac_fn_c_try_link LINENO
2048 # -----------------------
2049 # Try to link conftest.$ac_ext, and return whether this succeeded.
2050 ac_fn_c_try_link ()
2051 {
2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053 rm -f conftest.$ac_objext conftest$ac_exeext
2054 if { { ac_try="$ac_link"
2055 case "(($ac_try" in
2056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2057 *) ac_try_echo=$ac_try;;
2058 esac
2059 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2060 $as_echo "$ac_try_echo"; } >&5
2061 (eval "$ac_link") 2>conftest.err
2062 ac_status=$?
2063 if test -s conftest.err; then
2064 grep -v '^ *+' conftest.err >conftest.er1
2065 cat conftest.er1 >&5
2066 mv -f conftest.er1 conftest.err
2067 fi
2068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2069 test $ac_status = 0; } && {
2070 test -z "$ac_c_werror_flag" ||
2071 test ! -s conftest.err
2072 } && test -s conftest$ac_exeext && {
2073 test "$cross_compiling" = yes ||
2074 test -x conftest$ac_exeext
2075 }; then :
2076 ac_retval=0
2077 else
2078 $as_echo "$as_me: failed program was:" >&5
2079 sed 's/^/| /' conftest.$ac_ext >&5
2080
2081 ac_retval=1
2082 fi
2083 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2084 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2085 # interfere with the next link command; also delete a directory that is
2086 # left behind by Apple's compiler. We do this before executing the actions.
2087 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2088 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2089 as_fn_set_status $ac_retval
2090
2091 } # ac_fn_c_try_link
2092
2093 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2094 # --------------------------------------------
2095 # Tries to find the compile-time value of EXPR in a program that includes
2096 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2097 # computed
2098 ac_fn_c_compute_int ()
2099 {
2100 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2101 if test "$cross_compiling" = yes; then
2102 # Depending upon the size, compute the lo and hi bounds.
2103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2104 /* end confdefs.h. */
2105 $4
2106 int
2107 main ()
2108 {
2109 static int test_array [1 - 2 * !(($2) >= 0)];
2110 test_array [0] = 0;
2111 return test_array [0];
2112
2113 ;
2114 return 0;
2115 }
2116 _ACEOF
2117 if ac_fn_c_try_compile "$LINENO"; then :
2118 ac_lo=0 ac_mid=0
2119 while :; do
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121 /* end confdefs.h. */
2122 $4
2123 int
2124 main ()
2125 {
2126 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2127 test_array [0] = 0;
2128 return test_array [0];
2129
2130 ;
2131 return 0;
2132 }
2133 _ACEOF
2134 if ac_fn_c_try_compile "$LINENO"; then :
2135 ac_hi=$ac_mid; break
2136 else
2137 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2138 if test $ac_lo -le $ac_mid; then
2139 ac_lo= ac_hi=
2140 break
2141 fi
2142 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2143 fi
2144 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2145 done
2146 else
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148 /* end confdefs.h. */
2149 $4
2150 int
2151 main ()
2152 {
2153 static int test_array [1 - 2 * !(($2) < 0)];
2154 test_array [0] = 0;
2155 return test_array [0];
2156
2157 ;
2158 return 0;
2159 }
2160 _ACEOF
2161 if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_hi=-1 ac_mid=-1
2163 while :; do
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165 /* end confdefs.h. */
2166 $4
2167 int
2168 main ()
2169 {
2170 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2171 test_array [0] = 0;
2172 return test_array [0];
2173
2174 ;
2175 return 0;
2176 }
2177 _ACEOF
2178 if ac_fn_c_try_compile "$LINENO"; then :
2179 ac_lo=$ac_mid; break
2180 else
2181 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2182 if test $ac_mid -le $ac_hi; then
2183 ac_lo= ac_hi=
2184 break
2185 fi
2186 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2187 fi
2188 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2189 done
2190 else
2191 ac_lo= ac_hi=
2192 fi
2193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2194 fi
2195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196 # Binary search between lo and hi bounds.
2197 while test "x$ac_lo" != "x$ac_hi"; do
2198 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200 /* end confdefs.h. */
2201 $4
2202 int
2203 main ()
2204 {
2205 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2206 test_array [0] = 0;
2207 return test_array [0];
2208
2209 ;
2210 return 0;
2211 }
2212 _ACEOF
2213 if ac_fn_c_try_compile "$LINENO"; then :
2214 ac_hi=$ac_mid
2215 else
2216 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2217 fi
2218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219 done
2220 case $ac_lo in #((
2221 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2222 '') ac_retval=1 ;;
2223 esac
2224 else
2225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2226 /* end confdefs.h. */
2227 $4
2228 static long int longval () { return $2; }
2229 static unsigned long int ulongval () { return $2; }
2230 #include <stdio.h>
2231 #include <stdlib.h>
2232 int
2233 main ()
2234 {
2235
2236 FILE *f = fopen ("conftest.val", "w");
2237 if (! f)
2238 return 1;
2239 if (($2) < 0)
2240 {
2241 long int i = longval ();
2242 if (i != ($2))
2243 return 1;
2244 fprintf (f, "%ld", i);
2245 }
2246 else
2247 {
2248 unsigned long int i = ulongval ();
2249 if (i != ($2))
2250 return 1;
2251 fprintf (f, "%lu", i);
2252 }
2253 /* Do not output a trailing newline, as this causes \r\n confusion
2254 on some platforms. */
2255 return ferror (f) || fclose (f) != 0;
2256
2257 ;
2258 return 0;
2259 }
2260 _ACEOF
2261 if ac_fn_c_try_run "$LINENO"; then :
2262 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2263 else
2264 ac_retval=1
2265 fi
2266 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2267 conftest.$ac_objext conftest.beam conftest.$ac_ext
2268 rm -f conftest.val
2269
2270 fi
2271 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2272 as_fn_set_status $ac_retval
2273
2274 } # ac_fn_c_compute_int
2275
2276 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2277 # ---------------------------------------------
2278 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2279 # accordingly.
2280 ac_fn_c_check_decl ()
2281 {
2282 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2283 as_decl_name=`echo $2|sed 's/ *(.*//'`
2284 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2286 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2287 if eval \${$3+:} false; then :
2288 $as_echo_n "(cached) " >&6
2289 else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291 /* end confdefs.h. */
2292 $4
2293 int
2294 main ()
2295 {
2296 #ifndef $as_decl_name
2297 #ifdef __cplusplus
2298 (void) $as_decl_use;
2299 #else
2300 (void) $as_decl_name;
2301 #endif
2302 #endif
2303
2304 ;
2305 return 0;
2306 }
2307 _ACEOF
2308 if ac_fn_c_try_compile "$LINENO"; then :
2309 eval "$3=yes"
2310 else
2311 eval "$3=no"
2312 fi
2313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2314 fi
2315 eval ac_res=\$$3
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2317 $as_echo "$ac_res" >&6; }
2318 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2319
2320 } # ac_fn_c_check_decl
2321
2322 # ac_fn_c_check_func LINENO FUNC VAR
2323 # ----------------------------------
2324 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2325 ac_fn_c_check_func ()
2326 {
2327 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2329 $as_echo_n "checking for $2... " >&6; }
2330 if eval \${$3+:} false; then :
2331 $as_echo_n "(cached) " >&6
2332 else
2333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2334 /* end confdefs.h. */
2335 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2336 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2337 #define $2 innocuous_$2
2338
2339 /* System header to define __stub macros and hopefully few prototypes,
2340 which can conflict with char $2 (); below.
2341 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2342 <limits.h> exists even on freestanding compilers. */
2343
2344 #ifdef __STDC__
2345 # include <limits.h>
2346 #else
2347 # include <assert.h>
2348 #endif
2349
2350 #undef $2
2351
2352 /* Override any GCC internal prototype to avoid an error.
2353 Use char because int might match the return type of a GCC
2354 builtin and then its argument prototype would still apply. */
2355 #ifdef __cplusplus
2356 extern "C"
2357 #endif
2358 char $2 ();
2359 /* The GNU C library defines this for functions which it implements
2360 to always fail with ENOSYS. Some functions are actually named
2361 something starting with __ and the normal name is an alias. */
2362 #if defined __stub_$2 || defined __stub___$2
2363 choke me
2364 #endif
2365
2366 int
2367 main ()
2368 {
2369 return $2 ();
2370 ;
2371 return 0;
2372 }
2373 _ACEOF
2374 if ac_fn_c_try_link "$LINENO"; then :
2375 eval "$3=yes"
2376 else
2377 eval "$3=no"
2378 fi
2379 rm -f core conftest.err conftest.$ac_objext \
2380 conftest$ac_exeext conftest.$ac_ext
2381 fi
2382 eval ac_res=\$$3
2383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2384 $as_echo "$ac_res" >&6; }
2385 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2386
2387 } # ac_fn_c_check_func
2388
2389 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2390 # -------------------------------------------
2391 # Tests whether TYPE exists after having included INCLUDES, setting cache
2392 # variable VAR accordingly.
2393 ac_fn_c_check_type ()
2394 {
2395 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2397 $as_echo_n "checking for $2... " >&6; }
2398 if eval \${$3+:} false; then :
2399 $as_echo_n "(cached) " >&6
2400 else
2401 eval "$3=no"
2402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2403 /* end confdefs.h. */
2404 $4
2405 int
2406 main ()
2407 {
2408 if (sizeof ($2))
2409 return 0;
2410 ;
2411 return 0;
2412 }
2413 _ACEOF
2414 if ac_fn_c_try_compile "$LINENO"; then :
2415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416 /* end confdefs.h. */
2417 $4
2418 int
2419 main ()
2420 {
2421 if (sizeof (($2)))
2422 return 0;
2423 ;
2424 return 0;
2425 }
2426 _ACEOF
2427 if ac_fn_c_try_compile "$LINENO"; then :
2428
2429 else
2430 eval "$3=yes"
2431 fi
2432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2433 fi
2434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2435 fi
2436 eval ac_res=\$$3
2437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2438 $as_echo "$ac_res" >&6; }
2439 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2440
2441 } # ac_fn_c_check_type
2442
2443 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2444 # ----------------------------------------------------
2445 # Tries to find if the field MEMBER exists in type AGGR, after including
2446 # INCLUDES, setting cache variable VAR accordingly.
2447 ac_fn_c_check_member ()
2448 {
2449 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2451 $as_echo_n "checking for $2.$3... " >&6; }
2452 if eval \${$4+:} false; then :
2453 $as_echo_n "(cached) " >&6
2454 else
2455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2456 /* end confdefs.h. */
2457 $5
2458 int
2459 main ()
2460 {
2461 static $2 ac_aggr;
2462 if (ac_aggr.$3)
2463 return 0;
2464 ;
2465 return 0;
2466 }
2467 _ACEOF
2468 if ac_fn_c_try_compile "$LINENO"; then :
2469 eval "$4=yes"
2470 else
2471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2472 /* end confdefs.h. */
2473 $5
2474 int
2475 main ()
2476 {
2477 static $2 ac_aggr;
2478 if (sizeof ac_aggr.$3)
2479 return 0;
2480 ;
2481 return 0;
2482 }
2483 _ACEOF
2484 if ac_fn_c_try_compile "$LINENO"; then :
2485 eval "$4=yes"
2486 else
2487 eval "$4=no"
2488 fi
2489 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2490 fi
2491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2492 fi
2493 eval ac_res=\$$4
2494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2495 $as_echo "$ac_res" >&6; }
2496 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2497
2498 } # ac_fn_c_check_member
2499
2500 # ac_fn_cxx_try_link LINENO
2501 # -------------------------
2502 # Try to link conftest.$ac_ext, and return whether this succeeded.
2503 ac_fn_cxx_try_link ()
2504 {
2505 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2506 rm -f conftest.$ac_objext conftest$ac_exeext
2507 if { { ac_try="$ac_link"
2508 case "(($ac_try" in
2509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2510 *) ac_try_echo=$ac_try;;
2511 esac
2512 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2513 $as_echo "$ac_try_echo"; } >&5
2514 (eval "$ac_link") 2>conftest.err
2515 ac_status=$?
2516 if test -s conftest.err; then
2517 grep -v '^ *+' conftest.err >conftest.er1
2518 cat conftest.er1 >&5
2519 mv -f conftest.er1 conftest.err
2520 fi
2521 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2522 test $ac_status = 0; } && {
2523 test -z "$ac_cxx_werror_flag" ||
2524 test ! -s conftest.err
2525 } && test -s conftest$ac_exeext && {
2526 test "$cross_compiling" = yes ||
2527 test -x conftest$ac_exeext
2528 }; then :
2529 ac_retval=0
2530 else
2531 $as_echo "$as_me: failed program was:" >&5
2532 sed 's/^/| /' conftest.$ac_ext >&5
2533
2534 ac_retval=1
2535 fi
2536 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2537 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2538 # interfere with the next link command; also delete a directory that is
2539 # left behind by Apple's compiler. We do this before executing the actions.
2540 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2541 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2542 as_fn_set_status $ac_retval
2543
2544 } # ac_fn_cxx_try_link
2545
2546 # ac_fn_cxx_check_func LINENO FUNC VAR
2547 # ------------------------------------
2548 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2549 ac_fn_cxx_check_func ()
2550 {
2551 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2553 $as_echo_n "checking for $2... " >&6; }
2554 if eval \${$3+:} false; then :
2555 $as_echo_n "(cached) " >&6
2556 else
2557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558 /* end confdefs.h. */
2559 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2560 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2561 #define $2 innocuous_$2
2562
2563 /* System header to define __stub macros and hopefully few prototypes,
2564 which can conflict with char $2 (); below.
2565 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2566 <limits.h> exists even on freestanding compilers. */
2567
2568 #ifdef __STDC__
2569 # include <limits.h>
2570 #else
2571 # include <assert.h>
2572 #endif
2573
2574 #undef $2
2575
2576 /* Override any GCC internal prototype to avoid an error.
2577 Use char because int might match the return type of a GCC
2578 builtin and then its argument prototype would still apply. */
2579 #ifdef __cplusplus
2580 extern "C"
2581 #endif
2582 char $2 ();
2583 /* The GNU C library defines this for functions which it implements
2584 to always fail with ENOSYS. Some functions are actually named
2585 something starting with __ and the normal name is an alias. */
2586 #if defined __stub_$2 || defined __stub___$2
2587 choke me
2588 #endif
2589
2590 int
2591 main ()
2592 {
2593 return $2 ();
2594 ;
2595 return 0;
2596 }
2597 _ACEOF
2598 if ac_fn_cxx_try_link "$LINENO"; then :
2599 eval "$3=yes"
2600 else
2601 eval "$3=no"
2602 fi
2603 rm -f core conftest.err conftest.$ac_objext \
2604 conftest$ac_exeext conftest.$ac_ext
2605 fi
2606 eval ac_res=\$$3
2607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2608 $as_echo "$ac_res" >&6; }
2609 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2610
2611 } # ac_fn_cxx_check_func
2612 cat >config.log <<_ACEOF
2613 This file contains any messages produced by compilers while
2614 running configure, to aid debugging if configure makes a mistake.
2615
2616 It was created by $as_me, which was
2617 generated by GNU Autoconf 2.69. Invocation command line was
2618
2619 $ $0 $@
2620
2621 _ACEOF
2622 exec 5>>config.log
2623 {
2624 cat <<_ASUNAME
2625 ## --------- ##
2626 ## Platform. ##
2627 ## --------- ##
2628
2629 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2630 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2631 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2632 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2633 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2634
2635 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2636 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2637
2638 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2639 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2640 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2641 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2642 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2643 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2644 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2645
2646 _ASUNAME
2647
2648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2649 for as_dir in $PATH
2650 do
2651 IFS=$as_save_IFS
2652 test -z "$as_dir" && as_dir=.
2653 $as_echo "PATH: $as_dir"
2654 done
2655 IFS=$as_save_IFS
2656
2657 } >&5
2658
2659 cat >&5 <<_ACEOF
2660
2661
2662 ## ----------- ##
2663 ## Core tests. ##
2664 ## ----------- ##
2665
2666 _ACEOF
2667
2668
2669 # Keep a trace of the command line.
2670 # Strip out --no-create and --no-recursion so they do not pile up.
2671 # Strip out --silent because we don't want to record it for future runs.
2672 # Also quote any args containing shell meta-characters.
2673 # Make two passes to allow for proper duplicate-argument suppression.
2674 ac_configure_args=
2675 ac_configure_args0=
2676 ac_configure_args1=
2677 ac_must_keep_next=false
2678 for ac_pass in 1 2
2679 do
2680 for ac_arg
2681 do
2682 case $ac_arg in
2683 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2684 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2685 | -silent | --silent | --silen | --sile | --sil)
2686 continue ;;
2687 *\'*)
2688 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2689 esac
2690 case $ac_pass in
2691 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2692 2)
2693 as_fn_append ac_configure_args1 " '$ac_arg'"
2694 if test $ac_must_keep_next = true; then
2695 ac_must_keep_next=false # Got value, back to normal.
2696 else
2697 case $ac_arg in
2698 *=* | --config-cache | -C | -disable-* | --disable-* \
2699 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2700 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2701 | -with-* | --with-* | -without-* | --without-* | --x)
2702 case "$ac_configure_args0 " in
2703 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2704 esac
2705 ;;
2706 -* ) ac_must_keep_next=true ;;
2707 esac
2708 fi
2709 as_fn_append ac_configure_args " '$ac_arg'"
2710 ;;
2711 esac
2712 done
2713 done
2714 { ac_configure_args0=; unset ac_configure_args0;}
2715 { ac_configure_args1=; unset ac_configure_args1;}
2716
2717 # When interrupted or exit'd, cleanup temporary files, and complete
2718 # config.log. We remove comments because anyway the quotes in there
2719 # would cause problems or look ugly.
2720 # WARNING: Use '\'' to represent an apostrophe within the trap.
2721 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2722 trap 'exit_status=$?
2723 # Save into config.log some information that might help in debugging.
2724 {
2725 echo
2726
2727 $as_echo "## ---------------- ##
2728 ## Cache variables. ##
2729 ## ---------------- ##"
2730 echo
2731 # The following way of writing the cache mishandles newlines in values,
2732 (
2733 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2734 eval ac_val=\$$ac_var
2735 case $ac_val in #(
2736 *${as_nl}*)
2737 case $ac_var in #(
2738 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2739 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2740 esac
2741 case $ac_var in #(
2742 _ | IFS | as_nl) ;; #(
2743 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2744 *) { eval $ac_var=; unset $ac_var;} ;;
2745 esac ;;
2746 esac
2747 done
2748 (set) 2>&1 |
2749 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2750 *${as_nl}ac_space=\ *)
2751 sed -n \
2752 "s/'\''/'\''\\\\'\'''\''/g;
2753 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2754 ;; #(
2755 *)
2756 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2757 ;;
2758 esac |
2759 sort
2760 )
2761 echo
2762
2763 $as_echo "## ----------------- ##
2764 ## Output variables. ##
2765 ## ----------------- ##"
2766 echo
2767 for ac_var in $ac_subst_vars
2768 do
2769 eval ac_val=\$$ac_var
2770 case $ac_val in
2771 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2772 esac
2773 $as_echo "$ac_var='\''$ac_val'\''"
2774 done | sort
2775 echo
2776
2777 if test -n "$ac_subst_files"; then
2778 $as_echo "## ------------------- ##
2779 ## File substitutions. ##
2780 ## ------------------- ##"
2781 echo
2782 for ac_var in $ac_subst_files
2783 do
2784 eval ac_val=\$$ac_var
2785 case $ac_val in
2786 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2787 esac
2788 $as_echo "$ac_var='\''$ac_val'\''"
2789 done | sort
2790 echo
2791 fi
2792
2793 if test -s confdefs.h; then
2794 $as_echo "## ----------- ##
2795 ## confdefs.h. ##
2796 ## ----------- ##"
2797 echo
2798 cat confdefs.h
2799 echo
2800 fi
2801 test "$ac_signal" != 0 &&
2802 $as_echo "$as_me: caught signal $ac_signal"
2803 $as_echo "$as_me: exit $exit_status"
2804 } >&5
2805 rm -f core *.core core.conftest.* &&
2806 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2807 exit $exit_status
2808 ' 0
2809 for ac_signal in 1 2 13 15; do
2810 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2811 done
2812 ac_signal=0
2813
2814 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2815 rm -f -r conftest* confdefs.h
2816
2817 $as_echo "/* confdefs.h */" > confdefs.h
2818
2819 # Predefined preprocessor variables.
2820
2821 cat >>confdefs.h <<_ACEOF
2822 #define PACKAGE_NAME "$PACKAGE_NAME"
2823 _ACEOF
2824
2825 cat >>confdefs.h <<_ACEOF
2826 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2827 _ACEOF
2828
2829 cat >>confdefs.h <<_ACEOF
2830 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2831 _ACEOF
2832
2833 cat >>confdefs.h <<_ACEOF
2834 #define PACKAGE_STRING "$PACKAGE_STRING"
2835 _ACEOF
2836
2837 cat >>confdefs.h <<_ACEOF
2838 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2839 _ACEOF
2840
2841 cat >>confdefs.h <<_ACEOF
2842 #define PACKAGE_URL "$PACKAGE_URL"
2843 _ACEOF
2844
2845
2846 # Let the site file select an alternate cache file if it wants to.
2847 # Prefer an explicitly selected file to automatically selected ones.
2848 ac_site_file1=NONE
2849 ac_site_file2=NONE
2850 if test -n "$CONFIG_SITE"; then
2851 # We do not want a PATH search for config.site.
2852 case $CONFIG_SITE in #((
2853 -*) ac_site_file1=./$CONFIG_SITE;;
2854 */*) ac_site_file1=$CONFIG_SITE;;
2855 *) ac_site_file1=./$CONFIG_SITE;;
2856 esac
2857 elif test "x$prefix" != xNONE; then
2858 ac_site_file1=$prefix/share/config.site
2859 ac_site_file2=$prefix/etc/config.site
2860 else
2861 ac_site_file1=$ac_default_prefix/share/config.site
2862 ac_site_file2=$ac_default_prefix/etc/config.site
2863 fi
2864 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2865 do
2866 test "x$ac_site_file" = xNONE && continue
2867 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2869 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2870 sed 's/^/| /' "$ac_site_file" >&5
2871 . "$ac_site_file" \
2872 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2873 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2874 as_fn_error $? "failed to load site script $ac_site_file
2875 See \`config.log' for more details" "$LINENO" 5; }
2876 fi
2877 done
2878
2879 if test -r "$cache_file"; then
2880 # Some versions of bash will fail to source /dev/null (special files
2881 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2882 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2884 $as_echo "$as_me: loading cache $cache_file" >&6;}
2885 case $cache_file in
2886 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2887 *) . "./$cache_file";;
2888 esac
2889 fi
2890 else
2891 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2892 $as_echo "$as_me: creating cache $cache_file" >&6;}
2893 >$cache_file
2894 fi
2895
2896 as_fn_append ac_header_list " stdlib.h"
2897 as_fn_append ac_header_list " unistd.h"
2898 as_fn_append ac_header_list " sys/param.h"
2899 # Check that the precious variables saved in the cache have kept the same
2900 # value.
2901 ac_cache_corrupted=false
2902 for ac_var in $ac_precious_vars; do
2903 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2904 eval ac_new_set=\$ac_env_${ac_var}_set
2905 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2906 eval ac_new_val=\$ac_env_${ac_var}_value
2907 case $ac_old_set,$ac_new_set in
2908 set,)
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2910 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2911 ac_cache_corrupted=: ;;
2912 ,set)
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2914 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2915 ac_cache_corrupted=: ;;
2916 ,);;
2917 *)
2918 if test "x$ac_old_val" != "x$ac_new_val"; then
2919 # differences in whitespace do not lead to failure.
2920 ac_old_val_w=`echo x $ac_old_val`
2921 ac_new_val_w=`echo x $ac_new_val`
2922 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2924 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2925 ac_cache_corrupted=:
2926 else
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2928 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2929 eval $ac_var=\$ac_old_val
2930 fi
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2932 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2933 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2934 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2935 fi;;
2936 esac
2937 # Pass precious variables to config.status.
2938 if test "$ac_new_set" = set; then
2939 case $ac_new_val in
2940 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2941 *) ac_arg=$ac_var=$ac_new_val ;;
2942 esac
2943 case " $ac_configure_args " in
2944 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2945 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2946 esac
2947 fi
2948 done
2949 if $ac_cache_corrupted; then
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2951 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2953 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2954 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2955 fi
2956 ## -------------------- ##
2957 ## Main body of script. ##
2958 ## -------------------- ##
2959
2960 ac_ext=c
2961 ac_cpp='$CPP $CPPFLAGS'
2962 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2963 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2964 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2965
2966
2967
2968
2969
2970 ac_config_headers="$ac_config_headers config.h:config.in"
2971
2972
2973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2974 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2975 # Check whether --enable-maintainer-mode was given.
2976 if test "${enable_maintainer_mode+set}" = set; then :
2977 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2978 else
2979 USE_MAINTAINER_MODE=no
2980 fi
2981
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2983 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2984 if test $USE_MAINTAINER_MODE = yes; then
2985 MAINTAINER_MODE_TRUE=
2986 MAINTAINER_MODE_FALSE='#'
2987 else
2988 MAINTAINER_MODE_TRUE='#'
2989 MAINTAINER_MODE_FALSE=
2990 fi
2991
2992 MAINT=$MAINTAINER_MODE_TRUE
2993
2994
2995
2996 ac_ext=c
2997 ac_cpp='$CPP $CPPFLAGS'
2998 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2999 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3000 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3001 if test -n "$ac_tool_prefix"; then
3002 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3003 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3005 $as_echo_n "checking for $ac_word... " >&6; }
3006 if ${ac_cv_prog_CC+:} false; then :
3007 $as_echo_n "(cached) " >&6
3008 else
3009 if test -n "$CC"; then
3010 ac_cv_prog_CC="$CC" # Let the user override the test.
3011 else
3012 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3013 for as_dir in $PATH
3014 do
3015 IFS=$as_save_IFS
3016 test -z "$as_dir" && as_dir=.
3017 for ac_exec_ext in '' $ac_executable_extensions; do
3018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3019 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3021 break 2
3022 fi
3023 done
3024 done
3025 IFS=$as_save_IFS
3026
3027 fi
3028 fi
3029 CC=$ac_cv_prog_CC
3030 if test -n "$CC"; then
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3032 $as_echo "$CC" >&6; }
3033 else
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3035 $as_echo "no" >&6; }
3036 fi
3037
3038
3039 fi
3040 if test -z "$ac_cv_prog_CC"; then
3041 ac_ct_CC=$CC
3042 # Extract the first word of "gcc", so it can be a program name with args.
3043 set dummy gcc; ac_word=$2
3044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3045 $as_echo_n "checking for $ac_word... " >&6; }
3046 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3047 $as_echo_n "(cached) " >&6
3048 else
3049 if test -n "$ac_ct_CC"; then
3050 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3051 else
3052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3053 for as_dir in $PATH
3054 do
3055 IFS=$as_save_IFS
3056 test -z "$as_dir" && as_dir=.
3057 for ac_exec_ext in '' $ac_executable_extensions; do
3058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3059 ac_cv_prog_ac_ct_CC="gcc"
3060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3061 break 2
3062 fi
3063 done
3064 done
3065 IFS=$as_save_IFS
3066
3067 fi
3068 fi
3069 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3070 if test -n "$ac_ct_CC"; then
3071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3072 $as_echo "$ac_ct_CC" >&6; }
3073 else
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3075 $as_echo "no" >&6; }
3076 fi
3077
3078 if test "x$ac_ct_CC" = x; then
3079 CC=""
3080 else
3081 case $cross_compiling:$ac_tool_warned in
3082 yes:)
3083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3084 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3085 ac_tool_warned=yes ;;
3086 esac
3087 CC=$ac_ct_CC
3088 fi
3089 else
3090 CC="$ac_cv_prog_CC"
3091 fi
3092
3093 if test -z "$CC"; then
3094 if test -n "$ac_tool_prefix"; then
3095 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3096 set dummy ${ac_tool_prefix}cc; ac_word=$2
3097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3098 $as_echo_n "checking for $ac_word... " >&6; }
3099 if ${ac_cv_prog_CC+:} false; then :
3100 $as_echo_n "(cached) " >&6
3101 else
3102 if test -n "$CC"; then
3103 ac_cv_prog_CC="$CC" # Let the user override the test.
3104 else
3105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3106 for as_dir in $PATH
3107 do
3108 IFS=$as_save_IFS
3109 test -z "$as_dir" && as_dir=.
3110 for ac_exec_ext in '' $ac_executable_extensions; do
3111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3112 ac_cv_prog_CC="${ac_tool_prefix}cc"
3113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3114 break 2
3115 fi
3116 done
3117 done
3118 IFS=$as_save_IFS
3119
3120 fi
3121 fi
3122 CC=$ac_cv_prog_CC
3123 if test -n "$CC"; then
3124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3125 $as_echo "$CC" >&6; }
3126 else
3127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3128 $as_echo "no" >&6; }
3129 fi
3130
3131
3132 fi
3133 fi
3134 if test -z "$CC"; then
3135 # Extract the first word of "cc", so it can be a program name with args.
3136 set dummy cc; ac_word=$2
3137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3138 $as_echo_n "checking for $ac_word... " >&6; }
3139 if ${ac_cv_prog_CC+:} false; then :
3140 $as_echo_n "(cached) " >&6
3141 else
3142 if test -n "$CC"; then
3143 ac_cv_prog_CC="$CC" # Let the user override the test.
3144 else
3145 ac_prog_rejected=no
3146 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3147 for as_dir in $PATH
3148 do
3149 IFS=$as_save_IFS
3150 test -z "$as_dir" && as_dir=.
3151 for ac_exec_ext in '' $ac_executable_extensions; do
3152 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3153 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3154 ac_prog_rejected=yes
3155 continue
3156 fi
3157 ac_cv_prog_CC="cc"
3158 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3159 break 2
3160 fi
3161 done
3162 done
3163 IFS=$as_save_IFS
3164
3165 if test $ac_prog_rejected = yes; then
3166 # We found a bogon in the path, so make sure we never use it.
3167 set dummy $ac_cv_prog_CC
3168 shift
3169 if test $# != 0; then
3170 # We chose a different compiler from the bogus one.
3171 # However, it has the same basename, so the bogon will be chosen
3172 # first if we set CC to just the basename; use the full file name.
3173 shift
3174 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3175 fi
3176 fi
3177 fi
3178 fi
3179 CC=$ac_cv_prog_CC
3180 if test -n "$CC"; then
3181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3182 $as_echo "$CC" >&6; }
3183 else
3184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3185 $as_echo "no" >&6; }
3186 fi
3187
3188
3189 fi
3190 if test -z "$CC"; then
3191 if test -n "$ac_tool_prefix"; then
3192 for ac_prog in cl.exe
3193 do
3194 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3195 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3197 $as_echo_n "checking for $ac_word... " >&6; }
3198 if ${ac_cv_prog_CC+:} false; then :
3199 $as_echo_n "(cached) " >&6
3200 else
3201 if test -n "$CC"; then
3202 ac_cv_prog_CC="$CC" # Let the user override the test.
3203 else
3204 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3205 for as_dir in $PATH
3206 do
3207 IFS=$as_save_IFS
3208 test -z "$as_dir" && as_dir=.
3209 for ac_exec_ext in '' $ac_executable_extensions; do
3210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3211 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3213 break 2
3214 fi
3215 done
3216 done
3217 IFS=$as_save_IFS
3218
3219 fi
3220 fi
3221 CC=$ac_cv_prog_CC
3222 if test -n "$CC"; then
3223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3224 $as_echo "$CC" >&6; }
3225 else
3226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3227 $as_echo "no" >&6; }
3228 fi
3229
3230
3231 test -n "$CC" && break
3232 done
3233 fi
3234 if test -z "$CC"; then
3235 ac_ct_CC=$CC
3236 for ac_prog in cl.exe
3237 do
3238 # Extract the first word of "$ac_prog", so it can be a program name with args.
3239 set dummy $ac_prog; ac_word=$2
3240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3241 $as_echo_n "checking for $ac_word... " >&6; }
3242 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3243 $as_echo_n "(cached) " >&6
3244 else
3245 if test -n "$ac_ct_CC"; then
3246 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3247 else
3248 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3249 for as_dir in $PATH
3250 do
3251 IFS=$as_save_IFS
3252 test -z "$as_dir" && as_dir=.
3253 for ac_exec_ext in '' $ac_executable_extensions; do
3254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3255 ac_cv_prog_ac_ct_CC="$ac_prog"
3256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3257 break 2
3258 fi
3259 done
3260 done
3261 IFS=$as_save_IFS
3262
3263 fi
3264 fi
3265 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3266 if test -n "$ac_ct_CC"; then
3267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3268 $as_echo "$ac_ct_CC" >&6; }
3269 else
3270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3271 $as_echo "no" >&6; }
3272 fi
3273
3274
3275 test -n "$ac_ct_CC" && break
3276 done
3277
3278 if test "x$ac_ct_CC" = x; then
3279 CC=""
3280 else
3281 case $cross_compiling:$ac_tool_warned in
3282 yes:)
3283 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3284 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3285 ac_tool_warned=yes ;;
3286 esac
3287 CC=$ac_ct_CC
3288 fi
3289 fi
3290
3291 fi
3292
3293
3294 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3295 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3296 as_fn_error $? "no acceptable C compiler found in \$PATH
3297 See \`config.log' for more details" "$LINENO" 5; }
3298
3299 # Provide some information about the compiler.
3300 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3301 set X $ac_compile
3302 ac_compiler=$2
3303 for ac_option in --version -v -V -qversion; do
3304 { { ac_try="$ac_compiler $ac_option >&5"
3305 case "(($ac_try" in
3306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3307 *) ac_try_echo=$ac_try;;
3308 esac
3309 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3310 $as_echo "$ac_try_echo"; } >&5
3311 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3312 ac_status=$?
3313 if test -s conftest.err; then
3314 sed '10a\
3315 ... rest of stderr output deleted ...
3316 10q' conftest.err >conftest.er1
3317 cat conftest.er1 >&5
3318 fi
3319 rm -f conftest.er1 conftest.err
3320 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3321 test $ac_status = 0; }
3322 done
3323
3324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3325 /* end confdefs.h. */
3326
3327 int
3328 main ()
3329 {
3330
3331 ;
3332 return 0;
3333 }
3334 _ACEOF
3335 ac_clean_files_save=$ac_clean_files
3336 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3337 # Try to create an executable without -o first, disregard a.out.
3338 # It will help us diagnose broken compilers, and finding out an intuition
3339 # of exeext.
3340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3341 $as_echo_n "checking whether the C compiler works... " >&6; }
3342 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3343
3344 # The possible output files:
3345 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3346
3347 ac_rmfiles=
3348 for ac_file in $ac_files
3349 do
3350 case $ac_file in
3351 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3352 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3353 esac
3354 done
3355 rm -f $ac_rmfiles
3356
3357 if { { ac_try="$ac_link_default"
3358 case "(($ac_try" in
3359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3360 *) ac_try_echo=$ac_try;;
3361 esac
3362 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3363 $as_echo "$ac_try_echo"; } >&5
3364 (eval "$ac_link_default") 2>&5
3365 ac_status=$?
3366 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3367 test $ac_status = 0; }; then :
3368 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3369 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3370 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3371 # so that the user can short-circuit this test for compilers unknown to
3372 # Autoconf.
3373 for ac_file in $ac_files ''
3374 do
3375 test -f "$ac_file" || continue
3376 case $ac_file in
3377 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3378 ;;
3379 [ab].out )
3380 # We found the default executable, but exeext='' is most
3381 # certainly right.
3382 break;;
3383 *.* )
3384 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3385 then :; else
3386 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3387 fi
3388 # We set ac_cv_exeext here because the later test for it is not
3389 # safe: cross compilers may not add the suffix if given an `-o'
3390 # argument, so we may need to know it at that point already.
3391 # Even if this section looks crufty: it has the advantage of
3392 # actually working.
3393 break;;
3394 * )
3395 break;;
3396 esac
3397 done
3398 test "$ac_cv_exeext" = no && ac_cv_exeext=
3399
3400 else
3401 ac_file=''
3402 fi
3403 if test -z "$ac_file"; then :
3404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3405 $as_echo "no" >&6; }
3406 $as_echo "$as_me: failed program was:" >&5
3407 sed 's/^/| /' conftest.$ac_ext >&5
3408
3409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3410 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3411 as_fn_error 77 "C compiler cannot create executables
3412 See \`config.log' for more details" "$LINENO" 5; }
3413 else
3414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3415 $as_echo "yes" >&6; }
3416 fi
3417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3418 $as_echo_n "checking for C compiler default output file name... " >&6; }
3419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3420 $as_echo "$ac_file" >&6; }
3421 ac_exeext=$ac_cv_exeext
3422
3423 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3424 ac_clean_files=$ac_clean_files_save
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3426 $as_echo_n "checking for suffix of executables... " >&6; }
3427 if { { ac_try="$ac_link"
3428 case "(($ac_try" in
3429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3430 *) ac_try_echo=$ac_try;;
3431 esac
3432 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3433 $as_echo "$ac_try_echo"; } >&5
3434 (eval "$ac_link") 2>&5
3435 ac_status=$?
3436 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3437 test $ac_status = 0; }; then :
3438 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3439 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3440 # work properly (i.e., refer to `conftest.exe'), while it won't with
3441 # `rm'.
3442 for ac_file in conftest.exe conftest conftest.*; do
3443 test -f "$ac_file" || continue
3444 case $ac_file in
3445 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3446 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3447 break;;
3448 * ) break;;
3449 esac
3450 done
3451 else
3452 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3453 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3454 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3455 See \`config.log' for more details" "$LINENO" 5; }
3456 fi
3457 rm -f conftest conftest$ac_cv_exeext
3458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3459 $as_echo "$ac_cv_exeext" >&6; }
3460
3461 rm -f conftest.$ac_ext
3462 EXEEXT=$ac_cv_exeext
3463 ac_exeext=$EXEEXT
3464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3465 /* end confdefs.h. */
3466 #include <stdio.h>
3467 int
3468 main ()
3469 {
3470 FILE *f = fopen ("conftest.out", "w");
3471 return ferror (f) || fclose (f) != 0;
3472
3473 ;
3474 return 0;
3475 }
3476 _ACEOF
3477 ac_clean_files="$ac_clean_files conftest.out"
3478 # Check that the compiler produces executables we can run. If not, either
3479 # the compiler is broken, or we cross compile.
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3481 $as_echo_n "checking whether we are cross compiling... " >&6; }
3482 if test "$cross_compiling" != yes; then
3483 { { ac_try="$ac_link"
3484 case "(($ac_try" in
3485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3486 *) ac_try_echo=$ac_try;;
3487 esac
3488 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3489 $as_echo "$ac_try_echo"; } >&5
3490 (eval "$ac_link") 2>&5
3491 ac_status=$?
3492 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3493 test $ac_status = 0; }
3494 if { ac_try='./conftest$ac_cv_exeext'
3495 { { case "(($ac_try" in
3496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3497 *) ac_try_echo=$ac_try;;
3498 esac
3499 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3500 $as_echo "$ac_try_echo"; } >&5
3501 (eval "$ac_try") 2>&5
3502 ac_status=$?
3503 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3504 test $ac_status = 0; }; }; then
3505 cross_compiling=no
3506 else
3507 if test "$cross_compiling" = maybe; then
3508 cross_compiling=yes
3509 else
3510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3511 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3512 as_fn_error $? "cannot run C compiled programs.
3513 If you meant to cross compile, use \`--host'.
3514 See \`config.log' for more details" "$LINENO" 5; }
3515 fi
3516 fi
3517 fi
3518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3519 $as_echo "$cross_compiling" >&6; }
3520
3521 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3522 ac_clean_files=$ac_clean_files_save
3523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3524 $as_echo_n "checking for suffix of object files... " >&6; }
3525 if ${ac_cv_objext+:} false; then :
3526 $as_echo_n "(cached) " >&6
3527 else
3528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3529 /* end confdefs.h. */
3530
3531 int
3532 main ()
3533 {
3534
3535 ;
3536 return 0;
3537 }
3538 _ACEOF
3539 rm -f conftest.o conftest.obj
3540 if { { ac_try="$ac_compile"
3541 case "(($ac_try" in
3542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3543 *) ac_try_echo=$ac_try;;
3544 esac
3545 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3546 $as_echo "$ac_try_echo"; } >&5
3547 (eval "$ac_compile") 2>&5
3548 ac_status=$?
3549 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3550 test $ac_status = 0; }; then :
3551 for ac_file in conftest.o conftest.obj conftest.*; do
3552 test -f "$ac_file" || continue;
3553 case $ac_file in
3554 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3555 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3556 break;;
3557 esac
3558 done
3559 else
3560 $as_echo "$as_me: failed program was:" >&5
3561 sed 's/^/| /' conftest.$ac_ext >&5
3562
3563 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3564 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3565 as_fn_error $? "cannot compute suffix of object files: cannot compile
3566 See \`config.log' for more details" "$LINENO" 5; }
3567 fi
3568 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3569 fi
3570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3571 $as_echo "$ac_cv_objext" >&6; }
3572 OBJEXT=$ac_cv_objext
3573 ac_objext=$OBJEXT
3574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3575 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3576 if ${ac_cv_c_compiler_gnu+:} false; then :
3577 $as_echo_n "(cached) " >&6
3578 else
3579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3580 /* end confdefs.h. */
3581
3582 int
3583 main ()
3584 {
3585 #ifndef __GNUC__
3586 choke me
3587 #endif
3588
3589 ;
3590 return 0;
3591 }
3592 _ACEOF
3593 if ac_fn_c_try_compile "$LINENO"; then :
3594 ac_compiler_gnu=yes
3595 else
3596 ac_compiler_gnu=no
3597 fi
3598 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3599 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3600
3601 fi
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3603 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3604 if test $ac_compiler_gnu = yes; then
3605 GCC=yes
3606 else
3607 GCC=
3608 fi
3609 ac_test_CFLAGS=${CFLAGS+set}
3610 ac_save_CFLAGS=$CFLAGS
3611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3612 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3613 if ${ac_cv_prog_cc_g+:} false; then :
3614 $as_echo_n "(cached) " >&6
3615 else
3616 ac_save_c_werror_flag=$ac_c_werror_flag
3617 ac_c_werror_flag=yes
3618 ac_cv_prog_cc_g=no
3619 CFLAGS="-g"
3620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3621 /* end confdefs.h. */
3622
3623 int
3624 main ()
3625 {
3626
3627 ;
3628 return 0;
3629 }
3630 _ACEOF
3631 if ac_fn_c_try_compile "$LINENO"; then :
3632 ac_cv_prog_cc_g=yes
3633 else
3634 CFLAGS=""
3635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3636 /* end confdefs.h. */
3637
3638 int
3639 main ()
3640 {
3641
3642 ;
3643 return 0;
3644 }
3645 _ACEOF
3646 if ac_fn_c_try_compile "$LINENO"; then :
3647
3648 else
3649 ac_c_werror_flag=$ac_save_c_werror_flag
3650 CFLAGS="-g"
3651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3652 /* end confdefs.h. */
3653
3654 int
3655 main ()
3656 {
3657
3658 ;
3659 return 0;
3660 }
3661 _ACEOF
3662 if ac_fn_c_try_compile "$LINENO"; then :
3663 ac_cv_prog_cc_g=yes
3664 fi
3665 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3666 fi
3667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3668 fi
3669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3670 ac_c_werror_flag=$ac_save_c_werror_flag
3671 fi
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3673 $as_echo "$ac_cv_prog_cc_g" >&6; }
3674 if test "$ac_test_CFLAGS" = set; then
3675 CFLAGS=$ac_save_CFLAGS
3676 elif test $ac_cv_prog_cc_g = yes; then
3677 if test "$GCC" = yes; then
3678 CFLAGS="-g -O2"
3679 else
3680 CFLAGS="-g"
3681 fi
3682 else
3683 if test "$GCC" = yes; then
3684 CFLAGS="-O2"
3685 else
3686 CFLAGS=
3687 fi
3688 fi
3689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3690 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3691 if ${ac_cv_prog_cc_c89+:} false; then :
3692 $as_echo_n "(cached) " >&6
3693 else
3694 ac_cv_prog_cc_c89=no
3695 ac_save_CC=$CC
3696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3697 /* end confdefs.h. */
3698 #include <stdarg.h>
3699 #include <stdio.h>
3700 struct stat;
3701 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3702 struct buf { int x; };
3703 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3704 static char *e (p, i)
3705 char **p;
3706 int i;
3707 {
3708 return p[i];
3709 }
3710 static char *f (char * (*g) (char **, int), char **p, ...)
3711 {
3712 char *s;
3713 va_list v;
3714 va_start (v,p);
3715 s = g (p, va_arg (v,int));
3716 va_end (v);
3717 return s;
3718 }
3719
3720 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3721 function prototypes and stuff, but not '\xHH' hex character constants.
3722 These don't provoke an error unfortunately, instead are silently treated
3723 as 'x'. The following induces an error, until -std is added to get
3724 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3725 array size at least. It's necessary to write '\x00'==0 to get something
3726 that's true only with -std. */
3727 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3728
3729 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3730 inside strings and character constants. */
3731 #define FOO(x) 'x'
3732 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3733
3734 int test (int i, double x);
3735 struct s1 {int (*f) (int a);};
3736 struct s2 {int (*f) (double a);};
3737 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3738 int argc;
3739 char **argv;
3740 int
3741 main ()
3742 {
3743 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3744 ;
3745 return 0;
3746 }
3747 _ACEOF
3748 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3749 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3750 do
3751 CC="$ac_save_CC $ac_arg"
3752 if ac_fn_c_try_compile "$LINENO"; then :
3753 ac_cv_prog_cc_c89=$ac_arg
3754 fi
3755 rm -f core conftest.err conftest.$ac_objext
3756 test "x$ac_cv_prog_cc_c89" != "xno" && break
3757 done
3758 rm -f conftest.$ac_ext
3759 CC=$ac_save_CC
3760
3761 fi
3762 # AC_CACHE_VAL
3763 case "x$ac_cv_prog_cc_c89" in
3764 x)
3765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3766 $as_echo "none needed" >&6; } ;;
3767 xno)
3768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3769 $as_echo "unsupported" >&6; } ;;
3770 *)
3771 CC="$CC $ac_cv_prog_cc_c89"
3772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3773 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3774 esac
3775 if test "x$ac_cv_prog_cc_c89" != xno; then :
3776
3777 fi
3778
3779 ac_ext=c
3780 ac_cpp='$CPP $CPPFLAGS'
3781 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3782 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3783 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3784
3785 ac_ext=cpp
3786 ac_cpp='$CXXCPP $CPPFLAGS'
3787 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3788 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3789 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3790 if test -z "$CXX"; then
3791 if test -n "$CCC"; then
3792 CXX=$CCC
3793 else
3794 if test -n "$ac_tool_prefix"; then
3795 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3796 do
3797 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3798 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3800 $as_echo_n "checking for $ac_word... " >&6; }
3801 if ${ac_cv_prog_CXX+:} false; then :
3802 $as_echo_n "(cached) " >&6
3803 else
3804 if test -n "$CXX"; then
3805 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3806 else
3807 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3808 for as_dir in $PATH
3809 do
3810 IFS=$as_save_IFS
3811 test -z "$as_dir" && as_dir=.
3812 for ac_exec_ext in '' $ac_executable_extensions; do
3813 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3814 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3815 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3816 break 2
3817 fi
3818 done
3819 done
3820 IFS=$as_save_IFS
3821
3822 fi
3823 fi
3824 CXX=$ac_cv_prog_CXX
3825 if test -n "$CXX"; then
3826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3827 $as_echo "$CXX" >&6; }
3828 else
3829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3830 $as_echo "no" >&6; }
3831 fi
3832
3833
3834 test -n "$CXX" && break
3835 done
3836 fi
3837 if test -z "$CXX"; then
3838 ac_ct_CXX=$CXX
3839 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3840 do
3841 # Extract the first word of "$ac_prog", so it can be a program name with args.
3842 set dummy $ac_prog; ac_word=$2
3843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3844 $as_echo_n "checking for $ac_word... " >&6; }
3845 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3846 $as_echo_n "(cached) " >&6
3847 else
3848 if test -n "$ac_ct_CXX"; then
3849 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3850 else
3851 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3852 for as_dir in $PATH
3853 do
3854 IFS=$as_save_IFS
3855 test -z "$as_dir" && as_dir=.
3856 for ac_exec_ext in '' $ac_executable_extensions; do
3857 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3858 ac_cv_prog_ac_ct_CXX="$ac_prog"
3859 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3860 break 2
3861 fi
3862 done
3863 done
3864 IFS=$as_save_IFS
3865
3866 fi
3867 fi
3868 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3869 if test -n "$ac_ct_CXX"; then
3870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3871 $as_echo "$ac_ct_CXX" >&6; }
3872 else
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3874 $as_echo "no" >&6; }
3875 fi
3876
3877
3878 test -n "$ac_ct_CXX" && break
3879 done
3880
3881 if test "x$ac_ct_CXX" = x; then
3882 CXX="g++"
3883 else
3884 case $cross_compiling:$ac_tool_warned in
3885 yes:)
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3887 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3888 ac_tool_warned=yes ;;
3889 esac
3890 CXX=$ac_ct_CXX
3891 fi
3892 fi
3893
3894 fi
3895 fi
3896 # Provide some information about the compiler.
3897 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3898 set X $ac_compile
3899 ac_compiler=$2
3900 for ac_option in --version -v -V -qversion; do
3901 { { ac_try="$ac_compiler $ac_option >&5"
3902 case "(($ac_try" in
3903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3904 *) ac_try_echo=$ac_try;;
3905 esac
3906 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3907 $as_echo "$ac_try_echo"; } >&5
3908 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3909 ac_status=$?
3910 if test -s conftest.err; then
3911 sed '10a\
3912 ... rest of stderr output deleted ...
3913 10q' conftest.err >conftest.er1
3914 cat conftest.er1 >&5
3915 fi
3916 rm -f conftest.er1 conftest.err
3917 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3918 test $ac_status = 0; }
3919 done
3920
3921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3922 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3923 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3924 $as_echo_n "(cached) " >&6
3925 else
3926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3927 /* end confdefs.h. */
3928
3929 int
3930 main ()
3931 {
3932 #ifndef __GNUC__
3933 choke me
3934 #endif
3935
3936 ;
3937 return 0;
3938 }
3939 _ACEOF
3940 if ac_fn_cxx_try_compile "$LINENO"; then :
3941 ac_compiler_gnu=yes
3942 else
3943 ac_compiler_gnu=no
3944 fi
3945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3946 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3947
3948 fi
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3950 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3951 if test $ac_compiler_gnu = yes; then
3952 GXX=yes
3953 else
3954 GXX=
3955 fi
3956 ac_test_CXXFLAGS=${CXXFLAGS+set}
3957 ac_save_CXXFLAGS=$CXXFLAGS
3958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3959 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3960 if ${ac_cv_prog_cxx_g+:} false; then :
3961 $as_echo_n "(cached) " >&6
3962 else
3963 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3964 ac_cxx_werror_flag=yes
3965 ac_cv_prog_cxx_g=no
3966 CXXFLAGS="-g"
3967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3968 /* end confdefs.h. */
3969
3970 int
3971 main ()
3972 {
3973
3974 ;
3975 return 0;
3976 }
3977 _ACEOF
3978 if ac_fn_cxx_try_compile "$LINENO"; then :
3979 ac_cv_prog_cxx_g=yes
3980 else
3981 CXXFLAGS=""
3982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3983 /* end confdefs.h. */
3984
3985 int
3986 main ()
3987 {
3988
3989 ;
3990 return 0;
3991 }
3992 _ACEOF
3993 if ac_fn_cxx_try_compile "$LINENO"; then :
3994
3995 else
3996 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3997 CXXFLAGS="-g"
3998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3999 /* end confdefs.h. */
4000
4001 int
4002 main ()
4003 {
4004
4005 ;
4006 return 0;
4007 }
4008 _ACEOF
4009 if ac_fn_cxx_try_compile "$LINENO"; then :
4010 ac_cv_prog_cxx_g=yes
4011 fi
4012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4013 fi
4014 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4015 fi
4016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4017 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4018 fi
4019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4020 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4021 if test "$ac_test_CXXFLAGS" = set; then
4022 CXXFLAGS=$ac_save_CXXFLAGS
4023 elif test $ac_cv_prog_cxx_g = yes; then
4024 if test "$GXX" = yes; then
4025 CXXFLAGS="-g -O2"
4026 else
4027 CXXFLAGS="-g"
4028 fi
4029 else
4030 if test "$GXX" = yes; then
4031 CXXFLAGS="-O2"
4032 else
4033 CXXFLAGS=
4034 fi
4035 fi
4036 ac_ext=c
4037 ac_cpp='$CPP $CPPFLAGS'
4038 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4039 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4040 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4041
4042
4043
4044 ac_ext=c
4045 ac_cpp='$CPP $CPPFLAGS'
4046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4050 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4051 # On Suns, sometimes $CPP names a directory.
4052 if test -n "$CPP" && test -d "$CPP"; then
4053 CPP=
4054 fi
4055 if test -z "$CPP"; then
4056 if ${ac_cv_prog_CPP+:} false; then :
4057 $as_echo_n "(cached) " >&6
4058 else
4059 # Double quotes because CPP needs to be expanded
4060 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4061 do
4062 ac_preproc_ok=false
4063 for ac_c_preproc_warn_flag in '' yes
4064 do
4065 # Use a header file that comes with gcc, so configuring glibc
4066 # with a fresh cross-compiler works.
4067 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4068 # <limits.h> exists even on freestanding compilers.
4069 # On the NeXT, cc -E runs the code through the compiler's parser,
4070 # not just through cpp. "Syntax error" is here to catch this case.
4071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072 /* end confdefs.h. */
4073 #ifdef __STDC__
4074 # include <limits.h>
4075 #else
4076 # include <assert.h>
4077 #endif
4078 Syntax error
4079 _ACEOF
4080 if ac_fn_c_try_cpp "$LINENO"; then :
4081
4082 else
4083 # Broken: fails on valid input.
4084 continue
4085 fi
4086 rm -f conftest.err conftest.i conftest.$ac_ext
4087
4088 # OK, works on sane cases. Now check whether nonexistent headers
4089 # can be detected and how.
4090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4091 /* end confdefs.h. */
4092 #include <ac_nonexistent.h>
4093 _ACEOF
4094 if ac_fn_c_try_cpp "$LINENO"; then :
4095 # Broken: success on invalid input.
4096 continue
4097 else
4098 # Passes both tests.
4099 ac_preproc_ok=:
4100 break
4101 fi
4102 rm -f conftest.err conftest.i conftest.$ac_ext
4103
4104 done
4105 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4106 rm -f conftest.i conftest.err conftest.$ac_ext
4107 if $ac_preproc_ok; then :
4108 break
4109 fi
4110
4111 done
4112 ac_cv_prog_CPP=$CPP
4113
4114 fi
4115 CPP=$ac_cv_prog_CPP
4116 else
4117 ac_cv_prog_CPP=$CPP
4118 fi
4119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4120 $as_echo "$CPP" >&6; }
4121 ac_preproc_ok=false
4122 for ac_c_preproc_warn_flag in '' yes
4123 do
4124 # Use a header file that comes with gcc, so configuring glibc
4125 # with a fresh cross-compiler works.
4126 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4127 # <limits.h> exists even on freestanding compilers.
4128 # On the NeXT, cc -E runs the code through the compiler's parser,
4129 # not just through cpp. "Syntax error" is here to catch this case.
4130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4131 /* end confdefs.h. */
4132 #ifdef __STDC__
4133 # include <limits.h>
4134 #else
4135 # include <assert.h>
4136 #endif
4137 Syntax error
4138 _ACEOF
4139 if ac_fn_c_try_cpp "$LINENO"; then :
4140
4141 else
4142 # Broken: fails on valid input.
4143 continue
4144 fi
4145 rm -f conftest.err conftest.i conftest.$ac_ext
4146
4147 # OK, works on sane cases. Now check whether nonexistent headers
4148 # can be detected and how.
4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4150 /* end confdefs.h. */
4151 #include <ac_nonexistent.h>
4152 _ACEOF
4153 if ac_fn_c_try_cpp "$LINENO"; then :
4154 # Broken: success on invalid input.
4155 continue
4156 else
4157 # Passes both tests.
4158 ac_preproc_ok=:
4159 break
4160 fi
4161 rm -f conftest.err conftest.i conftest.$ac_ext
4162
4163 done
4164 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4165 rm -f conftest.i conftest.err conftest.$ac_ext
4166 if $ac_preproc_ok; then :
4167
4168 else
4169 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4170 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4171 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4172 See \`config.log' for more details" "$LINENO" 5; }
4173 fi
4174
4175 ac_ext=c
4176 ac_cpp='$CPP $CPPFLAGS'
4177 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4178 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4179 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4180
4181
4182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4183 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4184 if ${ac_cv_path_GREP+:} false; then :
4185 $as_echo_n "(cached) " >&6
4186 else
4187 if test -z "$GREP"; then
4188 ac_path_GREP_found=false
4189 # Loop through the user's path and test for each of PROGNAME-LIST
4190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4191 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4192 do
4193 IFS=$as_save_IFS
4194 test -z "$as_dir" && as_dir=.
4195 for ac_prog in grep ggrep; do
4196 for ac_exec_ext in '' $ac_executable_extensions; do
4197 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4198 as_fn_executable_p "$ac_path_GREP" || continue
4199 # Check for GNU ac_path_GREP and select it if it is found.
4200 # Check for GNU $ac_path_GREP
4201 case `"$ac_path_GREP" --version 2>&1` in
4202 *GNU*)
4203 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4204 *)
4205 ac_count=0
4206 $as_echo_n 0123456789 >"conftest.in"
4207 while :
4208 do
4209 cat "conftest.in" "conftest.in" >"conftest.tmp"
4210 mv "conftest.tmp" "conftest.in"
4211 cp "conftest.in" "conftest.nl"
4212 $as_echo 'GREP' >> "conftest.nl"
4213 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4214 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4215 as_fn_arith $ac_count + 1 && ac_count=$as_val
4216 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4217 # Best one so far, save it but keep looking for a better one
4218 ac_cv_path_GREP="$ac_path_GREP"
4219 ac_path_GREP_max=$ac_count
4220 fi
4221 # 10*(2^10) chars as input seems more than enough
4222 test $ac_count -gt 10 && break
4223 done
4224 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4225 esac
4226
4227 $ac_path_GREP_found && break 3
4228 done
4229 done
4230 done
4231 IFS=$as_save_IFS
4232 if test -z "$ac_cv_path_GREP"; then
4233 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4234 fi
4235 else
4236 ac_cv_path_GREP=$GREP
4237 fi
4238
4239 fi
4240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4241 $as_echo "$ac_cv_path_GREP" >&6; }
4242 GREP="$ac_cv_path_GREP"
4243
4244
4245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4246 $as_echo_n "checking for egrep... " >&6; }
4247 if ${ac_cv_path_EGREP+:} false; then :
4248 $as_echo_n "(cached) " >&6
4249 else
4250 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4251 then ac_cv_path_EGREP="$GREP -E"
4252 else
4253 if test -z "$EGREP"; then
4254 ac_path_EGREP_found=false
4255 # Loop through the user's path and test for each of PROGNAME-LIST
4256 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4257 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4258 do
4259 IFS=$as_save_IFS
4260 test -z "$as_dir" && as_dir=.
4261 for ac_prog in egrep; do
4262 for ac_exec_ext in '' $ac_executable_extensions; do
4263 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4264 as_fn_executable_p "$ac_path_EGREP" || continue
4265 # Check for GNU ac_path_EGREP and select it if it is found.
4266 # Check for GNU $ac_path_EGREP
4267 case `"$ac_path_EGREP" --version 2>&1` in
4268 *GNU*)
4269 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4270 *)
4271 ac_count=0
4272 $as_echo_n 0123456789 >"conftest.in"
4273 while :
4274 do
4275 cat "conftest.in" "conftest.in" >"conftest.tmp"
4276 mv "conftest.tmp" "conftest.in"
4277 cp "conftest.in" "conftest.nl"
4278 $as_echo 'EGREP' >> "conftest.nl"
4279 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4280 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4281 as_fn_arith $ac_count + 1 && ac_count=$as_val
4282 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4283 # Best one so far, save it but keep looking for a better one
4284 ac_cv_path_EGREP="$ac_path_EGREP"
4285 ac_path_EGREP_max=$ac_count
4286 fi
4287 # 10*(2^10) chars as input seems more than enough
4288 test $ac_count -gt 10 && break
4289 done
4290 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4291 esac
4292
4293 $ac_path_EGREP_found && break 3
4294 done
4295 done
4296 done
4297 IFS=$as_save_IFS
4298 if test -z "$ac_cv_path_EGREP"; then
4299 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4300 fi
4301 else
4302 ac_cv_path_EGREP=$EGREP
4303 fi
4304
4305 fi
4306 fi
4307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4308 $as_echo "$ac_cv_path_EGREP" >&6; }
4309 EGREP="$ac_cv_path_EGREP"
4310
4311
4312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4313 $as_echo_n "checking for ANSI C header files... " >&6; }
4314 if ${ac_cv_header_stdc+:} false; then :
4315 $as_echo_n "(cached) " >&6
4316 else
4317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4318 /* end confdefs.h. */
4319 #include <stdlib.h>
4320 #include <stdarg.h>
4321 #include <string.h>
4322 #include <float.h>
4323
4324 int
4325 main ()
4326 {
4327
4328 ;
4329 return 0;
4330 }
4331 _ACEOF
4332 if ac_fn_c_try_compile "$LINENO"; then :
4333 ac_cv_header_stdc=yes
4334 else
4335 ac_cv_header_stdc=no
4336 fi
4337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4338
4339 if test $ac_cv_header_stdc = yes; then
4340 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4342 /* end confdefs.h. */
4343 #include <string.h>
4344
4345 _ACEOF
4346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4347 $EGREP "memchr" >/dev/null 2>&1; then :
4348
4349 else
4350 ac_cv_header_stdc=no
4351 fi
4352 rm -f conftest*
4353
4354 fi
4355
4356 if test $ac_cv_header_stdc = yes; then
4357 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4359 /* end confdefs.h. */
4360 #include <stdlib.h>
4361
4362 _ACEOF
4363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4364 $EGREP "free" >/dev/null 2>&1; then :
4365
4366 else
4367 ac_cv_header_stdc=no
4368 fi
4369 rm -f conftest*
4370
4371 fi
4372
4373 if test $ac_cv_header_stdc = yes; then
4374 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4375 if test "$cross_compiling" = yes; then :
4376 :
4377 else
4378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4379 /* end confdefs.h. */
4380 #include <ctype.h>
4381 #include <stdlib.h>
4382 #if ((' ' & 0x0FF) == 0x020)
4383 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4384 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4385 #else
4386 # define ISLOWER(c) \
4387 (('a' <= (c) && (c) <= 'i') \
4388 || ('j' <= (c) && (c) <= 'r') \
4389 || ('s' <= (c) && (c) <= 'z'))
4390 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4391 #endif
4392
4393 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4394 int
4395 main ()
4396 {
4397 int i;
4398 for (i = 0; i < 256; i++)
4399 if (XOR (islower (i), ISLOWER (i))
4400 || toupper (i) != TOUPPER (i))
4401 return 2;
4402 return 0;
4403 }
4404 _ACEOF
4405 if ac_fn_c_try_run "$LINENO"; then :
4406
4407 else
4408 ac_cv_header_stdc=no
4409 fi
4410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4411 conftest.$ac_objext conftest.beam conftest.$ac_ext
4412 fi
4413
4414 fi
4415 fi
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4417 $as_echo "$ac_cv_header_stdc" >&6; }
4418 if test $ac_cv_header_stdc = yes; then
4419
4420 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4421
4422 fi
4423
4424 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4425 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4426 inttypes.h stdint.h unistd.h
4427 do :
4428 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4429 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4430 "
4431 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4432 cat >>confdefs.h <<_ACEOF
4433 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4434 _ACEOF
4435
4436 fi
4437
4438 done
4439
4440
4441
4442 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4443 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4444 MINIX=yes
4445 else
4446 MINIX=
4447 fi
4448
4449
4450 if test "$MINIX" = yes; then
4451
4452 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4453
4454
4455 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4456
4457
4458 $as_echo "#define _MINIX 1" >>confdefs.h
4459
4460 fi
4461
4462
4463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4464 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4465 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4466 $as_echo_n "(cached) " >&6
4467 else
4468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4469 /* end confdefs.h. */
4470
4471 # define __EXTENSIONS__ 1
4472 $ac_includes_default
4473 int
4474 main ()
4475 {
4476
4477 ;
4478 return 0;
4479 }
4480 _ACEOF
4481 if ac_fn_c_try_compile "$LINENO"; then :
4482 ac_cv_safe_to_define___extensions__=yes
4483 else
4484 ac_cv_safe_to_define___extensions__=no
4485 fi
4486 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4487 fi
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4489 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4490 test $ac_cv_safe_to_define___extensions__ = yes &&
4491 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4492
4493 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4494
4495 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4496
4497 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4498
4499 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4500
4501
4502 ac_aux_dir=
4503 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4504 if test -f "$ac_dir/install-sh"; then
4505 ac_aux_dir=$ac_dir
4506 ac_install_sh="$ac_aux_dir/install-sh -c"
4507 break
4508 elif test -f "$ac_dir/install.sh"; then
4509 ac_aux_dir=$ac_dir
4510 ac_install_sh="$ac_aux_dir/install.sh -c"
4511 break
4512 elif test -f "$ac_dir/shtool"; then
4513 ac_aux_dir=$ac_dir
4514 ac_install_sh="$ac_aux_dir/shtool install -c"
4515 break
4516 fi
4517 done
4518 if test -z "$ac_aux_dir"; then
4519 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4520 fi
4521
4522 # These three variables are undocumented and unsupported,
4523 # and are intended to be withdrawn in a future Autoconf release.
4524 # They can cause serious problems if a builder's source tree is in a directory
4525 # whose full name contains unusual characters.
4526 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4527 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4528 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4529
4530
4531 # Make sure we can run config.sub.
4532 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4533 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4534
4535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4536 $as_echo_n "checking build system type... " >&6; }
4537 if ${ac_cv_build+:} false; then :
4538 $as_echo_n "(cached) " >&6
4539 else
4540 ac_build_alias=$build_alias
4541 test "x$ac_build_alias" = x &&
4542 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4543 test "x$ac_build_alias" = x &&
4544 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4545 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4546 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4547
4548 fi
4549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4550 $as_echo "$ac_cv_build" >&6; }
4551 case $ac_cv_build in
4552 *-*-*) ;;
4553 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4554 esac
4555 build=$ac_cv_build
4556 ac_save_IFS=$IFS; IFS='-'
4557 set x $ac_cv_build
4558 shift
4559 build_cpu=$1
4560 build_vendor=$2
4561 shift; shift
4562 # Remember, the first character of IFS is used to create $*,
4563 # except with old shells:
4564 build_os=$*
4565 IFS=$ac_save_IFS
4566 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4567
4568
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4570 $as_echo_n "checking host system type... " >&6; }
4571 if ${ac_cv_host+:} false; then :
4572 $as_echo_n "(cached) " >&6
4573 else
4574 if test "x$host_alias" = x; then
4575 ac_cv_host=$ac_cv_build
4576 else
4577 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4578 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4579 fi
4580
4581 fi
4582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4583 $as_echo "$ac_cv_host" >&6; }
4584 case $ac_cv_host in
4585 *-*-*) ;;
4586 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4587 esac
4588 host=$ac_cv_host
4589 ac_save_IFS=$IFS; IFS='-'
4590 set x $ac_cv_host
4591 shift
4592 host_cpu=$1
4593 host_vendor=$2
4594 shift; shift
4595 # Remember, the first character of IFS is used to create $*,
4596 # except with old shells:
4597 host_os=$*
4598 IFS=$ac_save_IFS
4599 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4600
4601
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4603 $as_echo_n "checking target system type... " >&6; }
4604 if ${ac_cv_target+:} false; then :
4605 $as_echo_n "(cached) " >&6
4606 else
4607 if test "x$target_alias" = x; then
4608 ac_cv_target=$ac_cv_host
4609 else
4610 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4611 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4612 fi
4613
4614 fi
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4616 $as_echo "$ac_cv_target" >&6; }
4617 case $ac_cv_target in
4618 *-*-*) ;;
4619 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4620 esac
4621 target=$ac_cv_target
4622 ac_save_IFS=$IFS; IFS='-'
4623 set x $ac_cv_target
4624 shift
4625 target_cpu=$1
4626 target_vendor=$2
4627 shift; shift
4628 # Remember, the first character of IFS is used to create $*,
4629 # except with old shells:
4630 target_os=$*
4631 IFS=$ac_save_IFS
4632 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4633
4634
4635 # The aliases save the names the user supplied, while $host etc.
4636 # will get canonicalized.
4637 test -n "$target_alias" &&
4638 test "$program_prefix$program_suffix$program_transform_name" = \
4639 NONENONEs,x,x, &&
4640 program_prefix=${target_alias}-
4641
4642 # The tests for host and target for $enable_largefile require
4643 # canonical names.
4644
4645
4646
4647 # As the $enable_largefile decision depends on --enable-plugins we must set it
4648 # even in directories otherwise not depending on the $plugins option.
4649
4650
4651 maybe_plugins=no
4652 for ac_header in dlfcn.h
4653 do :
4654 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4655 "
4656 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4657 cat >>confdefs.h <<_ACEOF
4658 #define HAVE_DLFCN_H 1
4659 _ACEOF
4660 maybe_plugins=yes
4661 fi
4662
4663 done
4664
4665 for ac_header in windows.h
4666 do :
4667 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4668 "
4669 if test "x$ac_cv_header_windows_h" = xyes; then :
4670 cat >>confdefs.h <<_ACEOF
4671 #define HAVE_WINDOWS_H 1
4672 _ACEOF
4673 maybe_plugins=yes
4674 fi
4675
4676 done
4677
4678
4679 # Check whether --enable-plugins was given.
4680 if test "${enable_plugins+set}" = set; then :
4681 enableval=$enable_plugins; case "${enableval}" in
4682 no) plugins=no ;;
4683 *) plugins=yes
4684 if test "$maybe_plugins" != "yes" ; then
4685 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4686 fi ;;
4687 esac
4688 else
4689 plugins=$maybe_plugins
4690
4691 fi
4692
4693 if test "$plugins" = "yes"; then
4694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4695 $as_echo_n "checking for library containing dlsym... " >&6; }
4696 if ${ac_cv_search_dlsym+:} false; then :
4697 $as_echo_n "(cached) " >&6
4698 else
4699 ac_func_search_save_LIBS=$LIBS
4700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4701 /* end confdefs.h. */
4702
4703 /* Override any GCC internal prototype to avoid an error.
4704 Use char because int might match the return type of a GCC
4705 builtin and then its argument prototype would still apply. */
4706 #ifdef __cplusplus
4707 extern "C"
4708 #endif
4709 char dlsym ();
4710 int
4711 main ()
4712 {
4713 return dlsym ();
4714 ;
4715 return 0;
4716 }
4717 _ACEOF
4718 for ac_lib in '' dl; do
4719 if test -z "$ac_lib"; then
4720 ac_res="none required"
4721 else
4722 ac_res=-l$ac_lib
4723 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4724 fi
4725 if ac_fn_c_try_link "$LINENO"; then :
4726 ac_cv_search_dlsym=$ac_res
4727 fi
4728 rm -f core conftest.err conftest.$ac_objext \
4729 conftest$ac_exeext
4730 if ${ac_cv_search_dlsym+:} false; then :
4731 break
4732 fi
4733 done
4734 if ${ac_cv_search_dlsym+:} false; then :
4735
4736 else
4737 ac_cv_search_dlsym=no
4738 fi
4739 rm conftest.$ac_ext
4740 LIBS=$ac_func_search_save_LIBS
4741 fi
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4743 $as_echo "$ac_cv_search_dlsym" >&6; }
4744 ac_res=$ac_cv_search_dlsym
4745 if test "$ac_res" != no; then :
4746 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4747
4748 fi
4749
4750 fi
4751
4752
4753 case "${host}" in
4754 sparc-*-solaris*|i[3-7]86-*-solaris*)
4755 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4756 # are mutually exclusive; and without procfs support, the bfd/ elf module
4757 # cannot provide certain routines such as elfcore_write_prpsinfo
4758 # or elfcore_write_prstatus. So unless the user explicitly requested
4759 # large-file support through the --enable-largefile switch, disable
4760 # large-file support in favor of procfs support.
4761 test "${target}" = "${host}" -a "x$plugins" = xno \
4762 && : ${enable_largefile="no"}
4763 ;;
4764 esac
4765
4766 # Check whether --enable-largefile was given.
4767 if test "${enable_largefile+set}" = set; then :
4768 enableval=$enable_largefile;
4769 fi
4770
4771 if test "$enable_largefile" != no; then
4772
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4774 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4775 if ${ac_cv_sys_largefile_CC+:} false; then :
4776 $as_echo_n "(cached) " >&6
4777 else
4778 ac_cv_sys_largefile_CC=no
4779 if test "$GCC" != yes; then
4780 ac_save_CC=$CC
4781 while :; do
4782 # IRIX 6.2 and later do not support large files by default,
4783 # so use the C compiler's -n32 option if that helps.
4784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785 /* end confdefs.h. */
4786 #include <sys/types.h>
4787 /* Check that off_t can represent 2**63 - 1 correctly.
4788 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4789 since some C++ compilers masquerading as C compilers
4790 incorrectly reject 9223372036854775807. */
4791 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4792 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4793 && LARGE_OFF_T % 2147483647 == 1)
4794 ? 1 : -1];
4795 int
4796 main ()
4797 {
4798
4799 ;
4800 return 0;
4801 }
4802 _ACEOF
4803 if ac_fn_c_try_compile "$LINENO"; then :
4804 break
4805 fi
4806 rm -f core conftest.err conftest.$ac_objext
4807 CC="$CC -n32"
4808 if ac_fn_c_try_compile "$LINENO"; then :
4809 ac_cv_sys_largefile_CC=' -n32'; break
4810 fi
4811 rm -f core conftest.err conftest.$ac_objext
4812 break
4813 done
4814 CC=$ac_save_CC
4815 rm -f conftest.$ac_ext
4816 fi
4817 fi
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4819 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4820 if test "$ac_cv_sys_largefile_CC" != no; then
4821 CC=$CC$ac_cv_sys_largefile_CC
4822 fi
4823
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4825 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4826 if ${ac_cv_sys_file_offset_bits+:} false; then :
4827 $as_echo_n "(cached) " >&6
4828 else
4829 while :; do
4830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831 /* end confdefs.h. */
4832 #include <sys/types.h>
4833 /* Check that off_t can represent 2**63 - 1 correctly.
4834 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4835 since some C++ compilers masquerading as C compilers
4836 incorrectly reject 9223372036854775807. */
4837 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4838 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4839 && LARGE_OFF_T % 2147483647 == 1)
4840 ? 1 : -1];
4841 int
4842 main ()
4843 {
4844
4845 ;
4846 return 0;
4847 }
4848 _ACEOF
4849 if ac_fn_c_try_compile "$LINENO"; then :
4850 ac_cv_sys_file_offset_bits=no; break
4851 fi
4852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4854 /* end confdefs.h. */
4855 #define _FILE_OFFSET_BITS 64
4856 #include <sys/types.h>
4857 /* Check that off_t can represent 2**63 - 1 correctly.
4858 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4859 since some C++ compilers masquerading as C compilers
4860 incorrectly reject 9223372036854775807. */
4861 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4862 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4863 && LARGE_OFF_T % 2147483647 == 1)
4864 ? 1 : -1];
4865 int
4866 main ()
4867 {
4868
4869 ;
4870 return 0;
4871 }
4872 _ACEOF
4873 if ac_fn_c_try_compile "$LINENO"; then :
4874 ac_cv_sys_file_offset_bits=64; break
4875 fi
4876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4877 ac_cv_sys_file_offset_bits=unknown
4878 break
4879 done
4880 fi
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4882 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4883 case $ac_cv_sys_file_offset_bits in #(
4884 no | unknown) ;;
4885 *)
4886 cat >>confdefs.h <<_ACEOF
4887 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4888 _ACEOF
4889 ;;
4890 esac
4891 rm -rf conftest*
4892 if test $ac_cv_sys_file_offset_bits = unknown; then
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4894 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4895 if ${ac_cv_sys_large_files+:} false; then :
4896 $as_echo_n "(cached) " >&6
4897 else
4898 while :; do
4899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900 /* end confdefs.h. */
4901 #include <sys/types.h>
4902 /* Check that off_t can represent 2**63 - 1 correctly.
4903 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4904 since some C++ compilers masquerading as C compilers
4905 incorrectly reject 9223372036854775807. */
4906 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4907 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4908 && LARGE_OFF_T % 2147483647 == 1)
4909 ? 1 : -1];
4910 int
4911 main ()
4912 {
4913
4914 ;
4915 return 0;
4916 }
4917 _ACEOF
4918 if ac_fn_c_try_compile "$LINENO"; then :
4919 ac_cv_sys_large_files=no; break
4920 fi
4921 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4923 /* end confdefs.h. */
4924 #define _LARGE_FILES 1
4925 #include <sys/types.h>
4926 /* Check that off_t can represent 2**63 - 1 correctly.
4927 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4928 since some C++ compilers masquerading as C compilers
4929 incorrectly reject 9223372036854775807. */
4930 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4931 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4932 && LARGE_OFF_T % 2147483647 == 1)
4933 ? 1 : -1];
4934 int
4935 main ()
4936 {
4937
4938 ;
4939 return 0;
4940 }
4941 _ACEOF
4942 if ac_fn_c_try_compile "$LINENO"; then :
4943 ac_cv_sys_large_files=1; break
4944 fi
4945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4946 ac_cv_sys_large_files=unknown
4947 break
4948 done
4949 fi
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4951 $as_echo "$ac_cv_sys_large_files" >&6; }
4952 case $ac_cv_sys_large_files in #(
4953 no | unknown) ;;
4954 *)
4955 cat >>confdefs.h <<_ACEOF
4956 #define _LARGE_FILES $ac_cv_sys_large_files
4957 _ACEOF
4958 ;;
4959 esac
4960 rm -rf conftest*
4961 fi
4962
4963
4964 fi
4965
4966
4967
4968
4969
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4971 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4972 if ${am_cv_prog_cc_stdc+:} false; then :
4973 $as_echo_n "(cached) " >&6
4974 else
4975 am_cv_prog_cc_stdc=no
4976 ac_save_CC="$CC"
4977 # Don't try gcc -ansi; that turns off useful extensions and
4978 # breaks some systems' header files.
4979 # AIX -qlanglvl=ansi
4980 # Ultrix and OSF/1 -std1
4981 # HP-UX 10.20 and later -Ae
4982 # HP-UX older versions -Aa -D_HPUX_SOURCE
4983 # SVR4 -Xc -D__EXTENSIONS__
4984 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4985 do
4986 CC="$ac_save_CC $ac_arg"
4987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4988 /* end confdefs.h. */
4989 #include <stdarg.h>
4990 #include <stdio.h>
4991 #include <sys/types.h>
4992 #include <sys/stat.h>
4993 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4994 struct buf { int x; };
4995 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4996 static char *e (p, i)
4997 char **p;
4998 int i;
4999 {
5000 return p[i];
5001 }
5002 static char *f (char * (*g) (char **, int), char **p, ...)
5003 {
5004 char *s;
5005 va_list v;
5006 va_start (v,p);
5007 s = g (p, va_arg (v,int));
5008 va_end (v);
5009 return s;
5010 }
5011 int test (int i, double x);
5012 struct s1 {int (*f) (int a);};
5013 struct s2 {int (*f) (double a);};
5014 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5015 int argc;
5016 char **argv;
5017
5018 int
5019 main ()
5020 {
5021
5022 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5023
5024 ;
5025 return 0;
5026 }
5027 _ACEOF
5028 if ac_fn_c_try_compile "$LINENO"; then :
5029 am_cv_prog_cc_stdc="$ac_arg"; break
5030 fi
5031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5032 done
5033 CC="$ac_save_CC"
5034
5035 fi
5036
5037 if test -z "$am_cv_prog_cc_stdc"; then
5038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5039 $as_echo "none needed" >&6; }
5040 else
5041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5042 $as_echo "$am_cv_prog_cc_stdc" >&6; }
5043 fi
5044 case "x$am_cv_prog_cc_stdc" in
5045 x|xno) ;;
5046 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5047 esac
5048
5049 # Expand $ac_aux_dir to an absolute path.
5050 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5051
5052 if test x"${install_sh+set}" != xset; then
5053 case $am_aux_dir in
5054 *\ * | *\ *)
5055 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5056 *)
5057 install_sh="\${SHELL} $am_aux_dir/install-sh"
5058 esac
5059 fi
5060
5061 # Installed binaries are usually stripped using 'strip' when the user
5062 # run "make install-strip". However 'strip' might not be the right
5063 # tool to use in cross-compilation environments, therefore Automake
5064 # will honor the 'STRIP' environment variable to overrule this program.
5065 if test "$cross_compiling" != no; then
5066 if test -n "$ac_tool_prefix"; then
5067 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5068 set dummy ${ac_tool_prefix}strip; ac_word=$2
5069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070 $as_echo_n "checking for $ac_word... " >&6; }
5071 if ${ac_cv_prog_STRIP+:} false; then :
5072 $as_echo_n "(cached) " >&6
5073 else
5074 if test -n "$STRIP"; then
5075 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5076 else
5077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078 for as_dir in $PATH
5079 do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
5082 for ac_exec_ext in '' $ac_executable_extensions; do
5083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5084 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086 break 2
5087 fi
5088 done
5089 done
5090 IFS=$as_save_IFS
5091
5092 fi
5093 fi
5094 STRIP=$ac_cv_prog_STRIP
5095 if test -n "$STRIP"; then
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5097 $as_echo "$STRIP" >&6; }
5098 else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100 $as_echo "no" >&6; }
5101 fi
5102
5103
5104 fi
5105 if test -z "$ac_cv_prog_STRIP"; then
5106 ac_ct_STRIP=$STRIP
5107 # Extract the first word of "strip", so it can be a program name with args.
5108 set dummy strip; ac_word=$2
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5110 $as_echo_n "checking for $ac_word... " >&6; }
5111 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5112 $as_echo_n "(cached) " >&6
5113 else
5114 if test -n "$ac_ct_STRIP"; then
5115 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5116 else
5117 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5118 for as_dir in $PATH
5119 do
5120 IFS=$as_save_IFS
5121 test -z "$as_dir" && as_dir=.
5122 for ac_exec_ext in '' $ac_executable_extensions; do
5123 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5124 ac_cv_prog_ac_ct_STRIP="strip"
5125 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5126 break 2
5127 fi
5128 done
5129 done
5130 IFS=$as_save_IFS
5131
5132 fi
5133 fi
5134 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5135 if test -n "$ac_ct_STRIP"; then
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5137 $as_echo "$ac_ct_STRIP" >&6; }
5138 else
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5140 $as_echo "no" >&6; }
5141 fi
5142
5143 if test "x$ac_ct_STRIP" = x; then
5144 STRIP=":"
5145 else
5146 case $cross_compiling:$ac_tool_warned in
5147 yes:)
5148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5149 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5150 ac_tool_warned=yes ;;
5151 esac
5152 STRIP=$ac_ct_STRIP
5153 fi
5154 else
5155 STRIP="$ac_cv_prog_STRIP"
5156 fi
5157
5158 fi
5159 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5160
5161
5162 ac_aux_dir=
5163 for ac_dir in .. "$srcdir"/..; do
5164 if test -f "$ac_dir/install-sh"; then
5165 ac_aux_dir=$ac_dir
5166 ac_install_sh="$ac_aux_dir/install-sh -c"
5167 break
5168 elif test -f "$ac_dir/install.sh"; then
5169 ac_aux_dir=$ac_dir
5170 ac_install_sh="$ac_aux_dir/install.sh -c"
5171 break
5172 elif test -f "$ac_dir/shtool"; then
5173 ac_aux_dir=$ac_dir
5174 ac_install_sh="$ac_aux_dir/shtool install -c"
5175 break
5176 fi
5177 done
5178 if test -z "$ac_aux_dir"; then
5179 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5180 fi
5181
5182 # These three variables are undocumented and unsupported,
5183 # and are intended to be withdrawn in a future Autoconf release.
5184 # They can cause serious problems if a builder's source tree is in a directory
5185 # whose full name contains unusual characters.
5186 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5187 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5188 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5189
5190
5191
5192 test "$program_prefix" != NONE &&
5193 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5194 # Use a double $ so make ignores it.
5195 test "$program_suffix" != NONE &&
5196 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5197 # Double any \ or $.
5198 # By default was `s,x,x', remove it if useless.
5199 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5200 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5201
5202
5203 # We require a C++11 compiler. Check if one is available, and if
5204 # necessary, set CXX_DIALECT to some -std=xxx switch.
5205
5206 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5207 ac_ext=cpp
5208 ac_cpp='$CXXCPP $CPPFLAGS'
5209 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5210 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5211 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5212 CXX_DIALECT=""
5213 ac_success=no
5214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5215 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5216 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5217 $as_echo_n "(cached) " >&6
5218 else
5219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5220 /* end confdefs.h. */
5221
5222
5223 // If the compiler admits that it is not ready for C++11, why torture it?
5224 // Hopefully, this will speed up the test.
5225
5226 #ifndef __cplusplus
5227
5228 #error "This is not a C++ compiler"
5229
5230 #elif __cplusplus < 201103L
5231
5232 #error "This is not a C++11 compiler"
5233
5234 #else
5235
5236 namespace cxx11
5237 {
5238
5239 namespace test_static_assert
5240 {
5241
5242 template <typename T>
5243 struct check
5244 {
5245 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5246 };
5247
5248 }
5249
5250 namespace test_final_override
5251 {
5252
5253 struct Base
5254 {
5255 virtual void f() {}
5256 };
5257
5258 struct Derived : public Base
5259 {
5260 virtual void f() override {}
5261 };
5262
5263 }
5264
5265 namespace test_double_right_angle_brackets
5266 {
5267
5268 template < typename T >
5269 struct check {};
5270
5271 typedef check<void> single_type;
5272 typedef check<check<void>> double_type;
5273 typedef check<check<check<void>>> triple_type;
5274 typedef check<check<check<check<void>>>> quadruple_type;
5275
5276 }
5277
5278 namespace test_decltype
5279 {
5280
5281 int
5282 f()
5283 {
5284 int a = 1;
5285 decltype(a) b = 2;
5286 return a + b;
5287 }
5288
5289 }
5290
5291 namespace test_type_deduction
5292 {
5293
5294 template < typename T1, typename T2 >
5295 struct is_same
5296 {
5297 static const bool value = false;
5298 };
5299
5300 template < typename T >
5301 struct is_same<T, T>
5302 {
5303 static const bool value = true;
5304 };
5305
5306 template < typename T1, typename T2 >
5307 auto
5308 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5309 {
5310 return a1 + a2;
5311 }
5312
5313 int
5314 test(const int c, volatile int v)
5315 {
5316 static_assert(is_same<int, decltype(0)>::value == true, "");
5317 static_assert(is_same<int, decltype(c)>::value == false, "");
5318 static_assert(is_same<int, decltype(v)>::value == false, "");
5319 auto ac = c;
5320 auto av = v;
5321 auto sumi = ac + av + 'x';
5322 auto sumf = ac + av + 1.0;
5323 static_assert(is_same<int, decltype(ac)>::value == true, "");
5324 static_assert(is_same<int, decltype(av)>::value == true, "");
5325 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5326 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5327 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5328 return (sumf > 0.0) ? sumi : add(c, v);
5329 }
5330
5331 }
5332
5333 namespace test_noexcept
5334 {
5335
5336 int f() { return 0; }
5337 int g() noexcept { return 0; }
5338
5339 static_assert(noexcept(f()) == false, "");
5340 static_assert(noexcept(g()) == true, "");
5341
5342 }
5343
5344 namespace test_constexpr
5345 {
5346
5347 template < typename CharT >
5348 unsigned long constexpr
5349 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5350 {
5351 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5352 }
5353
5354 template < typename CharT >
5355 unsigned long constexpr
5356 strlen_c(const CharT *const s) noexcept
5357 {
5358 return strlen_c_r(s, 0UL);
5359 }
5360
5361 static_assert(strlen_c("") == 0UL, "");
5362 static_assert(strlen_c("1") == 1UL, "");
5363 static_assert(strlen_c("example") == 7UL, "");
5364 static_assert(strlen_c("another\0example") == 7UL, "");
5365
5366 }
5367
5368 namespace test_rvalue_references
5369 {
5370
5371 template < int N >
5372 struct answer
5373 {
5374 static constexpr int value = N;
5375 };
5376
5377 answer<1> f(int&) { return answer<1>(); }
5378 answer<2> f(const int&) { return answer<2>(); }
5379 answer<3> f(int&&) { return answer<3>(); }
5380
5381 void
5382 test()
5383 {
5384 int i = 0;
5385 const int c = 0;
5386 static_assert(decltype(f(i))::value == 1, "");
5387 static_assert(decltype(f(c))::value == 2, "");
5388 static_assert(decltype(f(0))::value == 3, "");
5389 }
5390
5391 }
5392
5393 namespace test_uniform_initialization
5394 {
5395
5396 struct test
5397 {
5398 static const int zero {};
5399 static const int one {1};
5400 };
5401
5402 static_assert(test::zero == 0, "");
5403 static_assert(test::one == 1, "");
5404
5405 }
5406
5407 namespace test_lambdas
5408 {
5409
5410 void
5411 test1()
5412 {
5413 auto lambda1 = [](){};
5414 auto lambda2 = lambda1;
5415 lambda1();
5416 lambda2();
5417 }
5418
5419 int
5420 test2()
5421 {
5422 auto a = [](int i, int j){ return i + j; }(1, 2);
5423 auto b = []() -> int { return '0'; }();
5424 auto c = [=](){ return a + b; }();
5425 auto d = [&](){ return c; }();
5426 auto e = [a, &b](int x) mutable {
5427 const auto identity = [](int y){ return y; };
5428 for (auto i = 0; i < a; ++i)
5429 a += b--;
5430 return x + identity(a + b);
5431 }(0);
5432 return a + b + c + d + e;
5433 }
5434
5435 int
5436 test3()
5437 {
5438 const auto nullary = [](){ return 0; };
5439 const auto unary = [](int x){ return x; };
5440 using nullary_t = decltype(nullary);
5441 using unary_t = decltype(unary);
5442 const auto higher1st = [](nullary_t f){ return f(); };
5443 const auto higher2nd = [unary](nullary_t f1){
5444 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5445 };
5446 return higher1st(nullary) + higher2nd(nullary)(unary);
5447 }
5448
5449 }
5450
5451 namespace test_variadic_templates
5452 {
5453
5454 template <int...>
5455 struct sum;
5456
5457 template <int N0, int... N1toN>
5458 struct sum<N0, N1toN...>
5459 {
5460 static constexpr auto value = N0 + sum<N1toN...>::value;
5461 };
5462
5463 template <>
5464 struct sum<>
5465 {
5466 static constexpr auto value = 0;
5467 };
5468
5469 static_assert(sum<>::value == 0, "");
5470 static_assert(sum<1>::value == 1, "");
5471 static_assert(sum<23>::value == 23, "");
5472 static_assert(sum<1, 2>::value == 3, "");
5473 static_assert(sum<5, 5, 11>::value == 21, "");
5474 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5475
5476 }
5477
5478 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5479 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5480 // because of this.
5481 namespace test_template_alias_sfinae
5482 {
5483
5484 struct foo {};
5485
5486 template<typename T>
5487 using member = typename T::member_type;
5488
5489 template<typename T>
5490 void func(...) {}
5491
5492 template<typename T>
5493 void func(member<T>*) {}
5494
5495 void test();
5496
5497 void test() { func<foo>(0); }
5498
5499 }
5500
5501 } // namespace cxx11
5502
5503 #endif // __cplusplus >= 201103L
5504
5505
5506
5507 _ACEOF
5508 if ac_fn_cxx_try_compile "$LINENO"; then :
5509 ax_cv_cxx_compile_cxx11=yes
5510 else
5511 ax_cv_cxx_compile_cxx11=no
5512 fi
5513 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5514 fi
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5516 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5517 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5518 ac_success=yes
5519 fi
5520
5521 if test x$ac_success = xno; then
5522 for alternative in ${ax_cxx_compile_alternatives}; do
5523 switch="-std=gnu++${alternative}"
5524 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5526 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5527 if eval \${$cachevar+:} false; then :
5528 $as_echo_n "(cached) " >&6
5529 else
5530 ac_save_CXX="$CXX"
5531 CXX="$CXX $switch"
5532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5533 /* end confdefs.h. */
5534
5535
5536 // If the compiler admits that it is not ready for C++11, why torture it?
5537 // Hopefully, this will speed up the test.
5538
5539 #ifndef __cplusplus
5540
5541 #error "This is not a C++ compiler"
5542
5543 #elif __cplusplus < 201103L
5544
5545 #error "This is not a C++11 compiler"
5546
5547 #else
5548
5549 namespace cxx11
5550 {
5551
5552 namespace test_static_assert
5553 {
5554
5555 template <typename T>
5556 struct check
5557 {
5558 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5559 };
5560
5561 }
5562
5563 namespace test_final_override
5564 {
5565
5566 struct Base
5567 {
5568 virtual void f() {}
5569 };
5570
5571 struct Derived : public Base
5572 {
5573 virtual void f() override {}
5574 };
5575
5576 }
5577
5578 namespace test_double_right_angle_brackets
5579 {
5580
5581 template < typename T >
5582 struct check {};
5583
5584 typedef check<void> single_type;
5585 typedef check<check<void>> double_type;
5586 typedef check<check<check<void>>> triple_type;
5587 typedef check<check<check<check<void>>>> quadruple_type;
5588
5589 }
5590
5591 namespace test_decltype
5592 {
5593
5594 int
5595 f()
5596 {
5597 int a = 1;
5598 decltype(a) b = 2;
5599 return a + b;
5600 }
5601
5602 }
5603
5604 namespace test_type_deduction
5605 {
5606
5607 template < typename T1, typename T2 >
5608 struct is_same
5609 {
5610 static const bool value = false;
5611 };
5612
5613 template < typename T >
5614 struct is_same<T, T>
5615 {
5616 static const bool value = true;
5617 };
5618
5619 template < typename T1, typename T2 >
5620 auto
5621 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5622 {
5623 return a1 + a2;
5624 }
5625
5626 int
5627 test(const int c, volatile int v)
5628 {
5629 static_assert(is_same<int, decltype(0)>::value == true, "");
5630 static_assert(is_same<int, decltype(c)>::value == false, "");
5631 static_assert(is_same<int, decltype(v)>::value == false, "");
5632 auto ac = c;
5633 auto av = v;
5634 auto sumi = ac + av + 'x';
5635 auto sumf = ac + av + 1.0;
5636 static_assert(is_same<int, decltype(ac)>::value == true, "");
5637 static_assert(is_same<int, decltype(av)>::value == true, "");
5638 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5639 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5640 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5641 return (sumf > 0.0) ? sumi : add(c, v);
5642 }
5643
5644 }
5645
5646 namespace test_noexcept
5647 {
5648
5649 int f() { return 0; }
5650 int g() noexcept { return 0; }
5651
5652 static_assert(noexcept(f()) == false, "");
5653 static_assert(noexcept(g()) == true, "");
5654
5655 }
5656
5657 namespace test_constexpr
5658 {
5659
5660 template < typename CharT >
5661 unsigned long constexpr
5662 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5663 {
5664 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5665 }
5666
5667 template < typename CharT >
5668 unsigned long constexpr
5669 strlen_c(const CharT *const s) noexcept
5670 {
5671 return strlen_c_r(s, 0UL);
5672 }
5673
5674 static_assert(strlen_c("") == 0UL, "");
5675 static_assert(strlen_c("1") == 1UL, "");
5676 static_assert(strlen_c("example") == 7UL, "");
5677 static_assert(strlen_c("another\0example") == 7UL, "");
5678
5679 }
5680
5681 namespace test_rvalue_references
5682 {
5683
5684 template < int N >
5685 struct answer
5686 {
5687 static constexpr int value = N;
5688 };
5689
5690 answer<1> f(int&) { return answer<1>(); }
5691 answer<2> f(const int&) { return answer<2>(); }
5692 answer<3> f(int&&) { return answer<3>(); }
5693
5694 void
5695 test()
5696 {
5697 int i = 0;
5698 const int c = 0;
5699 static_assert(decltype(f(i))::value == 1, "");
5700 static_assert(decltype(f(c))::value == 2, "");
5701 static_assert(decltype(f(0))::value == 3, "");
5702 }
5703
5704 }
5705
5706 namespace test_uniform_initialization
5707 {
5708
5709 struct test
5710 {
5711 static const int zero {};
5712 static const int one {1};
5713 };
5714
5715 static_assert(test::zero == 0, "");
5716 static_assert(test::one == 1, "");
5717
5718 }
5719
5720 namespace test_lambdas
5721 {
5722
5723 void
5724 test1()
5725 {
5726 auto lambda1 = [](){};
5727 auto lambda2 = lambda1;
5728 lambda1();
5729 lambda2();
5730 }
5731
5732 int
5733 test2()
5734 {
5735 auto a = [](int i, int j){ return i + j; }(1, 2);
5736 auto b = []() -> int { return '0'; }();
5737 auto c = [=](){ return a + b; }();
5738 auto d = [&](){ return c; }();
5739 auto e = [a, &b](int x) mutable {
5740 const auto identity = [](int y){ return y; };
5741 for (auto i = 0; i < a; ++i)
5742 a += b--;
5743 return x + identity(a + b);
5744 }(0);
5745 return a + b + c + d + e;
5746 }
5747
5748 int
5749 test3()
5750 {
5751 const auto nullary = [](){ return 0; };
5752 const auto unary = [](int x){ return x; };
5753 using nullary_t = decltype(nullary);
5754 using unary_t = decltype(unary);
5755 const auto higher1st = [](nullary_t f){ return f(); };
5756 const auto higher2nd = [unary](nullary_t f1){
5757 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5758 };
5759 return higher1st(nullary) + higher2nd(nullary)(unary);
5760 }
5761
5762 }
5763
5764 namespace test_variadic_templates
5765 {
5766
5767 template <int...>
5768 struct sum;
5769
5770 template <int N0, int... N1toN>
5771 struct sum<N0, N1toN...>
5772 {
5773 static constexpr auto value = N0 + sum<N1toN...>::value;
5774 };
5775
5776 template <>
5777 struct sum<>
5778 {
5779 static constexpr auto value = 0;
5780 };
5781
5782 static_assert(sum<>::value == 0, "");
5783 static_assert(sum<1>::value == 1, "");
5784 static_assert(sum<23>::value == 23, "");
5785 static_assert(sum<1, 2>::value == 3, "");
5786 static_assert(sum<5, 5, 11>::value == 21, "");
5787 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5788
5789 }
5790
5791 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5792 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5793 // because of this.
5794 namespace test_template_alias_sfinae
5795 {
5796
5797 struct foo {};
5798
5799 template<typename T>
5800 using member = typename T::member_type;
5801
5802 template<typename T>
5803 void func(...) {}
5804
5805 template<typename T>
5806 void func(member<T>*) {}
5807
5808 void test();
5809
5810 void test() { func<foo>(0); }
5811
5812 }
5813
5814 } // namespace cxx11
5815
5816 #endif // __cplusplus >= 201103L
5817
5818
5819
5820 _ACEOF
5821 if ac_fn_cxx_try_compile "$LINENO"; then :
5822 eval $cachevar=yes
5823 else
5824 eval $cachevar=no
5825 fi
5826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5827 CXX="$ac_save_CXX"
5828 fi
5829 eval ac_res=\$$cachevar
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5831 $as_echo "$ac_res" >&6; }
5832 if eval test x\$$cachevar = xyes; then
5833 CXX_DIALECT="$switch"
5834 ac_success=yes
5835 break
5836 fi
5837 done
5838 fi
5839
5840 if test x$ac_success = xno; then
5841 for alternative in ${ax_cxx_compile_alternatives}; do
5842 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5843 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5845 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5846 if eval \${$cachevar+:} false; then :
5847 $as_echo_n "(cached) " >&6
5848 else
5849 ac_save_CXX="$CXX"
5850 CXX="$CXX $switch"
5851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5852 /* end confdefs.h. */
5853
5854
5855 // If the compiler admits that it is not ready for C++11, why torture it?
5856 // Hopefully, this will speed up the test.
5857
5858 #ifndef __cplusplus
5859
5860 #error "This is not a C++ compiler"
5861
5862 #elif __cplusplus < 201103L
5863
5864 #error "This is not a C++11 compiler"
5865
5866 #else
5867
5868 namespace cxx11
5869 {
5870
5871 namespace test_static_assert
5872 {
5873
5874 template <typename T>
5875 struct check
5876 {
5877 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5878 };
5879
5880 }
5881
5882 namespace test_final_override
5883 {
5884
5885 struct Base
5886 {
5887 virtual void f() {}
5888 };
5889
5890 struct Derived : public Base
5891 {
5892 virtual void f() override {}
5893 };
5894
5895 }
5896
5897 namespace test_double_right_angle_brackets
5898 {
5899
5900 template < typename T >
5901 struct check {};
5902
5903 typedef check<void> single_type;
5904 typedef check<check<void>> double_type;
5905 typedef check<check<check<void>>> triple_type;
5906 typedef check<check<check<check<void>>>> quadruple_type;
5907
5908 }
5909
5910 namespace test_decltype
5911 {
5912
5913 int
5914 f()
5915 {
5916 int a = 1;
5917 decltype(a) b = 2;
5918 return a + b;
5919 }
5920
5921 }
5922
5923 namespace test_type_deduction
5924 {
5925
5926 template < typename T1, typename T2 >
5927 struct is_same
5928 {
5929 static const bool value = false;
5930 };
5931
5932 template < typename T >
5933 struct is_same<T, T>
5934 {
5935 static const bool value = true;
5936 };
5937
5938 template < typename T1, typename T2 >
5939 auto
5940 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5941 {
5942 return a1 + a2;
5943 }
5944
5945 int
5946 test(const int c, volatile int v)
5947 {
5948 static_assert(is_same<int, decltype(0)>::value == true, "");
5949 static_assert(is_same<int, decltype(c)>::value == false, "");
5950 static_assert(is_same<int, decltype(v)>::value == false, "");
5951 auto ac = c;
5952 auto av = v;
5953 auto sumi = ac + av + 'x';
5954 auto sumf = ac + av + 1.0;
5955 static_assert(is_same<int, decltype(ac)>::value == true, "");
5956 static_assert(is_same<int, decltype(av)>::value == true, "");
5957 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5958 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5959 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5960 return (sumf > 0.0) ? sumi : add(c, v);
5961 }
5962
5963 }
5964
5965 namespace test_noexcept
5966 {
5967
5968 int f() { return 0; }
5969 int g() noexcept { return 0; }
5970
5971 static_assert(noexcept(f()) == false, "");
5972 static_assert(noexcept(g()) == true, "");
5973
5974 }
5975
5976 namespace test_constexpr
5977 {
5978
5979 template < typename CharT >
5980 unsigned long constexpr
5981 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5982 {
5983 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5984 }
5985
5986 template < typename CharT >
5987 unsigned long constexpr
5988 strlen_c(const CharT *const s) noexcept
5989 {
5990 return strlen_c_r(s, 0UL);
5991 }
5992
5993 static_assert(strlen_c("") == 0UL, "");
5994 static_assert(strlen_c("1") == 1UL, "");
5995 static_assert(strlen_c("example") == 7UL, "");
5996 static_assert(strlen_c("another\0example") == 7UL, "");
5997
5998 }
5999
6000 namespace test_rvalue_references
6001 {
6002
6003 template < int N >
6004 struct answer
6005 {
6006 static constexpr int value = N;
6007 };
6008
6009 answer<1> f(int&) { return answer<1>(); }
6010 answer<2> f(const int&) { return answer<2>(); }
6011 answer<3> f(int&&) { return answer<3>(); }
6012
6013 void
6014 test()
6015 {
6016 int i = 0;
6017 const int c = 0;
6018 static_assert(decltype(f(i))::value == 1, "");
6019 static_assert(decltype(f(c))::value == 2, "");
6020 static_assert(decltype(f(0))::value == 3, "");
6021 }
6022
6023 }
6024
6025 namespace test_uniform_initialization
6026 {
6027
6028 struct test
6029 {
6030 static const int zero {};
6031 static const int one {1};
6032 };
6033
6034 static_assert(test::zero == 0, "");
6035 static_assert(test::one == 1, "");
6036
6037 }
6038
6039 namespace test_lambdas
6040 {
6041
6042 void
6043 test1()
6044 {
6045 auto lambda1 = [](){};
6046 auto lambda2 = lambda1;
6047 lambda1();
6048 lambda2();
6049 }
6050
6051 int
6052 test2()
6053 {
6054 auto a = [](int i, int j){ return i + j; }(1, 2);
6055 auto b = []() -> int { return '0'; }();
6056 auto c = [=](){ return a + b; }();
6057 auto d = [&](){ return c; }();
6058 auto e = [a, &b](int x) mutable {
6059 const auto identity = [](int y){ return y; };
6060 for (auto i = 0; i < a; ++i)
6061 a += b--;
6062 return x + identity(a + b);
6063 }(0);
6064 return a + b + c + d + e;
6065 }
6066
6067 int
6068 test3()
6069 {
6070 const auto nullary = [](){ return 0; };
6071 const auto unary = [](int x){ return x; };
6072 using nullary_t = decltype(nullary);
6073 using unary_t = decltype(unary);
6074 const auto higher1st = [](nullary_t f){ return f(); };
6075 const auto higher2nd = [unary](nullary_t f1){
6076 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6077 };
6078 return higher1st(nullary) + higher2nd(nullary)(unary);
6079 }
6080
6081 }
6082
6083 namespace test_variadic_templates
6084 {
6085
6086 template <int...>
6087 struct sum;
6088
6089 template <int N0, int... N1toN>
6090 struct sum<N0, N1toN...>
6091 {
6092 static constexpr auto value = N0 + sum<N1toN...>::value;
6093 };
6094
6095 template <>
6096 struct sum<>
6097 {
6098 static constexpr auto value = 0;
6099 };
6100
6101 static_assert(sum<>::value == 0, "");
6102 static_assert(sum<1>::value == 1, "");
6103 static_assert(sum<23>::value == 23, "");
6104 static_assert(sum<1, 2>::value == 3, "");
6105 static_assert(sum<5, 5, 11>::value == 21, "");
6106 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6107
6108 }
6109
6110 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6111 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6112 // because of this.
6113 namespace test_template_alias_sfinae
6114 {
6115
6116 struct foo {};
6117
6118 template<typename T>
6119 using member = typename T::member_type;
6120
6121 template<typename T>
6122 void func(...) {}
6123
6124 template<typename T>
6125 void func(member<T>*) {}
6126
6127 void test();
6128
6129 void test() { func<foo>(0); }
6130
6131 }
6132
6133 } // namespace cxx11
6134
6135 #endif // __cplusplus >= 201103L
6136
6137
6138
6139 _ACEOF
6140 if ac_fn_cxx_try_compile "$LINENO"; then :
6141 eval $cachevar=yes
6142 else
6143 eval $cachevar=no
6144 fi
6145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6146 CXX="$ac_save_CXX"
6147 fi
6148 eval ac_res=\$$cachevar
6149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6150 $as_echo "$ac_res" >&6; }
6151 if eval test x\$$cachevar = xyes; then
6152 CXX_DIALECT="$switch"
6153 ac_success=yes
6154 break
6155 fi
6156 done
6157 if test x$ac_success = xyes; then
6158 break
6159 fi
6160 done
6161 fi
6162 ac_ext=c
6163 ac_cpp='$CPP $CPPFLAGS'
6164 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6165 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6166 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6167
6168 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6169 if test x$ac_success = xno; then
6170 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6171 fi
6172 fi
6173 if test x$ac_success = xno; then
6174 HAVE_CXX11=0
6175 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6176 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6177 else
6178 HAVE_CXX11=1
6179
6180 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6181
6182 fi
6183
6184
6185
6186
6187 # Dependency checking.
6188 rm -rf .tst 2>/dev/null
6189 mkdir .tst 2>/dev/null
6190 if test -d .tst; then
6191 am__leading_dot=.
6192 else
6193 am__leading_dot=_
6194 fi
6195 rmdir .tst 2>/dev/null
6196
6197 DEPDIR="${am__leading_dot}deps"
6198
6199 ac_config_commands="$ac_config_commands depdir"
6200
6201
6202 depcc="$CC" am_compiler_list=
6203
6204 am_depcomp=$ac_aux_dir/depcomp
6205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6206 $as_echo_n "checking dependency style of $depcc... " >&6; }
6207 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6208 $as_echo_n "(cached) " >&6
6209 else
6210 if test -f "$am_depcomp"; then
6211 # We make a subdir and do the tests there. Otherwise we can end up
6212 # making bogus files that we don't know about and never remove. For
6213 # instance it was reported that on HP-UX the gcc test will end up
6214 # making a dummy file named `D' -- because `-MD' means `put the output
6215 # in D'.
6216 mkdir conftest.dir
6217 # Copy depcomp to subdir because otherwise we won't find it if we're
6218 # using a relative directory.
6219 cp "$am_depcomp" conftest.dir
6220 cd conftest.dir
6221 # We will build objects and dependencies in a subdirectory because
6222 # it helps to detect inapplicable dependency modes. For instance
6223 # both Tru64's cc and ICC support -MD to output dependencies as a
6224 # side effect of compilation, but ICC will put the dependencies in
6225 # the current directory while Tru64 will put them in the object
6226 # directory.
6227 mkdir sub
6228
6229 am_cv_CC_dependencies_compiler_type=none
6230 if test "$am_compiler_list" = ""; then
6231 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6232 fi
6233 for depmode in $am_compiler_list; do
6234 if test $depmode = none; then break; fi
6235
6236 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6237 # Setup a source with many dependencies, because some compilers
6238 # like to wrap large dependency lists on column 80 (with \), and
6239 # we should not choose a depcomp mode which is confused by this.
6240 #
6241 # We need to recreate these files for each test, as the compiler may
6242 # overwrite some of them when testing with obscure command lines.
6243 # This happens at least with the AIX C compiler.
6244 : > sub/conftest.c
6245 for i in 1 2 3 4 5 6; do
6246 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6247 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6248 # Solaris 8's {/usr,}/bin/sh.
6249 touch sub/conftst$i.h
6250 done
6251 echo "include sub/conftest.Po" > confmf
6252
6253 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6254 # mode. It turns out that the SunPro C++ compiler does not properly
6255 # handle `-M -o', and we need to detect this.
6256 depcmd="depmode=$depmode \
6257 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6258 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6259 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6260 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6261 if env $depcmd > conftest.err 2>&1 &&
6262 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6263 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6264 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6265 # icc doesn't choke on unknown options, it will just issue warnings
6266 # or remarks (even with -Werror). So we grep stderr for any message
6267 # that says an option was ignored or not supported.
6268 # When given -MP, icc 7.0 and 7.1 complain thusly:
6269 # icc: Command line warning: ignoring option '-M'; no argument required
6270 # The diagnosis changed in icc 8.0:
6271 # icc: Command line remark: option '-MP' not supported
6272 if (grep 'ignoring option' conftest.err ||
6273 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6274 am_cv_CC_dependencies_compiler_type=$depmode
6275 $as_echo "$as_me:$LINENO: success" >&5
6276 break
6277 fi
6278 fi
6279 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6280 sed -e 's/^/| /' < conftest.err >&5
6281 done
6282
6283 cd ..
6284 rm -rf conftest.dir
6285 else
6286 am_cv_CC_dependencies_compiler_type=none
6287 fi
6288
6289 fi
6290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6291 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6292 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6293 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6294 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6295
6296 fi
6297
6298
6299
6300 CONFIG_OBS=
6301 CONFIG_DEPS=
6302 CONFIG_SRCS=
6303 ENABLE_CFLAGS=
6304
6305 CONFIG_ALL=
6306 CONFIG_CLEAN=
6307 CONFIG_INSTALL=
6308 CONFIG_UNINSTALL=
6309
6310 # If we haven't got the data from the intl directory,
6311 # assume NLS is disabled.
6312 USE_NLS=no
6313 LIBINTL=
6314 LIBINTL_DEP=
6315 INCINTL=
6316 XGETTEXT=
6317 GMSGFMT=
6318 POSUB=
6319
6320 if test -f ../intl/config.intl; then
6321 . ../intl/config.intl
6322 fi
6323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6324 $as_echo_n "checking whether NLS is requested... " >&6; }
6325 if test x"$USE_NLS" != xyes; then
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6327 $as_echo "no" >&6; }
6328 else
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6330 $as_echo "yes" >&6; }
6331
6332 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6333
6334
6335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6336 $as_echo_n "checking for catalogs to be installed... " >&6; }
6337 # Look for .po and .gmo files in the source directory.
6338 CATALOGS=
6339 XLINGUAS=
6340 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6341 # If there aren't any .gmo files the shell will give us the
6342 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6343 # weeded out.
6344 case "$cat" in *\**)
6345 continue;;
6346 esac
6347 # The quadruple backslash is collapsed to a double backslash
6348 # by the backticks, then collapsed again by the double quotes,
6349 # leaving us with one backslash in the sed expression (right
6350 # before the dot that mustn't act as a wildcard).
6351 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6352 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6353 # The user is allowed to set LINGUAS to a list of languages to
6354 # install catalogs for. If it's empty that means "all of them."
6355 if test "x$LINGUAS" = x; then
6356 CATALOGS="$CATALOGS $cat"
6357 XLINGUAS="$XLINGUAS $lang"
6358 else
6359 case "$LINGUAS" in *$lang*)
6360 CATALOGS="$CATALOGS $cat"
6361 XLINGUAS="$XLINGUAS $lang"
6362 ;;
6363 esac
6364 fi
6365 done
6366 LINGUAS="$XLINGUAS"
6367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6368 $as_echo "$LINGUAS" >&6; }
6369
6370
6371 DATADIRNAME=share
6372
6373 INSTOBJEXT=.mo
6374
6375 GENCAT=gencat
6376
6377 CATOBJEXT=.gmo
6378
6379 fi
6380
6381 localedir='${datadir}/locale'
6382
6383
6384 if test x"$USE_NLS" = xyes; then
6385 CONFIG_ALL="$CONFIG_ALL all-po"
6386 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6387 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6388 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6389 fi
6390
6391 PACKAGE=gdb
6392
6393 cat >>confdefs.h <<_ACEOF
6394 #define PACKAGE "$PACKAGE"
6395 _ACEOF
6396
6397
6398
6399 # We never need to detect it in this sub-configure.
6400 # But preserve it for config.status --recheck.
6401
6402
6403
6404 MAKEINFO_EXTRA_FLAGS=""
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6406 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6407 if ${gdb_cv_have_makeinfo_click+:} false; then :
6408 $as_echo_n "(cached) " >&6
6409 else
6410 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6411 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6412 gdb_cv_have_makeinfo_click=yes
6413 else
6414 gdb_cv_have_makeinfo_click=no
6415 fi
6416 fi
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6418 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6419 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6420 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6421 fi
6422
6423
6424
6425
6426 # Check whether --with-separate-debug-dir was given.
6427 if test "${with_separate_debug_dir+set}" = set; then :
6428 withval=$with_separate_debug_dir;
6429 DEBUGDIR=$withval
6430 else
6431 DEBUGDIR=${libdir}/debug
6432 fi
6433
6434
6435 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6436 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6437 ac_define_dir=`eval echo $DEBUGDIR`
6438 ac_define_dir=`eval echo $ac_define_dir`
6439
6440 cat >>confdefs.h <<_ACEOF
6441 #define DEBUGDIR "$ac_define_dir"
6442 _ACEOF
6443
6444
6445
6446
6447 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6448 if test "x$prefix" = xNONE; then
6449 test_prefix=/usr/local
6450 else
6451 test_prefix=$prefix
6452 fi
6453 else
6454 test_prefix=$exec_prefix
6455 fi
6456 value=0
6457 case ${ac_define_dir} in
6458 "${test_prefix}"|"${test_prefix}/"*|\
6459 '${exec_prefix}'|'${exec_prefix}/'*)
6460 value=1
6461 ;;
6462 esac
6463
6464 cat >>confdefs.h <<_ACEOF
6465 #define DEBUGDIR_RELOCATABLE $value
6466 _ACEOF
6467
6468
6469
6470
6471 # We can't pass paths as command line arguments.
6472 # Mingw32 tries to be clever and will convert the paths for us.
6473 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6474 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6475 # This breaks GDB's relocatable path conversions since paths passed in
6476 # config.h would not get so translated, the path prefixes no longer match.
6477
6478 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6479 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6480 ac_define_dir=`eval echo $bindir`
6481 ac_define_dir=`eval echo $ac_define_dir`
6482
6483 cat >>confdefs.h <<_ACEOF
6484 #define BINDIR "$ac_define_dir"
6485 _ACEOF
6486
6487
6488
6489 # GDB's datadir relocation
6490
6491
6492
6493 # Check whether --with-gdb-datadir was given.
6494 if test "${with_gdb_datadir+set}" = set; then :
6495 withval=$with_gdb_datadir;
6496 GDB_DATADIR=$withval
6497 else
6498 GDB_DATADIR=${datadir}/gdb
6499 fi
6500
6501
6502 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6503 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6504 ac_define_dir=`eval echo $GDB_DATADIR`
6505 ac_define_dir=`eval echo $ac_define_dir`
6506
6507 cat >>confdefs.h <<_ACEOF
6508 #define GDB_DATADIR "$ac_define_dir"
6509 _ACEOF
6510
6511
6512
6513
6514 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6515 if test "x$prefix" = xNONE; then
6516 test_prefix=/usr/local
6517 else
6518 test_prefix=$prefix
6519 fi
6520 else
6521 test_prefix=$exec_prefix
6522 fi
6523 value=0
6524 case ${ac_define_dir} in
6525 "${test_prefix}"|"${test_prefix}/"*|\
6526 '${exec_prefix}'|'${exec_prefix}/'*)
6527 value=1
6528 ;;
6529 esac
6530
6531 cat >>confdefs.h <<_ACEOF
6532 #define GDB_DATADIR_RELOCATABLE $value
6533 _ACEOF
6534
6535
6536
6537
6538
6539 # Check whether --with-relocated-sources was given.
6540 if test "${with_relocated_sources+set}" = set; then :
6541 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6542
6543 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6544 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6545 ac_define_dir=`eval echo $reloc_srcdir`
6546 ac_define_dir=`eval echo $ac_define_dir`
6547
6548 cat >>confdefs.h <<_ACEOF
6549 #define RELOC_SRCDIR "$ac_define_dir"
6550 _ACEOF
6551
6552
6553
6554 fi
6555
6556
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6558 $as_echo_n "checking for default auto-load directory... " >&6; }
6559
6560 # Check whether --with-auto-load-dir was given.
6561 if test "${with_auto_load_dir+set}" = set; then :
6562 withval=$with_auto_load_dir;
6563 else
6564 with_auto_load_dir='$debugdir:$datadir/auto-load'
6565 fi
6566
6567 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6568
6569 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6570 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6571 ac_define_dir=`eval echo $escape_dir`
6572 ac_define_dir=`eval echo $ac_define_dir`
6573
6574 cat >>confdefs.h <<_ACEOF
6575 #define AUTO_LOAD_DIR "$ac_define_dir"
6576 _ACEOF
6577
6578
6579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6580 $as_echo "$with_auto_load_dir" >&6; }
6581
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6583 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6584
6585 # Check whether --with-auto-load-safe-path was given.
6586 if test "${with_auto_load_safe_path+set}" = set; then :
6587 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6588 with_auto_load_safe_path="/"
6589 fi
6590 else
6591 with_auto_load_safe_path="$with_auto_load_dir"
6592 fi
6593
6594 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6595
6596 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6597 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6598 ac_define_dir=`eval echo $escape_dir`
6599 ac_define_dir=`eval echo $ac_define_dir`
6600
6601 cat >>confdefs.h <<_ACEOF
6602 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6603 _ACEOF
6604
6605
6606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6607 $as_echo "$with_auto_load_safe_path" >&6; }
6608
6609
6610
6611 subdirs="$subdirs testsuite"
6612
6613
6614 # Check whether to support alternative target configurations
6615 # Check whether --enable-targets was given.
6616 if test "${enable_targets+set}" = set; then :
6617 enableval=$enable_targets; case "${enableval}" in
6618 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6619 ;;
6620 no) enable_targets= ;;
6621 *) enable_targets=$enableval ;;
6622 esac
6623 fi
6624
6625
6626 # Check whether to enable 64-bit support on 32-bit hosts
6627 # Check whether --enable-64-bit-bfd was given.
6628 if test "${enable_64_bit_bfd+set}" = set; then :
6629 enableval=$enable_64_bit_bfd; case "${enableval}" in
6630 yes) want64=true ;;
6631 no) want64=false ;;
6632 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6633 esac
6634 else
6635 want64=false
6636 fi
6637
6638 # Provide defaults for some variables set by the per-host and per-target
6639 # configuration.
6640 gdb_host_obs=posix-hdep.o
6641
6642 if test "${target}" = "${host}"; then
6643 gdb_native=yes
6644 else
6645 gdb_native=no
6646 fi
6647
6648 . $srcdir/configure.host
6649
6650 # Accumulate some settings from configure.tgt over all enabled targets
6651
6652 TARGET_OBS=
6653 all_targets=
6654 HAVE_NATIVE_GCORE_TARGET=
6655
6656 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6657 do
6658 if test "$targ_alias" = "all"; then
6659 all_targets=true
6660 else
6661 # Canonicalize the secondary target names.
6662 result=`$ac_config_sub $targ_alias 2>/dev/null`
6663 if test -n "$result"; then
6664 targ=$result
6665 else
6666 targ=$targ_alias
6667 fi
6668
6669 . ${srcdir}/configure.tgt
6670
6671 if test -z "${gdb_target_obs}"; then :
6672 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6673 fi
6674
6675 # Target-specific object files
6676 for i in ${gdb_target_obs}; do
6677 case " $TARGET_OBS " in
6678 *" ${i} "*) ;;
6679 *)
6680 TARGET_OBS="$TARGET_OBS ${i}"
6681 ;;
6682 esac
6683 done
6684
6685 # Check whether this target needs 64-bit CORE_ADDR
6686 if test x${want64} = xfalse; then
6687 . ${srcdir}/../bfd/config.bfd
6688 fi
6689
6690 # Check whether this target is native and supports gcore.
6691 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6692 && $gdb_have_gcore; then
6693 HAVE_NATIVE_GCORE_TARGET=1
6694 fi
6695 fi
6696 done
6697
6698 if test x${all_targets} = xtrue; then
6699
6700 # We want all 64-bit targets if we either:
6701 # - run on a 64-bit host or
6702 # - already require 64-bit support for some other target or
6703 # - the --enable-64-bit-bfd option was supplied
6704 # Otherwise we only support all 32-bit targets.
6705 #
6706 # NOTE: This test must be in sync with the corresponding
6707 # tests in BFD!
6708
6709 if test x${want64} = xfalse; then
6710 # The cast to long int works around a bug in the HP C Compiler
6711 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6712 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6713 # This bug is HP SR number 8606223364.
6714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6715 $as_echo_n "checking size of long... " >&6; }
6716 if ${ac_cv_sizeof_long+:} false; then :
6717 $as_echo_n "(cached) " >&6
6718 else
6719 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6720
6721 else
6722 if test "$ac_cv_type_long" = yes; then
6723 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6724 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6725 as_fn_error 77 "cannot compute sizeof (long)
6726 See \`config.log' for more details" "$LINENO" 5; }
6727 else
6728 ac_cv_sizeof_long=0
6729 fi
6730 fi
6731
6732 fi
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6734 $as_echo "$ac_cv_sizeof_long" >&6; }
6735
6736
6737
6738 cat >>confdefs.h <<_ACEOF
6739 #define SIZEOF_LONG $ac_cv_sizeof_long
6740 _ACEOF
6741
6742
6743 if test "x${ac_cv_sizeof_long}" = "x8"; then
6744 want64=true
6745 fi
6746 fi
6747 if test x${want64} = xtrue; then
6748 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6749 else
6750 TARGET_OBS='$(ALL_TARGET_OBS)'
6751 fi
6752 fi
6753
6754
6755
6756
6757 # For other settings, only the main target counts.
6758 gdb_sim=
6759 gdb_osabi=
6760 targ=$target; . ${srcdir}/configure.tgt
6761
6762 # Fetch the default architecture and default target vector from BFD.
6763 targ=$target; . $srcdir/../bfd/config.bfd
6764
6765 # We only want the first architecture, so strip off the others if
6766 # there is more than one.
6767 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6768
6769 if test "x$targ_archs" != x; then
6770
6771 cat >>confdefs.h <<_ACEOF
6772 #define DEFAULT_BFD_ARCH $targ_archs
6773 _ACEOF
6774
6775 fi
6776 if test "x$targ_defvec" != x; then
6777
6778 cat >>confdefs.h <<_ACEOF
6779 #define DEFAULT_BFD_VEC $targ_defvec
6780 _ACEOF
6781
6782 fi
6783
6784 # Enable MI.
6785 # Check whether --enable-gdbmi was given.
6786 if test "${enable_gdbmi+set}" = set; then :
6787 enableval=$enable_gdbmi; case $enableval in
6788 yes | no)
6789 ;;
6790 *)
6791 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6792 esac
6793 else
6794 enable_gdbmi=yes
6795 fi
6796
6797 if test x"$enable_gdbmi" = xyes; then
6798 if test -d "$srcdir/mi"; then
6799 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6800 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6801 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6802 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6803 fi
6804 fi
6805
6806 # Enable TUI.
6807 # Check whether --enable-tui was given.
6808 if test "${enable_tui+set}" = set; then :
6809 enableval=$enable_tui; case $enableval in
6810 yes | no | auto)
6811 ;;
6812 *)
6813 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6814 esac
6815 else
6816 enable_tui=auto
6817 fi
6818
6819
6820 # Enable gdbtk.
6821 # Check whether --enable-gdbtk was given.
6822 if test "${enable_gdbtk+set}" = set; then :
6823 enableval=$enable_gdbtk; case $enableval in
6824 yes | no)
6825 ;;
6826 *)
6827 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6828 esac
6829 else
6830 if test -d "$srcdir/gdbtk"; then
6831 enable_gdbtk=yes
6832 else
6833 enable_gdbtk=no
6834 fi
6835 fi
6836
6837 # We unconditionally disable gdbtk tests on selected platforms.
6838 case $host_os in
6839 go32* | windows*)
6840 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6841 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6842 enable_gdbtk=no ;;
6843 esac
6844
6845 # Handle optional debuginfod support
6846
6847 # Enable debuginfod
6848
6849 # Check whether --with-debuginfod was given.
6850 if test "${with_debuginfod+set}" = set; then :
6851 withval=$with_debuginfod;
6852 else
6853 with_debuginfod=auto
6854 fi
6855
6856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6857 $as_echo_n "checking whether to use debuginfod... " >&6; }
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6859 $as_echo "$with_debuginfod" >&6; }
6860
6861 if test "${with_debuginfod}" = no; then
6862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
6863 $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
6864 else
6865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debuginfod_begin in -ldebuginfod" >&5
6866 $as_echo_n "checking for debuginfod_begin in -ldebuginfod... " >&6; }
6867 if ${ac_cv_lib_debuginfod_debuginfod_begin+:} false; then :
6868 $as_echo_n "(cached) " >&6
6869 else
6870 ac_check_lib_save_LIBS=$LIBS
6871 LIBS="-ldebuginfod $LIBS"
6872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6873 /* end confdefs.h. */
6874
6875 /* Override any GCC internal prototype to avoid an error.
6876 Use char because int might match the return type of a GCC
6877 builtin and then its argument prototype would still apply. */
6878 #ifdef __cplusplus
6879 extern "C"
6880 #endif
6881 char debuginfod_begin ();
6882 int
6883 main ()
6884 {
6885 return debuginfod_begin ();
6886 ;
6887 return 0;
6888 }
6889 _ACEOF
6890 if ac_fn_c_try_link "$LINENO"; then :
6891 ac_cv_lib_debuginfod_debuginfod_begin=yes
6892 else
6893 ac_cv_lib_debuginfod_debuginfod_begin=no
6894 fi
6895 rm -f core conftest.err conftest.$ac_objext \
6896 conftest$ac_exeext conftest.$ac_ext
6897 LIBS=$ac_check_lib_save_LIBS
6898 fi
6899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_debuginfod_debuginfod_begin" >&5
6900 $as_echo "$ac_cv_lib_debuginfod_debuginfod_begin" >&6; }
6901 if test "x$ac_cv_lib_debuginfod_debuginfod_begin" = xyes; then :
6902 have_debuginfod_lib=yes
6903 fi
6904
6905 ac_fn_c_check_decl "$LINENO" "debuginfod_begin" "ac_cv_have_decl_debuginfod_begin" "#include <elfutils/debuginfod.h>
6906 "
6907 if test "x$ac_cv_have_decl_debuginfod_begin" = xyes; then :
6908 have_debuginfod_h=yes
6909 fi
6910
6911 if test "x$have_debuginfod_lib" = "xyes" -a \
6912 "x$have_debuginfod_h" = "xyes"; then
6913
6914 $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
6915
6916 LIBDEBUGINFOD="-ldebuginfod"
6917
6918 else
6919
6920 if test "$with_debuginfod" = yes; then
6921 as_fn_error $? "debuginfod is missing or unusable" "$LINENO" 5
6922 else
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod is missing or unusable; some features may be unavailable." >&5
6924 $as_echo "$as_me: WARNING: debuginfod is missing or unusable; some features may be unavailable." >&2;}
6925 fi
6926 fi
6927 fi
6928
6929
6930 # Libunwind support for ia64.
6931
6932 # Check whether --with-libunwind-ia64 was given.
6933 if test "${with_libunwind_ia64+set}" = set; then :
6934 withval=$with_libunwind_ia64;
6935 else
6936 with_libunwind_ia64=auto
6937 fi
6938
6939
6940 # Backward compatibility option.
6941 if test "${with_libunwind+set}" = set; then
6942 if test x"$with_libunwind_ia64" != xauto; then
6943 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6944 fi
6945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6946 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6947 with_libunwind_ia64="$with_libunwind"
6948 fi
6949
6950 case "$with_libunwind_ia64" in
6951 yes | no)
6952 ;;
6953 auto)
6954 for ac_header in libunwind-ia64.h
6955 do :
6956 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6957 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6958 cat >>confdefs.h <<_ACEOF
6959 #define HAVE_LIBUNWIND_IA64_H 1
6960 _ACEOF
6961
6962 fi
6963
6964 done
6965
6966 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6967 ;;
6968 *)
6969 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6970 ;;
6971 esac
6972
6973 if test x"$with_libunwind_ia64" = xyes; then
6974 for ac_header in libunwind-ia64.h
6975 do :
6976 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6977 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6978 cat >>confdefs.h <<_ACEOF
6979 #define HAVE_LIBUNWIND_IA64_H 1
6980 _ACEOF
6981
6982 fi
6983
6984 done
6985
6986 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6987 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6988 fi
6989 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6990 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6991 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6992 fi
6993
6994 opt_curses=no
6995
6996 # Check whether --with-curses was given.
6997 if test "${with_curses+set}" = set; then :
6998 withval=$with_curses; opt_curses=$withval
6999 fi
7000
7001
7002 prefer_curses=no
7003 if test "$opt_curses" = "yes"; then
7004 prefer_curses=yes
7005 fi
7006
7007 # Profiling support.
7008 # Check whether --enable-profiling was given.
7009 if test "${enable_profiling+set}" = set; then :
7010 enableval=$enable_profiling; case $enableval in
7011 yes | no)
7012 ;;
7013 *)
7014 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
7015 esac
7016 else
7017 enable_profiling=no
7018 fi
7019
7020
7021 for ac_func in monstartup _mcleanup
7022 do :
7023 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7024 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7025 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7026 cat >>confdefs.h <<_ACEOF
7027 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7028 _ACEOF
7029
7030 fi
7031 done
7032
7033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7034 $as_echo_n "checking for _etext... " >&6; }
7035 if ${ac_cv_var__etext+:} false; then :
7036 $as_echo_n "(cached) " >&6
7037 else
7038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7039 /* end confdefs.h. */
7040 #include <stdlib.h>
7041 extern char _etext;
7042
7043 int
7044 main ()
7045 {
7046 free (&_etext);
7047 ;
7048 return 0;
7049 }
7050 _ACEOF
7051 if ac_fn_c_try_link "$LINENO"; then :
7052 ac_cv_var__etext=yes
7053 else
7054 ac_cv_var__etext=no
7055 fi
7056 rm -f core conftest.err conftest.$ac_objext \
7057 conftest$ac_exeext conftest.$ac_ext
7058 fi
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7060 $as_echo "$ac_cv_var__etext" >&6; }
7061 if test "$ac_cv_var__etext" = yes; then
7062
7063 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7064
7065 fi
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7067 $as_echo_n "checking for etext... " >&6; }
7068 if ${ac_cv_var_etext+:} false; then :
7069 $as_echo_n "(cached) " >&6
7070 else
7071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7072 /* end confdefs.h. */
7073 #include <stdlib.h>
7074 extern char etext;
7075
7076 int
7077 main ()
7078 {
7079 free (&etext);
7080 ;
7081 return 0;
7082 }
7083 _ACEOF
7084 if ac_fn_c_try_link "$LINENO"; then :
7085 ac_cv_var_etext=yes
7086 else
7087 ac_cv_var_etext=no
7088 fi
7089 rm -f core conftest.err conftest.$ac_objext \
7090 conftest$ac_exeext conftest.$ac_ext
7091 fi
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7093 $as_echo "$ac_cv_var_etext" >&6; }
7094 if test "$ac_cv_var_etext" = yes; then
7095
7096 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7097
7098 fi
7099 if test "$enable_profiling" = yes ; then
7100 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7101 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7102 fi
7103 PROFILE_CFLAGS=-pg
7104 OLD_CFLAGS="$CFLAGS"
7105 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7106
7107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7108 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7109 if ${ac_cv_cc_supports_pg+:} false; then :
7110 $as_echo_n "(cached) " >&6
7111 else
7112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7113 /* end confdefs.h. */
7114
7115 int
7116 main ()
7117 {
7118 int x;
7119 ;
7120 return 0;
7121 }
7122 _ACEOF
7123 if ac_fn_c_try_compile "$LINENO"; then :
7124 ac_cv_cc_supports_pg=yes
7125 else
7126 ac_cv_cc_supports_pg=no
7127 fi
7128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7129 fi
7130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7131 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7132
7133 if test "$ac_cv_cc_supports_pg" = no; then
7134 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7135 fi
7136
7137 CFLAGS="$OLD_CFLAGS"
7138 fi
7139
7140 CODESIGN_CERT=
7141 # Check whether --enable-codesign was given.
7142 if test "${enable_codesign+set}" = set; then :
7143 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7144 fi
7145
7146
7147
7148
7149
7150 # Check whether --with-pkgversion was given.
7151 if test "${with_pkgversion+set}" = set; then :
7152 withval=$with_pkgversion; case "$withval" in
7153 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7154 no) PKGVERSION= ;;
7155 *) PKGVERSION="($withval) " ;;
7156 esac
7157 else
7158 PKGVERSION="(GDB) "
7159
7160 fi
7161
7162
7163
7164
7165
7166 # Check whether --with-bugurl was given.
7167 if test "${with_bugurl+set}" = set; then :
7168 withval=$with_bugurl; case "$withval" in
7169 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7170 no) BUGURL=
7171 ;;
7172 *) BUGURL="$withval"
7173 ;;
7174 esac
7175 else
7176 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7177
7178 fi
7179
7180 case ${BUGURL} in
7181 "")
7182 REPORT_BUGS_TO=
7183 REPORT_BUGS_TEXI=
7184 ;;
7185 *)
7186 REPORT_BUGS_TO="<$BUGURL>"
7187 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7188 ;;
7189 esac;
7190
7191
7192
7193
7194 cat >>confdefs.h <<_ACEOF
7195 #define PKGVERSION "$PKGVERSION"
7196 _ACEOF
7197
7198
7199 cat >>confdefs.h <<_ACEOF
7200 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7201 _ACEOF
7202
7203
7204 # --------------------- #
7205 # Checks for programs. #
7206 # --------------------- #
7207
7208 for ac_prog in gawk mawk nawk awk
7209 do
7210 # Extract the first word of "$ac_prog", so it can be a program name with args.
7211 set dummy $ac_prog; ac_word=$2
7212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7213 $as_echo_n "checking for $ac_word... " >&6; }
7214 if ${ac_cv_prog_AWK+:} false; then :
7215 $as_echo_n "(cached) " >&6
7216 else
7217 if test -n "$AWK"; then
7218 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7219 else
7220 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221 for as_dir in $PATH
7222 do
7223 IFS=$as_save_IFS
7224 test -z "$as_dir" && as_dir=.
7225 for ac_exec_ext in '' $ac_executable_extensions; do
7226 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227 ac_cv_prog_AWK="$ac_prog"
7228 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229 break 2
7230 fi
7231 done
7232 done
7233 IFS=$as_save_IFS
7234
7235 fi
7236 fi
7237 AWK=$ac_cv_prog_AWK
7238 if test -n "$AWK"; then
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7240 $as_echo "$AWK" >&6; }
7241 else
7242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7243 $as_echo "no" >&6; }
7244 fi
7245
7246
7247 test -n "$AWK" && break
7248 done
7249
7250 # Find a good install program. We prefer a C program (faster),
7251 # so one script is as good as another. But avoid the broken or
7252 # incompatible versions:
7253 # SysV /etc/install, /usr/sbin/install
7254 # SunOS /usr/etc/install
7255 # IRIX /sbin/install
7256 # AIX /bin/install
7257 # AmigaOS /C/install, which installs bootblocks on floppy discs
7258 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7259 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7260 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7261 # OS/2's system install, which has a completely different semantic
7262 # ./install, which can be erroneously created by make from ./install.sh.
7263 # Reject install programs that cannot install multiple files.
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7265 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7266 if test -z "$INSTALL"; then
7267 if ${ac_cv_path_install+:} false; then :
7268 $as_echo_n "(cached) " >&6
7269 else
7270 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7271 for as_dir in $PATH
7272 do
7273 IFS=$as_save_IFS
7274 test -z "$as_dir" && as_dir=.
7275 # Account for people who put trailing slashes in PATH elements.
7276 case $as_dir/ in #((
7277 ./ | .// | /[cC]/* | \
7278 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7279 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7280 /usr/ucb/* ) ;;
7281 *)
7282 # OSF1 and SCO ODT 3.0 have their own names for install.
7283 # Don't use installbsd from OSF since it installs stuff as root
7284 # by default.
7285 for ac_prog in ginstall scoinst install; do
7286 for ac_exec_ext in '' $ac_executable_extensions; do
7287 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7288 if test $ac_prog = install &&
7289 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7290 # AIX install. It has an incompatible calling convention.
7291 :
7292 elif test $ac_prog = install &&
7293 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7294 # program-specific install script used by HP pwplus--don't use.
7295 :
7296 else
7297 rm -rf conftest.one conftest.two conftest.dir
7298 echo one > conftest.one
7299 echo two > conftest.two
7300 mkdir conftest.dir
7301 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7302 test -s conftest.one && test -s conftest.two &&
7303 test -s conftest.dir/conftest.one &&
7304 test -s conftest.dir/conftest.two
7305 then
7306 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7307 break 3
7308 fi
7309 fi
7310 fi
7311 done
7312 done
7313 ;;
7314 esac
7315
7316 done
7317 IFS=$as_save_IFS
7318
7319 rm -rf conftest.one conftest.two conftest.dir
7320
7321 fi
7322 if test "${ac_cv_path_install+set}" = set; then
7323 INSTALL=$ac_cv_path_install
7324 else
7325 # As a last resort, use the slow shell script. Don't cache a
7326 # value for INSTALL within a source directory, because that will
7327 # break other packages using the cache if that directory is
7328 # removed, or if the value is a relative name.
7329 INSTALL=$ac_install_sh
7330 fi
7331 fi
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7333 $as_echo "$INSTALL" >&6; }
7334
7335 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7336 # It thinks the first close brace ends the variable substitution.
7337 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7338
7339 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7340
7341 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7342
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7344 $as_echo_n "checking whether ln -s works... " >&6; }
7345 LN_S=$as_ln_s
7346 if test "$LN_S" = "ln -s"; then
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7348 $as_echo "yes" >&6; }
7349 else
7350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7351 $as_echo "no, using $LN_S" >&6; }
7352 fi
7353
7354 if test -n "$ac_tool_prefix"; then
7355 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7356 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7358 $as_echo_n "checking for $ac_word... " >&6; }
7359 if ${ac_cv_prog_RANLIB+:} false; then :
7360 $as_echo_n "(cached) " >&6
7361 else
7362 if test -n "$RANLIB"; then
7363 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7364 else
7365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366 for as_dir in $PATH
7367 do
7368 IFS=$as_save_IFS
7369 test -z "$as_dir" && as_dir=.
7370 for ac_exec_ext in '' $ac_executable_extensions; do
7371 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7372 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7374 break 2
7375 fi
7376 done
7377 done
7378 IFS=$as_save_IFS
7379
7380 fi
7381 fi
7382 RANLIB=$ac_cv_prog_RANLIB
7383 if test -n "$RANLIB"; then
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7385 $as_echo "$RANLIB" >&6; }
7386 else
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388 $as_echo "no" >&6; }
7389 fi
7390
7391
7392 fi
7393 if test -z "$ac_cv_prog_RANLIB"; then
7394 ac_ct_RANLIB=$RANLIB
7395 # Extract the first word of "ranlib", so it can be a program name with args.
7396 set dummy ranlib; ac_word=$2
7397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7398 $as_echo_n "checking for $ac_word... " >&6; }
7399 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7400 $as_echo_n "(cached) " >&6
7401 else
7402 if test -n "$ac_ct_RANLIB"; then
7403 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7404 else
7405 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7406 for as_dir in $PATH
7407 do
7408 IFS=$as_save_IFS
7409 test -z "$as_dir" && as_dir=.
7410 for ac_exec_ext in '' $ac_executable_extensions; do
7411 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7412 ac_cv_prog_ac_ct_RANLIB="ranlib"
7413 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7414 break 2
7415 fi
7416 done
7417 done
7418 IFS=$as_save_IFS
7419
7420 fi
7421 fi
7422 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7423 if test -n "$ac_ct_RANLIB"; then
7424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7425 $as_echo "$ac_ct_RANLIB" >&6; }
7426 else
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7428 $as_echo "no" >&6; }
7429 fi
7430
7431 if test "x$ac_ct_RANLIB" = x; then
7432 RANLIB=":"
7433 else
7434 case $cross_compiling:$ac_tool_warned in
7435 yes:)
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7437 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7438 ac_tool_warned=yes ;;
7439 esac
7440 RANLIB=$ac_ct_RANLIB
7441 fi
7442 else
7443 RANLIB="$ac_cv_prog_RANLIB"
7444 fi
7445
7446 for ac_prog in 'bison -y' byacc
7447 do
7448 # Extract the first word of "$ac_prog", so it can be a program name with args.
7449 set dummy $ac_prog; ac_word=$2
7450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7451 $as_echo_n "checking for $ac_word... " >&6; }
7452 if ${ac_cv_prog_YACC+:} false; then :
7453 $as_echo_n "(cached) " >&6
7454 else
7455 if test -n "$YACC"; then
7456 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7457 else
7458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7459 for as_dir in $PATH
7460 do
7461 IFS=$as_save_IFS
7462 test -z "$as_dir" && as_dir=.
7463 for ac_exec_ext in '' $ac_executable_extensions; do
7464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7465 ac_cv_prog_YACC="$ac_prog"
7466 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7467 break 2
7468 fi
7469 done
7470 done
7471 IFS=$as_save_IFS
7472
7473 fi
7474 fi
7475 YACC=$ac_cv_prog_YACC
7476 if test -n "$YACC"; then
7477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7478 $as_echo "$YACC" >&6; }
7479 else
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7481 $as_echo "no" >&6; }
7482 fi
7483
7484
7485 test -n "$YACC" && break
7486 done
7487 test -n "$YACC" || YACC="yacc"
7488
7489
7490 if test -n "$ac_tool_prefix"; then
7491 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7492 set dummy ${ac_tool_prefix}ar; ac_word=$2
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494 $as_echo_n "checking for $ac_word... " >&6; }
7495 if ${ac_cv_prog_AR+:} false; then :
7496 $as_echo_n "(cached) " >&6
7497 else
7498 if test -n "$AR"; then
7499 ac_cv_prog_AR="$AR" # Let the user override the test.
7500 else
7501 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7502 for as_dir in $PATH
7503 do
7504 IFS=$as_save_IFS
7505 test -z "$as_dir" && as_dir=.
7506 for ac_exec_ext in '' $ac_executable_extensions; do
7507 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7508 ac_cv_prog_AR="${ac_tool_prefix}ar"
7509 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7510 break 2
7511 fi
7512 done
7513 done
7514 IFS=$as_save_IFS
7515
7516 fi
7517 fi
7518 AR=$ac_cv_prog_AR
7519 if test -n "$AR"; then
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7521 $as_echo "$AR" >&6; }
7522 else
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7524 $as_echo "no" >&6; }
7525 fi
7526
7527
7528 fi
7529 if test -z "$ac_cv_prog_AR"; then
7530 ac_ct_AR=$AR
7531 # Extract the first word of "ar", so it can be a program name with args.
7532 set dummy ar; ac_word=$2
7533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7534 $as_echo_n "checking for $ac_word... " >&6; }
7535 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7536 $as_echo_n "(cached) " >&6
7537 else
7538 if test -n "$ac_ct_AR"; then
7539 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7540 else
7541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7542 for as_dir in $PATH
7543 do
7544 IFS=$as_save_IFS
7545 test -z "$as_dir" && as_dir=.
7546 for ac_exec_ext in '' $ac_executable_extensions; do
7547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7548 ac_cv_prog_ac_ct_AR="ar"
7549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7550 break 2
7551 fi
7552 done
7553 done
7554 IFS=$as_save_IFS
7555
7556 fi
7557 fi
7558 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7559 if test -n "$ac_ct_AR"; then
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7561 $as_echo "$ac_ct_AR" >&6; }
7562 else
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7564 $as_echo "no" >&6; }
7565 fi
7566
7567 if test "x$ac_ct_AR" = x; then
7568 AR=""
7569 else
7570 case $cross_compiling:$ac_tool_warned in
7571 yes:)
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7573 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7574 ac_tool_warned=yes ;;
7575 esac
7576 AR=$ac_ct_AR
7577 fi
7578 else
7579 AR="$ac_cv_prog_AR"
7580 fi
7581
7582 if test -n "$ac_tool_prefix"; then
7583 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7584 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7586 $as_echo_n "checking for $ac_word... " >&6; }
7587 if ${ac_cv_prog_DLLTOOL+:} false; then :
7588 $as_echo_n "(cached) " >&6
7589 else
7590 if test -n "$DLLTOOL"; then
7591 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7592 else
7593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7594 for as_dir in $PATH
7595 do
7596 IFS=$as_save_IFS
7597 test -z "$as_dir" && as_dir=.
7598 for ac_exec_ext in '' $ac_executable_extensions; do
7599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7600 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7602 break 2
7603 fi
7604 done
7605 done
7606 IFS=$as_save_IFS
7607
7608 fi
7609 fi
7610 DLLTOOL=$ac_cv_prog_DLLTOOL
7611 if test -n "$DLLTOOL"; then
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7613 $as_echo "$DLLTOOL" >&6; }
7614 else
7615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7616 $as_echo "no" >&6; }
7617 fi
7618
7619
7620 fi
7621 if test -z "$ac_cv_prog_DLLTOOL"; then
7622 ac_ct_DLLTOOL=$DLLTOOL
7623 # Extract the first word of "dlltool", so it can be a program name with args.
7624 set dummy dlltool; ac_word=$2
7625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7626 $as_echo_n "checking for $ac_word... " >&6; }
7627 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7628 $as_echo_n "(cached) " >&6
7629 else
7630 if test -n "$ac_ct_DLLTOOL"; then
7631 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7632 else
7633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7634 for as_dir in $PATH
7635 do
7636 IFS=$as_save_IFS
7637 test -z "$as_dir" && as_dir=.
7638 for ac_exec_ext in '' $ac_executable_extensions; do
7639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7640 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7642 break 2
7643 fi
7644 done
7645 done
7646 IFS=$as_save_IFS
7647
7648 fi
7649 fi
7650 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7651 if test -n "$ac_ct_DLLTOOL"; then
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7653 $as_echo "$ac_ct_DLLTOOL" >&6; }
7654 else
7655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7656 $as_echo "no" >&6; }
7657 fi
7658
7659 if test "x$ac_ct_DLLTOOL" = x; then
7660 DLLTOOL=""
7661 else
7662 case $cross_compiling:$ac_tool_warned in
7663 yes:)
7664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7665 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7666 ac_tool_warned=yes ;;
7667 esac
7668 DLLTOOL=$ac_ct_DLLTOOL
7669 fi
7670 else
7671 DLLTOOL="$ac_cv_prog_DLLTOOL"
7672 fi
7673
7674 if test -n "$ac_tool_prefix"; then
7675 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7676 set dummy ${ac_tool_prefix}windres; ac_word=$2
7677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7678 $as_echo_n "checking for $ac_word... " >&6; }
7679 if ${ac_cv_prog_WINDRES+:} false; then :
7680 $as_echo_n "(cached) " >&6
7681 else
7682 if test -n "$WINDRES"; then
7683 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7684 else
7685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7686 for as_dir in $PATH
7687 do
7688 IFS=$as_save_IFS
7689 test -z "$as_dir" && as_dir=.
7690 for ac_exec_ext in '' $ac_executable_extensions; do
7691 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7692 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7693 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7694 break 2
7695 fi
7696 done
7697 done
7698 IFS=$as_save_IFS
7699
7700 fi
7701 fi
7702 WINDRES=$ac_cv_prog_WINDRES
7703 if test -n "$WINDRES"; then
7704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7705 $as_echo "$WINDRES" >&6; }
7706 else
7707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7708 $as_echo "no" >&6; }
7709 fi
7710
7711
7712 fi
7713 if test -z "$ac_cv_prog_WINDRES"; then
7714 ac_ct_WINDRES=$WINDRES
7715 # Extract the first word of "windres", so it can be a program name with args.
7716 set dummy windres; ac_word=$2
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7718 $as_echo_n "checking for $ac_word... " >&6; }
7719 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7720 $as_echo_n "(cached) " >&6
7721 else
7722 if test -n "$ac_ct_WINDRES"; then
7723 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7724 else
7725 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726 for as_dir in $PATH
7727 do
7728 IFS=$as_save_IFS
7729 test -z "$as_dir" && as_dir=.
7730 for ac_exec_ext in '' $ac_executable_extensions; do
7731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7732 ac_cv_prog_ac_ct_WINDRES="windres"
7733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7734 break 2
7735 fi
7736 done
7737 done
7738 IFS=$as_save_IFS
7739
7740 fi
7741 fi
7742 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7743 if test -n "$ac_ct_WINDRES"; then
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7745 $as_echo "$ac_ct_WINDRES" >&6; }
7746 else
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7748 $as_echo "no" >&6; }
7749 fi
7750
7751 if test "x$ac_ct_WINDRES" = x; then
7752 WINDRES=""
7753 else
7754 case $cross_compiling:$ac_tool_warned in
7755 yes:)
7756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7757 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7758 ac_tool_warned=yes ;;
7759 esac
7760 WINDRES=$ac_ct_WINDRES
7761 fi
7762 else
7763 WINDRES="$ac_cv_prog_WINDRES"
7764 fi
7765
7766
7767 case $host_os in
7768 gnu*)
7769 # Needed for GNU Hurd hosts.
7770 if test -n "$ac_tool_prefix"; then
7771 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7772 set dummy ${ac_tool_prefix}mig; ac_word=$2
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7774 $as_echo_n "checking for $ac_word... " >&6; }
7775 if ${ac_cv_prog_MIG+:} false; then :
7776 $as_echo_n "(cached) " >&6
7777 else
7778 if test -n "$MIG"; then
7779 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7780 else
7781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7782 for as_dir in $PATH
7783 do
7784 IFS=$as_save_IFS
7785 test -z "$as_dir" && as_dir=.
7786 for ac_exec_ext in '' $ac_executable_extensions; do
7787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7788 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7790 break 2
7791 fi
7792 done
7793 done
7794 IFS=$as_save_IFS
7795
7796 fi
7797 fi
7798 MIG=$ac_cv_prog_MIG
7799 if test -n "$MIG"; then
7800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7801 $as_echo "$MIG" >&6; }
7802 else
7803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7804 $as_echo "no" >&6; }
7805 fi
7806
7807
7808 fi
7809 if test -z "$ac_cv_prog_MIG"; then
7810 ac_ct_MIG=$MIG
7811 # Extract the first word of "mig", so it can be a program name with args.
7812 set dummy mig; ac_word=$2
7813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7814 $as_echo_n "checking for $ac_word... " >&6; }
7815 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7816 $as_echo_n "(cached) " >&6
7817 else
7818 if test -n "$ac_ct_MIG"; then
7819 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7820 else
7821 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7822 for as_dir in $PATH
7823 do
7824 IFS=$as_save_IFS
7825 test -z "$as_dir" && as_dir=.
7826 for ac_exec_ext in '' $ac_executable_extensions; do
7827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7828 ac_cv_prog_ac_ct_MIG="mig"
7829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7830 break 2
7831 fi
7832 done
7833 done
7834 IFS=$as_save_IFS
7835
7836 fi
7837 fi
7838 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7839 if test -n "$ac_ct_MIG"; then
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7841 $as_echo "$ac_ct_MIG" >&6; }
7842 else
7843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7844 $as_echo "no" >&6; }
7845 fi
7846
7847 if test "x$ac_ct_MIG" = x; then
7848 MIG=""
7849 else
7850 case $cross_compiling:$ac_tool_warned in
7851 yes:)
7852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7853 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7854 ac_tool_warned=yes ;;
7855 esac
7856 MIG=$ac_ct_MIG
7857 fi
7858 else
7859 MIG="$ac_cv_prog_MIG"
7860 fi
7861
7862 if test x"$MIG" = x; then
7863 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7864 fi
7865 ;;
7866 esac
7867
7868 # ---------------------- #
7869 # Checks for libraries. #
7870 # ---------------------- #
7871
7872 # We might need to link with -lm; most simulators need it.
7873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7874 $as_echo_n "checking for main in -lm... " >&6; }
7875 if ${ac_cv_lib_m_main+:} false; then :
7876 $as_echo_n "(cached) " >&6
7877 else
7878 ac_check_lib_save_LIBS=$LIBS
7879 LIBS="-lm $LIBS"
7880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7881 /* end confdefs.h. */
7882
7883
7884 int
7885 main ()
7886 {
7887 return main ();
7888 ;
7889 return 0;
7890 }
7891 _ACEOF
7892 if ac_fn_c_try_link "$LINENO"; then :
7893 ac_cv_lib_m_main=yes
7894 else
7895 ac_cv_lib_m_main=no
7896 fi
7897 rm -f core conftest.err conftest.$ac_objext \
7898 conftest$ac_exeext conftest.$ac_ext
7899 LIBS=$ac_check_lib_save_LIBS
7900 fi
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7902 $as_echo "$ac_cv_lib_m_main" >&6; }
7903 if test "x$ac_cv_lib_m_main" = xyes; then :
7904 cat >>confdefs.h <<_ACEOF
7905 #define HAVE_LIBM 1
7906 _ACEOF
7907
7908 LIBS="-lm $LIBS"
7909
7910 fi
7911
7912
7913 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7915 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7916 if ${ac_cv_search_gethostbyname+:} false; then :
7917 $as_echo_n "(cached) " >&6
7918 else
7919 ac_func_search_save_LIBS=$LIBS
7920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7921 /* end confdefs.h. */
7922
7923 /* Override any GCC internal prototype to avoid an error.
7924 Use char because int might match the return type of a GCC
7925 builtin and then its argument prototype would still apply. */
7926 #ifdef __cplusplus
7927 extern "C"
7928 #endif
7929 char gethostbyname ();
7930 int
7931 main ()
7932 {
7933 return gethostbyname ();
7934 ;
7935 return 0;
7936 }
7937 _ACEOF
7938 for ac_lib in '' nsl; do
7939 if test -z "$ac_lib"; then
7940 ac_res="none required"
7941 else
7942 ac_res=-l$ac_lib
7943 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7944 fi
7945 if ac_fn_c_try_link "$LINENO"; then :
7946 ac_cv_search_gethostbyname=$ac_res
7947 fi
7948 rm -f core conftest.err conftest.$ac_objext \
7949 conftest$ac_exeext
7950 if ${ac_cv_search_gethostbyname+:} false; then :
7951 break
7952 fi
7953 done
7954 if ${ac_cv_search_gethostbyname+:} false; then :
7955
7956 else
7957 ac_cv_search_gethostbyname=no
7958 fi
7959 rm conftest.$ac_ext
7960 LIBS=$ac_func_search_save_LIBS
7961 fi
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7963 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7964 ac_res=$ac_cv_search_gethostbyname
7965 if test "$ac_res" != no; then :
7966 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7967
7968 fi
7969
7970
7971 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7973 $as_echo_n "checking for library containing socketpair... " >&6; }
7974 if ${ac_cv_search_socketpair+:} false; then :
7975 $as_echo_n "(cached) " >&6
7976 else
7977 ac_func_search_save_LIBS=$LIBS
7978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7979 /* end confdefs.h. */
7980
7981 /* Override any GCC internal prototype to avoid an error.
7982 Use char because int might match the return type of a GCC
7983 builtin and then its argument prototype would still apply. */
7984 #ifdef __cplusplus
7985 extern "C"
7986 #endif
7987 char socketpair ();
7988 int
7989 main ()
7990 {
7991 return socketpair ();
7992 ;
7993 return 0;
7994 }
7995 _ACEOF
7996 for ac_lib in '' socket; do
7997 if test -z "$ac_lib"; then
7998 ac_res="none required"
7999 else
8000 ac_res=-l$ac_lib
8001 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8002 fi
8003 if ac_fn_c_try_link "$LINENO"; then :
8004 ac_cv_search_socketpair=$ac_res
8005 fi
8006 rm -f core conftest.err conftest.$ac_objext \
8007 conftest$ac_exeext
8008 if ${ac_cv_search_socketpair+:} false; then :
8009 break
8010 fi
8011 done
8012 if ${ac_cv_search_socketpair+:} false; then :
8013
8014 else
8015 ac_cv_search_socketpair=no
8016 fi
8017 rm conftest.$ac_ext
8018 LIBS=$ac_func_search_save_LIBS
8019 fi
8020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8021 $as_echo "$ac_cv_search_socketpair" >&6; }
8022 ac_res=$ac_cv_search_socketpair
8023 if test "$ac_res" != no; then :
8024 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8025
8026 fi
8027
8028
8029 # Link in zlib if we can. This allows us to read compressed debug sections.
8030
8031 # Use the system's zlib library.
8032 zlibdir="-L\$(top_builddir)/../zlib"
8033 zlibinc="-I\$(top_srcdir)/../zlib"
8034
8035 # Check whether --with-system-zlib was given.
8036 if test "${with_system_zlib+set}" = set; then :
8037 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8038 zlibdir=
8039 zlibinc=
8040 fi
8041
8042 fi
8043
8044
8045
8046
8047
8048 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
8049 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
8051 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
8052 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8053 $as_echo_n "(cached) " >&6
8054 else
8055 ac_func_search_save_LIBS=$LIBS
8056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8057 /* end confdefs.h. */
8058
8059 /* Override any GCC internal prototype to avoid an error.
8060 Use char because int might match the return type of a GCC
8061 builtin and then its argument prototype would still apply. */
8062 #ifdef __cplusplus
8063 extern "C"
8064 #endif
8065 char kinfo_getvmmap ();
8066 int
8067 main ()
8068 {
8069 return kinfo_getvmmap ();
8070 ;
8071 return 0;
8072 }
8073 _ACEOF
8074 for ac_lib in '' util util-freebsd; do
8075 if test -z "$ac_lib"; then
8076 ac_res="none required"
8077 else
8078 ac_res=-l$ac_lib
8079 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8080 fi
8081 if ac_fn_c_try_link "$LINENO"; then :
8082 ac_cv_search_kinfo_getvmmap=$ac_res
8083 fi
8084 rm -f core conftest.err conftest.$ac_objext \
8085 conftest$ac_exeext
8086 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8087 break
8088 fi
8089 done
8090 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8091
8092 else
8093 ac_cv_search_kinfo_getvmmap=no
8094 fi
8095 rm conftest.$ac_ext
8096 LIBS=$ac_func_search_save_LIBS
8097 fi
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8099 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8100 ac_res=$ac_cv_search_kinfo_getvmmap
8101 if test "$ac_res" != no; then :
8102 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8103
8104 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8105
8106 fi
8107
8108
8109
8110 if test "X$prefix" = "XNONE"; then
8111 acl_final_prefix="$ac_default_prefix"
8112 else
8113 acl_final_prefix="$prefix"
8114 fi
8115 if test "X$exec_prefix" = "XNONE"; then
8116 acl_final_exec_prefix='${prefix}'
8117 else
8118 acl_final_exec_prefix="$exec_prefix"
8119 fi
8120 acl_save_prefix="$prefix"
8121 prefix="$acl_final_prefix"
8122 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8123 prefix="$acl_save_prefix"
8124
8125
8126 # Check whether --with-gnu-ld was given.
8127 if test "${with_gnu_ld+set}" = set; then :
8128 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8129 else
8130 with_gnu_ld=no
8131 fi
8132
8133 # Prepare PATH_SEPARATOR.
8134 # The user is always right.
8135 if test "${PATH_SEPARATOR+set}" != set; then
8136 echo "#! /bin/sh" >conf$$.sh
8137 echo "exit 0" >>conf$$.sh
8138 chmod +x conf$$.sh
8139 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8140 PATH_SEPARATOR=';'
8141 else
8142 PATH_SEPARATOR=:
8143 fi
8144 rm -f conf$$.sh
8145 fi
8146 ac_prog=ld
8147 if test "$GCC" = yes; then
8148 # Check if gcc -print-prog-name=ld gives a path.
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8150 $as_echo_n "checking for ld used by GCC... " >&6; }
8151 case $host in
8152 *-*-mingw*)
8153 # gcc leaves a trailing carriage return which upsets mingw
8154 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8155 *)
8156 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8157 esac
8158 case $ac_prog in
8159 # Accept absolute paths.
8160 [\\/]* | [A-Za-z]:[\\/]*)
8161 re_direlt='/[^/][^/]*/\.\./'
8162 # Canonicalize the path of ld
8163 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8164 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8165 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8166 done
8167 test -z "$LD" && LD="$ac_prog"
8168 ;;
8169 "")
8170 # If it fails, then pretend we aren't using GCC.
8171 ac_prog=ld
8172 ;;
8173 *)
8174 # If it is relative, then search for the first ld in PATH.
8175 with_gnu_ld=unknown
8176 ;;
8177 esac
8178 elif test "$with_gnu_ld" = yes; then
8179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8180 $as_echo_n "checking for GNU ld... " >&6; }
8181 else
8182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8183 $as_echo_n "checking for non-GNU ld... " >&6; }
8184 fi
8185 if ${acl_cv_path_LD+:} false; then :
8186 $as_echo_n "(cached) " >&6
8187 else
8188 if test -z "$LD"; then
8189 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8190 for ac_dir in $PATH; do
8191 test -z "$ac_dir" && ac_dir=.
8192 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8193 acl_cv_path_LD="$ac_dir/$ac_prog"
8194 # Check to see if the program is GNU ld. I'd rather use --version,
8195 # but apparently some GNU ld's only accept -v.
8196 # Break only if it was the GNU/non-GNU ld that we prefer.
8197 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8198 test "$with_gnu_ld" != no && break
8199 else
8200 test "$with_gnu_ld" != yes && break
8201 fi
8202 fi
8203 done
8204 IFS="$ac_save_ifs"
8205 else
8206 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8207 fi
8208 fi
8209
8210 LD="$acl_cv_path_LD"
8211 if test -n "$LD"; then
8212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8213 $as_echo "$LD" >&6; }
8214 else
8215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8216 $as_echo "no" >&6; }
8217 fi
8218 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8220 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8221 if ${acl_cv_prog_gnu_ld+:} false; then :
8222 $as_echo_n "(cached) " >&6
8223 else
8224 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8225 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8226 acl_cv_prog_gnu_ld=yes
8227 else
8228 acl_cv_prog_gnu_ld=no
8229 fi
8230 fi
8231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8232 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8233 with_gnu_ld=$acl_cv_prog_gnu_ld
8234
8235
8236
8237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8238 $as_echo_n "checking for shared library run path origin... " >&6; }
8239 if ${acl_cv_rpath+:} false; then :
8240 $as_echo_n "(cached) " >&6
8241 else
8242
8243 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8244 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8245 . ./conftest.sh
8246 rm -f ./conftest.sh
8247 acl_cv_rpath=done
8248
8249 fi
8250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8251 $as_echo "$acl_cv_rpath" >&6; }
8252 wl="$acl_cv_wl"
8253 libext="$acl_cv_libext"
8254 shlibext="$acl_cv_shlibext"
8255 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8256 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8257 hardcode_direct="$acl_cv_hardcode_direct"
8258 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8259 # Check whether --enable-rpath was given.
8260 if test "${enable_rpath+set}" = set; then :
8261 enableval=$enable_rpath; :
8262 else
8263 enable_rpath=yes
8264 fi
8265
8266
8267
8268
8269
8270
8271
8272
8273 use_additional=yes
8274
8275 acl_save_prefix="$prefix"
8276 prefix="$acl_final_prefix"
8277 acl_save_exec_prefix="$exec_prefix"
8278 exec_prefix="$acl_final_exec_prefix"
8279
8280 eval additional_includedir=\"$includedir\"
8281 eval additional_libdir=\"$libdir\"
8282
8283 exec_prefix="$acl_save_exec_prefix"
8284 prefix="$acl_save_prefix"
8285
8286
8287 # Check whether --with-libiconv-prefix was given.
8288 if test "${with_libiconv_prefix+set}" = set; then :
8289 withval=$with_libiconv_prefix;
8290 if test "X$withval" = "Xno"; then
8291 use_additional=no
8292 else
8293 if test "X$withval" = "X"; then
8294
8295 acl_save_prefix="$prefix"
8296 prefix="$acl_final_prefix"
8297 acl_save_exec_prefix="$exec_prefix"
8298 exec_prefix="$acl_final_exec_prefix"
8299
8300 eval additional_includedir=\"$includedir\"
8301 eval additional_libdir=\"$libdir\"
8302
8303 exec_prefix="$acl_save_exec_prefix"
8304 prefix="$acl_save_prefix"
8305
8306 else
8307 additional_includedir="$withval/include"
8308 additional_libdir="$withval/lib"
8309 fi
8310 fi
8311
8312 fi
8313
8314
8315 # Check whether --with-libiconv-type was given.
8316 if test "${with_libiconv_type+set}" = set; then :
8317 withval=$with_libiconv_type; with_libiconv_type=$withval
8318 else
8319 with_libiconv_type=auto
8320 fi
8321
8322 lib_type=`eval echo \$with_libiconv_type`
8323
8324 LIBICONV=
8325 LTLIBICONV=
8326 INCICONV=
8327 rpathdirs=
8328 ltrpathdirs=
8329 names_already_handled=
8330 names_next_round='iconv '
8331 while test -n "$names_next_round"; do
8332 names_this_round="$names_next_round"
8333 names_next_round=
8334 for name in $names_this_round; do
8335 already_handled=
8336 for n in $names_already_handled; do
8337 if test "$n" = "$name"; then
8338 already_handled=yes
8339 break
8340 fi
8341 done
8342 if test -z "$already_handled"; then
8343 names_already_handled="$names_already_handled $name"
8344 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8345 eval value=\"\$HAVE_LIB$uppername\"
8346 if test -n "$value"; then
8347 if test "$value" = yes; then
8348 eval value=\"\$LIB$uppername\"
8349 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8350 eval value=\"\$LTLIB$uppername\"
8351 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8352 else
8353 :
8354 fi
8355 else
8356 found_dir=
8357 found_la=
8358 found_so=
8359 found_a=
8360 if test $use_additional = yes; then
8361 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8362 found_dir="$additional_libdir"
8363 found_so="$additional_libdir/lib$name.$shlibext"
8364 if test -f "$additional_libdir/lib$name.la"; then
8365 found_la="$additional_libdir/lib$name.la"
8366 fi
8367 elif test x$lib_type != xshared; then
8368 if test -f "$additional_libdir/lib$name.$libext"; then
8369 found_dir="$additional_libdir"
8370 found_a="$additional_libdir/lib$name.$libext"
8371 if test -f "$additional_libdir/lib$name.la"; then
8372 found_la="$additional_libdir/lib$name.la"
8373 fi
8374 fi
8375 fi
8376 fi
8377 if test "X$found_dir" = "X"; then
8378 for x in $LDFLAGS $LTLIBICONV; do
8379
8380 acl_save_prefix="$prefix"
8381 prefix="$acl_final_prefix"
8382 acl_save_exec_prefix="$exec_prefix"
8383 exec_prefix="$acl_final_exec_prefix"
8384 eval x=\"$x\"
8385 exec_prefix="$acl_save_exec_prefix"
8386 prefix="$acl_save_prefix"
8387
8388 case "$x" in
8389 -L*)
8390 dir=`echo "X$x" | sed -e 's/^X-L//'`
8391 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8392 found_dir="$dir"
8393 found_so="$dir/lib$name.$shlibext"
8394 if test -f "$dir/lib$name.la"; then
8395 found_la="$dir/lib$name.la"
8396 fi
8397 elif test x$lib_type != xshared; then
8398 if test -f "$dir/lib$name.$libext"; then
8399 found_dir="$dir"
8400 found_a="$dir/lib$name.$libext"
8401 if test -f "$dir/lib$name.la"; then
8402 found_la="$dir/lib$name.la"
8403 fi
8404 fi
8405 fi
8406 ;;
8407 esac
8408 if test "X$found_dir" != "X"; then
8409 break
8410 fi
8411 done
8412 fi
8413 if test "X$found_dir" != "X"; then
8414 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8415 if test "X$found_so" != "X"; then
8416 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8417 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8418 else
8419 haveit=
8420 for x in $ltrpathdirs; do
8421 if test "X$x" = "X$found_dir"; then
8422 haveit=yes
8423 break
8424 fi
8425 done
8426 if test -z "$haveit"; then
8427 ltrpathdirs="$ltrpathdirs $found_dir"
8428 fi
8429 if test "$hardcode_direct" = yes; then
8430 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8431 else
8432 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8433 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8434 haveit=
8435 for x in $rpathdirs; do
8436 if test "X$x" = "X$found_dir"; then
8437 haveit=yes
8438 break
8439 fi
8440 done
8441 if test -z "$haveit"; then
8442 rpathdirs="$rpathdirs $found_dir"
8443 fi
8444 else
8445 haveit=
8446 for x in $LDFLAGS $LIBICONV; do
8447
8448 acl_save_prefix="$prefix"
8449 prefix="$acl_final_prefix"
8450 acl_save_exec_prefix="$exec_prefix"
8451 exec_prefix="$acl_final_exec_prefix"
8452 eval x=\"$x\"
8453 exec_prefix="$acl_save_exec_prefix"
8454 prefix="$acl_save_prefix"
8455
8456 if test "X$x" = "X-L$found_dir"; then
8457 haveit=yes
8458 break
8459 fi
8460 done
8461 if test -z "$haveit"; then
8462 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8463 fi
8464 if test "$hardcode_minus_L" != no; then
8465 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8466 else
8467 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8468 fi
8469 fi
8470 fi
8471 fi
8472 else
8473 if test "X$found_a" != "X"; then
8474 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8475 else
8476 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8477 fi
8478 fi
8479 additional_includedir=
8480 case "$found_dir" in
8481 */lib | */lib/)
8482 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8483 additional_includedir="$basedir/include"
8484 ;;
8485 esac
8486 if test "X$additional_includedir" != "X"; then
8487 if test "X$additional_includedir" != "X/usr/include"; then
8488 haveit=
8489 if test "X$additional_includedir" = "X/usr/local/include"; then
8490 if test -n "$GCC"; then
8491 case $host_os in
8492 linux*) haveit=yes;;
8493 esac
8494 fi
8495 fi
8496 if test -z "$haveit"; then
8497 for x in $CPPFLAGS $INCICONV; do
8498
8499 acl_save_prefix="$prefix"
8500 prefix="$acl_final_prefix"
8501 acl_save_exec_prefix="$exec_prefix"
8502 exec_prefix="$acl_final_exec_prefix"
8503 eval x=\"$x\"
8504 exec_prefix="$acl_save_exec_prefix"
8505 prefix="$acl_save_prefix"
8506
8507 if test "X$x" = "X-I$additional_includedir"; then
8508 haveit=yes
8509 break
8510 fi
8511 done
8512 if test -z "$haveit"; then
8513 if test -d "$additional_includedir"; then
8514 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8515 fi
8516 fi
8517 fi
8518 fi
8519 fi
8520 if test -n "$found_la"; then
8521 save_libdir="$libdir"
8522 case "$found_la" in
8523 */* | *\\*) . "$found_la" ;;
8524 *) . "./$found_la" ;;
8525 esac
8526 libdir="$save_libdir"
8527 for dep in $dependency_libs; do
8528 case "$dep" in
8529 -L*)
8530 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8531 if test "X$additional_libdir" != "X/usr/lib"; then
8532 haveit=
8533 if test "X$additional_libdir" = "X/usr/local/lib"; then
8534 if test -n "$GCC"; then
8535 case $host_os in
8536 linux*) haveit=yes;;
8537 esac
8538 fi
8539 fi
8540 if test -z "$haveit"; then
8541 haveit=
8542 for x in $LDFLAGS $LIBICONV; do
8543
8544 acl_save_prefix="$prefix"
8545 prefix="$acl_final_prefix"
8546 acl_save_exec_prefix="$exec_prefix"
8547 exec_prefix="$acl_final_exec_prefix"
8548 eval x=\"$x\"
8549 exec_prefix="$acl_save_exec_prefix"
8550 prefix="$acl_save_prefix"
8551
8552 if test "X$x" = "X-L$additional_libdir"; then
8553 haveit=yes
8554 break
8555 fi
8556 done
8557 if test -z "$haveit"; then
8558 if test -d "$additional_libdir"; then
8559 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8560 fi
8561 fi
8562 haveit=
8563 for x in $LDFLAGS $LTLIBICONV; do
8564
8565 acl_save_prefix="$prefix"
8566 prefix="$acl_final_prefix"
8567 acl_save_exec_prefix="$exec_prefix"
8568 exec_prefix="$acl_final_exec_prefix"
8569 eval x=\"$x\"
8570 exec_prefix="$acl_save_exec_prefix"
8571 prefix="$acl_save_prefix"
8572
8573 if test "X$x" = "X-L$additional_libdir"; then
8574 haveit=yes
8575 break
8576 fi
8577 done
8578 if test -z "$haveit"; then
8579 if test -d "$additional_libdir"; then
8580 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8581 fi
8582 fi
8583 fi
8584 fi
8585 ;;
8586 -R*)
8587 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8588 if test "$enable_rpath" != no; then
8589 haveit=
8590 for x in $rpathdirs; do
8591 if test "X$x" = "X$dir"; then
8592 haveit=yes
8593 break
8594 fi
8595 done
8596 if test -z "$haveit"; then
8597 rpathdirs="$rpathdirs $dir"
8598 fi
8599 haveit=
8600 for x in $ltrpathdirs; do
8601 if test "X$x" = "X$dir"; then
8602 haveit=yes
8603 break
8604 fi
8605 done
8606 if test -z "$haveit"; then
8607 ltrpathdirs="$ltrpathdirs $dir"
8608 fi
8609 fi
8610 ;;
8611 -l*)
8612 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8613 ;;
8614 *.la)
8615 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8616 ;;
8617 *)
8618 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8619 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8620 ;;
8621 esac
8622 done
8623 fi
8624 else
8625 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8626 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8627 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8628 else
8629 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8630 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8631 fi
8632 fi
8633 fi
8634 fi
8635 done
8636 done
8637 if test "X$rpathdirs" != "X"; then
8638 if test -n "$hardcode_libdir_separator"; then
8639 alldirs=
8640 for found_dir in $rpathdirs; do
8641 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8642 done
8643 acl_save_libdir="$libdir"
8644 libdir="$alldirs"
8645 eval flag=\"$hardcode_libdir_flag_spec\"
8646 libdir="$acl_save_libdir"
8647 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8648 else
8649 for found_dir in $rpathdirs; do
8650 acl_save_libdir="$libdir"
8651 libdir="$found_dir"
8652 eval flag=\"$hardcode_libdir_flag_spec\"
8653 libdir="$acl_save_libdir"
8654 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8655 done
8656 fi
8657 fi
8658 if test "X$ltrpathdirs" != "X"; then
8659 for found_dir in $ltrpathdirs; do
8660 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8661 done
8662 fi
8663
8664
8665
8666
8667
8668
8669
8670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8671 $as_echo_n "checking for iconv... " >&6; }
8672 if ${am_cv_func_iconv+:} false; then :
8673 $as_echo_n "(cached) " >&6
8674 else
8675
8676 am_cv_func_iconv="no, consider installing GNU libiconv"
8677 am_cv_lib_iconv=no
8678 am_save_CPPFLAGS="$CPPFLAGS"
8679 CPPFLAGS="$CPPFLAGS $INCICONV"
8680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8681 /* end confdefs.h. */
8682 #include <stdlib.h>
8683 #include <iconv.h>
8684 int
8685 main ()
8686 {
8687 iconv_t cd = iconv_open("","");
8688 iconv(cd,NULL,NULL,NULL,NULL);
8689 iconv_close(cd);
8690 ;
8691 return 0;
8692 }
8693 _ACEOF
8694 if ac_fn_c_try_link "$LINENO"; then :
8695 am_cv_func_iconv=yes
8696 fi
8697 rm -f core conftest.err conftest.$ac_objext \
8698 conftest$ac_exeext conftest.$ac_ext
8699 CPPFLAGS="$am_save_CPPFLAGS"
8700
8701 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8702 for _libs in .libs _libs; do
8703 am_save_CPPFLAGS="$CPPFLAGS"
8704 am_save_LIBS="$LIBS"
8705 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8706 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8708 /* end confdefs.h. */
8709 #include <stdlib.h>
8710 #include <iconv.h>
8711 int
8712 main ()
8713 {
8714 iconv_t cd = iconv_open("","");
8715 iconv(cd,NULL,NULL,NULL,NULL);
8716 iconv_close(cd);
8717 ;
8718 return 0;
8719 }
8720 _ACEOF
8721 if ac_fn_c_try_link "$LINENO"; then :
8722 INCICONV="-I../libiconv/include"
8723 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8724 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8725 am_cv_lib_iconv=yes
8726 am_cv_func_iconv=yes
8727 fi
8728 rm -f core conftest.err conftest.$ac_objext \
8729 conftest$ac_exeext conftest.$ac_ext
8730 CPPFLAGS="$am_save_CPPFLAGS"
8731 LIBS="$am_save_LIBS"
8732 if test "$am_cv_func_iconv" = "yes"; then
8733 break
8734 fi
8735 done
8736 fi
8737
8738 if test "$am_cv_func_iconv" != yes; then
8739 am_save_CPPFLAGS="$CPPFLAGS"
8740 am_save_LIBS="$LIBS"
8741 CPPFLAGS="$CPPFLAGS $INCICONV"
8742 LIBS="$LIBS $LIBICONV"
8743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8744 /* end confdefs.h. */
8745 #include <stdlib.h>
8746 #include <iconv.h>
8747 int
8748 main ()
8749 {
8750 iconv_t cd = iconv_open("","");
8751 iconv(cd,NULL,NULL,NULL,NULL);
8752 iconv_close(cd);
8753 ;
8754 return 0;
8755 }
8756 _ACEOF
8757 if ac_fn_c_try_link "$LINENO"; then :
8758 am_cv_lib_iconv=yes
8759 am_cv_func_iconv=yes
8760 fi
8761 rm -f core conftest.err conftest.$ac_objext \
8762 conftest$ac_exeext conftest.$ac_ext
8763 CPPFLAGS="$am_save_CPPFLAGS"
8764 LIBS="$am_save_LIBS"
8765 fi
8766
8767 fi
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8769 $as_echo "$am_cv_func_iconv" >&6; }
8770 if test "$am_cv_func_iconv" = yes; then
8771
8772 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8773
8774 fi
8775 if test "$am_cv_lib_iconv" = yes; then
8776
8777 for element in $INCICONV; do
8778 haveit=
8779 for x in $CPPFLAGS; do
8780
8781 acl_save_prefix="$prefix"
8782 prefix="$acl_final_prefix"
8783 acl_save_exec_prefix="$exec_prefix"
8784 exec_prefix="$acl_final_exec_prefix"
8785 eval x=\"$x\"
8786 exec_prefix="$acl_save_exec_prefix"
8787 prefix="$acl_save_prefix"
8788
8789 if test "X$x" = "X$element"; then
8790 haveit=yes
8791 break
8792 fi
8793 done
8794 if test -z "$haveit"; then
8795 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8796 fi
8797 done
8798
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8800 $as_echo_n "checking how to link with libiconv... " >&6; }
8801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8802 $as_echo "$LIBICONV" >&6; }
8803 else
8804 LIBICONV=
8805 LTLIBICONV=
8806 fi
8807
8808
8809
8810 if test "$am_cv_func_iconv" = yes; then
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8812 $as_echo_n "checking for iconv declaration... " >&6; }
8813 if ${am_cv_proto_iconv+:} false; then :
8814 $as_echo_n "(cached) " >&6
8815 else
8816
8817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8818 /* end confdefs.h. */
8819
8820 #include <stdlib.h>
8821 #include <iconv.h>
8822 extern
8823 #ifdef __cplusplus
8824 "C"
8825 #endif
8826 #if defined(__STDC__) || defined(__cplusplus)
8827 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8828 #else
8829 size_t iconv();
8830 #endif
8831
8832 int
8833 main ()
8834 {
8835
8836 ;
8837 return 0;
8838 }
8839 _ACEOF
8840 if ac_fn_c_try_compile "$LINENO"; then :
8841 am_cv_proto_iconv_arg1=""
8842 else
8843 am_cv_proto_iconv_arg1="const"
8844 fi
8845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8846 am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
8847 fi
8848
8849 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8851 }$am_cv_proto_iconv" >&5
8852 $as_echo "${ac_t:-
8853 }$am_cv_proto_iconv" >&6; }
8854
8855 cat >>confdefs.h <<_ACEOF
8856 #define ICONV_CONST $am_cv_proto_iconv_arg1
8857 _ACEOF
8858
8859 fi
8860
8861
8862 # GDB may fork/exec the iconv program to get the list of supported character
8863 # sets. Allow the user to specify where to find it.
8864 # There are several factors affecting the choice of option name:
8865 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8866 # the build-time location of libiconv files.
8867 # - The program we need to find is iconv, which comes with glibc. The user
8868 # doesn't necessarily have libiconv installed. Therefore naming this
8869 # --with-libiconv-foo feels wrong.
8870 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8871 # defined to work on directories not files (though it really doesn't know
8872 # the difference).
8873 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8874 # with --with-libiconv-prefix.
8875 # Putting these together is why the option name is --with-iconv-bin.
8876
8877
8878 # Check whether --with-iconv-bin was given.
8879 if test "${with_iconv_bin+set}" = set; then :
8880 withval=$with_iconv_bin; iconv_bin="${withval}"
8881
8882 cat >>confdefs.h <<_ACEOF
8883 #define ICONV_BIN "${iconv_bin}"
8884 _ACEOF
8885
8886
8887 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8888 if test "x$prefix" = xNONE; then
8889 test_prefix=/usr/local
8890 else
8891 test_prefix=$prefix
8892 fi
8893 else
8894 test_prefix=$exec_prefix
8895 fi
8896 value=0
8897 case ${iconv_bin} in
8898 "${test_prefix}"|"${test_prefix}/"*|\
8899 '${exec_prefix}'|'${exec_prefix}/'*)
8900 value=1
8901 ;;
8902 esac
8903
8904 cat >>confdefs.h <<_ACEOF
8905 #define ICONV_BIN_RELOCATABLE $value
8906 _ACEOF
8907
8908
8909
8910 fi
8911
8912
8913 # For the TUI, we need enhanced curses functionality.
8914 if test x"$enable_tui" != xno; then
8915 prefer_curses=yes
8916 fi
8917
8918 curses_found=no
8919 if test x"$prefer_curses" = xyes; then
8920 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8921 # curses library because the latter might not provide all the
8922 # functionality we need. However, this leads to problems on systems
8923 # where the linker searches /usr/local/lib, but the compiler doesn't
8924 # search /usr/local/include, if ncurses is installed in /usr/local. A
8925 # default installation of ncurses on alpha*-dec-osf* will lead to such
8926 # a situation.
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8928 $as_echo_n "checking for library containing waddstr... " >&6; }
8929 if ${ac_cv_search_waddstr+:} false; then :
8930 $as_echo_n "(cached) " >&6
8931 else
8932 ac_func_search_save_LIBS=$LIBS
8933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8934 /* end confdefs.h. */
8935
8936 /* Override any GCC internal prototype to avoid an error.
8937 Use char because int might match the return type of a GCC
8938 builtin and then its argument prototype would still apply. */
8939 #ifdef __cplusplus
8940 extern "C"
8941 #endif
8942 char waddstr ();
8943 int
8944 main ()
8945 {
8946 return waddstr ();
8947 ;
8948 return 0;
8949 }
8950 _ACEOF
8951 for ac_lib in '' ncursesw ncurses cursesX curses; do
8952 if test -z "$ac_lib"; then
8953 ac_res="none required"
8954 else
8955 ac_res=-l$ac_lib
8956 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8957 fi
8958 if ac_fn_c_try_link "$LINENO"; then :
8959 ac_cv_search_waddstr=$ac_res
8960 fi
8961 rm -f core conftest.err conftest.$ac_objext \
8962 conftest$ac_exeext
8963 if ${ac_cv_search_waddstr+:} false; then :
8964 break
8965 fi
8966 done
8967 if ${ac_cv_search_waddstr+:} false; then :
8968
8969 else
8970 ac_cv_search_waddstr=no
8971 fi
8972 rm conftest.$ac_ext
8973 LIBS=$ac_func_search_save_LIBS
8974 fi
8975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8976 $as_echo "$ac_cv_search_waddstr" >&6; }
8977 ac_res=$ac_cv_search_waddstr
8978 if test "$ac_res" != no; then :
8979 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8980
8981 fi
8982
8983
8984 if test "$ac_cv_search_waddstr" != no; then
8985 curses_found=yes
8986 fi
8987 fi
8988
8989 # Check whether we should enable the TUI, but only do so if we really
8990 # can.
8991 if test x"$enable_tui" != xno; then
8992 if test -d "$srcdir/tui"; then
8993 if test "$curses_found" != no; then
8994 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8995 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8996 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8997 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8998 else
8999 if test x"$enable_tui" = xyes; then
9000 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9001 else
9002 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9003 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9004 fi
9005 fi
9006 fi
9007 fi
9008
9009 # Since GDB uses Readline, we need termcap functionality. In many
9010 # cases this will be provided by the curses library, but some systems
9011 # have a separate termcap library, or no curses library at all.
9012
9013 case $host_os in
9014 cygwin*)
9015 if test -d "$srcdir/libtermcap"; then
9016 LIBS="../libtermcap/libtermcap.a $LIBS"
9017 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9018 fi ;;
9019 go32* | *djgpp*)
9020 ac_cv_search_tgetent="none required"
9021 ;;
9022 esac
9023
9024 # These are the libraries checked by Readline.
9025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9026 $as_echo_n "checking for library containing tgetent... " >&6; }
9027 if ${ac_cv_search_tgetent+:} false; then :
9028 $as_echo_n "(cached) " >&6
9029 else
9030 ac_func_search_save_LIBS=$LIBS
9031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9032 /* end confdefs.h. */
9033
9034 /* Override any GCC internal prototype to avoid an error.
9035 Use char because int might match the return type of a GCC
9036 builtin and then its argument prototype would still apply. */
9037 #ifdef __cplusplus
9038 extern "C"
9039 #endif
9040 char tgetent ();
9041 int
9042 main ()
9043 {
9044 return tgetent ();
9045 ;
9046 return 0;
9047 }
9048 _ACEOF
9049 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9050 if test -z "$ac_lib"; then
9051 ac_res="none required"
9052 else
9053 ac_res=-l$ac_lib
9054 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9055 fi
9056 if ac_fn_c_try_link "$LINENO"; then :
9057 ac_cv_search_tgetent=$ac_res
9058 fi
9059 rm -f core conftest.err conftest.$ac_objext \
9060 conftest$ac_exeext
9061 if ${ac_cv_search_tgetent+:} false; then :
9062 break
9063 fi
9064 done
9065 if ${ac_cv_search_tgetent+:} false; then :
9066
9067 else
9068 ac_cv_search_tgetent=no
9069 fi
9070 rm conftest.$ac_ext
9071 LIBS=$ac_func_search_save_LIBS
9072 fi
9073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9074 $as_echo "$ac_cv_search_tgetent" >&6; }
9075 ac_res=$ac_cv_search_tgetent
9076 if test "$ac_res" != no; then :
9077 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9078
9079 fi
9080
9081
9082 if test "$ac_cv_search_tgetent" = no; then
9083 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9084 fi
9085
9086
9087 # Check whether --with-system-readline was given.
9088 if test "${with_system_readline+set}" = set; then :
9089 withval=$with_system_readline;
9090 fi
9091
9092
9093 if test "$with_system_readline" = yes; then
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9095 $as_echo_n "checking whether system readline is new enough... " >&6; }
9096 if ${gdb_cv_readline_ok+:} false; then :
9097 $as_echo_n "(cached) " >&6
9098 else
9099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9100 /* end confdefs.h. */
9101 #include <stdio.h>
9102 #include <readline/readline.h>
9103 int
9104 main ()
9105 {
9106 #if RL_VERSION_MAJOR < 7
9107 # error "readline version 7 required"
9108 #endif
9109 ;
9110 return 0;
9111 }
9112 _ACEOF
9113 if ac_fn_c_try_compile "$LINENO"; then :
9114 gdb_cv_readline_ok=yes
9115 else
9116 gdb_cv_readline_ok=no
9117 fi
9118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9119 fi
9120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9121 $as_echo "$gdb_cv_readline_ok" >&6; }
9122 if test "$gdb_cv_readline_ok" != yes; then
9123 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9124 fi
9125
9126 READLINE=-lreadline
9127 READLINE_DEPS=
9128 READLINE_CFLAGS=
9129 READLINE_TEXI_INCFLAG=
9130 else
9131 READLINE='$(READLINE_DIR)/libreadline.a'
9132 READLINE_DEPS='$(READLINE)'
9133 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9134 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9135 fi
9136
9137
9138
9139
9140
9141 # Generate jit-reader.h
9142
9143 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9144 TARGET_PTR=
9145
9146 # The cast to long int works around a bug in the HP C Compiler
9147 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9148 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9149 # This bug is HP SR number 8606223364.
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9151 $as_echo_n "checking size of unsigned long long... " >&6; }
9152 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9153 $as_echo_n "(cached) " >&6
9154 else
9155 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9156
9157 else
9158 if test "$ac_cv_type_unsigned_long_long" = yes; then
9159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9160 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9161 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9162 See \`config.log' for more details" "$LINENO" 5; }
9163 else
9164 ac_cv_sizeof_unsigned_long_long=0
9165 fi
9166 fi
9167
9168 fi
9169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9170 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9171
9172
9173
9174 cat >>confdefs.h <<_ACEOF
9175 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9176 _ACEOF
9177
9178
9179 # The cast to long int works around a bug in the HP C Compiler
9180 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9181 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9182 # This bug is HP SR number 8606223364.
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9184 $as_echo_n "checking size of unsigned long... " >&6; }
9185 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9186 $as_echo_n "(cached) " >&6
9187 else
9188 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9189
9190 else
9191 if test "$ac_cv_type_unsigned_long" = yes; then
9192 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9193 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9194 as_fn_error 77 "cannot compute sizeof (unsigned long)
9195 See \`config.log' for more details" "$LINENO" 5; }
9196 else
9197 ac_cv_sizeof_unsigned_long=0
9198 fi
9199 fi
9200
9201 fi
9202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9203 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9204
9205
9206
9207 cat >>confdefs.h <<_ACEOF
9208 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9209 _ACEOF
9210
9211
9212 # The cast to long int works around a bug in the HP C Compiler
9213 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9214 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9215 # This bug is HP SR number 8606223364.
9216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9217 $as_echo_n "checking size of unsigned __int128... " >&6; }
9218 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9219 $as_echo_n "(cached) " >&6
9220 else
9221 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9222
9223 else
9224 if test "$ac_cv_type_unsigned___int128" = yes; then
9225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9227 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9228 See \`config.log' for more details" "$LINENO" 5; }
9229 else
9230 ac_cv_sizeof_unsigned___int128=0
9231 fi
9232 fi
9233
9234 fi
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9236 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9237
9238
9239
9240 cat >>confdefs.h <<_ACEOF
9241 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9242 _ACEOF
9243
9244
9245
9246 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9247 TARGET_PTR="unsigned long"
9248 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9249 TARGET_PTR="unsigned long long"
9250 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9251 TARGET_PTR="unsigned __int128"
9252 else
9253 TARGET_PTR="unsigned long"
9254 fi
9255
9256
9257 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9258
9259
9260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9261 $as_echo_n "checking for library containing dlopen... " >&6; }
9262 if ${ac_cv_search_dlopen+:} false; then :
9263 $as_echo_n "(cached) " >&6
9264 else
9265 ac_func_search_save_LIBS=$LIBS
9266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9267 /* end confdefs.h. */
9268
9269 /* Override any GCC internal prototype to avoid an error.
9270 Use char because int might match the return type of a GCC
9271 builtin and then its argument prototype would still apply. */
9272 #ifdef __cplusplus
9273 extern "C"
9274 #endif
9275 char dlopen ();
9276 int
9277 main ()
9278 {
9279 return dlopen ();
9280 ;
9281 return 0;
9282 }
9283 _ACEOF
9284 for ac_lib in '' dl; do
9285 if test -z "$ac_lib"; then
9286 ac_res="none required"
9287 else
9288 ac_res=-l$ac_lib
9289 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9290 fi
9291 if ac_fn_c_try_link "$LINENO"; then :
9292 ac_cv_search_dlopen=$ac_res
9293 fi
9294 rm -f core conftest.err conftest.$ac_objext \
9295 conftest$ac_exeext
9296 if ${ac_cv_search_dlopen+:} false; then :
9297 break
9298 fi
9299 done
9300 if ${ac_cv_search_dlopen+:} false; then :
9301
9302 else
9303 ac_cv_search_dlopen=no
9304 fi
9305 rm conftest.$ac_ext
9306 LIBS=$ac_func_search_save_LIBS
9307 fi
9308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9309 $as_echo "$ac_cv_search_dlopen" >&6; }
9310 ac_res=$ac_cv_search_dlopen
9311 if test "$ac_res" != no; then :
9312 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9313
9314 fi
9315
9316
9317
9318
9319 # Check whether --with-jit-reader-dir was given.
9320 if test "${with_jit_reader_dir+set}" = set; then :
9321 withval=$with_jit_reader_dir;
9322 JIT_READER_DIR=$withval
9323 else
9324 JIT_READER_DIR=${libdir}/gdb
9325 fi
9326
9327
9328 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9329 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9330 ac_define_dir=`eval echo $JIT_READER_DIR`
9331 ac_define_dir=`eval echo $ac_define_dir`
9332
9333 cat >>confdefs.h <<_ACEOF
9334 #define JIT_READER_DIR "$ac_define_dir"
9335 _ACEOF
9336
9337
9338
9339
9340 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9341 if test "x$prefix" = xNONE; then
9342 test_prefix=/usr/local
9343 else
9344 test_prefix=$prefix
9345 fi
9346 else
9347 test_prefix=$exec_prefix
9348 fi
9349 value=0
9350 case ${ac_define_dir} in
9351 "${test_prefix}"|"${test_prefix}/"*|\
9352 '${exec_prefix}'|'${exec_prefix}/'*)
9353 value=1
9354 ;;
9355 esac
9356
9357 cat >>confdefs.h <<_ACEOF
9358 #define JIT_READER_DIR_RELOCATABLE $value
9359 _ACEOF
9360
9361
9362
9363
9364
9365 # Check whether --with-expat was given.
9366 if test "${with_expat+set}" = set; then :
9367 withval=$with_expat;
9368 else
9369 with_expat=auto
9370 fi
9371
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9373 $as_echo_n "checking whether to use expat... " >&6; }
9374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9375 $as_echo "$with_expat" >&6; }
9376
9377 if test "${with_expat}" = no; then
9378 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9379 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9380 HAVE_LIBEXPAT=no
9381 else
9382
9383
9384
9385
9386
9387
9388
9389
9390 use_additional=yes
9391
9392 acl_save_prefix="$prefix"
9393 prefix="$acl_final_prefix"
9394 acl_save_exec_prefix="$exec_prefix"
9395 exec_prefix="$acl_final_exec_prefix"
9396
9397 eval additional_includedir=\"$includedir\"
9398 eval additional_libdir=\"$libdir\"
9399
9400 exec_prefix="$acl_save_exec_prefix"
9401 prefix="$acl_save_prefix"
9402
9403
9404 # Check whether --with-libexpat-prefix was given.
9405 if test "${with_libexpat_prefix+set}" = set; then :
9406 withval=$with_libexpat_prefix;
9407 if test "X$withval" = "Xno"; then
9408 use_additional=no
9409 else
9410 if test "X$withval" = "X"; then
9411
9412 acl_save_prefix="$prefix"
9413 prefix="$acl_final_prefix"
9414 acl_save_exec_prefix="$exec_prefix"
9415 exec_prefix="$acl_final_exec_prefix"
9416
9417 eval additional_includedir=\"$includedir\"
9418 eval additional_libdir=\"$libdir\"
9419
9420 exec_prefix="$acl_save_exec_prefix"
9421 prefix="$acl_save_prefix"
9422
9423 else
9424 additional_includedir="$withval/include"
9425 additional_libdir="$withval/lib"
9426 fi
9427 fi
9428
9429 fi
9430
9431
9432 # Check whether --with-libexpat-type was given.
9433 if test "${with_libexpat_type+set}" = set; then :
9434 withval=$with_libexpat_type; with_libexpat_type=$withval
9435 else
9436 with_libexpat_type=auto
9437 fi
9438
9439 lib_type=`eval echo \$with_libexpat_type`
9440
9441 LIBEXPAT=
9442 LTLIBEXPAT=
9443 INCEXPAT=
9444 rpathdirs=
9445 ltrpathdirs=
9446 names_already_handled=
9447 names_next_round='expat '
9448 while test -n "$names_next_round"; do
9449 names_this_round="$names_next_round"
9450 names_next_round=
9451 for name in $names_this_round; do
9452 already_handled=
9453 for n in $names_already_handled; do
9454 if test "$n" = "$name"; then
9455 already_handled=yes
9456 break
9457 fi
9458 done
9459 if test -z "$already_handled"; then
9460 names_already_handled="$names_already_handled $name"
9461 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9462 eval value=\"\$HAVE_LIB$uppername\"
9463 if test -n "$value"; then
9464 if test "$value" = yes; then
9465 eval value=\"\$LIB$uppername\"
9466 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9467 eval value=\"\$LTLIB$uppername\"
9468 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9469 else
9470 :
9471 fi
9472 else
9473 found_dir=
9474 found_la=
9475 found_so=
9476 found_a=
9477 if test $use_additional = yes; then
9478 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9479 found_dir="$additional_libdir"
9480 found_so="$additional_libdir/lib$name.$shlibext"
9481 if test -f "$additional_libdir/lib$name.la"; then
9482 found_la="$additional_libdir/lib$name.la"
9483 fi
9484 elif test x$lib_type != xshared; then
9485 if test -f "$additional_libdir/lib$name.$libext"; then
9486 found_dir="$additional_libdir"
9487 found_a="$additional_libdir/lib$name.$libext"
9488 if test -f "$additional_libdir/lib$name.la"; then
9489 found_la="$additional_libdir/lib$name.la"
9490 fi
9491 fi
9492 fi
9493 fi
9494 if test "X$found_dir" = "X"; then
9495 for x in $LDFLAGS $LTLIBEXPAT; do
9496
9497 acl_save_prefix="$prefix"
9498 prefix="$acl_final_prefix"
9499 acl_save_exec_prefix="$exec_prefix"
9500 exec_prefix="$acl_final_exec_prefix"
9501 eval x=\"$x\"
9502 exec_prefix="$acl_save_exec_prefix"
9503 prefix="$acl_save_prefix"
9504
9505 case "$x" in
9506 -L*)
9507 dir=`echo "X$x" | sed -e 's/^X-L//'`
9508 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9509 found_dir="$dir"
9510 found_so="$dir/lib$name.$shlibext"
9511 if test -f "$dir/lib$name.la"; then
9512 found_la="$dir/lib$name.la"
9513 fi
9514 elif test x$lib_type != xshared; then
9515 if test -f "$dir/lib$name.$libext"; then
9516 found_dir="$dir"
9517 found_a="$dir/lib$name.$libext"
9518 if test -f "$dir/lib$name.la"; then
9519 found_la="$dir/lib$name.la"
9520 fi
9521 fi
9522 fi
9523 ;;
9524 esac
9525 if test "X$found_dir" != "X"; then
9526 break
9527 fi
9528 done
9529 fi
9530 if test "X$found_dir" != "X"; then
9531 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9532 if test "X$found_so" != "X"; then
9533 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9534 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9535 else
9536 haveit=
9537 for x in $ltrpathdirs; do
9538 if test "X$x" = "X$found_dir"; then
9539 haveit=yes
9540 break
9541 fi
9542 done
9543 if test -z "$haveit"; then
9544 ltrpathdirs="$ltrpathdirs $found_dir"
9545 fi
9546 if test "$hardcode_direct" = yes; then
9547 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9548 else
9549 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9550 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9551 haveit=
9552 for x in $rpathdirs; do
9553 if test "X$x" = "X$found_dir"; then
9554 haveit=yes
9555 break
9556 fi
9557 done
9558 if test -z "$haveit"; then
9559 rpathdirs="$rpathdirs $found_dir"
9560 fi
9561 else
9562 haveit=
9563 for x in $LDFLAGS $LIBEXPAT; do
9564
9565 acl_save_prefix="$prefix"
9566 prefix="$acl_final_prefix"
9567 acl_save_exec_prefix="$exec_prefix"
9568 exec_prefix="$acl_final_exec_prefix"
9569 eval x=\"$x\"
9570 exec_prefix="$acl_save_exec_prefix"
9571 prefix="$acl_save_prefix"
9572
9573 if test "X$x" = "X-L$found_dir"; then
9574 haveit=yes
9575 break
9576 fi
9577 done
9578 if test -z "$haveit"; then
9579 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9580 fi
9581 if test "$hardcode_minus_L" != no; then
9582 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9583 else
9584 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9585 fi
9586 fi
9587 fi
9588 fi
9589 else
9590 if test "X$found_a" != "X"; then
9591 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9592 else
9593 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9594 fi
9595 fi
9596 additional_includedir=
9597 case "$found_dir" in
9598 */lib | */lib/)
9599 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9600 additional_includedir="$basedir/include"
9601 ;;
9602 esac
9603 if test "X$additional_includedir" != "X"; then
9604 if test "X$additional_includedir" != "X/usr/include"; then
9605 haveit=
9606 if test "X$additional_includedir" = "X/usr/local/include"; then
9607 if test -n "$GCC"; then
9608 case $host_os in
9609 linux*) haveit=yes;;
9610 esac
9611 fi
9612 fi
9613 if test -z "$haveit"; then
9614 for x in $CPPFLAGS $INCEXPAT; do
9615
9616 acl_save_prefix="$prefix"
9617 prefix="$acl_final_prefix"
9618 acl_save_exec_prefix="$exec_prefix"
9619 exec_prefix="$acl_final_exec_prefix"
9620 eval x=\"$x\"
9621 exec_prefix="$acl_save_exec_prefix"
9622 prefix="$acl_save_prefix"
9623
9624 if test "X$x" = "X-I$additional_includedir"; then
9625 haveit=yes
9626 break
9627 fi
9628 done
9629 if test -z "$haveit"; then
9630 if test -d "$additional_includedir"; then
9631 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9632 fi
9633 fi
9634 fi
9635 fi
9636 fi
9637 if test -n "$found_la"; then
9638 save_libdir="$libdir"
9639 case "$found_la" in
9640 */* | *\\*) . "$found_la" ;;
9641 *) . "./$found_la" ;;
9642 esac
9643 libdir="$save_libdir"
9644 for dep in $dependency_libs; do
9645 case "$dep" in
9646 -L*)
9647 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9648 if test "X$additional_libdir" != "X/usr/lib"; then
9649 haveit=
9650 if test "X$additional_libdir" = "X/usr/local/lib"; then
9651 if test -n "$GCC"; then
9652 case $host_os in
9653 linux*) haveit=yes;;
9654 esac
9655 fi
9656 fi
9657 if test -z "$haveit"; then
9658 haveit=
9659 for x in $LDFLAGS $LIBEXPAT; do
9660
9661 acl_save_prefix="$prefix"
9662 prefix="$acl_final_prefix"
9663 acl_save_exec_prefix="$exec_prefix"
9664 exec_prefix="$acl_final_exec_prefix"
9665 eval x=\"$x\"
9666 exec_prefix="$acl_save_exec_prefix"
9667 prefix="$acl_save_prefix"
9668
9669 if test "X$x" = "X-L$additional_libdir"; then
9670 haveit=yes
9671 break
9672 fi
9673 done
9674 if test -z "$haveit"; then
9675 if test -d "$additional_libdir"; then
9676 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9677 fi
9678 fi
9679 haveit=
9680 for x in $LDFLAGS $LTLIBEXPAT; do
9681
9682 acl_save_prefix="$prefix"
9683 prefix="$acl_final_prefix"
9684 acl_save_exec_prefix="$exec_prefix"
9685 exec_prefix="$acl_final_exec_prefix"
9686 eval x=\"$x\"
9687 exec_prefix="$acl_save_exec_prefix"
9688 prefix="$acl_save_prefix"
9689
9690 if test "X$x" = "X-L$additional_libdir"; then
9691 haveit=yes
9692 break
9693 fi
9694 done
9695 if test -z "$haveit"; then
9696 if test -d "$additional_libdir"; then
9697 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9698 fi
9699 fi
9700 fi
9701 fi
9702 ;;
9703 -R*)
9704 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9705 if test "$enable_rpath" != no; then
9706 haveit=
9707 for x in $rpathdirs; do
9708 if test "X$x" = "X$dir"; then
9709 haveit=yes
9710 break
9711 fi
9712 done
9713 if test -z "$haveit"; then
9714 rpathdirs="$rpathdirs $dir"
9715 fi
9716 haveit=
9717 for x in $ltrpathdirs; do
9718 if test "X$x" = "X$dir"; then
9719 haveit=yes
9720 break
9721 fi
9722 done
9723 if test -z "$haveit"; then
9724 ltrpathdirs="$ltrpathdirs $dir"
9725 fi
9726 fi
9727 ;;
9728 -l*)
9729 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9730 ;;
9731 *.la)
9732 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9733 ;;
9734 *)
9735 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9736 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9737 ;;
9738 esac
9739 done
9740 fi
9741 else
9742 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9743 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9744 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9745 else
9746 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9747 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9748 fi
9749 fi
9750 fi
9751 fi
9752 done
9753 done
9754 if test "X$rpathdirs" != "X"; then
9755 if test -n "$hardcode_libdir_separator"; then
9756 alldirs=
9757 for found_dir in $rpathdirs; do
9758 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9759 done
9760 acl_save_libdir="$libdir"
9761 libdir="$alldirs"
9762 eval flag=\"$hardcode_libdir_flag_spec\"
9763 libdir="$acl_save_libdir"
9764 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9765 else
9766 for found_dir in $rpathdirs; do
9767 acl_save_libdir="$libdir"
9768 libdir="$found_dir"
9769 eval flag=\"$hardcode_libdir_flag_spec\"
9770 libdir="$acl_save_libdir"
9771 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9772 done
9773 fi
9774 fi
9775 if test "X$ltrpathdirs" != "X"; then
9776 for found_dir in $ltrpathdirs; do
9777 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9778 done
9779 fi
9780
9781
9782 ac_save_CPPFLAGS="$CPPFLAGS"
9783
9784 for element in $INCEXPAT; do
9785 haveit=
9786 for x in $CPPFLAGS; do
9787
9788 acl_save_prefix="$prefix"
9789 prefix="$acl_final_prefix"
9790 acl_save_exec_prefix="$exec_prefix"
9791 exec_prefix="$acl_final_exec_prefix"
9792 eval x=\"$x\"
9793 exec_prefix="$acl_save_exec_prefix"
9794 prefix="$acl_save_prefix"
9795
9796 if test "X$x" = "X$element"; then
9797 haveit=yes
9798 break
9799 fi
9800 done
9801 if test -z "$haveit"; then
9802 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9803 fi
9804 done
9805
9806
9807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9808 $as_echo_n "checking for libexpat... " >&6; }
9809 if ${ac_cv_libexpat+:} false; then :
9810 $as_echo_n "(cached) " >&6
9811 else
9812
9813 ac_save_LIBS="$LIBS"
9814 LIBS="$LIBS $LIBEXPAT"
9815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9816 /* end confdefs.h. */
9817 #include "expat.h"
9818 int
9819 main ()
9820 {
9821 XML_Parser p = XML_ParserCreate (0);
9822 ;
9823 return 0;
9824 }
9825 _ACEOF
9826 if ac_fn_c_try_link "$LINENO"; then :
9827 ac_cv_libexpat=yes
9828 else
9829 ac_cv_libexpat=no
9830 fi
9831 rm -f core conftest.err conftest.$ac_objext \
9832 conftest$ac_exeext conftest.$ac_ext
9833 LIBS="$ac_save_LIBS"
9834
9835 fi
9836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9837 $as_echo "$ac_cv_libexpat" >&6; }
9838 if test "$ac_cv_libexpat" = yes; then
9839 HAVE_LIBEXPAT=yes
9840
9841 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9842
9843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9844 $as_echo_n "checking how to link with libexpat... " >&6; }
9845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9846 $as_echo "$LIBEXPAT" >&6; }
9847 else
9848 HAVE_LIBEXPAT=no
9849 CPPFLAGS="$ac_save_CPPFLAGS"
9850 LIBEXPAT=
9851 LTLIBEXPAT=
9852 fi
9853
9854
9855
9856
9857
9858
9859 if test "$HAVE_LIBEXPAT" != yes; then
9860 if test "$with_expat" = yes; then
9861 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9862 else
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9864 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9865 fi
9866 else
9867 save_LIBS=$LIBS
9868 LIBS="$LIBS $LIBEXPAT"
9869 for ac_func in XML_StopParser
9870 do :
9871 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9872 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9873 cat >>confdefs.h <<_ACEOF
9874 #define HAVE_XML_STOPPARSER 1
9875 _ACEOF
9876
9877 fi
9878 done
9879
9880 LIBS=$save_LIBS
9881 fi
9882 fi
9883
9884
9885 # Check whether --with-mpfr was given.
9886 if test "${with_mpfr+set}" = set; then :
9887 withval=$with_mpfr;
9888 else
9889 with_mpfr=auto
9890 fi
9891
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9893 $as_echo_n "checking whether to use MPFR... " >&6; }
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9895 $as_echo "$with_mpfr" >&6; }
9896
9897 if test "${with_mpfr}" = no; then
9898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9899 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9900 HAVE_LIBMPFR=no
9901 else
9902
9903
9904
9905
9906
9907
9908
9909
9910 use_additional=yes
9911
9912 acl_save_prefix="$prefix"
9913 prefix="$acl_final_prefix"
9914 acl_save_exec_prefix="$exec_prefix"
9915 exec_prefix="$acl_final_exec_prefix"
9916
9917 eval additional_includedir=\"$includedir\"
9918 eval additional_libdir=\"$libdir\"
9919
9920 exec_prefix="$acl_save_exec_prefix"
9921 prefix="$acl_save_prefix"
9922
9923
9924 # Check whether --with-libmpfr-prefix was given.
9925 if test "${with_libmpfr_prefix+set}" = set; then :
9926 withval=$with_libmpfr_prefix;
9927 if test "X$withval" = "Xno"; then
9928 use_additional=no
9929 else
9930 if test "X$withval" = "X"; then
9931
9932 acl_save_prefix="$prefix"
9933 prefix="$acl_final_prefix"
9934 acl_save_exec_prefix="$exec_prefix"
9935 exec_prefix="$acl_final_exec_prefix"
9936
9937 eval additional_includedir=\"$includedir\"
9938 eval additional_libdir=\"$libdir\"
9939
9940 exec_prefix="$acl_save_exec_prefix"
9941 prefix="$acl_save_prefix"
9942
9943 else
9944 additional_includedir="$withval/include"
9945 additional_libdir="$withval/lib"
9946 fi
9947 fi
9948
9949 fi
9950
9951
9952 # Check whether --with-libmpfr-type was given.
9953 if test "${with_libmpfr_type+set}" = set; then :
9954 withval=$with_libmpfr_type; with_libmpfr_type=$withval
9955 else
9956 with_libmpfr_type=auto
9957 fi
9958
9959 lib_type=`eval echo \$with_libmpfr_type`
9960
9961 LIBMPFR=
9962 LTLIBMPFR=
9963 INCMPFR=
9964 rpathdirs=
9965 ltrpathdirs=
9966 names_already_handled=
9967 names_next_round='mpfr gmp'
9968 while test -n "$names_next_round"; do
9969 names_this_round="$names_next_round"
9970 names_next_round=
9971 for name in $names_this_round; do
9972 already_handled=
9973 for n in $names_already_handled; do
9974 if test "$n" = "$name"; then
9975 already_handled=yes
9976 break
9977 fi
9978 done
9979 if test -z "$already_handled"; then
9980 names_already_handled="$names_already_handled $name"
9981 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9982 eval value=\"\$HAVE_LIB$uppername\"
9983 if test -n "$value"; then
9984 if test "$value" = yes; then
9985 eval value=\"\$LIB$uppername\"
9986 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9987 eval value=\"\$LTLIB$uppername\"
9988 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9989 else
9990 :
9991 fi
9992 else
9993 found_dir=
9994 found_la=
9995 found_so=
9996 found_a=
9997 if test $use_additional = yes; then
9998 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9999 found_dir="$additional_libdir"
10000 found_so="$additional_libdir/lib$name.$shlibext"
10001 if test -f "$additional_libdir/lib$name.la"; then
10002 found_la="$additional_libdir/lib$name.la"
10003 fi
10004 elif test x$lib_type != xshared; then
10005 if test -f "$additional_libdir/lib$name.$libext"; then
10006 found_dir="$additional_libdir"
10007 found_a="$additional_libdir/lib$name.$libext"
10008 if test -f "$additional_libdir/lib$name.la"; then
10009 found_la="$additional_libdir/lib$name.la"
10010 fi
10011 fi
10012 fi
10013 fi
10014 if test "X$found_dir" = "X"; then
10015 for x in $LDFLAGS $LTLIBMPFR; do
10016
10017 acl_save_prefix="$prefix"
10018 prefix="$acl_final_prefix"
10019 acl_save_exec_prefix="$exec_prefix"
10020 exec_prefix="$acl_final_exec_prefix"
10021 eval x=\"$x\"
10022 exec_prefix="$acl_save_exec_prefix"
10023 prefix="$acl_save_prefix"
10024
10025 case "$x" in
10026 -L*)
10027 dir=`echo "X$x" | sed -e 's/^X-L//'`
10028 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10029 found_dir="$dir"
10030 found_so="$dir/lib$name.$shlibext"
10031 if test -f "$dir/lib$name.la"; then
10032 found_la="$dir/lib$name.la"
10033 fi
10034 elif test x$lib_type != xshared; then
10035 if test -f "$dir/lib$name.$libext"; then
10036 found_dir="$dir"
10037 found_a="$dir/lib$name.$libext"
10038 if test -f "$dir/lib$name.la"; then
10039 found_la="$dir/lib$name.la"
10040 fi
10041 fi
10042 fi
10043 ;;
10044 esac
10045 if test "X$found_dir" != "X"; then
10046 break
10047 fi
10048 done
10049 fi
10050 if test "X$found_dir" != "X"; then
10051 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10052 if test "X$found_so" != "X"; then
10053 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10054 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10055 else
10056 haveit=
10057 for x in $ltrpathdirs; do
10058 if test "X$x" = "X$found_dir"; then
10059 haveit=yes
10060 break
10061 fi
10062 done
10063 if test -z "$haveit"; then
10064 ltrpathdirs="$ltrpathdirs $found_dir"
10065 fi
10066 if test "$hardcode_direct" = yes; then
10067 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10068 else
10069 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10070 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10071 haveit=
10072 for x in $rpathdirs; do
10073 if test "X$x" = "X$found_dir"; then
10074 haveit=yes
10075 break
10076 fi
10077 done
10078 if test -z "$haveit"; then
10079 rpathdirs="$rpathdirs $found_dir"
10080 fi
10081 else
10082 haveit=
10083 for x in $LDFLAGS $LIBMPFR; do
10084
10085 acl_save_prefix="$prefix"
10086 prefix="$acl_final_prefix"
10087 acl_save_exec_prefix="$exec_prefix"
10088 exec_prefix="$acl_final_exec_prefix"
10089 eval x=\"$x\"
10090 exec_prefix="$acl_save_exec_prefix"
10091 prefix="$acl_save_prefix"
10092
10093 if test "X$x" = "X-L$found_dir"; then
10094 haveit=yes
10095 break
10096 fi
10097 done
10098 if test -z "$haveit"; then
10099 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10100 fi
10101 if test "$hardcode_minus_L" != no; then
10102 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10103 else
10104 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10105 fi
10106 fi
10107 fi
10108 fi
10109 else
10110 if test "X$found_a" != "X"; then
10111 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10112 else
10113 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10114 fi
10115 fi
10116 additional_includedir=
10117 case "$found_dir" in
10118 */lib | */lib/)
10119 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10120 additional_includedir="$basedir/include"
10121 ;;
10122 esac
10123 if test "X$additional_includedir" != "X"; then
10124 if test "X$additional_includedir" != "X/usr/include"; then
10125 haveit=
10126 if test "X$additional_includedir" = "X/usr/local/include"; then
10127 if test -n "$GCC"; then
10128 case $host_os in
10129 linux*) haveit=yes;;
10130 esac
10131 fi
10132 fi
10133 if test -z "$haveit"; then
10134 for x in $CPPFLAGS $INCMPFR; do
10135
10136 acl_save_prefix="$prefix"
10137 prefix="$acl_final_prefix"
10138 acl_save_exec_prefix="$exec_prefix"
10139 exec_prefix="$acl_final_exec_prefix"
10140 eval x=\"$x\"
10141 exec_prefix="$acl_save_exec_prefix"
10142 prefix="$acl_save_prefix"
10143
10144 if test "X$x" = "X-I$additional_includedir"; then
10145 haveit=yes
10146 break
10147 fi
10148 done
10149 if test -z "$haveit"; then
10150 if test -d "$additional_includedir"; then
10151 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10152 fi
10153 fi
10154 fi
10155 fi
10156 fi
10157 if test -n "$found_la"; then
10158 save_libdir="$libdir"
10159 case "$found_la" in
10160 */* | *\\*) . "$found_la" ;;
10161 *) . "./$found_la" ;;
10162 esac
10163 libdir="$save_libdir"
10164 for dep in $dependency_libs; do
10165 case "$dep" in
10166 -L*)
10167 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10168 if test "X$additional_libdir" != "X/usr/lib"; then
10169 haveit=
10170 if test "X$additional_libdir" = "X/usr/local/lib"; then
10171 if test -n "$GCC"; then
10172 case $host_os in
10173 linux*) haveit=yes;;
10174 esac
10175 fi
10176 fi
10177 if test -z "$haveit"; then
10178 haveit=
10179 for x in $LDFLAGS $LIBMPFR; do
10180
10181 acl_save_prefix="$prefix"
10182 prefix="$acl_final_prefix"
10183 acl_save_exec_prefix="$exec_prefix"
10184 exec_prefix="$acl_final_exec_prefix"
10185 eval x=\"$x\"
10186 exec_prefix="$acl_save_exec_prefix"
10187 prefix="$acl_save_prefix"
10188
10189 if test "X$x" = "X-L$additional_libdir"; then
10190 haveit=yes
10191 break
10192 fi
10193 done
10194 if test -z "$haveit"; then
10195 if test -d "$additional_libdir"; then
10196 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10197 fi
10198 fi
10199 haveit=
10200 for x in $LDFLAGS $LTLIBMPFR; do
10201
10202 acl_save_prefix="$prefix"
10203 prefix="$acl_final_prefix"
10204 acl_save_exec_prefix="$exec_prefix"
10205 exec_prefix="$acl_final_exec_prefix"
10206 eval x=\"$x\"
10207 exec_prefix="$acl_save_exec_prefix"
10208 prefix="$acl_save_prefix"
10209
10210 if test "X$x" = "X-L$additional_libdir"; then
10211 haveit=yes
10212 break
10213 fi
10214 done
10215 if test -z "$haveit"; then
10216 if test -d "$additional_libdir"; then
10217 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10218 fi
10219 fi
10220 fi
10221 fi
10222 ;;
10223 -R*)
10224 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10225 if test "$enable_rpath" != no; then
10226 haveit=
10227 for x in $rpathdirs; do
10228 if test "X$x" = "X$dir"; then
10229 haveit=yes
10230 break
10231 fi
10232 done
10233 if test -z "$haveit"; then
10234 rpathdirs="$rpathdirs $dir"
10235 fi
10236 haveit=
10237 for x in $ltrpathdirs; do
10238 if test "X$x" = "X$dir"; then
10239 haveit=yes
10240 break
10241 fi
10242 done
10243 if test -z "$haveit"; then
10244 ltrpathdirs="$ltrpathdirs $dir"
10245 fi
10246 fi
10247 ;;
10248 -l*)
10249 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10250 ;;
10251 *.la)
10252 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10253 ;;
10254 *)
10255 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10256 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10257 ;;
10258 esac
10259 done
10260 fi
10261 else
10262 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10263 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10264 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10265 else
10266 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10267 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10268 fi
10269 fi
10270 fi
10271 fi
10272 done
10273 done
10274 if test "X$rpathdirs" != "X"; then
10275 if test -n "$hardcode_libdir_separator"; then
10276 alldirs=
10277 for found_dir in $rpathdirs; do
10278 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10279 done
10280 acl_save_libdir="$libdir"
10281 libdir="$alldirs"
10282 eval flag=\"$hardcode_libdir_flag_spec\"
10283 libdir="$acl_save_libdir"
10284 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10285 else
10286 for found_dir in $rpathdirs; do
10287 acl_save_libdir="$libdir"
10288 libdir="$found_dir"
10289 eval flag=\"$hardcode_libdir_flag_spec\"
10290 libdir="$acl_save_libdir"
10291 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10292 done
10293 fi
10294 fi
10295 if test "X$ltrpathdirs" != "X"; then
10296 for found_dir in $ltrpathdirs; do
10297 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10298 done
10299 fi
10300
10301
10302 ac_save_CPPFLAGS="$CPPFLAGS"
10303
10304 for element in $INCMPFR; do
10305 haveit=
10306 for x in $CPPFLAGS; do
10307
10308 acl_save_prefix="$prefix"
10309 prefix="$acl_final_prefix"
10310 acl_save_exec_prefix="$exec_prefix"
10311 exec_prefix="$acl_final_exec_prefix"
10312 eval x=\"$x\"
10313 exec_prefix="$acl_save_exec_prefix"
10314 prefix="$acl_save_prefix"
10315
10316 if test "X$x" = "X$element"; then
10317 haveit=yes
10318 break
10319 fi
10320 done
10321 if test -z "$haveit"; then
10322 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10323 fi
10324 done
10325
10326
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10328 $as_echo_n "checking for libmpfr... " >&6; }
10329 if ${ac_cv_libmpfr+:} false; then :
10330 $as_echo_n "(cached) " >&6
10331 else
10332
10333 ac_save_LIBS="$LIBS"
10334 LIBS="$LIBS $LIBMPFR"
10335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10336 /* end confdefs.h. */
10337 #include <mpfr.h>
10338 int
10339 main ()
10340 {
10341 mpfr_exp_t exp; mpfr_t x;
10342 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10343 ;
10344 return 0;
10345 }
10346 _ACEOF
10347 if ac_fn_c_try_link "$LINENO"; then :
10348 ac_cv_libmpfr=yes
10349 else
10350 ac_cv_libmpfr=no
10351 fi
10352 rm -f core conftest.err conftest.$ac_objext \
10353 conftest$ac_exeext conftest.$ac_ext
10354 LIBS="$ac_save_LIBS"
10355
10356 fi
10357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10358 $as_echo "$ac_cv_libmpfr" >&6; }
10359 if test "$ac_cv_libmpfr" = yes; then
10360 HAVE_LIBMPFR=yes
10361
10362 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10363
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10365 $as_echo_n "checking how to link with libmpfr... " >&6; }
10366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10367 $as_echo "$LIBMPFR" >&6; }
10368 else
10369 HAVE_LIBMPFR=no
10370 CPPFLAGS="$ac_save_CPPFLAGS"
10371 LIBMPFR=
10372 LTLIBMPFR=
10373 fi
10374
10375
10376
10377
10378
10379
10380 if test "$HAVE_LIBMPFR" != yes; then
10381 if test "$with_mpfr" = yes; then
10382 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10383 else
10384 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10385 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10386 fi
10387 fi
10388 fi
10389
10390 # --------------------- #
10391 # Check for libpython. #
10392 # --------------------- #
10393
10394
10395
10396
10397
10398
10399 # Check whether --with-python was given.
10400 if test "${with_python+set}" = set; then :
10401 withval=$with_python;
10402 else
10403 with_python=auto
10404 fi
10405
10406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10407 $as_echo_n "checking whether to use python... " >&6; }
10408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10409 $as_echo "$with_python" >&6; }
10410
10411 if test "${with_python}" = no; then
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10413 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10414 have_libpython=no
10415 else
10416 case "${with_python}" in
10417 [\\/]* | ?:[\\/]*)
10418 if test -d "${with_python}"; then
10419 # Assume the python binary is ${with_python}/bin/python.
10420 python_prog="${with_python}/bin/python"
10421 python_prefix=
10422 # If python does not exit ${with_python}/bin, then try in
10423 # ${with_python}. On Windows/MinGW, this is where the Python
10424 # executable is.
10425 if test ! -x "${python_prog}"; then
10426 python_prog="${with_python}/python"
10427 python_prefix=
10428 fi
10429 if test ! -x "${python_prog}"; then
10430 # Fall back to gdb 7.0/7.1 behaviour.
10431 python_prog=missing
10432 python_prefix=${with_python}
10433 fi
10434 elif test -x "${with_python}"; then
10435 # While we can't run python compiled for $host (unless host == build),
10436 # the user could write a script that provides the needed information,
10437 # so we support that.
10438 python_prog=${with_python}
10439 python_prefix=
10440 else
10441 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10442 fi
10443 ;;
10444 */*)
10445 # Disallow --with-python=foo/bar.
10446 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10447 ;;
10448 *)
10449 # The user has either specified auto, yes, or the name of the python
10450 # program assumed to be in $PATH.
10451 python_prefix=
10452 case "${with_python}" in
10453 yes | auto)
10454 if test "${build}" = "${host}"; then
10455 # Extract the first word of "python", so it can be a program name with args.
10456 set dummy python; ac_word=$2
10457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10458 $as_echo_n "checking for $ac_word... " >&6; }
10459 if ${ac_cv_path_python_prog_path+:} false; then :
10460 $as_echo_n "(cached) " >&6
10461 else
10462 case $python_prog_path in
10463 [\\/]* | ?:[\\/]*)
10464 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10465 ;;
10466 *)
10467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10468 for as_dir in $PATH
10469 do
10470 IFS=$as_save_IFS
10471 test -z "$as_dir" && as_dir=.
10472 for ac_exec_ext in '' $ac_executable_extensions; do
10473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10474 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10475 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10476 break 2
10477 fi
10478 done
10479 done
10480 IFS=$as_save_IFS
10481
10482 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10483 ;;
10484 esac
10485 fi
10486 python_prog_path=$ac_cv_path_python_prog_path
10487 if test -n "$python_prog_path"; then
10488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10489 $as_echo "$python_prog_path" >&6; }
10490 else
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492 $as_echo "no" >&6; }
10493 fi
10494
10495
10496 if test "${python_prog_path}" = missing; then
10497 python_prog=missing
10498 else
10499 python_prog=${python_prog_path}
10500 fi
10501 else
10502 # Not much we can do except assume the cross-compiler will find the
10503 # right files.
10504 python_prog=missing
10505 fi
10506 ;;
10507 *)
10508 # While we can't run python compiled for $host (unless host == build),
10509 # the user could write a script that provides the needed information,
10510 # so we support that.
10511 python_prog="${with_python}"
10512 # Extract the first word of "${python_prog}", so it can be a program name with args.
10513 set dummy ${python_prog}; ac_word=$2
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10515 $as_echo_n "checking for $ac_word... " >&6; }
10516 if ${ac_cv_path_python_prog_path+:} false; then :
10517 $as_echo_n "(cached) " >&6
10518 else
10519 case $python_prog_path in
10520 [\\/]* | ?:[\\/]*)
10521 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10522 ;;
10523 *)
10524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10525 for as_dir in $PATH
10526 do
10527 IFS=$as_save_IFS
10528 test -z "$as_dir" && as_dir=.
10529 for ac_exec_ext in '' $ac_executable_extensions; do
10530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10531 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10533 break 2
10534 fi
10535 done
10536 done
10537 IFS=$as_save_IFS
10538
10539 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10540 ;;
10541 esac
10542 fi
10543 python_prog_path=$ac_cv_path_python_prog_path
10544 if test -n "$python_prog_path"; then
10545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10546 $as_echo "$python_prog_path" >&6; }
10547 else
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10549 $as_echo "no" >&6; }
10550 fi
10551
10552
10553 if test "${python_prog_path}" = missing; then
10554 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10555 fi
10556 ;;
10557 esac
10558 esac
10559
10560 if test "${python_prog}" != missing; then
10561 # We have a python program to use, but it may be too old.
10562 # Don't flag an error for --with-python=auto (the default).
10563 have_python_config=yes
10564 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10565 if test $? != 0; then
10566 have_python_config=failed
10567 if test "${with_python}" != auto; then
10568 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10569 fi
10570 fi
10571 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10572 if test $? != 0; then
10573 have_python_config=failed
10574 if test "${with_python}" != auto; then
10575 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10576 fi
10577 fi
10578 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10579 if test $? != 0; then
10580 have_python_config=failed
10581 if test "${with_python}" != auto; then
10582 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10583 fi
10584 fi
10585 else
10586 # We do not have a python executable we can use to determine where
10587 # to find the Python headers and libs. We cannot guess the include
10588 # path from the python_prefix either, because that include path
10589 # depends on the Python version. So, there is nothing much we can
10590 # do except assume that the compiler will be able to find those files.
10591 python_includes=
10592 python_libs=
10593 have_python_config=no
10594 fi
10595
10596 # If we have python-config, only try the configuration it provides.
10597 # Otherwise fallback on the old way of trying different versions of
10598 # python in turn.
10599
10600 have_libpython=no
10601 if test "${have_python_config}" = yes; then
10602
10603
10604 new_CPPFLAGS=${python_includes}
10605 new_LIBS=${python_libs}
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10607 $as_echo_n "checking for python... " >&6; }
10608 save_CPPFLAGS=$CPPFLAGS
10609 save_LIBS=$LIBS
10610 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10611 LIBS="$new_LIBS $LIBS"
10612 found_usable_python=no
10613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10614 /* end confdefs.h. */
10615 #include "Python.h"
10616 int
10617 main ()
10618 {
10619 Py_Initialize ();
10620 ;
10621 return 0;
10622 }
10623 _ACEOF
10624 if ac_fn_c_try_link "$LINENO"; then :
10625 have_libpython=yes
10626 found_usable_python=yes
10627 PYTHON_CPPFLAGS=$new_CPPFLAGS
10628 PYTHON_LIBS=$new_LIBS
10629 fi
10630 rm -f core conftest.err conftest.$ac_objext \
10631 conftest$ac_exeext conftest.$ac_ext
10632 CPPFLAGS=$save_CPPFLAGS
10633 LIBS=$save_LIBS
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10635 $as_echo "${found_usable_python}" >&6; }
10636
10637 elif test "${have_python_config}" != failed; then
10638 if test "${have_libpython}" = no; then
10639
10640
10641 new_CPPFLAGS=${python_includes}
10642 new_LIBS="-lpython2.7 ${python_libs}"
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10644 $as_echo_n "checking for python... " >&6; }
10645 save_CPPFLAGS=$CPPFLAGS
10646 save_LIBS=$LIBS
10647 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10648 LIBS="$new_LIBS $LIBS"
10649 found_usable_python=no
10650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10651 /* end confdefs.h. */
10652 #include "Python.h"
10653 int
10654 main ()
10655 {
10656 Py_Initialize ();
10657 ;
10658 return 0;
10659 }
10660 _ACEOF
10661 if ac_fn_c_try_link "$LINENO"; then :
10662 have_libpython=yes
10663 found_usable_python=yes
10664 PYTHON_CPPFLAGS=$new_CPPFLAGS
10665 PYTHON_LIBS=$new_LIBS
10666 fi
10667 rm -f core conftest.err conftest.$ac_objext \
10668 conftest$ac_exeext conftest.$ac_ext
10669 CPPFLAGS=$save_CPPFLAGS
10670 LIBS=$save_LIBS
10671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10672 $as_echo "${found_usable_python}" >&6; }
10673
10674 fi
10675 if test "${have_libpython}" = no; then
10676
10677
10678 new_CPPFLAGS=${python_includes}
10679 new_LIBS="-lpython2.6 ${python_libs}"
10680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10681 $as_echo_n "checking for python... " >&6; }
10682 save_CPPFLAGS=$CPPFLAGS
10683 save_LIBS=$LIBS
10684 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10685 LIBS="$new_LIBS $LIBS"
10686 found_usable_python=no
10687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10688 /* end confdefs.h. */
10689 #include "Python.h"
10690 int
10691 main ()
10692 {
10693 Py_Initialize ();
10694 ;
10695 return 0;
10696 }
10697 _ACEOF
10698 if ac_fn_c_try_link "$LINENO"; then :
10699 have_libpython=yes
10700 found_usable_python=yes
10701 PYTHON_CPPFLAGS=$new_CPPFLAGS
10702 PYTHON_LIBS=$new_LIBS
10703 fi
10704 rm -f core conftest.err conftest.$ac_objext \
10705 conftest$ac_exeext conftest.$ac_ext
10706 CPPFLAGS=$save_CPPFLAGS
10707 LIBS=$save_LIBS
10708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10709 $as_echo "${found_usable_python}" >&6; }
10710
10711 fi
10712 fi
10713
10714 if test "${have_libpython}" = no; then
10715 case "${with_python}" in
10716 yes)
10717 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10718 ;;
10719 auto)
10720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10721 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10722 ;;
10723 *)
10724 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10725 ;;
10726 esac
10727 else
10728 if test -n "${python_prefix}"; then
10729
10730 cat >>confdefs.h <<_ACEOF
10731 #define WITH_PYTHON_PATH "${python_prefix}"
10732 _ACEOF
10733
10734
10735 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10736 if test "x$prefix" = xNONE; then
10737 test_prefix=/usr/local
10738 else
10739 test_prefix=$prefix
10740 fi
10741 else
10742 test_prefix=$exec_prefix
10743 fi
10744 value=0
10745 case ${python_prefix} in
10746 "${test_prefix}"|"${test_prefix}/"*|\
10747 '${exec_prefix}'|'${exec_prefix}/'*)
10748 value=1
10749 ;;
10750 esac
10751
10752 cat >>confdefs.h <<_ACEOF
10753 #define PYTHON_PATH_RELOCATABLE $value
10754 _ACEOF
10755
10756
10757 fi
10758 fi
10759 fi
10760
10761
10762 # Check whether --with-python-libdir was given.
10763 if test "${with_python_libdir+set}" = set; then :
10764 withval=$with_python_libdir;
10765 else
10766
10767 # If no python libdir is specified then select one based on
10768 # python's prefix path.
10769 if test -n "${python_prefix}"; then
10770 with_python_libdir=${python_prefix}/lib
10771 fi
10772
10773 fi
10774
10775
10776 if test "${have_libpython}" != no; then
10777
10778 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10779
10780 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10781 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10782 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10783 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10784 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10785
10786 if test -n "${with_python_libdir}"; then
10787
10788 cat >>confdefs.h <<_ACEOF
10789 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10790 _ACEOF
10791
10792
10793 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10794 if test "x$prefix" = xNONE; then
10795 test_prefix=/usr/local
10796 else
10797 test_prefix=$prefix
10798 fi
10799 else
10800 test_prefix=$exec_prefix
10801 fi
10802 value=0
10803 case ${with_python_libdir} in
10804 "${test_prefix}"|"${test_prefix}/"*|\
10805 '${exec_prefix}'|'${exec_prefix}/'*)
10806 value=1
10807 ;;
10808 esac
10809
10810 cat >>confdefs.h <<_ACEOF
10811 #define PYTHON_LIBDIR_RELOCATABLE $value
10812 _ACEOF
10813
10814
10815 fi
10816
10817 # Flags needed to compile Python code (taken from python-config --cflags).
10818 # We cannot call python-config directly because it will output whatever was
10819 # used when compiling the Python interpreter itself, including flags which
10820 # would make the python-related objects be compiled differently from the
10821 # rest of GDB (e.g., -O2 and -fPIC).
10822 if test "${GCC}" = yes; then
10823 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10824 # Python headers recommend -DNDEBUG, but it's unclear if that just
10825 # refers to building Python itself. In release mode, though, it
10826 # doesn't hurt for the Python code in gdb to follow.
10827 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10828 fi
10829
10830 if test "x${tentative_python_cflags}" != x; then
10831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10832 $as_echo_n "checking compiler flags for python code... " >&6; }
10833 for flag in ${tentative_python_cflags}; do
10834 # Check that the compiler accepts it
10835 saved_CFLAGS="$CFLAGS"
10836 CFLAGS="$CFLAGS $flag"
10837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10838 /* end confdefs.h. */
10839
10840 int
10841 main ()
10842 {
10843
10844 ;
10845 return 0;
10846 }
10847 _ACEOF
10848 if ac_fn_c_try_compile "$LINENO"; then :
10849 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10850 fi
10851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10852 CFLAGS="$saved_CFLAGS"
10853 done
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10855 $as_echo "${PYTHON_CFLAGS}" >&6; }
10856 fi
10857
10858 # On x64 Windows, Python's include headers, and pyconfig.h in
10859 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10860 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10861 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10862 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10863 # The issue was reported to the Python community, but still isn't
10864 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10865
10866 case "$gdb_host" in
10867 mingw64)
10868 if test "${GCC}" = yes; then
10869 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10870 fi
10871 ;;
10872 esac
10873 else
10874 # Even if Python support is not compiled in, we need to have this file
10875 # included so that the "python" command, et.al., still exists.
10876 CONFIG_OBS="$CONFIG_OBS python/python.o"
10877 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10878 fi
10879
10880 # Work around Python http://bugs.python.org/issue10112. See also
10881 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10882 # no effect. Note that the only test after this that uses Python is
10883 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10884 # run without -export-dynamic too.
10885 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10886
10887
10888
10889
10890 if test "${have_libpython}" != no; then
10891 HAVE_PYTHON_TRUE=
10892 HAVE_PYTHON_FALSE='#'
10893 else
10894 HAVE_PYTHON_TRUE='#'
10895 HAVE_PYTHON_FALSE=
10896 fi
10897
10898
10899 # -------------------- #
10900 # Check for libguile. #
10901 # -------------------- #
10902
10903
10904
10905
10906
10907
10908 # Check whether --with-guile was given.
10909 if test "${with_guile+set}" = set; then :
10910 withval=$with_guile;
10911 else
10912 with_guile=auto
10913 fi
10914
10915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10916 $as_echo_n "checking whether to use guile... " >&6; }
10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10918 $as_echo "$with_guile" >&6; }
10919
10920 # Extract the first word of "pkg-config", so it can be a program name with args.
10921 set dummy pkg-config; ac_word=$2
10922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10923 $as_echo_n "checking for $ac_word... " >&6; }
10924 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10925 $as_echo_n "(cached) " >&6
10926 else
10927 case $pkg_config_prog_path in
10928 [\\/]* | ?:[\\/]*)
10929 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10930 ;;
10931 *)
10932 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10933 for as_dir in $PATH
10934 do
10935 IFS=$as_save_IFS
10936 test -z "$as_dir" && as_dir=.
10937 for ac_exec_ext in '' $ac_executable_extensions; do
10938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10939 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10941 break 2
10942 fi
10943 done
10944 done
10945 IFS=$as_save_IFS
10946
10947 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10948 ;;
10949 esac
10950 fi
10951 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10952 if test -n "$pkg_config_prog_path"; then
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10954 $as_echo "$pkg_config_prog_path" >&6; }
10955 else
10956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10957 $as_echo "no" >&6; }
10958 fi
10959
10960
10961
10962 try_guile_versions="guile-2.0"
10963 have_libguile=no
10964 case "${with_guile}" in
10965 no)
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10967 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10968 ;;
10969 auto)
10970 if test "${pkg_config_prog_path}" = "missing"; then
10971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10972 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10973 else
10974
10975 pkg_config=${pkg_config_prog_path}
10976 guile_version_list=${try_guile_versions}
10977 flag_errors=no
10978
10979 found_usable_guile=checking
10980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10981 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10982 for guile_version in ${guile_version_list}; do
10983 ${pkg_config} --exists ${guile_version} 2>/dev/null
10984 if test $? != 0; then
10985 continue
10986 fi
10987 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10988 if test $? != 0; then
10989 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10990 fi
10991 new_LIBS=`${pkg_config} --libs ${guile_version}`
10992 if test $? != 0; then
10993 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10994 fi
10995 found_usable_guile=${guile_version}
10996 break
10997 done
10998 if test "${found_usable_guile}" = "checking"; then
10999 if test "${flag_errors}" = "yes"; then
11000 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11001 else
11002 found_usable_guile=no
11003 fi
11004 fi
11005 if test "${found_usable_guile}" != no; then
11006 save_CPPFLAGS=$CPPFLAGS
11007 save_LIBS=$LIBS
11008 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11009 LIBS="$LIBS $new_LIBS"
11010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11011 /* end confdefs.h. */
11012 #include "libguile.h"
11013 int
11014 main ()
11015 {
11016 scm_init_guile ();
11017 ;
11018 return 0;
11019 }
11020 _ACEOF
11021 if ac_fn_c_try_link "$LINENO"; then :
11022 have_libguile=yes
11023 GUILE_CPPFLAGS=$new_CPPFLAGS
11024 GUILE_LIBS=$new_LIBS
11025 else
11026 found_usable_guile=no
11027 fi
11028 rm -f core conftest.err conftest.$ac_objext \
11029 conftest$ac_exeext conftest.$ac_ext
11030 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11031 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11032
11033 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11034
11035
11036 fi
11037
11038 CPPFLAGS=$save_CPPFLAGS
11039 LIBS=$save_LIBS
11040 if test "${found_usable_guile}" = no; then
11041 if test "${flag_errors}" = yes; then
11042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11043 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11044 as_fn_error $? "linking guile version ${guile_version} test program failed
11045 See \`config.log' for more details" "$LINENO" 5; }
11046 fi
11047 fi
11048 fi
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11050 $as_echo "${found_usable_guile}" >&6; }
11051
11052 fi
11053 ;;
11054 yes)
11055 if test "${pkg_config_prog_path}" = "missing"; then
11056 as_fn_error $? "pkg-config not found" "$LINENO" 5
11057 fi
11058
11059 pkg_config=${pkg_config_prog_path}
11060 guile_version_list=${try_guile_versions}
11061 flag_errors=yes
11062
11063 found_usable_guile=checking
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11065 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11066 for guile_version in ${guile_version_list}; do
11067 ${pkg_config} --exists ${guile_version} 2>/dev/null
11068 if test $? != 0; then
11069 continue
11070 fi
11071 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11072 if test $? != 0; then
11073 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11074 fi
11075 new_LIBS=`${pkg_config} --libs ${guile_version}`
11076 if test $? != 0; then
11077 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11078 fi
11079 found_usable_guile=${guile_version}
11080 break
11081 done
11082 if test "${found_usable_guile}" = "checking"; then
11083 if test "${flag_errors}" = "yes"; then
11084 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11085 else
11086 found_usable_guile=no
11087 fi
11088 fi
11089 if test "${found_usable_guile}" != no; then
11090 save_CPPFLAGS=$CPPFLAGS
11091 save_LIBS=$LIBS
11092 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11093 LIBS="$LIBS $new_LIBS"
11094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11095 /* end confdefs.h. */
11096 #include "libguile.h"
11097 int
11098 main ()
11099 {
11100 scm_init_guile ();
11101 ;
11102 return 0;
11103 }
11104 _ACEOF
11105 if ac_fn_c_try_link "$LINENO"; then :
11106 have_libguile=yes
11107 GUILE_CPPFLAGS=$new_CPPFLAGS
11108 GUILE_LIBS=$new_LIBS
11109 else
11110 found_usable_guile=no
11111 fi
11112 rm -f core conftest.err conftest.$ac_objext \
11113 conftest$ac_exeext conftest.$ac_ext
11114 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11115 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11116
11117 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11118
11119
11120 fi
11121
11122 CPPFLAGS=$save_CPPFLAGS
11123 LIBS=$save_LIBS
11124 if test "${found_usable_guile}" = no; then
11125 if test "${flag_errors}" = yes; then
11126 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11127 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11128 as_fn_error $? "linking guile version ${guile_version} test program failed
11129 See \`config.log' for more details" "$LINENO" 5; }
11130 fi
11131 fi
11132 fi
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11134 $as_echo "${found_usable_guile}" >&6; }
11135
11136 ;;
11137 [\\/]* | ?:[\\/]*)
11138 if test -x "${with_guile}"; then
11139
11140 pkg_config=${with_guile}
11141 guile_version_list=${try_guile_versions}
11142 flag_errors=yes
11143
11144 found_usable_guile=checking
11145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11146 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11147 for guile_version in ${guile_version_list}; do
11148 ${pkg_config} --exists ${guile_version} 2>/dev/null
11149 if test $? != 0; then
11150 continue
11151 fi
11152 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11153 if test $? != 0; then
11154 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11155 fi
11156 new_LIBS=`${pkg_config} --libs ${guile_version}`
11157 if test $? != 0; then
11158 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11159 fi
11160 found_usable_guile=${guile_version}
11161 break
11162 done
11163 if test "${found_usable_guile}" = "checking"; then
11164 if test "${flag_errors}" = "yes"; then
11165 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11166 else
11167 found_usable_guile=no
11168 fi
11169 fi
11170 if test "${found_usable_guile}" != no; then
11171 save_CPPFLAGS=$CPPFLAGS
11172 save_LIBS=$LIBS
11173 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11174 LIBS="$LIBS $new_LIBS"
11175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11176 /* end confdefs.h. */
11177 #include "libguile.h"
11178 int
11179 main ()
11180 {
11181 scm_init_guile ();
11182 ;
11183 return 0;
11184 }
11185 _ACEOF
11186 if ac_fn_c_try_link "$LINENO"; then :
11187 have_libguile=yes
11188 GUILE_CPPFLAGS=$new_CPPFLAGS
11189 GUILE_LIBS=$new_LIBS
11190 else
11191 found_usable_guile=no
11192 fi
11193 rm -f core conftest.err conftest.$ac_objext \
11194 conftest$ac_exeext conftest.$ac_ext
11195 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11196 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11197
11198 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11199
11200
11201 fi
11202
11203 CPPFLAGS=$save_CPPFLAGS
11204 LIBS=$save_LIBS
11205 if test "${found_usable_guile}" = no; then
11206 if test "${flag_errors}" = yes; then
11207 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11208 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11209 as_fn_error $? "linking guile version ${guile_version} test program failed
11210 See \`config.log' for more details" "$LINENO" 5; }
11211 fi
11212 fi
11213 fi
11214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11215 $as_echo "${found_usable_guile}" >&6; }
11216
11217 else
11218 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11219 fi
11220 ;;
11221 "" | */*)
11222 # Disallow --with=guile="" and --with-guile=foo/bar.
11223 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11224 ;;
11225 *)
11226 # A space separate list of guile versions to try, in order.
11227 if test "${pkg_config_prog_path}" = "missing"; then
11228 as_fn_error $? "pkg-config not found" "$LINENO" 5
11229 fi
11230
11231 pkg_config=${pkg_config_prog_path}
11232 guile_version_list=${with_guile}
11233 flag_errors=yes
11234
11235 found_usable_guile=checking
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11237 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11238 for guile_version in ${guile_version_list}; do
11239 ${pkg_config} --exists ${guile_version} 2>/dev/null
11240 if test $? != 0; then
11241 continue
11242 fi
11243 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11244 if test $? != 0; then
11245 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11246 fi
11247 new_LIBS=`${pkg_config} --libs ${guile_version}`
11248 if test $? != 0; then
11249 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11250 fi
11251 found_usable_guile=${guile_version}
11252 break
11253 done
11254 if test "${found_usable_guile}" = "checking"; then
11255 if test "${flag_errors}" = "yes"; then
11256 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11257 else
11258 found_usable_guile=no
11259 fi
11260 fi
11261 if test "${found_usable_guile}" != no; then
11262 save_CPPFLAGS=$CPPFLAGS
11263 save_LIBS=$LIBS
11264 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11265 LIBS="$LIBS $new_LIBS"
11266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11267 /* end confdefs.h. */
11268 #include "libguile.h"
11269 int
11270 main ()
11271 {
11272 scm_init_guile ();
11273 ;
11274 return 0;
11275 }
11276 _ACEOF
11277 if ac_fn_c_try_link "$LINENO"; then :
11278 have_libguile=yes
11279 GUILE_CPPFLAGS=$new_CPPFLAGS
11280 GUILE_LIBS=$new_LIBS
11281 else
11282 found_usable_guile=no
11283 fi
11284 rm -f core conftest.err conftest.$ac_objext \
11285 conftest$ac_exeext conftest.$ac_ext
11286 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11287 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11288
11289 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11290
11291
11292 fi
11293
11294 CPPFLAGS=$save_CPPFLAGS
11295 LIBS=$save_LIBS
11296 if test "${found_usable_guile}" = no; then
11297 if test "${flag_errors}" = yes; then
11298 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11299 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11300 as_fn_error $? "linking guile version ${guile_version} test program failed
11301 See \`config.log' for more details" "$LINENO" 5; }
11302 fi
11303 fi
11304 fi
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11306 $as_echo "${found_usable_guile}" >&6; }
11307
11308 ;;
11309 esac
11310
11311 if test "${have_libguile}" != no; then
11312 case "${with_guile}" in
11313 [\\/]* | ?:[\\/]*)
11314
11315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11316 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11317 if ${ac_cv_guild_program_name+:} false; then :
11318 $as_echo_n "(cached) " >&6
11319 else
11320 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11321
11322 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11323 # the 'guild' and 'bindir' variables. In that case, try to guess
11324 # what the program name is, at the risk of getting it wrong if
11325 # Guile was configured with '--program-suffix' or similar.
11326 if test "x$ac_cv_guild_program_name" = "x"; then
11327 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11328 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11329 fi
11330
11331 fi
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11333 $as_echo "$ac_cv_guild_program_name" >&6; }
11334
11335 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11336 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11337 fi
11338
11339 GUILD="$ac_cv_guild_program_name"
11340
11341
11342 ;;
11343 *)
11344
11345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11346 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11347 if ${ac_cv_guild_program_name+:} false; then :
11348 $as_echo_n "(cached) " >&6
11349 else
11350 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11351
11352 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11353 # the 'guild' and 'bindir' variables. In that case, try to guess
11354 # what the program name is, at the risk of getting it wrong if
11355 # Guile was configured with '--program-suffix' or similar.
11356 if test "x$ac_cv_guild_program_name" = "x"; then
11357 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11358 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11359 fi
11360
11361 fi
11362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11363 $as_echo "$ac_cv_guild_program_name" >&6; }
11364
11365 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11366 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11367 fi
11368
11369 GUILD="$ac_cv_guild_program_name"
11370
11371
11372 ;;
11373 esac
11374
11375
11376 if test "$cross_compiling" = no; then
11377 GUILD_TARGET_FLAG=
11378 else
11379 GUILD_TARGET_FLAG="--target=$host"
11380 fi
11381
11382
11383
11384
11385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11386 $as_echo_n "checking whether guild supports this host... " >&6; }
11387 if ${ac_cv_guild_ok+:} false; then :
11388 $as_echo_n "(cached) " >&6
11389 else
11390 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11391 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11392 ac_cv_guild_ok=yes
11393 else
11394 ac_cv_guild_ok=no
11395 fi
11396 fi
11397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11398 $as_echo "$ac_cv_guild_ok" >&6; }
11399
11400 if test "$ac_cv_guild_ok" = no; then
11401 have_libguile=no
11402 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11403 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11404 fi
11405 fi
11406
11407 if test "${have_libguile}" != no; then
11408
11409 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11410
11411 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11412 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11413 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11414 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11415 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11416
11417 save_LIBS="$LIBS"
11418 save_CPPFLAGS="$CPPFLAGS"
11419 LIBS="$GUILE_LIBS"
11420 CPPFLAGS="$GUILE_CPPFLAGS"
11421 for ac_func in scm_new_smob
11422 do :
11423 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11424 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11425 cat >>confdefs.h <<_ACEOF
11426 #define HAVE_SCM_NEW_SMOB 1
11427 _ACEOF
11428
11429 fi
11430 done
11431
11432 LIBS="$save_LIBS"
11433 CPPFLAGS="$save_CPPFLAGS"
11434 else
11435 # Even if Guile support is not compiled in, we need to have these files
11436 # included.
11437 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11438 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11439 fi
11440
11441
11442 if test "${have_libguile}" != no; then
11443 HAVE_GUILE_TRUE=
11444 HAVE_GUILE_FALSE='#'
11445 else
11446 HAVE_GUILE_TRUE='#'
11447 HAVE_GUILE_FALSE=
11448 fi
11449
11450
11451 # ---------------------------- #
11452 # Check for source highlight. #
11453 # ---------------------------- #
11454
11455 SRCHIGH_LIBS=
11456 SRCHIGH_CFLAGS=
11457
11458 # Check whether --enable-source-highlight was given.
11459 if test "${enable_source_highlight+set}" = set; then :
11460 enableval=$enable_source_highlight; case "${enableval}" in
11461 yes) enable_source_highlight=yes ;;
11462 no) enable_source_highlight=no ;;
11463 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11464 esac
11465 else
11466 enable_source_highlight=auto
11467 fi
11468
11469
11470 if test "${enable_source_highlight}" != "no"; then
11471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11472 $as_echo_n "checking for the source-highlight library... " >&6; }
11473 if test "${pkg_config_prog_path}" = "missing"; then
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11475 $as_echo "no - pkg-config not found" >&6; }
11476 if test "${enable_source_highlight}" = "yes"; then
11477 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11478 fi
11479 else
11480 case "$LDFLAGS" in
11481 *static-libstdc*)
11482 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11483 ;;
11484 esac
11485
11486 if ${pkg_config_prog_path} --exists source-highlight; then
11487 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11488 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11489
11490 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11491
11492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11493 $as_echo "yes" >&6; }
11494 else
11495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11496 $as_echo "no" >&6; }
11497 if test "${enable_source_highlight}" = "yes"; then
11498 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11499 fi
11500 fi
11501 fi
11502 fi
11503
11504
11505
11506 # ------------------------- #
11507 # Checks for header files. #
11508 # ------------------------- #
11509
11510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11511 $as_echo_n "checking for ANSI C header files... " >&6; }
11512 if ${ac_cv_header_stdc+:} false; then :
11513 $as_echo_n "(cached) " >&6
11514 else
11515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11516 /* end confdefs.h. */
11517 #include <stdlib.h>
11518 #include <stdarg.h>
11519 #include <string.h>
11520 #include <float.h>
11521
11522 int
11523 main ()
11524 {
11525
11526 ;
11527 return 0;
11528 }
11529 _ACEOF
11530 if ac_fn_c_try_compile "$LINENO"; then :
11531 ac_cv_header_stdc=yes
11532 else
11533 ac_cv_header_stdc=no
11534 fi
11535 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11536
11537 if test $ac_cv_header_stdc = yes; then
11538 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11540 /* end confdefs.h. */
11541 #include <string.h>
11542
11543 _ACEOF
11544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11545 $EGREP "memchr" >/dev/null 2>&1; then :
11546
11547 else
11548 ac_cv_header_stdc=no
11549 fi
11550 rm -f conftest*
11551
11552 fi
11553
11554 if test $ac_cv_header_stdc = yes; then
11555 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11557 /* end confdefs.h. */
11558 #include <stdlib.h>
11559
11560 _ACEOF
11561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11562 $EGREP "free" >/dev/null 2>&1; then :
11563
11564 else
11565 ac_cv_header_stdc=no
11566 fi
11567 rm -f conftest*
11568
11569 fi
11570
11571 if test $ac_cv_header_stdc = yes; then
11572 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11573 if test "$cross_compiling" = yes; then :
11574 :
11575 else
11576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11577 /* end confdefs.h. */
11578 #include <ctype.h>
11579 #include <stdlib.h>
11580 #if ((' ' & 0x0FF) == 0x020)
11581 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11582 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11583 #else
11584 # define ISLOWER(c) \
11585 (('a' <= (c) && (c) <= 'i') \
11586 || ('j' <= (c) && (c) <= 'r') \
11587 || ('s' <= (c) && (c) <= 'z'))
11588 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11589 #endif
11590
11591 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11592 int
11593 main ()
11594 {
11595 int i;
11596 for (i = 0; i < 256; i++)
11597 if (XOR (islower (i), ISLOWER (i))
11598 || toupper (i) != TOUPPER (i))
11599 return 2;
11600 return 0;
11601 }
11602 _ACEOF
11603 if ac_fn_c_try_run "$LINENO"; then :
11604
11605 else
11606 ac_cv_header_stdc=no
11607 fi
11608 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11609 conftest.$ac_objext conftest.beam conftest.$ac_ext
11610 fi
11611
11612 fi
11613 fi
11614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11615 $as_echo "$ac_cv_header_stdc" >&6; }
11616 if test $ac_cv_header_stdc = yes; then
11617
11618 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11619
11620 fi
11621
11622 # elf_hp.h is for HP/UX 64-bit shared library support.
11623 for ac_header in nlist.h machine/reg.h \
11624 thread_db.h \
11625 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11626 sys/resource.h sys/ptrace.h ptrace.h \
11627 sys/reg.h sys/debugreg.h \
11628 termios.h elf_hp.h
11629 do :
11630 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11631 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11632 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11633 cat >>confdefs.h <<_ACEOF
11634 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11635 _ACEOF
11636
11637 fi
11638
11639 done
11640
11641 for ac_header in sys/user.h
11642 do :
11643 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11644 # include <sys/param.h>
11645 #endif
11646
11647 "
11648 if test "x$ac_cv_header_sys_user_h" = xyes; then :
11649 cat >>confdefs.h <<_ACEOF
11650 #define HAVE_SYS_USER_H 1
11651 _ACEOF
11652
11653 fi
11654
11655 done
11656
11657
11658 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11659 do :
11660 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11661 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11662 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11663 cat >>confdefs.h <<_ACEOF
11664 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11665 _ACEOF
11666
11667 fi
11668
11669 done
11670
11671 for ac_header in term.h
11672 do :
11673 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11674 # include <curses.h>
11675 #endif
11676
11677 "
11678 if test "x$ac_cv_header_term_h" = xyes; then :
11679 cat >>confdefs.h <<_ACEOF
11680 #define HAVE_TERM_H 1
11681 _ACEOF
11682
11683 fi
11684
11685 done
11686
11687
11688 # ------------------------- #
11689 # Checks for declarations. #
11690 # ------------------------- #
11691
11692
11693 # Check for presence and size of long long.
11694 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11695 if test "x$ac_cv_type_long_long" = xyes; then :
11696
11697 cat >>confdefs.h <<_ACEOF
11698 #define HAVE_LONG_LONG 1
11699 _ACEOF
11700
11701 # The cast to long int works around a bug in the HP C Compiler
11702 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11703 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11704 # This bug is HP SR number 8606223364.
11705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11706 $as_echo_n "checking size of long long... " >&6; }
11707 if ${ac_cv_sizeof_long_long+:} false; then :
11708 $as_echo_n "(cached) " >&6
11709 else
11710 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11711
11712 else
11713 if test "$ac_cv_type_long_long" = yes; then
11714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11715 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11716 as_fn_error 77 "cannot compute sizeof (long long)
11717 See \`config.log' for more details" "$LINENO" 5; }
11718 else
11719 ac_cv_sizeof_long_long=0
11720 fi
11721 fi
11722
11723 fi
11724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11725 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11726
11727
11728
11729 cat >>confdefs.h <<_ACEOF
11730 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11731 _ACEOF
11732
11733
11734 fi
11735
11736
11737 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11738 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11739 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11740 ac_have_decl=1
11741 else
11742 ac_have_decl=0
11743 fi
11744
11745 cat >>confdefs.h <<_ACEOF
11746 #define HAVE_DECL_BASENAME $ac_have_decl
11747 _ACEOF
11748 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11749 if test "x$ac_cv_have_decl_ffs" = xyes; then :
11750 ac_have_decl=1
11751 else
11752 ac_have_decl=0
11753 fi
11754
11755 cat >>confdefs.h <<_ACEOF
11756 #define HAVE_DECL_FFS $ac_have_decl
11757 _ACEOF
11758 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11759 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11760 ac_have_decl=1
11761 else
11762 ac_have_decl=0
11763 fi
11764
11765 cat >>confdefs.h <<_ACEOF
11766 #define HAVE_DECL_ASPRINTF $ac_have_decl
11767 _ACEOF
11768 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11769 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11770 ac_have_decl=1
11771 else
11772 ac_have_decl=0
11773 fi
11774
11775 cat >>confdefs.h <<_ACEOF
11776 #define HAVE_DECL_VASPRINTF $ac_have_decl
11777 _ACEOF
11778 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11779 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11780 ac_have_decl=1
11781 else
11782 ac_have_decl=0
11783 fi
11784
11785 cat >>confdefs.h <<_ACEOF
11786 #define HAVE_DECL_SNPRINTF $ac_have_decl
11787 _ACEOF
11788 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11789 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11790 ac_have_decl=1
11791 else
11792 ac_have_decl=0
11793 fi
11794
11795 cat >>confdefs.h <<_ACEOF
11796 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11797 _ACEOF
11798
11799 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11800 if test "x$ac_cv_have_decl_strtol" = xyes; then :
11801 ac_have_decl=1
11802 else
11803 ac_have_decl=0
11804 fi
11805
11806 cat >>confdefs.h <<_ACEOF
11807 #define HAVE_DECL_STRTOL $ac_have_decl
11808 _ACEOF
11809 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11810 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11811 ac_have_decl=1
11812 else
11813 ac_have_decl=0
11814 fi
11815
11816 cat >>confdefs.h <<_ACEOF
11817 #define HAVE_DECL_STRTOUL $ac_have_decl
11818 _ACEOF
11819 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11820 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11821 ac_have_decl=1
11822 else
11823 ac_have_decl=0
11824 fi
11825
11826 cat >>confdefs.h <<_ACEOF
11827 #define HAVE_DECL_STRTOLL $ac_have_decl
11828 _ACEOF
11829 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11830 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11831 ac_have_decl=1
11832 else
11833 ac_have_decl=0
11834 fi
11835
11836 cat >>confdefs.h <<_ACEOF
11837 #define HAVE_DECL_STRTOULL $ac_have_decl
11838 _ACEOF
11839
11840 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11841 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11842 ac_have_decl=1
11843 else
11844 ac_have_decl=0
11845 fi
11846
11847 cat >>confdefs.h <<_ACEOF
11848 #define HAVE_DECL_STRVERSCMP $ac_have_decl
11849 _ACEOF
11850
11851
11852
11853 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11854 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11855 ac_have_decl=1
11856 else
11857 ac_have_decl=0
11858 fi
11859
11860 cat >>confdefs.h <<_ACEOF
11861 #define HAVE_DECL_SNPRINTF $ac_have_decl
11862 _ACEOF
11863
11864
11865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11866 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11867 if ${am_cv_val_LC_MESSAGES+:} false; then :
11868 $as_echo_n "(cached) " >&6
11869 else
11870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11871 /* end confdefs.h. */
11872 #include <locale.h>
11873 int
11874 main ()
11875 {
11876 return LC_MESSAGES
11877 ;
11878 return 0;
11879 }
11880 _ACEOF
11881 if ac_fn_c_try_link "$LINENO"; then :
11882 am_cv_val_LC_MESSAGES=yes
11883 else
11884 am_cv_val_LC_MESSAGES=no
11885 fi
11886 rm -f core conftest.err conftest.$ac_objext \
11887 conftest$ac_exeext conftest.$ac_ext
11888 fi
11889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11890 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11891 if test $am_cv_val_LC_MESSAGES = yes; then
11892
11893 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11894
11895 fi
11896
11897
11898 # ------------------ #
11899 # Checks for types. #
11900 # ------------------ #
11901
11902 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11903 #include <sys/socket.h>
11904
11905 "
11906 if test "x$ac_cv_type_socklen_t" = xyes; then :
11907
11908 cat >>confdefs.h <<_ACEOF
11909 #define HAVE_SOCKLEN_T 1
11910 _ACEOF
11911
11912
11913 fi
11914
11915
11916 # ------------------------------------- #
11917 # Checks for compiler characteristics. #
11918 # ------------------------------------- #
11919
11920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11921 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11922 if ${ac_cv_c_const+:} false; then :
11923 $as_echo_n "(cached) " >&6
11924 else
11925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11926 /* end confdefs.h. */
11927
11928 int
11929 main ()
11930 {
11931
11932 #ifndef __cplusplus
11933 /* Ultrix mips cc rejects this sort of thing. */
11934 typedef int charset[2];
11935 const charset cs = { 0, 0 };
11936 /* SunOS 4.1.1 cc rejects this. */
11937 char const *const *pcpcc;
11938 char **ppc;
11939 /* NEC SVR4.0.2 mips cc rejects this. */
11940 struct point {int x, y;};
11941 static struct point const zero = {0,0};
11942 /* AIX XL C 1.02.0.0 rejects this.
11943 It does not let you subtract one const X* pointer from another in
11944 an arm of an if-expression whose if-part is not a constant
11945 expression */
11946 const char *g = "string";
11947 pcpcc = &g + (g ? g-g : 0);
11948 /* HPUX 7.0 cc rejects these. */
11949 ++pcpcc;
11950 ppc = (char**) pcpcc;
11951 pcpcc = (char const *const *) ppc;
11952 { /* SCO 3.2v4 cc rejects this sort of thing. */
11953 char tx;
11954 char *t = &tx;
11955 char const *s = 0 ? (char *) 0 : (char const *) 0;
11956
11957 *t++ = 0;
11958 if (s) return 0;
11959 }
11960 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11961 int x[] = {25, 17};
11962 const int *foo = &x[0];
11963 ++foo;
11964 }
11965 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11966 typedef const int *iptr;
11967 iptr p = 0;
11968 ++p;
11969 }
11970 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11971 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11972 struct s { int j; const int *ap[3]; } bx;
11973 struct s *b = &bx; b->j = 5;
11974 }
11975 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11976 const int foo = 10;
11977 if (!foo) return 0;
11978 }
11979 return !cs[0] && !zero.x;
11980 #endif
11981
11982 ;
11983 return 0;
11984 }
11985 _ACEOF
11986 if ac_fn_c_try_compile "$LINENO"; then :
11987 ac_cv_c_const=yes
11988 else
11989 ac_cv_c_const=no
11990 fi
11991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11992 fi
11993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11994 $as_echo "$ac_cv_c_const" >&6; }
11995 if test $ac_cv_c_const = no; then
11996
11997 $as_echo "#define const /**/" >>confdefs.h
11998
11999 fi
12000
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12002 $as_echo_n "checking for inline... " >&6; }
12003 if ${ac_cv_c_inline+:} false; then :
12004 $as_echo_n "(cached) " >&6
12005 else
12006 ac_cv_c_inline=no
12007 for ac_kw in inline __inline__ __inline; do
12008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12009 /* end confdefs.h. */
12010 #ifndef __cplusplus
12011 typedef int foo_t;
12012 static $ac_kw foo_t static_foo () {return 0; }
12013 $ac_kw foo_t foo () {return 0; }
12014 #endif
12015
12016 _ACEOF
12017 if ac_fn_c_try_compile "$LINENO"; then :
12018 ac_cv_c_inline=$ac_kw
12019 fi
12020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12021 test "$ac_cv_c_inline" != no && break
12022 done
12023
12024 fi
12025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12026 $as_echo "$ac_cv_c_inline" >&6; }
12027
12028 case $ac_cv_c_inline in
12029 inline | yes) ;;
12030 *)
12031 case $ac_cv_c_inline in
12032 no) ac_val=;;
12033 *) ac_val=$ac_cv_c_inline;;
12034 esac
12035 cat >>confdefs.h <<_ACEOF
12036 #ifndef __cplusplus
12037 #define inline $ac_val
12038 #endif
12039 _ACEOF
12040 ;;
12041 esac
12042
12043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12044 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12045 if ${ac_cv_c_bigendian+:} false; then :
12046 $as_echo_n "(cached) " >&6
12047 else
12048 ac_cv_c_bigendian=unknown
12049 # See if we're dealing with a universal compiler.
12050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12051 /* end confdefs.h. */
12052 #ifndef __APPLE_CC__
12053 not a universal capable compiler
12054 #endif
12055 typedef int dummy;
12056
12057 _ACEOF
12058 if ac_fn_c_try_compile "$LINENO"; then :
12059
12060 # Check for potential -arch flags. It is not universal unless
12061 # there are at least two -arch flags with different values.
12062 ac_arch=
12063 ac_prev=
12064 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12065 if test -n "$ac_prev"; then
12066 case $ac_word in
12067 i?86 | x86_64 | ppc | ppc64)
12068 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12069 ac_arch=$ac_word
12070 else
12071 ac_cv_c_bigendian=universal
12072 break
12073 fi
12074 ;;
12075 esac
12076 ac_prev=
12077 elif test "x$ac_word" = "x-arch"; then
12078 ac_prev=arch
12079 fi
12080 done
12081 fi
12082 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12083 if test $ac_cv_c_bigendian = unknown; then
12084 # See if sys/param.h defines the BYTE_ORDER macro.
12085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12086 /* end confdefs.h. */
12087 #include <sys/types.h>
12088 #include <sys/param.h>
12089
12090 int
12091 main ()
12092 {
12093 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12094 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12095 && LITTLE_ENDIAN)
12096 bogus endian macros
12097 #endif
12098
12099 ;
12100 return 0;
12101 }
12102 _ACEOF
12103 if ac_fn_c_try_compile "$LINENO"; then :
12104 # It does; now see whether it defined to BIG_ENDIAN or not.
12105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12106 /* end confdefs.h. */
12107 #include <sys/types.h>
12108 #include <sys/param.h>
12109
12110 int
12111 main ()
12112 {
12113 #if BYTE_ORDER != BIG_ENDIAN
12114 not big endian
12115 #endif
12116
12117 ;
12118 return 0;
12119 }
12120 _ACEOF
12121 if ac_fn_c_try_compile "$LINENO"; then :
12122 ac_cv_c_bigendian=yes
12123 else
12124 ac_cv_c_bigendian=no
12125 fi
12126 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12127 fi
12128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12129 fi
12130 if test $ac_cv_c_bigendian = unknown; then
12131 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12133 /* end confdefs.h. */
12134 #include <limits.h>
12135
12136 int
12137 main ()
12138 {
12139 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12140 bogus endian macros
12141 #endif
12142
12143 ;
12144 return 0;
12145 }
12146 _ACEOF
12147 if ac_fn_c_try_compile "$LINENO"; then :
12148 # It does; now see whether it defined to _BIG_ENDIAN or not.
12149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12150 /* end confdefs.h. */
12151 #include <limits.h>
12152
12153 int
12154 main ()
12155 {
12156 #ifndef _BIG_ENDIAN
12157 not big endian
12158 #endif
12159
12160 ;
12161 return 0;
12162 }
12163 _ACEOF
12164 if ac_fn_c_try_compile "$LINENO"; then :
12165 ac_cv_c_bigendian=yes
12166 else
12167 ac_cv_c_bigendian=no
12168 fi
12169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12170 fi
12171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12172 fi
12173 if test $ac_cv_c_bigendian = unknown; then
12174 # Compile a test program.
12175 if test "$cross_compiling" = yes; then :
12176 # Try to guess by grepping values from an object file.
12177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12178 /* end confdefs.h. */
12179 short int ascii_mm[] =
12180 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12181 short int ascii_ii[] =
12182 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12183 int use_ascii (int i) {
12184 return ascii_mm[i] + ascii_ii[i];
12185 }
12186 short int ebcdic_ii[] =
12187 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12188 short int ebcdic_mm[] =
12189 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12190 int use_ebcdic (int i) {
12191 return ebcdic_mm[i] + ebcdic_ii[i];
12192 }
12193 extern int foo;
12194
12195 int
12196 main ()
12197 {
12198 return use_ascii (foo) == use_ebcdic (foo);
12199 ;
12200 return 0;
12201 }
12202 _ACEOF
12203 if ac_fn_c_try_compile "$LINENO"; then :
12204 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12205 ac_cv_c_bigendian=yes
12206 fi
12207 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12208 if test "$ac_cv_c_bigendian" = unknown; then
12209 ac_cv_c_bigendian=no
12210 else
12211 # finding both strings is unlikely to happen, but who knows?
12212 ac_cv_c_bigendian=unknown
12213 fi
12214 fi
12215 fi
12216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12217 else
12218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12219 /* end confdefs.h. */
12220 $ac_includes_default
12221 int
12222 main ()
12223 {
12224
12225 /* Are we little or big endian? From Harbison&Steele. */
12226 union
12227 {
12228 long int l;
12229 char c[sizeof (long int)];
12230 } u;
12231 u.l = 1;
12232 return u.c[sizeof (long int) - 1] == 1;
12233
12234 ;
12235 return 0;
12236 }
12237 _ACEOF
12238 if ac_fn_c_try_run "$LINENO"; then :
12239 ac_cv_c_bigendian=no
12240 else
12241 ac_cv_c_bigendian=yes
12242 fi
12243 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12244 conftest.$ac_objext conftest.beam conftest.$ac_ext
12245 fi
12246
12247 fi
12248 fi
12249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12250 $as_echo "$ac_cv_c_bigendian" >&6; }
12251 case $ac_cv_c_bigendian in #(
12252 yes)
12253 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12254 ;; #(
12255 no)
12256 ;; #(
12257 universal)
12258
12259 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12260
12261 ;; #(
12262 *)
12263 as_fn_error $? "unknown endianness
12264 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12265 esac
12266
12267
12268 # ------------------------------ #
12269 # Checks for library functions. #
12270 # ------------------------------ #
12271
12272 for ac_func in getuid getgid \
12273 pipe pread pread64 pwrite resize_term \
12274 getpgid setsid \
12275 sigaction sigsetmask socketpair \
12276 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12277 setrlimit getrlimit posix_madvise waitpid \
12278 use_default_colors
12279 do :
12280 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12281 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12282 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12283 cat >>confdefs.h <<_ACEOF
12284 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12285 _ACEOF
12286
12287 fi
12288 done
12289
12290
12291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12292 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12293 if ${am_cv_langinfo_codeset+:} false; then :
12294 $as_echo_n "(cached) " >&6
12295 else
12296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12297 /* end confdefs.h. */
12298 #include <langinfo.h>
12299 int
12300 main ()
12301 {
12302 char* cs = nl_langinfo(CODESET);
12303 ;
12304 return 0;
12305 }
12306 _ACEOF
12307 if ac_fn_c_try_link "$LINENO"; then :
12308 am_cv_langinfo_codeset=yes
12309 else
12310 am_cv_langinfo_codeset=no
12311 fi
12312 rm -f core conftest.err conftest.$ac_objext \
12313 conftest$ac_exeext conftest.$ac_ext
12314
12315 fi
12316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12317 $as_echo "$am_cv_langinfo_codeset" >&6; }
12318 if test $am_cv_langinfo_codeset = yes; then
12319
12320 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12321
12322 fi
12323
12324 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12325 if test "x$ac_cv_type_size_t" = xyes; then :
12326
12327 else
12328
12329 cat >>confdefs.h <<_ACEOF
12330 #define size_t unsigned int
12331 _ACEOF
12332
12333 fi
12334
12335
12336
12337
12338 for ac_header in $ac_header_list
12339 do :
12340 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12341 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12342 "
12343 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12344 cat >>confdefs.h <<_ACEOF
12345 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12346 _ACEOF
12347
12348 fi
12349
12350 done
12351
12352
12353
12354
12355
12356
12357
12358 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12359 if test "x$ac_cv_type_pid_t" = xyes; then :
12360
12361 else
12362
12363 cat >>confdefs.h <<_ACEOF
12364 #define pid_t int
12365 _ACEOF
12366
12367 fi
12368
12369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12370 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12371 if ${ac_cv_path_SED+:} false; then :
12372 $as_echo_n "(cached) " >&6
12373 else
12374 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12375 for ac_i in 1 2 3 4 5 6 7; do
12376 ac_script="$ac_script$as_nl$ac_script"
12377 done
12378 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12379 { ac_script=; unset ac_script;}
12380 if test -z "$SED"; then
12381 ac_path_SED_found=false
12382 # Loop through the user's path and test for each of PROGNAME-LIST
12383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12384 for as_dir in $PATH
12385 do
12386 IFS=$as_save_IFS
12387 test -z "$as_dir" && as_dir=.
12388 for ac_prog in sed gsed; do
12389 for ac_exec_ext in '' $ac_executable_extensions; do
12390 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12391 as_fn_executable_p "$ac_path_SED" || continue
12392 # Check for GNU ac_path_SED and select it if it is found.
12393 # Check for GNU $ac_path_SED
12394 case `"$ac_path_SED" --version 2>&1` in
12395 *GNU*)
12396 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12397 *)
12398 ac_count=0
12399 $as_echo_n 0123456789 >"conftest.in"
12400 while :
12401 do
12402 cat "conftest.in" "conftest.in" >"conftest.tmp"
12403 mv "conftest.tmp" "conftest.in"
12404 cp "conftest.in" "conftest.nl"
12405 $as_echo '' >> "conftest.nl"
12406 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12407 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12408 as_fn_arith $ac_count + 1 && ac_count=$as_val
12409 if test $ac_count -gt ${ac_path_SED_max-0}; then
12410 # Best one so far, save it but keep looking for a better one
12411 ac_cv_path_SED="$ac_path_SED"
12412 ac_path_SED_max=$ac_count
12413 fi
12414 # 10*(2^10) chars as input seems more than enough
12415 test $ac_count -gt 10 && break
12416 done
12417 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12418 esac
12419
12420 $ac_path_SED_found && break 3
12421 done
12422 done
12423 done
12424 IFS=$as_save_IFS
12425 if test -z "$ac_cv_path_SED"; then
12426 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12427 fi
12428 else
12429 ac_cv_path_SED=$SED
12430 fi
12431
12432 fi
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12434 $as_echo "$ac_cv_path_SED" >&6; }
12435 SED="$ac_cv_path_SED"
12436 rm -f conftest.sed
12437
12438
12439 # Set the 'development' global.
12440 . $srcdir/../bfd/development.sh
12441
12442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12443 $as_echo_n "checking for ANSI C header files... " >&6; }
12444 if ${ac_cv_header_stdc+:} false; then :
12445 $as_echo_n "(cached) " >&6
12446 else
12447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12448 /* end confdefs.h. */
12449 #include <stdlib.h>
12450 #include <stdarg.h>
12451 #include <string.h>
12452 #include <float.h>
12453
12454 int
12455 main ()
12456 {
12457
12458 ;
12459 return 0;
12460 }
12461 _ACEOF
12462 if ac_fn_c_try_compile "$LINENO"; then :
12463 ac_cv_header_stdc=yes
12464 else
12465 ac_cv_header_stdc=no
12466 fi
12467 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12468
12469 if test $ac_cv_header_stdc = yes; then
12470 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12472 /* end confdefs.h. */
12473 #include <string.h>
12474
12475 _ACEOF
12476 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12477 $EGREP "memchr" >/dev/null 2>&1; then :
12478
12479 else
12480 ac_cv_header_stdc=no
12481 fi
12482 rm -f conftest*
12483
12484 fi
12485
12486 if test $ac_cv_header_stdc = yes; then
12487 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12489 /* end confdefs.h. */
12490 #include <stdlib.h>
12491
12492 _ACEOF
12493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12494 $EGREP "free" >/dev/null 2>&1; then :
12495
12496 else
12497 ac_cv_header_stdc=no
12498 fi
12499 rm -f conftest*
12500
12501 fi
12502
12503 if test $ac_cv_header_stdc = yes; then
12504 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12505 if test "$cross_compiling" = yes; then :
12506 :
12507 else
12508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12509 /* end confdefs.h. */
12510 #include <ctype.h>
12511 #include <stdlib.h>
12512 #if ((' ' & 0x0FF) == 0x020)
12513 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12514 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12515 #else
12516 # define ISLOWER(c) \
12517 (('a' <= (c) && (c) <= 'i') \
12518 || ('j' <= (c) && (c) <= 'r') \
12519 || ('s' <= (c) && (c) <= 'z'))
12520 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12521 #endif
12522
12523 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12524 int
12525 main ()
12526 {
12527 int i;
12528 for (i = 0; i < 256; i++)
12529 if (XOR (islower (i), ISLOWER (i))
12530 || toupper (i) != TOUPPER (i))
12531 return 2;
12532 return 0;
12533 }
12534 _ACEOF
12535 if ac_fn_c_try_run "$LINENO"; then :
12536
12537 else
12538 ac_cv_header_stdc=no
12539 fi
12540 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12541 conftest.$ac_objext conftest.beam conftest.$ac_ext
12542 fi
12543
12544 fi
12545 fi
12546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12547 $as_echo "$ac_cv_header_stdc" >&6; }
12548 if test $ac_cv_header_stdc = yes; then
12549
12550 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12551
12552 fi
12553
12554 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12555 # for constant arguments. Useless!
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12557 $as_echo_n "checking for working alloca.h... " >&6; }
12558 if ${ac_cv_working_alloca_h+:} false; then :
12559 $as_echo_n "(cached) " >&6
12560 else
12561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12562 /* end confdefs.h. */
12563 #include <alloca.h>
12564 int
12565 main ()
12566 {
12567 char *p = (char *) alloca (2 * sizeof (int));
12568 if (p) return 0;
12569 ;
12570 return 0;
12571 }
12572 _ACEOF
12573 if ac_fn_c_try_link "$LINENO"; then :
12574 ac_cv_working_alloca_h=yes
12575 else
12576 ac_cv_working_alloca_h=no
12577 fi
12578 rm -f core conftest.err conftest.$ac_objext \
12579 conftest$ac_exeext conftest.$ac_ext
12580 fi
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12582 $as_echo "$ac_cv_working_alloca_h" >&6; }
12583 if test $ac_cv_working_alloca_h = yes; then
12584
12585 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12586
12587 fi
12588
12589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12590 $as_echo_n "checking for alloca... " >&6; }
12591 if ${ac_cv_func_alloca_works+:} false; then :
12592 $as_echo_n "(cached) " >&6
12593 else
12594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12595 /* end confdefs.h. */
12596 #ifdef __GNUC__
12597 # define alloca __builtin_alloca
12598 #else
12599 # ifdef _MSC_VER
12600 # include <malloc.h>
12601 # define alloca _alloca
12602 # else
12603 # ifdef HAVE_ALLOCA_H
12604 # include <alloca.h>
12605 # else
12606 # ifdef _AIX
12607 #pragma alloca
12608 # else
12609 # ifndef alloca /* predefined by HP cc +Olibcalls */
12610 void *alloca (size_t);
12611 # endif
12612 # endif
12613 # endif
12614 # endif
12615 #endif
12616
12617 int
12618 main ()
12619 {
12620 char *p = (char *) alloca (1);
12621 if (p) return 0;
12622 ;
12623 return 0;
12624 }
12625 _ACEOF
12626 if ac_fn_c_try_link "$LINENO"; then :
12627 ac_cv_func_alloca_works=yes
12628 else
12629 ac_cv_func_alloca_works=no
12630 fi
12631 rm -f core conftest.err conftest.$ac_objext \
12632 conftest$ac_exeext conftest.$ac_ext
12633 fi
12634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12635 $as_echo "$ac_cv_func_alloca_works" >&6; }
12636
12637 if test $ac_cv_func_alloca_works = yes; then
12638
12639 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12640
12641 else
12642 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12643 # that cause trouble. Some versions do not even contain alloca or
12644 # contain a buggy version. If you still want to use their alloca,
12645 # use ar to extract alloca.o from them instead of compiling alloca.c.
12646
12647 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12648
12649 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12650
12651
12652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12653 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12654 if ${ac_cv_os_cray+:} false; then :
12655 $as_echo_n "(cached) " >&6
12656 else
12657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12658 /* end confdefs.h. */
12659 #if defined CRAY && ! defined CRAY2
12660 webecray
12661 #else
12662 wenotbecray
12663 #endif
12664
12665 _ACEOF
12666 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12667 $EGREP "webecray" >/dev/null 2>&1; then :
12668 ac_cv_os_cray=yes
12669 else
12670 ac_cv_os_cray=no
12671 fi
12672 rm -f conftest*
12673
12674 fi
12675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12676 $as_echo "$ac_cv_os_cray" >&6; }
12677 if test $ac_cv_os_cray = yes; then
12678 for ac_func in _getb67 GETB67 getb67; do
12679 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12680 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12681 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12682
12683 cat >>confdefs.h <<_ACEOF
12684 #define CRAY_STACKSEG_END $ac_func
12685 _ACEOF
12686
12687 break
12688 fi
12689
12690 done
12691 fi
12692
12693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12694 $as_echo_n "checking stack direction for C alloca... " >&6; }
12695 if ${ac_cv_c_stack_direction+:} false; then :
12696 $as_echo_n "(cached) " >&6
12697 else
12698 if test "$cross_compiling" = yes; then :
12699 ac_cv_c_stack_direction=0
12700 else
12701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12702 /* end confdefs.h. */
12703 $ac_includes_default
12704 int
12705 find_stack_direction (int *addr, int depth)
12706 {
12707 int dir, dummy = 0;
12708 if (! addr)
12709 addr = &dummy;
12710 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12711 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12712 return dir + dummy;
12713 }
12714
12715 int
12716 main (int argc, char **argv)
12717 {
12718 return find_stack_direction (0, argc + !argv + 20) < 0;
12719 }
12720 _ACEOF
12721 if ac_fn_c_try_run "$LINENO"; then :
12722 ac_cv_c_stack_direction=1
12723 else
12724 ac_cv_c_stack_direction=-1
12725 fi
12726 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12727 conftest.$ac_objext conftest.beam conftest.$ac_ext
12728 fi
12729
12730 fi
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12732 $as_echo "$ac_cv_c_stack_direction" >&6; }
12733 cat >>confdefs.h <<_ACEOF
12734 #define STACK_DIRECTION $ac_cv_c_stack_direction
12735 _ACEOF
12736
12737
12738 fi
12739
12740
12741 WIN32APILIBS=
12742 case ${host} in
12743 *mingw32*)
12744
12745 $as_echo "#define USE_WIN32API 1" >>confdefs.h
12746
12747 WIN32APILIBS="-lws2_32"
12748 ;;
12749 esac
12750
12751
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12753 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12754 if ${am_cv_langinfo_codeset+:} false; then :
12755 $as_echo_n "(cached) " >&6
12756 else
12757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12758 /* end confdefs.h. */
12759 #include <langinfo.h>
12760 int
12761 main ()
12762 {
12763 char* cs = nl_langinfo(CODESET);
12764 ;
12765 return 0;
12766 }
12767 _ACEOF
12768 if ac_fn_c_try_link "$LINENO"; then :
12769 am_cv_langinfo_codeset=yes
12770 else
12771 am_cv_langinfo_codeset=no
12772 fi
12773 rm -f core conftest.err conftest.$ac_objext \
12774 conftest$ac_exeext conftest.$ac_ext
12775
12776 fi
12777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12778 $as_echo "$am_cv_langinfo_codeset" >&6; }
12779 if test $am_cv_langinfo_codeset = yes; then
12780
12781 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12782
12783 fi
12784
12785
12786 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h sys/procfs.h proc_service.h poll.h sys/poll.h sys/select.h
12787 do :
12788 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12789 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12790 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12791 cat >>confdefs.h <<_ACEOF
12792 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12793 _ACEOF
12794
12795 fi
12796
12797 done
12798
12799
12800
12801 for ac_func in getpagesize
12802 do :
12803 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12804 if test "x$ac_cv_func_getpagesize" = xyes; then :
12805 cat >>confdefs.h <<_ACEOF
12806 #define HAVE_GETPAGESIZE 1
12807 _ACEOF
12808
12809 fi
12810 done
12811
12812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12813 $as_echo_n "checking for working mmap... " >&6; }
12814 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12815 $as_echo_n "(cached) " >&6
12816 else
12817 if test "$cross_compiling" = yes; then :
12818 ac_cv_func_mmap_fixed_mapped=no
12819 else
12820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12821 /* end confdefs.h. */
12822 $ac_includes_default
12823 /* malloc might have been renamed as rpl_malloc. */
12824 #undef malloc
12825
12826 /* Thanks to Mike Haertel and Jim Avera for this test.
12827 Here is a matrix of mmap possibilities:
12828 mmap private not fixed
12829 mmap private fixed at somewhere currently unmapped
12830 mmap private fixed at somewhere already mapped
12831 mmap shared not fixed
12832 mmap shared fixed at somewhere currently unmapped
12833 mmap shared fixed at somewhere already mapped
12834 For private mappings, we should verify that changes cannot be read()
12835 back from the file, nor mmap's back from the file at a different
12836 address. (There have been systems where private was not correctly
12837 implemented like the infamous i386 svr4.0, and systems where the
12838 VM page cache was not coherent with the file system buffer cache
12839 like early versions of FreeBSD and possibly contemporary NetBSD.)
12840 For shared mappings, we should conversely verify that changes get
12841 propagated back to all the places they're supposed to be.
12842
12843 Grep wants private fixed already mapped.
12844 The main things grep needs to know about mmap are:
12845 * does it exist and is it safe to write into the mmap'd area
12846 * how to use it (BSD variants) */
12847
12848 #include <fcntl.h>
12849 #include <sys/mman.h>
12850
12851 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12852 char *malloc ();
12853 #endif
12854
12855 /* This mess was copied from the GNU getpagesize.h. */
12856 #ifndef HAVE_GETPAGESIZE
12857 # ifdef _SC_PAGESIZE
12858 # define getpagesize() sysconf(_SC_PAGESIZE)
12859 # else /* no _SC_PAGESIZE */
12860 # ifdef HAVE_SYS_PARAM_H
12861 # include <sys/param.h>
12862 # ifdef EXEC_PAGESIZE
12863 # define getpagesize() EXEC_PAGESIZE
12864 # else /* no EXEC_PAGESIZE */
12865 # ifdef NBPG
12866 # define getpagesize() NBPG * CLSIZE
12867 # ifndef CLSIZE
12868 # define CLSIZE 1
12869 # endif /* no CLSIZE */
12870 # else /* no NBPG */
12871 # ifdef NBPC
12872 # define getpagesize() NBPC
12873 # else /* no NBPC */
12874 # ifdef PAGESIZE
12875 # define getpagesize() PAGESIZE
12876 # endif /* PAGESIZE */
12877 # endif /* no NBPC */
12878 # endif /* no NBPG */
12879 # endif /* no EXEC_PAGESIZE */
12880 # else /* no HAVE_SYS_PARAM_H */
12881 # define getpagesize() 8192 /* punt totally */
12882 # endif /* no HAVE_SYS_PARAM_H */
12883 # endif /* no _SC_PAGESIZE */
12884
12885 #endif /* no HAVE_GETPAGESIZE */
12886
12887 int
12888 main ()
12889 {
12890 char *data, *data2, *data3;
12891 const char *cdata2;
12892 int i, pagesize;
12893 int fd, fd2;
12894
12895 pagesize = getpagesize ();
12896
12897 /* First, make a file with some known garbage in it. */
12898 data = (char *) malloc (pagesize);
12899 if (!data)
12900 return 1;
12901 for (i = 0; i < pagesize; ++i)
12902 *(data + i) = rand ();
12903 umask (0);
12904 fd = creat ("conftest.mmap", 0600);
12905 if (fd < 0)
12906 return 2;
12907 if (write (fd, data, pagesize) != pagesize)
12908 return 3;
12909 close (fd);
12910
12911 /* Next, check that the tail of a page is zero-filled. File must have
12912 non-zero length, otherwise we risk SIGBUS for entire page. */
12913 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12914 if (fd2 < 0)
12915 return 4;
12916 cdata2 = "";
12917 if (write (fd2, cdata2, 1) != 1)
12918 return 5;
12919 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12920 if (data2 == MAP_FAILED)
12921 return 6;
12922 for (i = 0; i < pagesize; ++i)
12923 if (*(data2 + i))
12924 return 7;
12925 close (fd2);
12926 if (munmap (data2, pagesize))
12927 return 8;
12928
12929 /* Next, try to mmap the file at a fixed address which already has
12930 something else allocated at it. If we can, also make sure that
12931 we see the same garbage. */
12932 fd = open ("conftest.mmap", O_RDWR);
12933 if (fd < 0)
12934 return 9;
12935 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12936 MAP_PRIVATE | MAP_FIXED, fd, 0L))
12937 return 10;
12938 for (i = 0; i < pagesize; ++i)
12939 if (*(data + i) != *(data2 + i))
12940 return 11;
12941
12942 /* Finally, make sure that changes to the mapped area do not
12943 percolate back to the file as seen by read(). (This is a bug on
12944 some variants of i386 svr4.0.) */
12945 for (i = 0; i < pagesize; ++i)
12946 *(data2 + i) = *(data2 + i) + 1;
12947 data3 = (char *) malloc (pagesize);
12948 if (!data3)
12949 return 12;
12950 if (read (fd, data3, pagesize) != pagesize)
12951 return 13;
12952 for (i = 0; i < pagesize; ++i)
12953 if (*(data + i) != *(data3 + i))
12954 return 14;
12955 close (fd);
12956 return 0;
12957 }
12958 _ACEOF
12959 if ac_fn_c_try_run "$LINENO"; then :
12960 ac_cv_func_mmap_fixed_mapped=yes
12961 else
12962 ac_cv_func_mmap_fixed_mapped=no
12963 fi
12964 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12965 conftest.$ac_objext conftest.beam conftest.$ac_ext
12966 fi
12967
12968 fi
12969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12970 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12971 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12972
12973 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12974
12975 fi
12976 rm -f conftest.mmap conftest.txt
12977
12978 for ac_header in vfork.h
12979 do :
12980 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12981 if test "x$ac_cv_header_vfork_h" = xyes; then :
12982 cat >>confdefs.h <<_ACEOF
12983 #define HAVE_VFORK_H 1
12984 _ACEOF
12985
12986 fi
12987
12988 done
12989
12990 for ac_func in fork vfork
12991 do :
12992 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12993 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12994 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12995 cat >>confdefs.h <<_ACEOF
12996 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12997 _ACEOF
12998
12999 fi
13000 done
13001
13002 if test "x$ac_cv_func_fork" = xyes; then
13003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13004 $as_echo_n "checking for working fork... " >&6; }
13005 if ${ac_cv_func_fork_works+:} false; then :
13006 $as_echo_n "(cached) " >&6
13007 else
13008 if test "$cross_compiling" = yes; then :
13009 ac_cv_func_fork_works=cross
13010 else
13011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13012 /* end confdefs.h. */
13013 $ac_includes_default
13014 int
13015 main ()
13016 {
13017
13018 /* By Ruediger Kuhlmann. */
13019 return fork () < 0;
13020
13021 ;
13022 return 0;
13023 }
13024 _ACEOF
13025 if ac_fn_c_try_run "$LINENO"; then :
13026 ac_cv_func_fork_works=yes
13027 else
13028 ac_cv_func_fork_works=no
13029 fi
13030 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13031 conftest.$ac_objext conftest.beam conftest.$ac_ext
13032 fi
13033
13034 fi
13035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13036 $as_echo "$ac_cv_func_fork_works" >&6; }
13037
13038 else
13039 ac_cv_func_fork_works=$ac_cv_func_fork
13040 fi
13041 if test "x$ac_cv_func_fork_works" = xcross; then
13042 case $host in
13043 *-*-amigaos* | *-*-msdosdjgpp*)
13044 # Override, as these systems have only a dummy fork() stub
13045 ac_cv_func_fork_works=no
13046 ;;
13047 *)
13048 ac_cv_func_fork_works=yes
13049 ;;
13050 esac
13051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13052 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13053 fi
13054 ac_cv_func_vfork_works=$ac_cv_func_vfork
13055 if test "x$ac_cv_func_vfork" = xyes; then
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13057 $as_echo_n "checking for working vfork... " >&6; }
13058 if ${ac_cv_func_vfork_works+:} false; then :
13059 $as_echo_n "(cached) " >&6
13060 else
13061 if test "$cross_compiling" = yes; then :
13062 ac_cv_func_vfork_works=cross
13063 else
13064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13065 /* end confdefs.h. */
13066 /* Thanks to Paul Eggert for this test. */
13067 $ac_includes_default
13068 #include <sys/wait.h>
13069 #ifdef HAVE_VFORK_H
13070 # include <vfork.h>
13071 #endif
13072 /* On some sparc systems, changes by the child to local and incoming
13073 argument registers are propagated back to the parent. The compiler
13074 is told about this with #include <vfork.h>, but some compilers
13075 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13076 static variable whose address is put into a register that is
13077 clobbered by the vfork. */
13078 static void
13079 #ifdef __cplusplus
13080 sparc_address_test (int arg)
13081 # else
13082 sparc_address_test (arg) int arg;
13083 #endif
13084 {
13085 static pid_t child;
13086 if (!child) {
13087 child = vfork ();
13088 if (child < 0) {
13089 perror ("vfork");
13090 _exit(2);
13091 }
13092 if (!child) {
13093 arg = getpid();
13094 write(-1, "", 0);
13095 _exit (arg);
13096 }
13097 }
13098 }
13099
13100 int
13101 main ()
13102 {
13103 pid_t parent = getpid ();
13104 pid_t child;
13105
13106 sparc_address_test (0);
13107
13108 child = vfork ();
13109
13110 if (child == 0) {
13111 /* Here is another test for sparc vfork register problems. This
13112 test uses lots of local variables, at least as many local
13113 variables as main has allocated so far including compiler
13114 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13115 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13116 reuse the register of parent for one of the local variables,
13117 since it will think that parent can't possibly be used any more
13118 in this routine. Assigning to the local variable will thus
13119 munge parent in the parent process. */
13120 pid_t
13121 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13122 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13123 /* Convince the compiler that p..p7 are live; otherwise, it might
13124 use the same hardware register for all 8 local variables. */
13125 if (p != p1 || p != p2 || p != p3 || p != p4
13126 || p != p5 || p != p6 || p != p7)
13127 _exit(1);
13128
13129 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13130 from child file descriptors. If the child closes a descriptor
13131 before it execs or exits, this munges the parent's descriptor
13132 as well. Test for this by closing stdout in the child. */
13133 _exit(close(fileno(stdout)) != 0);
13134 } else {
13135 int status;
13136 struct stat st;
13137
13138 while (wait(&status) != child)
13139 ;
13140 return (
13141 /* Was there some problem with vforking? */
13142 child < 0
13143
13144 /* Did the child fail? (This shouldn't happen.) */
13145 || status
13146
13147 /* Did the vfork/compiler bug occur? */
13148 || parent != getpid()
13149
13150 /* Did the file descriptor bug occur? */
13151 || fstat(fileno(stdout), &st) != 0
13152 );
13153 }
13154 }
13155 _ACEOF
13156 if ac_fn_c_try_run "$LINENO"; then :
13157 ac_cv_func_vfork_works=yes
13158 else
13159 ac_cv_func_vfork_works=no
13160 fi
13161 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13162 conftest.$ac_objext conftest.beam conftest.$ac_ext
13163 fi
13164
13165 fi
13166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13167 $as_echo "$ac_cv_func_vfork_works" >&6; }
13168
13169 fi;
13170 if test "x$ac_cv_func_fork_works" = xcross; then
13171 ac_cv_func_vfork_works=$ac_cv_func_vfork
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13173 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13174 fi
13175
13176 if test "x$ac_cv_func_vfork_works" = xyes; then
13177
13178 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13179
13180 else
13181
13182 $as_echo "#define vfork fork" >>confdefs.h
13183
13184 fi
13185 if test "x$ac_cv_func_fork_works" = xyes; then
13186
13187 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13188
13189 fi
13190
13191 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13192 ptrace64 sbrk setns sigaltstack sigprocmask \
13193 setpgid setpgrp getrusage getauxval
13194 do :
13195 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13196 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13197 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13198 cat >>confdefs.h <<_ACEOF
13199 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13200 _ACEOF
13201
13202 fi
13203 done
13204
13205
13206 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13207 "
13208 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13209 ac_have_decl=1
13210 else
13211 ac_have_decl=0
13212 fi
13213
13214 cat >>confdefs.h <<_ACEOF
13215 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13216 _ACEOF
13217
13218
13219 if test "$cross_compiling" = yes; then :
13220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13221 /* end confdefs.h. */
13222 #include <sys/personality.h>
13223 int
13224 main ()
13225 {
13226
13227 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13228 # define ADDR_NO_RANDOMIZE 0x0040000
13229 # endif
13230 /* Test the flag could be set and stays set. */
13231 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13232 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13233 return 1
13234 ;
13235 return 0;
13236 }
13237 _ACEOF
13238 if ac_fn_c_try_link "$LINENO"; then :
13239 have_personality=true
13240 else
13241 have_personality=false
13242 fi
13243 rm -f core conftest.err conftest.$ac_objext \
13244 conftest$ac_exeext conftest.$ac_ext
13245 else
13246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13247 /* end confdefs.h. */
13248 #include <sys/personality.h>
13249 int
13250 main ()
13251 {
13252
13253 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13254 # define ADDR_NO_RANDOMIZE 0x0040000
13255 # endif
13256 /* Test the flag could be set and stays set. */
13257 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13258 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13259 return 1
13260 ;
13261 return 0;
13262 }
13263 _ACEOF
13264 if ac_fn_c_try_run "$LINENO"; then :
13265 have_personality=true
13266 else
13267 have_personality=false
13268 fi
13269 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13270 conftest.$ac_objext conftest.beam conftest.$ac_ext
13271 fi
13272
13273 if $have_personality
13274 then
13275
13276 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
13277
13278 fi
13279
13280 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13281 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13282 ac_have_decl=1
13283 else
13284 ac_have_decl=0
13285 fi
13286
13287 cat >>confdefs.h <<_ACEOF
13288 #define HAVE_DECL_STRSTR $ac_have_decl
13289 _ACEOF
13290
13291
13292 # ----------------------- #
13293 # Checks for structures. #
13294 # ----------------------- #
13295
13296 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13297 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13298
13299 cat >>confdefs.h <<_ACEOF
13300 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13301 _ACEOF
13302
13303
13304 fi
13305 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13306 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13307
13308 cat >>confdefs.h <<_ACEOF
13309 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13310 _ACEOF
13311
13312
13313 fi
13314
13315
13316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13317 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13318 if ${ac_cv_search_kinfo_getfile+:} false; then :
13319 $as_echo_n "(cached) " >&6
13320 else
13321 ac_func_search_save_LIBS=$LIBS
13322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13323 /* end confdefs.h. */
13324
13325 /* Override any GCC internal prototype to avoid an error.
13326 Use char because int might match the return type of a GCC
13327 builtin and then its argument prototype would still apply. */
13328 #ifdef __cplusplus
13329 extern "C"
13330 #endif
13331 char kinfo_getfile ();
13332 int
13333 main ()
13334 {
13335 return kinfo_getfile ();
13336 ;
13337 return 0;
13338 }
13339 _ACEOF
13340 for ac_lib in '' util util-freebsd; do
13341 if test -z "$ac_lib"; then
13342 ac_res="none required"
13343 else
13344 ac_res=-l$ac_lib
13345 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13346 fi
13347 if ac_fn_c_try_link "$LINENO"; then :
13348 ac_cv_search_kinfo_getfile=$ac_res
13349 fi
13350 rm -f core conftest.err conftest.$ac_objext \
13351 conftest$ac_exeext
13352 if ${ac_cv_search_kinfo_getfile+:} false; then :
13353 break
13354 fi
13355 done
13356 if ${ac_cv_search_kinfo_getfile+:} false; then :
13357
13358 else
13359 ac_cv_search_kinfo_getfile=no
13360 fi
13361 rm conftest.$ac_ext
13362 LIBS=$ac_func_search_save_LIBS
13363 fi
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13365 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13366 ac_res=$ac_cv_search_kinfo_getfile
13367 if test "$ac_res" != no; then :
13368 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13369
13370 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
13371
13372 fi
13373
13374
13375 # Check for std::thread. This does not work on some platforms, like
13376 # mingw and DJGPP.
13377 ac_ext=cpp
13378 ac_cpp='$CXXCPP $CPPFLAGS'
13379 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13380 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13381 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13382
13383
13384
13385
13386
13387 ac_ext=c
13388 ac_cpp='$CPP $CPPFLAGS'
13389 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13390 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13391 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13392
13393 ax_pthread_ok=no
13394
13395 # We used to check for pthread.h first, but this fails if pthread.h
13396 # requires special compiler flags (e.g. on Tru64 or Sequent).
13397 # It gets checked for in the link test anyway.
13398
13399 # First of all, check if the user has set any of the PTHREAD_LIBS,
13400 # etcetera environment variables, and if threads linking works using
13401 # them:
13402 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13403 ax_pthread_save_CC="$CC"
13404 ax_pthread_save_CFLAGS="$CFLAGS"
13405 ax_pthread_save_LIBS="$LIBS"
13406 if test "x$PTHREAD_CC" != "x"; then :
13407 CC="$PTHREAD_CC"
13408 fi
13409 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13410 LIBS="$PTHREAD_LIBS $LIBS"
13411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13412 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13414 /* end confdefs.h. */
13415
13416 /* Override any GCC internal prototype to avoid an error.
13417 Use char because int might match the return type of a GCC
13418 builtin and then its argument prototype would still apply. */
13419 #ifdef __cplusplus
13420 extern "C"
13421 #endif
13422 char pthread_join ();
13423 int
13424 main ()
13425 {
13426 return pthread_join ();
13427 ;
13428 return 0;
13429 }
13430 _ACEOF
13431 if ac_fn_c_try_link "$LINENO"; then :
13432 ax_pthread_ok=yes
13433 fi
13434 rm -f core conftest.err conftest.$ac_objext \
13435 conftest$ac_exeext conftest.$ac_ext
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13437 $as_echo "$ax_pthread_ok" >&6; }
13438 if test "x$ax_pthread_ok" = "xno"; then
13439 PTHREAD_LIBS=""
13440 PTHREAD_CFLAGS=""
13441 fi
13442 CC="$ax_pthread_save_CC"
13443 CFLAGS="$ax_pthread_save_CFLAGS"
13444 LIBS="$ax_pthread_save_LIBS"
13445 fi
13446
13447 # We must check for the threads library under a number of different
13448 # names; the ordering is very important because some systems
13449 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13450 # libraries is broken (non-POSIX).
13451
13452 # Create a list of thread flags to try. Items starting with a "-" are
13453 # C compiler flags, and other items are library names, except for "none"
13454 # which indicates that we try without any flags at all, and "pthread-config"
13455 # which is a program returning the flags for the Pth emulation library.
13456
13457 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13458
13459 # The ordering *is* (sometimes) important. Some notes on the
13460 # individual items follow:
13461
13462 # pthreads: AIX (must check this before -lpthread)
13463 # none: in case threads are in libc; should be tried before -Kthread and
13464 # other compiler flags to prevent continual compiler warnings
13465 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13466 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13467 # (Note: HP C rejects this with "bad form for `-t' option")
13468 # -pthreads: Solaris/gcc (Note: HP C also rejects)
13469 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13470 # doesn't hurt to check since this sometimes defines pthreads and
13471 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
13472 # is present but should not be used directly; and before -mthreads,
13473 # because the compiler interprets this as "-mt" + "-hreads")
13474 # -mthreads: Mingw32/gcc, Lynx/gcc
13475 # pthread: Linux, etcetera
13476 # --thread-safe: KAI C++
13477 # pthread-config: use pthread-config program (for GNU Pth library)
13478
13479 case $host_os in
13480
13481 freebsd*)
13482
13483 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13484 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13485
13486 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13487 ;;
13488
13489 hpux*)
13490
13491 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13492 # multi-threading and also sets -lpthread."
13493
13494 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13495 ;;
13496
13497 openedition*)
13498
13499 # IBM z/OS requires a feature-test macro to be defined in order to
13500 # enable POSIX threads at all, so give the user a hint if this is
13501 # not set. (We don't define these ourselves, as they can affect
13502 # other portions of the system API in unpredictable ways.)
13503
13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13505 /* end confdefs.h. */
13506
13507 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13508 AX_PTHREAD_ZOS_MISSING
13509 # endif
13510
13511 _ACEOF
13512 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13513 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13515 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13516 fi
13517 rm -f conftest*
13518
13519 ;;
13520
13521 solaris*)
13522
13523 # On Solaris (at least, for some versions), libc contains stubbed
13524 # (non-functional) versions of the pthreads routines, so link-based
13525 # tests will erroneously succeed. (N.B.: The stubs are missing
13526 # pthread_cleanup_push, or rather a function called by this macro,
13527 # so we could check for that, but who knows whether they'll stub
13528 # that too in a future libc.) So we'll check first for the
13529 # standard Solaris way of linking pthreads (-mt -lpthread).
13530
13531 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13532 ;;
13533 esac
13534
13535 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13536
13537 if test "x$GCC" = "xyes"; then :
13538 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13539 fi
13540
13541 # The presence of a feature test macro requesting re-entrant function
13542 # definitions is, on some systems, a strong hint that pthreads support is
13543 # correctly enabled
13544
13545 case $host_os in
13546 darwin* | hpux* | linux* | osf* | solaris*)
13547 ax_pthread_check_macro="_REENTRANT"
13548 ;;
13549
13550 aix*)
13551 ax_pthread_check_macro="_THREAD_SAFE"
13552 ;;
13553
13554 *)
13555 ax_pthread_check_macro="--"
13556 ;;
13557 esac
13558 if test "x$ax_pthread_check_macro" = "x--"; then :
13559 ax_pthread_check_cond=0
13560 else
13561 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13562 fi
13563
13564 # Are we compiling with Clang?
13565
13566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13567 $as_echo_n "checking whether $CC is Clang... " >&6; }
13568 if ${ax_cv_PTHREAD_CLANG+:} false; then :
13569 $as_echo_n "(cached) " >&6
13570 else
13571 ax_cv_PTHREAD_CLANG=no
13572 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13573 if test "x$GCC" = "xyes"; then
13574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13575 /* end confdefs.h. */
13576 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13577 # if defined(__clang__) && defined(__llvm__)
13578 AX_PTHREAD_CC_IS_CLANG
13579 # endif
13580
13581 _ACEOF
13582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13583 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13584 ax_cv_PTHREAD_CLANG=yes
13585 fi
13586 rm -f conftest*
13587
13588 fi
13589
13590 fi
13591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13592 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13593 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13594
13595 ax_pthread_clang_warning=no
13596
13597 # Clang needs special handling, because older versions handle the -pthread
13598 # option in a rather... idiosyncratic way
13599
13600 if test "x$ax_pthread_clang" = "xyes"; then
13601
13602 # Clang takes -pthread; it has never supported any other flag
13603
13604 # (Note 1: This will need to be revisited if a system that Clang
13605 # supports has POSIX threads in a separate library. This tends not
13606 # to be the way of modern systems, but it's conceivable.)
13607
13608 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13609 # to get POSIX threads support; the API is always present and
13610 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13611 # -pthread does define _REENTRANT, and while the Darwin headers
13612 # ignore this macro, third-party headers might not.)
13613
13614 PTHREAD_CFLAGS="-pthread"
13615 PTHREAD_LIBS=
13616
13617 ax_pthread_ok=yes
13618
13619 # However, older versions of Clang make a point of warning the user
13620 # that, in an invocation where only linking and no compilation is
13621 # taking place, the -pthread option has no effect ("argument unused
13622 # during compilation"). They expect -pthread to be passed in only
13623 # when source code is being compiled.
13624 #
13625 # Problem is, this is at odds with the way Automake and most other
13626 # C build frameworks function, which is that the same flags used in
13627 # compilation (CFLAGS) are also used in linking. Many systems
13628 # supported by AX_PTHREAD require exactly this for POSIX threads
13629 # support, and in fact it is often not straightforward to specify a
13630 # flag that is used only in the compilation phase and not in
13631 # linking. Such a scenario is extremely rare in practice.
13632 #
13633 # Even though use of the -pthread flag in linking would only print
13634 # a warning, this can be a nuisance for well-run software projects
13635 # that build with -Werror. So if the active version of Clang has
13636 # this misfeature, we search for an option to squash it.
13637
13638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13639 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13640 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13641 $as_echo_n "(cached) " >&6
13642 else
13643 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13644 # Create an alternate version of $ac_link that compiles and
13645 # links in two steps (.c -> .o, .o -> exe) instead of one
13646 # (.c -> exe), because the warning occurs only in the second
13647 # step
13648 ax_pthread_save_ac_link="$ac_link"
13649 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13650 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13651 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13652 ax_pthread_save_CFLAGS="$CFLAGS"
13653 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13654 if test "x$ax_pthread_try" = "xunknown"; then :
13655 break
13656 fi
13657 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13658 ac_link="$ax_pthread_save_ac_link"
13659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13660 /* end confdefs.h. */
13661 int main(void){return 0;}
13662 _ACEOF
13663 if ac_fn_c_try_link "$LINENO"; then :
13664 ac_link="$ax_pthread_2step_ac_link"
13665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13666 /* end confdefs.h. */
13667 int main(void){return 0;}
13668 _ACEOF
13669 if ac_fn_c_try_link "$LINENO"; then :
13670 break
13671 fi
13672 rm -f core conftest.err conftest.$ac_objext \
13673 conftest$ac_exeext conftest.$ac_ext
13674
13675 fi
13676 rm -f core conftest.err conftest.$ac_objext \
13677 conftest$ac_exeext conftest.$ac_ext
13678 done
13679 ac_link="$ax_pthread_save_ac_link"
13680 CFLAGS="$ax_pthread_save_CFLAGS"
13681 if test "x$ax_pthread_try" = "x"; then :
13682 ax_pthread_try=no
13683 fi
13684 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13685
13686 fi
13687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13688 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13689
13690 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13691 no | unknown) ;;
13692 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13693 esac
13694
13695 fi # $ax_pthread_clang = yes
13696
13697 if test "x$ax_pthread_ok" = "xno"; then
13698 for ax_pthread_try_flag in $ax_pthread_flags; do
13699
13700 case $ax_pthread_try_flag in
13701 none)
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13703 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
13704 ;;
13705
13706 -mt,pthread)
13707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13708 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13709 PTHREAD_CFLAGS="-mt"
13710 PTHREAD_LIBS="-lpthread"
13711 ;;
13712
13713 -*)
13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13715 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13716 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13717 ;;
13718
13719 pthread-config)
13720 # Extract the first word of "pthread-config", so it can be a program name with args.
13721 set dummy pthread-config; ac_word=$2
13722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13723 $as_echo_n "checking for $ac_word... " >&6; }
13724 if ${ac_cv_prog_ax_pthread_config+:} false; then :
13725 $as_echo_n "(cached) " >&6
13726 else
13727 if test -n "$ax_pthread_config"; then
13728 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13729 else
13730 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13731 for as_dir in $PATH
13732 do
13733 IFS=$as_save_IFS
13734 test -z "$as_dir" && as_dir=.
13735 for ac_exec_ext in '' $ac_executable_extensions; do
13736 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13737 ac_cv_prog_ax_pthread_config="yes"
13738 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13739 break 2
13740 fi
13741 done
13742 done
13743 IFS=$as_save_IFS
13744
13745 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13746 fi
13747 fi
13748 ax_pthread_config=$ac_cv_prog_ax_pthread_config
13749 if test -n "$ax_pthread_config"; then
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13751 $as_echo "$ax_pthread_config" >&6; }
13752 else
13753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13754 $as_echo "no" >&6; }
13755 fi
13756
13757
13758 if test "x$ax_pthread_config" = "xno"; then :
13759 continue
13760 fi
13761 PTHREAD_CFLAGS="`pthread-config --cflags`"
13762 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13763 ;;
13764
13765 *)
13766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13767 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13768 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13769 ;;
13770 esac
13771
13772 ax_pthread_save_CFLAGS="$CFLAGS"
13773 ax_pthread_save_LIBS="$LIBS"
13774 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13775 LIBS="$PTHREAD_LIBS $LIBS"
13776
13777 # Check for various functions. We must include pthread.h,
13778 # since some functions may be macros. (On the Sequent, we
13779 # need a special flag -Kthread to make this header compile.)
13780 # We check for pthread_join because it is in -lpthread on IRIX
13781 # while pthread_create is in libc. We check for pthread_attr_init
13782 # due to DEC craziness with -lpthreads. We check for
13783 # pthread_cleanup_push because it is one of the few pthread
13784 # functions on Solaris that doesn't have a non-functional libc stub.
13785 # We try pthread_create on general principles.
13786
13787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13788 /* end confdefs.h. */
13789 #include <pthread.h>
13790 # if $ax_pthread_check_cond
13791 # error "$ax_pthread_check_macro must be defined"
13792 # endif
13793 static void routine(void *a) { a = 0; }
13794 static void *start_routine(void *a) { return a; }
13795 int
13796 main ()
13797 {
13798 pthread_t th; pthread_attr_t attr;
13799 pthread_create(&th, 0, start_routine, 0);
13800 pthread_join(th, 0);
13801 pthread_attr_init(&attr);
13802 pthread_cleanup_push(routine, 0);
13803 pthread_cleanup_pop(0) /* ; */
13804 ;
13805 return 0;
13806 }
13807 _ACEOF
13808 if ac_fn_c_try_link "$LINENO"; then :
13809 ax_pthread_ok=yes
13810 fi
13811 rm -f core conftest.err conftest.$ac_objext \
13812 conftest$ac_exeext conftest.$ac_ext
13813
13814 CFLAGS="$ax_pthread_save_CFLAGS"
13815 LIBS="$ax_pthread_save_LIBS"
13816
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13818 $as_echo "$ax_pthread_ok" >&6; }
13819 if test "x$ax_pthread_ok" = "xyes"; then :
13820 break
13821 fi
13822
13823 PTHREAD_LIBS=""
13824 PTHREAD_CFLAGS=""
13825 done
13826 fi
13827
13828 # Various other checks:
13829 if test "x$ax_pthread_ok" = "xyes"; then
13830 ax_pthread_save_CFLAGS="$CFLAGS"
13831 ax_pthread_save_LIBS="$LIBS"
13832 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13833 LIBS="$PTHREAD_LIBS $LIBS"
13834
13835 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13837 $as_echo_n "checking for joinable pthread attribute... " >&6; }
13838 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13839 $as_echo_n "(cached) " >&6
13840 else
13841 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13842 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13844 /* end confdefs.h. */
13845 #include <pthread.h>
13846 int
13847 main ()
13848 {
13849 int attr = $ax_pthread_attr; return attr /* ; */
13850 ;
13851 return 0;
13852 }
13853 _ACEOF
13854 if ac_fn_c_try_link "$LINENO"; then :
13855 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13856 fi
13857 rm -f core conftest.err conftest.$ac_objext \
13858 conftest$ac_exeext conftest.$ac_ext
13859 done
13860
13861 fi
13862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13863 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13864 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13865 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
13866 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
13867
13868 cat >>confdefs.h <<_ACEOF
13869 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
13870 _ACEOF
13871
13872 ax_pthread_joinable_attr_defined=yes
13873
13874 fi
13875
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
13877 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
13878 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
13879 $as_echo_n "(cached) " >&6
13880 else
13881 ax_cv_PTHREAD_SPECIAL_FLAGS=no
13882 case $host_os in
13883 solaris*)
13884 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
13885 ;;
13886 esac
13887
13888 fi
13889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
13890 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
13891 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
13892 test "x$ax_pthread_special_flags_added" != "xyes"; then :
13893 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
13894 ax_pthread_special_flags_added=yes
13895 fi
13896
13897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
13898 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
13899 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
13900 $as_echo_n "(cached) " >&6
13901 else
13902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13903 /* end confdefs.h. */
13904 #include <pthread.h>
13905 int
13906 main ()
13907 {
13908 int i = PTHREAD_PRIO_INHERIT;
13909 ;
13910 return 0;
13911 }
13912 _ACEOF
13913 if ac_fn_c_try_link "$LINENO"; then :
13914 ax_cv_PTHREAD_PRIO_INHERIT=yes
13915 else
13916 ax_cv_PTHREAD_PRIO_INHERIT=no
13917 fi
13918 rm -f core conftest.err conftest.$ac_objext \
13919 conftest$ac_exeext conftest.$ac_ext
13920
13921 fi
13922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
13923 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
13924 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
13925 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
13926
13927 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
13928
13929 ax_pthread_prio_inherit_defined=yes
13930
13931 fi
13932
13933 CFLAGS="$ax_pthread_save_CFLAGS"
13934 LIBS="$ax_pthread_save_LIBS"
13935
13936 # More AIX lossage: compile with *_r variant
13937 if test "x$GCC" != "xyes"; then
13938 case $host_os in
13939 aix*)
13940 case "x/$CC" in #(
13941 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
13942 #handle absolute path differently from PATH based program lookup
13943 case "x$CC" in #(
13944 x/*) :
13945 if as_fn_executable_p ${CC}_r; then :
13946 PTHREAD_CC="${CC}_r"
13947 fi ;; #(
13948 *) :
13949 for ac_prog in ${CC}_r
13950 do
13951 # Extract the first word of "$ac_prog", so it can be a program name with args.
13952 set dummy $ac_prog; ac_word=$2
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13954 $as_echo_n "checking for $ac_word... " >&6; }
13955 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
13956 $as_echo_n "(cached) " >&6
13957 else
13958 if test -n "$PTHREAD_CC"; then
13959 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13960 else
13961 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13962 for as_dir in $PATH
13963 do
13964 IFS=$as_save_IFS
13965 test -z "$as_dir" && as_dir=.
13966 for ac_exec_ext in '' $ac_executable_extensions; do
13967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13968 ac_cv_prog_PTHREAD_CC="$ac_prog"
13969 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13970 break 2
13971 fi
13972 done
13973 done
13974 IFS=$as_save_IFS
13975
13976 fi
13977 fi
13978 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13979 if test -n "$PTHREAD_CC"; then
13980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
13981 $as_echo "$PTHREAD_CC" >&6; }
13982 else
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13984 $as_echo "no" >&6; }
13985 fi
13986
13987
13988 test -n "$PTHREAD_CC" && break
13989 done
13990 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13991 ;;
13992 esac ;; #(
13993 *) :
13994 ;;
13995 esac
13996 ;;
13997 esac
13998 fi
13999 fi
14000
14001 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14002
14003
14004
14005
14006
14007 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14008 if test "x$ax_pthread_ok" = "xyes"; then
14009 threads=yes
14010 :
14011 else
14012 ax_pthread_ok=no
14013 threads=no
14014 fi
14015 ac_ext=cpp
14016 ac_cpp='$CXXCPP $CPPFLAGS'
14017 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14018 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14019 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14020
14021
14022 if test "$threads" = "yes"; then
14023 save_LIBS="$LIBS"
14024 LIBS="$PTHREAD_LIBS $LIBS"
14025 save_CXXFLAGS="$CXXFLAGS"
14026 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14028 $as_echo_n "checking for std::thread... " >&6; }
14029 if ${gdb_cv_cxx_std_thread+:} false; then :
14030 $as_echo_n "(cached) " >&6
14031 else
14032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14033 /* end confdefs.h. */
14034 #include <thread>
14035 void callback() { }
14036 int
14037 main ()
14038 {
14039 std::thread t(callback);
14040 ;
14041 return 0;
14042 }
14043 _ACEOF
14044 if ac_fn_cxx_try_compile "$LINENO"; then :
14045 gdb_cv_cxx_std_thread=yes
14046 else
14047 gdb_cv_cxx_std_thread=no
14048 fi
14049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14050 fi
14051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14052 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
14053
14054 # This check must be here, while LIBS includes any necessary
14055 # threading library.
14056 for ac_func in pthread_sigmask pthread_setname_np
14057 do :
14058 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14059 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14060 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14061 cat >>confdefs.h <<_ACEOF
14062 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14063 _ACEOF
14064
14065 fi
14066 done
14067
14068
14069 LIBS="$save_LIBS"
14070 CXXFLAGS="$save_CXXFLAGS"
14071 fi
14072 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14073
14074 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14075
14076 fi
14077 ac_ext=c
14078 ac_cpp='$CPP $CPPFLAGS'
14079 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14080 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14081 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14082
14083
14084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14085 $as_echo_n "checking for sigsetjmp... " >&6; }
14086 if ${gdb_cv_func_sigsetjmp+:} false; then :
14087 $as_echo_n "(cached) " >&6
14088 else
14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14090 /* end confdefs.h. */
14091
14092 #include <setjmp.h>
14093
14094 int
14095 main ()
14096 {
14097 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14098 ;
14099 return 0;
14100 }
14101 _ACEOF
14102 if ac_fn_c_try_compile "$LINENO"; then :
14103 gdb_cv_func_sigsetjmp=yes
14104 else
14105 gdb_cv_func_sigsetjmp=no
14106 fi
14107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14108 fi
14109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14110 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14111 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14112
14113 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14114
14115 fi
14116
14117
14118 # Check whether --with-intel_pt was given.
14119 if test "${with_intel_pt+set}" = set; then :
14120 withval=$with_intel_pt;
14121 else
14122 with_intel_pt=auto
14123 fi
14124
14125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14126 $as_echo_n "checking whether to use intel pt... " >&6; }
14127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14128 $as_echo "$with_intel_pt" >&6; }
14129
14130 if test "${with_intel_pt}" = no; then
14131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14132 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14133 HAVE_LIBIPT=no
14134 else
14135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14136 /* end confdefs.h. */
14137
14138 #include <linux/perf_event.h>
14139 #ifndef PERF_ATTR_SIZE_VER5
14140 # error
14141 #endif
14142
14143 _ACEOF
14144 if ac_fn_c_try_cpp "$LINENO"; then :
14145 perf_event=yes
14146 else
14147 perf_event=no
14148 fi
14149 rm -f conftest.err conftest.i conftest.$ac_ext
14150 if test "$perf_event" != yes; then
14151 if test "$with_intel_pt" = yes; then
14152 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14153 else
14154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14155 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14156 fi
14157 fi
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167 use_additional=yes
14168
14169 acl_save_prefix="$prefix"
14170 prefix="$acl_final_prefix"
14171 acl_save_exec_prefix="$exec_prefix"
14172 exec_prefix="$acl_final_exec_prefix"
14173
14174 eval additional_includedir=\"$includedir\"
14175 eval additional_libdir=\"$libdir\"
14176
14177 exec_prefix="$acl_save_exec_prefix"
14178 prefix="$acl_save_prefix"
14179
14180
14181 # Check whether --with-libipt-prefix was given.
14182 if test "${with_libipt_prefix+set}" = set; then :
14183 withval=$with_libipt_prefix;
14184 if test "X$withval" = "Xno"; then
14185 use_additional=no
14186 else
14187 if test "X$withval" = "X"; then
14188
14189 acl_save_prefix="$prefix"
14190 prefix="$acl_final_prefix"
14191 acl_save_exec_prefix="$exec_prefix"
14192 exec_prefix="$acl_final_exec_prefix"
14193
14194 eval additional_includedir=\"$includedir\"
14195 eval additional_libdir=\"$libdir\"
14196
14197 exec_prefix="$acl_save_exec_prefix"
14198 prefix="$acl_save_prefix"
14199
14200 else
14201 additional_includedir="$withval/include"
14202 additional_libdir="$withval/lib"
14203 fi
14204 fi
14205
14206 fi
14207
14208
14209 # Check whether --with-libipt-type was given.
14210 if test "${with_libipt_type+set}" = set; then :
14211 withval=$with_libipt_type; with_libipt_type=$withval
14212 else
14213 with_libipt_type=auto
14214 fi
14215
14216 lib_type=`eval echo \$with_libipt_type`
14217
14218 LIBIPT=
14219 LTLIBIPT=
14220 INCIPT=
14221 rpathdirs=
14222 ltrpathdirs=
14223 names_already_handled=
14224 names_next_round='ipt '
14225 while test -n "$names_next_round"; do
14226 names_this_round="$names_next_round"
14227 names_next_round=
14228 for name in $names_this_round; do
14229 already_handled=
14230 for n in $names_already_handled; do
14231 if test "$n" = "$name"; then
14232 already_handled=yes
14233 break
14234 fi
14235 done
14236 if test -z "$already_handled"; then
14237 names_already_handled="$names_already_handled $name"
14238 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14239 eval value=\"\$HAVE_LIB$uppername\"
14240 if test -n "$value"; then
14241 if test "$value" = yes; then
14242 eval value=\"\$LIB$uppername\"
14243 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14244 eval value=\"\$LTLIB$uppername\"
14245 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14246 else
14247 :
14248 fi
14249 else
14250 found_dir=
14251 found_la=
14252 found_so=
14253 found_a=
14254 if test $use_additional = yes; then
14255 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14256 found_dir="$additional_libdir"
14257 found_so="$additional_libdir/lib$name.$shlibext"
14258 if test -f "$additional_libdir/lib$name.la"; then
14259 found_la="$additional_libdir/lib$name.la"
14260 fi
14261 elif test x$lib_type != xshared; then
14262 if test -f "$additional_libdir/lib$name.$libext"; then
14263 found_dir="$additional_libdir"
14264 found_a="$additional_libdir/lib$name.$libext"
14265 if test -f "$additional_libdir/lib$name.la"; then
14266 found_la="$additional_libdir/lib$name.la"
14267 fi
14268 fi
14269 fi
14270 fi
14271 if test "X$found_dir" = "X"; then
14272 for x in $LDFLAGS $LTLIBIPT; do
14273
14274 acl_save_prefix="$prefix"
14275 prefix="$acl_final_prefix"
14276 acl_save_exec_prefix="$exec_prefix"
14277 exec_prefix="$acl_final_exec_prefix"
14278 eval x=\"$x\"
14279 exec_prefix="$acl_save_exec_prefix"
14280 prefix="$acl_save_prefix"
14281
14282 case "$x" in
14283 -L*)
14284 dir=`echo "X$x" | sed -e 's/^X-L//'`
14285 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14286 found_dir="$dir"
14287 found_so="$dir/lib$name.$shlibext"
14288 if test -f "$dir/lib$name.la"; then
14289 found_la="$dir/lib$name.la"
14290 fi
14291 elif test x$lib_type != xshared; then
14292 if test -f "$dir/lib$name.$libext"; then
14293 found_dir="$dir"
14294 found_a="$dir/lib$name.$libext"
14295 if test -f "$dir/lib$name.la"; then
14296 found_la="$dir/lib$name.la"
14297 fi
14298 fi
14299 fi
14300 ;;
14301 esac
14302 if test "X$found_dir" != "X"; then
14303 break
14304 fi
14305 done
14306 fi
14307 if test "X$found_dir" != "X"; then
14308 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14309 if test "X$found_so" != "X"; then
14310 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14311 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14312 else
14313 haveit=
14314 for x in $ltrpathdirs; do
14315 if test "X$x" = "X$found_dir"; then
14316 haveit=yes
14317 break
14318 fi
14319 done
14320 if test -z "$haveit"; then
14321 ltrpathdirs="$ltrpathdirs $found_dir"
14322 fi
14323 if test "$hardcode_direct" = yes; then
14324 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14325 else
14326 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14327 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14328 haveit=
14329 for x in $rpathdirs; do
14330 if test "X$x" = "X$found_dir"; then
14331 haveit=yes
14332 break
14333 fi
14334 done
14335 if test -z "$haveit"; then
14336 rpathdirs="$rpathdirs $found_dir"
14337 fi
14338 else
14339 haveit=
14340 for x in $LDFLAGS $LIBIPT; do
14341
14342 acl_save_prefix="$prefix"
14343 prefix="$acl_final_prefix"
14344 acl_save_exec_prefix="$exec_prefix"
14345 exec_prefix="$acl_final_exec_prefix"
14346 eval x=\"$x\"
14347 exec_prefix="$acl_save_exec_prefix"
14348 prefix="$acl_save_prefix"
14349
14350 if test "X$x" = "X-L$found_dir"; then
14351 haveit=yes
14352 break
14353 fi
14354 done
14355 if test -z "$haveit"; then
14356 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14357 fi
14358 if test "$hardcode_minus_L" != no; then
14359 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14360 else
14361 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14362 fi
14363 fi
14364 fi
14365 fi
14366 else
14367 if test "X$found_a" != "X"; then
14368 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14369 else
14370 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14371 fi
14372 fi
14373 additional_includedir=
14374 case "$found_dir" in
14375 */lib | */lib/)
14376 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14377 additional_includedir="$basedir/include"
14378 ;;
14379 esac
14380 if test "X$additional_includedir" != "X"; then
14381 if test "X$additional_includedir" != "X/usr/include"; then
14382 haveit=
14383 if test "X$additional_includedir" = "X/usr/local/include"; then
14384 if test -n "$GCC"; then
14385 case $host_os in
14386 linux*) haveit=yes;;
14387 esac
14388 fi
14389 fi
14390 if test -z "$haveit"; then
14391 for x in $CPPFLAGS $INCIPT; do
14392
14393 acl_save_prefix="$prefix"
14394 prefix="$acl_final_prefix"
14395 acl_save_exec_prefix="$exec_prefix"
14396 exec_prefix="$acl_final_exec_prefix"
14397 eval x=\"$x\"
14398 exec_prefix="$acl_save_exec_prefix"
14399 prefix="$acl_save_prefix"
14400
14401 if test "X$x" = "X-I$additional_includedir"; then
14402 haveit=yes
14403 break
14404 fi
14405 done
14406 if test -z "$haveit"; then
14407 if test -d "$additional_includedir"; then
14408 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14409 fi
14410 fi
14411 fi
14412 fi
14413 fi
14414 if test -n "$found_la"; then
14415 save_libdir="$libdir"
14416 case "$found_la" in
14417 */* | *\\*) . "$found_la" ;;
14418 *) . "./$found_la" ;;
14419 esac
14420 libdir="$save_libdir"
14421 for dep in $dependency_libs; do
14422 case "$dep" in
14423 -L*)
14424 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14425 if test "X$additional_libdir" != "X/usr/lib"; then
14426 haveit=
14427 if test "X$additional_libdir" = "X/usr/local/lib"; then
14428 if test -n "$GCC"; then
14429 case $host_os in
14430 linux*) haveit=yes;;
14431 esac
14432 fi
14433 fi
14434 if test -z "$haveit"; then
14435 haveit=
14436 for x in $LDFLAGS $LIBIPT; do
14437
14438 acl_save_prefix="$prefix"
14439 prefix="$acl_final_prefix"
14440 acl_save_exec_prefix="$exec_prefix"
14441 exec_prefix="$acl_final_exec_prefix"
14442 eval x=\"$x\"
14443 exec_prefix="$acl_save_exec_prefix"
14444 prefix="$acl_save_prefix"
14445
14446 if test "X$x" = "X-L$additional_libdir"; then
14447 haveit=yes
14448 break
14449 fi
14450 done
14451 if test -z "$haveit"; then
14452 if test -d "$additional_libdir"; then
14453 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14454 fi
14455 fi
14456 haveit=
14457 for x in $LDFLAGS $LTLIBIPT; do
14458
14459 acl_save_prefix="$prefix"
14460 prefix="$acl_final_prefix"
14461 acl_save_exec_prefix="$exec_prefix"
14462 exec_prefix="$acl_final_exec_prefix"
14463 eval x=\"$x\"
14464 exec_prefix="$acl_save_exec_prefix"
14465 prefix="$acl_save_prefix"
14466
14467 if test "X$x" = "X-L$additional_libdir"; then
14468 haveit=yes
14469 break
14470 fi
14471 done
14472 if test -z "$haveit"; then
14473 if test -d "$additional_libdir"; then
14474 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14475 fi
14476 fi
14477 fi
14478 fi
14479 ;;
14480 -R*)
14481 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14482 if test "$enable_rpath" != no; then
14483 haveit=
14484 for x in $rpathdirs; do
14485 if test "X$x" = "X$dir"; then
14486 haveit=yes
14487 break
14488 fi
14489 done
14490 if test -z "$haveit"; then
14491 rpathdirs="$rpathdirs $dir"
14492 fi
14493 haveit=
14494 for x in $ltrpathdirs; do
14495 if test "X$x" = "X$dir"; then
14496 haveit=yes
14497 break
14498 fi
14499 done
14500 if test -z "$haveit"; then
14501 ltrpathdirs="$ltrpathdirs $dir"
14502 fi
14503 fi
14504 ;;
14505 -l*)
14506 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14507 ;;
14508 *.la)
14509 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14510 ;;
14511 *)
14512 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14513 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14514 ;;
14515 esac
14516 done
14517 fi
14518 else
14519 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14520 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14521 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14522 else
14523 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14524 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14525 fi
14526 fi
14527 fi
14528 fi
14529 done
14530 done
14531 if test "X$rpathdirs" != "X"; then
14532 if test -n "$hardcode_libdir_separator"; then
14533 alldirs=
14534 for found_dir in $rpathdirs; do
14535 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14536 done
14537 acl_save_libdir="$libdir"
14538 libdir="$alldirs"
14539 eval flag=\"$hardcode_libdir_flag_spec\"
14540 libdir="$acl_save_libdir"
14541 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14542 else
14543 for found_dir in $rpathdirs; do
14544 acl_save_libdir="$libdir"
14545 libdir="$found_dir"
14546 eval flag=\"$hardcode_libdir_flag_spec\"
14547 libdir="$acl_save_libdir"
14548 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14549 done
14550 fi
14551 fi
14552 if test "X$ltrpathdirs" != "X"; then
14553 for found_dir in $ltrpathdirs; do
14554 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14555 done
14556 fi
14557
14558
14559 ac_save_CPPFLAGS="$CPPFLAGS"
14560
14561 for element in $INCIPT; do
14562 haveit=
14563 for x in $CPPFLAGS; do
14564
14565 acl_save_prefix="$prefix"
14566 prefix="$acl_final_prefix"
14567 acl_save_exec_prefix="$exec_prefix"
14568 exec_prefix="$acl_final_exec_prefix"
14569 eval x=\"$x\"
14570 exec_prefix="$acl_save_exec_prefix"
14571 prefix="$acl_save_prefix"
14572
14573 if test "X$x" = "X$element"; then
14574 haveit=yes
14575 break
14576 fi
14577 done
14578 if test -z "$haveit"; then
14579 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14580 fi
14581 done
14582
14583
14584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14585 $as_echo_n "checking for libipt... " >&6; }
14586 if ${ac_cv_libipt+:} false; then :
14587 $as_echo_n "(cached) " >&6
14588 else
14589
14590 ac_save_LIBS="$LIBS"
14591 LIBS="$LIBS $LIBIPT"
14592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14593 /* end confdefs.h. */
14594 #include "intel-pt.h"
14595 int
14596 main ()
14597 {
14598 pt_insn_alloc_decoder (0);
14599 ;
14600 return 0;
14601 }
14602 _ACEOF
14603 if ac_fn_c_try_link "$LINENO"; then :
14604 ac_cv_libipt=yes
14605 else
14606 ac_cv_libipt=no
14607 fi
14608 rm -f core conftest.err conftest.$ac_objext \
14609 conftest$ac_exeext conftest.$ac_ext
14610 LIBS="$ac_save_LIBS"
14611
14612 fi
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14614 $as_echo "$ac_cv_libipt" >&6; }
14615 if test "$ac_cv_libipt" = yes; then
14616 HAVE_LIBIPT=yes
14617
14618 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14619
14620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14621 $as_echo_n "checking how to link with libipt... " >&6; }
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14623 $as_echo "$LIBIPT" >&6; }
14624 else
14625 HAVE_LIBIPT=no
14626 CPPFLAGS="$ac_save_CPPFLAGS"
14627 LIBIPT=
14628 LTLIBIPT=
14629 fi
14630
14631
14632
14633
14634
14635
14636 if test "$HAVE_LIBIPT" != yes; then
14637 if test "$with_intel_pt" = yes; then
14638 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14639 else
14640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14641 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14642 fi
14643 else
14644 save_LIBS=$LIBS
14645 LIBS="$LIBS $LIBIPT"
14646 for ac_func in pt_insn_event
14647 do :
14648 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14649 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
14650 cat >>confdefs.h <<_ACEOF
14651 #define HAVE_PT_INSN_EVENT 1
14652 _ACEOF
14653
14654 fi
14655 done
14656
14657 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14658 "
14659 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
14660
14661 cat >>confdefs.h <<_ACEOF
14662 #define HAVE_STRUCT_PT_INSN_ENABLED 1
14663 _ACEOF
14664
14665
14666 fi
14667 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14668 "
14669 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14670
14671 cat >>confdefs.h <<_ACEOF
14672 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
14673 _ACEOF
14674
14675
14676 fi
14677
14678 LIBS=$save_LIBS
14679 fi
14680 fi
14681
14682 if test "$ac_cv_header_sys_procfs_h" = yes; then
14683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14684 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14685 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14686 $as_echo_n "(cached) " >&6
14687 else
14688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14689 /* end confdefs.h. */
14690
14691 #define _SYSCALL32
14692 /* Needed for new procfs interface on sparc-solaris. */
14693 #define _STRUCTURED_PROC 1
14694 #include <sys/procfs.h>
14695 int
14696 main ()
14697 {
14698 gregset_t avar
14699 ;
14700 return 0;
14701 }
14702 _ACEOF
14703 if ac_fn_c_try_compile "$LINENO"; then :
14704 bfd_cv_have_sys_procfs_type_gregset_t=yes
14705 else
14706 bfd_cv_have_sys_procfs_type_gregset_t=no
14707
14708 fi
14709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14710 fi
14711
14712 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14713
14714 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14715
14716 fi
14717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14718 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14719
14720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14721 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14722 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14723 $as_echo_n "(cached) " >&6
14724 else
14725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14726 /* end confdefs.h. */
14727
14728 #define _SYSCALL32
14729 /* Needed for new procfs interface on sparc-solaris. */
14730 #define _STRUCTURED_PROC 1
14731 #include <sys/procfs.h>
14732 int
14733 main ()
14734 {
14735 fpregset_t avar
14736 ;
14737 return 0;
14738 }
14739 _ACEOF
14740 if ac_fn_c_try_compile "$LINENO"; then :
14741 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14742 else
14743 bfd_cv_have_sys_procfs_type_fpregset_t=no
14744
14745 fi
14746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14747 fi
14748
14749 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14750
14751 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14752
14753 fi
14754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14755 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14756
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14758 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14759 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14760 $as_echo_n "(cached) " >&6
14761 else
14762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14763 /* end confdefs.h. */
14764
14765 #define _SYSCALL32
14766 /* Needed for new procfs interface on sparc-solaris. */
14767 #define _STRUCTURED_PROC 1
14768 #include <sys/procfs.h>
14769 int
14770 main ()
14771 {
14772 prgregset_t avar
14773 ;
14774 return 0;
14775 }
14776 _ACEOF
14777 if ac_fn_c_try_compile "$LINENO"; then :
14778 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14779 else
14780 bfd_cv_have_sys_procfs_type_prgregset_t=no
14781
14782 fi
14783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14784 fi
14785
14786 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14787
14788 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14789
14790 fi
14791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14792 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14793
14794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14795 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14796 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14797 $as_echo_n "(cached) " >&6
14798 else
14799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14800 /* end confdefs.h. */
14801
14802 #define _SYSCALL32
14803 /* Needed for new procfs interface on sparc-solaris. */
14804 #define _STRUCTURED_PROC 1
14805 #include <sys/procfs.h>
14806 int
14807 main ()
14808 {
14809 prfpregset_t avar
14810 ;
14811 return 0;
14812 }
14813 _ACEOF
14814 if ac_fn_c_try_compile "$LINENO"; then :
14815 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14816 else
14817 bfd_cv_have_sys_procfs_type_prfpregset_t=no
14818
14819 fi
14820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14821 fi
14822
14823 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14824
14825 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14826
14827 fi
14828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14829 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14830
14831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14832 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14833 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14834 $as_echo_n "(cached) " >&6
14835 else
14836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14837 /* end confdefs.h. */
14838
14839 #define _SYSCALL32
14840 /* Needed for new procfs interface on sparc-solaris. */
14841 #define _STRUCTURED_PROC 1
14842 #include <sys/procfs.h>
14843 int
14844 main ()
14845 {
14846 prgregset32_t avar
14847 ;
14848 return 0;
14849 }
14850 _ACEOF
14851 if ac_fn_c_try_compile "$LINENO"; then :
14852 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14853 else
14854 bfd_cv_have_sys_procfs_type_prgregset32_t=no
14855
14856 fi
14857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14858 fi
14859
14860 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14861
14862 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14863
14864 fi
14865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14866 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14867
14868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14869 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14870 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14871 $as_echo_n "(cached) " >&6
14872 else
14873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14874 /* end confdefs.h. */
14875
14876 #define _SYSCALL32
14877 /* Needed for new procfs interface on sparc-solaris. */
14878 #define _STRUCTURED_PROC 1
14879 #include <sys/procfs.h>
14880 int
14881 main ()
14882 {
14883 lwpid_t avar
14884 ;
14885 return 0;
14886 }
14887 _ACEOF
14888 if ac_fn_c_try_compile "$LINENO"; then :
14889 bfd_cv_have_sys_procfs_type_lwpid_t=yes
14890 else
14891 bfd_cv_have_sys_procfs_type_lwpid_t=no
14892
14893 fi
14894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14895 fi
14896
14897 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14898
14899 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14900
14901 fi
14902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14903 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14904
14905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14906 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14907 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14908 $as_echo_n "(cached) " >&6
14909 else
14910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14911 /* end confdefs.h. */
14912
14913 #define _SYSCALL32
14914 /* Needed for new procfs interface on sparc-solaris. */
14915 #define _STRUCTURED_PROC 1
14916 #include <sys/procfs.h>
14917 int
14918 main ()
14919 {
14920 psaddr_t avar
14921 ;
14922 return 0;
14923 }
14924 _ACEOF
14925 if ac_fn_c_try_compile "$LINENO"; then :
14926 bfd_cv_have_sys_procfs_type_psaddr_t=yes
14927 else
14928 bfd_cv_have_sys_procfs_type_psaddr_t=no
14929
14930 fi
14931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14932 fi
14933
14934 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14935
14936 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14937
14938 fi
14939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14940 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14941
14942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14943 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14944 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14945 $as_echo_n "(cached) " >&6
14946 else
14947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14948 /* end confdefs.h. */
14949
14950 #define _SYSCALL32
14951 /* Needed for new procfs interface on sparc-solaris. */
14952 #define _STRUCTURED_PROC 1
14953 #include <sys/procfs.h>
14954 int
14955 main ()
14956 {
14957 elf_fpregset_t avar
14958 ;
14959 return 0;
14960 }
14961 _ACEOF
14962 if ac_fn_c_try_compile "$LINENO"; then :
14963 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14964 else
14965 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14966
14967 fi
14968 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14969 fi
14970
14971 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14972
14973 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14974
14975 fi
14976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14977 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14978
14979 fi
14980
14981
14982 # Check the return and argument types of ptrace.
14983
14984
14985 for ac_header in sys/ptrace.h ptrace.h
14986 do :
14987 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14988 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14989 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14990 cat >>confdefs.h <<_ACEOF
14991 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14992 _ACEOF
14993
14994 fi
14995
14996 done
14997
14998
14999 gdb_ptrace_headers='
15000 #include <sys/types.h>
15001 #if HAVE_SYS_PTRACE_H
15002 # include <sys/ptrace.h>
15003 #endif
15004 #if HAVE_UNISTD_H
15005 # include <unistd.h>
15006 #endif
15007 '
15008
15009 # Check return type. Varargs (used on GNU/Linux) conflict with the
15010 # empty argument list, so check for that explicitly.
15011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15012 $as_echo_n "checking return type of ptrace... " >&6; }
15013 if ${gdb_cv_func_ptrace_ret+:} false; then :
15014 $as_echo_n "(cached) " >&6
15015 else
15016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15017 /* end confdefs.h. */
15018 $gdb_ptrace_headers
15019 int
15020 main ()
15021 {
15022 extern long ptrace (enum __ptrace_request, ...);
15023 ;
15024 return 0;
15025 }
15026 _ACEOF
15027 if ac_fn_c_try_compile "$LINENO"; then :
15028 gdb_cv_func_ptrace_ret='long'
15029 else
15030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15031 /* end confdefs.h. */
15032 $gdb_ptrace_headers
15033 int
15034 main ()
15035 {
15036 extern int ptrace ();
15037 ;
15038 return 0;
15039 }
15040 _ACEOF
15041 if ac_fn_c_try_compile "$LINENO"; then :
15042 gdb_cv_func_ptrace_ret='int'
15043 else
15044 gdb_cv_func_ptrace_ret='long'
15045 fi
15046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15047 fi
15048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15049 fi
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15051 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15052
15053 cat >>confdefs.h <<_ACEOF
15054 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15055 _ACEOF
15056
15057 # Check argument types.
15058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15059 $as_echo_n "checking types of arguments for ptrace... " >&6; }
15060 if ${gdb_cv_func_ptrace_args+:} false; then :
15061 $as_echo_n "(cached) " >&6
15062 else
15063
15064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15065 /* end confdefs.h. */
15066 $gdb_ptrace_headers
15067 int
15068 main ()
15069 {
15070 extern long ptrace (enum __ptrace_request, ...);
15071 ;
15072 return 0;
15073 }
15074 _ACEOF
15075 if ac_fn_c_try_compile "$LINENO"; then :
15076 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15077 else
15078
15079 for gdb_arg1 in 'int' 'long'; do
15080 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15081 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15082 for gdb_arg4 in 'int' 'long' 'void *'; do
15083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15084 /* end confdefs.h. */
15085 $gdb_ptrace_headers
15086 int
15087 main ()
15088 {
15089
15090 extern $gdb_cv_func_ptrace_ret
15091 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15092
15093 ;
15094 return 0;
15095 }
15096 _ACEOF
15097 if ac_fn_c_try_compile "$LINENO"; then :
15098 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15099 break 4;
15100 fi
15101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15102 for gdb_arg5 in 'int *' 'int' 'long'; do
15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15104 /* end confdefs.h. */
15105 $gdb_ptrace_headers
15106 int
15107 main ()
15108 {
15109
15110 extern $gdb_cv_func_ptrace_ret
15111 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15112
15113 ;
15114 return 0;
15115 }
15116 _ACEOF
15117 if ac_fn_c_try_compile "$LINENO"; then :
15118
15119 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15120 break 5;
15121 fi
15122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15123 done
15124 done
15125 done
15126 done
15127 done
15128 # Provide a safe default value.
15129 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15130
15131 fi
15132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15133 fi
15134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15135 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15136 ac_save_IFS=$IFS; IFS=','
15137 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15138 IFS=$ac_save_IFS
15139 shift
15140
15141 cat >>confdefs.h <<_ACEOF
15142 #define PTRACE_TYPE_ARG1 $1
15143 _ACEOF
15144
15145
15146 cat >>confdefs.h <<_ACEOF
15147 #define PTRACE_TYPE_ARG3 $3
15148 _ACEOF
15149
15150
15151 cat >>confdefs.h <<_ACEOF
15152 #define PTRACE_TYPE_ARG4 $4
15153 _ACEOF
15154
15155 if test -n "$5"; then
15156
15157 cat >>confdefs.h <<_ACEOF
15158 #define PTRACE_TYPE_ARG5 $5
15159 _ACEOF
15160
15161 fi
15162
15163
15164 if test "$cross_compiling" = no; then
15165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15166 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15167 if ${ac_cv_func_setpgrp_void+:} false; then :
15168 $as_echo_n "(cached) " >&6
15169 else
15170 if test "$cross_compiling" = yes; then :
15171 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15172 else
15173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15174 /* end confdefs.h. */
15175 $ac_includes_default
15176 int
15177 main ()
15178 {
15179 /* If this system has a BSD-style setpgrp which takes arguments,
15180 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15181 exit successfully. */
15182 return setpgrp (1,1) != -1;
15183 ;
15184 return 0;
15185 }
15186 _ACEOF
15187 if ac_fn_c_try_run "$LINENO"; then :
15188 ac_cv_func_setpgrp_void=no
15189 else
15190 ac_cv_func_setpgrp_void=yes
15191 fi
15192 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15193 conftest.$ac_objext conftest.beam conftest.$ac_ext
15194 fi
15195
15196 fi
15197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15198 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15199 if test $ac_cv_func_setpgrp_void = yes; then
15200
15201 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15202
15203 fi
15204
15205 else
15206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15207 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15208 if ${ac_cv_func_setpgrp_void+:} false; then :
15209 $as_echo_n "(cached) " >&6
15210 else
15211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15212 /* end confdefs.h. */
15213
15214 #include <unistd.h>
15215
15216 int
15217 main ()
15218 {
15219
15220 if (setpgrp(1,1) == -1)
15221 exit (0);
15222 else
15223 exit (1);
15224
15225 ;
15226 return 0;
15227 }
15228 _ACEOF
15229 if ac_fn_c_try_compile "$LINENO"; then :
15230 ac_cv_func_setpgrp_void=no
15231 else
15232 ac_cv_func_setpgrp_void=yes
15233 fi
15234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15235 fi
15236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15237 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15238 if test "$ac_cv_func_setpgrp_void" = yes; then
15239 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15240
15241 fi
15242 fi
15243
15244 # Assume we'll default to using the included libiberty regex.
15245 gdb_use_included_regex=yes
15246
15247 # However, if the system regex is GNU regex, then default to *not*
15248 # using the included regex.
15249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15250 $as_echo_n "checking for GNU regex... " >&6; }
15251 if ${gdb_cv_have_gnu_regex+:} false; then :
15252 $as_echo_n "(cached) " >&6
15253 else
15254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15255 /* end confdefs.h. */
15256 #include <gnu-versions.h>
15257 int
15258 main ()
15259 {
15260 #define REGEX_INTERFACE_VERSION 1
15261 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15262 # error "Version mismatch"
15263 #endif
15264 ;
15265 return 0;
15266 }
15267 _ACEOF
15268 if ac_fn_c_try_compile "$LINENO"; then :
15269 gdb_cv_have_gnu_regex=yes
15270 else
15271 gdb_cv_have_gnu_regex=no
15272 fi
15273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15274 fi
15275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15276 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
15277 if test "$gdb_cv_have_gnu_regex" = yes; then
15278 gdb_use_included_regex=no
15279 fi
15280
15281
15282 # Check whether --with-included-regex was given.
15283 if test "${with_included_regex+set}" = set; then :
15284 withval=$with_included_regex; gdb_with_regex=$withval
15285 else
15286 gdb_with_regex=$gdb_use_included_regex
15287 fi
15288
15289 if test "$gdb_with_regex" = yes; then
15290
15291 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
15292
15293 fi
15294
15295 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15296 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15297 #include <sys/proc.h>
15298
15299 "
15300 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15301
15302 cat >>confdefs.h <<_ACEOF
15303 #define HAVE_STRUCT_THREAD_TD_PCB 1
15304 _ACEOF
15305
15306
15307 fi
15308
15309
15310 # See if <sys/lwp.h> defines `struct lwp`.
15311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15312 $as_echo_n "checking for struct lwp... " >&6; }
15313 if ${gdb_cv_struct_lwp+:} false; then :
15314 $as_echo_n "(cached) " >&6
15315 else
15316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15317 /* end confdefs.h. */
15318 #include <sys/param.h>
15319 #define _KMEMUSER
15320 #include <sys/lwp.h>
15321 int
15322 main ()
15323 {
15324 struct lwp l;
15325 ;
15326 return 0;
15327 }
15328 _ACEOF
15329 if ac_fn_c_try_compile "$LINENO"; then :
15330 gdb_cv_struct_lwp=yes
15331 else
15332 gdb_cv_struct_lwp=no
15333 fi
15334 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15335 fi
15336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15337 $as_echo "$gdb_cv_struct_lwp" >&6; }
15338 if test "$gdb_cv_struct_lwp" = yes; then
15339
15340 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15341
15342 fi
15343
15344 # See if <machine/reg.h> degines `struct reg'.
15345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15346 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15347 if ${gdb_cv_struct_reg+:} false; then :
15348 $as_echo_n "(cached) " >&6
15349 else
15350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15351 /* end confdefs.h. */
15352 #include <sys/types.h>
15353 #include <machine/reg.h>
15354 int
15355 main ()
15356 {
15357 struct reg r;
15358 ;
15359 return 0;
15360 }
15361 _ACEOF
15362 if ac_fn_c_try_compile "$LINENO"; then :
15363 gdb_cv_struct_reg=yes
15364 else
15365 gdb_cv_struct_reg=no
15366 fi
15367 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15368 fi
15369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15370 $as_echo "$gdb_cv_struct_reg" >&6; }
15371 if test "$gdb_cv_struct_reg" = yes; then
15372
15373 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15374
15375 fi
15376
15377 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15378 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15379 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15380 #include <machine/reg.h>
15381 "
15382 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15383
15384 cat >>confdefs.h <<_ACEOF
15385 #define HAVE_STRUCT_REG_R_FS 1
15386 _ACEOF
15387
15388
15389 fi
15390 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15391 #include <machine/reg.h>
15392 "
15393 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15394
15395 cat >>confdefs.h <<_ACEOF
15396 #define HAVE_STRUCT_REG_R_GS 1
15397 _ACEOF
15398
15399
15400 fi
15401
15402
15403 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15405 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15406 if ${gdb_cv_have_ptrace_getregs+:} false; then :
15407 $as_echo_n "(cached) " >&6
15408 else
15409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15410 /* end confdefs.h. */
15411 #include <sys/ptrace.h>
15412 int
15413 main ()
15414 {
15415 PTRACE_GETREGS;
15416 ;
15417 return 0;
15418 }
15419 _ACEOF
15420 if ac_fn_c_try_compile "$LINENO"; then :
15421 gdb_cv_have_ptrace_getregs=yes
15422 else
15423 gdb_cv_have_ptrace_getregs=no
15424 fi
15425 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15426 fi
15427
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15429 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15430 if test "$gdb_cv_have_ptrace_getregs" = yes; then
15431
15432 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15433
15434 fi
15435
15436 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15438 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15439 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15440 $as_echo_n "(cached) " >&6
15441 else
15442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15443 /* end confdefs.h. */
15444 #include <sys/ptrace.h>
15445 int
15446 main ()
15447 {
15448 PTRACE_GETFPXREGS;
15449 ;
15450 return 0;
15451 }
15452 _ACEOF
15453 if ac_fn_c_try_compile "$LINENO"; then :
15454 gdb_cv_have_ptrace_getfpxregs=yes
15455 else
15456 gdb_cv_have_ptrace_getfpxregs=no
15457 fi
15458 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15459 fi
15460
15461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15462 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15463 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
15464
15465 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
15466
15467 fi
15468
15469 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15471 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
15472 if ${gdb_cv_have_pt_getdbregs+:} false; then :
15473 $as_echo_n "(cached) " >&6
15474 else
15475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15476 /* end confdefs.h. */
15477 #include <sys/types.h>
15478 #include <sys/ptrace.h>
15479 int
15480 main ()
15481 {
15482 PT_GETDBREGS;
15483 ;
15484 return 0;
15485 }
15486 _ACEOF
15487 if ac_fn_c_try_compile "$LINENO"; then :
15488 gdb_cv_have_pt_getdbregs=yes
15489 else
15490 gdb_cv_have_pt_getdbregs=no
15491 fi
15492 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15493 fi
15494
15495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15496 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15497 if test "$gdb_cv_have_pt_getdbregs" = yes; then
15498
15499 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
15500
15501 fi
15502
15503 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15505 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15506 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
15507 $as_echo_n "(cached) " >&6
15508 else
15509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15510 /* end confdefs.h. */
15511 #include <sys/types.h>
15512 #include <sys/ptrace.h>
15513 int
15514 main ()
15515 {
15516 PT_GETXMMREGS;
15517 ;
15518 return 0;
15519 }
15520 _ACEOF
15521 if ac_fn_c_try_compile "$LINENO"; then :
15522 gdb_cv_have_pt_getxmmregs=yes
15523 else
15524 gdb_cv_have_pt_getxmmregs=no
15525 fi
15526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15527 fi
15528
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15530 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15531 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
15532
15533 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
15534
15535 fi
15536
15537 # See if <sys/ptrace.h> supports LWP names on FreeBSD
15538 # Older FreeBSD versions don't have the pl_tdname member of
15539 # `struct ptrace_lwpinfo'.
15540 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15541 "
15542 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
15543
15544 cat >>confdefs.h <<_ACEOF
15545 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15546 _ACEOF
15547
15548
15549 fi
15550
15551
15552 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15553 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15554 # FreeBSD 10.3.
15555 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h>
15556 "
15557 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15558
15559 cat >>confdefs.h <<_ACEOF
15560 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15561 _ACEOF
15562
15563
15564 fi
15565
15566
15567 # Check if the compiler supports the `long long' type.
15568
15569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15570 $as_echo_n "checking for long long support in compiler... " >&6; }
15571 if ${gdb_cv_c_long_long+:} false; then :
15572 $as_echo_n "(cached) " >&6
15573 else
15574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15575 /* end confdefs.h. */
15576 extern long long foo;
15577 int
15578 main ()
15579 {
15580 switch (foo & 2) { case 0: return 1; }
15581 ;
15582 return 0;
15583 }
15584 _ACEOF
15585 if ac_fn_c_try_compile "$LINENO"; then :
15586 gdb_cv_c_long_long=yes
15587 else
15588 gdb_cv_c_long_long=no
15589 fi
15590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15591 fi
15592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15593 $as_echo "$gdb_cv_c_long_long" >&6; }
15594 if test "$gdb_cv_c_long_long" != yes; then
15595 # libdecnumber requires long long.
15596 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
15597 fi
15598
15599 # Check if the compiler and runtime support printing long longs.
15600
15601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15602 $as_echo_n "checking for long long support in printf... " >&6; }
15603 if ${gdb_cv_printf_has_long_long+:} false; then :
15604 $as_echo_n "(cached) " >&6
15605 else
15606 if test "$cross_compiling" = yes; then :
15607 gdb_cv_printf_has_long_long=no
15608 else
15609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15610 /* end confdefs.h. */
15611 $ac_includes_default
15612 int
15613 main ()
15614 {
15615 char buf[32];
15616 long long l = 0;
15617 l = (l << 16) + 0x0123;
15618 l = (l << 16) + 0x4567;
15619 l = (l << 16) + 0x89ab;
15620 l = (l << 16) + 0xcdef;
15621 sprintf (buf, "0x%016llx", l);
15622 return (strcmp ("0x0123456789abcdef", buf));
15623 ;
15624 return 0;
15625 }
15626 _ACEOF
15627 if ac_fn_c_try_run "$LINENO"; then :
15628 gdb_cv_printf_has_long_long=yes
15629 else
15630 gdb_cv_printf_has_long_long=no
15631 fi
15632 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15633 conftest.$ac_objext conftest.beam conftest.$ac_ext
15634 fi
15635
15636 fi
15637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15638 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15639 if test "$gdb_cv_printf_has_long_long" = yes; then
15640
15641 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15642
15643 fi
15644
15645 # Check if the compiler and runtime support printing decfloats.
15646
15647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15648 $as_echo_n "checking for decfloat support in printf... " >&6; }
15649 if ${gdb_cv_printf_has_decfloat+:} false; then :
15650 $as_echo_n "(cached) " >&6
15651 else
15652 if test "$cross_compiling" = yes; then :
15653 gdb_cv_printf_has_decfloat=no
15654 else
15655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15656 /* end confdefs.h. */
15657 $ac_includes_default
15658 int
15659 main ()
15660 {
15661 char buf[64];
15662 _Decimal32 d32 = 1.2345df;
15663 _Decimal64 d64 = 1.2345dd;
15664 _Decimal128 d128 = 1.2345dl;
15665 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15666 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15667 ;
15668 return 0;
15669 }
15670 _ACEOF
15671 if ac_fn_c_try_run "$LINENO"; then :
15672 gdb_cv_printf_has_decfloat=yes
15673 else
15674 gdb_cv_printf_has_decfloat=no
15675 fi
15676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15677 conftest.$ac_objext conftest.beam conftest.$ac_ext
15678 fi
15679
15680 fi
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15682 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
15683 if test "$gdb_cv_printf_has_decfloat" = yes; then
15684
15685 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
15686
15687 fi
15688
15689 # Check if the compiler supports the `long double' type. We can't use
15690 # AC_C_LONG_DOUBLE because that one does additional checks on the
15691 # constants defined in <float.h> that fail on some systems,
15692 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
15693
15694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15695 $as_echo_n "checking for long double support in compiler... " >&6; }
15696 if ${gdb_cv_c_long_double+:} false; then :
15697 $as_echo_n "(cached) " >&6
15698 else
15699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15700 /* end confdefs.h. */
15701 long double foo;
15702 _ACEOF
15703 if ac_fn_c_try_compile "$LINENO"; then :
15704 gdb_cv_c_long_double=yes
15705 else
15706 gdb_cv_c_long_double=no
15707 fi
15708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15709 fi
15710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15711 $as_echo "$gdb_cv_c_long_double" >&6; }
15712 if test "$gdb_cv_c_long_double" = yes; then
15713
15714 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
15715
15716 fi
15717
15718 # Check if the compiler and runtime support printing long doubles.
15719
15720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15721 $as_echo_n "checking for long double support in printf... " >&6; }
15722 if ${gdb_cv_printf_has_long_double+:} false; then :
15723 $as_echo_n "(cached) " >&6
15724 else
15725 if test "$cross_compiling" = yes; then :
15726 gdb_cv_printf_has_long_double=no
15727 else
15728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15729 /* end confdefs.h. */
15730 $ac_includes_default
15731 int
15732 main ()
15733 {
15734 char buf[16];
15735 long double f = 3.141592653;
15736 sprintf (buf, "%Lg", f);
15737 return (strncmp ("3.14159", buf, 7));
15738 ;
15739 return 0;
15740 }
15741 _ACEOF
15742 if ac_fn_c_try_run "$LINENO"; then :
15743 gdb_cv_printf_has_long_double=yes
15744 else
15745 gdb_cv_printf_has_long_double=no
15746 fi
15747 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15748 conftest.$ac_objext conftest.beam conftest.$ac_ext
15749 fi
15750
15751 fi
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15753 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
15754 if test "$gdb_cv_printf_has_long_double" = yes; then
15755
15756 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
15757
15758 fi
15759
15760 # Check if the compiler and runtime support scanning long doubles.
15761
15762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15763 $as_echo_n "checking for long double support in scanf... " >&6; }
15764 if ${gdb_cv_scanf_has_long_double+:} false; then :
15765 $as_echo_n "(cached) " >&6
15766 else
15767 if test "$cross_compiling" = yes; then :
15768 gdb_cv_scanf_has_long_double=no
15769 else
15770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15771 /* end confdefs.h. */
15772 #include <stdio.h>
15773 int
15774 main ()
15775 {
15776 char *buf = "3.141592653";
15777 long double f = 0;
15778 sscanf (buf, "%Lg", &f);
15779 return !(f > 3.14159 && f < 3.14160);
15780 ;
15781 return 0;
15782 }
15783 _ACEOF
15784 if ac_fn_c_try_run "$LINENO"; then :
15785 gdb_cv_scanf_has_long_double=yes
15786 else
15787 gdb_cv_scanf_has_long_double=no
15788 fi
15789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15790 conftest.$ac_objext conftest.beam conftest.$ac_ext
15791 fi
15792
15793 fi
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15795 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
15796 if test "$gdb_cv_scanf_has_long_double" = yes; then
15797
15798 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
15799
15800 fi
15801
15802 case ${host_os} in
15803 aix*)
15804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15805 $as_echo_n "checking for -bbigtoc option... " >&6; }
15806 if ${gdb_cv_bigtoc+:} false; then :
15807 $as_echo_n "(cached) " >&6
15808 else
15809
15810 SAVE_LDFLAGS=$LDFLAGS
15811
15812 case $GCC in
15813 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15814 *) gdb_cv_bigtoc=-bbigtoc ;;
15815 esac
15816
15817 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15819 /* end confdefs.h. */
15820
15821 int
15822 main ()
15823 {
15824 int i;
15825 ;
15826 return 0;
15827 }
15828 _ACEOF
15829 if ac_fn_c_try_link "$LINENO"; then :
15830
15831 else
15832 gdb_cv_bigtoc=
15833 fi
15834 rm -f core conftest.err conftest.$ac_objext \
15835 conftest$ac_exeext conftest.$ac_ext
15836 LDFLAGS="${SAVE_LDFLAGS}"
15837
15838 fi
15839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15840 $as_echo "$gdb_cv_bigtoc" >&6; }
15841 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15842 ;;
15843 esac
15844
15845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15846 $as_echo_n "checking for the dynamic export flag... " >&6; }
15847 dynamic_list=false
15848 if test "${gdb_native}" = yes; then
15849 # The dynamically loaded libthread_db needs access to symbols in the gdb
15850 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15851 # may not be supported there.
15852 old_LDFLAGS="$LDFLAGS"
15853 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15854 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15855 LDFLAGS="$LDFLAGS $RDYNAMIC"
15856 if test "${have_libpython}" = no; then
15857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15858 /* end confdefs.h. */
15859
15860 int
15861 main ()
15862 {
15863
15864 ;
15865 return 0;
15866 }
15867 _ACEOF
15868 if ac_fn_c_try_link "$LINENO"; then :
15869 dynamic_list=true
15870 fi
15871 rm -f core conftest.err conftest.$ac_objext \
15872 conftest$ac_exeext conftest.$ac_ext
15873 else
15874 # Workaround http://bugs.python.org/issue4434 where static
15875 # libpythonX.Y.a would get its symbols required for
15876 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15877 # Problem does not happen for the recommended libpythonX.Y.so linkage.
15878
15879 # Note the workaround for Python
15880 # http://bugs.python.org/issue10112 earlier has removed
15881 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15882 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15883 # always pass.
15884 old_CFLAGS="$CFLAGS"
15885 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15886 old_LIBS="$LIBS"
15887 LIBS="$LIBS $PYTHON_LIBS"
15888 old_CPPFLAGS="$CPPFLAGS"
15889 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15890 if test "$cross_compiling" = yes; then :
15891 true
15892 else
15893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15894 /* end confdefs.h. */
15895 #include "Python.h"
15896 int
15897 main ()
15898 {
15899 int err;
15900 Py_Initialize ();
15901 err = PyRun_SimpleString ("import itertools\n");
15902 Py_Finalize ();
15903 return err == 0 ? 0 : 1;
15904 ;
15905 return 0;
15906 }
15907 _ACEOF
15908 if ac_fn_c_try_run "$LINENO"; then :
15909 dynamic_list=true
15910 fi
15911 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15912 conftest.$ac_objext conftest.beam conftest.$ac_ext
15913 fi
15914
15915 LIBS="$old_LIBS"
15916 CFLAGS="$old_CFLAGS"
15917 CPPFLAGS="$old_CPPFLAGS"
15918 fi
15919 LDFLAGS="$old_LDFLAGS"
15920 fi
15921 if $dynamic_list; then
15922 found="-Wl,--dynamic-list"
15923 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15924 else
15925 found="-rdynamic"
15926 RDYNAMIC="-rdynamic"
15927 fi
15928
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15930 $as_echo "$found" >&6; }
15931
15932
15933 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
15934 case ${host_os} in
15935 aix*)
15936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15937 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15938 if ${gdb_cv_have_aix_thread_debug+:} false; then :
15939 $as_echo_n "(cached) " >&6
15940 else
15941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15942 /* end confdefs.h. */
15943 #include <sys/pthdebug.h>
15944 int
15945 main ()
15946 {
15947 #ifndef PTHDB_VERSION_3
15948 #error
15949 #endif
15950 ;
15951 return 0;
15952 }
15953 _ACEOF
15954 if ac_fn_c_try_compile "$LINENO"; then :
15955 gdb_cv_have_aix_thread_debug=yes
15956 else
15957 gdb_cv_have_aix_thread_debug=no
15958 fi
15959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15960 fi
15961
15962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15963 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15964 if test "$gdb_cv_have_aix_thread_debug" = yes; then
15965 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15966 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15967 LIBS="$LIBS -lpthdebug"
15968
15969 # Older versions of AIX do not provide the declaration for
15970 # the getthrds function (it appears that it was introduced
15971 # with AIX 6.x).
15972 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15973 "
15974 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15975 ac_have_decl=1
15976 else
15977 ac_have_decl=0
15978 fi
15979
15980 cat >>confdefs.h <<_ACEOF
15981 #define HAVE_DECL_GETTHRDS $ac_have_decl
15982 _ACEOF
15983
15984 fi
15985 ;;
15986 esac
15987
15988 fi
15989
15990 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15992 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15993 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15994 $as_echo_n "(cached) " >&6
15995 else
15996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15997 /* end confdefs.h. */
15998 #include <thread_db.h>
15999 int
16000 main ()
16001 {
16002 int i = TD_NOTALLOC;
16003 ;
16004 return 0;
16005 }
16006 _ACEOF
16007 if ac_fn_c_try_compile "$LINENO"; then :
16008 gdb_cv_thread_db_h_has_td_notalloc=yes
16009 else
16010 gdb_cv_thread_db_h_has_td_notalloc=no
16011
16012 fi
16013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16014
16015 fi
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16017 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16019 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16020 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16021 $as_echo_n "(cached) " >&6
16022 else
16023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16024 /* end confdefs.h. */
16025 #include <thread_db.h>
16026 int
16027 main ()
16028 {
16029 int i = TD_VERSION;
16030 ;
16031 return 0;
16032 }
16033 _ACEOF
16034 if ac_fn_c_try_compile "$LINENO"; then :
16035 gdb_cv_thread_db_h_has_td_version=yes
16036 else
16037 gdb_cv_thread_db_h_has_td_version=no
16038
16039 fi
16040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16041
16042 fi
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16044 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16046 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16047 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16048 $as_echo_n "(cached) " >&6
16049 else
16050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16051 /* end confdefs.h. */
16052 #include <thread_db.h>
16053 int
16054 main ()
16055 {
16056 int i = TD_NOTLS;
16057 ;
16058 return 0;
16059 }
16060 _ACEOF
16061 if ac_fn_c_try_compile "$LINENO"; then :
16062 gdb_cv_thread_db_h_has_td_notls=yes
16063 else
16064 gdb_cv_thread_db_h_has_td_notls=no
16065
16066 fi
16067 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16068
16069 fi
16070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16071 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16072 fi
16073 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16074
16075 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16076
16077 fi
16078 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16079
16080 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16081
16082 fi
16083 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16084
16085 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16086
16087 fi
16088
16089 case $host_os in
16090 go32* | *djgpp*)
16091 gdbinit=gdb.ini
16092 ;;
16093 *)
16094 gdbinit=.gdbinit
16095 ;;
16096 esac
16097
16098 cat >>confdefs.h <<_ACEOF
16099 #define GDBINIT "$gdbinit"
16100 _ACEOF
16101
16102
16103
16104 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16105 # except that the argument to --with-sysroot is optional.
16106 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16107 if test "x$with_sysroot" = xyes; then
16108 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16109 fi
16110
16111 # Check whether --with-sysroot was given.
16112 if test "${with_sysroot+set}" = set; then :
16113 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16114 else
16115 TARGET_SYSTEM_ROOT=
16116 fi
16117
16118
16119 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16120 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16121 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16122 ac_define_dir=`eval echo $ac_define_dir`
16123
16124 cat >>confdefs.h <<_ACEOF
16125 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16126 _ACEOF
16127
16128
16129
16130
16131 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16132 if test "x$prefix" = xNONE; then
16133 test_prefix=/usr/local
16134 else
16135 test_prefix=$prefix
16136 fi
16137 else
16138 test_prefix=$exec_prefix
16139 fi
16140 value=0
16141 case ${ac_define_dir} in
16142 "${test_prefix}"|"${test_prefix}/"*|\
16143 '${exec_prefix}'|'${exec_prefix}/'*)
16144 value=1
16145 ;;
16146 esac
16147
16148 cat >>confdefs.h <<_ACEOF
16149 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16150 _ACEOF
16151
16152
16153
16154
16155
16156 # Check whether --with-system-gdbinit was given.
16157 if test "${with_system_gdbinit+set}" = set; then :
16158 withval=$with_system_gdbinit;
16159 SYSTEM_GDBINIT=$withval
16160 else
16161 SYSTEM_GDBINIT=
16162 fi
16163
16164
16165 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16166 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16167 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16168 ac_define_dir=`eval echo $ac_define_dir`
16169
16170 cat >>confdefs.h <<_ACEOF
16171 #define SYSTEM_GDBINIT "$ac_define_dir"
16172 _ACEOF
16173
16174
16175
16176
16177 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16178 if test "x$prefix" = xNONE; then
16179 test_prefix=/usr/local
16180 else
16181 test_prefix=$prefix
16182 fi
16183 else
16184 test_prefix=$exec_prefix
16185 fi
16186 value=0
16187 case ${ac_define_dir} in
16188 "${test_prefix}"|"${test_prefix}/"*|\
16189 '${exec_prefix}'|'${exec_prefix}/'*)
16190 value=1
16191 ;;
16192 esac
16193
16194 cat >>confdefs.h <<_ACEOF
16195 #define SYSTEM_GDBINIT_RELOCATABLE $value
16196 _ACEOF
16197
16198
16199
16200
16201
16202 # Check whether --with-system-gdbinit-dir was given.
16203 if test "${with_system_gdbinit_dir+set}" = set; then :
16204 withval=$with_system_gdbinit_dir;
16205 SYSTEM_GDBINIT_DIR=$withval
16206 else
16207 SYSTEM_GDBINIT_DIR=
16208 fi
16209
16210
16211 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16212 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16213 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16214 ac_define_dir=`eval echo $ac_define_dir`
16215
16216 cat >>confdefs.h <<_ACEOF
16217 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16218 _ACEOF
16219
16220
16221
16222
16223 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16224 if test "x$prefix" = xNONE; then
16225 test_prefix=/usr/local
16226 else
16227 test_prefix=$prefix
16228 fi
16229 else
16230 test_prefix=$exec_prefix
16231 fi
16232 value=0
16233 case ${ac_define_dir} in
16234 "${test_prefix}"|"${test_prefix}/"*|\
16235 '${exec_prefix}'|'${exec_prefix}/'*)
16236 value=1
16237 ;;
16238 esac
16239
16240 cat >>confdefs.h <<_ACEOF
16241 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16242 _ACEOF
16243
16244
16245
16246
16247
16248 # Check whether --enable-werror was given.
16249 if test "${enable_werror+set}" = set; then :
16250 enableval=$enable_werror; case "${enableval}" in
16251 yes | y) ERROR_ON_WARNING="yes" ;;
16252 no | n) ERROR_ON_WARNING="no" ;;
16253 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16254 esac
16255 fi
16256
16257
16258 # Enable -Werror by default when using gcc. Turn it off for releases.
16259 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16260 ERROR_ON_WARNING=yes
16261 fi
16262
16263 WERROR_CFLAGS=""
16264 if test "${ERROR_ON_WARNING}" = yes ; then
16265 WERROR_CFLAGS="-Werror"
16266 fi
16267
16268 # The options we'll try to enable.
16269 build_warnings="-Wall -Wpointer-arith \
16270 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16271 -Wno-switch -Wno-char-subscripts \
16272 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16273 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16274 -Wno-mismatched-tags \
16275 -Wno-error=deprecated-register \
16276 -Wsuggest-override \
16277 -Wimplicit-fallthrough=3 \
16278 -Wduplicated-cond \
16279 -Wshadow=local \
16280 -Wdeprecated-copy \
16281 -Wdeprecated-copy-dtor \
16282 -Wredundant-move \
16283 -Wmissing-declarations \
16284 -Wmissing-prototypes \
16285 -Wstrict-null-sentinel \
16286 "
16287
16288 case "${host}" in
16289 *-*-mingw32*)
16290 # Enable -Wno-format by default when using gcc on mingw since many
16291 # GCC versions complain about %I64.
16292 build_warnings="$build_warnings -Wno-format" ;;
16293 *-*-solaris*)
16294 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16295 # doesn't understand.
16296 build_warnings="$build_warnings -Wno-unknown-pragmas"
16297 # Solaris 11 <unistd.h> marks vfork deprecated.
16298 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16299 *)
16300 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16301 # but there's a special case for this below.
16302 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16303 esac
16304
16305 # Check whether --enable-build-warnings was given.
16306 if test "${enable_build_warnings+set}" = set; then :
16307 enableval=$enable_build_warnings; case "${enableval}" in
16308 yes) ;;
16309 no) build_warnings="-w";;
16310 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16311 build_warnings="${build_warnings} ${t}";;
16312 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16313 build_warnings="${t} ${build_warnings}";;
16314 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16315 esac
16316 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16317 echo "Setting compiler warning flags = $build_warnings" 6>&1
16318 fi
16319 fi
16320 # Check whether --enable-gdb-build-warnings was given.
16321 if test "${enable_gdb_build_warnings+set}" = set; then :
16322 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16323 yes) ;;
16324 no) build_warnings="-w";;
16325 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16326 build_warnings="${build_warnings} ${t}";;
16327 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16328 build_warnings="${t} ${build_warnings}";;
16329 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16330 esac
16331 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16332 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16333 fi
16334 fi
16335
16336 # The set of warnings supported by a C++ compiler is not the same as
16337 # of the C compiler.
16338 ac_ext=cpp
16339 ac_cpp='$CXXCPP $CPPFLAGS'
16340 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16341 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16342 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16343
16344
16345 WARN_CFLAGS=""
16346 if test "x${build_warnings}" != x -a "x$GCC" = xyes
16347 then
16348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16349 $as_echo_n "checking compiler warning flags... " >&6; }
16350 # Separate out the -Werror flag as some files just cannot be
16351 # compiled with it enabled.
16352 for w in ${build_warnings}; do
16353 # GCC does not complain about -Wno-unknown-warning. Invert
16354 # and test -Wunknown-warning instead.
16355 case $w in
16356 -Wno-*)
16357 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16358 -Wformat-nonliteral)
16359 # gcc requires -Wformat before -Wformat-nonliteral
16360 # will work, so stick them together.
16361 w="-Wformat $w"
16362 wtest="$w"
16363 ;;
16364 *)
16365 wtest=$w ;;
16366 esac
16367
16368 case $w in
16369 -Werr*) WERROR_CFLAGS=-Werror ;;
16370 *)
16371 # Check whether GCC accepts it.
16372 saved_CFLAGS="$CFLAGS"
16373 CFLAGS="$CFLAGS -Werror $wtest"
16374 saved_CXXFLAGS="$CXXFLAGS"
16375 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16376 if test "x$w" = "x-Wunused-variable"; then
16377 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16378 # fixed in GCC 4.9. This test is derived from the gdb
16379 # source code that triggered this bug in GCC.
16380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16381 /* end confdefs.h. */
16382 struct scoped_restore_base {};
16383 struct scoped_restore_tmpl : public scoped_restore_base {
16384 ~scoped_restore_tmpl() {}
16385 };
16386 int
16387 main ()
16388 {
16389 const scoped_restore_base &b = scoped_restore_tmpl();
16390 ;
16391 return 0;
16392 }
16393 _ACEOF
16394 if ac_fn_cxx_try_compile "$LINENO"; then :
16395 WARN_CFLAGS="${WARN_CFLAGS} $w"
16396 fi
16397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16398 else
16399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16400 /* end confdefs.h. */
16401
16402 int
16403 main ()
16404 {
16405
16406 ;
16407 return 0;
16408 }
16409 _ACEOF
16410 if ac_fn_cxx_try_compile "$LINENO"; then :
16411 WARN_CFLAGS="${WARN_CFLAGS} $w"
16412 fi
16413 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16414 fi
16415 CFLAGS="$saved_CFLAGS"
16416 CXXFLAGS="$saved_CXXFLAGS"
16417 esac
16418 done
16419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16420 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16421 fi
16422
16423
16424
16425 ac_ext=c
16426 ac_cpp='$CPP $CPPFLAGS'
16427 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16428 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16429 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16430
16431
16432
16433 # Check whether --enable-ubsan was given.
16434 if test "${enable_ubsan+set}" = set; then :
16435 enableval=$enable_ubsan;
16436 else
16437 enable_ubsan=no
16438 fi
16439
16440 if test "x$enable_ubsan" = xauto; then
16441 if $development; then
16442 enable_ubsan=yes
16443 fi
16444 fi
16445 ac_ext=cpp
16446 ac_cpp='$CXXCPP $CPPFLAGS'
16447 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16448 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16449 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16450
16451 if test "x$enable_ubsan" = xyes; then
16452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16453 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16454 saved_CXXFLAGS="$CXXFLAGS"
16455 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16457 /* end confdefs.h. */
16458
16459 int
16460 main ()
16461 {
16462
16463 ;
16464 return 0;
16465 }
16466 _ACEOF
16467 if ac_fn_cxx_try_link "$LINENO"; then :
16468 enable_ubsan=yes
16469 else
16470 enable_ubsan=no
16471 fi
16472 rm -f core conftest.err conftest.$ac_objext \
16473 conftest$ac_exeext conftest.$ac_ext
16474 CXXFLAGS="$saved_CXXFLAGS"
16475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16476 $as_echo "$enable_ubsan" >&6; }
16477 if test "x$enable_ubsan" = xyes; then
16478 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16479 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16480 fi
16481 fi
16482 ac_ext=c
16483 ac_cpp='$CPP $CPPFLAGS'
16484 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16485 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16486 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16487
16488
16489
16490 # In the Cygwin environment, we need some additional flags.
16491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16492 $as_echo_n "checking for cygwin... " >&6; }
16493 if ${gdb_cv_os_cygwin+:} false; then :
16494 $as_echo_n "(cached) " >&6
16495 else
16496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16497 /* end confdefs.h. */
16498
16499 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
16500 lose
16501 #endif
16502 _ACEOF
16503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16504 $EGREP "^lose$" >/dev/null 2>&1; then :
16505 gdb_cv_os_cygwin=yes
16506 else
16507 gdb_cv_os_cygwin=no
16508 fi
16509 rm -f conftest*
16510
16511 fi
16512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16513 $as_echo "$gdb_cv_os_cygwin" >&6; }
16514
16515
16516 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
16517 case ${host} in
16518 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16519 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
16520 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
16521 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
16522 esac
16523
16524
16525 # libreadline needs libuser32.a in a cygwin environment
16526 WIN32LIBS=
16527 if test x"$gdb_cv_os_cygwin" = xyes; then
16528 WIN32LIBS="-luser32"
16529 case "${target}" in
16530 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16531 ;;
16532 esac
16533 fi
16534
16535 # The ser-tcp.c module requires sockets.
16536 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
16537 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
16538
16539 # Add ELF support to GDB, but only if BFD includes ELF support.
16540
16541 OLD_CFLAGS=$CFLAGS
16542 OLD_LDFLAGS=$LDFLAGS
16543 OLD_LIBS=$LIBS
16544 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16545 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16546 # always want our bfd.
16547 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16548 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16549 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16550 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16551 LIBS="-lbfd -liberty -lz $intl $LIBS"
16552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16553 $as_echo_n "checking for ELF support in BFD... " >&6; }
16554 if ${gdb_cv_var_elf+:} false; then :
16555 $as_echo_n "(cached) " >&6
16556 else
16557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16558 /* end confdefs.h. */
16559 #include <stdlib.h>
16560 #include "bfd.h"
16561 #include "elf-bfd.h"
16562
16563 int
16564 main ()
16565 {
16566 return bfd_get_elf_phdr_upper_bound (NULL);
16567 ;
16568 return 0;
16569 }
16570 _ACEOF
16571 if ac_fn_c_try_link "$LINENO"; then :
16572 gdb_cv_var_elf=yes
16573 else
16574 gdb_cv_var_elf=no
16575 fi
16576 rm -f core conftest.err conftest.$ac_objext \
16577 conftest$ac_exeext conftest.$ac_ext
16578 fi
16579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16580 $as_echo "$gdb_cv_var_elf" >&6; }
16581 CFLAGS=$OLD_CFLAGS
16582 LDFLAGS=$OLD_LDFLAGS
16583 LIBS=$OLD_LIBS
16584 if test "$gdb_cv_var_elf" = yes; then
16585 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
16586
16587 $as_echo "#define HAVE_ELF 1" >>confdefs.h
16588
16589 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16590 if test "$plugins" = "yes"; then
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16592 $as_echo_n "checking for library containing dlopen... " >&6; }
16593 if ${ac_cv_search_dlopen+:} false; then :
16594 $as_echo_n "(cached) " >&6
16595 else
16596 ac_func_search_save_LIBS=$LIBS
16597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16598 /* end confdefs.h. */
16599
16600 /* Override any GCC internal prototype to avoid an error.
16601 Use char because int might match the return type of a GCC
16602 builtin and then its argument prototype would still apply. */
16603 #ifdef __cplusplus
16604 extern "C"
16605 #endif
16606 char dlopen ();
16607 int
16608 main ()
16609 {
16610 return dlopen ();
16611 ;
16612 return 0;
16613 }
16614 _ACEOF
16615 for ac_lib in '' dl; do
16616 if test -z "$ac_lib"; then
16617 ac_res="none required"
16618 else
16619 ac_res=-l$ac_lib
16620 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16621 fi
16622 if ac_fn_c_try_link "$LINENO"; then :
16623 ac_cv_search_dlopen=$ac_res
16624 fi
16625 rm -f core conftest.err conftest.$ac_objext \
16626 conftest$ac_exeext
16627 if ${ac_cv_search_dlopen+:} false; then :
16628 break
16629 fi
16630 done
16631 if ${ac_cv_search_dlopen+:} false; then :
16632
16633 else
16634 ac_cv_search_dlopen=no
16635 fi
16636 rm conftest.$ac_ext
16637 LIBS=$ac_func_search_save_LIBS
16638 fi
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16640 $as_echo "$ac_cv_search_dlopen" >&6; }
16641 ac_res=$ac_cv_search_dlopen
16642 if test "$ac_res" != no; then :
16643 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16644
16645 fi
16646
16647 fi
16648 fi
16649
16650 # Add macho support to GDB, but only if BFD includes it.
16651
16652 OLD_CFLAGS=$CFLAGS
16653 OLD_LDFLAGS=$LDFLAGS
16654 OLD_LIBS=$LIBS
16655 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16656 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16657 # always want our bfd.
16658 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16659 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16660 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16661 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16662 LIBS="-lbfd -liberty -lz $intl $LIBS"
16663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16664 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
16665 if ${gdb_cv_var_macho+:} false; then :
16666 $as_echo_n "(cached) " >&6
16667 else
16668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16669 /* end confdefs.h. */
16670 #include <stdlib.h>
16671 #include "bfd.h"
16672 #include "mach-o.h"
16673
16674 int
16675 main ()
16676 {
16677 return bfd_mach_o_lookup_command (NULL, 0, NULL);
16678 ;
16679 return 0;
16680 }
16681 _ACEOF
16682 if ac_fn_c_try_link "$LINENO"; then :
16683 gdb_cv_var_macho=yes
16684 else
16685 gdb_cv_var_macho=no
16686 fi
16687 rm -f core conftest.err conftest.$ac_objext \
16688 conftest$ac_exeext conftest.$ac_ext
16689 fi
16690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16691 $as_echo "$gdb_cv_var_macho" >&6; }
16692 CFLAGS=$OLD_CFLAGS
16693 LDFLAGS=$OLD_LDFLAGS
16694 LIBS=$OLD_LIBS
16695 if test "$gdb_cv_var_macho" = yes; then
16696 CONFIG_OBS="$CONFIG_OBS machoread.o"
16697 fi
16698
16699 # Add any host-specific objects to GDB.
16700 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16701
16702 # If building on ELF, look for lzma support for embedded compressed debug info.
16703 if test "$gdb_cv_var_elf" = yes; then
16704
16705 # Check whether --with-lzma was given.
16706 if test "${with_lzma+set}" = set; then :
16707 withval=$with_lzma;
16708 else
16709 with_lzma=auto
16710 fi
16711
16712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16713 $as_echo_n "checking whether to use lzma... " >&6; }
16714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16715 $as_echo "$with_lzma" >&6; }
16716
16717 if test "${with_lzma}" != no; then
16718
16719
16720
16721
16722
16723
16724
16725
16726 use_additional=yes
16727
16728 acl_save_prefix="$prefix"
16729 prefix="$acl_final_prefix"
16730 acl_save_exec_prefix="$exec_prefix"
16731 exec_prefix="$acl_final_exec_prefix"
16732
16733 eval additional_includedir=\"$includedir\"
16734 eval additional_libdir=\"$libdir\"
16735
16736 exec_prefix="$acl_save_exec_prefix"
16737 prefix="$acl_save_prefix"
16738
16739
16740 # Check whether --with-liblzma-prefix was given.
16741 if test "${with_liblzma_prefix+set}" = set; then :
16742 withval=$with_liblzma_prefix;
16743 if test "X$withval" = "Xno"; then
16744 use_additional=no
16745 else
16746 if test "X$withval" = "X"; then
16747
16748 acl_save_prefix="$prefix"
16749 prefix="$acl_final_prefix"
16750 acl_save_exec_prefix="$exec_prefix"
16751 exec_prefix="$acl_final_exec_prefix"
16752
16753 eval additional_includedir=\"$includedir\"
16754 eval additional_libdir=\"$libdir\"
16755
16756 exec_prefix="$acl_save_exec_prefix"
16757 prefix="$acl_save_prefix"
16758
16759 else
16760 additional_includedir="$withval/include"
16761 additional_libdir="$withval/lib"
16762 fi
16763 fi
16764
16765 fi
16766
16767
16768 # Check whether --with-liblzma-type was given.
16769 if test "${with_liblzma_type+set}" = set; then :
16770 withval=$with_liblzma_type; with_liblzma_type=$withval
16771 else
16772 with_liblzma_type=auto
16773 fi
16774
16775 lib_type=`eval echo \$with_liblzma_type`
16776
16777 LIBLZMA=
16778 LTLIBLZMA=
16779 INCLZMA=
16780 rpathdirs=
16781 ltrpathdirs=
16782 names_already_handled=
16783 names_next_round='lzma '
16784 while test -n "$names_next_round"; do
16785 names_this_round="$names_next_round"
16786 names_next_round=
16787 for name in $names_this_round; do
16788 already_handled=
16789 for n in $names_already_handled; do
16790 if test "$n" = "$name"; then
16791 already_handled=yes
16792 break
16793 fi
16794 done
16795 if test -z "$already_handled"; then
16796 names_already_handled="$names_already_handled $name"
16797 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16798 eval value=\"\$HAVE_LIB$uppername\"
16799 if test -n "$value"; then
16800 if test "$value" = yes; then
16801 eval value=\"\$LIB$uppername\"
16802 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16803 eval value=\"\$LTLIB$uppername\"
16804 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16805 else
16806 :
16807 fi
16808 else
16809 found_dir=
16810 found_la=
16811 found_so=
16812 found_a=
16813 if test $use_additional = yes; then
16814 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
16815 found_dir="$additional_libdir"
16816 found_so="$additional_libdir/lib$name.$shlibext"
16817 if test -f "$additional_libdir/lib$name.la"; then
16818 found_la="$additional_libdir/lib$name.la"
16819 fi
16820 elif test x$lib_type != xshared; then
16821 if test -f "$additional_libdir/lib$name.$libext"; then
16822 found_dir="$additional_libdir"
16823 found_a="$additional_libdir/lib$name.$libext"
16824 if test -f "$additional_libdir/lib$name.la"; then
16825 found_la="$additional_libdir/lib$name.la"
16826 fi
16827 fi
16828 fi
16829 fi
16830 if test "X$found_dir" = "X"; then
16831 for x in $LDFLAGS $LTLIBLZMA; do
16832
16833 acl_save_prefix="$prefix"
16834 prefix="$acl_final_prefix"
16835 acl_save_exec_prefix="$exec_prefix"
16836 exec_prefix="$acl_final_exec_prefix"
16837 eval x=\"$x\"
16838 exec_prefix="$acl_save_exec_prefix"
16839 prefix="$acl_save_prefix"
16840
16841 case "$x" in
16842 -L*)
16843 dir=`echo "X$x" | sed -e 's/^X-L//'`
16844 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
16845 found_dir="$dir"
16846 found_so="$dir/lib$name.$shlibext"
16847 if test -f "$dir/lib$name.la"; then
16848 found_la="$dir/lib$name.la"
16849 fi
16850 elif test x$lib_type != xshared; then
16851 if test -f "$dir/lib$name.$libext"; then
16852 found_dir="$dir"
16853 found_a="$dir/lib$name.$libext"
16854 if test -f "$dir/lib$name.la"; then
16855 found_la="$dir/lib$name.la"
16856 fi
16857 fi
16858 fi
16859 ;;
16860 esac
16861 if test "X$found_dir" != "X"; then
16862 break
16863 fi
16864 done
16865 fi
16866 if test "X$found_dir" != "X"; then
16867 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16868 if test "X$found_so" != "X"; then
16869 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16870 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16871 else
16872 haveit=
16873 for x in $ltrpathdirs; do
16874 if test "X$x" = "X$found_dir"; then
16875 haveit=yes
16876 break
16877 fi
16878 done
16879 if test -z "$haveit"; then
16880 ltrpathdirs="$ltrpathdirs $found_dir"
16881 fi
16882 if test "$hardcode_direct" = yes; then
16883 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16884 else
16885 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16886 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16887 haveit=
16888 for x in $rpathdirs; do
16889 if test "X$x" = "X$found_dir"; then
16890 haveit=yes
16891 break
16892 fi
16893 done
16894 if test -z "$haveit"; then
16895 rpathdirs="$rpathdirs $found_dir"
16896 fi
16897 else
16898 haveit=
16899 for x in $LDFLAGS $LIBLZMA; do
16900
16901 acl_save_prefix="$prefix"
16902 prefix="$acl_final_prefix"
16903 acl_save_exec_prefix="$exec_prefix"
16904 exec_prefix="$acl_final_exec_prefix"
16905 eval x=\"$x\"
16906 exec_prefix="$acl_save_exec_prefix"
16907 prefix="$acl_save_prefix"
16908
16909 if test "X$x" = "X-L$found_dir"; then
16910 haveit=yes
16911 break
16912 fi
16913 done
16914 if test -z "$haveit"; then
16915 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16916 fi
16917 if test "$hardcode_minus_L" != no; then
16918 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16919 else
16920 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16921 fi
16922 fi
16923 fi
16924 fi
16925 else
16926 if test "X$found_a" != "X"; then
16927 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16928 else
16929 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16930 fi
16931 fi
16932 additional_includedir=
16933 case "$found_dir" in
16934 */lib | */lib/)
16935 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16936 additional_includedir="$basedir/include"
16937 ;;
16938 esac
16939 if test "X$additional_includedir" != "X"; then
16940 if test "X$additional_includedir" != "X/usr/include"; then
16941 haveit=
16942 if test "X$additional_includedir" = "X/usr/local/include"; then
16943 if test -n "$GCC"; then
16944 case $host_os in
16945 linux*) haveit=yes;;
16946 esac
16947 fi
16948 fi
16949 if test -z "$haveit"; then
16950 for x in $CPPFLAGS $INCLZMA; do
16951
16952 acl_save_prefix="$prefix"
16953 prefix="$acl_final_prefix"
16954 acl_save_exec_prefix="$exec_prefix"
16955 exec_prefix="$acl_final_exec_prefix"
16956 eval x=\"$x\"
16957 exec_prefix="$acl_save_exec_prefix"
16958 prefix="$acl_save_prefix"
16959
16960 if test "X$x" = "X-I$additional_includedir"; then
16961 haveit=yes
16962 break
16963 fi
16964 done
16965 if test -z "$haveit"; then
16966 if test -d "$additional_includedir"; then
16967 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16968 fi
16969 fi
16970 fi
16971 fi
16972 fi
16973 if test -n "$found_la"; then
16974 save_libdir="$libdir"
16975 case "$found_la" in
16976 */* | *\\*) . "$found_la" ;;
16977 *) . "./$found_la" ;;
16978 esac
16979 libdir="$save_libdir"
16980 for dep in $dependency_libs; do
16981 case "$dep" in
16982 -L*)
16983 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16984 if test "X$additional_libdir" != "X/usr/lib"; then
16985 haveit=
16986 if test "X$additional_libdir" = "X/usr/local/lib"; then
16987 if test -n "$GCC"; then
16988 case $host_os in
16989 linux*) haveit=yes;;
16990 esac
16991 fi
16992 fi
16993 if test -z "$haveit"; then
16994 haveit=
16995 for x in $LDFLAGS $LIBLZMA; do
16996
16997 acl_save_prefix="$prefix"
16998 prefix="$acl_final_prefix"
16999 acl_save_exec_prefix="$exec_prefix"
17000 exec_prefix="$acl_final_exec_prefix"
17001 eval x=\"$x\"
17002 exec_prefix="$acl_save_exec_prefix"
17003 prefix="$acl_save_prefix"
17004
17005 if test "X$x" = "X-L$additional_libdir"; then
17006 haveit=yes
17007 break
17008 fi
17009 done
17010 if test -z "$haveit"; then
17011 if test -d "$additional_libdir"; then
17012 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17013 fi
17014 fi
17015 haveit=
17016 for x in $LDFLAGS $LTLIBLZMA; do
17017
17018 acl_save_prefix="$prefix"
17019 prefix="$acl_final_prefix"
17020 acl_save_exec_prefix="$exec_prefix"
17021 exec_prefix="$acl_final_exec_prefix"
17022 eval x=\"$x\"
17023 exec_prefix="$acl_save_exec_prefix"
17024 prefix="$acl_save_prefix"
17025
17026 if test "X$x" = "X-L$additional_libdir"; then
17027 haveit=yes
17028 break
17029 fi
17030 done
17031 if test -z "$haveit"; then
17032 if test -d "$additional_libdir"; then
17033 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17034 fi
17035 fi
17036 fi
17037 fi
17038 ;;
17039 -R*)
17040 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17041 if test "$enable_rpath" != no; then
17042 haveit=
17043 for x in $rpathdirs; do
17044 if test "X$x" = "X$dir"; then
17045 haveit=yes
17046 break
17047 fi
17048 done
17049 if test -z "$haveit"; then
17050 rpathdirs="$rpathdirs $dir"
17051 fi
17052 haveit=
17053 for x in $ltrpathdirs; do
17054 if test "X$x" = "X$dir"; then
17055 haveit=yes
17056 break
17057 fi
17058 done
17059 if test -z "$haveit"; then
17060 ltrpathdirs="$ltrpathdirs $dir"
17061 fi
17062 fi
17063 ;;
17064 -l*)
17065 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17066 ;;
17067 *.la)
17068 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17069 ;;
17070 *)
17071 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17072 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17073 ;;
17074 esac
17075 done
17076 fi
17077 else
17078 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17079 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17080 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17081 else
17082 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17083 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17084 fi
17085 fi
17086 fi
17087 fi
17088 done
17089 done
17090 if test "X$rpathdirs" != "X"; then
17091 if test -n "$hardcode_libdir_separator"; then
17092 alldirs=
17093 for found_dir in $rpathdirs; do
17094 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17095 done
17096 acl_save_libdir="$libdir"
17097 libdir="$alldirs"
17098 eval flag=\"$hardcode_libdir_flag_spec\"
17099 libdir="$acl_save_libdir"
17100 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17101 else
17102 for found_dir in $rpathdirs; do
17103 acl_save_libdir="$libdir"
17104 libdir="$found_dir"
17105 eval flag=\"$hardcode_libdir_flag_spec\"
17106 libdir="$acl_save_libdir"
17107 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17108 done
17109 fi
17110 fi
17111 if test "X$ltrpathdirs" != "X"; then
17112 for found_dir in $ltrpathdirs; do
17113 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17114 done
17115 fi
17116
17117
17118 ac_save_CPPFLAGS="$CPPFLAGS"
17119
17120 for element in $INCLZMA; do
17121 haveit=
17122 for x in $CPPFLAGS; do
17123
17124 acl_save_prefix="$prefix"
17125 prefix="$acl_final_prefix"
17126 acl_save_exec_prefix="$exec_prefix"
17127 exec_prefix="$acl_final_exec_prefix"
17128 eval x=\"$x\"
17129 exec_prefix="$acl_save_exec_prefix"
17130 prefix="$acl_save_prefix"
17131
17132 if test "X$x" = "X$element"; then
17133 haveit=yes
17134 break
17135 fi
17136 done
17137 if test -z "$haveit"; then
17138 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17139 fi
17140 done
17141
17142
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17144 $as_echo_n "checking for liblzma... " >&6; }
17145 if ${ac_cv_liblzma+:} false; then :
17146 $as_echo_n "(cached) " >&6
17147 else
17148
17149 ac_save_LIBS="$LIBS"
17150 LIBS="$LIBS $LIBLZMA"
17151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17152 /* end confdefs.h. */
17153 #include "lzma.h"
17154 int
17155 main ()
17156 {
17157 lzma_index_iter iter;
17158 lzma_index_iter_init (&iter, 0);
17159 lzma_mf_is_supported (LZMA_MF_HC3);
17160 ;
17161 return 0;
17162 }
17163 _ACEOF
17164 if ac_fn_c_try_link "$LINENO"; then :
17165 ac_cv_liblzma=yes
17166 else
17167 ac_cv_liblzma=no
17168 fi
17169 rm -f core conftest.err conftest.$ac_objext \
17170 conftest$ac_exeext conftest.$ac_ext
17171 LIBS="$ac_save_LIBS"
17172
17173 fi
17174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17175 $as_echo "$ac_cv_liblzma" >&6; }
17176 if test "$ac_cv_liblzma" = yes; then
17177 HAVE_LIBLZMA=yes
17178
17179 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17180
17181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17182 $as_echo_n "checking how to link with liblzma... " >&6; }
17183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17184 $as_echo "$LIBLZMA" >&6; }
17185 else
17186 HAVE_LIBLZMA=no
17187 CPPFLAGS="$ac_save_CPPFLAGS"
17188 LIBLZMA=
17189 LTLIBLZMA=
17190 fi
17191
17192
17193
17194
17195
17196
17197 if test "$HAVE_LIBLZMA" != yes; then
17198 if test "$with_lzma" = yes; then
17199 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17200 fi
17201 fi
17202 fi
17203 fi
17204
17205 LIBGUI="../libgui/src/libgui.a"
17206 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17207
17208
17209
17210 WIN32LDAPP=
17211
17212
17213
17214 case "${host}" in
17215 *-*-cygwin* | *-*-mingw* )
17216 configdir="win"
17217 ;;
17218 *)
17219 configdir="unix"
17220 ;;
17221 esac
17222
17223 GDBTKLIBS=
17224 if test "${enable_gdbtk}" = "yes"; then
17225
17226 # Gdbtk must have an absolute path to srcdir in order to run
17227 # properly when not installed.
17228 here=`pwd`
17229 cd ${srcdir}
17230 GDBTK_SRC_DIR=`pwd`
17231 cd $here
17232
17233
17234 #
17235 # Ok, lets find the tcl configuration
17236 # First, look for one uninstalled.
17237 # the alternative search directory is invoked by --with-tcl
17238 #
17239
17240 if test x"${no_tcl}" = x ; then
17241 # we reset no_tcl in case something fails here
17242 no_tcl=true
17243
17244 # Check whether --with-tcl was given.
17245 if test "${with_tcl+set}" = set; then :
17246 withval=$with_tcl; with_tclconfig=${withval}
17247 fi
17248
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17250 $as_echo_n "checking for Tcl configuration... " >&6; }
17251 if ${ac_cv_c_tclconfig+:} false; then :
17252 $as_echo_n "(cached) " >&6
17253 else
17254
17255
17256 # First check to see if --with-tcl was specified.
17257 case "${host}" in
17258 *-*-cygwin*) platDir="win" ;;
17259 *) platDir="unix" ;;
17260 esac
17261 if test x"${with_tclconfig}" != x ; then
17262 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17263 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17264 else
17265 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17266 fi
17267 fi
17268
17269 # then check for a private Tcl installation
17270 if test x"${ac_cv_c_tclconfig}" = x ; then
17271 for i in \
17272 ../tcl \
17273 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17274 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17275 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17276 ../../tcl \
17277 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17278 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17279 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17280 ../../../tcl \
17281 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17282 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17283 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17284 if test -f "$i/$platDir/tclConfig.sh" ; then
17285 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17286 break
17287 fi
17288 done
17289 fi
17290
17291 # on Darwin, check in Framework installation locations
17292 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17293 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17294 `ls -d /Library/Frameworks 2>/dev/null` \
17295 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17296 `ls -d /System/Library/Frameworks 2>/dev/null` \
17297 ; do
17298 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17299 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17300 break
17301 fi
17302 done
17303 fi
17304
17305 # check in a few common install locations
17306 if test x"${ac_cv_c_tclconfig}" = x ; then
17307 for i in `ls -d ${libdir} 2>/dev/null` \
17308 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17309 `ls -d ${prefix}/lib 2>/dev/null` \
17310 `ls -d /usr/local/lib 2>/dev/null` \
17311 `ls -d /usr/contrib/lib 2>/dev/null` \
17312 `ls -d /usr/lib 2>/dev/null` \
17313 ; do
17314 if test -f "$i/tclConfig.sh" ; then
17315 ac_cv_c_tclconfig=`(cd $i; pwd)`
17316 break
17317 fi
17318 done
17319 fi
17320
17321 # check in a few other private locations
17322 if test x"${ac_cv_c_tclconfig}" = x ; then
17323 for i in \
17324 ${srcdir}/../tcl \
17325 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17326 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17327 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17328 if test -f "$i/$platDir/tclConfig.sh" ; then
17329 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17330 break
17331 fi
17332 done
17333 fi
17334
17335 fi
17336
17337
17338 if test x"${ac_cv_c_tclconfig}" = x ; then
17339 TCL_BIN_DIR="# no Tcl configs found"
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17341 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17342 else
17343 no_tcl=
17344 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17346 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17347 fi
17348 fi
17349
17350
17351 # If $no_tk is nonempty, then we can't do Tk, and there is no
17352 # point to doing Tcl.
17353
17354 #
17355 # Ok, lets find the tk configuration
17356 # First, look for one uninstalled.
17357 # the alternative search directory is invoked by --with-tk
17358 #
17359
17360 if test x"${no_tk}" = x ; then
17361 # we reset no_tk in case something fails here
17362 no_tk=true
17363
17364 # Check whether --with-tk was given.
17365 if test "${with_tk+set}" = set; then :
17366 withval=$with_tk; with_tkconfig=${withval}
17367 fi
17368
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17370 $as_echo_n "checking for Tk configuration... " >&6; }
17371 if ${ac_cv_c_tkconfig+:} false; then :
17372 $as_echo_n "(cached) " >&6
17373 else
17374
17375
17376 # First check to see if --with-tkconfig was specified.
17377 if test x"${with_tkconfig}" != x ; then
17378 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17379 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17380 else
17381 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17382 fi
17383 fi
17384
17385 # then check for a private Tk library
17386 case "${host}" in
17387 *-*-cygwin*) platDir="win" ;;
17388 *) platDir="unix" ;;
17389 esac
17390 if test x"${ac_cv_c_tkconfig}" = x ; then
17391 for i in \
17392 ../tk \
17393 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17394 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17395 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17396 ../../tk \
17397 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17398 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17399 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17400 ../../../tk \
17401 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17402 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17403 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17404 if test -f "$i/$platDir/tkConfig.sh" ; then
17405 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17406 break
17407 fi
17408 done
17409 fi
17410
17411 # on Darwin, check in Framework installation locations
17412 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17413 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17414 `ls -d /Library/Frameworks 2>/dev/null` \
17415 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17416 `ls -d /System/Library/Frameworks 2>/dev/null` \
17417 ; do
17418 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17419 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17420 break
17421 fi
17422 done
17423 fi
17424
17425 # check in a few common install locations
17426 if test x"${ac_cv_c_tkconfig}" = x ; then
17427 for i in `ls -d ${libdir} 2>/dev/null` \
17428 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17429 `ls -d ${prefix}/lib 2>/dev/null` \
17430 `ls -d /usr/local/lib 2>/dev/null` \
17431 `ls -d /usr/contrib/lib 2>/dev/null` \
17432 `ls -d /usr/lib 2>/dev/null` \
17433 ; do
17434 if test -f "$i/tkConfig.sh" ; then
17435 ac_cv_c_tkconfig=`(cd $i; pwd)`
17436 break
17437 fi
17438 done
17439 fi
17440 # check in a few other private locations
17441 if test x"${ac_cv_c_tkconfig}" = x ; then
17442 for i in \
17443 ${srcdir}/../tk \
17444 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17445 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17446 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17447 if test -f "$i/$platDir/tkConfig.sh" ; then
17448 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17449 break
17450 fi
17451 done
17452 fi
17453
17454 fi
17455
17456
17457 if test x"${ac_cv_c_tkconfig}" = x ; then
17458 TK_BIN_DIR="# no Tk configs found"
17459 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17460 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
17461 else
17462 no_tk=
17463 TK_BIN_DIR=${ac_cv_c_tkconfig}
17464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17465 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17466 fi
17467 fi
17468
17469
17470 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17471
17472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17473 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
17474
17475 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17477 $as_echo "loading" >&6; }
17478 . ${TCL_BIN_DIR}/tclConfig.sh
17479 else
17480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17481 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17482 fi
17483
17484 # eval is required to do the TCL_DBGX substitution
17485 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17486 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17487
17488 # If the TCL_BIN_DIR is the build directory (not the install directory),
17489 # then set the common variable name to the value of the build variables.
17490 # For example, the variable TCL_LIB_SPEC will be set to the value
17491 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17492 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17493 # installed and uninstalled version of Tcl.
17494 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17495 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17496 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17497 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17498 elif test "`uname -s`" = "Darwin"; then
17499 # If Tcl was built as a framework, attempt to use the libraries
17500 # from the framework at the given location so that linking works
17501 # against Tcl.framework installed in an arbitrary location.
17502 case ${TCL_DEFS} in
17503 *TCL_FRAMEWORK*)
17504 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17505 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17506 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17507 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17508 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17509 break
17510 fi
17511 done
17512 fi
17513 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17514 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17515 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17516 fi
17517 ;;
17518 esac
17519 fi
17520
17521 # eval is required to do the TCL_DBGX substitution
17522 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17523 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17524 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17525 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541 # Check for in-tree tcl
17542 here=`pwd`
17543 cd ${srcdir}/..
17544 topdir=`pwd`
17545 cd ${here}
17546
17547 intree="no"
17548 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17549 intree="yes"
17550 fi
17551
17552 # Find Tcl private headers
17553 if test x"${intree}" = xno; then
17554
17555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17556 $as_echo_n "checking for Tcl private headers... " >&6; }
17557 private_dir=""
17558 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17559 if test -f ${dir}/tclInt.h ; then
17560 private_dir=${dir}
17561 fi
17562
17563 if test x"${private_dir}" = x; then
17564 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
17565 else
17566 TCL_PRIVATE_INCLUDE="-I${private_dir}"
17567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17568 $as_echo "${private_dir}" >&6; }
17569 fi
17570
17571 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17572 TCL_LIBRARY="${TCL_LIB_SPEC}"
17573 TCL_DEPS=""
17574 else
17575 # If building tcl in the same src tree, private headers
17576 # are not needed, but we need to be sure to use the right
17577 # headers library
17578 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17579 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17580 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17581 fi
17582
17583
17584
17585
17586
17587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17588 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
17589
17590 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17592 $as_echo "loading" >&6; }
17593 . ${TK_BIN_DIR}/tkConfig.sh
17594 else
17595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17596 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17597 fi
17598
17599 # eval is required to do the TK_DBGX substitution
17600 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17601 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17602
17603 # If the TK_BIN_DIR is the build directory (not the install directory),
17604 # then set the common variable name to the value of the build variables.
17605 # For example, the variable TK_LIB_SPEC will be set to the value
17606 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17607 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17608 # installed and uninstalled version of Tcl.
17609 if test -f "${TK_BIN_DIR}/Makefile" ; then
17610 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17611 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17612 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17613 elif test "`uname -s`" = "Darwin"; then
17614 # If Tk was built as a framework, attempt to use the libraries
17615 # from the framework at the given location so that linking works
17616 # against Tk.framework installed in an arbitrary location.
17617 case ${TK_DEFS} in
17618 *TK_FRAMEWORK*)
17619 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
17620 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17621 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17622 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17623 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17624 break
17625 fi
17626 done
17627 fi
17628 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
17629 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17630 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17631 fi
17632 ;;
17633 esac
17634 fi
17635
17636 # eval is required to do the TK_DBGX substitution
17637 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17638 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17639 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17640 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655 # Check for in-tree Tk
17656 intree="no"
17657 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17658 intree="yes"
17659 fi
17660
17661 # Find Tk private headers
17662 if test x"${intree}" = xno; then
17663
17664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17665 $as_echo_n "checking for Tk private headers... " >&6; }
17666 private_dir=""
17667 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17668 if test -f ${dir}/tkInt.h; then
17669 private_dir=${dir}
17670 fi
17671
17672 if test x"${private_dir}" = x; then
17673 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
17674 else
17675 TK_PRIVATE_INCLUDE="-I${private_dir}"
17676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17677 $as_echo "${private_dir}" >&6; }
17678 fi
17679
17680 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17681 TK_LIBRARY=${TK_LIB_SPEC}
17682 TK_DEPS=""
17683 else
17684 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17685 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17686 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17687 fi
17688
17689
17690
17691
17692
17693 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
17694
17695 # Include some libraries that Tcl and Tk want.
17696 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17697 # Yes, the ordering seems wrong here. But it isn't.
17698 # TK_LIBS is the list of libraries that need to be linked
17699 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17700 # were in LIBS then any link tests after this point would
17701 # try to include things like `$(LIBGUI)', which wouldn't work.
17702 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
17703
17704 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17705 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17706 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17707 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17708 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17709 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17710 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
17711
17712 if test x"$gdb_cv_os_cygwin" = xyes; then
17713 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17714 WIN32LDAPP="-Wl,--subsystem,console"
17715 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
17716 fi
17717
17718 subdirs="$subdirs gdbtk"
17719
17720 fi
17721 fi
17722
17723
17724
17725
17726
17727
17728
17729
17730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17731 $as_echo_n "checking for X... " >&6; }
17732
17733
17734 # Check whether --with-x was given.
17735 if test "${with_x+set}" = set; then :
17736 withval=$with_x;
17737 fi
17738
17739 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17740 if test "x$with_x" = xno; then
17741 # The user explicitly disabled X.
17742 have_x=disabled
17743 else
17744 case $x_includes,$x_libraries in #(
17745 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17746 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
17747 $as_echo_n "(cached) " >&6
17748 else
17749 # One or both of the vars are not set, and there is no cached value.
17750 ac_x_includes=no ac_x_libraries=no
17751 rm -f -r conftest.dir
17752 if mkdir conftest.dir; then
17753 cd conftest.dir
17754 cat >Imakefile <<'_ACEOF'
17755 incroot:
17756 @echo incroot='${INCROOT}'
17757 usrlibdir:
17758 @echo usrlibdir='${USRLIBDIR}'
17759 libdir:
17760 @echo libdir='${LIBDIR}'
17761 _ACEOF
17762 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17763 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
17764 for ac_var in incroot usrlibdir libdir; do
17765 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17766 done
17767 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17768 for ac_extension in a so sl dylib la dll; do
17769 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17770 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17771 ac_im_usrlibdir=$ac_im_libdir; break
17772 fi
17773 done
17774 # Screen out bogus values from the imake configuration. They are
17775 # bogus both because they are the default anyway, and because
17776 # using them would break gcc on systems where it needs fixed includes.
17777 case $ac_im_incroot in
17778 /usr/include) ac_x_includes= ;;
17779 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17780 esac
17781 case $ac_im_usrlibdir in
17782 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17783 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17784 esac
17785 fi
17786 cd ..
17787 rm -f -r conftest.dir
17788 fi
17789
17790 # Standard set of common directories for X headers.
17791 # Check X11 before X11Rn because it is often a symlink to the current release.
17792 ac_x_header_dirs='
17793 /usr/X11/include
17794 /usr/X11R7/include
17795 /usr/X11R6/include
17796 /usr/X11R5/include
17797 /usr/X11R4/include
17798
17799 /usr/include/X11
17800 /usr/include/X11R7
17801 /usr/include/X11R6
17802 /usr/include/X11R5
17803 /usr/include/X11R4
17804
17805 /usr/local/X11/include
17806 /usr/local/X11R7/include
17807 /usr/local/X11R6/include
17808 /usr/local/X11R5/include
17809 /usr/local/X11R4/include
17810
17811 /usr/local/include/X11
17812 /usr/local/include/X11R7
17813 /usr/local/include/X11R6
17814 /usr/local/include/X11R5
17815 /usr/local/include/X11R4
17816
17817 /usr/X386/include
17818 /usr/x386/include
17819 /usr/XFree86/include/X11
17820
17821 /usr/include
17822 /usr/local/include
17823 /usr/unsupported/include
17824 /usr/athena/include
17825 /usr/local/x11r5/include
17826 /usr/lpp/Xamples/include
17827
17828 /usr/openwin/include
17829 /usr/openwin/share/include'
17830
17831 if test "$ac_x_includes" = no; then
17832 # Guess where to find include files, by looking for Xlib.h.
17833 # First, try using that file with no special directory specified.
17834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17835 /* end confdefs.h. */
17836 #include <X11/Xlib.h>
17837 _ACEOF
17838 if ac_fn_c_try_cpp "$LINENO"; then :
17839 # We can compile using X headers with no special include directory.
17840 ac_x_includes=
17841 else
17842 for ac_dir in $ac_x_header_dirs; do
17843 if test -r "$ac_dir/X11/Xlib.h"; then
17844 ac_x_includes=$ac_dir
17845 break
17846 fi
17847 done
17848 fi
17849 rm -f conftest.err conftest.i conftest.$ac_ext
17850 fi # $ac_x_includes = no
17851
17852 if test "$ac_x_libraries" = no; then
17853 # Check for the libraries.
17854 # See if we find them without any special options.
17855 # Don't add to $LIBS permanently.
17856 ac_save_LIBS=$LIBS
17857 LIBS="-lX11 $LIBS"
17858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17859 /* end confdefs.h. */
17860 #include <X11/Xlib.h>
17861 int
17862 main ()
17863 {
17864 XrmInitialize ()
17865 ;
17866 return 0;
17867 }
17868 _ACEOF
17869 if ac_fn_c_try_link "$LINENO"; then :
17870 LIBS=$ac_save_LIBS
17871 # We can link X programs with no special library path.
17872 ac_x_libraries=
17873 else
17874 LIBS=$ac_save_LIBS
17875 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17876 do
17877 # Don't even attempt the hair of trying to link an X program!
17878 for ac_extension in a so sl dylib la dll; do
17879 if test -r "$ac_dir/libX11.$ac_extension"; then
17880 ac_x_libraries=$ac_dir
17881 break 2
17882 fi
17883 done
17884 done
17885 fi
17886 rm -f core conftest.err conftest.$ac_objext \
17887 conftest$ac_exeext conftest.$ac_ext
17888 fi # $ac_x_libraries = no
17889
17890 case $ac_x_includes,$ac_x_libraries in #(
17891 no,* | *,no | *\'*)
17892 # Didn't find X, or a directory has "'" in its name.
17893 ac_cv_have_x="have_x=no";; #(
17894 *)
17895 # Record where we found X for the cache.
17896 ac_cv_have_x="have_x=yes\
17897 ac_x_includes='$ac_x_includes'\
17898 ac_x_libraries='$ac_x_libraries'"
17899 esac
17900 fi
17901 ;; #(
17902 *) have_x=yes;;
17903 esac
17904 eval "$ac_cv_have_x"
17905 fi # $with_x != no
17906
17907 if test "$have_x" != yes; then
17908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17909 $as_echo "$have_x" >&6; }
17910 no_x=yes
17911 else
17912 # If each of the values was on the command line, it overrides each guess.
17913 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17914 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17915 # Update the cache value to reflect the command line values.
17916 ac_cv_have_x="have_x=yes\
17917 ac_x_includes='$x_includes'\
17918 ac_x_libraries='$x_libraries'"
17919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17920 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17921 fi
17922
17923
17924 # Unlike the sim directory, whether a simulator is linked is controlled by
17925 # presence of a gdb_sim definition in the target configure.tgt entry.
17926 # This code just checks for a few cases where we'd like to ignore those
17927 # definitions, even when they're present in the '.mt' file. These cases
17928 # are when --disable-sim is specified, or if the simulator directory is
17929 # not part of the source tree.
17930 #
17931 # Check whether --enable-sim was given.
17932 if test "${enable_sim+set}" = set; then :
17933 enableval=$enable_sim; echo "enable_sim = $enable_sim";
17934 echo "enableval = ${enableval}";
17935 case "${enableval}" in
17936 yes) ignore_sim=false ;;
17937 no) ignore_sim=true ;;
17938 *) ignore_sim=false ;;
17939 esac
17940 else
17941 ignore_sim=false
17942 fi
17943
17944
17945 if test ! -d "${srcdir}/../sim"; then
17946 ignore_sim=true
17947 fi
17948
17949 SIM=
17950 SIM_OBS=
17951 if test "${ignore_sim}" = "false"; then
17952 if test x"${gdb_sim}" != x ; then
17953 SIM="${gdb_sim}"
17954 SIM_OBS="remote-sim.o"
17955
17956 $as_echo "#define WITH_SIM 1" >>confdefs.h
17957
17958
17959 # Some tdep code should only be compiled in when the ppc sim is
17960 # built. PR sim/13418.
17961 case $target in
17962 powerpc*-*-*)
17963
17964 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17965
17966 ;;
17967 esac
17968 fi
17969 fi
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984 # List of host floatformats.
17985
17986 cat >>confdefs.h <<_ACEOF
17987 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17988 _ACEOF
17989
17990
17991 cat >>confdefs.h <<_ACEOF
17992 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17993 _ACEOF
17994
17995
17996 cat >>confdefs.h <<_ACEOF
17997 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17998 _ACEOF
17999
18000
18001 # target_subdir is used by the testsuite to find the target libraries.
18002 target_subdir=
18003 if test "${host}" != "${target}"; then
18004 target_subdir="${target_alias}/"
18005 fi
18006
18007
18008 # Import nat definitions.
18009 nat_makefile_frag=/dev/null
18010 if test "${gdb_native}" = "yes"; then
18011 . ${srcdir}/configure.nat
18012 nativefile=$NAT_FILE
18013 fi
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025 if test x"${gdb_osabi}" != x ; then
18026
18027 cat >>confdefs.h <<_ACEOF
18028 #define GDB_OSABI_DEFAULT $gdb_osabi
18029 _ACEOF
18030
18031 fi
18032
18033 # Check for babeltrace and babeltrace-ctf
18034
18035 # Check whether --with-babeltrace was given.
18036 if test "${with_babeltrace+set}" = set; then :
18037 withval=$with_babeltrace;
18038 else
18039 with_babeltrace=auto
18040 fi
18041
18042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18043 $as_echo_n "checking whether to use babeltrace... " >&6; }
18044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18045 $as_echo "$with_babeltrace" >&6; }
18046
18047 if test "x$with_babeltrace" = "xno"; then
18048 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18049 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18050 else
18051 # Append -Werror to CFLAGS so that configure can catch the warning
18052 # "assignment from incompatible pointer type", which is related to
18053 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18054 # in GDB, while babeltrace 1.0.3 is broken.
18055 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18056 # safe to save and restore CFLAGS here.
18057 saved_CFLAGS=$CFLAGS
18058 CFLAGS="$CFLAGS -Werror"
18059
18060
18061
18062
18063
18064
18065
18066
18067 use_additional=yes
18068
18069 acl_save_prefix="$prefix"
18070 prefix="$acl_final_prefix"
18071 acl_save_exec_prefix="$exec_prefix"
18072 exec_prefix="$acl_final_exec_prefix"
18073
18074 eval additional_includedir=\"$includedir\"
18075 eval additional_libdir=\"$libdir\"
18076
18077 exec_prefix="$acl_save_exec_prefix"
18078 prefix="$acl_save_prefix"
18079
18080
18081 # Check whether --with-libbabeltrace-prefix was given.
18082 if test "${with_libbabeltrace_prefix+set}" = set; then :
18083 withval=$with_libbabeltrace_prefix;
18084 if test "X$withval" = "Xno"; then
18085 use_additional=no
18086 else
18087 if test "X$withval" = "X"; then
18088
18089 acl_save_prefix="$prefix"
18090 prefix="$acl_final_prefix"
18091 acl_save_exec_prefix="$exec_prefix"
18092 exec_prefix="$acl_final_exec_prefix"
18093
18094 eval additional_includedir=\"$includedir\"
18095 eval additional_libdir=\"$libdir\"
18096
18097 exec_prefix="$acl_save_exec_prefix"
18098 prefix="$acl_save_prefix"
18099
18100 else
18101 additional_includedir="$withval/include"
18102 additional_libdir="$withval/lib"
18103 fi
18104 fi
18105
18106 fi
18107
18108
18109 # Check whether --with-libbabeltrace-type was given.
18110 if test "${with_libbabeltrace_type+set}" = set; then :
18111 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18112 else
18113 with_libbabeltrace_type=auto
18114 fi
18115
18116 lib_type=`eval echo \$with_libbabeltrace_type`
18117
18118 LIBBABELTRACE=
18119 LTLIBBABELTRACE=
18120 INCBABELTRACE=
18121 rpathdirs=
18122 ltrpathdirs=
18123 names_already_handled=
18124 names_next_round='babeltrace babeltrace-ctf'
18125 while test -n "$names_next_round"; do
18126 names_this_round="$names_next_round"
18127 names_next_round=
18128 for name in $names_this_round; do
18129 already_handled=
18130 for n in $names_already_handled; do
18131 if test "$n" = "$name"; then
18132 already_handled=yes
18133 break
18134 fi
18135 done
18136 if test -z "$already_handled"; then
18137 names_already_handled="$names_already_handled $name"
18138 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18139 eval value=\"\$HAVE_LIB$uppername\"
18140 if test -n "$value"; then
18141 if test "$value" = yes; then
18142 eval value=\"\$LIB$uppername\"
18143 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18144 eval value=\"\$LTLIB$uppername\"
18145 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18146 else
18147 :
18148 fi
18149 else
18150 found_dir=
18151 found_la=
18152 found_so=
18153 found_a=
18154 if test $use_additional = yes; then
18155 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18156 found_dir="$additional_libdir"
18157 found_so="$additional_libdir/lib$name.$shlibext"
18158 if test -f "$additional_libdir/lib$name.la"; then
18159 found_la="$additional_libdir/lib$name.la"
18160 fi
18161 elif test x$lib_type != xshared; then
18162 if test -f "$additional_libdir/lib$name.$libext"; then
18163 found_dir="$additional_libdir"
18164 found_a="$additional_libdir/lib$name.$libext"
18165 if test -f "$additional_libdir/lib$name.la"; then
18166 found_la="$additional_libdir/lib$name.la"
18167 fi
18168 fi
18169 fi
18170 fi
18171 if test "X$found_dir" = "X"; then
18172 for x in $LDFLAGS $LTLIBBABELTRACE; do
18173
18174 acl_save_prefix="$prefix"
18175 prefix="$acl_final_prefix"
18176 acl_save_exec_prefix="$exec_prefix"
18177 exec_prefix="$acl_final_exec_prefix"
18178 eval x=\"$x\"
18179 exec_prefix="$acl_save_exec_prefix"
18180 prefix="$acl_save_prefix"
18181
18182 case "$x" in
18183 -L*)
18184 dir=`echo "X$x" | sed -e 's/^X-L//'`
18185 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18186 found_dir="$dir"
18187 found_so="$dir/lib$name.$shlibext"
18188 if test -f "$dir/lib$name.la"; then
18189 found_la="$dir/lib$name.la"
18190 fi
18191 elif test x$lib_type != xshared; then
18192 if test -f "$dir/lib$name.$libext"; then
18193 found_dir="$dir"
18194 found_a="$dir/lib$name.$libext"
18195 if test -f "$dir/lib$name.la"; then
18196 found_la="$dir/lib$name.la"
18197 fi
18198 fi
18199 fi
18200 ;;
18201 esac
18202 if test "X$found_dir" != "X"; then
18203 break
18204 fi
18205 done
18206 fi
18207 if test "X$found_dir" != "X"; then
18208 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18209 if test "X$found_so" != "X"; then
18210 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18211 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18212 else
18213 haveit=
18214 for x in $ltrpathdirs; do
18215 if test "X$x" = "X$found_dir"; then
18216 haveit=yes
18217 break
18218 fi
18219 done
18220 if test -z "$haveit"; then
18221 ltrpathdirs="$ltrpathdirs $found_dir"
18222 fi
18223 if test "$hardcode_direct" = yes; then
18224 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18225 else
18226 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18227 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18228 haveit=
18229 for x in $rpathdirs; do
18230 if test "X$x" = "X$found_dir"; then
18231 haveit=yes
18232 break
18233 fi
18234 done
18235 if test -z "$haveit"; then
18236 rpathdirs="$rpathdirs $found_dir"
18237 fi
18238 else
18239 haveit=
18240 for x in $LDFLAGS $LIBBABELTRACE; do
18241
18242 acl_save_prefix="$prefix"
18243 prefix="$acl_final_prefix"
18244 acl_save_exec_prefix="$exec_prefix"
18245 exec_prefix="$acl_final_exec_prefix"
18246 eval x=\"$x\"
18247 exec_prefix="$acl_save_exec_prefix"
18248 prefix="$acl_save_prefix"
18249
18250 if test "X$x" = "X-L$found_dir"; then
18251 haveit=yes
18252 break
18253 fi
18254 done
18255 if test -z "$haveit"; then
18256 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18257 fi
18258 if test "$hardcode_minus_L" != no; then
18259 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18260 else
18261 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18262 fi
18263 fi
18264 fi
18265 fi
18266 else
18267 if test "X$found_a" != "X"; then
18268 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18269 else
18270 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18271 fi
18272 fi
18273 additional_includedir=
18274 case "$found_dir" in
18275 */lib | */lib/)
18276 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18277 additional_includedir="$basedir/include"
18278 ;;
18279 esac
18280 if test "X$additional_includedir" != "X"; then
18281 if test "X$additional_includedir" != "X/usr/include"; then
18282 haveit=
18283 if test "X$additional_includedir" = "X/usr/local/include"; then
18284 if test -n "$GCC"; then
18285 case $host_os in
18286 linux*) haveit=yes;;
18287 esac
18288 fi
18289 fi
18290 if test -z "$haveit"; then
18291 for x in $CPPFLAGS $INCBABELTRACE; do
18292
18293 acl_save_prefix="$prefix"
18294 prefix="$acl_final_prefix"
18295 acl_save_exec_prefix="$exec_prefix"
18296 exec_prefix="$acl_final_exec_prefix"
18297 eval x=\"$x\"
18298 exec_prefix="$acl_save_exec_prefix"
18299 prefix="$acl_save_prefix"
18300
18301 if test "X$x" = "X-I$additional_includedir"; then
18302 haveit=yes
18303 break
18304 fi
18305 done
18306 if test -z "$haveit"; then
18307 if test -d "$additional_includedir"; then
18308 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18309 fi
18310 fi
18311 fi
18312 fi
18313 fi
18314 if test -n "$found_la"; then
18315 save_libdir="$libdir"
18316 case "$found_la" in
18317 */* | *\\*) . "$found_la" ;;
18318 *) . "./$found_la" ;;
18319 esac
18320 libdir="$save_libdir"
18321 for dep in $dependency_libs; do
18322 case "$dep" in
18323 -L*)
18324 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18325 if test "X$additional_libdir" != "X/usr/lib"; then
18326 haveit=
18327 if test "X$additional_libdir" = "X/usr/local/lib"; then
18328 if test -n "$GCC"; then
18329 case $host_os in
18330 linux*) haveit=yes;;
18331 esac
18332 fi
18333 fi
18334 if test -z "$haveit"; then
18335 haveit=
18336 for x in $LDFLAGS $LIBBABELTRACE; do
18337
18338 acl_save_prefix="$prefix"
18339 prefix="$acl_final_prefix"
18340 acl_save_exec_prefix="$exec_prefix"
18341 exec_prefix="$acl_final_exec_prefix"
18342 eval x=\"$x\"
18343 exec_prefix="$acl_save_exec_prefix"
18344 prefix="$acl_save_prefix"
18345
18346 if test "X$x" = "X-L$additional_libdir"; then
18347 haveit=yes
18348 break
18349 fi
18350 done
18351 if test -z "$haveit"; then
18352 if test -d "$additional_libdir"; then
18353 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18354 fi
18355 fi
18356 haveit=
18357 for x in $LDFLAGS $LTLIBBABELTRACE; do
18358
18359 acl_save_prefix="$prefix"
18360 prefix="$acl_final_prefix"
18361 acl_save_exec_prefix="$exec_prefix"
18362 exec_prefix="$acl_final_exec_prefix"
18363 eval x=\"$x\"
18364 exec_prefix="$acl_save_exec_prefix"
18365 prefix="$acl_save_prefix"
18366
18367 if test "X$x" = "X-L$additional_libdir"; then
18368 haveit=yes
18369 break
18370 fi
18371 done
18372 if test -z "$haveit"; then
18373 if test -d "$additional_libdir"; then
18374 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18375 fi
18376 fi
18377 fi
18378 fi
18379 ;;
18380 -R*)
18381 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18382 if test "$enable_rpath" != no; then
18383 haveit=
18384 for x in $rpathdirs; do
18385 if test "X$x" = "X$dir"; then
18386 haveit=yes
18387 break
18388 fi
18389 done
18390 if test -z "$haveit"; then
18391 rpathdirs="$rpathdirs $dir"
18392 fi
18393 haveit=
18394 for x in $ltrpathdirs; do
18395 if test "X$x" = "X$dir"; then
18396 haveit=yes
18397 break
18398 fi
18399 done
18400 if test -z "$haveit"; then
18401 ltrpathdirs="$ltrpathdirs $dir"
18402 fi
18403 fi
18404 ;;
18405 -l*)
18406 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18407 ;;
18408 *.la)
18409 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18410 ;;
18411 *)
18412 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18413 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18414 ;;
18415 esac
18416 done
18417 fi
18418 else
18419 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18420 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18421 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18422 else
18423 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18424 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18425 fi
18426 fi
18427 fi
18428 fi
18429 done
18430 done
18431 if test "X$rpathdirs" != "X"; then
18432 if test -n "$hardcode_libdir_separator"; then
18433 alldirs=
18434 for found_dir in $rpathdirs; do
18435 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18436 done
18437 acl_save_libdir="$libdir"
18438 libdir="$alldirs"
18439 eval flag=\"$hardcode_libdir_flag_spec\"
18440 libdir="$acl_save_libdir"
18441 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18442 else
18443 for found_dir in $rpathdirs; do
18444 acl_save_libdir="$libdir"
18445 libdir="$found_dir"
18446 eval flag=\"$hardcode_libdir_flag_spec\"
18447 libdir="$acl_save_libdir"
18448 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18449 done
18450 fi
18451 fi
18452 if test "X$ltrpathdirs" != "X"; then
18453 for found_dir in $ltrpathdirs; do
18454 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18455 done
18456 fi
18457
18458
18459 ac_save_CPPFLAGS="$CPPFLAGS"
18460
18461 for element in $INCBABELTRACE; do
18462 haveit=
18463 for x in $CPPFLAGS; do
18464
18465 acl_save_prefix="$prefix"
18466 prefix="$acl_final_prefix"
18467 acl_save_exec_prefix="$exec_prefix"
18468 exec_prefix="$acl_final_exec_prefix"
18469 eval x=\"$x\"
18470 exec_prefix="$acl_save_exec_prefix"
18471 prefix="$acl_save_prefix"
18472
18473 if test "X$x" = "X$element"; then
18474 haveit=yes
18475 break
18476 fi
18477 done
18478 if test -z "$haveit"; then
18479 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18480 fi
18481 done
18482
18483
18484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18485 $as_echo_n "checking for libbabeltrace... " >&6; }
18486 if ${ac_cv_libbabeltrace+:} false; then :
18487 $as_echo_n "(cached) " >&6
18488 else
18489
18490 ac_save_LIBS="$LIBS"
18491 LIBS="$LIBS $LIBBABELTRACE"
18492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18493 /* end confdefs.h. */
18494 #include <babeltrace/babeltrace.h>
18495 #include <babeltrace/ctf/events.h>
18496 #include <babeltrace/ctf/iterator.h>
18497 int
18498 main ()
18499 {
18500 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18501 struct bt_ctf_event *event = NULL;
18502 const struct bt_definition *scope;
18503
18504 pos->type = BT_SEEK_BEGIN;
18505 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
18506 scope = bt_ctf_get_top_level_scope (event,
18507 BT_STREAM_EVENT_HEADER);
18508 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18509
18510 ;
18511 return 0;
18512 }
18513 _ACEOF
18514 if ac_fn_c_try_link "$LINENO"; then :
18515 ac_cv_libbabeltrace=yes
18516 else
18517 ac_cv_libbabeltrace=no
18518 fi
18519 rm -f core conftest.err conftest.$ac_objext \
18520 conftest$ac_exeext conftest.$ac_ext
18521 LIBS="$ac_save_LIBS"
18522
18523 fi
18524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18525 $as_echo "$ac_cv_libbabeltrace" >&6; }
18526 if test "$ac_cv_libbabeltrace" = yes; then
18527 HAVE_LIBBABELTRACE=yes
18528
18529 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18530
18531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18532 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
18533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18534 $as_echo "$LIBBABELTRACE" >&6; }
18535 else
18536 HAVE_LIBBABELTRACE=no
18537 CPPFLAGS="$ac_save_CPPFLAGS"
18538 LIBBABELTRACE=
18539 LTLIBBABELTRACE=
18540 fi
18541
18542
18543
18544
18545
18546
18547 CFLAGS=$saved_CFLAGS
18548
18549 if test "$HAVE_LIBBABELTRACE" != yes; then
18550 if test "$with_babeltrace" = yes; then
18551 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
18552 else
18553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18554 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18555 fi
18556 fi
18557 fi
18558
18559 # Check for xxhash
18560
18561 # Check whether --with-xxhash was given.
18562 if test "${with_xxhash+set}" = set; then :
18563 withval=$with_xxhash;
18564 else
18565 with_xxhash=auto
18566 fi
18567
18568
18569 # Check whether --enable-libctf was given.
18570 if test "${enable_libctf+set}" = set; then :
18571 enableval=$enable_libctf;
18572 case "$enableval" in
18573 yes|no) ;;
18574 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18575 esac
18576
18577 else
18578 enable_libctf=yes
18579 fi
18580
18581
18582 if test x${enable_static} = xno; then
18583 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18584 CTF_DEPS="../libctf/.libs/libctf.so"
18585 else
18586 LIBCTF="../libctf/.libs/libctf.a"
18587 CTF_DEPS="$LIBCTF"
18588 fi
18589 if test "${enable_libctf}" = yes; then
18590
18591 $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18592
18593 else
18594 LIBCTF=
18595 CTF_DEPS=
18596 fi
18597
18598
18599
18600
18601 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18602 # empty version.
18603
18604 if test "x$with_xxhash" != "xno"; then
18605
18606
18607
18608
18609
18610
18611
18612
18613 use_additional=yes
18614
18615 acl_save_prefix="$prefix"
18616 prefix="$acl_final_prefix"
18617 acl_save_exec_prefix="$exec_prefix"
18618 exec_prefix="$acl_final_exec_prefix"
18619
18620 eval additional_includedir=\"$includedir\"
18621 eval additional_libdir=\"$libdir\"
18622
18623 exec_prefix="$acl_save_exec_prefix"
18624 prefix="$acl_save_prefix"
18625
18626
18627 # Check whether --with-libxxhash-prefix was given.
18628 if test "${with_libxxhash_prefix+set}" = set; then :
18629 withval=$with_libxxhash_prefix;
18630 if test "X$withval" = "Xno"; then
18631 use_additional=no
18632 else
18633 if test "X$withval" = "X"; then
18634
18635 acl_save_prefix="$prefix"
18636 prefix="$acl_final_prefix"
18637 acl_save_exec_prefix="$exec_prefix"
18638 exec_prefix="$acl_final_exec_prefix"
18639
18640 eval additional_includedir=\"$includedir\"
18641 eval additional_libdir=\"$libdir\"
18642
18643 exec_prefix="$acl_save_exec_prefix"
18644 prefix="$acl_save_prefix"
18645
18646 else
18647 additional_includedir="$withval/include"
18648 additional_libdir="$withval/lib"
18649 fi
18650 fi
18651
18652 fi
18653
18654
18655 # Check whether --with-libxxhash-type was given.
18656 if test "${with_libxxhash_type+set}" = set; then :
18657 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18658 else
18659 with_libxxhash_type=auto
18660 fi
18661
18662 lib_type=`eval echo \$with_libxxhash_type`
18663
18664 LIBXXHASH=
18665 LTLIBXXHASH=
18666 INCXXHASH=
18667 rpathdirs=
18668 ltrpathdirs=
18669 names_already_handled=
18670 names_next_round='xxhash '
18671 while test -n "$names_next_round"; do
18672 names_this_round="$names_next_round"
18673 names_next_round=
18674 for name in $names_this_round; do
18675 already_handled=
18676 for n in $names_already_handled; do
18677 if test "$n" = "$name"; then
18678 already_handled=yes
18679 break
18680 fi
18681 done
18682 if test -z "$already_handled"; then
18683 names_already_handled="$names_already_handled $name"
18684 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18685 eval value=\"\$HAVE_LIB$uppername\"
18686 if test -n "$value"; then
18687 if test "$value" = yes; then
18688 eval value=\"\$LIB$uppername\"
18689 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18690 eval value=\"\$LTLIB$uppername\"
18691 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18692 else
18693 :
18694 fi
18695 else
18696 found_dir=
18697 found_la=
18698 found_so=
18699 found_a=
18700 if test $use_additional = yes; then
18701 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18702 found_dir="$additional_libdir"
18703 found_so="$additional_libdir/lib$name.$shlibext"
18704 if test -f "$additional_libdir/lib$name.la"; then
18705 found_la="$additional_libdir/lib$name.la"
18706 fi
18707 elif test x$lib_type != xshared; then
18708 if test -f "$additional_libdir/lib$name.$libext"; then
18709 found_dir="$additional_libdir"
18710 found_a="$additional_libdir/lib$name.$libext"
18711 if test -f "$additional_libdir/lib$name.la"; then
18712 found_la="$additional_libdir/lib$name.la"
18713 fi
18714 fi
18715 fi
18716 fi
18717 if test "X$found_dir" = "X"; then
18718 for x in $LDFLAGS $LTLIBXXHASH; do
18719
18720 acl_save_prefix="$prefix"
18721 prefix="$acl_final_prefix"
18722 acl_save_exec_prefix="$exec_prefix"
18723 exec_prefix="$acl_final_exec_prefix"
18724 eval x=\"$x\"
18725 exec_prefix="$acl_save_exec_prefix"
18726 prefix="$acl_save_prefix"
18727
18728 case "$x" in
18729 -L*)
18730 dir=`echo "X$x" | sed -e 's/^X-L//'`
18731 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18732 found_dir="$dir"
18733 found_so="$dir/lib$name.$shlibext"
18734 if test -f "$dir/lib$name.la"; then
18735 found_la="$dir/lib$name.la"
18736 fi
18737 elif test x$lib_type != xshared; then
18738 if test -f "$dir/lib$name.$libext"; then
18739 found_dir="$dir"
18740 found_a="$dir/lib$name.$libext"
18741 if test -f "$dir/lib$name.la"; then
18742 found_la="$dir/lib$name.la"
18743 fi
18744 fi
18745 fi
18746 ;;
18747 esac
18748 if test "X$found_dir" != "X"; then
18749 break
18750 fi
18751 done
18752 fi
18753 if test "X$found_dir" != "X"; then
18754 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18755 if test "X$found_so" != "X"; then
18756 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18757 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18758 else
18759 haveit=
18760 for x in $ltrpathdirs; do
18761 if test "X$x" = "X$found_dir"; then
18762 haveit=yes
18763 break
18764 fi
18765 done
18766 if test -z "$haveit"; then
18767 ltrpathdirs="$ltrpathdirs $found_dir"
18768 fi
18769 if test "$hardcode_direct" = yes; then
18770 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18771 else
18772 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18773 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18774 haveit=
18775 for x in $rpathdirs; do
18776 if test "X$x" = "X$found_dir"; then
18777 haveit=yes
18778 break
18779 fi
18780 done
18781 if test -z "$haveit"; then
18782 rpathdirs="$rpathdirs $found_dir"
18783 fi
18784 else
18785 haveit=
18786 for x in $LDFLAGS $LIBXXHASH; do
18787
18788 acl_save_prefix="$prefix"
18789 prefix="$acl_final_prefix"
18790 acl_save_exec_prefix="$exec_prefix"
18791 exec_prefix="$acl_final_exec_prefix"
18792 eval x=\"$x\"
18793 exec_prefix="$acl_save_exec_prefix"
18794 prefix="$acl_save_prefix"
18795
18796 if test "X$x" = "X-L$found_dir"; then
18797 haveit=yes
18798 break
18799 fi
18800 done
18801 if test -z "$haveit"; then
18802 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18803 fi
18804 if test "$hardcode_minus_L" != no; then
18805 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18806 else
18807 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18808 fi
18809 fi
18810 fi
18811 fi
18812 else
18813 if test "X$found_a" != "X"; then
18814 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18815 else
18816 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18817 fi
18818 fi
18819 additional_includedir=
18820 case "$found_dir" in
18821 */lib | */lib/)
18822 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18823 additional_includedir="$basedir/include"
18824 ;;
18825 esac
18826 if test "X$additional_includedir" != "X"; then
18827 if test "X$additional_includedir" != "X/usr/include"; then
18828 haveit=
18829 if test "X$additional_includedir" = "X/usr/local/include"; then
18830 if test -n "$GCC"; then
18831 case $host_os in
18832 linux*) haveit=yes;;
18833 esac
18834 fi
18835 fi
18836 if test -z "$haveit"; then
18837 for x in $CPPFLAGS $INCXXHASH; do
18838
18839 acl_save_prefix="$prefix"
18840 prefix="$acl_final_prefix"
18841 acl_save_exec_prefix="$exec_prefix"
18842 exec_prefix="$acl_final_exec_prefix"
18843 eval x=\"$x\"
18844 exec_prefix="$acl_save_exec_prefix"
18845 prefix="$acl_save_prefix"
18846
18847 if test "X$x" = "X-I$additional_includedir"; then
18848 haveit=yes
18849 break
18850 fi
18851 done
18852 if test -z "$haveit"; then
18853 if test -d "$additional_includedir"; then
18854 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18855 fi
18856 fi
18857 fi
18858 fi
18859 fi
18860 if test -n "$found_la"; then
18861 save_libdir="$libdir"
18862 case "$found_la" in
18863 */* | *\\*) . "$found_la" ;;
18864 *) . "./$found_la" ;;
18865 esac
18866 libdir="$save_libdir"
18867 for dep in $dependency_libs; do
18868 case "$dep" in
18869 -L*)
18870 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18871 if test "X$additional_libdir" != "X/usr/lib"; then
18872 haveit=
18873 if test "X$additional_libdir" = "X/usr/local/lib"; then
18874 if test -n "$GCC"; then
18875 case $host_os in
18876 linux*) haveit=yes;;
18877 esac
18878 fi
18879 fi
18880 if test -z "$haveit"; then
18881 haveit=
18882 for x in $LDFLAGS $LIBXXHASH; do
18883
18884 acl_save_prefix="$prefix"
18885 prefix="$acl_final_prefix"
18886 acl_save_exec_prefix="$exec_prefix"
18887 exec_prefix="$acl_final_exec_prefix"
18888 eval x=\"$x\"
18889 exec_prefix="$acl_save_exec_prefix"
18890 prefix="$acl_save_prefix"
18891
18892 if test "X$x" = "X-L$additional_libdir"; then
18893 haveit=yes
18894 break
18895 fi
18896 done
18897 if test -z "$haveit"; then
18898 if test -d "$additional_libdir"; then
18899 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18900 fi
18901 fi
18902 haveit=
18903 for x in $LDFLAGS $LTLIBXXHASH; do
18904
18905 acl_save_prefix="$prefix"
18906 prefix="$acl_final_prefix"
18907 acl_save_exec_prefix="$exec_prefix"
18908 exec_prefix="$acl_final_exec_prefix"
18909 eval x=\"$x\"
18910 exec_prefix="$acl_save_exec_prefix"
18911 prefix="$acl_save_prefix"
18912
18913 if test "X$x" = "X-L$additional_libdir"; then
18914 haveit=yes
18915 break
18916 fi
18917 done
18918 if test -z "$haveit"; then
18919 if test -d "$additional_libdir"; then
18920 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18921 fi
18922 fi
18923 fi
18924 fi
18925 ;;
18926 -R*)
18927 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18928 if test "$enable_rpath" != no; then
18929 haveit=
18930 for x in $rpathdirs; do
18931 if test "X$x" = "X$dir"; then
18932 haveit=yes
18933 break
18934 fi
18935 done
18936 if test -z "$haveit"; then
18937 rpathdirs="$rpathdirs $dir"
18938 fi
18939 haveit=
18940 for x in $ltrpathdirs; do
18941 if test "X$x" = "X$dir"; then
18942 haveit=yes
18943 break
18944 fi
18945 done
18946 if test -z "$haveit"; then
18947 ltrpathdirs="$ltrpathdirs $dir"
18948 fi
18949 fi
18950 ;;
18951 -l*)
18952 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18953 ;;
18954 *.la)
18955 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18956 ;;
18957 *)
18958 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18959 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18960 ;;
18961 esac
18962 done
18963 fi
18964 else
18965 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18966 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18967 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18968 else
18969 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
18970 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
18971 fi
18972 fi
18973 fi
18974 fi
18975 done
18976 done
18977 if test "X$rpathdirs" != "X"; then
18978 if test -n "$hardcode_libdir_separator"; then
18979 alldirs=
18980 for found_dir in $rpathdirs; do
18981 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18982 done
18983 acl_save_libdir="$libdir"
18984 libdir="$alldirs"
18985 eval flag=\"$hardcode_libdir_flag_spec\"
18986 libdir="$acl_save_libdir"
18987 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18988 else
18989 for found_dir in $rpathdirs; do
18990 acl_save_libdir="$libdir"
18991 libdir="$found_dir"
18992 eval flag=\"$hardcode_libdir_flag_spec\"
18993 libdir="$acl_save_libdir"
18994 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18995 done
18996 fi
18997 fi
18998 if test "X$ltrpathdirs" != "X"; then
18999 for found_dir in $ltrpathdirs; do
19000 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19001 done
19002 fi
19003
19004
19005 ac_save_CPPFLAGS="$CPPFLAGS"
19006
19007 for element in $INCXXHASH; do
19008 haveit=
19009 for x in $CPPFLAGS; do
19010
19011 acl_save_prefix="$prefix"
19012 prefix="$acl_final_prefix"
19013 acl_save_exec_prefix="$exec_prefix"
19014 exec_prefix="$acl_final_exec_prefix"
19015 eval x=\"$x\"
19016 exec_prefix="$acl_save_exec_prefix"
19017 prefix="$acl_save_prefix"
19018
19019 if test "X$x" = "X$element"; then
19020 haveit=yes
19021 break
19022 fi
19023 done
19024 if test -z "$haveit"; then
19025 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19026 fi
19027 done
19028
19029
19030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19031 $as_echo_n "checking for libxxhash... " >&6; }
19032 if ${ac_cv_libxxhash+:} false; then :
19033 $as_echo_n "(cached) " >&6
19034 else
19035
19036 ac_save_LIBS="$LIBS"
19037 LIBS="$LIBS $LIBXXHASH"
19038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19039 /* end confdefs.h. */
19040 #include <xxhash.h>
19041 int
19042 main ()
19043 {
19044 XXH32("foo", 3, 0);
19045
19046 ;
19047 return 0;
19048 }
19049 _ACEOF
19050 if ac_fn_c_try_link "$LINENO"; then :
19051 ac_cv_libxxhash=yes
19052 else
19053 ac_cv_libxxhash=no
19054 fi
19055 rm -f core conftest.err conftest.$ac_objext \
19056 conftest$ac_exeext conftest.$ac_ext
19057 LIBS="$ac_save_LIBS"
19058
19059 fi
19060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19061 $as_echo "$ac_cv_libxxhash" >&6; }
19062 if test "$ac_cv_libxxhash" = yes; then
19063 HAVE_LIBXXHASH=yes
19064
19065 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19066
19067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19068 $as_echo_n "checking how to link with libxxhash... " >&6; }
19069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19070 $as_echo "$LIBXXHASH" >&6; }
19071 else
19072 HAVE_LIBXXHASH=no
19073 CPPFLAGS="$ac_save_CPPFLAGS"
19074 LIBXXHASH=
19075 LTLIBXXHASH=
19076 fi
19077
19078
19079
19080
19081
19082
19083 if test "$HAVE_LIBXXHASH" != yes; then
19084 if test "$with_xxhash" = yes; then
19085 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19086 fi
19087 fi
19088 if test "x$with_xxhash" = "xauto"; then
19089 with_xxhash="$HAVE_LIBXXHASH"
19090 fi
19091 fi
19092
19093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19094 $as_echo_n "checking whether to use xxhash... " >&6; }
19095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19096 $as_echo "$with_xxhash" >&6; }
19097
19098 NM_H=
19099 rm -f nm.h
19100 if test "${nativefile}" != ""; then
19101 case "${nativefile}" in
19102 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19103 * ) GDB_NM_FILE="${nativefile}"
19104 esac
19105 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19106
19107
19108 cat >>confdefs.h <<_ACEOF
19109 #define GDB_NM_FILE "${GDB_NM_FILE}"
19110 _ACEOF
19111
19112 NM_H=nm.h
19113 fi
19114
19115
19116
19117 for ac_prog in xsltproc
19118 do
19119 # Extract the first word of "$ac_prog", so it can be a program name with args.
19120 set dummy $ac_prog; ac_word=$2
19121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19122 $as_echo_n "checking for $ac_word... " >&6; }
19123 if ${ac_cv_path_XSLTPROC+:} false; then :
19124 $as_echo_n "(cached) " >&6
19125 else
19126 case $XSLTPROC in
19127 [\\/]* | ?:[\\/]*)
19128 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19129 ;;
19130 *)
19131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19132 for as_dir in $PATH
19133 do
19134 IFS=$as_save_IFS
19135 test -z "$as_dir" && as_dir=.
19136 for ac_exec_ext in '' $ac_executable_extensions; do
19137 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19138 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19139 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19140 break 2
19141 fi
19142 done
19143 done
19144 IFS=$as_save_IFS
19145
19146 ;;
19147 esac
19148 fi
19149 XSLTPROC=$ac_cv_path_XSLTPROC
19150 if test -n "$XSLTPROC"; then
19151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19152 $as_echo "$XSLTPROC" >&6; }
19153 else
19154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19155 $as_echo "no" >&6; }
19156 fi
19157
19158
19159 test -n "$XSLTPROC" && break
19160 done
19161 test -n "$XSLTPROC" || XSLTPROC="missing"
19162
19163 if test "x$USE_MAINTAINER_MODE" = xyes; then
19164 if test "${XSLTPROC}" = missing; then
19165 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19166 fi
19167 fi
19168
19169
19170
19171
19172
19173 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19174
19175
19176
19177 # Check whether we will enable the inclusion of unit tests when
19178 # compiling GDB.
19179 #
19180 # The default value of this option changes depending whether we're on
19181 # development mode (in which case it's "true") or not (in which case
19182 # it's "false"). The $development variable is set by the GDB_AC_COMMON
19183 # macro, which must therefore be used before GDB_AC_SELFTEST.
19184
19185 if test "x$development" != xtrue && test "x$development" != xfalse; then :
19186 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19187 fi
19188
19189 # Check whether --enable-unit-tests was given.
19190 if test "${enable_unit_tests+set}" = set; then :
19191 enableval=$enable_unit_tests; case "${enableval}" in
19192 yes) enable_unittests=true ;;
19193 no) enable_unittests=false ;;
19194 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19195 esac
19196 else
19197 enable_unittests=$development
19198 fi
19199
19200
19201 if $enable_unittests; then
19202
19203 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19204
19205
19206 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19207 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19208
19209 fi
19210
19211
19212
19213 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19214 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19215 if test "x$GDB_TRANSFORM_NAME" = x; then
19216 GDB_TRANSFORM_NAME=gdb
19217 fi
19218
19219
19220
19221 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19222 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19223 if test "x$GCORE_TRANSFORM_NAME" = x; then
19224 GCORE_TRANSFORM_NAME=gcore
19225 fi
19226
19227
19228 ac_config_files="$ac_config_files gcore"
19229
19230 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19231
19232
19233 cat >confcache <<\_ACEOF
19234 # This file is a shell script that caches the results of configure
19235 # tests run on this system so they can be shared between configure
19236 # scripts and configure runs, see configure's option --config-cache.
19237 # It is not useful on other systems. If it contains results you don't
19238 # want to keep, you may remove or edit it.
19239 #
19240 # config.status only pays attention to the cache file if you give it
19241 # the --recheck option to rerun configure.
19242 #
19243 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19244 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19245 # following values.
19246
19247 _ACEOF
19248
19249 # The following way of writing the cache mishandles newlines in values,
19250 # but we know of no workaround that is simple, portable, and efficient.
19251 # So, we kill variables containing newlines.
19252 # Ultrix sh set writes to stderr and can't be redirected directly,
19253 # and sets the high bit in the cache file unless we assign to the vars.
19254 (
19255 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19256 eval ac_val=\$$ac_var
19257 case $ac_val in #(
19258 *${as_nl}*)
19259 case $ac_var in #(
19260 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19261 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19262 esac
19263 case $ac_var in #(
19264 _ | IFS | as_nl) ;; #(
19265 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19266 *) { eval $ac_var=; unset $ac_var;} ;;
19267 esac ;;
19268 esac
19269 done
19270
19271 (set) 2>&1 |
19272 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19273 *${as_nl}ac_space=\ *)
19274 # `set' does not quote correctly, so add quotes: double-quote
19275 # substitution turns \\\\ into \\, and sed turns \\ into \.
19276 sed -n \
19277 "s/'/'\\\\''/g;
19278 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19279 ;; #(
19280 *)
19281 # `set' quotes correctly as required by POSIX, so do not add quotes.
19282 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19283 ;;
19284 esac |
19285 sort
19286 ) |
19287 sed '
19288 /^ac_cv_env_/b end
19289 t clear
19290 :clear
19291 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19292 t end
19293 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19294 :end' >>confcache
19295 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19296 if test -w "$cache_file"; then
19297 if test "x$cache_file" != "x/dev/null"; then
19298 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19299 $as_echo "$as_me: updating cache $cache_file" >&6;}
19300 if test ! -f "$cache_file" || test -h "$cache_file"; then
19301 cat confcache >"$cache_file"
19302 else
19303 case $cache_file in #(
19304 */* | ?:*)
19305 mv -f confcache "$cache_file"$$ &&
19306 mv -f "$cache_file"$$ "$cache_file" ;; #(
19307 *)
19308 mv -f confcache "$cache_file" ;;
19309 esac
19310 fi
19311 fi
19312 else
19313 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19314 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19315 fi
19316 fi
19317 rm -f confcache
19318
19319 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19320 # Let make expand exec_prefix.
19321 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19322
19323 DEFS=-DHAVE_CONFIG_H
19324
19325 ac_libobjs=
19326 ac_ltlibobjs=
19327 U=
19328 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19329 # 1. Remove the extension, and $U if already installed.
19330 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19331 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19332 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19333 # will be set to the directory where LIBOBJS objects are built.
19334 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19335 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19336 done
19337 LIBOBJS=$ac_libobjs
19338
19339 LTLIBOBJS=$ac_ltlibobjs
19340
19341
19342 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19343 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19344 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19345 fi
19346 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19347 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19348 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19349 fi
19350 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19351 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19352 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19353 fi
19354
19355
19356 : "${CONFIG_STATUS=./config.status}"
19357 ac_write_fail=0
19358 ac_clean_files_save=$ac_clean_files
19359 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19360 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19361 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19362 as_write_fail=0
19363 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19364 #! $SHELL
19365 # Generated by $as_me.
19366 # Run this file to recreate the current configuration.
19367 # Compiler output produced by configure, useful for debugging
19368 # configure, is in config.log if it exists.
19369
19370 debug=false
19371 ac_cs_recheck=false
19372 ac_cs_silent=false
19373
19374 SHELL=\${CONFIG_SHELL-$SHELL}
19375 export SHELL
19376 _ASEOF
19377 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19378 ## -------------------- ##
19379 ## M4sh Initialization. ##
19380 ## -------------------- ##
19381
19382 # Be more Bourne compatible
19383 DUALCASE=1; export DUALCASE # for MKS sh
19384 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19385 emulate sh
19386 NULLCMD=:
19387 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19388 # is contrary to our usage. Disable this feature.
19389 alias -g '${1+"$@"}'='"$@"'
19390 setopt NO_GLOB_SUBST
19391 else
19392 case `(set -o) 2>/dev/null` in #(
19393 *posix*) :
19394 set -o posix ;; #(
19395 *) :
19396 ;;
19397 esac
19398 fi
19399
19400
19401 as_nl='
19402 '
19403 export as_nl
19404 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19405 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19406 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19407 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19408 # Prefer a ksh shell builtin over an external printf program on Solaris,
19409 # but without wasting forks for bash or zsh.
19410 if test -z "$BASH_VERSION$ZSH_VERSION" \
19411 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19412 as_echo='print -r --'
19413 as_echo_n='print -rn --'
19414 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19415 as_echo='printf %s\n'
19416 as_echo_n='printf %s'
19417 else
19418 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19419 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19420 as_echo_n='/usr/ucb/echo -n'
19421 else
19422 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19423 as_echo_n_body='eval
19424 arg=$1;
19425 case $arg in #(
19426 *"$as_nl"*)
19427 expr "X$arg" : "X\\(.*\\)$as_nl";
19428 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19429 esac;
19430 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19431 '
19432 export as_echo_n_body
19433 as_echo_n='sh -c $as_echo_n_body as_echo'
19434 fi
19435 export as_echo_body
19436 as_echo='sh -c $as_echo_body as_echo'
19437 fi
19438
19439 # The user is always right.
19440 if test "${PATH_SEPARATOR+set}" != set; then
19441 PATH_SEPARATOR=:
19442 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19443 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19444 PATH_SEPARATOR=';'
19445 }
19446 fi
19447
19448
19449 # IFS
19450 # We need space, tab and new line, in precisely that order. Quoting is
19451 # there to prevent editors from complaining about space-tab.
19452 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19453 # splitting by setting IFS to empty value.)
19454 IFS=" "" $as_nl"
19455
19456 # Find who we are. Look in the path if we contain no directory separator.
19457 as_myself=
19458 case $0 in #((
19459 *[\\/]* ) as_myself=$0 ;;
19460 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19461 for as_dir in $PATH
19462 do
19463 IFS=$as_save_IFS
19464 test -z "$as_dir" && as_dir=.
19465 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19466 done
19467 IFS=$as_save_IFS
19468
19469 ;;
19470 esac
19471 # We did not find ourselves, most probably we were run as `sh COMMAND'
19472 # in which case we are not to be found in the path.
19473 if test "x$as_myself" = x; then
19474 as_myself=$0
19475 fi
19476 if test ! -f "$as_myself"; then
19477 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19478 exit 1
19479 fi
19480
19481 # Unset variables that we do not need and which cause bugs (e.g. in
19482 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19483 # suppresses any "Segmentation fault" message there. '((' could
19484 # trigger a bug in pdksh 5.2.14.
19485 for as_var in BASH_ENV ENV MAIL MAILPATH
19486 do eval test x\${$as_var+set} = xset \
19487 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19488 done
19489 PS1='$ '
19490 PS2='> '
19491 PS4='+ '
19492
19493 # NLS nuisances.
19494 LC_ALL=C
19495 export LC_ALL
19496 LANGUAGE=C
19497 export LANGUAGE
19498
19499 # CDPATH.
19500 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19501
19502
19503 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19504 # ----------------------------------------
19505 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19506 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19507 # script with STATUS, using 1 if that was 0.
19508 as_fn_error ()
19509 {
19510 as_status=$1; test $as_status -eq 0 && as_status=1
19511 if test "$4"; then
19512 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19513 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19514 fi
19515 $as_echo "$as_me: error: $2" >&2
19516 as_fn_exit $as_status
19517 } # as_fn_error
19518
19519
19520 # as_fn_set_status STATUS
19521 # -----------------------
19522 # Set $? to STATUS, without forking.
19523 as_fn_set_status ()
19524 {
19525 return $1
19526 } # as_fn_set_status
19527
19528 # as_fn_exit STATUS
19529 # -----------------
19530 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19531 as_fn_exit ()
19532 {
19533 set +e
19534 as_fn_set_status $1
19535 exit $1
19536 } # as_fn_exit
19537
19538 # as_fn_unset VAR
19539 # ---------------
19540 # Portably unset VAR.
19541 as_fn_unset ()
19542 {
19543 { eval $1=; unset $1;}
19544 }
19545 as_unset=as_fn_unset
19546 # as_fn_append VAR VALUE
19547 # ----------------------
19548 # Append the text in VALUE to the end of the definition contained in VAR. Take
19549 # advantage of any shell optimizations that allow amortized linear growth over
19550 # repeated appends, instead of the typical quadratic growth present in naive
19551 # implementations.
19552 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19553 eval 'as_fn_append ()
19554 {
19555 eval $1+=\$2
19556 }'
19557 else
19558 as_fn_append ()
19559 {
19560 eval $1=\$$1\$2
19561 }
19562 fi # as_fn_append
19563
19564 # as_fn_arith ARG...
19565 # ------------------
19566 # Perform arithmetic evaluation on the ARGs, and store the result in the
19567 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19568 # must be portable across $(()) and expr.
19569 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19570 eval 'as_fn_arith ()
19571 {
19572 as_val=$(( $* ))
19573 }'
19574 else
19575 as_fn_arith ()
19576 {
19577 as_val=`expr "$@" || test $? -eq 1`
19578 }
19579 fi # as_fn_arith
19580
19581
19582 if expr a : '\(a\)' >/dev/null 2>&1 &&
19583 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19584 as_expr=expr
19585 else
19586 as_expr=false
19587 fi
19588
19589 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19590 as_basename=basename
19591 else
19592 as_basename=false
19593 fi
19594
19595 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19596 as_dirname=dirname
19597 else
19598 as_dirname=false
19599 fi
19600
19601 as_me=`$as_basename -- "$0" ||
19602 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19603 X"$0" : 'X\(//\)$' \| \
19604 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19605 $as_echo X/"$0" |
19606 sed '/^.*\/\([^/][^/]*\)\/*$/{
19607 s//\1/
19608 q
19609 }
19610 /^X\/\(\/\/\)$/{
19611 s//\1/
19612 q
19613 }
19614 /^X\/\(\/\).*/{
19615 s//\1/
19616 q
19617 }
19618 s/.*/./; q'`
19619
19620 # Avoid depending upon Character Ranges.
19621 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19622 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19623 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19624 as_cr_digits='0123456789'
19625 as_cr_alnum=$as_cr_Letters$as_cr_digits
19626
19627 ECHO_C= ECHO_N= ECHO_T=
19628 case `echo -n x` in #(((((
19629 -n*)
19630 case `echo 'xy\c'` in
19631 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19632 xy) ECHO_C='\c';;
19633 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19634 ECHO_T=' ';;
19635 esac;;
19636 *)
19637 ECHO_N='-n';;
19638 esac
19639
19640 rm -f conf$$ conf$$.exe conf$$.file
19641 if test -d conf$$.dir; then
19642 rm -f conf$$.dir/conf$$.file
19643 else
19644 rm -f conf$$.dir
19645 mkdir conf$$.dir 2>/dev/null
19646 fi
19647 if (echo >conf$$.file) 2>/dev/null; then
19648 if ln -s conf$$.file conf$$ 2>/dev/null; then
19649 as_ln_s='ln -s'
19650 # ... but there are two gotchas:
19651 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19652 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19653 # In both cases, we have to default to `cp -pR'.
19654 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19655 as_ln_s='cp -pR'
19656 elif ln conf$$.file conf$$ 2>/dev/null; then
19657 as_ln_s=ln
19658 else
19659 as_ln_s='cp -pR'
19660 fi
19661 else
19662 as_ln_s='cp -pR'
19663 fi
19664 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19665 rmdir conf$$.dir 2>/dev/null
19666
19667
19668 # as_fn_mkdir_p
19669 # -------------
19670 # Create "$as_dir" as a directory, including parents if necessary.
19671 as_fn_mkdir_p ()
19672 {
19673
19674 case $as_dir in #(
19675 -*) as_dir=./$as_dir;;
19676 esac
19677 test -d "$as_dir" || eval $as_mkdir_p || {
19678 as_dirs=
19679 while :; do
19680 case $as_dir in #(
19681 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19682 *) as_qdir=$as_dir;;
19683 esac
19684 as_dirs="'$as_qdir' $as_dirs"
19685 as_dir=`$as_dirname -- "$as_dir" ||
19686 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19687 X"$as_dir" : 'X\(//\)[^/]' \| \
19688 X"$as_dir" : 'X\(//\)$' \| \
19689 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19690 $as_echo X"$as_dir" |
19691 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19692 s//\1/
19693 q
19694 }
19695 /^X\(\/\/\)[^/].*/{
19696 s//\1/
19697 q
19698 }
19699 /^X\(\/\/\)$/{
19700 s//\1/
19701 q
19702 }
19703 /^X\(\/\).*/{
19704 s//\1/
19705 q
19706 }
19707 s/.*/./; q'`
19708 test -d "$as_dir" && break
19709 done
19710 test -z "$as_dirs" || eval "mkdir $as_dirs"
19711 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19712
19713
19714 } # as_fn_mkdir_p
19715 if mkdir -p . 2>/dev/null; then
19716 as_mkdir_p='mkdir -p "$as_dir"'
19717 else
19718 test -d ./-p && rmdir ./-p
19719 as_mkdir_p=false
19720 fi
19721
19722
19723 # as_fn_executable_p FILE
19724 # -----------------------
19725 # Test if FILE is an executable regular file.
19726 as_fn_executable_p ()
19727 {
19728 test -f "$1" && test -x "$1"
19729 } # as_fn_executable_p
19730 as_test_x='test -x'
19731 as_executable_p=as_fn_executable_p
19732
19733 # Sed expression to map a string onto a valid CPP name.
19734 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19735
19736 # Sed expression to map a string onto a valid variable name.
19737 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19738
19739
19740 exec 6>&1
19741 ## ----------------------------------- ##
19742 ## Main body of $CONFIG_STATUS script. ##
19743 ## ----------------------------------- ##
19744 _ASEOF
19745 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19746
19747 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19748 # Save the log message, to keep $0 and so on meaningful, and to
19749 # report actual input values of CONFIG_FILES etc. instead of their
19750 # values after options handling.
19751 ac_log="
19752 This file was extended by $as_me, which was
19753 generated by GNU Autoconf 2.69. Invocation command line was
19754
19755 CONFIG_FILES = $CONFIG_FILES
19756 CONFIG_HEADERS = $CONFIG_HEADERS
19757 CONFIG_LINKS = $CONFIG_LINKS
19758 CONFIG_COMMANDS = $CONFIG_COMMANDS
19759 $ $0 $@
19760
19761 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19762 "
19763
19764 _ACEOF
19765
19766 case $ac_config_files in *"
19767 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19768 esac
19769
19770 case $ac_config_headers in *"
19771 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19772 esac
19773
19774
19775 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19776 # Files that config.status was made for.
19777 config_files="$ac_config_files"
19778 config_headers="$ac_config_headers"
19779 config_links="$ac_config_links"
19780 config_commands="$ac_config_commands"
19781
19782 _ACEOF
19783
19784 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19785 ac_cs_usage="\
19786 \`$as_me' instantiates files and other configuration actions
19787 from templates according to the current configuration. Unless the files
19788 and actions are specified as TAGs, all are instantiated by default.
19789
19790 Usage: $0 [OPTION]... [TAG]...
19791
19792 -h, --help print this help, then exit
19793 -V, --version print version number and configuration settings, then exit
19794 --config print configuration, then exit
19795 -q, --quiet, --silent
19796 do not print progress messages
19797 -d, --debug don't remove temporary files
19798 --recheck update $as_me by reconfiguring in the same conditions
19799 --file=FILE[:TEMPLATE]
19800 instantiate the configuration file FILE
19801 --header=FILE[:TEMPLATE]
19802 instantiate the configuration header FILE
19803
19804 Configuration files:
19805 $config_files
19806
19807 Configuration headers:
19808 $config_headers
19809
19810 Configuration links:
19811 $config_links
19812
19813 Configuration commands:
19814 $config_commands
19815
19816 Report bugs to the package provider."
19817
19818 _ACEOF
19819 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19820 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19821 ac_cs_version="\\
19822 config.status
19823 configured by $0, generated by GNU Autoconf 2.69,
19824 with options \\"\$ac_cs_config\\"
19825
19826 Copyright (C) 2012 Free Software Foundation, Inc.
19827 This config.status script is free software; the Free Software Foundation
19828 gives unlimited permission to copy, distribute and modify it."
19829
19830 ac_pwd='$ac_pwd'
19831 srcdir='$srcdir'
19832 INSTALL='$INSTALL'
19833 AWK='$AWK'
19834 test -n "\$AWK" || AWK=awk
19835 _ACEOF
19836
19837 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19838 # The default lists apply if the user does not specify any file.
19839 ac_need_defaults=:
19840 while test $# != 0
19841 do
19842 case $1 in
19843 --*=?*)
19844 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19845 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19846 ac_shift=:
19847 ;;
19848 --*=)
19849 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19850 ac_optarg=
19851 ac_shift=:
19852 ;;
19853 *)
19854 ac_option=$1
19855 ac_optarg=$2
19856 ac_shift=shift
19857 ;;
19858 esac
19859
19860 case $ac_option in
19861 # Handling of the options.
19862 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19863 ac_cs_recheck=: ;;
19864 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19865 $as_echo "$ac_cs_version"; exit ;;
19866 --config | --confi | --conf | --con | --co | --c )
19867 $as_echo "$ac_cs_config"; exit ;;
19868 --debug | --debu | --deb | --de | --d | -d )
19869 debug=: ;;
19870 --file | --fil | --fi | --f )
19871 $ac_shift
19872 case $ac_optarg in
19873 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19874 '') as_fn_error $? "missing file argument" ;;
19875 esac
19876 as_fn_append CONFIG_FILES " '$ac_optarg'"
19877 ac_need_defaults=false;;
19878 --header | --heade | --head | --hea )
19879 $ac_shift
19880 case $ac_optarg in
19881 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19882 esac
19883 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19884 ac_need_defaults=false;;
19885 --he | --h)
19886 # Conflict between --help and --header
19887 as_fn_error $? "ambiguous option: \`$1'
19888 Try \`$0 --help' for more information.";;
19889 --help | --hel | -h )
19890 $as_echo "$ac_cs_usage"; exit ;;
19891 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19892 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19893 ac_cs_silent=: ;;
19894
19895 # This is an error.
19896 -*) as_fn_error $? "unrecognized option: \`$1'
19897 Try \`$0 --help' for more information." ;;
19898
19899 *) as_fn_append ac_config_targets " $1"
19900 ac_need_defaults=false ;;
19901
19902 esac
19903 shift
19904 done
19905
19906 ac_configure_extra_args=
19907
19908 if $ac_cs_silent; then
19909 exec 6>/dev/null
19910 ac_configure_extra_args="$ac_configure_extra_args --silent"
19911 fi
19912
19913 _ACEOF
19914 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19915 if \$ac_cs_recheck; then
19916 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19917 shift
19918 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19919 CONFIG_SHELL='$SHELL'
19920 export CONFIG_SHELL
19921 exec "\$@"
19922 fi
19923
19924 _ACEOF
19925 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19926 exec 5>>config.log
19927 {
19928 echo
19929 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19930 ## Running $as_me. ##
19931 _ASBOX
19932 $as_echo "$ac_log"
19933 } >&5
19934
19935 _ACEOF
19936 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19937 #
19938 # INIT-COMMANDS
19939 #
19940 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
19941 GDB_NM_FILE=$GDB_NM_FILE
19942
19943 _ACEOF
19944
19945 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19946
19947 # Handling of arguments.
19948 for ac_config_target in $ac_config_targets
19949 do
19950 case $ac_config_target in
19951 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19952 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
19953 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
19954 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
19955 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
19956 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19957 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
19958 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
19959 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
19960 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
19961
19962 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19963 esac
19964 done
19965
19966
19967 # If the user did not use the arguments to specify the items to instantiate,
19968 # then the envvar interface is used. Set only those that are not.
19969 # We use the long form for the default assignment because of an extremely
19970 # bizarre bug on SunOS 4.1.3.
19971 if $ac_need_defaults; then
19972 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19973 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19974 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19975 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19976 fi
19977
19978 # Have a temporary directory for convenience. Make it in the build tree
19979 # simply because there is no reason against having it here, and in addition,
19980 # creating and moving files from /tmp can sometimes cause problems.
19981 # Hook for its removal unless debugging.
19982 # Note that there is a small window in which the directory will not be cleaned:
19983 # after its creation but before its name has been assigned to `$tmp'.
19984 $debug ||
19985 {
19986 tmp= ac_tmp=
19987 trap 'exit_status=$?
19988 : "${ac_tmp:=$tmp}"
19989 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19990 ' 0
19991 trap 'as_fn_exit 1' 1 2 13 15
19992 }
19993 # Create a (secure) tmp directory for tmp files.
19994
19995 {
19996 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19997 test -d "$tmp"
19998 } ||
19999 {
20000 tmp=./conf$$-$RANDOM
20001 (umask 077 && mkdir "$tmp")
20002 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20003 ac_tmp=$tmp
20004
20005 # Set up the scripts for CONFIG_FILES section.
20006 # No need to generate them if there are no CONFIG_FILES.
20007 # This happens for instance with `./config.status config.h'.
20008 if test -n "$CONFIG_FILES"; then
20009
20010 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20011 ac_cs_awk_getline=:
20012 ac_cs_awk_pipe_init=
20013 ac_cs_awk_read_file='
20014 while ((getline aline < (F[key])) > 0)
20015 print(aline)
20016 close(F[key])'
20017 ac_cs_awk_pipe_fini=
20018 else
20019 ac_cs_awk_getline=false
20020 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20021 ac_cs_awk_read_file='
20022 print "|#_!!_#|"
20023 print "cat " F[key] " &&"
20024 '$ac_cs_awk_pipe_init
20025 # The final `:' finishes the AND list.
20026 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20027 fi
20028 ac_cr=`echo X | tr X '\015'`
20029 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20030 # But we know of no other shell where ac_cr would be empty at this
20031 # point, so we can use a bashism as a fallback.
20032 if test "x$ac_cr" = x; then
20033 eval ac_cr=\$\'\\r\'
20034 fi
20035 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20036 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20037 ac_cs_awk_cr='\\r'
20038 else
20039 ac_cs_awk_cr=$ac_cr
20040 fi
20041
20042 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20043 _ACEOF
20044
20045 # Create commands to substitute file output variables.
20046 {
20047 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20048 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20049 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20050 echo "_ACAWK" &&
20051 echo "_ACEOF"
20052 } >conf$$files.sh &&
20053 . ./conf$$files.sh ||
20054 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20055 rm -f conf$$files.sh
20056
20057 {
20058 echo "cat >conf$$subs.awk <<_ACEOF" &&
20059 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20060 echo "_ACEOF"
20061 } >conf$$subs.sh ||
20062 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20063 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20064 ac_delim='%!_!# '
20065 for ac_last_try in false false false false false :; do
20066 . ./conf$$subs.sh ||
20067 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20068
20069 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20070 if test $ac_delim_n = $ac_delim_num; then
20071 break
20072 elif $ac_last_try; then
20073 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20074 else
20075 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20076 fi
20077 done
20078 rm -f conf$$subs.sh
20079
20080 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20081 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20082 _ACEOF
20083 sed -n '
20084 h
20085 s/^/S["/; s/!.*/"]=/
20086 p
20087 g
20088 s/^[^!]*!//
20089 :repl
20090 t repl
20091 s/'"$ac_delim"'$//
20092 t delim
20093 :nl
20094 h
20095 s/\(.\{148\}\)..*/\1/
20096 t more1
20097 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20098 p
20099 n
20100 b repl
20101 :more1
20102 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20103 p
20104 g
20105 s/.\{148\}//
20106 t nl
20107 :delim
20108 h
20109 s/\(.\{148\}\)..*/\1/
20110 t more2
20111 s/["\\]/\\&/g; s/^/"/; s/$/"/
20112 p
20113 b
20114 :more2
20115 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20116 p
20117 g
20118 s/.\{148\}//
20119 t delim
20120 ' <conf$$subs.awk | sed '
20121 /^[^""]/{
20122 N
20123 s/\n//
20124 }
20125 ' >>$CONFIG_STATUS || ac_write_fail=1
20126 rm -f conf$$subs.awk
20127 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20128 _ACAWK
20129 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20130 for (key in S) S_is_set[key] = 1
20131 FS = "\a"
20132 \$ac_cs_awk_pipe_init
20133 }
20134 {
20135 line = $ 0
20136 nfields = split(line, field, "@")
20137 substed = 0
20138 len = length(field[1])
20139 for (i = 2; i < nfields; i++) {
20140 key = field[i]
20141 keylen = length(key)
20142 if (S_is_set[key]) {
20143 value = S[key]
20144 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20145 len += length(value) + length(field[++i])
20146 substed = 1
20147 } else
20148 len += 1 + keylen
20149 }
20150 if (nfields == 3 && !substed) {
20151 key = field[2]
20152 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20153 \$ac_cs_awk_read_file
20154 next
20155 }
20156 }
20157 print line
20158 }
20159 \$ac_cs_awk_pipe_fini
20160 _ACAWK
20161 _ACEOF
20162 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20163 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20164 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20165 else
20166 cat
20167 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20168 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20169 _ACEOF
20170
20171 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20172 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20173 # trailing colons and then remove the whole line if VPATH becomes empty
20174 # (actually we leave an empty line to preserve line numbers).
20175 if test "x$srcdir" = x.; then
20176 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20177 h
20178 s///
20179 s/^/:/
20180 s/[ ]*$/:/
20181 s/:\$(srcdir):/:/g
20182 s/:\${srcdir}:/:/g
20183 s/:@srcdir@:/:/g
20184 s/^:*//
20185 s/:*$//
20186 x
20187 s/\(=[ ]*\).*/\1/
20188 G
20189 s/\n//
20190 s/^[^=]*=[ ]*$//
20191 }'
20192 fi
20193
20194 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20195 fi # test -n "$CONFIG_FILES"
20196
20197 # Set up the scripts for CONFIG_HEADERS section.
20198 # No need to generate them if there are no CONFIG_HEADERS.
20199 # This happens for instance with `./config.status Makefile'.
20200 if test -n "$CONFIG_HEADERS"; then
20201 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20202 BEGIN {
20203 _ACEOF
20204
20205 # Transform confdefs.h into an awk script `defines.awk', embedded as
20206 # here-document in config.status, that substitutes the proper values into
20207 # config.h.in to produce config.h.
20208
20209 # Create a delimiter string that does not exist in confdefs.h, to ease
20210 # handling of long lines.
20211 ac_delim='%!_!# '
20212 for ac_last_try in false false :; do
20213 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20214 if test -z "$ac_tt"; then
20215 break
20216 elif $ac_last_try; then
20217 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20218 else
20219 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20220 fi
20221 done
20222
20223 # For the awk script, D is an array of macro values keyed by name,
20224 # likewise P contains macro parameters if any. Preserve backslash
20225 # newline sequences.
20226
20227 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20228 sed -n '
20229 s/.\{148\}/&'"$ac_delim"'/g
20230 t rset
20231 :rset
20232 s/^[ ]*#[ ]*define[ ][ ]*/ /
20233 t def
20234 d
20235 :def
20236 s/\\$//
20237 t bsnl
20238 s/["\\]/\\&/g
20239 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20240 D["\1"]=" \3"/p
20241 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20242 d
20243 :bsnl
20244 s/["\\]/\\&/g
20245 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20246 D["\1"]=" \3\\\\\\n"\\/p
20247 t cont
20248 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20249 t cont
20250 d
20251 :cont
20252 n
20253 s/.\{148\}/&'"$ac_delim"'/g
20254 t clear
20255 :clear
20256 s/\\$//
20257 t bsnlc
20258 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20259 d
20260 :bsnlc
20261 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20262 b cont
20263 ' <confdefs.h | sed '
20264 s/'"$ac_delim"'/"\\\
20265 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20266
20267 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20268 for (key in D) D_is_set[key] = 1
20269 FS = "\a"
20270 }
20271 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20272 line = \$ 0
20273 split(line, arg, " ")
20274 if (arg[1] == "#") {
20275 defundef = arg[2]
20276 mac1 = arg[3]
20277 } else {
20278 defundef = substr(arg[1], 2)
20279 mac1 = arg[2]
20280 }
20281 split(mac1, mac2, "(") #)
20282 macro = mac2[1]
20283 prefix = substr(line, 1, index(line, defundef) - 1)
20284 if (D_is_set[macro]) {
20285 # Preserve the white space surrounding the "#".
20286 print prefix "define", macro P[macro] D[macro]
20287 next
20288 } else {
20289 # Replace #undef with comments. This is necessary, for example,
20290 # in the case of _POSIX_SOURCE, which is predefined and required
20291 # on some systems where configure will not decide to define it.
20292 if (defundef == "undef") {
20293 print "/*", prefix defundef, macro, "*/"
20294 next
20295 }
20296 }
20297 }
20298 { print }
20299 _ACAWK
20300 _ACEOF
20301 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20302 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20303 fi # test -n "$CONFIG_HEADERS"
20304
20305
20306 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20307 shift
20308 for ac_tag
20309 do
20310 case $ac_tag in
20311 :[FHLC]) ac_mode=$ac_tag; continue;;
20312 esac
20313 case $ac_mode$ac_tag in
20314 :[FHL]*:*);;
20315 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20316 :[FH]-) ac_tag=-:-;;
20317 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20318 esac
20319 ac_save_IFS=$IFS
20320 IFS=:
20321 set x $ac_tag
20322 IFS=$ac_save_IFS
20323 shift
20324 ac_file=$1
20325 shift
20326
20327 case $ac_mode in
20328 :L) ac_source=$1;;
20329 :[FH])
20330 ac_file_inputs=
20331 for ac_f
20332 do
20333 case $ac_f in
20334 -) ac_f="$ac_tmp/stdin";;
20335 *) # Look for the file first in the build tree, then in the source tree
20336 # (if the path is not absolute). The absolute path cannot be DOS-style,
20337 # because $ac_f cannot contain `:'.
20338 test -f "$ac_f" ||
20339 case $ac_f in
20340 [\\/$]*) false;;
20341 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20342 esac ||
20343 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20344 esac
20345 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20346 as_fn_append ac_file_inputs " '$ac_f'"
20347 done
20348
20349 # Let's still pretend it is `configure' which instantiates (i.e., don't
20350 # use $as_me), people would be surprised to read:
20351 # /* config.h. Generated by config.status. */
20352 configure_input='Generated from '`
20353 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20354 `' by configure.'
20355 if test x"$ac_file" != x-; then
20356 configure_input="$ac_file. $configure_input"
20357 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20358 $as_echo "$as_me: creating $ac_file" >&6;}
20359 fi
20360 # Neutralize special characters interpreted by sed in replacement strings.
20361 case $configure_input in #(
20362 *\&* | *\|* | *\\* )
20363 ac_sed_conf_input=`$as_echo "$configure_input" |
20364 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20365 *) ac_sed_conf_input=$configure_input;;
20366 esac
20367
20368 case $ac_tag in
20369 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20370 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20371 esac
20372 ;;
20373 esac
20374
20375 ac_dir=`$as_dirname -- "$ac_file" ||
20376 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20377 X"$ac_file" : 'X\(//\)[^/]' \| \
20378 X"$ac_file" : 'X\(//\)$' \| \
20379 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20380 $as_echo X"$ac_file" |
20381 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20382 s//\1/
20383 q
20384 }
20385 /^X\(\/\/\)[^/].*/{
20386 s//\1/
20387 q
20388 }
20389 /^X\(\/\/\)$/{
20390 s//\1/
20391 q
20392 }
20393 /^X\(\/\).*/{
20394 s//\1/
20395 q
20396 }
20397 s/.*/./; q'`
20398 as_dir="$ac_dir"; as_fn_mkdir_p
20399 ac_builddir=.
20400
20401 case "$ac_dir" in
20402 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20403 *)
20404 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20405 # A ".." for each directory in $ac_dir_suffix.
20406 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20407 case $ac_top_builddir_sub in
20408 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20409 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20410 esac ;;
20411 esac
20412 ac_abs_top_builddir=$ac_pwd
20413 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20414 # for backward compatibility:
20415 ac_top_builddir=$ac_top_build_prefix
20416
20417 case $srcdir in
20418 .) # We are building in place.
20419 ac_srcdir=.
20420 ac_top_srcdir=$ac_top_builddir_sub
20421 ac_abs_top_srcdir=$ac_pwd ;;
20422 [\\/]* | ?:[\\/]* ) # Absolute name.
20423 ac_srcdir=$srcdir$ac_dir_suffix;
20424 ac_top_srcdir=$srcdir
20425 ac_abs_top_srcdir=$srcdir ;;
20426 *) # Relative name.
20427 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20428 ac_top_srcdir=$ac_top_build_prefix$srcdir
20429 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20430 esac
20431 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20432
20433
20434 case $ac_mode in
20435 :F)
20436 #
20437 # CONFIG_FILE
20438 #
20439
20440 case $INSTALL in
20441 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20442 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20443 esac
20444 _ACEOF
20445
20446 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20447 # If the template does not know about datarootdir, expand it.
20448 # FIXME: This hack should be removed a few years after 2.60.
20449 ac_datarootdir_hack=; ac_datarootdir_seen=
20450 ac_sed_dataroot='
20451 /datarootdir/ {
20452 p
20453 q
20454 }
20455 /@datadir@/p
20456 /@docdir@/p
20457 /@infodir@/p
20458 /@localedir@/p
20459 /@mandir@/p'
20460 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20461 *datarootdir*) ac_datarootdir_seen=yes;;
20462 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20463 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20464 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20465 _ACEOF
20466 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20467 ac_datarootdir_hack='
20468 s&@datadir@&$datadir&g
20469 s&@docdir@&$docdir&g
20470 s&@infodir@&$infodir&g
20471 s&@localedir@&$localedir&g
20472 s&@mandir@&$mandir&g
20473 s&\\\${datarootdir}&$datarootdir&g' ;;
20474 esac
20475 _ACEOF
20476
20477 # Neutralize VPATH when `$srcdir' = `.'.
20478 # Shell code in configure.ac might set extrasub.
20479 # FIXME: do we really want to maintain this feature?
20480 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20481 ac_sed_extra="$ac_vpsub
20482 $extrasub
20483 _ACEOF
20484 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20485 :t
20486 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20487 s|@configure_input@|$ac_sed_conf_input|;t t
20488 s&@top_builddir@&$ac_top_builddir_sub&;t t
20489 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20490 s&@srcdir@&$ac_srcdir&;t t
20491 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20492 s&@top_srcdir@&$ac_top_srcdir&;t t
20493 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20494 s&@builddir@&$ac_builddir&;t t
20495 s&@abs_builddir@&$ac_abs_builddir&;t t
20496 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20497 s&@INSTALL@&$ac_INSTALL&;t t
20498 $ac_datarootdir_hack
20499 "
20500 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20501 if $ac_cs_awk_getline; then
20502 $AWK -f "$ac_tmp/subs.awk"
20503 else
20504 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20505 fi \
20506 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20507
20508 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20509 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20510 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20511 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20513 which seems to be undefined. Please make sure it is defined" >&5
20514 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20515 which seems to be undefined. Please make sure it is defined" >&2;}
20516
20517 rm -f "$ac_tmp/stdin"
20518 case $ac_file in
20519 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20520 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20521 esac \
20522 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20523 ;;
20524 :H)
20525 #
20526 # CONFIG_HEADER
20527 #
20528 if test x"$ac_file" != x-; then
20529 {
20530 $as_echo "/* $configure_input */" \
20531 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20532 } >"$ac_tmp/config.h" \
20533 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20534 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20535 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20536 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20537 else
20538 rm -f "$ac_file"
20539 mv "$ac_tmp/config.h" "$ac_file" \
20540 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20541 fi
20542 else
20543 $as_echo "/* $configure_input */" \
20544 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20545 || as_fn_error $? "could not create -" "$LINENO" 5
20546 fi
20547 ;;
20548 :L)
20549 #
20550 # CONFIG_LINK
20551 #
20552
20553 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20554 :
20555 else
20556 # Prefer the file from the source tree if names are identical.
20557 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20558 ac_source=$srcdir/$ac_source
20559 fi
20560
20561 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20562 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20563
20564 if test ! -r "$ac_source"; then
20565 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20566 fi
20567 rm -f "$ac_file"
20568
20569 # Try a relative symlink, then a hard link, then a copy.
20570 case $ac_source in
20571 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20572 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20573 esac
20574 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20575 ln "$ac_source" "$ac_file" 2>/dev/null ||
20576 cp -p "$ac_source" "$ac_file" ||
20577 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20578 fi
20579 ;;
20580 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20581 $as_echo "$as_me: executing $ac_file commands" >&6;}
20582 ;;
20583 esac
20584
20585
20586 case $ac_file$ac_mode in
20587 "config.h":H) echo > stamp-h ;;
20588 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
20589 "nm.h":L) echo > stamp-nmh ;;
20590 "gcore":F) chmod +x gcore ;;
20591
20592 esac
20593 done # for ac_tag
20594
20595
20596 as_fn_exit 0
20597 _ACEOF
20598 ac_clean_files=$ac_clean_files_save
20599
20600 test $ac_write_fail = 0 ||
20601 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20602
20603
20604 # configure is writing to config.log, and then calls config.status.
20605 # config.status does its own redirection, appending to config.log.
20606 # Unfortunately, on DOS this fails, as config.log is still kept open
20607 # by configure, so config.status won't be able to write to it; its
20608 # output is simply discarded. So we exec the FD to /dev/null,
20609 # effectively closing config.log, so it can be properly (re)opened and
20610 # appended to by config.status. When coming back to configure, we
20611 # need to make the FD available again.
20612 if test "$no_create" != yes; then
20613 ac_cs_success=:
20614 ac_config_status_args=
20615 test "$silent" = yes &&
20616 ac_config_status_args="$ac_config_status_args --quiet"
20617 exec 5>/dev/null
20618 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20619 exec 5>>config.log
20620 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20621 # would make configure fail if this is the last instruction.
20622 $ac_cs_success || as_fn_exit 1
20623 fi
20624
20625 #
20626 # CONFIG_SUBDIRS section.
20627 #
20628 if test "$no_recursion" != yes; then
20629
20630 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20631 # so they do not pile up.
20632 ac_sub_configure_args=
20633 ac_prev=
20634 eval "set x $ac_configure_args"
20635 shift
20636 for ac_arg
20637 do
20638 if test -n "$ac_prev"; then
20639 ac_prev=
20640 continue
20641 fi
20642 case $ac_arg in
20643 -cache-file | --cache-file | --cache-fil | --cache-fi \
20644 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20645 ac_prev=cache_file ;;
20646 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20647 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20648 | --c=*)
20649 ;;
20650 --config-cache | -C)
20651 ;;
20652 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20653 ac_prev=srcdir ;;
20654 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20655 ;;
20656 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20657 ac_prev=prefix ;;
20658 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20659 ;;
20660 --disable-option-checking)
20661 ;;
20662 *)
20663 case $ac_arg in
20664 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20665 esac
20666 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
20667 esac
20668 done
20669
20670 # Always prepend --prefix to ensure using the same prefix
20671 # in subdir configurations.
20672 ac_arg="--prefix=$prefix"
20673 case $ac_arg in
20674 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20675 esac
20676 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20677
20678 # Pass --silent
20679 if test "$silent" = yes; then
20680 ac_sub_configure_args="--silent $ac_sub_configure_args"
20681 fi
20682
20683 # Always prepend --disable-option-checking to silence warnings, since
20684 # different subdirs can have different --enable and --with options.
20685 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20686
20687 ac_popdir=`pwd`
20688 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20689
20690 # Do not complain, so a configure script can configure whichever
20691 # parts of a large source tree are present.
20692 test -d "$srcdir/$ac_dir" || continue
20693
20694 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20695 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20696 $as_echo "$ac_msg" >&6
20697 as_dir="$ac_dir"; as_fn_mkdir_p
20698 ac_builddir=.
20699
20700 case "$ac_dir" in
20701 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20702 *)
20703 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20704 # A ".." for each directory in $ac_dir_suffix.
20705 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20706 case $ac_top_builddir_sub in
20707 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20708 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20709 esac ;;
20710 esac
20711 ac_abs_top_builddir=$ac_pwd
20712 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20713 # for backward compatibility:
20714 ac_top_builddir=$ac_top_build_prefix
20715
20716 case $srcdir in
20717 .) # We are building in place.
20718 ac_srcdir=.
20719 ac_top_srcdir=$ac_top_builddir_sub
20720 ac_abs_top_srcdir=$ac_pwd ;;
20721 [\\/]* | ?:[\\/]* ) # Absolute name.
20722 ac_srcdir=$srcdir$ac_dir_suffix;
20723 ac_top_srcdir=$srcdir
20724 ac_abs_top_srcdir=$srcdir ;;
20725 *) # Relative name.
20726 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20727 ac_top_srcdir=$ac_top_build_prefix$srcdir
20728 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20729 esac
20730 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20731
20732
20733 cd "$ac_dir"
20734
20735 # Check for guested configure; otherwise get Cygnus style configure.
20736 if test -f "$ac_srcdir/configure.gnu"; then
20737 ac_sub_configure=$ac_srcdir/configure.gnu
20738 elif test -f "$ac_srcdir/configure"; then
20739 ac_sub_configure=$ac_srcdir/configure
20740 elif test -f "$ac_srcdir/configure.in"; then
20741 # This should be Cygnus configure.
20742 ac_sub_configure=$ac_aux_dir/configure
20743 else
20744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20745 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20746 ac_sub_configure=
20747 fi
20748
20749 # The recursion is here.
20750 if test -n "$ac_sub_configure"; then
20751 # Make the cache file name correct relative to the subdirectory.
20752 case $cache_file in
20753 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20754 *) # Relative name.
20755 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20756 esac
20757
20758 { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
20759 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20760 # The eval makes quoting arguments work.
20761 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20762 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20763 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
20764 fi
20765
20766 cd "$ac_popdir"
20767 done
20768 fi
20769 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20771 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20772 fi
20773
This page took 0.474826 seconds and 4 git commands to generate.