config/debuginfod.m4: Use PKG_CHECK_MODULES
[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 DEBUGINFOD_LIBS
765 DEBUGINFOD_CFLAGS
766 PKG_CONFIG_LIBDIR
767 PKG_CONFIG_PATH
768 PKG_CONFIG
769 HAVE_NATIVE_GCORE_TARGET
770 TARGET_OBS
771 subdirs
772 GDB_DATADIR
773 DEBUGDIR
774 MAKEINFO_EXTRA_FLAGS
775 MAKEINFOFLAGS
776 MAKEINFO
777 PACKAGE
778 CATOBJEXT
779 GENCAT
780 INSTOBJEXT
781 DATADIRNAME
782 CATALOGS
783 POSUB
784 GMSGFMT
785 XGETTEXT
786 INCINTL
787 LIBINTL_DEP
788 LIBINTL
789 USE_NLS
790 CCDEPMODE
791 DEPDIR
792 am__leading_dot
793 CXX_DIALECT
794 HAVE_CXX11
795 INSTALL_STRIP_PROGRAM
796 STRIP
797 install_sh
798 target_os
799 target_vendor
800 target_cpu
801 target
802 host_os
803 host_vendor
804 host_cpu
805 host
806 build_os
807 build_vendor
808 build_cpu
809 build
810 EGREP
811 GREP
812 CPP
813 ac_ct_CXX
814 CXXFLAGS
815 CXX
816 OBJEXT
817 EXEEXT
818 ac_ct_CC
819 CPPFLAGS
820 LDFLAGS
821 CFLAGS
822 CC
823 MAINT
824 MAINTAINER_MODE_FALSE
825 MAINTAINER_MODE_TRUE
826 target_alias
827 host_alias
828 build_alias
829 LIBS
830 ECHO_T
831 ECHO_N
832 ECHO_C
833 DEFS
834 mandir
835 localedir
836 libdir
837 psdir
838 pdfdir
839 dvidir
840 htmldir
841 infodir
842 docdir
843 oldincludedir
844 includedir
845 localstatedir
846 sharedstatedir
847 sysconfdir
848 datadir
849 datarootdir
850 libexecdir
851 sbindir
852 bindir
853 program_transform_name
854 prefix
855 exec_prefix
856 PACKAGE_URL
857 PACKAGE_BUGREPORT
858 PACKAGE_STRING
859 PACKAGE_VERSION
860 PACKAGE_TARNAME
861 PACKAGE_NAME
862 PATH_SEPARATOR
863 SHELL'
864 ac_subst_files='nat_makefile_frag'
865 ac_user_opts='
866 enable_option_checking
867 enable_maintainer_mode
868 enable_plugins
869 enable_largefile
870 with_separate_debug_dir
871 with_gdb_datadir
872 with_relocated_sources
873 with_auto_load_dir
874 with_auto_load_safe_path
875 enable_targets
876 enable_64_bit_bfd
877 enable_gdbmi
878 enable_tui
879 enable_gdbtk
880 with_debuginfod
881 with_libunwind_ia64
882 with_curses
883 enable_profiling
884 enable_codesign
885 with_pkgversion
886 with_bugurl
887 with_system_zlib
888 with_gnu_ld
889 enable_rpath
890 with_libiconv_prefix
891 with_libiconv_type
892 with_iconv_bin
893 with_system_readline
894 with_jit_reader_dir
895 with_expat
896 with_libexpat_prefix
897 with_libexpat_type
898 with_mpfr
899 with_libmpfr_prefix
900 with_libmpfr_type
901 with_python
902 with_python_libdir
903 with_guile
904 enable_source_highlight
905 with_intel_pt
906 with_libipt_prefix
907 with_libipt_type
908 with_included_regex
909 with_sysroot
910 with_system_gdbinit
911 with_system_gdbinit_dir
912 enable_werror
913 enable_build_warnings
914 enable_gdb_build_warnings
915 enable_ubsan
916 with_lzma
917 with_liblzma_prefix
918 with_liblzma_type
919 with_tcl
920 with_tk
921 with_x
922 enable_sim
923 with_babeltrace
924 with_libbabeltrace_prefix
925 with_libbabeltrace_type
926 with_xxhash
927 enable_libctf
928 with_libxxhash_prefix
929 with_libxxhash_type
930 enable_unit_tests
931 '
932 ac_precious_vars='build_alias
933 host_alias
934 target_alias
935 CC
936 CFLAGS
937 LDFLAGS
938 LIBS
939 CPPFLAGS
940 CXX
941 CXXFLAGS
942 CCC
943 CPP
944 MAKEINFO
945 MAKEINFOFLAGS
946 PKG_CONFIG
947 PKG_CONFIG_PATH
948 PKG_CONFIG_LIBDIR
949 DEBUGINFOD_CFLAGS
950 DEBUGINFOD_LIBS
951 YACC
952 YFLAGS
953 XMKMF'
954 ac_subdirs_all='testsuite
955 gdbtk'
956
957 # Initialize some variables set by options.
958 ac_init_help=
959 ac_init_version=false
960 ac_unrecognized_opts=
961 ac_unrecognized_sep=
962 # The variables have the same names as the options, with
963 # dashes changed to underlines.
964 cache_file=/dev/null
965 exec_prefix=NONE
966 no_create=
967 no_recursion=
968 prefix=NONE
969 program_prefix=NONE
970 program_suffix=NONE
971 program_transform_name=s,x,x,
972 silent=
973 site=
974 srcdir=
975 verbose=
976 x_includes=NONE
977 x_libraries=NONE
978
979 # Installation directory options.
980 # These are left unexpanded so users can "make install exec_prefix=/foo"
981 # and all the variables that are supposed to be based on exec_prefix
982 # by default will actually change.
983 # Use braces instead of parens because sh, perl, etc. also accept them.
984 # (The list follows the same order as the GNU Coding Standards.)
985 bindir='${exec_prefix}/bin'
986 sbindir='${exec_prefix}/sbin'
987 libexecdir='${exec_prefix}/libexec'
988 datarootdir='${prefix}/share'
989 datadir='${datarootdir}'
990 sysconfdir='${prefix}/etc'
991 sharedstatedir='${prefix}/com'
992 localstatedir='${prefix}/var'
993 includedir='${prefix}/include'
994 oldincludedir='/usr/include'
995 docdir='${datarootdir}/doc/${PACKAGE}'
996 infodir='${datarootdir}/info'
997 htmldir='${docdir}'
998 dvidir='${docdir}'
999 pdfdir='${docdir}'
1000 psdir='${docdir}'
1001 libdir='${exec_prefix}/lib'
1002 localedir='${datarootdir}/locale'
1003 mandir='${datarootdir}/man'
1004
1005 ac_prev=
1006 ac_dashdash=
1007 for ac_option
1008 do
1009 # If the previous option needs an argument, assign it.
1010 if test -n "$ac_prev"; then
1011 eval $ac_prev=\$ac_option
1012 ac_prev=
1013 continue
1014 fi
1015
1016 case $ac_option in
1017 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1018 *=) ac_optarg= ;;
1019 *) ac_optarg=yes ;;
1020 esac
1021
1022 # Accept the important Cygnus configure options, so we can diagnose typos.
1023
1024 case $ac_dashdash$ac_option in
1025 --)
1026 ac_dashdash=yes ;;
1027
1028 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1029 ac_prev=bindir ;;
1030 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1031 bindir=$ac_optarg ;;
1032
1033 -build | --build | --buil | --bui | --bu)
1034 ac_prev=build_alias ;;
1035 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1036 build_alias=$ac_optarg ;;
1037
1038 -cache-file | --cache-file | --cache-fil | --cache-fi \
1039 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1040 ac_prev=cache_file ;;
1041 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1042 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1043 cache_file=$ac_optarg ;;
1044
1045 --config-cache | -C)
1046 cache_file=config.cache ;;
1047
1048 -datadir | --datadir | --datadi | --datad)
1049 ac_prev=datadir ;;
1050 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1051 datadir=$ac_optarg ;;
1052
1053 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1054 | --dataroo | --dataro | --datar)
1055 ac_prev=datarootdir ;;
1056 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1057 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1058 datarootdir=$ac_optarg ;;
1059
1060 -disable-* | --disable-*)
1061 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1062 # Reject names that are not valid shell variable names.
1063 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1064 as_fn_error $? "invalid feature name: $ac_useropt"
1065 ac_useropt_orig=$ac_useropt
1066 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1067 case $ac_user_opts in
1068 *"
1069 "enable_$ac_useropt"
1070 "*) ;;
1071 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1072 ac_unrecognized_sep=', ';;
1073 esac
1074 eval enable_$ac_useropt=no ;;
1075
1076 -docdir | --docdir | --docdi | --doc | --do)
1077 ac_prev=docdir ;;
1078 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1079 docdir=$ac_optarg ;;
1080
1081 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1082 ac_prev=dvidir ;;
1083 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1084 dvidir=$ac_optarg ;;
1085
1086 -enable-* | --enable-*)
1087 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1088 # Reject names that are not valid shell variable names.
1089 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1090 as_fn_error $? "invalid feature name: $ac_useropt"
1091 ac_useropt_orig=$ac_useropt
1092 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1093 case $ac_user_opts in
1094 *"
1095 "enable_$ac_useropt"
1096 "*) ;;
1097 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1098 ac_unrecognized_sep=', ';;
1099 esac
1100 eval enable_$ac_useropt=\$ac_optarg ;;
1101
1102 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1103 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1104 | --exec | --exe | --ex)
1105 ac_prev=exec_prefix ;;
1106 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1107 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1108 | --exec=* | --exe=* | --ex=*)
1109 exec_prefix=$ac_optarg ;;
1110
1111 -gas | --gas | --ga | --g)
1112 # Obsolete; use --with-gas.
1113 with_gas=yes ;;
1114
1115 -help | --help | --hel | --he | -h)
1116 ac_init_help=long ;;
1117 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1118 ac_init_help=recursive ;;
1119 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1120 ac_init_help=short ;;
1121
1122 -host | --host | --hos | --ho)
1123 ac_prev=host_alias ;;
1124 -host=* | --host=* | --hos=* | --ho=*)
1125 host_alias=$ac_optarg ;;
1126
1127 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1128 ac_prev=htmldir ;;
1129 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1130 | --ht=*)
1131 htmldir=$ac_optarg ;;
1132
1133 -includedir | --includedir | --includedi | --included | --include \
1134 | --includ | --inclu | --incl | --inc)
1135 ac_prev=includedir ;;
1136 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1137 | --includ=* | --inclu=* | --incl=* | --inc=*)
1138 includedir=$ac_optarg ;;
1139
1140 -infodir | --infodir | --infodi | --infod | --info | --inf)
1141 ac_prev=infodir ;;
1142 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1143 infodir=$ac_optarg ;;
1144
1145 -libdir | --libdir | --libdi | --libd)
1146 ac_prev=libdir ;;
1147 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1148 libdir=$ac_optarg ;;
1149
1150 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1151 | --libexe | --libex | --libe)
1152 ac_prev=libexecdir ;;
1153 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1154 | --libexe=* | --libex=* | --libe=*)
1155 libexecdir=$ac_optarg ;;
1156
1157 -localedir | --localedir | --localedi | --localed | --locale)
1158 ac_prev=localedir ;;
1159 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1160 localedir=$ac_optarg ;;
1161
1162 -localstatedir | --localstatedir | --localstatedi | --localstated \
1163 | --localstate | --localstat | --localsta | --localst | --locals)
1164 ac_prev=localstatedir ;;
1165 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1166 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1167 localstatedir=$ac_optarg ;;
1168
1169 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1170 ac_prev=mandir ;;
1171 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1172 mandir=$ac_optarg ;;
1173
1174 -nfp | --nfp | --nf)
1175 # Obsolete; use --without-fp.
1176 with_fp=no ;;
1177
1178 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1179 | --no-cr | --no-c | -n)
1180 no_create=yes ;;
1181
1182 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1183 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1184 no_recursion=yes ;;
1185
1186 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1187 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1188 | --oldin | --oldi | --old | --ol | --o)
1189 ac_prev=oldincludedir ;;
1190 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1191 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1192 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1193 oldincludedir=$ac_optarg ;;
1194
1195 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1196 ac_prev=prefix ;;
1197 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1198 prefix=$ac_optarg ;;
1199
1200 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1201 | --program-pre | --program-pr | --program-p)
1202 ac_prev=program_prefix ;;
1203 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1204 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1205 program_prefix=$ac_optarg ;;
1206
1207 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1208 | --program-suf | --program-su | --program-s)
1209 ac_prev=program_suffix ;;
1210 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1211 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1212 program_suffix=$ac_optarg ;;
1213
1214 -program-transform-name | --program-transform-name \
1215 | --program-transform-nam | --program-transform-na \
1216 | --program-transform-n | --program-transform- \
1217 | --program-transform | --program-transfor \
1218 | --program-transfo | --program-transf \
1219 | --program-trans | --program-tran \
1220 | --progr-tra | --program-tr | --program-t)
1221 ac_prev=program_transform_name ;;
1222 -program-transform-name=* | --program-transform-name=* \
1223 | --program-transform-nam=* | --program-transform-na=* \
1224 | --program-transform-n=* | --program-transform-=* \
1225 | --program-transform=* | --program-transfor=* \
1226 | --program-transfo=* | --program-transf=* \
1227 | --program-trans=* | --program-tran=* \
1228 | --progr-tra=* | --program-tr=* | --program-t=*)
1229 program_transform_name=$ac_optarg ;;
1230
1231 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1232 ac_prev=pdfdir ;;
1233 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1234 pdfdir=$ac_optarg ;;
1235
1236 -psdir | --psdir | --psdi | --psd | --ps)
1237 ac_prev=psdir ;;
1238 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1239 psdir=$ac_optarg ;;
1240
1241 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1242 | -silent | --silent | --silen | --sile | --sil)
1243 silent=yes ;;
1244
1245 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1246 ac_prev=sbindir ;;
1247 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1248 | --sbi=* | --sb=*)
1249 sbindir=$ac_optarg ;;
1250
1251 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1252 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1253 | --sharedst | --shareds | --shared | --share | --shar \
1254 | --sha | --sh)
1255 ac_prev=sharedstatedir ;;
1256 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1257 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1258 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1259 | --sha=* | --sh=*)
1260 sharedstatedir=$ac_optarg ;;
1261
1262 -site | --site | --sit)
1263 ac_prev=site ;;
1264 -site=* | --site=* | --sit=*)
1265 site=$ac_optarg ;;
1266
1267 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1268 ac_prev=srcdir ;;
1269 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1270 srcdir=$ac_optarg ;;
1271
1272 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1273 | --syscon | --sysco | --sysc | --sys | --sy)
1274 ac_prev=sysconfdir ;;
1275 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1276 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1277 sysconfdir=$ac_optarg ;;
1278
1279 -target | --target | --targe | --targ | --tar | --ta | --t)
1280 ac_prev=target_alias ;;
1281 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1282 target_alias=$ac_optarg ;;
1283
1284 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1285 verbose=yes ;;
1286
1287 -version | --version | --versio | --versi | --vers | -V)
1288 ac_init_version=: ;;
1289
1290 -with-* | --with-*)
1291 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1292 # Reject names that are not valid shell variable names.
1293 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1294 as_fn_error $? "invalid package name: $ac_useropt"
1295 ac_useropt_orig=$ac_useropt
1296 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1297 case $ac_user_opts in
1298 *"
1299 "with_$ac_useropt"
1300 "*) ;;
1301 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1302 ac_unrecognized_sep=', ';;
1303 esac
1304 eval with_$ac_useropt=\$ac_optarg ;;
1305
1306 -without-* | --without-*)
1307 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1308 # Reject names that are not valid shell variable names.
1309 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1310 as_fn_error $? "invalid package name: $ac_useropt"
1311 ac_useropt_orig=$ac_useropt
1312 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1313 case $ac_user_opts in
1314 *"
1315 "with_$ac_useropt"
1316 "*) ;;
1317 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1318 ac_unrecognized_sep=', ';;
1319 esac
1320 eval with_$ac_useropt=no ;;
1321
1322 --x)
1323 # Obsolete; use --with-x.
1324 with_x=yes ;;
1325
1326 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1327 | --x-incl | --x-inc | --x-in | --x-i)
1328 ac_prev=x_includes ;;
1329 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1330 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1331 x_includes=$ac_optarg ;;
1332
1333 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1334 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1335 ac_prev=x_libraries ;;
1336 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1337 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1338 x_libraries=$ac_optarg ;;
1339
1340 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1341 Try \`$0 --help' for more information"
1342 ;;
1343
1344 *=*)
1345 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1346 # Reject names that are not valid shell variable names.
1347 case $ac_envvar in #(
1348 '' | [0-9]* | *[!_$as_cr_alnum]* )
1349 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1350 esac
1351 eval $ac_envvar=\$ac_optarg
1352 export $ac_envvar ;;
1353
1354 *)
1355 # FIXME: should be removed in autoconf 3.0.
1356 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1357 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1358 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1359 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1360 ;;
1361
1362 esac
1363 done
1364
1365 if test -n "$ac_prev"; then
1366 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1367 as_fn_error $? "missing argument to $ac_option"
1368 fi
1369
1370 if test -n "$ac_unrecognized_opts"; then
1371 case $enable_option_checking in
1372 no) ;;
1373 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1374 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1375 esac
1376 fi
1377
1378 # Check all directory arguments for consistency.
1379 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1380 datadir sysconfdir sharedstatedir localstatedir includedir \
1381 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1382 libdir localedir mandir
1383 do
1384 eval ac_val=\$$ac_var
1385 # Remove trailing slashes.
1386 case $ac_val in
1387 */ )
1388 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1389 eval $ac_var=\$ac_val;;
1390 esac
1391 # Be sure to have absolute directory names.
1392 case $ac_val in
1393 [\\/$]* | ?:[\\/]* ) continue;;
1394 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1395 esac
1396 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1397 done
1398
1399 # There might be people who depend on the old broken behavior: `$host'
1400 # used to hold the argument of --host etc.
1401 # FIXME: To remove some day.
1402 build=$build_alias
1403 host=$host_alias
1404 target=$target_alias
1405
1406 # FIXME: To remove some day.
1407 if test "x$host_alias" != x; then
1408 if test "x$build_alias" = x; then
1409 cross_compiling=maybe
1410 elif test "x$build_alias" != "x$host_alias"; then
1411 cross_compiling=yes
1412 fi
1413 fi
1414
1415 ac_tool_prefix=
1416 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1417
1418 test "$silent" = yes && exec 6>/dev/null
1419
1420
1421 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1422 ac_ls_di=`ls -di .` &&
1423 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1424 as_fn_error $? "working directory cannot be determined"
1425 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1426 as_fn_error $? "pwd does not report name of working directory"
1427
1428
1429 # Find the source files, if location was not specified.
1430 if test -z "$srcdir"; then
1431 ac_srcdir_defaulted=yes
1432 # Try the directory containing this script, then the parent directory.
1433 ac_confdir=`$as_dirname -- "$as_myself" ||
1434 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1435 X"$as_myself" : 'X\(//\)[^/]' \| \
1436 X"$as_myself" : 'X\(//\)$' \| \
1437 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1438 $as_echo X"$as_myself" |
1439 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1440 s//\1/
1441 q
1442 }
1443 /^X\(\/\/\)[^/].*/{
1444 s//\1/
1445 q
1446 }
1447 /^X\(\/\/\)$/{
1448 s//\1/
1449 q
1450 }
1451 /^X\(\/\).*/{
1452 s//\1/
1453 q
1454 }
1455 s/.*/./; q'`
1456 srcdir=$ac_confdir
1457 if test ! -r "$srcdir/$ac_unique_file"; then
1458 srcdir=..
1459 fi
1460 else
1461 ac_srcdir_defaulted=no
1462 fi
1463 if test ! -r "$srcdir/$ac_unique_file"; then
1464 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1465 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1466 fi
1467 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1468 ac_abs_confdir=`(
1469 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1470 pwd)`
1471 # When building in place, set srcdir=.
1472 if test "$ac_abs_confdir" = "$ac_pwd"; then
1473 srcdir=.
1474 fi
1475 # Remove unnecessary trailing slashes from srcdir.
1476 # Double slashes in file names in object file debugging info
1477 # mess up M-x gdb in Emacs.
1478 case $srcdir in
1479 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1480 esac
1481 for ac_var in $ac_precious_vars; do
1482 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1483 eval ac_env_${ac_var}_value=\$${ac_var}
1484 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1485 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1486 done
1487
1488 #
1489 # Report the --help message.
1490 #
1491 if test "$ac_init_help" = "long"; then
1492 # Omit some internal or obsolete options to make the list less imposing.
1493 # This message is too long to be a string in the A/UX 3.1 sh.
1494 cat <<_ACEOF
1495 \`configure' configures this package to adapt to many kinds of systems.
1496
1497 Usage: $0 [OPTION]... [VAR=VALUE]...
1498
1499 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1500 VAR=VALUE. See below for descriptions of some of the useful variables.
1501
1502 Defaults for the options are specified in brackets.
1503
1504 Configuration:
1505 -h, --help display this help and exit
1506 --help=short display options specific to this package
1507 --help=recursive display the short help of all the included packages
1508 -V, --version display version information and exit
1509 -q, --quiet, --silent do not print \`checking ...' messages
1510 --cache-file=FILE cache test results in FILE [disabled]
1511 -C, --config-cache alias for \`--cache-file=config.cache'
1512 -n, --no-create do not create output files
1513 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1514
1515 Installation directories:
1516 --prefix=PREFIX install architecture-independent files in PREFIX
1517 [$ac_default_prefix]
1518 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1519 [PREFIX]
1520
1521 By default, \`make install' will install all the files in
1522 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1523 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1524 for instance \`--prefix=\$HOME'.
1525
1526 For better control, use the options below.
1527
1528 Fine tuning of the installation directories:
1529 --bindir=DIR user executables [EPREFIX/bin]
1530 --sbindir=DIR system admin executables [EPREFIX/sbin]
1531 --libexecdir=DIR program executables [EPREFIX/libexec]
1532 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1533 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1534 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1535 --libdir=DIR object code libraries [EPREFIX/lib]
1536 --includedir=DIR C header files [PREFIX/include]
1537 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1538 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1539 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1540 --infodir=DIR info documentation [DATAROOTDIR/info]
1541 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1542 --mandir=DIR man documentation [DATAROOTDIR/man]
1543 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1544 --htmldir=DIR html documentation [DOCDIR]
1545 --dvidir=DIR dvi documentation [DOCDIR]
1546 --pdfdir=DIR pdf documentation [DOCDIR]
1547 --psdir=DIR ps documentation [DOCDIR]
1548 _ACEOF
1549
1550 cat <<\_ACEOF
1551
1552 Program names:
1553 --program-prefix=PREFIX prepend PREFIX to installed program names
1554 --program-suffix=SUFFIX append SUFFIX to installed program names
1555 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1556
1557 X features:
1558 --x-includes=DIR X include files are in DIR
1559 --x-libraries=DIR X library files are in DIR
1560
1561 System types:
1562 --build=BUILD configure for building on BUILD [guessed]
1563 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1564 --target=TARGET configure for building compilers for TARGET [HOST]
1565 _ACEOF
1566 fi
1567
1568 if test -n "$ac_init_help"; then
1569
1570 cat <<\_ACEOF
1571
1572 Optional Features:
1573 --disable-option-checking ignore unrecognized --enable/--with options
1574 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1575 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1576 --enable-maintainer-mode
1577 enable make rules and dependencies not useful (and
1578 sometimes confusing) to the casual installer
1579 --enable-plugins Enable support for plugins
1580 --disable-largefile omit support for large files
1581 --enable-targets=TARGETS
1582 alternative target configurations
1583 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1584 --disable-gdbmi disable machine-interface (MI)
1585 --enable-tui enable full-screen terminal user interface (TUI)
1586 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1587 --enable-profiling enable profiling of GDB
1588 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1589 --disable-rpath do not hardcode runtime library paths
1590 --enable-source-highlight
1591 enable source-highlight for source listings
1592 --enable-werror treat compile warnings as errors
1593 --enable-build-warnings enable build-time compiler warnings if gcc is used
1594 --enable-gdb-build-warnings
1595 enable GDB specific build-time compiler warnings if
1596 gcc is used
1597 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1598 --enable-sim link gdb with simulator
1599 --enable-libctf Handle .ctf type-info sections [default=yes]
1600 --enable-unit-tests Enable the inclusion of unit tests when compiling
1601 GDB
1602
1603 Optional Packages:
1604 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1605 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1606 --with-separate-debug-dir=PATH
1607 look for global separate debug info in this path
1608 [LIBDIR/debug]
1609 --with-gdb-datadir=PATH look for global separate data files in this path
1610 [DATADIR/gdb]
1611 --with-relocated-sources=PATH
1612 automatically relocate this path for source files
1613 --with-auto-load-dir=PATH
1614 directories from which to load auto-loaded scripts
1615 [$debugdir:$datadir/auto-load]
1616 --with-auto-load-safe-path=PATH
1617 directories safe to hold auto-loaded files
1618 [--with-auto-load-dir]
1619 --without-auto-load-safe-path
1620 do not restrict auto-loaded files locations
1621 --with-debuginfod Enable debuginfo lookups with debuginfod
1622 (auto/yes/no)
1623 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1624 --with-curses use the curses library instead of the termcap
1625 library
1626 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1627 --with-bugurl=URL Direct users to URL to report a bug
1628 --with-system-zlib use installed libz
1629 --with-gnu-ld assume the C compiler uses GNU ld default=no
1630 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1631 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1632 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1633 --with-iconv-bin=PATH specify where to find the iconv program
1634 --with-system-readline use installed readline library
1635 --with-jit-reader-dir=PATH
1636 directory to load the JIT readers from
1637 --with-expat include expat support (auto/yes/no)
1638 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1639 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1640 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1641 --with-mpfr include MPFR support (auto/yes/no)
1642 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1643 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1644 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1645 --with-python[=PYTHON] include python support
1646 (auto/yes/no/<python-program>)
1647 --with-python-libdir[=DIR]
1648 search for python's libraries in DIR
1649 --with-guile[=GUILE] include guile support
1650 (auto/yes/no/<guile-version>/<pkg-config-program>)
1651 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1652 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1653 --without-libipt-prefix don't search for libipt in includedir and libdir
1654 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1655 --without-included-regex
1656 don't use included regex; this is the default on
1657 systems with version 2 of the GNU C library (use
1658 with caution on other system)
1659 --with-sysroot[=DIR] search for usr/lib et al within DIR
1660 --with-system-gdbinit=PATH
1661 automatically load a system-wide gdbinit file
1662 --with-system-gdbinit-dir=PATH
1663 automatically load system-wide gdbinit files from
1664 this directory
1665 --with-lzma support lzma compression (auto/yes/no)
1666 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1667 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1668 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1669 --with-tcl directory containing tcl configuration (tclConfig.sh)
1670 --with-tk directory containing tk configuration (tkConfig.sh)
1671 --with-x use the X Window System
1672 --with-babeltrace include babeltrace support (auto/yes/no)
1673 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1674 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1675 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1676 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1677 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1678 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1679 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1680
1681 Some influential environment variables:
1682 CC C compiler command
1683 CFLAGS C compiler flags
1684 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1685 nonstandard directory <lib dir>
1686 LIBS libraries to pass to the linker, e.g. -l<library>
1687 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1688 you have headers in a nonstandard directory <include dir>
1689 CXX C++ compiler command
1690 CXXFLAGS C++ compiler flags
1691 CPP C preprocessor
1692 MAKEINFO Parent configure detects if it is of sufficient version.
1693 MAKEINFOFLAGS
1694 Parameters for MAKEINFO.
1695 PKG_CONFIG path to pkg-config utility
1696 PKG_CONFIG_PATH
1697 directories to add to pkg-config's search path
1698 PKG_CONFIG_LIBDIR
1699 path overriding pkg-config's built-in search path
1700 DEBUGINFOD_CFLAGS
1701 C compiler flags for DEBUGINFOD, overriding pkg-config
1702 DEBUGINFOD_LIBS
1703 linker flags for DEBUGINFOD, overriding pkg-config
1704 YACC The `Yet Another Compiler Compiler' implementation to use.
1705 Defaults to the first program found out of: `bison -y', `byacc',
1706 `yacc'.
1707 YFLAGS The list of arguments that will be passed by default to $YACC.
1708 This script will default YFLAGS to the empty string to avoid a
1709 default value of `-d' given by some make applications.
1710 XMKMF Path to xmkmf, Makefile generator for X Window System
1711
1712 Use these variables to override the choices made by `configure' or to help
1713 it to find libraries and programs with nonstandard names/locations.
1714
1715 Report bugs to the package provider.
1716 _ACEOF
1717 ac_status=$?
1718 fi
1719
1720 if test "$ac_init_help" = "recursive"; then
1721 # If there are subdirs, report their specific --help.
1722 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1723 test -d "$ac_dir" ||
1724 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1725 continue
1726 ac_builddir=.
1727
1728 case "$ac_dir" in
1729 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1730 *)
1731 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1732 # A ".." for each directory in $ac_dir_suffix.
1733 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1734 case $ac_top_builddir_sub in
1735 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1736 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1737 esac ;;
1738 esac
1739 ac_abs_top_builddir=$ac_pwd
1740 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1741 # for backward compatibility:
1742 ac_top_builddir=$ac_top_build_prefix
1743
1744 case $srcdir in
1745 .) # We are building in place.
1746 ac_srcdir=.
1747 ac_top_srcdir=$ac_top_builddir_sub
1748 ac_abs_top_srcdir=$ac_pwd ;;
1749 [\\/]* | ?:[\\/]* ) # Absolute name.
1750 ac_srcdir=$srcdir$ac_dir_suffix;
1751 ac_top_srcdir=$srcdir
1752 ac_abs_top_srcdir=$srcdir ;;
1753 *) # Relative name.
1754 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1755 ac_top_srcdir=$ac_top_build_prefix$srcdir
1756 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1757 esac
1758 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1759
1760 cd "$ac_dir" || { ac_status=$?; continue; }
1761 # Check for guested configure.
1762 if test -f "$ac_srcdir/configure.gnu"; then
1763 echo &&
1764 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1765 elif test -f "$ac_srcdir/configure"; then
1766 echo &&
1767 $SHELL "$ac_srcdir/configure" --help=recursive
1768 else
1769 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1770 fi || ac_status=$?
1771 cd "$ac_pwd" || { ac_status=$?; break; }
1772 done
1773 fi
1774
1775 test -n "$ac_init_help" && exit $ac_status
1776 if $ac_init_version; then
1777 cat <<\_ACEOF
1778 configure
1779 generated by GNU Autoconf 2.69
1780
1781 Copyright (C) 2012 Free Software Foundation, Inc.
1782 This configure script is free software; the Free Software Foundation
1783 gives unlimited permission to copy, distribute and modify it.
1784 _ACEOF
1785 exit
1786 fi
1787
1788 ## ------------------------ ##
1789 ## Autoconf initialization. ##
1790 ## ------------------------ ##
1791
1792 # ac_fn_c_try_compile LINENO
1793 # --------------------------
1794 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1795 ac_fn_c_try_compile ()
1796 {
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1798 rm -f conftest.$ac_objext
1799 if { { ac_try="$ac_compile"
1800 case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803 esac
1804 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1805 $as_echo "$ac_try_echo"; } >&5
1806 (eval "$ac_compile") 2>conftest.err
1807 ac_status=$?
1808 if test -s conftest.err; then
1809 grep -v '^ *+' conftest.err >conftest.er1
1810 cat conftest.er1 >&5
1811 mv -f conftest.er1 conftest.err
1812 fi
1813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1814 test $ac_status = 0; } && {
1815 test -z "$ac_c_werror_flag" ||
1816 test ! -s conftest.err
1817 } && test -s conftest.$ac_objext; then :
1818 ac_retval=0
1819 else
1820 $as_echo "$as_me: failed program was:" >&5
1821 sed 's/^/| /' conftest.$ac_ext >&5
1822
1823 ac_retval=1
1824 fi
1825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1826 as_fn_set_status $ac_retval
1827
1828 } # ac_fn_c_try_compile
1829
1830 # ac_fn_cxx_try_compile LINENO
1831 # ----------------------------
1832 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1833 ac_fn_cxx_try_compile ()
1834 {
1835 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1836 rm -f conftest.$ac_objext
1837 if { { ac_try="$ac_compile"
1838 case "(($ac_try" in
1839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1840 *) ac_try_echo=$ac_try;;
1841 esac
1842 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1843 $as_echo "$ac_try_echo"; } >&5
1844 (eval "$ac_compile") 2>conftest.err
1845 ac_status=$?
1846 if test -s conftest.err; then
1847 grep -v '^ *+' conftest.err >conftest.er1
1848 cat conftest.er1 >&5
1849 mv -f conftest.er1 conftest.err
1850 fi
1851 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1852 test $ac_status = 0; } && {
1853 test -z "$ac_cxx_werror_flag" ||
1854 test ! -s conftest.err
1855 } && test -s conftest.$ac_objext; then :
1856 ac_retval=0
1857 else
1858 $as_echo "$as_me: failed program was:" >&5
1859 sed 's/^/| /' conftest.$ac_ext >&5
1860
1861 ac_retval=1
1862 fi
1863 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1864 as_fn_set_status $ac_retval
1865
1866 } # ac_fn_cxx_try_compile
1867
1868 # ac_fn_c_try_cpp LINENO
1869 # ----------------------
1870 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1871 ac_fn_c_try_cpp ()
1872 {
1873 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1874 if { { ac_try="$ac_cpp conftest.$ac_ext"
1875 case "(($ac_try" in
1876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1877 *) ac_try_echo=$ac_try;;
1878 esac
1879 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1880 $as_echo "$ac_try_echo"; } >&5
1881 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1882 ac_status=$?
1883 if test -s conftest.err; then
1884 grep -v '^ *+' conftest.err >conftest.er1
1885 cat conftest.er1 >&5
1886 mv -f conftest.er1 conftest.err
1887 fi
1888 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1889 test $ac_status = 0; } > conftest.i && {
1890 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1891 test ! -s conftest.err
1892 }; then :
1893 ac_retval=0
1894 else
1895 $as_echo "$as_me: failed program was:" >&5
1896 sed 's/^/| /' conftest.$ac_ext >&5
1897
1898 ac_retval=1
1899 fi
1900 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1901 as_fn_set_status $ac_retval
1902
1903 } # ac_fn_c_try_cpp
1904
1905 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1906 # -------------------------------------------------------
1907 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1908 # the include files in INCLUDES and setting the cache variable VAR
1909 # accordingly.
1910 ac_fn_c_check_header_mongrel ()
1911 {
1912 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1913 if eval \${$3+:} false; then :
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915 $as_echo_n "checking for $2... " >&6; }
1916 if eval \${$3+:} false; then :
1917 $as_echo_n "(cached) " >&6
1918 fi
1919 eval ac_res=\$$3
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921 $as_echo "$ac_res" >&6; }
1922 else
1923 # Is the header compilable?
1924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1925 $as_echo_n "checking $2 usability... " >&6; }
1926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1927 /* end confdefs.h. */
1928 $4
1929 #include <$2>
1930 _ACEOF
1931 if ac_fn_c_try_compile "$LINENO"; then :
1932 ac_header_compiler=yes
1933 else
1934 ac_header_compiler=no
1935 fi
1936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1938 $as_echo "$ac_header_compiler" >&6; }
1939
1940 # Is the header present?
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1942 $as_echo_n "checking $2 presence... " >&6; }
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944 /* end confdefs.h. */
1945 #include <$2>
1946 _ACEOF
1947 if ac_fn_c_try_cpp "$LINENO"; then :
1948 ac_header_preproc=yes
1949 else
1950 ac_header_preproc=no
1951 fi
1952 rm -f conftest.err conftest.i conftest.$ac_ext
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1954 $as_echo "$ac_header_preproc" >&6; }
1955
1956 # So? What about this header?
1957 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1958 yes:no: )
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1960 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1961 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1962 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1963 ;;
1964 no:yes:* )
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1966 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1968 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1970 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1972 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1974 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1975 ;;
1976 esac
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1978 $as_echo_n "checking for $2... " >&6; }
1979 if eval \${$3+:} false; then :
1980 $as_echo_n "(cached) " >&6
1981 else
1982 eval "$3=\$ac_header_compiler"
1983 fi
1984 eval ac_res=\$$3
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1986 $as_echo "$ac_res" >&6; }
1987 fi
1988 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1989
1990 } # ac_fn_c_check_header_mongrel
1991
1992 # ac_fn_c_try_run LINENO
1993 # ----------------------
1994 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1995 # that executables *can* be run.
1996 ac_fn_c_try_run ()
1997 {
1998 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1999 if { { ac_try="$ac_link"
2000 case "(($ac_try" in
2001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2002 *) ac_try_echo=$ac_try;;
2003 esac
2004 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2005 $as_echo "$ac_try_echo"; } >&5
2006 (eval "$ac_link") 2>&5
2007 ac_status=$?
2008 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2009 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2010 { { case "(($ac_try" in
2011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2012 *) ac_try_echo=$ac_try;;
2013 esac
2014 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2015 $as_echo "$ac_try_echo"; } >&5
2016 (eval "$ac_try") 2>&5
2017 ac_status=$?
2018 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2019 test $ac_status = 0; }; }; then :
2020 ac_retval=0
2021 else
2022 $as_echo "$as_me: program exited with status $ac_status" >&5
2023 $as_echo "$as_me: failed program was:" >&5
2024 sed 's/^/| /' conftest.$ac_ext >&5
2025
2026 ac_retval=$ac_status
2027 fi
2028 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2029 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2030 as_fn_set_status $ac_retval
2031
2032 } # ac_fn_c_try_run
2033
2034 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2035 # -------------------------------------------------------
2036 # Tests whether HEADER exists and can be compiled using the include files in
2037 # INCLUDES, setting the cache variable VAR accordingly.
2038 ac_fn_c_check_header_compile ()
2039 {
2040 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2042 $as_echo_n "checking for $2... " >&6; }
2043 if eval \${$3+:} false; then :
2044 $as_echo_n "(cached) " >&6
2045 else
2046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2047 /* end confdefs.h. */
2048 $4
2049 #include <$2>
2050 _ACEOF
2051 if ac_fn_c_try_compile "$LINENO"; then :
2052 eval "$3=yes"
2053 else
2054 eval "$3=no"
2055 fi
2056 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2057 fi
2058 eval ac_res=\$$3
2059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2060 $as_echo "$ac_res" >&6; }
2061 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2062
2063 } # ac_fn_c_check_header_compile
2064
2065 # ac_fn_c_try_link LINENO
2066 # -----------------------
2067 # Try to link conftest.$ac_ext, and return whether this succeeded.
2068 ac_fn_c_try_link ()
2069 {
2070 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2071 rm -f conftest.$ac_objext conftest$ac_exeext
2072 if { { ac_try="$ac_link"
2073 case "(($ac_try" in
2074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2075 *) ac_try_echo=$ac_try;;
2076 esac
2077 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2078 $as_echo "$ac_try_echo"; } >&5
2079 (eval "$ac_link") 2>conftest.err
2080 ac_status=$?
2081 if test -s conftest.err; then
2082 grep -v '^ *+' conftest.err >conftest.er1
2083 cat conftest.er1 >&5
2084 mv -f conftest.er1 conftest.err
2085 fi
2086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2087 test $ac_status = 0; } && {
2088 test -z "$ac_c_werror_flag" ||
2089 test ! -s conftest.err
2090 } && test -s conftest$ac_exeext && {
2091 test "$cross_compiling" = yes ||
2092 test -x conftest$ac_exeext
2093 }; then :
2094 ac_retval=0
2095 else
2096 $as_echo "$as_me: failed program was:" >&5
2097 sed 's/^/| /' conftest.$ac_ext >&5
2098
2099 ac_retval=1
2100 fi
2101 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2102 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2103 # interfere with the next link command; also delete a directory that is
2104 # left behind by Apple's compiler. We do this before executing the actions.
2105 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2106 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2107 as_fn_set_status $ac_retval
2108
2109 } # ac_fn_c_try_link
2110
2111 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2112 # --------------------------------------------
2113 # Tries to find the compile-time value of EXPR in a program that includes
2114 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2115 # computed
2116 ac_fn_c_compute_int ()
2117 {
2118 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2119 if test "$cross_compiling" = yes; then
2120 # Depending upon the size, compute the lo and hi bounds.
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h. */
2123 $4
2124 int
2125 main ()
2126 {
2127 static int test_array [1 - 2 * !(($2) >= 0)];
2128 test_array [0] = 0;
2129 return test_array [0];
2130
2131 ;
2132 return 0;
2133 }
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_lo=0 ac_mid=0
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h. */
2140 $4
2141 int
2142 main ()
2143 {
2144 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2145 test_array [0] = 0;
2146 return test_array [0];
2147
2148 ;
2149 return 0;
2150 }
2151 _ACEOF
2152 if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_hi=$ac_mid; break
2154 else
2155 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2156 if test $ac_lo -le $ac_mid; then
2157 ac_lo= ac_hi=
2158 break
2159 fi
2160 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2161 fi
2162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
2164 else
2165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2166 /* end confdefs.h. */
2167 $4
2168 int
2169 main ()
2170 {
2171 static int test_array [1 - 2 * !(($2) < 0)];
2172 test_array [0] = 0;
2173 return test_array [0];
2174
2175 ;
2176 return 0;
2177 }
2178 _ACEOF
2179 if ac_fn_c_try_compile "$LINENO"; then :
2180 ac_hi=-1 ac_mid=-1
2181 while :; do
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183 /* end confdefs.h. */
2184 $4
2185 int
2186 main ()
2187 {
2188 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2189 test_array [0] = 0;
2190 return test_array [0];
2191
2192 ;
2193 return 0;
2194 }
2195 _ACEOF
2196 if ac_fn_c_try_compile "$LINENO"; then :
2197 ac_lo=$ac_mid; break
2198 else
2199 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2200 if test $ac_mid -le $ac_hi; then
2201 ac_lo= ac_hi=
2202 break
2203 fi
2204 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2205 fi
2206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207 done
2208 else
2209 ac_lo= ac_hi=
2210 fi
2211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212 fi
2213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 # Binary search between lo and hi bounds.
2215 while test "x$ac_lo" != "x$ac_hi"; do
2216 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h. */
2219 $4
2220 int
2221 main ()
2222 {
2223 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2224 test_array [0] = 0;
2225 return test_array [0];
2226
2227 ;
2228 return 0;
2229 }
2230 _ACEOF
2231 if ac_fn_c_try_compile "$LINENO"; then :
2232 ac_hi=$ac_mid
2233 else
2234 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2235 fi
2236 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2237 done
2238 case $ac_lo in #((
2239 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2240 '') ac_retval=1 ;;
2241 esac
2242 else
2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2244 /* end confdefs.h. */
2245 $4
2246 static long int longval () { return $2; }
2247 static unsigned long int ulongval () { return $2; }
2248 #include <stdio.h>
2249 #include <stdlib.h>
2250 int
2251 main ()
2252 {
2253
2254 FILE *f = fopen ("conftest.val", "w");
2255 if (! f)
2256 return 1;
2257 if (($2) < 0)
2258 {
2259 long int i = longval ();
2260 if (i != ($2))
2261 return 1;
2262 fprintf (f, "%ld", i);
2263 }
2264 else
2265 {
2266 unsigned long int i = ulongval ();
2267 if (i != ($2))
2268 return 1;
2269 fprintf (f, "%lu", i);
2270 }
2271 /* Do not output a trailing newline, as this causes \r\n confusion
2272 on some platforms. */
2273 return ferror (f) || fclose (f) != 0;
2274
2275 ;
2276 return 0;
2277 }
2278 _ACEOF
2279 if ac_fn_c_try_run "$LINENO"; then :
2280 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2281 else
2282 ac_retval=1
2283 fi
2284 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2285 conftest.$ac_objext conftest.beam conftest.$ac_ext
2286 rm -f conftest.val
2287
2288 fi
2289 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2290 as_fn_set_status $ac_retval
2291
2292 } # ac_fn_c_compute_int
2293
2294 # ac_fn_c_check_func LINENO FUNC VAR
2295 # ----------------------------------
2296 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2297 ac_fn_c_check_func ()
2298 {
2299 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2301 $as_echo_n "checking for $2... " >&6; }
2302 if eval \${$3+:} false; then :
2303 $as_echo_n "(cached) " >&6
2304 else
2305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2306 /* end confdefs.h. */
2307 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2308 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2309 #define $2 innocuous_$2
2310
2311 /* System header to define __stub macros and hopefully few prototypes,
2312 which can conflict with char $2 (); below.
2313 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2314 <limits.h> exists even on freestanding compilers. */
2315
2316 #ifdef __STDC__
2317 # include <limits.h>
2318 #else
2319 # include <assert.h>
2320 #endif
2321
2322 #undef $2
2323
2324 /* Override any GCC internal prototype to avoid an error.
2325 Use char because int might match the return type of a GCC
2326 builtin and then its argument prototype would still apply. */
2327 #ifdef __cplusplus
2328 extern "C"
2329 #endif
2330 char $2 ();
2331 /* The GNU C library defines this for functions which it implements
2332 to always fail with ENOSYS. Some functions are actually named
2333 something starting with __ and the normal name is an alias. */
2334 #if defined __stub_$2 || defined __stub___$2
2335 choke me
2336 #endif
2337
2338 int
2339 main ()
2340 {
2341 return $2 ();
2342 ;
2343 return 0;
2344 }
2345 _ACEOF
2346 if ac_fn_c_try_link "$LINENO"; then :
2347 eval "$3=yes"
2348 else
2349 eval "$3=no"
2350 fi
2351 rm -f core conftest.err conftest.$ac_objext \
2352 conftest$ac_exeext conftest.$ac_ext
2353 fi
2354 eval ac_res=\$$3
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2356 $as_echo "$ac_res" >&6; }
2357 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2358
2359 } # ac_fn_c_check_func
2360
2361 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2362 # -------------------------------------------
2363 # Tests whether TYPE exists after having included INCLUDES, setting cache
2364 # variable VAR accordingly.
2365 ac_fn_c_check_type ()
2366 {
2367 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2369 $as_echo_n "checking for $2... " >&6; }
2370 if eval \${$3+:} false; then :
2371 $as_echo_n "(cached) " >&6
2372 else
2373 eval "$3=no"
2374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2375 /* end confdefs.h. */
2376 $4
2377 int
2378 main ()
2379 {
2380 if (sizeof ($2))
2381 return 0;
2382 ;
2383 return 0;
2384 }
2385 _ACEOF
2386 if ac_fn_c_try_compile "$LINENO"; then :
2387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2388 /* end confdefs.h. */
2389 $4
2390 int
2391 main ()
2392 {
2393 if (sizeof (($2)))
2394 return 0;
2395 ;
2396 return 0;
2397 }
2398 _ACEOF
2399 if ac_fn_c_try_compile "$LINENO"; then :
2400
2401 else
2402 eval "$3=yes"
2403 fi
2404 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2405 fi
2406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2407 fi
2408 eval ac_res=\$$3
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2410 $as_echo "$ac_res" >&6; }
2411 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412
2413 } # ac_fn_c_check_type
2414
2415 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2416 # ---------------------------------------------
2417 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2418 # accordingly.
2419 ac_fn_c_check_decl ()
2420 {
2421 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422 as_decl_name=`echo $2|sed 's/ *(.*//'`
2423 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2425 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2426 if eval \${$3+:} false; then :
2427 $as_echo_n "(cached) " >&6
2428 else
2429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430 /* end confdefs.h. */
2431 $4
2432 int
2433 main ()
2434 {
2435 #ifndef $as_decl_name
2436 #ifdef __cplusplus
2437 (void) $as_decl_use;
2438 #else
2439 (void) $as_decl_name;
2440 #endif
2441 #endif
2442
2443 ;
2444 return 0;
2445 }
2446 _ACEOF
2447 if ac_fn_c_try_compile "$LINENO"; then :
2448 eval "$3=yes"
2449 else
2450 eval "$3=no"
2451 fi
2452 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2453 fi
2454 eval ac_res=\$$3
2455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2456 $as_echo "$ac_res" >&6; }
2457 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2458
2459 } # ac_fn_c_check_decl
2460
2461 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2462 # ----------------------------------------------------
2463 # Tries to find if the field MEMBER exists in type AGGR, after including
2464 # INCLUDES, setting cache variable VAR accordingly.
2465 ac_fn_c_check_member ()
2466 {
2467 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2469 $as_echo_n "checking for $2.$3... " >&6; }
2470 if eval \${$4+:} false; then :
2471 $as_echo_n "(cached) " >&6
2472 else
2473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2474 /* end confdefs.h. */
2475 $5
2476 int
2477 main ()
2478 {
2479 static $2 ac_aggr;
2480 if (ac_aggr.$3)
2481 return 0;
2482 ;
2483 return 0;
2484 }
2485 _ACEOF
2486 if ac_fn_c_try_compile "$LINENO"; then :
2487 eval "$4=yes"
2488 else
2489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490 /* end confdefs.h. */
2491 $5
2492 int
2493 main ()
2494 {
2495 static $2 ac_aggr;
2496 if (sizeof ac_aggr.$3)
2497 return 0;
2498 ;
2499 return 0;
2500 }
2501 _ACEOF
2502 if ac_fn_c_try_compile "$LINENO"; then :
2503 eval "$4=yes"
2504 else
2505 eval "$4=no"
2506 fi
2507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2508 fi
2509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2510 fi
2511 eval ac_res=\$$4
2512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2513 $as_echo "$ac_res" >&6; }
2514 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2515
2516 } # ac_fn_c_check_member
2517
2518 # ac_fn_cxx_try_link LINENO
2519 # -------------------------
2520 # Try to link conftest.$ac_ext, and return whether this succeeded.
2521 ac_fn_cxx_try_link ()
2522 {
2523 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524 rm -f conftest.$ac_objext conftest$ac_exeext
2525 if { { ac_try="$ac_link"
2526 case "(($ac_try" in
2527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2528 *) ac_try_echo=$ac_try;;
2529 esac
2530 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2531 $as_echo "$ac_try_echo"; } >&5
2532 (eval "$ac_link") 2>conftest.err
2533 ac_status=$?
2534 if test -s conftest.err; then
2535 grep -v '^ *+' conftest.err >conftest.er1
2536 cat conftest.er1 >&5
2537 mv -f conftest.er1 conftest.err
2538 fi
2539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2540 test $ac_status = 0; } && {
2541 test -z "$ac_cxx_werror_flag" ||
2542 test ! -s conftest.err
2543 } && test -s conftest$ac_exeext && {
2544 test "$cross_compiling" = yes ||
2545 test -x conftest$ac_exeext
2546 }; then :
2547 ac_retval=0
2548 else
2549 $as_echo "$as_me: failed program was:" >&5
2550 sed 's/^/| /' conftest.$ac_ext >&5
2551
2552 ac_retval=1
2553 fi
2554 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2555 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2556 # interfere with the next link command; also delete a directory that is
2557 # left behind by Apple's compiler. We do this before executing the actions.
2558 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2559 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560 as_fn_set_status $ac_retval
2561
2562 } # ac_fn_cxx_try_link
2563
2564 # ac_fn_cxx_check_func LINENO FUNC VAR
2565 # ------------------------------------
2566 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2567 ac_fn_cxx_check_func ()
2568 {
2569 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2571 $as_echo_n "checking for $2... " >&6; }
2572 if eval \${$3+:} false; then :
2573 $as_echo_n "(cached) " >&6
2574 else
2575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2576 /* end confdefs.h. */
2577 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2578 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2579 #define $2 innocuous_$2
2580
2581 /* System header to define __stub macros and hopefully few prototypes,
2582 which can conflict with char $2 (); below.
2583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2584 <limits.h> exists even on freestanding compilers. */
2585
2586 #ifdef __STDC__
2587 # include <limits.h>
2588 #else
2589 # include <assert.h>
2590 #endif
2591
2592 #undef $2
2593
2594 /* Override any GCC internal prototype to avoid an error.
2595 Use char because int might match the return type of a GCC
2596 builtin and then its argument prototype would still apply. */
2597 #ifdef __cplusplus
2598 extern "C"
2599 #endif
2600 char $2 ();
2601 /* The GNU C library defines this for functions which it implements
2602 to always fail with ENOSYS. Some functions are actually named
2603 something starting with __ and the normal name is an alias. */
2604 #if defined __stub_$2 || defined __stub___$2
2605 choke me
2606 #endif
2607
2608 int
2609 main ()
2610 {
2611 return $2 ();
2612 ;
2613 return 0;
2614 }
2615 _ACEOF
2616 if ac_fn_cxx_try_link "$LINENO"; then :
2617 eval "$3=yes"
2618 else
2619 eval "$3=no"
2620 fi
2621 rm -f core conftest.err conftest.$ac_objext \
2622 conftest$ac_exeext conftest.$ac_ext
2623 fi
2624 eval ac_res=\$$3
2625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626 $as_echo "$ac_res" >&6; }
2627 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2628
2629 } # ac_fn_cxx_check_func
2630 cat >config.log <<_ACEOF
2631 This file contains any messages produced by compilers while
2632 running configure, to aid debugging if configure makes a mistake.
2633
2634 It was created by $as_me, which was
2635 generated by GNU Autoconf 2.69. Invocation command line was
2636
2637 $ $0 $@
2638
2639 _ACEOF
2640 exec 5>>config.log
2641 {
2642 cat <<_ASUNAME
2643 ## --------- ##
2644 ## Platform. ##
2645 ## --------- ##
2646
2647 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2648 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2649 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2650 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2651 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2652
2653 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2654 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2655
2656 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2657 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2658 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2659 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2660 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2661 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2662 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2663
2664 _ASUNAME
2665
2666 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2667 for as_dir in $PATH
2668 do
2669 IFS=$as_save_IFS
2670 test -z "$as_dir" && as_dir=.
2671 $as_echo "PATH: $as_dir"
2672 done
2673 IFS=$as_save_IFS
2674
2675 } >&5
2676
2677 cat >&5 <<_ACEOF
2678
2679
2680 ## ----------- ##
2681 ## Core tests. ##
2682 ## ----------- ##
2683
2684 _ACEOF
2685
2686
2687 # Keep a trace of the command line.
2688 # Strip out --no-create and --no-recursion so they do not pile up.
2689 # Strip out --silent because we don't want to record it for future runs.
2690 # Also quote any args containing shell meta-characters.
2691 # Make two passes to allow for proper duplicate-argument suppression.
2692 ac_configure_args=
2693 ac_configure_args0=
2694 ac_configure_args1=
2695 ac_must_keep_next=false
2696 for ac_pass in 1 2
2697 do
2698 for ac_arg
2699 do
2700 case $ac_arg in
2701 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2702 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2703 | -silent | --silent | --silen | --sile | --sil)
2704 continue ;;
2705 *\'*)
2706 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2707 esac
2708 case $ac_pass in
2709 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2710 2)
2711 as_fn_append ac_configure_args1 " '$ac_arg'"
2712 if test $ac_must_keep_next = true; then
2713 ac_must_keep_next=false # Got value, back to normal.
2714 else
2715 case $ac_arg in
2716 *=* | --config-cache | -C | -disable-* | --disable-* \
2717 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2718 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2719 | -with-* | --with-* | -without-* | --without-* | --x)
2720 case "$ac_configure_args0 " in
2721 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2722 esac
2723 ;;
2724 -* ) ac_must_keep_next=true ;;
2725 esac
2726 fi
2727 as_fn_append ac_configure_args " '$ac_arg'"
2728 ;;
2729 esac
2730 done
2731 done
2732 { ac_configure_args0=; unset ac_configure_args0;}
2733 { ac_configure_args1=; unset ac_configure_args1;}
2734
2735 # When interrupted or exit'd, cleanup temporary files, and complete
2736 # config.log. We remove comments because anyway the quotes in there
2737 # would cause problems or look ugly.
2738 # WARNING: Use '\'' to represent an apostrophe within the trap.
2739 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2740 trap 'exit_status=$?
2741 # Save into config.log some information that might help in debugging.
2742 {
2743 echo
2744
2745 $as_echo "## ---------------- ##
2746 ## Cache variables. ##
2747 ## ---------------- ##"
2748 echo
2749 # The following way of writing the cache mishandles newlines in values,
2750 (
2751 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2752 eval ac_val=\$$ac_var
2753 case $ac_val in #(
2754 *${as_nl}*)
2755 case $ac_var in #(
2756 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2757 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2758 esac
2759 case $ac_var in #(
2760 _ | IFS | as_nl) ;; #(
2761 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2762 *) { eval $ac_var=; unset $ac_var;} ;;
2763 esac ;;
2764 esac
2765 done
2766 (set) 2>&1 |
2767 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2768 *${as_nl}ac_space=\ *)
2769 sed -n \
2770 "s/'\''/'\''\\\\'\'''\''/g;
2771 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2772 ;; #(
2773 *)
2774 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2775 ;;
2776 esac |
2777 sort
2778 )
2779 echo
2780
2781 $as_echo "## ----------------- ##
2782 ## Output variables. ##
2783 ## ----------------- ##"
2784 echo
2785 for ac_var in $ac_subst_vars
2786 do
2787 eval ac_val=\$$ac_var
2788 case $ac_val in
2789 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2790 esac
2791 $as_echo "$ac_var='\''$ac_val'\''"
2792 done | sort
2793 echo
2794
2795 if test -n "$ac_subst_files"; then
2796 $as_echo "## ------------------- ##
2797 ## File substitutions. ##
2798 ## ------------------- ##"
2799 echo
2800 for ac_var in $ac_subst_files
2801 do
2802 eval ac_val=\$$ac_var
2803 case $ac_val in
2804 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2805 esac
2806 $as_echo "$ac_var='\''$ac_val'\''"
2807 done | sort
2808 echo
2809 fi
2810
2811 if test -s confdefs.h; then
2812 $as_echo "## ----------- ##
2813 ## confdefs.h. ##
2814 ## ----------- ##"
2815 echo
2816 cat confdefs.h
2817 echo
2818 fi
2819 test "$ac_signal" != 0 &&
2820 $as_echo "$as_me: caught signal $ac_signal"
2821 $as_echo "$as_me: exit $exit_status"
2822 } >&5
2823 rm -f core *.core core.conftest.* &&
2824 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2825 exit $exit_status
2826 ' 0
2827 for ac_signal in 1 2 13 15; do
2828 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2829 done
2830 ac_signal=0
2831
2832 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2833 rm -f -r conftest* confdefs.h
2834
2835 $as_echo "/* confdefs.h */" > confdefs.h
2836
2837 # Predefined preprocessor variables.
2838
2839 cat >>confdefs.h <<_ACEOF
2840 #define PACKAGE_NAME "$PACKAGE_NAME"
2841 _ACEOF
2842
2843 cat >>confdefs.h <<_ACEOF
2844 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2845 _ACEOF
2846
2847 cat >>confdefs.h <<_ACEOF
2848 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2849 _ACEOF
2850
2851 cat >>confdefs.h <<_ACEOF
2852 #define PACKAGE_STRING "$PACKAGE_STRING"
2853 _ACEOF
2854
2855 cat >>confdefs.h <<_ACEOF
2856 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2857 _ACEOF
2858
2859 cat >>confdefs.h <<_ACEOF
2860 #define PACKAGE_URL "$PACKAGE_URL"
2861 _ACEOF
2862
2863
2864 # Let the site file select an alternate cache file if it wants to.
2865 # Prefer an explicitly selected file to automatically selected ones.
2866 ac_site_file1=NONE
2867 ac_site_file2=NONE
2868 if test -n "$CONFIG_SITE"; then
2869 # We do not want a PATH search for config.site.
2870 case $CONFIG_SITE in #((
2871 -*) ac_site_file1=./$CONFIG_SITE;;
2872 */*) ac_site_file1=$CONFIG_SITE;;
2873 *) ac_site_file1=./$CONFIG_SITE;;
2874 esac
2875 elif test "x$prefix" != xNONE; then
2876 ac_site_file1=$prefix/share/config.site
2877 ac_site_file2=$prefix/etc/config.site
2878 else
2879 ac_site_file1=$ac_default_prefix/share/config.site
2880 ac_site_file2=$ac_default_prefix/etc/config.site
2881 fi
2882 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2883 do
2884 test "x$ac_site_file" = xNONE && continue
2885 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2886 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2887 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2888 sed 's/^/| /' "$ac_site_file" >&5
2889 . "$ac_site_file" \
2890 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2891 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2892 as_fn_error $? "failed to load site script $ac_site_file
2893 See \`config.log' for more details" "$LINENO" 5; }
2894 fi
2895 done
2896
2897 if test -r "$cache_file"; then
2898 # Some versions of bash will fail to source /dev/null (special files
2899 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2900 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2902 $as_echo "$as_me: loading cache $cache_file" >&6;}
2903 case $cache_file in
2904 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2905 *) . "./$cache_file";;
2906 esac
2907 fi
2908 else
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2910 $as_echo "$as_me: creating cache $cache_file" >&6;}
2911 >$cache_file
2912 fi
2913
2914 as_fn_append ac_header_list " stdlib.h"
2915 as_fn_append ac_header_list " unistd.h"
2916 as_fn_append ac_header_list " sys/param.h"
2917 # Check that the precious variables saved in the cache have kept the same
2918 # value.
2919 ac_cache_corrupted=false
2920 for ac_var in $ac_precious_vars; do
2921 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2922 eval ac_new_set=\$ac_env_${ac_var}_set
2923 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2924 eval ac_new_val=\$ac_env_${ac_var}_value
2925 case $ac_old_set,$ac_new_set in
2926 set,)
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2928 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2929 ac_cache_corrupted=: ;;
2930 ,set)
2931 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2932 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2933 ac_cache_corrupted=: ;;
2934 ,);;
2935 *)
2936 if test "x$ac_old_val" != "x$ac_new_val"; then
2937 # differences in whitespace do not lead to failure.
2938 ac_old_val_w=`echo x $ac_old_val`
2939 ac_new_val_w=`echo x $ac_new_val`
2940 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2942 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2943 ac_cache_corrupted=:
2944 else
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2946 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2947 eval $ac_var=\$ac_old_val
2948 fi
2949 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2950 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2951 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2952 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2953 fi;;
2954 esac
2955 # Pass precious variables to config.status.
2956 if test "$ac_new_set" = set; then
2957 case $ac_new_val in
2958 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2959 *) ac_arg=$ac_var=$ac_new_val ;;
2960 esac
2961 case " $ac_configure_args " in
2962 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2963 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2964 esac
2965 fi
2966 done
2967 if $ac_cache_corrupted; then
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2969 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2971 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2972 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2973 fi
2974 ## -------------------- ##
2975 ## Main body of script. ##
2976 ## -------------------- ##
2977
2978 ac_ext=c
2979 ac_cpp='$CPP $CPPFLAGS'
2980 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2981 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2982 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2983
2984
2985
2986
2987
2988 ac_config_headers="$ac_config_headers config.h:config.in"
2989
2990
2991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2992 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2993 # Check whether --enable-maintainer-mode was given.
2994 if test "${enable_maintainer_mode+set}" = set; then :
2995 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2996 else
2997 USE_MAINTAINER_MODE=no
2998 fi
2999
3000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3001 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3002 if test $USE_MAINTAINER_MODE = yes; then
3003 MAINTAINER_MODE_TRUE=
3004 MAINTAINER_MODE_FALSE='#'
3005 else
3006 MAINTAINER_MODE_TRUE='#'
3007 MAINTAINER_MODE_FALSE=
3008 fi
3009
3010 MAINT=$MAINTAINER_MODE_TRUE
3011
3012
3013
3014 ac_ext=c
3015 ac_cpp='$CPP $CPPFLAGS'
3016 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3017 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3018 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3019 if test -n "$ac_tool_prefix"; then
3020 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3021 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3023 $as_echo_n "checking for $ac_word... " >&6; }
3024 if ${ac_cv_prog_CC+:} false; then :
3025 $as_echo_n "(cached) " >&6
3026 else
3027 if test -n "$CC"; then
3028 ac_cv_prog_CC="$CC" # Let the user override the test.
3029 else
3030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3031 for as_dir in $PATH
3032 do
3033 IFS=$as_save_IFS
3034 test -z "$as_dir" && as_dir=.
3035 for ac_exec_ext in '' $ac_executable_extensions; do
3036 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3037 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3038 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3039 break 2
3040 fi
3041 done
3042 done
3043 IFS=$as_save_IFS
3044
3045 fi
3046 fi
3047 CC=$ac_cv_prog_CC
3048 if test -n "$CC"; then
3049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3050 $as_echo "$CC" >&6; }
3051 else
3052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3053 $as_echo "no" >&6; }
3054 fi
3055
3056
3057 fi
3058 if test -z "$ac_cv_prog_CC"; then
3059 ac_ct_CC=$CC
3060 # Extract the first word of "gcc", so it can be a program name with args.
3061 set dummy gcc; ac_word=$2
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3063 $as_echo_n "checking for $ac_word... " >&6; }
3064 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3065 $as_echo_n "(cached) " >&6
3066 else
3067 if test -n "$ac_ct_CC"; then
3068 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3069 else
3070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3071 for as_dir in $PATH
3072 do
3073 IFS=$as_save_IFS
3074 test -z "$as_dir" && as_dir=.
3075 for ac_exec_ext in '' $ac_executable_extensions; do
3076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3077 ac_cv_prog_ac_ct_CC="gcc"
3078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3079 break 2
3080 fi
3081 done
3082 done
3083 IFS=$as_save_IFS
3084
3085 fi
3086 fi
3087 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3088 if test -n "$ac_ct_CC"; then
3089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3090 $as_echo "$ac_ct_CC" >&6; }
3091 else
3092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3093 $as_echo "no" >&6; }
3094 fi
3095
3096 if test "x$ac_ct_CC" = x; then
3097 CC=""
3098 else
3099 case $cross_compiling:$ac_tool_warned in
3100 yes:)
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3102 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3103 ac_tool_warned=yes ;;
3104 esac
3105 CC=$ac_ct_CC
3106 fi
3107 else
3108 CC="$ac_cv_prog_CC"
3109 fi
3110
3111 if test -z "$CC"; then
3112 if test -n "$ac_tool_prefix"; then
3113 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3114 set dummy ${ac_tool_prefix}cc; ac_word=$2
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3116 $as_echo_n "checking for $ac_word... " >&6; }
3117 if ${ac_cv_prog_CC+:} false; then :
3118 $as_echo_n "(cached) " >&6
3119 else
3120 if test -n "$CC"; then
3121 ac_cv_prog_CC="$CC" # Let the user override the test.
3122 else
3123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124 for as_dir in $PATH
3125 do
3126 IFS=$as_save_IFS
3127 test -z "$as_dir" && as_dir=.
3128 for ac_exec_ext in '' $ac_executable_extensions; do
3129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3130 ac_cv_prog_CC="${ac_tool_prefix}cc"
3131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3132 break 2
3133 fi
3134 done
3135 done
3136 IFS=$as_save_IFS
3137
3138 fi
3139 fi
3140 CC=$ac_cv_prog_CC
3141 if test -n "$CC"; then
3142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3143 $as_echo "$CC" >&6; }
3144 else
3145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3146 $as_echo "no" >&6; }
3147 fi
3148
3149
3150 fi
3151 fi
3152 if test -z "$CC"; then
3153 # Extract the first word of "cc", so it can be a program name with args.
3154 set dummy cc; ac_word=$2
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3156 $as_echo_n "checking for $ac_word... " >&6; }
3157 if ${ac_cv_prog_CC+:} false; then :
3158 $as_echo_n "(cached) " >&6
3159 else
3160 if test -n "$CC"; then
3161 ac_cv_prog_CC="$CC" # Let the user override the test.
3162 else
3163 ac_prog_rejected=no
3164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3165 for as_dir in $PATH
3166 do
3167 IFS=$as_save_IFS
3168 test -z "$as_dir" && as_dir=.
3169 for ac_exec_ext in '' $ac_executable_extensions; do
3170 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3171 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3172 ac_prog_rejected=yes
3173 continue
3174 fi
3175 ac_cv_prog_CC="cc"
3176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3177 break 2
3178 fi
3179 done
3180 done
3181 IFS=$as_save_IFS
3182
3183 if test $ac_prog_rejected = yes; then
3184 # We found a bogon in the path, so make sure we never use it.
3185 set dummy $ac_cv_prog_CC
3186 shift
3187 if test $# != 0; then
3188 # We chose a different compiler from the bogus one.
3189 # However, it has the same basename, so the bogon will be chosen
3190 # first if we set CC to just the basename; use the full file name.
3191 shift
3192 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3193 fi
3194 fi
3195 fi
3196 fi
3197 CC=$ac_cv_prog_CC
3198 if test -n "$CC"; then
3199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3200 $as_echo "$CC" >&6; }
3201 else
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3203 $as_echo "no" >&6; }
3204 fi
3205
3206
3207 fi
3208 if test -z "$CC"; then
3209 if test -n "$ac_tool_prefix"; then
3210 for ac_prog in cl.exe
3211 do
3212 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3213 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3215 $as_echo_n "checking for $ac_word... " >&6; }
3216 if ${ac_cv_prog_CC+:} false; then :
3217 $as_echo_n "(cached) " >&6
3218 else
3219 if test -n "$CC"; then
3220 ac_cv_prog_CC="$CC" # Let the user override the test.
3221 else
3222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3223 for as_dir in $PATH
3224 do
3225 IFS=$as_save_IFS
3226 test -z "$as_dir" && as_dir=.
3227 for ac_exec_ext in '' $ac_executable_extensions; do
3228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3229 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3231 break 2
3232 fi
3233 done
3234 done
3235 IFS=$as_save_IFS
3236
3237 fi
3238 fi
3239 CC=$ac_cv_prog_CC
3240 if test -n "$CC"; then
3241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3242 $as_echo "$CC" >&6; }
3243 else
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3245 $as_echo "no" >&6; }
3246 fi
3247
3248
3249 test -n "$CC" && break
3250 done
3251 fi
3252 if test -z "$CC"; then
3253 ac_ct_CC=$CC
3254 for ac_prog in cl.exe
3255 do
3256 # Extract the first word of "$ac_prog", so it can be a program name with args.
3257 set dummy $ac_prog; ac_word=$2
3258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3259 $as_echo_n "checking for $ac_word... " >&6; }
3260 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3261 $as_echo_n "(cached) " >&6
3262 else
3263 if test -n "$ac_ct_CC"; then
3264 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3265 else
3266 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3267 for as_dir in $PATH
3268 do
3269 IFS=$as_save_IFS
3270 test -z "$as_dir" && as_dir=.
3271 for ac_exec_ext in '' $ac_executable_extensions; do
3272 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3273 ac_cv_prog_ac_ct_CC="$ac_prog"
3274 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3275 break 2
3276 fi
3277 done
3278 done
3279 IFS=$as_save_IFS
3280
3281 fi
3282 fi
3283 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3284 if test -n "$ac_ct_CC"; then
3285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3286 $as_echo "$ac_ct_CC" >&6; }
3287 else
3288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3289 $as_echo "no" >&6; }
3290 fi
3291
3292
3293 test -n "$ac_ct_CC" && break
3294 done
3295
3296 if test "x$ac_ct_CC" = x; then
3297 CC=""
3298 else
3299 case $cross_compiling:$ac_tool_warned in
3300 yes:)
3301 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3302 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3303 ac_tool_warned=yes ;;
3304 esac
3305 CC=$ac_ct_CC
3306 fi
3307 fi
3308
3309 fi
3310
3311
3312 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3313 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3314 as_fn_error $? "no acceptable C compiler found in \$PATH
3315 See \`config.log' for more details" "$LINENO" 5; }
3316
3317 # Provide some information about the compiler.
3318 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3319 set X $ac_compile
3320 ac_compiler=$2
3321 for ac_option in --version -v -V -qversion; do
3322 { { ac_try="$ac_compiler $ac_option >&5"
3323 case "(($ac_try" in
3324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3325 *) ac_try_echo=$ac_try;;
3326 esac
3327 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3328 $as_echo "$ac_try_echo"; } >&5
3329 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3330 ac_status=$?
3331 if test -s conftest.err; then
3332 sed '10a\
3333 ... rest of stderr output deleted ...
3334 10q' conftest.err >conftest.er1
3335 cat conftest.er1 >&5
3336 fi
3337 rm -f conftest.er1 conftest.err
3338 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3339 test $ac_status = 0; }
3340 done
3341
3342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3343 /* end confdefs.h. */
3344
3345 int
3346 main ()
3347 {
3348
3349 ;
3350 return 0;
3351 }
3352 _ACEOF
3353 ac_clean_files_save=$ac_clean_files
3354 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3355 # Try to create an executable without -o first, disregard a.out.
3356 # It will help us diagnose broken compilers, and finding out an intuition
3357 # of exeext.
3358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3359 $as_echo_n "checking whether the C compiler works... " >&6; }
3360 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3361
3362 # The possible output files:
3363 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3364
3365 ac_rmfiles=
3366 for ac_file in $ac_files
3367 do
3368 case $ac_file in
3369 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3370 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3371 esac
3372 done
3373 rm -f $ac_rmfiles
3374
3375 if { { ac_try="$ac_link_default"
3376 case "(($ac_try" in
3377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3378 *) ac_try_echo=$ac_try;;
3379 esac
3380 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3381 $as_echo "$ac_try_echo"; } >&5
3382 (eval "$ac_link_default") 2>&5
3383 ac_status=$?
3384 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3385 test $ac_status = 0; }; then :
3386 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3387 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3388 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3389 # so that the user can short-circuit this test for compilers unknown to
3390 # Autoconf.
3391 for ac_file in $ac_files ''
3392 do
3393 test -f "$ac_file" || continue
3394 case $ac_file in
3395 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3396 ;;
3397 [ab].out )
3398 # We found the default executable, but exeext='' is most
3399 # certainly right.
3400 break;;
3401 *.* )
3402 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3403 then :; else
3404 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3405 fi
3406 # We set ac_cv_exeext here because the later test for it is not
3407 # safe: cross compilers may not add the suffix if given an `-o'
3408 # argument, so we may need to know it at that point already.
3409 # Even if this section looks crufty: it has the advantage of
3410 # actually working.
3411 break;;
3412 * )
3413 break;;
3414 esac
3415 done
3416 test "$ac_cv_exeext" = no && ac_cv_exeext=
3417
3418 else
3419 ac_file=''
3420 fi
3421 if test -z "$ac_file"; then :
3422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3423 $as_echo "no" >&6; }
3424 $as_echo "$as_me: failed program was:" >&5
3425 sed 's/^/| /' conftest.$ac_ext >&5
3426
3427 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3428 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3429 as_fn_error 77 "C compiler cannot create executables
3430 See \`config.log' for more details" "$LINENO" 5; }
3431 else
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3433 $as_echo "yes" >&6; }
3434 fi
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3436 $as_echo_n "checking for C compiler default output file name... " >&6; }
3437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3438 $as_echo "$ac_file" >&6; }
3439 ac_exeext=$ac_cv_exeext
3440
3441 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3442 ac_clean_files=$ac_clean_files_save
3443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3444 $as_echo_n "checking for suffix of executables... " >&6; }
3445 if { { ac_try="$ac_link"
3446 case "(($ac_try" in
3447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3448 *) ac_try_echo=$ac_try;;
3449 esac
3450 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3451 $as_echo "$ac_try_echo"; } >&5
3452 (eval "$ac_link") 2>&5
3453 ac_status=$?
3454 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3455 test $ac_status = 0; }; then :
3456 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3457 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3458 # work properly (i.e., refer to `conftest.exe'), while it won't with
3459 # `rm'.
3460 for ac_file in conftest.exe conftest conftest.*; do
3461 test -f "$ac_file" || continue
3462 case $ac_file in
3463 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3464 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3465 break;;
3466 * ) break;;
3467 esac
3468 done
3469 else
3470 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3471 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3472 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3473 See \`config.log' for more details" "$LINENO" 5; }
3474 fi
3475 rm -f conftest conftest$ac_cv_exeext
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3477 $as_echo "$ac_cv_exeext" >&6; }
3478
3479 rm -f conftest.$ac_ext
3480 EXEEXT=$ac_cv_exeext
3481 ac_exeext=$EXEEXT
3482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3483 /* end confdefs.h. */
3484 #include <stdio.h>
3485 int
3486 main ()
3487 {
3488 FILE *f = fopen ("conftest.out", "w");
3489 return ferror (f) || fclose (f) != 0;
3490
3491 ;
3492 return 0;
3493 }
3494 _ACEOF
3495 ac_clean_files="$ac_clean_files conftest.out"
3496 # Check that the compiler produces executables we can run. If not, either
3497 # the compiler is broken, or we cross compile.
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3499 $as_echo_n "checking whether we are cross compiling... " >&6; }
3500 if test "$cross_compiling" != yes; then
3501 { { ac_try="$ac_link"
3502 case "(($ac_try" in
3503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3504 *) ac_try_echo=$ac_try;;
3505 esac
3506 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3507 $as_echo "$ac_try_echo"; } >&5
3508 (eval "$ac_link") 2>&5
3509 ac_status=$?
3510 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3511 test $ac_status = 0; }
3512 if { ac_try='./conftest$ac_cv_exeext'
3513 { { case "(($ac_try" in
3514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3515 *) ac_try_echo=$ac_try;;
3516 esac
3517 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3518 $as_echo "$ac_try_echo"; } >&5
3519 (eval "$ac_try") 2>&5
3520 ac_status=$?
3521 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3522 test $ac_status = 0; }; }; then
3523 cross_compiling=no
3524 else
3525 if test "$cross_compiling" = maybe; then
3526 cross_compiling=yes
3527 else
3528 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3529 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3530 as_fn_error $? "cannot run C compiled programs.
3531 If you meant to cross compile, use \`--host'.
3532 See \`config.log' for more details" "$LINENO" 5; }
3533 fi
3534 fi
3535 fi
3536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3537 $as_echo "$cross_compiling" >&6; }
3538
3539 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3540 ac_clean_files=$ac_clean_files_save
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3542 $as_echo_n "checking for suffix of object files... " >&6; }
3543 if ${ac_cv_objext+:} false; then :
3544 $as_echo_n "(cached) " >&6
3545 else
3546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3547 /* end confdefs.h. */
3548
3549 int
3550 main ()
3551 {
3552
3553 ;
3554 return 0;
3555 }
3556 _ACEOF
3557 rm -f conftest.o conftest.obj
3558 if { { ac_try="$ac_compile"
3559 case "(($ac_try" in
3560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3561 *) ac_try_echo=$ac_try;;
3562 esac
3563 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3564 $as_echo "$ac_try_echo"; } >&5
3565 (eval "$ac_compile") 2>&5
3566 ac_status=$?
3567 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3568 test $ac_status = 0; }; then :
3569 for ac_file in conftest.o conftest.obj conftest.*; do
3570 test -f "$ac_file" || continue;
3571 case $ac_file in
3572 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3573 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3574 break;;
3575 esac
3576 done
3577 else
3578 $as_echo "$as_me: failed program was:" >&5
3579 sed 's/^/| /' conftest.$ac_ext >&5
3580
3581 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3582 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3583 as_fn_error $? "cannot compute suffix of object files: cannot compile
3584 See \`config.log' for more details" "$LINENO" 5; }
3585 fi
3586 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3587 fi
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3589 $as_echo "$ac_cv_objext" >&6; }
3590 OBJEXT=$ac_cv_objext
3591 ac_objext=$OBJEXT
3592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3593 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3594 if ${ac_cv_c_compiler_gnu+:} false; then :
3595 $as_echo_n "(cached) " >&6
3596 else
3597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3598 /* end confdefs.h. */
3599
3600 int
3601 main ()
3602 {
3603 #ifndef __GNUC__
3604 choke me
3605 #endif
3606
3607 ;
3608 return 0;
3609 }
3610 _ACEOF
3611 if ac_fn_c_try_compile "$LINENO"; then :
3612 ac_compiler_gnu=yes
3613 else
3614 ac_compiler_gnu=no
3615 fi
3616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3617 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3618
3619 fi
3620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3621 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3622 if test $ac_compiler_gnu = yes; then
3623 GCC=yes
3624 else
3625 GCC=
3626 fi
3627 ac_test_CFLAGS=${CFLAGS+set}
3628 ac_save_CFLAGS=$CFLAGS
3629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3630 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3631 if ${ac_cv_prog_cc_g+:} false; then :
3632 $as_echo_n "(cached) " >&6
3633 else
3634 ac_save_c_werror_flag=$ac_c_werror_flag
3635 ac_c_werror_flag=yes
3636 ac_cv_prog_cc_g=no
3637 CFLAGS="-g"
3638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3639 /* end confdefs.h. */
3640
3641 int
3642 main ()
3643 {
3644
3645 ;
3646 return 0;
3647 }
3648 _ACEOF
3649 if ac_fn_c_try_compile "$LINENO"; then :
3650 ac_cv_prog_cc_g=yes
3651 else
3652 CFLAGS=""
3653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3654 /* end confdefs.h. */
3655
3656 int
3657 main ()
3658 {
3659
3660 ;
3661 return 0;
3662 }
3663 _ACEOF
3664 if ac_fn_c_try_compile "$LINENO"; then :
3665
3666 else
3667 ac_c_werror_flag=$ac_save_c_werror_flag
3668 CFLAGS="-g"
3669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3670 /* end confdefs.h. */
3671
3672 int
3673 main ()
3674 {
3675
3676 ;
3677 return 0;
3678 }
3679 _ACEOF
3680 if ac_fn_c_try_compile "$LINENO"; then :
3681 ac_cv_prog_cc_g=yes
3682 fi
3683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3684 fi
3685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3686 fi
3687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3688 ac_c_werror_flag=$ac_save_c_werror_flag
3689 fi
3690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3691 $as_echo "$ac_cv_prog_cc_g" >&6; }
3692 if test "$ac_test_CFLAGS" = set; then
3693 CFLAGS=$ac_save_CFLAGS
3694 elif test $ac_cv_prog_cc_g = yes; then
3695 if test "$GCC" = yes; then
3696 CFLAGS="-g -O2"
3697 else
3698 CFLAGS="-g"
3699 fi
3700 else
3701 if test "$GCC" = yes; then
3702 CFLAGS="-O2"
3703 else
3704 CFLAGS=
3705 fi
3706 fi
3707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3708 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3709 if ${ac_cv_prog_cc_c89+:} false; then :
3710 $as_echo_n "(cached) " >&6
3711 else
3712 ac_cv_prog_cc_c89=no
3713 ac_save_CC=$CC
3714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3715 /* end confdefs.h. */
3716 #include <stdarg.h>
3717 #include <stdio.h>
3718 struct stat;
3719 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3720 struct buf { int x; };
3721 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3722 static char *e (p, i)
3723 char **p;
3724 int i;
3725 {
3726 return p[i];
3727 }
3728 static char *f (char * (*g) (char **, int), char **p, ...)
3729 {
3730 char *s;
3731 va_list v;
3732 va_start (v,p);
3733 s = g (p, va_arg (v,int));
3734 va_end (v);
3735 return s;
3736 }
3737
3738 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3739 function prototypes and stuff, but not '\xHH' hex character constants.
3740 These don't provoke an error unfortunately, instead are silently treated
3741 as 'x'. The following induces an error, until -std is added to get
3742 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3743 array size at least. It's necessary to write '\x00'==0 to get something
3744 that's true only with -std. */
3745 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3746
3747 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3748 inside strings and character constants. */
3749 #define FOO(x) 'x'
3750 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3751
3752 int test (int i, double x);
3753 struct s1 {int (*f) (int a);};
3754 struct s2 {int (*f) (double a);};
3755 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3756 int argc;
3757 char **argv;
3758 int
3759 main ()
3760 {
3761 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3762 ;
3763 return 0;
3764 }
3765 _ACEOF
3766 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3767 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3768 do
3769 CC="$ac_save_CC $ac_arg"
3770 if ac_fn_c_try_compile "$LINENO"; then :
3771 ac_cv_prog_cc_c89=$ac_arg
3772 fi
3773 rm -f core conftest.err conftest.$ac_objext
3774 test "x$ac_cv_prog_cc_c89" != "xno" && break
3775 done
3776 rm -f conftest.$ac_ext
3777 CC=$ac_save_CC
3778
3779 fi
3780 # AC_CACHE_VAL
3781 case "x$ac_cv_prog_cc_c89" in
3782 x)
3783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3784 $as_echo "none needed" >&6; } ;;
3785 xno)
3786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3787 $as_echo "unsupported" >&6; } ;;
3788 *)
3789 CC="$CC $ac_cv_prog_cc_c89"
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3791 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3792 esac
3793 if test "x$ac_cv_prog_cc_c89" != xno; then :
3794
3795 fi
3796
3797 ac_ext=c
3798 ac_cpp='$CPP $CPPFLAGS'
3799 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3800 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3801 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3802
3803 ac_ext=cpp
3804 ac_cpp='$CXXCPP $CPPFLAGS'
3805 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3806 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3807 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3808 if test -z "$CXX"; then
3809 if test -n "$CCC"; then
3810 CXX=$CCC
3811 else
3812 if test -n "$ac_tool_prefix"; then
3813 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3814 do
3815 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3816 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818 $as_echo_n "checking for $ac_word... " >&6; }
3819 if ${ac_cv_prog_CXX+:} false; then :
3820 $as_echo_n "(cached) " >&6
3821 else
3822 if test -n "$CXX"; then
3823 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3824 else
3825 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826 for as_dir in $PATH
3827 do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
3830 for ac_exec_ext in '' $ac_executable_extensions; do
3831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3832 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3833 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3834 break 2
3835 fi
3836 done
3837 done
3838 IFS=$as_save_IFS
3839
3840 fi
3841 fi
3842 CXX=$ac_cv_prog_CXX
3843 if test -n "$CXX"; then
3844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3845 $as_echo "$CXX" >&6; }
3846 else
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848 $as_echo "no" >&6; }
3849 fi
3850
3851
3852 test -n "$CXX" && break
3853 done
3854 fi
3855 if test -z "$CXX"; then
3856 ac_ct_CXX=$CXX
3857 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3858 do
3859 # Extract the first word of "$ac_prog", so it can be a program name with args.
3860 set dummy $ac_prog; ac_word=$2
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862 $as_echo_n "checking for $ac_word... " >&6; }
3863 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3864 $as_echo_n "(cached) " >&6
3865 else
3866 if test -n "$ac_ct_CXX"; then
3867 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3868 else
3869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3870 for as_dir in $PATH
3871 do
3872 IFS=$as_save_IFS
3873 test -z "$as_dir" && as_dir=.
3874 for ac_exec_ext in '' $ac_executable_extensions; do
3875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3876 ac_cv_prog_ac_ct_CXX="$ac_prog"
3877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3878 break 2
3879 fi
3880 done
3881 done
3882 IFS=$as_save_IFS
3883
3884 fi
3885 fi
3886 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3887 if test -n "$ac_ct_CXX"; then
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3889 $as_echo "$ac_ct_CXX" >&6; }
3890 else
3891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3892 $as_echo "no" >&6; }
3893 fi
3894
3895
3896 test -n "$ac_ct_CXX" && break
3897 done
3898
3899 if test "x$ac_ct_CXX" = x; then
3900 CXX="g++"
3901 else
3902 case $cross_compiling:$ac_tool_warned in
3903 yes:)
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3905 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3906 ac_tool_warned=yes ;;
3907 esac
3908 CXX=$ac_ct_CXX
3909 fi
3910 fi
3911
3912 fi
3913 fi
3914 # Provide some information about the compiler.
3915 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3916 set X $ac_compile
3917 ac_compiler=$2
3918 for ac_option in --version -v -V -qversion; do
3919 { { ac_try="$ac_compiler $ac_option >&5"
3920 case "(($ac_try" in
3921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3922 *) ac_try_echo=$ac_try;;
3923 esac
3924 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3925 $as_echo "$ac_try_echo"; } >&5
3926 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3927 ac_status=$?
3928 if test -s conftest.err; then
3929 sed '10a\
3930 ... rest of stderr output deleted ...
3931 10q' conftest.err >conftest.er1
3932 cat conftest.er1 >&5
3933 fi
3934 rm -f conftest.er1 conftest.err
3935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3936 test $ac_status = 0; }
3937 done
3938
3939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3940 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3941 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3942 $as_echo_n "(cached) " >&6
3943 else
3944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3945 /* end confdefs.h. */
3946
3947 int
3948 main ()
3949 {
3950 #ifndef __GNUC__
3951 choke me
3952 #endif
3953
3954 ;
3955 return 0;
3956 }
3957 _ACEOF
3958 if ac_fn_cxx_try_compile "$LINENO"; then :
3959 ac_compiler_gnu=yes
3960 else
3961 ac_compiler_gnu=no
3962 fi
3963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3964 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3965
3966 fi
3967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3968 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3969 if test $ac_compiler_gnu = yes; then
3970 GXX=yes
3971 else
3972 GXX=
3973 fi
3974 ac_test_CXXFLAGS=${CXXFLAGS+set}
3975 ac_save_CXXFLAGS=$CXXFLAGS
3976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3977 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3978 if ${ac_cv_prog_cxx_g+:} false; then :
3979 $as_echo_n "(cached) " >&6
3980 else
3981 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3982 ac_cxx_werror_flag=yes
3983 ac_cv_prog_cxx_g=no
3984 CXXFLAGS="-g"
3985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3986 /* end confdefs.h. */
3987
3988 int
3989 main ()
3990 {
3991
3992 ;
3993 return 0;
3994 }
3995 _ACEOF
3996 if ac_fn_cxx_try_compile "$LINENO"; then :
3997 ac_cv_prog_cxx_g=yes
3998 else
3999 CXXFLAGS=""
4000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4001 /* end confdefs.h. */
4002
4003 int
4004 main ()
4005 {
4006
4007 ;
4008 return 0;
4009 }
4010 _ACEOF
4011 if ac_fn_cxx_try_compile "$LINENO"; then :
4012
4013 else
4014 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4015 CXXFLAGS="-g"
4016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4017 /* end confdefs.h. */
4018
4019 int
4020 main ()
4021 {
4022
4023 ;
4024 return 0;
4025 }
4026 _ACEOF
4027 if ac_fn_cxx_try_compile "$LINENO"; then :
4028 ac_cv_prog_cxx_g=yes
4029 fi
4030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4031 fi
4032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4033 fi
4034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4035 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4036 fi
4037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4038 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4039 if test "$ac_test_CXXFLAGS" = set; then
4040 CXXFLAGS=$ac_save_CXXFLAGS
4041 elif test $ac_cv_prog_cxx_g = yes; then
4042 if test "$GXX" = yes; then
4043 CXXFLAGS="-g -O2"
4044 else
4045 CXXFLAGS="-g"
4046 fi
4047 else
4048 if test "$GXX" = yes; then
4049 CXXFLAGS="-O2"
4050 else
4051 CXXFLAGS=
4052 fi
4053 fi
4054 ac_ext=c
4055 ac_cpp='$CPP $CPPFLAGS'
4056 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4057 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4058 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4059
4060
4061
4062 ac_ext=c
4063 ac_cpp='$CPP $CPPFLAGS'
4064 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4065 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4066 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4068 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4069 # On Suns, sometimes $CPP names a directory.
4070 if test -n "$CPP" && test -d "$CPP"; then
4071 CPP=
4072 fi
4073 if test -z "$CPP"; then
4074 if ${ac_cv_prog_CPP+:} false; then :
4075 $as_echo_n "(cached) " >&6
4076 else
4077 # Double quotes because CPP needs to be expanded
4078 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4079 do
4080 ac_preproc_ok=false
4081 for ac_c_preproc_warn_flag in '' yes
4082 do
4083 # Use a header file that comes with gcc, so configuring glibc
4084 # with a fresh cross-compiler works.
4085 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4086 # <limits.h> exists even on freestanding compilers.
4087 # On the NeXT, cc -E runs the code through the compiler's parser,
4088 # not just through cpp. "Syntax error" is here to catch this case.
4089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4090 /* end confdefs.h. */
4091 #ifdef __STDC__
4092 # include <limits.h>
4093 #else
4094 # include <assert.h>
4095 #endif
4096 Syntax error
4097 _ACEOF
4098 if ac_fn_c_try_cpp "$LINENO"; then :
4099
4100 else
4101 # Broken: fails on valid input.
4102 continue
4103 fi
4104 rm -f conftest.err conftest.i conftest.$ac_ext
4105
4106 # OK, works on sane cases. Now check whether nonexistent headers
4107 # can be detected and how.
4108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4109 /* end confdefs.h. */
4110 #include <ac_nonexistent.h>
4111 _ACEOF
4112 if ac_fn_c_try_cpp "$LINENO"; then :
4113 # Broken: success on invalid input.
4114 continue
4115 else
4116 # Passes both tests.
4117 ac_preproc_ok=:
4118 break
4119 fi
4120 rm -f conftest.err conftest.i conftest.$ac_ext
4121
4122 done
4123 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4124 rm -f conftest.i conftest.err conftest.$ac_ext
4125 if $ac_preproc_ok; then :
4126 break
4127 fi
4128
4129 done
4130 ac_cv_prog_CPP=$CPP
4131
4132 fi
4133 CPP=$ac_cv_prog_CPP
4134 else
4135 ac_cv_prog_CPP=$CPP
4136 fi
4137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4138 $as_echo "$CPP" >&6; }
4139 ac_preproc_ok=false
4140 for ac_c_preproc_warn_flag in '' yes
4141 do
4142 # Use a header file that comes with gcc, so configuring glibc
4143 # with a fresh cross-compiler works.
4144 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4145 # <limits.h> exists even on freestanding compilers.
4146 # On the NeXT, cc -E runs the code through the compiler's parser,
4147 # not just through cpp. "Syntax error" is here to catch this case.
4148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4149 /* end confdefs.h. */
4150 #ifdef __STDC__
4151 # include <limits.h>
4152 #else
4153 # include <assert.h>
4154 #endif
4155 Syntax error
4156 _ACEOF
4157 if ac_fn_c_try_cpp "$LINENO"; then :
4158
4159 else
4160 # Broken: fails on valid input.
4161 continue
4162 fi
4163 rm -f conftest.err conftest.i conftest.$ac_ext
4164
4165 # OK, works on sane cases. Now check whether nonexistent headers
4166 # can be detected and how.
4167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4168 /* end confdefs.h. */
4169 #include <ac_nonexistent.h>
4170 _ACEOF
4171 if ac_fn_c_try_cpp "$LINENO"; then :
4172 # Broken: success on invalid input.
4173 continue
4174 else
4175 # Passes both tests.
4176 ac_preproc_ok=:
4177 break
4178 fi
4179 rm -f conftest.err conftest.i conftest.$ac_ext
4180
4181 done
4182 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4183 rm -f conftest.i conftest.err conftest.$ac_ext
4184 if $ac_preproc_ok; then :
4185
4186 else
4187 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4188 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4189 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4190 See \`config.log' for more details" "$LINENO" 5; }
4191 fi
4192
4193 ac_ext=c
4194 ac_cpp='$CPP $CPPFLAGS'
4195 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4196 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4197 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4198
4199
4200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4201 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4202 if ${ac_cv_path_GREP+:} false; then :
4203 $as_echo_n "(cached) " >&6
4204 else
4205 if test -z "$GREP"; then
4206 ac_path_GREP_found=false
4207 # Loop through the user's path and test for each of PROGNAME-LIST
4208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4209 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4210 do
4211 IFS=$as_save_IFS
4212 test -z "$as_dir" && as_dir=.
4213 for ac_prog in grep ggrep; do
4214 for ac_exec_ext in '' $ac_executable_extensions; do
4215 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4216 as_fn_executable_p "$ac_path_GREP" || continue
4217 # Check for GNU ac_path_GREP and select it if it is found.
4218 # Check for GNU $ac_path_GREP
4219 case `"$ac_path_GREP" --version 2>&1` in
4220 *GNU*)
4221 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4222 *)
4223 ac_count=0
4224 $as_echo_n 0123456789 >"conftest.in"
4225 while :
4226 do
4227 cat "conftest.in" "conftest.in" >"conftest.tmp"
4228 mv "conftest.tmp" "conftest.in"
4229 cp "conftest.in" "conftest.nl"
4230 $as_echo 'GREP' >> "conftest.nl"
4231 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4232 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4233 as_fn_arith $ac_count + 1 && ac_count=$as_val
4234 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4235 # Best one so far, save it but keep looking for a better one
4236 ac_cv_path_GREP="$ac_path_GREP"
4237 ac_path_GREP_max=$ac_count
4238 fi
4239 # 10*(2^10) chars as input seems more than enough
4240 test $ac_count -gt 10 && break
4241 done
4242 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4243 esac
4244
4245 $ac_path_GREP_found && break 3
4246 done
4247 done
4248 done
4249 IFS=$as_save_IFS
4250 if test -z "$ac_cv_path_GREP"; then
4251 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4252 fi
4253 else
4254 ac_cv_path_GREP=$GREP
4255 fi
4256
4257 fi
4258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4259 $as_echo "$ac_cv_path_GREP" >&6; }
4260 GREP="$ac_cv_path_GREP"
4261
4262
4263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4264 $as_echo_n "checking for egrep... " >&6; }
4265 if ${ac_cv_path_EGREP+:} false; then :
4266 $as_echo_n "(cached) " >&6
4267 else
4268 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4269 then ac_cv_path_EGREP="$GREP -E"
4270 else
4271 if test -z "$EGREP"; then
4272 ac_path_EGREP_found=false
4273 # Loop through the user's path and test for each of PROGNAME-LIST
4274 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4275 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4276 do
4277 IFS=$as_save_IFS
4278 test -z "$as_dir" && as_dir=.
4279 for ac_prog in egrep; do
4280 for ac_exec_ext in '' $ac_executable_extensions; do
4281 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4282 as_fn_executable_p "$ac_path_EGREP" || continue
4283 # Check for GNU ac_path_EGREP and select it if it is found.
4284 # Check for GNU $ac_path_EGREP
4285 case `"$ac_path_EGREP" --version 2>&1` in
4286 *GNU*)
4287 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4288 *)
4289 ac_count=0
4290 $as_echo_n 0123456789 >"conftest.in"
4291 while :
4292 do
4293 cat "conftest.in" "conftest.in" >"conftest.tmp"
4294 mv "conftest.tmp" "conftest.in"
4295 cp "conftest.in" "conftest.nl"
4296 $as_echo 'EGREP' >> "conftest.nl"
4297 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4298 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4299 as_fn_arith $ac_count + 1 && ac_count=$as_val
4300 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4301 # Best one so far, save it but keep looking for a better one
4302 ac_cv_path_EGREP="$ac_path_EGREP"
4303 ac_path_EGREP_max=$ac_count
4304 fi
4305 # 10*(2^10) chars as input seems more than enough
4306 test $ac_count -gt 10 && break
4307 done
4308 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4309 esac
4310
4311 $ac_path_EGREP_found && break 3
4312 done
4313 done
4314 done
4315 IFS=$as_save_IFS
4316 if test -z "$ac_cv_path_EGREP"; then
4317 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4318 fi
4319 else
4320 ac_cv_path_EGREP=$EGREP
4321 fi
4322
4323 fi
4324 fi
4325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4326 $as_echo "$ac_cv_path_EGREP" >&6; }
4327 EGREP="$ac_cv_path_EGREP"
4328
4329
4330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4331 $as_echo_n "checking for ANSI C header files... " >&6; }
4332 if ${ac_cv_header_stdc+:} false; then :
4333 $as_echo_n "(cached) " >&6
4334 else
4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4336 /* end confdefs.h. */
4337 #include <stdlib.h>
4338 #include <stdarg.h>
4339 #include <string.h>
4340 #include <float.h>
4341
4342 int
4343 main ()
4344 {
4345
4346 ;
4347 return 0;
4348 }
4349 _ACEOF
4350 if ac_fn_c_try_compile "$LINENO"; then :
4351 ac_cv_header_stdc=yes
4352 else
4353 ac_cv_header_stdc=no
4354 fi
4355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4356
4357 if test $ac_cv_header_stdc = yes; then
4358 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4360 /* end confdefs.h. */
4361 #include <string.h>
4362
4363 _ACEOF
4364 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4365 $EGREP "memchr" >/dev/null 2>&1; then :
4366
4367 else
4368 ac_cv_header_stdc=no
4369 fi
4370 rm -f conftest*
4371
4372 fi
4373
4374 if test $ac_cv_header_stdc = yes; then
4375 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4377 /* end confdefs.h. */
4378 #include <stdlib.h>
4379
4380 _ACEOF
4381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4382 $EGREP "free" >/dev/null 2>&1; then :
4383
4384 else
4385 ac_cv_header_stdc=no
4386 fi
4387 rm -f conftest*
4388
4389 fi
4390
4391 if test $ac_cv_header_stdc = yes; then
4392 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4393 if test "$cross_compiling" = yes; then :
4394 :
4395 else
4396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4397 /* end confdefs.h. */
4398 #include <ctype.h>
4399 #include <stdlib.h>
4400 #if ((' ' & 0x0FF) == 0x020)
4401 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4402 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4403 #else
4404 # define ISLOWER(c) \
4405 (('a' <= (c) && (c) <= 'i') \
4406 || ('j' <= (c) && (c) <= 'r') \
4407 || ('s' <= (c) && (c) <= 'z'))
4408 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4409 #endif
4410
4411 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4412 int
4413 main ()
4414 {
4415 int i;
4416 for (i = 0; i < 256; i++)
4417 if (XOR (islower (i), ISLOWER (i))
4418 || toupper (i) != TOUPPER (i))
4419 return 2;
4420 return 0;
4421 }
4422 _ACEOF
4423 if ac_fn_c_try_run "$LINENO"; then :
4424
4425 else
4426 ac_cv_header_stdc=no
4427 fi
4428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4429 conftest.$ac_objext conftest.beam conftest.$ac_ext
4430 fi
4431
4432 fi
4433 fi
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4435 $as_echo "$ac_cv_header_stdc" >&6; }
4436 if test $ac_cv_header_stdc = yes; then
4437
4438 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4439
4440 fi
4441
4442 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4443 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4444 inttypes.h stdint.h unistd.h
4445 do :
4446 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4447 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4448 "
4449 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4450 cat >>confdefs.h <<_ACEOF
4451 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4452 _ACEOF
4453
4454 fi
4455
4456 done
4457
4458
4459
4460 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4461 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4462 MINIX=yes
4463 else
4464 MINIX=
4465 fi
4466
4467
4468 if test "$MINIX" = yes; then
4469
4470 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4471
4472
4473 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4474
4475
4476 $as_echo "#define _MINIX 1" >>confdefs.h
4477
4478 fi
4479
4480
4481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4482 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4483 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4484 $as_echo_n "(cached) " >&6
4485 else
4486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4487 /* end confdefs.h. */
4488
4489 # define __EXTENSIONS__ 1
4490 $ac_includes_default
4491 int
4492 main ()
4493 {
4494
4495 ;
4496 return 0;
4497 }
4498 _ACEOF
4499 if ac_fn_c_try_compile "$LINENO"; then :
4500 ac_cv_safe_to_define___extensions__=yes
4501 else
4502 ac_cv_safe_to_define___extensions__=no
4503 fi
4504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4505 fi
4506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4507 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4508 test $ac_cv_safe_to_define___extensions__ = yes &&
4509 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4510
4511 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4512
4513 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4514
4515 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4516
4517 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4518
4519
4520 ac_aux_dir=
4521 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4522 if test -f "$ac_dir/install-sh"; then
4523 ac_aux_dir=$ac_dir
4524 ac_install_sh="$ac_aux_dir/install-sh -c"
4525 break
4526 elif test -f "$ac_dir/install.sh"; then
4527 ac_aux_dir=$ac_dir
4528 ac_install_sh="$ac_aux_dir/install.sh -c"
4529 break
4530 elif test -f "$ac_dir/shtool"; then
4531 ac_aux_dir=$ac_dir
4532 ac_install_sh="$ac_aux_dir/shtool install -c"
4533 break
4534 fi
4535 done
4536 if test -z "$ac_aux_dir"; then
4537 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4538 fi
4539
4540 # These three variables are undocumented and unsupported,
4541 # and are intended to be withdrawn in a future Autoconf release.
4542 # They can cause serious problems if a builder's source tree is in a directory
4543 # whose full name contains unusual characters.
4544 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4545 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4546 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4547
4548
4549 # Make sure we can run config.sub.
4550 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4551 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4552
4553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4554 $as_echo_n "checking build system type... " >&6; }
4555 if ${ac_cv_build+:} false; then :
4556 $as_echo_n "(cached) " >&6
4557 else
4558 ac_build_alias=$build_alias
4559 test "x$ac_build_alias" = x &&
4560 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4561 test "x$ac_build_alias" = x &&
4562 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4563 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4564 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4565
4566 fi
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4568 $as_echo "$ac_cv_build" >&6; }
4569 case $ac_cv_build in
4570 *-*-*) ;;
4571 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4572 esac
4573 build=$ac_cv_build
4574 ac_save_IFS=$IFS; IFS='-'
4575 set x $ac_cv_build
4576 shift
4577 build_cpu=$1
4578 build_vendor=$2
4579 shift; shift
4580 # Remember, the first character of IFS is used to create $*,
4581 # except with old shells:
4582 build_os=$*
4583 IFS=$ac_save_IFS
4584 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4585
4586
4587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4588 $as_echo_n "checking host system type... " >&6; }
4589 if ${ac_cv_host+:} false; then :
4590 $as_echo_n "(cached) " >&6
4591 else
4592 if test "x$host_alias" = x; then
4593 ac_cv_host=$ac_cv_build
4594 else
4595 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4596 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4597 fi
4598
4599 fi
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4601 $as_echo "$ac_cv_host" >&6; }
4602 case $ac_cv_host in
4603 *-*-*) ;;
4604 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4605 esac
4606 host=$ac_cv_host
4607 ac_save_IFS=$IFS; IFS='-'
4608 set x $ac_cv_host
4609 shift
4610 host_cpu=$1
4611 host_vendor=$2
4612 shift; shift
4613 # Remember, the first character of IFS is used to create $*,
4614 # except with old shells:
4615 host_os=$*
4616 IFS=$ac_save_IFS
4617 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4618
4619
4620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4621 $as_echo_n "checking target system type... " >&6; }
4622 if ${ac_cv_target+:} false; then :
4623 $as_echo_n "(cached) " >&6
4624 else
4625 if test "x$target_alias" = x; then
4626 ac_cv_target=$ac_cv_host
4627 else
4628 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4629 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4630 fi
4631
4632 fi
4633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4634 $as_echo "$ac_cv_target" >&6; }
4635 case $ac_cv_target in
4636 *-*-*) ;;
4637 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4638 esac
4639 target=$ac_cv_target
4640 ac_save_IFS=$IFS; IFS='-'
4641 set x $ac_cv_target
4642 shift
4643 target_cpu=$1
4644 target_vendor=$2
4645 shift; shift
4646 # Remember, the first character of IFS is used to create $*,
4647 # except with old shells:
4648 target_os=$*
4649 IFS=$ac_save_IFS
4650 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4651
4652
4653 # The aliases save the names the user supplied, while $host etc.
4654 # will get canonicalized.
4655 test -n "$target_alias" &&
4656 test "$program_prefix$program_suffix$program_transform_name" = \
4657 NONENONEs,x,x, &&
4658 program_prefix=${target_alias}-
4659
4660 # The tests for host and target for $enable_largefile require
4661 # canonical names.
4662
4663
4664
4665 # As the $enable_largefile decision depends on --enable-plugins we must set it
4666 # even in directories otherwise not depending on the $plugins option.
4667
4668
4669 maybe_plugins=no
4670 for ac_header in dlfcn.h
4671 do :
4672 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4673 "
4674 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4675 cat >>confdefs.h <<_ACEOF
4676 #define HAVE_DLFCN_H 1
4677 _ACEOF
4678 maybe_plugins=yes
4679 fi
4680
4681 done
4682
4683 for ac_header in windows.h
4684 do :
4685 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4686 "
4687 if test "x$ac_cv_header_windows_h" = xyes; then :
4688 cat >>confdefs.h <<_ACEOF
4689 #define HAVE_WINDOWS_H 1
4690 _ACEOF
4691 maybe_plugins=yes
4692 fi
4693
4694 done
4695
4696
4697 # Check whether --enable-plugins was given.
4698 if test "${enable_plugins+set}" = set; then :
4699 enableval=$enable_plugins; case "${enableval}" in
4700 no) plugins=no ;;
4701 *) plugins=yes
4702 if test "$maybe_plugins" != "yes" ; then
4703 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4704 fi ;;
4705 esac
4706 else
4707 plugins=$maybe_plugins
4708
4709 fi
4710
4711 if test "$plugins" = "yes"; then
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4713 $as_echo_n "checking for library containing dlsym... " >&6; }
4714 if ${ac_cv_search_dlsym+:} false; then :
4715 $as_echo_n "(cached) " >&6
4716 else
4717 ac_func_search_save_LIBS=$LIBS
4718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4719 /* end confdefs.h. */
4720
4721 /* Override any GCC internal prototype to avoid an error.
4722 Use char because int might match the return type of a GCC
4723 builtin and then its argument prototype would still apply. */
4724 #ifdef __cplusplus
4725 extern "C"
4726 #endif
4727 char dlsym ();
4728 int
4729 main ()
4730 {
4731 return dlsym ();
4732 ;
4733 return 0;
4734 }
4735 _ACEOF
4736 for ac_lib in '' dl; do
4737 if test -z "$ac_lib"; then
4738 ac_res="none required"
4739 else
4740 ac_res=-l$ac_lib
4741 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4742 fi
4743 if ac_fn_c_try_link "$LINENO"; then :
4744 ac_cv_search_dlsym=$ac_res
4745 fi
4746 rm -f core conftest.err conftest.$ac_objext \
4747 conftest$ac_exeext
4748 if ${ac_cv_search_dlsym+:} false; then :
4749 break
4750 fi
4751 done
4752 if ${ac_cv_search_dlsym+:} false; then :
4753
4754 else
4755 ac_cv_search_dlsym=no
4756 fi
4757 rm conftest.$ac_ext
4758 LIBS=$ac_func_search_save_LIBS
4759 fi
4760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4761 $as_echo "$ac_cv_search_dlsym" >&6; }
4762 ac_res=$ac_cv_search_dlsym
4763 if test "$ac_res" != no; then :
4764 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4765
4766 fi
4767
4768 fi
4769
4770
4771 case "${host}" in
4772 sparc-*-solaris*|i[3-7]86-*-solaris*)
4773 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4774 # are mutually exclusive; and without procfs support, the bfd/ elf module
4775 # cannot provide certain routines such as elfcore_write_prpsinfo
4776 # or elfcore_write_prstatus. So unless the user explicitly requested
4777 # large-file support through the --enable-largefile switch, disable
4778 # large-file support in favor of procfs support.
4779 test "${target}" = "${host}" -a "x$plugins" = xno \
4780 && : ${enable_largefile="no"}
4781 ;;
4782 esac
4783
4784 # Check whether --enable-largefile was given.
4785 if test "${enable_largefile+set}" = set; then :
4786 enableval=$enable_largefile;
4787 fi
4788
4789 if test "$enable_largefile" != no; then
4790
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4792 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4793 if ${ac_cv_sys_largefile_CC+:} false; then :
4794 $as_echo_n "(cached) " >&6
4795 else
4796 ac_cv_sys_largefile_CC=no
4797 if test "$GCC" != yes; then
4798 ac_save_CC=$CC
4799 while :; do
4800 # IRIX 6.2 and later do not support large files by default,
4801 # so use the C compiler's -n32 option if that helps.
4802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4803 /* end confdefs.h. */
4804 #include <sys/types.h>
4805 /* Check that off_t can represent 2**63 - 1 correctly.
4806 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4807 since some C++ compilers masquerading as C compilers
4808 incorrectly reject 9223372036854775807. */
4809 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4810 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4811 && LARGE_OFF_T % 2147483647 == 1)
4812 ? 1 : -1];
4813 int
4814 main ()
4815 {
4816
4817 ;
4818 return 0;
4819 }
4820 _ACEOF
4821 if ac_fn_c_try_compile "$LINENO"; then :
4822 break
4823 fi
4824 rm -f core conftest.err conftest.$ac_objext
4825 CC="$CC -n32"
4826 if ac_fn_c_try_compile "$LINENO"; then :
4827 ac_cv_sys_largefile_CC=' -n32'; break
4828 fi
4829 rm -f core conftest.err conftest.$ac_objext
4830 break
4831 done
4832 CC=$ac_save_CC
4833 rm -f conftest.$ac_ext
4834 fi
4835 fi
4836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4837 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4838 if test "$ac_cv_sys_largefile_CC" != no; then
4839 CC=$CC$ac_cv_sys_largefile_CC
4840 fi
4841
4842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4843 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4844 if ${ac_cv_sys_file_offset_bits+:} false; then :
4845 $as_echo_n "(cached) " >&6
4846 else
4847 while :; do
4848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4849 /* end confdefs.h. */
4850 #include <sys/types.h>
4851 /* Check that off_t can represent 2**63 - 1 correctly.
4852 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4853 since some C++ compilers masquerading as C compilers
4854 incorrectly reject 9223372036854775807. */
4855 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4856 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4857 && LARGE_OFF_T % 2147483647 == 1)
4858 ? 1 : -1];
4859 int
4860 main ()
4861 {
4862
4863 ;
4864 return 0;
4865 }
4866 _ACEOF
4867 if ac_fn_c_try_compile "$LINENO"; then :
4868 ac_cv_sys_file_offset_bits=no; break
4869 fi
4870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4872 /* end confdefs.h. */
4873 #define _FILE_OFFSET_BITS 64
4874 #include <sys/types.h>
4875 /* Check that off_t can represent 2**63 - 1 correctly.
4876 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4877 since some C++ compilers masquerading as C compilers
4878 incorrectly reject 9223372036854775807. */
4879 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4880 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4881 && LARGE_OFF_T % 2147483647 == 1)
4882 ? 1 : -1];
4883 int
4884 main ()
4885 {
4886
4887 ;
4888 return 0;
4889 }
4890 _ACEOF
4891 if ac_fn_c_try_compile "$LINENO"; then :
4892 ac_cv_sys_file_offset_bits=64; break
4893 fi
4894 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4895 ac_cv_sys_file_offset_bits=unknown
4896 break
4897 done
4898 fi
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4900 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4901 case $ac_cv_sys_file_offset_bits in #(
4902 no | unknown) ;;
4903 *)
4904 cat >>confdefs.h <<_ACEOF
4905 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4906 _ACEOF
4907 ;;
4908 esac
4909 rm -rf conftest*
4910 if test $ac_cv_sys_file_offset_bits = unknown; then
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4912 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4913 if ${ac_cv_sys_large_files+:} false; then :
4914 $as_echo_n "(cached) " >&6
4915 else
4916 while :; do
4917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4918 /* end confdefs.h. */
4919 #include <sys/types.h>
4920 /* Check that off_t can represent 2**63 - 1 correctly.
4921 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4922 since some C++ compilers masquerading as C compilers
4923 incorrectly reject 9223372036854775807. */
4924 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4925 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4926 && LARGE_OFF_T % 2147483647 == 1)
4927 ? 1 : -1];
4928 int
4929 main ()
4930 {
4931
4932 ;
4933 return 0;
4934 }
4935 _ACEOF
4936 if ac_fn_c_try_compile "$LINENO"; then :
4937 ac_cv_sys_large_files=no; break
4938 fi
4939 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4941 /* end confdefs.h. */
4942 #define _LARGE_FILES 1
4943 #include <sys/types.h>
4944 /* Check that off_t can represent 2**63 - 1 correctly.
4945 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4946 since some C++ compilers masquerading as C compilers
4947 incorrectly reject 9223372036854775807. */
4948 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4949 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4950 && LARGE_OFF_T % 2147483647 == 1)
4951 ? 1 : -1];
4952 int
4953 main ()
4954 {
4955
4956 ;
4957 return 0;
4958 }
4959 _ACEOF
4960 if ac_fn_c_try_compile "$LINENO"; then :
4961 ac_cv_sys_large_files=1; break
4962 fi
4963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4964 ac_cv_sys_large_files=unknown
4965 break
4966 done
4967 fi
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4969 $as_echo "$ac_cv_sys_large_files" >&6; }
4970 case $ac_cv_sys_large_files in #(
4971 no | unknown) ;;
4972 *)
4973 cat >>confdefs.h <<_ACEOF
4974 #define _LARGE_FILES $ac_cv_sys_large_files
4975 _ACEOF
4976 ;;
4977 esac
4978 rm -rf conftest*
4979 fi
4980
4981
4982 fi
4983
4984
4985
4986
4987
4988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4989 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4990 if ${am_cv_prog_cc_stdc+:} false; then :
4991 $as_echo_n "(cached) " >&6
4992 else
4993 am_cv_prog_cc_stdc=no
4994 ac_save_CC="$CC"
4995 # Don't try gcc -ansi; that turns off useful extensions and
4996 # breaks some systems' header files.
4997 # AIX -qlanglvl=ansi
4998 # Ultrix and OSF/1 -std1
4999 # HP-UX 10.20 and later -Ae
5000 # HP-UX older versions -Aa -D_HPUX_SOURCE
5001 # SVR4 -Xc -D__EXTENSIONS__
5002 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5003 do
5004 CC="$ac_save_CC $ac_arg"
5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5006 /* end confdefs.h. */
5007 #include <stdarg.h>
5008 #include <stdio.h>
5009 #include <sys/types.h>
5010 #include <sys/stat.h>
5011 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5012 struct buf { int x; };
5013 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5014 static char *e (p, i)
5015 char **p;
5016 int i;
5017 {
5018 return p[i];
5019 }
5020 static char *f (char * (*g) (char **, int), char **p, ...)
5021 {
5022 char *s;
5023 va_list v;
5024 va_start (v,p);
5025 s = g (p, va_arg (v,int));
5026 va_end (v);
5027 return s;
5028 }
5029 int test (int i, double x);
5030 struct s1 {int (*f) (int a);};
5031 struct s2 {int (*f) (double a);};
5032 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5033 int argc;
5034 char **argv;
5035
5036 int
5037 main ()
5038 {
5039
5040 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5041
5042 ;
5043 return 0;
5044 }
5045 _ACEOF
5046 if ac_fn_c_try_compile "$LINENO"; then :
5047 am_cv_prog_cc_stdc="$ac_arg"; break
5048 fi
5049 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5050 done
5051 CC="$ac_save_CC"
5052
5053 fi
5054
5055 if test -z "$am_cv_prog_cc_stdc"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5057 $as_echo "none needed" >&6; }
5058 else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5060 $as_echo "$am_cv_prog_cc_stdc" >&6; }
5061 fi
5062 case "x$am_cv_prog_cc_stdc" in
5063 x|xno) ;;
5064 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5065 esac
5066
5067 # Expand $ac_aux_dir to an absolute path.
5068 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5069
5070 if test x"${install_sh+set}" != xset; then
5071 case $am_aux_dir in
5072 *\ * | *\ *)
5073 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5074 *)
5075 install_sh="\${SHELL} $am_aux_dir/install-sh"
5076 esac
5077 fi
5078
5079 # Installed binaries are usually stripped using 'strip' when the user
5080 # run "make install-strip". However 'strip' might not be the right
5081 # tool to use in cross-compilation environments, therefore Automake
5082 # will honor the 'STRIP' environment variable to overrule this program.
5083 if test "$cross_compiling" != no; then
5084 if test -n "$ac_tool_prefix"; then
5085 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5086 set dummy ${ac_tool_prefix}strip; ac_word=$2
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088 $as_echo_n "checking for $ac_word... " >&6; }
5089 if ${ac_cv_prog_STRIP+:} false; then :
5090 $as_echo_n "(cached) " >&6
5091 else
5092 if test -n "$STRIP"; then
5093 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5094 else
5095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096 for as_dir in $PATH
5097 do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5102 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106 done
5107 done
5108 IFS=$as_save_IFS
5109
5110 fi
5111 fi
5112 STRIP=$ac_cv_prog_STRIP
5113 if test -n "$STRIP"; then
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5115 $as_echo "$STRIP" >&6; }
5116 else
5117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5118 $as_echo "no" >&6; }
5119 fi
5120
5121
5122 fi
5123 if test -z "$ac_cv_prog_STRIP"; then
5124 ac_ct_STRIP=$STRIP
5125 # Extract the first word of "strip", so it can be a program name with args.
5126 set dummy strip; ac_word=$2
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5128 $as_echo_n "checking for $ac_word... " >&6; }
5129 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5130 $as_echo_n "(cached) " >&6
5131 else
5132 if test -n "$ac_ct_STRIP"; then
5133 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5134 else
5135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5136 for as_dir in $PATH
5137 do
5138 IFS=$as_save_IFS
5139 test -z "$as_dir" && as_dir=.
5140 for ac_exec_ext in '' $ac_executable_extensions; do
5141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5142 ac_cv_prog_ac_ct_STRIP="strip"
5143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5144 break 2
5145 fi
5146 done
5147 done
5148 IFS=$as_save_IFS
5149
5150 fi
5151 fi
5152 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5153 if test -n "$ac_ct_STRIP"; then
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5155 $as_echo "$ac_ct_STRIP" >&6; }
5156 else
5157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158 $as_echo "no" >&6; }
5159 fi
5160
5161 if test "x$ac_ct_STRIP" = x; then
5162 STRIP=":"
5163 else
5164 case $cross_compiling:$ac_tool_warned in
5165 yes:)
5166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5167 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5168 ac_tool_warned=yes ;;
5169 esac
5170 STRIP=$ac_ct_STRIP
5171 fi
5172 else
5173 STRIP="$ac_cv_prog_STRIP"
5174 fi
5175
5176 fi
5177 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5178
5179
5180 ac_aux_dir=
5181 for ac_dir in .. "$srcdir"/..; do
5182 if test -f "$ac_dir/install-sh"; then
5183 ac_aux_dir=$ac_dir
5184 ac_install_sh="$ac_aux_dir/install-sh -c"
5185 break
5186 elif test -f "$ac_dir/install.sh"; then
5187 ac_aux_dir=$ac_dir
5188 ac_install_sh="$ac_aux_dir/install.sh -c"
5189 break
5190 elif test -f "$ac_dir/shtool"; then
5191 ac_aux_dir=$ac_dir
5192 ac_install_sh="$ac_aux_dir/shtool install -c"
5193 break
5194 fi
5195 done
5196 if test -z "$ac_aux_dir"; then
5197 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5198 fi
5199
5200 # These three variables are undocumented and unsupported,
5201 # and are intended to be withdrawn in a future Autoconf release.
5202 # They can cause serious problems if a builder's source tree is in a directory
5203 # whose full name contains unusual characters.
5204 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5205 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5206 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5207
5208
5209
5210 test "$program_prefix" != NONE &&
5211 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5212 # Use a double $ so make ignores it.
5213 test "$program_suffix" != NONE &&
5214 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5215 # Double any \ or $.
5216 # By default was `s,x,x', remove it if useless.
5217 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5218 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5219
5220
5221 # We require a C++11 compiler. Check if one is available, and if
5222 # necessary, set CXX_DIALECT to some -std=xxx switch.
5223
5224 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5225 ac_ext=cpp
5226 ac_cpp='$CXXCPP $CPPFLAGS'
5227 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5228 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5229 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5230 CXX_DIALECT=""
5231 ac_success=no
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5233 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5234 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5235 $as_echo_n "(cached) " >&6
5236 else
5237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5238 /* end confdefs.h. */
5239
5240
5241 // If the compiler admits that it is not ready for C++11, why torture it?
5242 // Hopefully, this will speed up the test.
5243
5244 #ifndef __cplusplus
5245
5246 #error "This is not a C++ compiler"
5247
5248 #elif __cplusplus < 201103L
5249
5250 #error "This is not a C++11 compiler"
5251
5252 #else
5253
5254 namespace cxx11
5255 {
5256
5257 namespace test_static_assert
5258 {
5259
5260 template <typename T>
5261 struct check
5262 {
5263 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5264 };
5265
5266 }
5267
5268 namespace test_final_override
5269 {
5270
5271 struct Base
5272 {
5273 virtual void f() {}
5274 };
5275
5276 struct Derived : public Base
5277 {
5278 virtual void f() override {}
5279 };
5280
5281 }
5282
5283 namespace test_double_right_angle_brackets
5284 {
5285
5286 template < typename T >
5287 struct check {};
5288
5289 typedef check<void> single_type;
5290 typedef check<check<void>> double_type;
5291 typedef check<check<check<void>>> triple_type;
5292 typedef check<check<check<check<void>>>> quadruple_type;
5293
5294 }
5295
5296 namespace test_decltype
5297 {
5298
5299 int
5300 f()
5301 {
5302 int a = 1;
5303 decltype(a) b = 2;
5304 return a + b;
5305 }
5306
5307 }
5308
5309 namespace test_type_deduction
5310 {
5311
5312 template < typename T1, typename T2 >
5313 struct is_same
5314 {
5315 static const bool value = false;
5316 };
5317
5318 template < typename T >
5319 struct is_same<T, T>
5320 {
5321 static const bool value = true;
5322 };
5323
5324 template < typename T1, typename T2 >
5325 auto
5326 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5327 {
5328 return a1 + a2;
5329 }
5330
5331 int
5332 test(const int c, volatile int v)
5333 {
5334 static_assert(is_same<int, decltype(0)>::value == true, "");
5335 static_assert(is_same<int, decltype(c)>::value == false, "");
5336 static_assert(is_same<int, decltype(v)>::value == false, "");
5337 auto ac = c;
5338 auto av = v;
5339 auto sumi = ac + av + 'x';
5340 auto sumf = ac + av + 1.0;
5341 static_assert(is_same<int, decltype(ac)>::value == true, "");
5342 static_assert(is_same<int, decltype(av)>::value == true, "");
5343 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5344 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5345 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5346 return (sumf > 0.0) ? sumi : add(c, v);
5347 }
5348
5349 }
5350
5351 namespace test_noexcept
5352 {
5353
5354 int f() { return 0; }
5355 int g() noexcept { return 0; }
5356
5357 static_assert(noexcept(f()) == false, "");
5358 static_assert(noexcept(g()) == true, "");
5359
5360 }
5361
5362 namespace test_constexpr
5363 {
5364
5365 template < typename CharT >
5366 unsigned long constexpr
5367 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5368 {
5369 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5370 }
5371
5372 template < typename CharT >
5373 unsigned long constexpr
5374 strlen_c(const CharT *const s) noexcept
5375 {
5376 return strlen_c_r(s, 0UL);
5377 }
5378
5379 static_assert(strlen_c("") == 0UL, "");
5380 static_assert(strlen_c("1") == 1UL, "");
5381 static_assert(strlen_c("example") == 7UL, "");
5382 static_assert(strlen_c("another\0example") == 7UL, "");
5383
5384 }
5385
5386 namespace test_rvalue_references
5387 {
5388
5389 template < int N >
5390 struct answer
5391 {
5392 static constexpr int value = N;
5393 };
5394
5395 answer<1> f(int&) { return answer<1>(); }
5396 answer<2> f(const int&) { return answer<2>(); }
5397 answer<3> f(int&&) { return answer<3>(); }
5398
5399 void
5400 test()
5401 {
5402 int i = 0;
5403 const int c = 0;
5404 static_assert(decltype(f(i))::value == 1, "");
5405 static_assert(decltype(f(c))::value == 2, "");
5406 static_assert(decltype(f(0))::value == 3, "");
5407 }
5408
5409 }
5410
5411 namespace test_uniform_initialization
5412 {
5413
5414 struct test
5415 {
5416 static const int zero {};
5417 static const int one {1};
5418 };
5419
5420 static_assert(test::zero == 0, "");
5421 static_assert(test::one == 1, "");
5422
5423 }
5424
5425 namespace test_lambdas
5426 {
5427
5428 void
5429 test1()
5430 {
5431 auto lambda1 = [](){};
5432 auto lambda2 = lambda1;
5433 lambda1();
5434 lambda2();
5435 }
5436
5437 int
5438 test2()
5439 {
5440 auto a = [](int i, int j){ return i + j; }(1, 2);
5441 auto b = []() -> int { return '0'; }();
5442 auto c = [=](){ return a + b; }();
5443 auto d = [&](){ return c; }();
5444 auto e = [a, &b](int x) mutable {
5445 const auto identity = [](int y){ return y; };
5446 for (auto i = 0; i < a; ++i)
5447 a += b--;
5448 return x + identity(a + b);
5449 }(0);
5450 return a + b + c + d + e;
5451 }
5452
5453 int
5454 test3()
5455 {
5456 const auto nullary = [](){ return 0; };
5457 const auto unary = [](int x){ return x; };
5458 using nullary_t = decltype(nullary);
5459 using unary_t = decltype(unary);
5460 const auto higher1st = [](nullary_t f){ return f(); };
5461 const auto higher2nd = [unary](nullary_t f1){
5462 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5463 };
5464 return higher1st(nullary) + higher2nd(nullary)(unary);
5465 }
5466
5467 }
5468
5469 namespace test_variadic_templates
5470 {
5471
5472 template <int...>
5473 struct sum;
5474
5475 template <int N0, int... N1toN>
5476 struct sum<N0, N1toN...>
5477 {
5478 static constexpr auto value = N0 + sum<N1toN...>::value;
5479 };
5480
5481 template <>
5482 struct sum<>
5483 {
5484 static constexpr auto value = 0;
5485 };
5486
5487 static_assert(sum<>::value == 0, "");
5488 static_assert(sum<1>::value == 1, "");
5489 static_assert(sum<23>::value == 23, "");
5490 static_assert(sum<1, 2>::value == 3, "");
5491 static_assert(sum<5, 5, 11>::value == 21, "");
5492 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5493
5494 }
5495
5496 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5497 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5498 // because of this.
5499 namespace test_template_alias_sfinae
5500 {
5501
5502 struct foo {};
5503
5504 template<typename T>
5505 using member = typename T::member_type;
5506
5507 template<typename T>
5508 void func(...) {}
5509
5510 template<typename T>
5511 void func(member<T>*) {}
5512
5513 void test();
5514
5515 void test() { func<foo>(0); }
5516
5517 }
5518
5519 } // namespace cxx11
5520
5521 #endif // __cplusplus >= 201103L
5522
5523
5524
5525 _ACEOF
5526 if ac_fn_cxx_try_compile "$LINENO"; then :
5527 ax_cv_cxx_compile_cxx11=yes
5528 else
5529 ax_cv_cxx_compile_cxx11=no
5530 fi
5531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5532 fi
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5534 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5535 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5536 ac_success=yes
5537 fi
5538
5539 if test x$ac_success = xno; then
5540 for alternative in ${ax_cxx_compile_alternatives}; do
5541 switch="-std=gnu++${alternative}"
5542 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5544 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5545 if eval \${$cachevar+:} false; then :
5546 $as_echo_n "(cached) " >&6
5547 else
5548 ac_save_CXX="$CXX"
5549 CXX="$CXX $switch"
5550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5551 /* end confdefs.h. */
5552
5553
5554 // If the compiler admits that it is not ready for C++11, why torture it?
5555 // Hopefully, this will speed up the test.
5556
5557 #ifndef __cplusplus
5558
5559 #error "This is not a C++ compiler"
5560
5561 #elif __cplusplus < 201103L
5562
5563 #error "This is not a C++11 compiler"
5564
5565 #else
5566
5567 namespace cxx11
5568 {
5569
5570 namespace test_static_assert
5571 {
5572
5573 template <typename T>
5574 struct check
5575 {
5576 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5577 };
5578
5579 }
5580
5581 namespace test_final_override
5582 {
5583
5584 struct Base
5585 {
5586 virtual void f() {}
5587 };
5588
5589 struct Derived : public Base
5590 {
5591 virtual void f() override {}
5592 };
5593
5594 }
5595
5596 namespace test_double_right_angle_brackets
5597 {
5598
5599 template < typename T >
5600 struct check {};
5601
5602 typedef check<void> single_type;
5603 typedef check<check<void>> double_type;
5604 typedef check<check<check<void>>> triple_type;
5605 typedef check<check<check<check<void>>>> quadruple_type;
5606
5607 }
5608
5609 namespace test_decltype
5610 {
5611
5612 int
5613 f()
5614 {
5615 int a = 1;
5616 decltype(a) b = 2;
5617 return a + b;
5618 }
5619
5620 }
5621
5622 namespace test_type_deduction
5623 {
5624
5625 template < typename T1, typename T2 >
5626 struct is_same
5627 {
5628 static const bool value = false;
5629 };
5630
5631 template < typename T >
5632 struct is_same<T, T>
5633 {
5634 static const bool value = true;
5635 };
5636
5637 template < typename T1, typename T2 >
5638 auto
5639 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5640 {
5641 return a1 + a2;
5642 }
5643
5644 int
5645 test(const int c, volatile int v)
5646 {
5647 static_assert(is_same<int, decltype(0)>::value == true, "");
5648 static_assert(is_same<int, decltype(c)>::value == false, "");
5649 static_assert(is_same<int, decltype(v)>::value == false, "");
5650 auto ac = c;
5651 auto av = v;
5652 auto sumi = ac + av + 'x';
5653 auto sumf = ac + av + 1.0;
5654 static_assert(is_same<int, decltype(ac)>::value == true, "");
5655 static_assert(is_same<int, decltype(av)>::value == true, "");
5656 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5657 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5658 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5659 return (sumf > 0.0) ? sumi : add(c, v);
5660 }
5661
5662 }
5663
5664 namespace test_noexcept
5665 {
5666
5667 int f() { return 0; }
5668 int g() noexcept { return 0; }
5669
5670 static_assert(noexcept(f()) == false, "");
5671 static_assert(noexcept(g()) == true, "");
5672
5673 }
5674
5675 namespace test_constexpr
5676 {
5677
5678 template < typename CharT >
5679 unsigned long constexpr
5680 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5681 {
5682 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5683 }
5684
5685 template < typename CharT >
5686 unsigned long constexpr
5687 strlen_c(const CharT *const s) noexcept
5688 {
5689 return strlen_c_r(s, 0UL);
5690 }
5691
5692 static_assert(strlen_c("") == 0UL, "");
5693 static_assert(strlen_c("1") == 1UL, "");
5694 static_assert(strlen_c("example") == 7UL, "");
5695 static_assert(strlen_c("another\0example") == 7UL, "");
5696
5697 }
5698
5699 namespace test_rvalue_references
5700 {
5701
5702 template < int N >
5703 struct answer
5704 {
5705 static constexpr int value = N;
5706 };
5707
5708 answer<1> f(int&) { return answer<1>(); }
5709 answer<2> f(const int&) { return answer<2>(); }
5710 answer<3> f(int&&) { return answer<3>(); }
5711
5712 void
5713 test()
5714 {
5715 int i = 0;
5716 const int c = 0;
5717 static_assert(decltype(f(i))::value == 1, "");
5718 static_assert(decltype(f(c))::value == 2, "");
5719 static_assert(decltype(f(0))::value == 3, "");
5720 }
5721
5722 }
5723
5724 namespace test_uniform_initialization
5725 {
5726
5727 struct test
5728 {
5729 static const int zero {};
5730 static const int one {1};
5731 };
5732
5733 static_assert(test::zero == 0, "");
5734 static_assert(test::one == 1, "");
5735
5736 }
5737
5738 namespace test_lambdas
5739 {
5740
5741 void
5742 test1()
5743 {
5744 auto lambda1 = [](){};
5745 auto lambda2 = lambda1;
5746 lambda1();
5747 lambda2();
5748 }
5749
5750 int
5751 test2()
5752 {
5753 auto a = [](int i, int j){ return i + j; }(1, 2);
5754 auto b = []() -> int { return '0'; }();
5755 auto c = [=](){ return a + b; }();
5756 auto d = [&](){ return c; }();
5757 auto e = [a, &b](int x) mutable {
5758 const auto identity = [](int y){ return y; };
5759 for (auto i = 0; i < a; ++i)
5760 a += b--;
5761 return x + identity(a + b);
5762 }(0);
5763 return a + b + c + d + e;
5764 }
5765
5766 int
5767 test3()
5768 {
5769 const auto nullary = [](){ return 0; };
5770 const auto unary = [](int x){ return x; };
5771 using nullary_t = decltype(nullary);
5772 using unary_t = decltype(unary);
5773 const auto higher1st = [](nullary_t f){ return f(); };
5774 const auto higher2nd = [unary](nullary_t f1){
5775 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5776 };
5777 return higher1st(nullary) + higher2nd(nullary)(unary);
5778 }
5779
5780 }
5781
5782 namespace test_variadic_templates
5783 {
5784
5785 template <int...>
5786 struct sum;
5787
5788 template <int N0, int... N1toN>
5789 struct sum<N0, N1toN...>
5790 {
5791 static constexpr auto value = N0 + sum<N1toN...>::value;
5792 };
5793
5794 template <>
5795 struct sum<>
5796 {
5797 static constexpr auto value = 0;
5798 };
5799
5800 static_assert(sum<>::value == 0, "");
5801 static_assert(sum<1>::value == 1, "");
5802 static_assert(sum<23>::value == 23, "");
5803 static_assert(sum<1, 2>::value == 3, "");
5804 static_assert(sum<5, 5, 11>::value == 21, "");
5805 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5806
5807 }
5808
5809 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5810 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5811 // because of this.
5812 namespace test_template_alias_sfinae
5813 {
5814
5815 struct foo {};
5816
5817 template<typename T>
5818 using member = typename T::member_type;
5819
5820 template<typename T>
5821 void func(...) {}
5822
5823 template<typename T>
5824 void func(member<T>*) {}
5825
5826 void test();
5827
5828 void test() { func<foo>(0); }
5829
5830 }
5831
5832 } // namespace cxx11
5833
5834 #endif // __cplusplus >= 201103L
5835
5836
5837
5838 _ACEOF
5839 if ac_fn_cxx_try_compile "$LINENO"; then :
5840 eval $cachevar=yes
5841 else
5842 eval $cachevar=no
5843 fi
5844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5845 CXX="$ac_save_CXX"
5846 fi
5847 eval ac_res=\$$cachevar
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5849 $as_echo "$ac_res" >&6; }
5850 if eval test x\$$cachevar = xyes; then
5851 CXX_DIALECT="$switch"
5852 ac_success=yes
5853 break
5854 fi
5855 done
5856 fi
5857
5858 if test x$ac_success = xno; then
5859 for alternative in ${ax_cxx_compile_alternatives}; do
5860 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5861 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5863 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5864 if eval \${$cachevar+:} false; then :
5865 $as_echo_n "(cached) " >&6
5866 else
5867 ac_save_CXX="$CXX"
5868 CXX="$CXX $switch"
5869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5870 /* end confdefs.h. */
5871
5872
5873 // If the compiler admits that it is not ready for C++11, why torture it?
5874 // Hopefully, this will speed up the test.
5875
5876 #ifndef __cplusplus
5877
5878 #error "This is not a C++ compiler"
5879
5880 #elif __cplusplus < 201103L
5881
5882 #error "This is not a C++11 compiler"
5883
5884 #else
5885
5886 namespace cxx11
5887 {
5888
5889 namespace test_static_assert
5890 {
5891
5892 template <typename T>
5893 struct check
5894 {
5895 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5896 };
5897
5898 }
5899
5900 namespace test_final_override
5901 {
5902
5903 struct Base
5904 {
5905 virtual void f() {}
5906 };
5907
5908 struct Derived : public Base
5909 {
5910 virtual void f() override {}
5911 };
5912
5913 }
5914
5915 namespace test_double_right_angle_brackets
5916 {
5917
5918 template < typename T >
5919 struct check {};
5920
5921 typedef check<void> single_type;
5922 typedef check<check<void>> double_type;
5923 typedef check<check<check<void>>> triple_type;
5924 typedef check<check<check<check<void>>>> quadruple_type;
5925
5926 }
5927
5928 namespace test_decltype
5929 {
5930
5931 int
5932 f()
5933 {
5934 int a = 1;
5935 decltype(a) b = 2;
5936 return a + b;
5937 }
5938
5939 }
5940
5941 namespace test_type_deduction
5942 {
5943
5944 template < typename T1, typename T2 >
5945 struct is_same
5946 {
5947 static const bool value = false;
5948 };
5949
5950 template < typename T >
5951 struct is_same<T, T>
5952 {
5953 static const bool value = true;
5954 };
5955
5956 template < typename T1, typename T2 >
5957 auto
5958 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5959 {
5960 return a1 + a2;
5961 }
5962
5963 int
5964 test(const int c, volatile int v)
5965 {
5966 static_assert(is_same<int, decltype(0)>::value == true, "");
5967 static_assert(is_same<int, decltype(c)>::value == false, "");
5968 static_assert(is_same<int, decltype(v)>::value == false, "");
5969 auto ac = c;
5970 auto av = v;
5971 auto sumi = ac + av + 'x';
5972 auto sumf = ac + av + 1.0;
5973 static_assert(is_same<int, decltype(ac)>::value == true, "");
5974 static_assert(is_same<int, decltype(av)>::value == true, "");
5975 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5976 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5977 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5978 return (sumf > 0.0) ? sumi : add(c, v);
5979 }
5980
5981 }
5982
5983 namespace test_noexcept
5984 {
5985
5986 int f() { return 0; }
5987 int g() noexcept { return 0; }
5988
5989 static_assert(noexcept(f()) == false, "");
5990 static_assert(noexcept(g()) == true, "");
5991
5992 }
5993
5994 namespace test_constexpr
5995 {
5996
5997 template < typename CharT >
5998 unsigned long constexpr
5999 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6000 {
6001 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6002 }
6003
6004 template < typename CharT >
6005 unsigned long constexpr
6006 strlen_c(const CharT *const s) noexcept
6007 {
6008 return strlen_c_r(s, 0UL);
6009 }
6010
6011 static_assert(strlen_c("") == 0UL, "");
6012 static_assert(strlen_c("1") == 1UL, "");
6013 static_assert(strlen_c("example") == 7UL, "");
6014 static_assert(strlen_c("another\0example") == 7UL, "");
6015
6016 }
6017
6018 namespace test_rvalue_references
6019 {
6020
6021 template < int N >
6022 struct answer
6023 {
6024 static constexpr int value = N;
6025 };
6026
6027 answer<1> f(int&) { return answer<1>(); }
6028 answer<2> f(const int&) { return answer<2>(); }
6029 answer<3> f(int&&) { return answer<3>(); }
6030
6031 void
6032 test()
6033 {
6034 int i = 0;
6035 const int c = 0;
6036 static_assert(decltype(f(i))::value == 1, "");
6037 static_assert(decltype(f(c))::value == 2, "");
6038 static_assert(decltype(f(0))::value == 3, "");
6039 }
6040
6041 }
6042
6043 namespace test_uniform_initialization
6044 {
6045
6046 struct test
6047 {
6048 static const int zero {};
6049 static const int one {1};
6050 };
6051
6052 static_assert(test::zero == 0, "");
6053 static_assert(test::one == 1, "");
6054
6055 }
6056
6057 namespace test_lambdas
6058 {
6059
6060 void
6061 test1()
6062 {
6063 auto lambda1 = [](){};
6064 auto lambda2 = lambda1;
6065 lambda1();
6066 lambda2();
6067 }
6068
6069 int
6070 test2()
6071 {
6072 auto a = [](int i, int j){ return i + j; }(1, 2);
6073 auto b = []() -> int { return '0'; }();
6074 auto c = [=](){ return a + b; }();
6075 auto d = [&](){ return c; }();
6076 auto e = [a, &b](int x) mutable {
6077 const auto identity = [](int y){ return y; };
6078 for (auto i = 0; i < a; ++i)
6079 a += b--;
6080 return x + identity(a + b);
6081 }(0);
6082 return a + b + c + d + e;
6083 }
6084
6085 int
6086 test3()
6087 {
6088 const auto nullary = [](){ return 0; };
6089 const auto unary = [](int x){ return x; };
6090 using nullary_t = decltype(nullary);
6091 using unary_t = decltype(unary);
6092 const auto higher1st = [](nullary_t f){ return f(); };
6093 const auto higher2nd = [unary](nullary_t f1){
6094 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6095 };
6096 return higher1st(nullary) + higher2nd(nullary)(unary);
6097 }
6098
6099 }
6100
6101 namespace test_variadic_templates
6102 {
6103
6104 template <int...>
6105 struct sum;
6106
6107 template <int N0, int... N1toN>
6108 struct sum<N0, N1toN...>
6109 {
6110 static constexpr auto value = N0 + sum<N1toN...>::value;
6111 };
6112
6113 template <>
6114 struct sum<>
6115 {
6116 static constexpr auto value = 0;
6117 };
6118
6119 static_assert(sum<>::value == 0, "");
6120 static_assert(sum<1>::value == 1, "");
6121 static_assert(sum<23>::value == 23, "");
6122 static_assert(sum<1, 2>::value == 3, "");
6123 static_assert(sum<5, 5, 11>::value == 21, "");
6124 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6125
6126 }
6127
6128 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6129 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6130 // because of this.
6131 namespace test_template_alias_sfinae
6132 {
6133
6134 struct foo {};
6135
6136 template<typename T>
6137 using member = typename T::member_type;
6138
6139 template<typename T>
6140 void func(...) {}
6141
6142 template<typename T>
6143 void func(member<T>*) {}
6144
6145 void test();
6146
6147 void test() { func<foo>(0); }
6148
6149 }
6150
6151 } // namespace cxx11
6152
6153 #endif // __cplusplus >= 201103L
6154
6155
6156
6157 _ACEOF
6158 if ac_fn_cxx_try_compile "$LINENO"; then :
6159 eval $cachevar=yes
6160 else
6161 eval $cachevar=no
6162 fi
6163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6164 CXX="$ac_save_CXX"
6165 fi
6166 eval ac_res=\$$cachevar
6167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6168 $as_echo "$ac_res" >&6; }
6169 if eval test x\$$cachevar = xyes; then
6170 CXX_DIALECT="$switch"
6171 ac_success=yes
6172 break
6173 fi
6174 done
6175 if test x$ac_success = xyes; then
6176 break
6177 fi
6178 done
6179 fi
6180 ac_ext=c
6181 ac_cpp='$CPP $CPPFLAGS'
6182 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6183 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6184 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6185
6186 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6187 if test x$ac_success = xno; then
6188 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6189 fi
6190 fi
6191 if test x$ac_success = xno; then
6192 HAVE_CXX11=0
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6194 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6195 else
6196 HAVE_CXX11=1
6197
6198 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6199
6200 fi
6201
6202
6203
6204
6205 # Dependency checking.
6206 rm -rf .tst 2>/dev/null
6207 mkdir .tst 2>/dev/null
6208 if test -d .tst; then
6209 am__leading_dot=.
6210 else
6211 am__leading_dot=_
6212 fi
6213 rmdir .tst 2>/dev/null
6214
6215 DEPDIR="${am__leading_dot}deps"
6216
6217 ac_config_commands="$ac_config_commands depdir"
6218
6219
6220 depcc="$CC" am_compiler_list=
6221
6222 am_depcomp=$ac_aux_dir/depcomp
6223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6224 $as_echo_n "checking dependency style of $depcc... " >&6; }
6225 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6226 $as_echo_n "(cached) " >&6
6227 else
6228 if test -f "$am_depcomp"; then
6229 # We make a subdir and do the tests there. Otherwise we can end up
6230 # making bogus files that we don't know about and never remove. For
6231 # instance it was reported that on HP-UX the gcc test will end up
6232 # making a dummy file named `D' -- because `-MD' means `put the output
6233 # in D'.
6234 mkdir conftest.dir
6235 # Copy depcomp to subdir because otherwise we won't find it if we're
6236 # using a relative directory.
6237 cp "$am_depcomp" conftest.dir
6238 cd conftest.dir
6239 # We will build objects and dependencies in a subdirectory because
6240 # it helps to detect inapplicable dependency modes. For instance
6241 # both Tru64's cc and ICC support -MD to output dependencies as a
6242 # side effect of compilation, but ICC will put the dependencies in
6243 # the current directory while Tru64 will put them in the object
6244 # directory.
6245 mkdir sub
6246
6247 am_cv_CC_dependencies_compiler_type=none
6248 if test "$am_compiler_list" = ""; then
6249 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6250 fi
6251 for depmode in $am_compiler_list; do
6252 if test $depmode = none; then break; fi
6253
6254 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6255 # Setup a source with many dependencies, because some compilers
6256 # like to wrap large dependency lists on column 80 (with \), and
6257 # we should not choose a depcomp mode which is confused by this.
6258 #
6259 # We need to recreate these files for each test, as the compiler may
6260 # overwrite some of them when testing with obscure command lines.
6261 # This happens at least with the AIX C compiler.
6262 : > sub/conftest.c
6263 for i in 1 2 3 4 5 6; do
6264 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6265 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6266 # Solaris 8's {/usr,}/bin/sh.
6267 touch sub/conftst$i.h
6268 done
6269 echo "include sub/conftest.Po" > confmf
6270
6271 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6272 # mode. It turns out that the SunPro C++ compiler does not properly
6273 # handle `-M -o', and we need to detect this.
6274 depcmd="depmode=$depmode \
6275 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6276 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6277 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6278 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6279 if env $depcmd > conftest.err 2>&1 &&
6280 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6281 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6282 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6283 # icc doesn't choke on unknown options, it will just issue warnings
6284 # or remarks (even with -Werror). So we grep stderr for any message
6285 # that says an option was ignored or not supported.
6286 # When given -MP, icc 7.0 and 7.1 complain thusly:
6287 # icc: Command line warning: ignoring option '-M'; no argument required
6288 # The diagnosis changed in icc 8.0:
6289 # icc: Command line remark: option '-MP' not supported
6290 if (grep 'ignoring option' conftest.err ||
6291 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6292 am_cv_CC_dependencies_compiler_type=$depmode
6293 $as_echo "$as_me:$LINENO: success" >&5
6294 break
6295 fi
6296 fi
6297 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6298 sed -e 's/^/| /' < conftest.err >&5
6299 done
6300
6301 cd ..
6302 rm -rf conftest.dir
6303 else
6304 am_cv_CC_dependencies_compiler_type=none
6305 fi
6306
6307 fi
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6309 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6310 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6311 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6312 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6313
6314 fi
6315
6316
6317
6318 CONFIG_OBS=
6319 CONFIG_DEPS=
6320 CONFIG_SRCS=
6321 ENABLE_CFLAGS=
6322
6323 CONFIG_ALL=
6324 CONFIG_CLEAN=
6325 CONFIG_INSTALL=
6326 CONFIG_UNINSTALL=
6327
6328 # If we haven't got the data from the intl directory,
6329 # assume NLS is disabled.
6330 USE_NLS=no
6331 LIBINTL=
6332 LIBINTL_DEP=
6333 INCINTL=
6334 XGETTEXT=
6335 GMSGFMT=
6336 POSUB=
6337
6338 if test -f ../intl/config.intl; then
6339 . ../intl/config.intl
6340 fi
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6342 $as_echo_n "checking whether NLS is requested... " >&6; }
6343 if test x"$USE_NLS" != xyes; then
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345 $as_echo "no" >&6; }
6346 else
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6348 $as_echo "yes" >&6; }
6349
6350 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6351
6352
6353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6354 $as_echo_n "checking for catalogs to be installed... " >&6; }
6355 # Look for .po and .gmo files in the source directory.
6356 CATALOGS=
6357 XLINGUAS=
6358 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6359 # If there aren't any .gmo files the shell will give us the
6360 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6361 # weeded out.
6362 case "$cat" in *\**)
6363 continue;;
6364 esac
6365 # The quadruple backslash is collapsed to a double backslash
6366 # by the backticks, then collapsed again by the double quotes,
6367 # leaving us with one backslash in the sed expression (right
6368 # before the dot that mustn't act as a wildcard).
6369 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6370 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6371 # The user is allowed to set LINGUAS to a list of languages to
6372 # install catalogs for. If it's empty that means "all of them."
6373 if test "x$LINGUAS" = x; then
6374 CATALOGS="$CATALOGS $cat"
6375 XLINGUAS="$XLINGUAS $lang"
6376 else
6377 case "$LINGUAS" in *$lang*)
6378 CATALOGS="$CATALOGS $cat"
6379 XLINGUAS="$XLINGUAS $lang"
6380 ;;
6381 esac
6382 fi
6383 done
6384 LINGUAS="$XLINGUAS"
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6386 $as_echo "$LINGUAS" >&6; }
6387
6388
6389 DATADIRNAME=share
6390
6391 INSTOBJEXT=.mo
6392
6393 GENCAT=gencat
6394
6395 CATOBJEXT=.gmo
6396
6397 fi
6398
6399 localedir='${datadir}/locale'
6400
6401
6402 if test x"$USE_NLS" = xyes; then
6403 CONFIG_ALL="$CONFIG_ALL all-po"
6404 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6405 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6406 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6407 fi
6408
6409 PACKAGE=gdb
6410
6411 cat >>confdefs.h <<_ACEOF
6412 #define PACKAGE "$PACKAGE"
6413 _ACEOF
6414
6415
6416
6417 # We never need to detect it in this sub-configure.
6418 # But preserve it for config.status --recheck.
6419
6420
6421
6422 MAKEINFO_EXTRA_FLAGS=""
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6424 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6425 if ${gdb_cv_have_makeinfo_click+:} false; then :
6426 $as_echo_n "(cached) " >&6
6427 else
6428 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6429 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6430 gdb_cv_have_makeinfo_click=yes
6431 else
6432 gdb_cv_have_makeinfo_click=no
6433 fi
6434 fi
6435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6436 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6437 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6438 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6439 fi
6440
6441
6442
6443
6444 # Check whether --with-separate-debug-dir was given.
6445 if test "${with_separate_debug_dir+set}" = set; then :
6446 withval=$with_separate_debug_dir;
6447 DEBUGDIR=$withval
6448 else
6449 DEBUGDIR=${libdir}/debug
6450 fi
6451
6452
6453 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6454 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6455 ac_define_dir=`eval echo $DEBUGDIR`
6456 ac_define_dir=`eval echo $ac_define_dir`
6457
6458 cat >>confdefs.h <<_ACEOF
6459 #define DEBUGDIR "$ac_define_dir"
6460 _ACEOF
6461
6462
6463
6464
6465 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6466 if test "x$prefix" = xNONE; then
6467 test_prefix=/usr/local
6468 else
6469 test_prefix=$prefix
6470 fi
6471 else
6472 test_prefix=$exec_prefix
6473 fi
6474 value=0
6475 case ${ac_define_dir} in
6476 "${test_prefix}"|"${test_prefix}/"*|\
6477 '${exec_prefix}'|'${exec_prefix}/'*)
6478 value=1
6479 ;;
6480 esac
6481
6482 cat >>confdefs.h <<_ACEOF
6483 #define DEBUGDIR_RELOCATABLE $value
6484 _ACEOF
6485
6486
6487
6488
6489 # We can't pass paths as command line arguments.
6490 # Mingw32 tries to be clever and will convert the paths for us.
6491 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6492 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6493 # This breaks GDB's relocatable path conversions since paths passed in
6494 # config.h would not get so translated, the path prefixes no longer match.
6495
6496 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6497 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6498 ac_define_dir=`eval echo $bindir`
6499 ac_define_dir=`eval echo $ac_define_dir`
6500
6501 cat >>confdefs.h <<_ACEOF
6502 #define BINDIR "$ac_define_dir"
6503 _ACEOF
6504
6505
6506
6507 # GDB's datadir relocation
6508
6509
6510
6511 # Check whether --with-gdb-datadir was given.
6512 if test "${with_gdb_datadir+set}" = set; then :
6513 withval=$with_gdb_datadir;
6514 GDB_DATADIR=$withval
6515 else
6516 GDB_DATADIR=${datadir}/gdb
6517 fi
6518
6519
6520 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6521 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6522 ac_define_dir=`eval echo $GDB_DATADIR`
6523 ac_define_dir=`eval echo $ac_define_dir`
6524
6525 cat >>confdefs.h <<_ACEOF
6526 #define GDB_DATADIR "$ac_define_dir"
6527 _ACEOF
6528
6529
6530
6531
6532 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6533 if test "x$prefix" = xNONE; then
6534 test_prefix=/usr/local
6535 else
6536 test_prefix=$prefix
6537 fi
6538 else
6539 test_prefix=$exec_prefix
6540 fi
6541 value=0
6542 case ${ac_define_dir} in
6543 "${test_prefix}"|"${test_prefix}/"*|\
6544 '${exec_prefix}'|'${exec_prefix}/'*)
6545 value=1
6546 ;;
6547 esac
6548
6549 cat >>confdefs.h <<_ACEOF
6550 #define GDB_DATADIR_RELOCATABLE $value
6551 _ACEOF
6552
6553
6554
6555
6556
6557 # Check whether --with-relocated-sources was given.
6558 if test "${with_relocated_sources+set}" = set; then :
6559 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6560
6561 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6562 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6563 ac_define_dir=`eval echo $reloc_srcdir`
6564 ac_define_dir=`eval echo $ac_define_dir`
6565
6566 cat >>confdefs.h <<_ACEOF
6567 #define RELOC_SRCDIR "$ac_define_dir"
6568 _ACEOF
6569
6570
6571
6572 fi
6573
6574
6575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6576 $as_echo_n "checking for default auto-load directory... " >&6; }
6577
6578 # Check whether --with-auto-load-dir was given.
6579 if test "${with_auto_load_dir+set}" = set; then :
6580 withval=$with_auto_load_dir;
6581 else
6582 with_auto_load_dir='$debugdir:$datadir/auto-load'
6583 fi
6584
6585 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6586
6587 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6588 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6589 ac_define_dir=`eval echo $escape_dir`
6590 ac_define_dir=`eval echo $ac_define_dir`
6591
6592 cat >>confdefs.h <<_ACEOF
6593 #define AUTO_LOAD_DIR "$ac_define_dir"
6594 _ACEOF
6595
6596
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6598 $as_echo "$with_auto_load_dir" >&6; }
6599
6600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6601 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6602
6603 # Check whether --with-auto-load-safe-path was given.
6604 if test "${with_auto_load_safe_path+set}" = set; then :
6605 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6606 with_auto_load_safe_path="/"
6607 fi
6608 else
6609 with_auto_load_safe_path="$with_auto_load_dir"
6610 fi
6611
6612 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6613
6614 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6615 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6616 ac_define_dir=`eval echo $escape_dir`
6617 ac_define_dir=`eval echo $ac_define_dir`
6618
6619 cat >>confdefs.h <<_ACEOF
6620 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6621 _ACEOF
6622
6623
6624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6625 $as_echo "$with_auto_load_safe_path" >&6; }
6626
6627
6628
6629 subdirs="$subdirs testsuite"
6630
6631
6632 # Check whether to support alternative target configurations
6633 # Check whether --enable-targets was given.
6634 if test "${enable_targets+set}" = set; then :
6635 enableval=$enable_targets; case "${enableval}" in
6636 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6637 ;;
6638 no) enable_targets= ;;
6639 *) enable_targets=$enableval ;;
6640 esac
6641 fi
6642
6643
6644 # Check whether to enable 64-bit support on 32-bit hosts
6645 # Check whether --enable-64-bit-bfd was given.
6646 if test "${enable_64_bit_bfd+set}" = set; then :
6647 enableval=$enable_64_bit_bfd; case "${enableval}" in
6648 yes) want64=true ;;
6649 no) want64=false ;;
6650 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6651 esac
6652 else
6653 want64=false
6654 fi
6655
6656 # Provide defaults for some variables set by the per-host and per-target
6657 # configuration.
6658 gdb_host_obs=posix-hdep.o
6659
6660 if test "${target}" = "${host}"; then
6661 gdb_native=yes
6662 else
6663 gdb_native=no
6664 fi
6665
6666 . $srcdir/configure.host
6667
6668 # Accumulate some settings from configure.tgt over all enabled targets
6669
6670 TARGET_OBS=
6671 all_targets=
6672 HAVE_NATIVE_GCORE_TARGET=
6673
6674 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6675 do
6676 if test "$targ_alias" = "all"; then
6677 all_targets=true
6678 else
6679 # Canonicalize the secondary target names.
6680 result=`$ac_config_sub $targ_alias 2>/dev/null`
6681 if test -n "$result"; then
6682 targ=$result
6683 else
6684 targ=$targ_alias
6685 fi
6686
6687 . ${srcdir}/configure.tgt
6688
6689 if test -z "${gdb_target_obs}"; then :
6690 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6691 fi
6692
6693 # Target-specific object files
6694 for i in ${gdb_target_obs}; do
6695 case " $TARGET_OBS " in
6696 *" ${i} "*) ;;
6697 *)
6698 TARGET_OBS="$TARGET_OBS ${i}"
6699 ;;
6700 esac
6701 done
6702
6703 # Check whether this target needs 64-bit CORE_ADDR
6704 if test x${want64} = xfalse; then
6705 . ${srcdir}/../bfd/config.bfd
6706 fi
6707
6708 # Check whether this target is native and supports gcore.
6709 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6710 && $gdb_have_gcore; then
6711 HAVE_NATIVE_GCORE_TARGET=1
6712 fi
6713 fi
6714 done
6715
6716 if test x${all_targets} = xtrue; then
6717
6718 # We want all 64-bit targets if we either:
6719 # - run on a 64-bit host or
6720 # - already require 64-bit support for some other target or
6721 # - the --enable-64-bit-bfd option was supplied
6722 # Otherwise we only support all 32-bit targets.
6723 #
6724 # NOTE: This test must be in sync with the corresponding
6725 # tests in BFD!
6726
6727 if test x${want64} = xfalse; then
6728 # The cast to long int works around a bug in the HP C Compiler
6729 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6730 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6731 # This bug is HP SR number 8606223364.
6732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6733 $as_echo_n "checking size of long... " >&6; }
6734 if ${ac_cv_sizeof_long+:} false; then :
6735 $as_echo_n "(cached) " >&6
6736 else
6737 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6738
6739 else
6740 if test "$ac_cv_type_long" = yes; then
6741 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6742 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6743 as_fn_error 77 "cannot compute sizeof (long)
6744 See \`config.log' for more details" "$LINENO" 5; }
6745 else
6746 ac_cv_sizeof_long=0
6747 fi
6748 fi
6749
6750 fi
6751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6752 $as_echo "$ac_cv_sizeof_long" >&6; }
6753
6754
6755
6756 cat >>confdefs.h <<_ACEOF
6757 #define SIZEOF_LONG $ac_cv_sizeof_long
6758 _ACEOF
6759
6760
6761 if test "x${ac_cv_sizeof_long}" = "x8"; then
6762 want64=true
6763 fi
6764 fi
6765 if test x${want64} = xtrue; then
6766 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6767 else
6768 TARGET_OBS='$(ALL_TARGET_OBS)'
6769 fi
6770 fi
6771
6772
6773
6774
6775 # For other settings, only the main target counts.
6776 gdb_sim=
6777 gdb_osabi=
6778 targ=$target; . ${srcdir}/configure.tgt
6779
6780 # Fetch the default architecture and default target vector from BFD.
6781 targ=$target; . $srcdir/../bfd/config.bfd
6782
6783 # We only want the first architecture, so strip off the others if
6784 # there is more than one.
6785 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6786
6787 if test "x$targ_archs" != x; then
6788
6789 cat >>confdefs.h <<_ACEOF
6790 #define DEFAULT_BFD_ARCH $targ_archs
6791 _ACEOF
6792
6793 fi
6794 if test "x$targ_defvec" != x; then
6795
6796 cat >>confdefs.h <<_ACEOF
6797 #define DEFAULT_BFD_VEC $targ_defvec
6798 _ACEOF
6799
6800 fi
6801
6802 # Enable MI.
6803 # Check whether --enable-gdbmi was given.
6804 if test "${enable_gdbmi+set}" = set; then :
6805 enableval=$enable_gdbmi; case $enableval in
6806 yes | no)
6807 ;;
6808 *)
6809 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6810 esac
6811 else
6812 enable_gdbmi=yes
6813 fi
6814
6815 if test x"$enable_gdbmi" = xyes; then
6816 if test -d "$srcdir/mi"; then
6817 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6818 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6819 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6820 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6821 fi
6822 fi
6823
6824 # Enable TUI.
6825 # Check whether --enable-tui was given.
6826 if test "${enable_tui+set}" = set; then :
6827 enableval=$enable_tui; case $enableval in
6828 yes | no | auto)
6829 ;;
6830 *)
6831 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6832 esac
6833 else
6834 enable_tui=auto
6835 fi
6836
6837
6838 # Enable gdbtk.
6839 # Check whether --enable-gdbtk was given.
6840 if test "${enable_gdbtk+set}" = set; then :
6841 enableval=$enable_gdbtk; case $enableval in
6842 yes | no)
6843 ;;
6844 *)
6845 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6846 esac
6847 else
6848 if test -d "$srcdir/gdbtk"; then
6849 enable_gdbtk=yes
6850 else
6851 enable_gdbtk=no
6852 fi
6853 fi
6854
6855 # We unconditionally disable gdbtk tests on selected platforms.
6856 case $host_os in
6857 go32* | windows*)
6858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6859 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6860 enable_gdbtk=no ;;
6861 esac
6862
6863 # Handle optional debuginfod support
6864
6865
6866
6867
6868
6869
6870
6871 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6872 if test -n "$ac_tool_prefix"; then
6873 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6874 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6876 $as_echo_n "checking for $ac_word... " >&6; }
6877 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6878 $as_echo_n "(cached) " >&6
6879 else
6880 case $PKG_CONFIG in
6881 [\\/]* | ?:[\\/]*)
6882 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6883 ;;
6884 *)
6885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6886 for as_dir in $PATH
6887 do
6888 IFS=$as_save_IFS
6889 test -z "$as_dir" && as_dir=.
6890 for ac_exec_ext in '' $ac_executable_extensions; do
6891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6892 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6894 break 2
6895 fi
6896 done
6897 done
6898 IFS=$as_save_IFS
6899
6900 ;;
6901 esac
6902 fi
6903 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6904 if test -n "$PKG_CONFIG"; then
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6906 $as_echo "$PKG_CONFIG" >&6; }
6907 else
6908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6909 $as_echo "no" >&6; }
6910 fi
6911
6912
6913 fi
6914 if test -z "$ac_cv_path_PKG_CONFIG"; then
6915 ac_pt_PKG_CONFIG=$PKG_CONFIG
6916 # Extract the first word of "pkg-config", so it can be a program name with args.
6917 set dummy pkg-config; ac_word=$2
6918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919 $as_echo_n "checking for $ac_word... " >&6; }
6920 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6921 $as_echo_n "(cached) " >&6
6922 else
6923 case $ac_pt_PKG_CONFIG in
6924 [\\/]* | ?:[\\/]*)
6925 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6926 ;;
6927 *)
6928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6929 for as_dir in $PATH
6930 do
6931 IFS=$as_save_IFS
6932 test -z "$as_dir" && as_dir=.
6933 for ac_exec_ext in '' $ac_executable_extensions; do
6934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6936 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6937 break 2
6938 fi
6939 done
6940 done
6941 IFS=$as_save_IFS
6942
6943 ;;
6944 esac
6945 fi
6946 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6947 if test -n "$ac_pt_PKG_CONFIG"; then
6948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6949 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
6950 else
6951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6952 $as_echo "no" >&6; }
6953 fi
6954
6955 if test "x$ac_pt_PKG_CONFIG" = x; then
6956 PKG_CONFIG=""
6957 else
6958 case $cross_compiling:$ac_tool_warned in
6959 yes:)
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6961 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6962 ac_tool_warned=yes ;;
6963 esac
6964 PKG_CONFIG=$ac_pt_PKG_CONFIG
6965 fi
6966 else
6967 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6968 fi
6969
6970 fi
6971 if test -n "$PKG_CONFIG"; then
6972 _pkg_min_version=0.9.0
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6974 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6975 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6977 $as_echo "yes" >&6; }
6978 else
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6980 $as_echo "no" >&6; }
6981 PKG_CONFIG=""
6982 fi
6983 fi
6984
6985 # Handle optional debuginfod support
6986
6987 # Check whether --with-debuginfod was given.
6988 if test "${with_debuginfod+set}" = set; then :
6989 withval=$with_debuginfod;
6990 else
6991 with_debuginfod=auto
6992 fi
6993
6994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
6995 $as_echo_n "checking whether to use debuginfod... " >&6; }
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
6997 $as_echo "$with_debuginfod" >&6; }
6998
6999 if test "x$with_debuginfod" != xno; then
7000
7001 pkg_failed=no
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7003 $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7004
7005 if test -n "$DEBUGINFOD_CFLAGS"; then
7006 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7007 elif test -n "$PKG_CONFIG"; then
7008 if test -n "$PKG_CONFIG" && \
7009 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7010 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7011 ac_status=$?
7012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7013 test $ac_status = 0; }; then
7014 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7015 test "x$?" != "x0" && pkg_failed=yes
7016 else
7017 pkg_failed=yes
7018 fi
7019 else
7020 pkg_failed=untried
7021 fi
7022 if test -n "$DEBUGINFOD_LIBS"; then
7023 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7024 elif test -n "$PKG_CONFIG"; then
7025 if test -n "$PKG_CONFIG" && \
7026 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7027 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7028 ac_status=$?
7029 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7030 test $ac_status = 0; }; then
7031 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7032 test "x$?" != "x0" && pkg_failed=yes
7033 else
7034 pkg_failed=yes
7035 fi
7036 else
7037 pkg_failed=untried
7038 fi
7039
7040
7041
7042 if test $pkg_failed = yes; then
7043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7044 $as_echo "no" >&6; }
7045
7046 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7047 _pkg_short_errors_supported=yes
7048 else
7049 _pkg_short_errors_supported=no
7050 fi
7051 if test $_pkg_short_errors_supported = yes; then
7052 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7053 else
7054 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7055 fi
7056 # Put the nasty error message in config.log where it belongs
7057 echo "$DEBUGINFOD_PKG_ERRORS" >&5
7058
7059 if test "x$with_debuginfod" = xyes; then
7060 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7061 else
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7063 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7064 fi
7065 elif test $pkg_failed = untried; then
7066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7067 $as_echo "no" >&6; }
7068 if test "x$with_debuginfod" = xyes; then
7069 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7070 else
7071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7072 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7073 fi
7074 else
7075 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7076 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7078 $as_echo "yes" >&6; }
7079
7080 $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7081
7082 fi
7083 else
7084 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7085 $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7086 fi
7087
7088
7089 # Libunwind support for ia64.
7090
7091 # Check whether --with-libunwind-ia64 was given.
7092 if test "${with_libunwind_ia64+set}" = set; then :
7093 withval=$with_libunwind_ia64;
7094 else
7095 with_libunwind_ia64=auto
7096 fi
7097
7098
7099 # Backward compatibility option.
7100 if test "${with_libunwind+set}" = set; then
7101 if test x"$with_libunwind_ia64" != xauto; then
7102 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7103 fi
7104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7105 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7106 with_libunwind_ia64="$with_libunwind"
7107 fi
7108
7109 case "$with_libunwind_ia64" in
7110 yes | no)
7111 ;;
7112 auto)
7113 for ac_header in libunwind-ia64.h
7114 do :
7115 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7116 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7117 cat >>confdefs.h <<_ACEOF
7118 #define HAVE_LIBUNWIND_IA64_H 1
7119 _ACEOF
7120
7121 fi
7122
7123 done
7124
7125 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7126 ;;
7127 *)
7128 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7129 ;;
7130 esac
7131
7132 if test x"$with_libunwind_ia64" = xyes; then
7133 for ac_header in libunwind-ia64.h
7134 do :
7135 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7136 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7137 cat >>confdefs.h <<_ACEOF
7138 #define HAVE_LIBUNWIND_IA64_H 1
7139 _ACEOF
7140
7141 fi
7142
7143 done
7144
7145 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7146 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7147 fi
7148 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7149 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7150 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7151 fi
7152
7153 opt_curses=no
7154
7155 # Check whether --with-curses was given.
7156 if test "${with_curses+set}" = set; then :
7157 withval=$with_curses; opt_curses=$withval
7158 fi
7159
7160
7161 prefer_curses=no
7162 if test "$opt_curses" = "yes"; then
7163 prefer_curses=yes
7164 fi
7165
7166 # Profiling support.
7167 # Check whether --enable-profiling was given.
7168 if test "${enable_profiling+set}" = set; then :
7169 enableval=$enable_profiling; case $enableval in
7170 yes | no)
7171 ;;
7172 *)
7173 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
7174 esac
7175 else
7176 enable_profiling=no
7177 fi
7178
7179
7180 for ac_func in monstartup _mcleanup
7181 do :
7182 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7183 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7184 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7185 cat >>confdefs.h <<_ACEOF
7186 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7187 _ACEOF
7188
7189 fi
7190 done
7191
7192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7193 $as_echo_n "checking for _etext... " >&6; }
7194 if ${ac_cv_var__etext+:} false; then :
7195 $as_echo_n "(cached) " >&6
7196 else
7197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7198 /* end confdefs.h. */
7199 #include <stdlib.h>
7200 extern char _etext;
7201
7202 int
7203 main ()
7204 {
7205 free (&_etext);
7206 ;
7207 return 0;
7208 }
7209 _ACEOF
7210 if ac_fn_c_try_link "$LINENO"; then :
7211 ac_cv_var__etext=yes
7212 else
7213 ac_cv_var__etext=no
7214 fi
7215 rm -f core conftest.err conftest.$ac_objext \
7216 conftest$ac_exeext conftest.$ac_ext
7217 fi
7218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7219 $as_echo "$ac_cv_var__etext" >&6; }
7220 if test "$ac_cv_var__etext" = yes; then
7221
7222 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7223
7224 fi
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7226 $as_echo_n "checking for etext... " >&6; }
7227 if ${ac_cv_var_etext+:} false; then :
7228 $as_echo_n "(cached) " >&6
7229 else
7230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7231 /* end confdefs.h. */
7232 #include <stdlib.h>
7233 extern char etext;
7234
7235 int
7236 main ()
7237 {
7238 free (&etext);
7239 ;
7240 return 0;
7241 }
7242 _ACEOF
7243 if ac_fn_c_try_link "$LINENO"; then :
7244 ac_cv_var_etext=yes
7245 else
7246 ac_cv_var_etext=no
7247 fi
7248 rm -f core conftest.err conftest.$ac_objext \
7249 conftest$ac_exeext conftest.$ac_ext
7250 fi
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7252 $as_echo "$ac_cv_var_etext" >&6; }
7253 if test "$ac_cv_var_etext" = yes; then
7254
7255 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7256
7257 fi
7258 if test "$enable_profiling" = yes ; then
7259 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7260 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7261 fi
7262 PROFILE_CFLAGS=-pg
7263 OLD_CFLAGS="$CFLAGS"
7264 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7265
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7267 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7268 if ${ac_cv_cc_supports_pg+:} false; then :
7269 $as_echo_n "(cached) " >&6
7270 else
7271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7272 /* end confdefs.h. */
7273
7274 int
7275 main ()
7276 {
7277 int x;
7278 ;
7279 return 0;
7280 }
7281 _ACEOF
7282 if ac_fn_c_try_compile "$LINENO"; then :
7283 ac_cv_cc_supports_pg=yes
7284 else
7285 ac_cv_cc_supports_pg=no
7286 fi
7287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7288 fi
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7290 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7291
7292 if test "$ac_cv_cc_supports_pg" = no; then
7293 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7294 fi
7295
7296 CFLAGS="$OLD_CFLAGS"
7297 fi
7298
7299 CODESIGN_CERT=
7300 # Check whether --enable-codesign was given.
7301 if test "${enable_codesign+set}" = set; then :
7302 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7303 fi
7304
7305
7306
7307
7308
7309 # Check whether --with-pkgversion was given.
7310 if test "${with_pkgversion+set}" = set; then :
7311 withval=$with_pkgversion; case "$withval" in
7312 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7313 no) PKGVERSION= ;;
7314 *) PKGVERSION="($withval) " ;;
7315 esac
7316 else
7317 PKGVERSION="(GDB) "
7318
7319 fi
7320
7321
7322
7323
7324
7325 # Check whether --with-bugurl was given.
7326 if test "${with_bugurl+set}" = set; then :
7327 withval=$with_bugurl; case "$withval" in
7328 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7329 no) BUGURL=
7330 ;;
7331 *) BUGURL="$withval"
7332 ;;
7333 esac
7334 else
7335 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7336
7337 fi
7338
7339 case ${BUGURL} in
7340 "")
7341 REPORT_BUGS_TO=
7342 REPORT_BUGS_TEXI=
7343 ;;
7344 *)
7345 REPORT_BUGS_TO="<$BUGURL>"
7346 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7347 ;;
7348 esac;
7349
7350
7351
7352
7353 cat >>confdefs.h <<_ACEOF
7354 #define PKGVERSION "$PKGVERSION"
7355 _ACEOF
7356
7357
7358 cat >>confdefs.h <<_ACEOF
7359 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7360 _ACEOF
7361
7362
7363 # --------------------- #
7364 # Checks for programs. #
7365 # --------------------- #
7366
7367 for ac_prog in gawk mawk nawk awk
7368 do
7369 # Extract the first word of "$ac_prog", so it can be a program name with args.
7370 set dummy $ac_prog; ac_word=$2
7371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372 $as_echo_n "checking for $ac_word... " >&6; }
7373 if ${ac_cv_prog_AWK+:} false; then :
7374 $as_echo_n "(cached) " >&6
7375 else
7376 if test -n "$AWK"; then
7377 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7378 else
7379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7380 for as_dir in $PATH
7381 do
7382 IFS=$as_save_IFS
7383 test -z "$as_dir" && as_dir=.
7384 for ac_exec_ext in '' $ac_executable_extensions; do
7385 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7386 ac_cv_prog_AWK="$ac_prog"
7387 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7388 break 2
7389 fi
7390 done
7391 done
7392 IFS=$as_save_IFS
7393
7394 fi
7395 fi
7396 AWK=$ac_cv_prog_AWK
7397 if test -n "$AWK"; then
7398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7399 $as_echo "$AWK" >&6; }
7400 else
7401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7402 $as_echo "no" >&6; }
7403 fi
7404
7405
7406 test -n "$AWK" && break
7407 done
7408
7409 # Find a good install program. We prefer a C program (faster),
7410 # so one script is as good as another. But avoid the broken or
7411 # incompatible versions:
7412 # SysV /etc/install, /usr/sbin/install
7413 # SunOS /usr/etc/install
7414 # IRIX /sbin/install
7415 # AIX /bin/install
7416 # AmigaOS /C/install, which installs bootblocks on floppy discs
7417 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7418 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7419 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7420 # OS/2's system install, which has a completely different semantic
7421 # ./install, which can be erroneously created by make from ./install.sh.
7422 # Reject install programs that cannot install multiple files.
7423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7424 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7425 if test -z "$INSTALL"; then
7426 if ${ac_cv_path_install+:} false; then :
7427 $as_echo_n "(cached) " >&6
7428 else
7429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7430 for as_dir in $PATH
7431 do
7432 IFS=$as_save_IFS
7433 test -z "$as_dir" && as_dir=.
7434 # Account for people who put trailing slashes in PATH elements.
7435 case $as_dir/ in #((
7436 ./ | .// | /[cC]/* | \
7437 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7438 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7439 /usr/ucb/* ) ;;
7440 *)
7441 # OSF1 and SCO ODT 3.0 have their own names for install.
7442 # Don't use installbsd from OSF since it installs stuff as root
7443 # by default.
7444 for ac_prog in ginstall scoinst install; do
7445 for ac_exec_ext in '' $ac_executable_extensions; do
7446 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7447 if test $ac_prog = install &&
7448 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7449 # AIX install. It has an incompatible calling convention.
7450 :
7451 elif test $ac_prog = install &&
7452 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7453 # program-specific install script used by HP pwplus--don't use.
7454 :
7455 else
7456 rm -rf conftest.one conftest.two conftest.dir
7457 echo one > conftest.one
7458 echo two > conftest.two
7459 mkdir conftest.dir
7460 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7461 test -s conftest.one && test -s conftest.two &&
7462 test -s conftest.dir/conftest.one &&
7463 test -s conftest.dir/conftest.two
7464 then
7465 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7466 break 3
7467 fi
7468 fi
7469 fi
7470 done
7471 done
7472 ;;
7473 esac
7474
7475 done
7476 IFS=$as_save_IFS
7477
7478 rm -rf conftest.one conftest.two conftest.dir
7479
7480 fi
7481 if test "${ac_cv_path_install+set}" = set; then
7482 INSTALL=$ac_cv_path_install
7483 else
7484 # As a last resort, use the slow shell script. Don't cache a
7485 # value for INSTALL within a source directory, because that will
7486 # break other packages using the cache if that directory is
7487 # removed, or if the value is a relative name.
7488 INSTALL=$ac_install_sh
7489 fi
7490 fi
7491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7492 $as_echo "$INSTALL" >&6; }
7493
7494 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7495 # It thinks the first close brace ends the variable substitution.
7496 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7497
7498 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7499
7500 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7501
7502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7503 $as_echo_n "checking whether ln -s works... " >&6; }
7504 LN_S=$as_ln_s
7505 if test "$LN_S" = "ln -s"; then
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7507 $as_echo "yes" >&6; }
7508 else
7509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7510 $as_echo "no, using $LN_S" >&6; }
7511 fi
7512
7513 if test -n "$ac_tool_prefix"; then
7514 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7515 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7517 $as_echo_n "checking for $ac_word... " >&6; }
7518 if ${ac_cv_prog_RANLIB+:} false; then :
7519 $as_echo_n "(cached) " >&6
7520 else
7521 if test -n "$RANLIB"; then
7522 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7523 else
7524 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7525 for as_dir in $PATH
7526 do
7527 IFS=$as_save_IFS
7528 test -z "$as_dir" && as_dir=.
7529 for ac_exec_ext in '' $ac_executable_extensions; do
7530 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7531 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7532 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7533 break 2
7534 fi
7535 done
7536 done
7537 IFS=$as_save_IFS
7538
7539 fi
7540 fi
7541 RANLIB=$ac_cv_prog_RANLIB
7542 if test -n "$RANLIB"; then
7543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7544 $as_echo "$RANLIB" >&6; }
7545 else
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7547 $as_echo "no" >&6; }
7548 fi
7549
7550
7551 fi
7552 if test -z "$ac_cv_prog_RANLIB"; then
7553 ac_ct_RANLIB=$RANLIB
7554 # Extract the first word of "ranlib", so it can be a program name with args.
7555 set dummy ranlib; ac_word=$2
7556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7557 $as_echo_n "checking for $ac_word... " >&6; }
7558 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7559 $as_echo_n "(cached) " >&6
7560 else
7561 if test -n "$ac_ct_RANLIB"; then
7562 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7563 else
7564 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7565 for as_dir in $PATH
7566 do
7567 IFS=$as_save_IFS
7568 test -z "$as_dir" && as_dir=.
7569 for ac_exec_ext in '' $ac_executable_extensions; do
7570 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7571 ac_cv_prog_ac_ct_RANLIB="ranlib"
7572 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7573 break 2
7574 fi
7575 done
7576 done
7577 IFS=$as_save_IFS
7578
7579 fi
7580 fi
7581 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7582 if test -n "$ac_ct_RANLIB"; then
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7584 $as_echo "$ac_ct_RANLIB" >&6; }
7585 else
7586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7587 $as_echo "no" >&6; }
7588 fi
7589
7590 if test "x$ac_ct_RANLIB" = x; then
7591 RANLIB=":"
7592 else
7593 case $cross_compiling:$ac_tool_warned in
7594 yes:)
7595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7596 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7597 ac_tool_warned=yes ;;
7598 esac
7599 RANLIB=$ac_ct_RANLIB
7600 fi
7601 else
7602 RANLIB="$ac_cv_prog_RANLIB"
7603 fi
7604
7605 for ac_prog in 'bison -y' byacc
7606 do
7607 # Extract the first word of "$ac_prog", so it can be a program name with args.
7608 set dummy $ac_prog; ac_word=$2
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7610 $as_echo_n "checking for $ac_word... " >&6; }
7611 if ${ac_cv_prog_YACC+:} false; then :
7612 $as_echo_n "(cached) " >&6
7613 else
7614 if test -n "$YACC"; then
7615 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7616 else
7617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7618 for as_dir in $PATH
7619 do
7620 IFS=$as_save_IFS
7621 test -z "$as_dir" && as_dir=.
7622 for ac_exec_ext in '' $ac_executable_extensions; do
7623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7624 ac_cv_prog_YACC="$ac_prog"
7625 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7626 break 2
7627 fi
7628 done
7629 done
7630 IFS=$as_save_IFS
7631
7632 fi
7633 fi
7634 YACC=$ac_cv_prog_YACC
7635 if test -n "$YACC"; then
7636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7637 $as_echo "$YACC" >&6; }
7638 else
7639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7640 $as_echo "no" >&6; }
7641 fi
7642
7643
7644 test -n "$YACC" && break
7645 done
7646 test -n "$YACC" || YACC="yacc"
7647
7648
7649 if test -n "$ac_tool_prefix"; then
7650 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7651 set dummy ${ac_tool_prefix}ar; ac_word=$2
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7653 $as_echo_n "checking for $ac_word... " >&6; }
7654 if ${ac_cv_prog_AR+:} false; then :
7655 $as_echo_n "(cached) " >&6
7656 else
7657 if test -n "$AR"; then
7658 ac_cv_prog_AR="$AR" # Let the user override the test.
7659 else
7660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7661 for as_dir in $PATH
7662 do
7663 IFS=$as_save_IFS
7664 test -z "$as_dir" && as_dir=.
7665 for ac_exec_ext in '' $ac_executable_extensions; do
7666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7667 ac_cv_prog_AR="${ac_tool_prefix}ar"
7668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7669 break 2
7670 fi
7671 done
7672 done
7673 IFS=$as_save_IFS
7674
7675 fi
7676 fi
7677 AR=$ac_cv_prog_AR
7678 if test -n "$AR"; then
7679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7680 $as_echo "$AR" >&6; }
7681 else
7682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7683 $as_echo "no" >&6; }
7684 fi
7685
7686
7687 fi
7688 if test -z "$ac_cv_prog_AR"; then
7689 ac_ct_AR=$AR
7690 # Extract the first word of "ar", so it can be a program name with args.
7691 set dummy ar; ac_word=$2
7692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7693 $as_echo_n "checking for $ac_word... " >&6; }
7694 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7695 $as_echo_n "(cached) " >&6
7696 else
7697 if test -n "$ac_ct_AR"; then
7698 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7699 else
7700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7701 for as_dir in $PATH
7702 do
7703 IFS=$as_save_IFS
7704 test -z "$as_dir" && as_dir=.
7705 for ac_exec_ext in '' $ac_executable_extensions; do
7706 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7707 ac_cv_prog_ac_ct_AR="ar"
7708 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7709 break 2
7710 fi
7711 done
7712 done
7713 IFS=$as_save_IFS
7714
7715 fi
7716 fi
7717 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7718 if test -n "$ac_ct_AR"; then
7719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7720 $as_echo "$ac_ct_AR" >&6; }
7721 else
7722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7723 $as_echo "no" >&6; }
7724 fi
7725
7726 if test "x$ac_ct_AR" = x; then
7727 AR=""
7728 else
7729 case $cross_compiling:$ac_tool_warned in
7730 yes:)
7731 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7732 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7733 ac_tool_warned=yes ;;
7734 esac
7735 AR=$ac_ct_AR
7736 fi
7737 else
7738 AR="$ac_cv_prog_AR"
7739 fi
7740
7741 if test -n "$ac_tool_prefix"; then
7742 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7743 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7745 $as_echo_n "checking for $ac_word... " >&6; }
7746 if ${ac_cv_prog_DLLTOOL+:} false; then :
7747 $as_echo_n "(cached) " >&6
7748 else
7749 if test -n "$DLLTOOL"; then
7750 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7751 else
7752 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7753 for as_dir in $PATH
7754 do
7755 IFS=$as_save_IFS
7756 test -z "$as_dir" && as_dir=.
7757 for ac_exec_ext in '' $ac_executable_extensions; do
7758 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7759 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7760 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7761 break 2
7762 fi
7763 done
7764 done
7765 IFS=$as_save_IFS
7766
7767 fi
7768 fi
7769 DLLTOOL=$ac_cv_prog_DLLTOOL
7770 if test -n "$DLLTOOL"; then
7771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7772 $as_echo "$DLLTOOL" >&6; }
7773 else
7774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7775 $as_echo "no" >&6; }
7776 fi
7777
7778
7779 fi
7780 if test -z "$ac_cv_prog_DLLTOOL"; then
7781 ac_ct_DLLTOOL=$DLLTOOL
7782 # Extract the first word of "dlltool", so it can be a program name with args.
7783 set dummy dlltool; ac_word=$2
7784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7785 $as_echo_n "checking for $ac_word... " >&6; }
7786 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7787 $as_echo_n "(cached) " >&6
7788 else
7789 if test -n "$ac_ct_DLLTOOL"; then
7790 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7791 else
7792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7793 for as_dir in $PATH
7794 do
7795 IFS=$as_save_IFS
7796 test -z "$as_dir" && as_dir=.
7797 for ac_exec_ext in '' $ac_executable_extensions; do
7798 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7799 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7800 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7801 break 2
7802 fi
7803 done
7804 done
7805 IFS=$as_save_IFS
7806
7807 fi
7808 fi
7809 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7810 if test -n "$ac_ct_DLLTOOL"; then
7811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7812 $as_echo "$ac_ct_DLLTOOL" >&6; }
7813 else
7814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815 $as_echo "no" >&6; }
7816 fi
7817
7818 if test "x$ac_ct_DLLTOOL" = x; then
7819 DLLTOOL=""
7820 else
7821 case $cross_compiling:$ac_tool_warned in
7822 yes:)
7823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7824 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7825 ac_tool_warned=yes ;;
7826 esac
7827 DLLTOOL=$ac_ct_DLLTOOL
7828 fi
7829 else
7830 DLLTOOL="$ac_cv_prog_DLLTOOL"
7831 fi
7832
7833 if test -n "$ac_tool_prefix"; then
7834 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7835 set dummy ${ac_tool_prefix}windres; ac_word=$2
7836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7837 $as_echo_n "checking for $ac_word... " >&6; }
7838 if ${ac_cv_prog_WINDRES+:} false; then :
7839 $as_echo_n "(cached) " >&6
7840 else
7841 if test -n "$WINDRES"; then
7842 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7843 else
7844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7845 for as_dir in $PATH
7846 do
7847 IFS=$as_save_IFS
7848 test -z "$as_dir" && as_dir=.
7849 for ac_exec_ext in '' $ac_executable_extensions; do
7850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7851 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7853 break 2
7854 fi
7855 done
7856 done
7857 IFS=$as_save_IFS
7858
7859 fi
7860 fi
7861 WINDRES=$ac_cv_prog_WINDRES
7862 if test -n "$WINDRES"; then
7863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7864 $as_echo "$WINDRES" >&6; }
7865 else
7866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7867 $as_echo "no" >&6; }
7868 fi
7869
7870
7871 fi
7872 if test -z "$ac_cv_prog_WINDRES"; then
7873 ac_ct_WINDRES=$WINDRES
7874 # Extract the first word of "windres", so it can be a program name with args.
7875 set dummy windres; ac_word=$2
7876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7877 $as_echo_n "checking for $ac_word... " >&6; }
7878 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7879 $as_echo_n "(cached) " >&6
7880 else
7881 if test -n "$ac_ct_WINDRES"; then
7882 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7883 else
7884 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7885 for as_dir in $PATH
7886 do
7887 IFS=$as_save_IFS
7888 test -z "$as_dir" && as_dir=.
7889 for ac_exec_ext in '' $ac_executable_extensions; do
7890 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7891 ac_cv_prog_ac_ct_WINDRES="windres"
7892 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7893 break 2
7894 fi
7895 done
7896 done
7897 IFS=$as_save_IFS
7898
7899 fi
7900 fi
7901 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7902 if test -n "$ac_ct_WINDRES"; then
7903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7904 $as_echo "$ac_ct_WINDRES" >&6; }
7905 else
7906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907 $as_echo "no" >&6; }
7908 fi
7909
7910 if test "x$ac_ct_WINDRES" = x; then
7911 WINDRES=""
7912 else
7913 case $cross_compiling:$ac_tool_warned in
7914 yes:)
7915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7916 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7917 ac_tool_warned=yes ;;
7918 esac
7919 WINDRES=$ac_ct_WINDRES
7920 fi
7921 else
7922 WINDRES="$ac_cv_prog_WINDRES"
7923 fi
7924
7925
7926 case $host_os in
7927 gnu*)
7928 # Needed for GNU Hurd hosts.
7929 if test -n "$ac_tool_prefix"; then
7930 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7931 set dummy ${ac_tool_prefix}mig; ac_word=$2
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7933 $as_echo_n "checking for $ac_word... " >&6; }
7934 if ${ac_cv_prog_MIG+:} false; then :
7935 $as_echo_n "(cached) " >&6
7936 else
7937 if test -n "$MIG"; then
7938 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7939 else
7940 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7941 for as_dir in $PATH
7942 do
7943 IFS=$as_save_IFS
7944 test -z "$as_dir" && as_dir=.
7945 for ac_exec_ext in '' $ac_executable_extensions; do
7946 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7947 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7948 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7949 break 2
7950 fi
7951 done
7952 done
7953 IFS=$as_save_IFS
7954
7955 fi
7956 fi
7957 MIG=$ac_cv_prog_MIG
7958 if test -n "$MIG"; then
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7960 $as_echo "$MIG" >&6; }
7961 else
7962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7963 $as_echo "no" >&6; }
7964 fi
7965
7966
7967 fi
7968 if test -z "$ac_cv_prog_MIG"; then
7969 ac_ct_MIG=$MIG
7970 # Extract the first word of "mig", so it can be a program name with args.
7971 set dummy mig; ac_word=$2
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7973 $as_echo_n "checking for $ac_word... " >&6; }
7974 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7975 $as_echo_n "(cached) " >&6
7976 else
7977 if test -n "$ac_ct_MIG"; then
7978 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7979 else
7980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7981 for as_dir in $PATH
7982 do
7983 IFS=$as_save_IFS
7984 test -z "$as_dir" && as_dir=.
7985 for ac_exec_ext in '' $ac_executable_extensions; do
7986 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7987 ac_cv_prog_ac_ct_MIG="mig"
7988 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7989 break 2
7990 fi
7991 done
7992 done
7993 IFS=$as_save_IFS
7994
7995 fi
7996 fi
7997 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7998 if test -n "$ac_ct_MIG"; then
7999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8000 $as_echo "$ac_ct_MIG" >&6; }
8001 else
8002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8003 $as_echo "no" >&6; }
8004 fi
8005
8006 if test "x$ac_ct_MIG" = x; then
8007 MIG=""
8008 else
8009 case $cross_compiling:$ac_tool_warned in
8010 yes:)
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8012 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8013 ac_tool_warned=yes ;;
8014 esac
8015 MIG=$ac_ct_MIG
8016 fi
8017 else
8018 MIG="$ac_cv_prog_MIG"
8019 fi
8020
8021 if test x"$MIG" = x; then
8022 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8023 fi
8024 ;;
8025 esac
8026
8027 # ---------------------- #
8028 # Checks for libraries. #
8029 # ---------------------- #
8030
8031 # We might need to link with -lm; most simulators need it.
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8033 $as_echo_n "checking for main in -lm... " >&6; }
8034 if ${ac_cv_lib_m_main+:} false; then :
8035 $as_echo_n "(cached) " >&6
8036 else
8037 ac_check_lib_save_LIBS=$LIBS
8038 LIBS="-lm $LIBS"
8039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8040 /* end confdefs.h. */
8041
8042
8043 int
8044 main ()
8045 {
8046 return main ();
8047 ;
8048 return 0;
8049 }
8050 _ACEOF
8051 if ac_fn_c_try_link "$LINENO"; then :
8052 ac_cv_lib_m_main=yes
8053 else
8054 ac_cv_lib_m_main=no
8055 fi
8056 rm -f core conftest.err conftest.$ac_objext \
8057 conftest$ac_exeext conftest.$ac_ext
8058 LIBS=$ac_check_lib_save_LIBS
8059 fi
8060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8061 $as_echo "$ac_cv_lib_m_main" >&6; }
8062 if test "x$ac_cv_lib_m_main" = xyes; then :
8063 cat >>confdefs.h <<_ACEOF
8064 #define HAVE_LIBM 1
8065 _ACEOF
8066
8067 LIBS="-lm $LIBS"
8068
8069 fi
8070
8071
8072 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8074 $as_echo_n "checking for library containing gethostbyname... " >&6; }
8075 if ${ac_cv_search_gethostbyname+:} false; then :
8076 $as_echo_n "(cached) " >&6
8077 else
8078 ac_func_search_save_LIBS=$LIBS
8079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8080 /* end confdefs.h. */
8081
8082 /* Override any GCC internal prototype to avoid an error.
8083 Use char because int might match the return type of a GCC
8084 builtin and then its argument prototype would still apply. */
8085 #ifdef __cplusplus
8086 extern "C"
8087 #endif
8088 char gethostbyname ();
8089 int
8090 main ()
8091 {
8092 return gethostbyname ();
8093 ;
8094 return 0;
8095 }
8096 _ACEOF
8097 for ac_lib in '' nsl; do
8098 if test -z "$ac_lib"; then
8099 ac_res="none required"
8100 else
8101 ac_res=-l$ac_lib
8102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8103 fi
8104 if ac_fn_c_try_link "$LINENO"; then :
8105 ac_cv_search_gethostbyname=$ac_res
8106 fi
8107 rm -f core conftest.err conftest.$ac_objext \
8108 conftest$ac_exeext
8109 if ${ac_cv_search_gethostbyname+:} false; then :
8110 break
8111 fi
8112 done
8113 if ${ac_cv_search_gethostbyname+:} false; then :
8114
8115 else
8116 ac_cv_search_gethostbyname=no
8117 fi
8118 rm conftest.$ac_ext
8119 LIBS=$ac_func_search_save_LIBS
8120 fi
8121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8122 $as_echo "$ac_cv_search_gethostbyname" >&6; }
8123 ac_res=$ac_cv_search_gethostbyname
8124 if test "$ac_res" != no; then :
8125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8126
8127 fi
8128
8129
8130 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8132 $as_echo_n "checking for library containing socketpair... " >&6; }
8133 if ${ac_cv_search_socketpair+:} false; then :
8134 $as_echo_n "(cached) " >&6
8135 else
8136 ac_func_search_save_LIBS=$LIBS
8137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8138 /* end confdefs.h. */
8139
8140 /* Override any GCC internal prototype to avoid an error.
8141 Use char because int might match the return type of a GCC
8142 builtin and then its argument prototype would still apply. */
8143 #ifdef __cplusplus
8144 extern "C"
8145 #endif
8146 char socketpair ();
8147 int
8148 main ()
8149 {
8150 return socketpair ();
8151 ;
8152 return 0;
8153 }
8154 _ACEOF
8155 for ac_lib in '' socket; do
8156 if test -z "$ac_lib"; then
8157 ac_res="none required"
8158 else
8159 ac_res=-l$ac_lib
8160 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8161 fi
8162 if ac_fn_c_try_link "$LINENO"; then :
8163 ac_cv_search_socketpair=$ac_res
8164 fi
8165 rm -f core conftest.err conftest.$ac_objext \
8166 conftest$ac_exeext
8167 if ${ac_cv_search_socketpair+:} false; then :
8168 break
8169 fi
8170 done
8171 if ${ac_cv_search_socketpair+:} false; then :
8172
8173 else
8174 ac_cv_search_socketpair=no
8175 fi
8176 rm conftest.$ac_ext
8177 LIBS=$ac_func_search_save_LIBS
8178 fi
8179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8180 $as_echo "$ac_cv_search_socketpair" >&6; }
8181 ac_res=$ac_cv_search_socketpair
8182 if test "$ac_res" != no; then :
8183 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8184
8185 fi
8186
8187
8188 # Link in zlib if we can. This allows us to read compressed debug sections.
8189
8190 # Use the system's zlib library.
8191 zlibdir="-L\$(top_builddir)/../zlib"
8192 zlibinc="-I\$(top_srcdir)/../zlib"
8193
8194 # Check whether --with-system-zlib was given.
8195 if test "${with_system_zlib+set}" = set; then :
8196 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8197 zlibdir=
8198 zlibinc=
8199 fi
8200
8201 fi
8202
8203
8204
8205
8206
8207 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
8208 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
8209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
8210 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
8211 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8212 $as_echo_n "(cached) " >&6
8213 else
8214 ac_func_search_save_LIBS=$LIBS
8215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216 /* end confdefs.h. */
8217
8218 /* Override any GCC internal prototype to avoid an error.
8219 Use char because int might match the return type of a GCC
8220 builtin and then its argument prototype would still apply. */
8221 #ifdef __cplusplus
8222 extern "C"
8223 #endif
8224 char kinfo_getvmmap ();
8225 int
8226 main ()
8227 {
8228 return kinfo_getvmmap ();
8229 ;
8230 return 0;
8231 }
8232 _ACEOF
8233 for ac_lib in '' util util-freebsd; do
8234 if test -z "$ac_lib"; then
8235 ac_res="none required"
8236 else
8237 ac_res=-l$ac_lib
8238 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8239 fi
8240 if ac_fn_c_try_link "$LINENO"; then :
8241 ac_cv_search_kinfo_getvmmap=$ac_res
8242 fi
8243 rm -f core conftest.err conftest.$ac_objext \
8244 conftest$ac_exeext
8245 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8246 break
8247 fi
8248 done
8249 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
8250
8251 else
8252 ac_cv_search_kinfo_getvmmap=no
8253 fi
8254 rm conftest.$ac_ext
8255 LIBS=$ac_func_search_save_LIBS
8256 fi
8257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8258 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8259 ac_res=$ac_cv_search_kinfo_getvmmap
8260 if test "$ac_res" != no; then :
8261 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8262
8263 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8264
8265 fi
8266
8267
8268
8269 if test "X$prefix" = "XNONE"; then
8270 acl_final_prefix="$ac_default_prefix"
8271 else
8272 acl_final_prefix="$prefix"
8273 fi
8274 if test "X$exec_prefix" = "XNONE"; then
8275 acl_final_exec_prefix='${prefix}'
8276 else
8277 acl_final_exec_prefix="$exec_prefix"
8278 fi
8279 acl_save_prefix="$prefix"
8280 prefix="$acl_final_prefix"
8281 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8282 prefix="$acl_save_prefix"
8283
8284
8285 # Check whether --with-gnu-ld was given.
8286 if test "${with_gnu_ld+set}" = set; then :
8287 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8288 else
8289 with_gnu_ld=no
8290 fi
8291
8292 # Prepare PATH_SEPARATOR.
8293 # The user is always right.
8294 if test "${PATH_SEPARATOR+set}" != set; then
8295 echo "#! /bin/sh" >conf$$.sh
8296 echo "exit 0" >>conf$$.sh
8297 chmod +x conf$$.sh
8298 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8299 PATH_SEPARATOR=';'
8300 else
8301 PATH_SEPARATOR=:
8302 fi
8303 rm -f conf$$.sh
8304 fi
8305 ac_prog=ld
8306 if test "$GCC" = yes; then
8307 # Check if gcc -print-prog-name=ld gives a path.
8308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8309 $as_echo_n "checking for ld used by GCC... " >&6; }
8310 case $host in
8311 *-*-mingw*)
8312 # gcc leaves a trailing carriage return which upsets mingw
8313 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8314 *)
8315 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8316 esac
8317 case $ac_prog in
8318 # Accept absolute paths.
8319 [\\/]* | [A-Za-z]:[\\/]*)
8320 re_direlt='/[^/][^/]*/\.\./'
8321 # Canonicalize the path of ld
8322 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8323 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8324 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8325 done
8326 test -z "$LD" && LD="$ac_prog"
8327 ;;
8328 "")
8329 # If it fails, then pretend we aren't using GCC.
8330 ac_prog=ld
8331 ;;
8332 *)
8333 # If it is relative, then search for the first ld in PATH.
8334 with_gnu_ld=unknown
8335 ;;
8336 esac
8337 elif test "$with_gnu_ld" = yes; then
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8339 $as_echo_n "checking for GNU ld... " >&6; }
8340 else
8341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8342 $as_echo_n "checking for non-GNU ld... " >&6; }
8343 fi
8344 if ${acl_cv_path_LD+:} false; then :
8345 $as_echo_n "(cached) " >&6
8346 else
8347 if test -z "$LD"; then
8348 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8349 for ac_dir in $PATH; do
8350 test -z "$ac_dir" && ac_dir=.
8351 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8352 acl_cv_path_LD="$ac_dir/$ac_prog"
8353 # Check to see if the program is GNU ld. I'd rather use --version,
8354 # but apparently some GNU ld's only accept -v.
8355 # Break only if it was the GNU/non-GNU ld that we prefer.
8356 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8357 test "$with_gnu_ld" != no && break
8358 else
8359 test "$with_gnu_ld" != yes && break
8360 fi
8361 fi
8362 done
8363 IFS="$ac_save_ifs"
8364 else
8365 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8366 fi
8367 fi
8368
8369 LD="$acl_cv_path_LD"
8370 if test -n "$LD"; then
8371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8372 $as_echo "$LD" >&6; }
8373 else
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8375 $as_echo "no" >&6; }
8376 fi
8377 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8379 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8380 if ${acl_cv_prog_gnu_ld+:} false; then :
8381 $as_echo_n "(cached) " >&6
8382 else
8383 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8384 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8385 acl_cv_prog_gnu_ld=yes
8386 else
8387 acl_cv_prog_gnu_ld=no
8388 fi
8389 fi
8390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8391 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8392 with_gnu_ld=$acl_cv_prog_gnu_ld
8393
8394
8395
8396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8397 $as_echo_n "checking for shared library run path origin... " >&6; }
8398 if ${acl_cv_rpath+:} false; then :
8399 $as_echo_n "(cached) " >&6
8400 else
8401
8402 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8403 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8404 . ./conftest.sh
8405 rm -f ./conftest.sh
8406 acl_cv_rpath=done
8407
8408 fi
8409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8410 $as_echo "$acl_cv_rpath" >&6; }
8411 wl="$acl_cv_wl"
8412 libext="$acl_cv_libext"
8413 shlibext="$acl_cv_shlibext"
8414 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8415 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8416 hardcode_direct="$acl_cv_hardcode_direct"
8417 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8418 # Check whether --enable-rpath was given.
8419 if test "${enable_rpath+set}" = set; then :
8420 enableval=$enable_rpath; :
8421 else
8422 enable_rpath=yes
8423 fi
8424
8425
8426
8427
8428
8429
8430
8431
8432 use_additional=yes
8433
8434 acl_save_prefix="$prefix"
8435 prefix="$acl_final_prefix"
8436 acl_save_exec_prefix="$exec_prefix"
8437 exec_prefix="$acl_final_exec_prefix"
8438
8439 eval additional_includedir=\"$includedir\"
8440 eval additional_libdir=\"$libdir\"
8441
8442 exec_prefix="$acl_save_exec_prefix"
8443 prefix="$acl_save_prefix"
8444
8445
8446 # Check whether --with-libiconv-prefix was given.
8447 if test "${with_libiconv_prefix+set}" = set; then :
8448 withval=$with_libiconv_prefix;
8449 if test "X$withval" = "Xno"; then
8450 use_additional=no
8451 else
8452 if test "X$withval" = "X"; then
8453
8454 acl_save_prefix="$prefix"
8455 prefix="$acl_final_prefix"
8456 acl_save_exec_prefix="$exec_prefix"
8457 exec_prefix="$acl_final_exec_prefix"
8458
8459 eval additional_includedir=\"$includedir\"
8460 eval additional_libdir=\"$libdir\"
8461
8462 exec_prefix="$acl_save_exec_prefix"
8463 prefix="$acl_save_prefix"
8464
8465 else
8466 additional_includedir="$withval/include"
8467 additional_libdir="$withval/lib"
8468 fi
8469 fi
8470
8471 fi
8472
8473
8474 # Check whether --with-libiconv-type was given.
8475 if test "${with_libiconv_type+set}" = set; then :
8476 withval=$with_libiconv_type; with_libiconv_type=$withval
8477 else
8478 with_libiconv_type=auto
8479 fi
8480
8481 lib_type=`eval echo \$with_libiconv_type`
8482
8483 LIBICONV=
8484 LTLIBICONV=
8485 INCICONV=
8486 rpathdirs=
8487 ltrpathdirs=
8488 names_already_handled=
8489 names_next_round='iconv '
8490 while test -n "$names_next_round"; do
8491 names_this_round="$names_next_round"
8492 names_next_round=
8493 for name in $names_this_round; do
8494 already_handled=
8495 for n in $names_already_handled; do
8496 if test "$n" = "$name"; then
8497 already_handled=yes
8498 break
8499 fi
8500 done
8501 if test -z "$already_handled"; then
8502 names_already_handled="$names_already_handled $name"
8503 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8504 eval value=\"\$HAVE_LIB$uppername\"
8505 if test -n "$value"; then
8506 if test "$value" = yes; then
8507 eval value=\"\$LIB$uppername\"
8508 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8509 eval value=\"\$LTLIB$uppername\"
8510 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8511 else
8512 :
8513 fi
8514 else
8515 found_dir=
8516 found_la=
8517 found_so=
8518 found_a=
8519 if test $use_additional = yes; then
8520 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8521 found_dir="$additional_libdir"
8522 found_so="$additional_libdir/lib$name.$shlibext"
8523 if test -f "$additional_libdir/lib$name.la"; then
8524 found_la="$additional_libdir/lib$name.la"
8525 fi
8526 elif test x$lib_type != xshared; then
8527 if test -f "$additional_libdir/lib$name.$libext"; then
8528 found_dir="$additional_libdir"
8529 found_a="$additional_libdir/lib$name.$libext"
8530 if test -f "$additional_libdir/lib$name.la"; then
8531 found_la="$additional_libdir/lib$name.la"
8532 fi
8533 fi
8534 fi
8535 fi
8536 if test "X$found_dir" = "X"; then
8537 for x in $LDFLAGS $LTLIBICONV; do
8538
8539 acl_save_prefix="$prefix"
8540 prefix="$acl_final_prefix"
8541 acl_save_exec_prefix="$exec_prefix"
8542 exec_prefix="$acl_final_exec_prefix"
8543 eval x=\"$x\"
8544 exec_prefix="$acl_save_exec_prefix"
8545 prefix="$acl_save_prefix"
8546
8547 case "$x" in
8548 -L*)
8549 dir=`echo "X$x" | sed -e 's/^X-L//'`
8550 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8551 found_dir="$dir"
8552 found_so="$dir/lib$name.$shlibext"
8553 if test -f "$dir/lib$name.la"; then
8554 found_la="$dir/lib$name.la"
8555 fi
8556 elif test x$lib_type != xshared; then
8557 if test -f "$dir/lib$name.$libext"; then
8558 found_dir="$dir"
8559 found_a="$dir/lib$name.$libext"
8560 if test -f "$dir/lib$name.la"; then
8561 found_la="$dir/lib$name.la"
8562 fi
8563 fi
8564 fi
8565 ;;
8566 esac
8567 if test "X$found_dir" != "X"; then
8568 break
8569 fi
8570 done
8571 fi
8572 if test "X$found_dir" != "X"; then
8573 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8574 if test "X$found_so" != "X"; then
8575 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8576 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8577 else
8578 haveit=
8579 for x in $ltrpathdirs; do
8580 if test "X$x" = "X$found_dir"; then
8581 haveit=yes
8582 break
8583 fi
8584 done
8585 if test -z "$haveit"; then
8586 ltrpathdirs="$ltrpathdirs $found_dir"
8587 fi
8588 if test "$hardcode_direct" = yes; then
8589 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8590 else
8591 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8592 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8593 haveit=
8594 for x in $rpathdirs; do
8595 if test "X$x" = "X$found_dir"; then
8596 haveit=yes
8597 break
8598 fi
8599 done
8600 if test -z "$haveit"; then
8601 rpathdirs="$rpathdirs $found_dir"
8602 fi
8603 else
8604 haveit=
8605 for x in $LDFLAGS $LIBICONV; do
8606
8607 acl_save_prefix="$prefix"
8608 prefix="$acl_final_prefix"
8609 acl_save_exec_prefix="$exec_prefix"
8610 exec_prefix="$acl_final_exec_prefix"
8611 eval x=\"$x\"
8612 exec_prefix="$acl_save_exec_prefix"
8613 prefix="$acl_save_prefix"
8614
8615 if test "X$x" = "X-L$found_dir"; then
8616 haveit=yes
8617 break
8618 fi
8619 done
8620 if test -z "$haveit"; then
8621 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8622 fi
8623 if test "$hardcode_minus_L" != no; then
8624 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8625 else
8626 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8627 fi
8628 fi
8629 fi
8630 fi
8631 else
8632 if test "X$found_a" != "X"; then
8633 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8634 else
8635 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8636 fi
8637 fi
8638 additional_includedir=
8639 case "$found_dir" in
8640 */lib | */lib/)
8641 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8642 additional_includedir="$basedir/include"
8643 ;;
8644 esac
8645 if test "X$additional_includedir" != "X"; then
8646 if test "X$additional_includedir" != "X/usr/include"; then
8647 haveit=
8648 if test "X$additional_includedir" = "X/usr/local/include"; then
8649 if test -n "$GCC"; then
8650 case $host_os in
8651 linux*) haveit=yes;;
8652 esac
8653 fi
8654 fi
8655 if test -z "$haveit"; then
8656 for x in $CPPFLAGS $INCICONV; do
8657
8658 acl_save_prefix="$prefix"
8659 prefix="$acl_final_prefix"
8660 acl_save_exec_prefix="$exec_prefix"
8661 exec_prefix="$acl_final_exec_prefix"
8662 eval x=\"$x\"
8663 exec_prefix="$acl_save_exec_prefix"
8664 prefix="$acl_save_prefix"
8665
8666 if test "X$x" = "X-I$additional_includedir"; then
8667 haveit=yes
8668 break
8669 fi
8670 done
8671 if test -z "$haveit"; then
8672 if test -d "$additional_includedir"; then
8673 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8674 fi
8675 fi
8676 fi
8677 fi
8678 fi
8679 if test -n "$found_la"; then
8680 save_libdir="$libdir"
8681 case "$found_la" in
8682 */* | *\\*) . "$found_la" ;;
8683 *) . "./$found_la" ;;
8684 esac
8685 libdir="$save_libdir"
8686 for dep in $dependency_libs; do
8687 case "$dep" in
8688 -L*)
8689 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8690 if test "X$additional_libdir" != "X/usr/lib"; then
8691 haveit=
8692 if test "X$additional_libdir" = "X/usr/local/lib"; then
8693 if test -n "$GCC"; then
8694 case $host_os in
8695 linux*) haveit=yes;;
8696 esac
8697 fi
8698 fi
8699 if test -z "$haveit"; then
8700 haveit=
8701 for x in $LDFLAGS $LIBICONV; do
8702
8703 acl_save_prefix="$prefix"
8704 prefix="$acl_final_prefix"
8705 acl_save_exec_prefix="$exec_prefix"
8706 exec_prefix="$acl_final_exec_prefix"
8707 eval x=\"$x\"
8708 exec_prefix="$acl_save_exec_prefix"
8709 prefix="$acl_save_prefix"
8710
8711 if test "X$x" = "X-L$additional_libdir"; then
8712 haveit=yes
8713 break
8714 fi
8715 done
8716 if test -z "$haveit"; then
8717 if test -d "$additional_libdir"; then
8718 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8719 fi
8720 fi
8721 haveit=
8722 for x in $LDFLAGS $LTLIBICONV; do
8723
8724 acl_save_prefix="$prefix"
8725 prefix="$acl_final_prefix"
8726 acl_save_exec_prefix="$exec_prefix"
8727 exec_prefix="$acl_final_exec_prefix"
8728 eval x=\"$x\"
8729 exec_prefix="$acl_save_exec_prefix"
8730 prefix="$acl_save_prefix"
8731
8732 if test "X$x" = "X-L$additional_libdir"; then
8733 haveit=yes
8734 break
8735 fi
8736 done
8737 if test -z "$haveit"; then
8738 if test -d "$additional_libdir"; then
8739 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8740 fi
8741 fi
8742 fi
8743 fi
8744 ;;
8745 -R*)
8746 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8747 if test "$enable_rpath" != no; then
8748 haveit=
8749 for x in $rpathdirs; do
8750 if test "X$x" = "X$dir"; then
8751 haveit=yes
8752 break
8753 fi
8754 done
8755 if test -z "$haveit"; then
8756 rpathdirs="$rpathdirs $dir"
8757 fi
8758 haveit=
8759 for x in $ltrpathdirs; do
8760 if test "X$x" = "X$dir"; then
8761 haveit=yes
8762 break
8763 fi
8764 done
8765 if test -z "$haveit"; then
8766 ltrpathdirs="$ltrpathdirs $dir"
8767 fi
8768 fi
8769 ;;
8770 -l*)
8771 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8772 ;;
8773 *.la)
8774 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8775 ;;
8776 *)
8777 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8778 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8779 ;;
8780 esac
8781 done
8782 fi
8783 else
8784 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8785 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8786 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8787 else
8788 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8789 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8790 fi
8791 fi
8792 fi
8793 fi
8794 done
8795 done
8796 if test "X$rpathdirs" != "X"; then
8797 if test -n "$hardcode_libdir_separator"; then
8798 alldirs=
8799 for found_dir in $rpathdirs; do
8800 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8801 done
8802 acl_save_libdir="$libdir"
8803 libdir="$alldirs"
8804 eval flag=\"$hardcode_libdir_flag_spec\"
8805 libdir="$acl_save_libdir"
8806 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8807 else
8808 for found_dir in $rpathdirs; do
8809 acl_save_libdir="$libdir"
8810 libdir="$found_dir"
8811 eval flag=\"$hardcode_libdir_flag_spec\"
8812 libdir="$acl_save_libdir"
8813 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8814 done
8815 fi
8816 fi
8817 if test "X$ltrpathdirs" != "X"; then
8818 for found_dir in $ltrpathdirs; do
8819 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8820 done
8821 fi
8822
8823
8824
8825
8826
8827
8828
8829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8830 $as_echo_n "checking for iconv... " >&6; }
8831 if ${am_cv_func_iconv+:} false; then :
8832 $as_echo_n "(cached) " >&6
8833 else
8834
8835 am_cv_func_iconv="no, consider installing GNU libiconv"
8836 am_cv_lib_iconv=no
8837 am_save_CPPFLAGS="$CPPFLAGS"
8838 CPPFLAGS="$CPPFLAGS $INCICONV"
8839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8840 /* end confdefs.h. */
8841 #include <stdlib.h>
8842 #include <iconv.h>
8843 int
8844 main ()
8845 {
8846 iconv_t cd = iconv_open("","");
8847 iconv(cd,NULL,NULL,NULL,NULL);
8848 iconv_close(cd);
8849 ;
8850 return 0;
8851 }
8852 _ACEOF
8853 if ac_fn_c_try_link "$LINENO"; then :
8854 am_cv_func_iconv=yes
8855 fi
8856 rm -f core conftest.err conftest.$ac_objext \
8857 conftest$ac_exeext conftest.$ac_ext
8858 CPPFLAGS="$am_save_CPPFLAGS"
8859
8860 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8861 for _libs in .libs _libs; do
8862 am_save_CPPFLAGS="$CPPFLAGS"
8863 am_save_LIBS="$LIBS"
8864 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8865 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8867 /* end confdefs.h. */
8868 #include <stdlib.h>
8869 #include <iconv.h>
8870 int
8871 main ()
8872 {
8873 iconv_t cd = iconv_open("","");
8874 iconv(cd,NULL,NULL,NULL,NULL);
8875 iconv_close(cd);
8876 ;
8877 return 0;
8878 }
8879 _ACEOF
8880 if ac_fn_c_try_link "$LINENO"; then :
8881 INCICONV="-I../libiconv/include"
8882 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8883 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8884 am_cv_lib_iconv=yes
8885 am_cv_func_iconv=yes
8886 fi
8887 rm -f core conftest.err conftest.$ac_objext \
8888 conftest$ac_exeext conftest.$ac_ext
8889 CPPFLAGS="$am_save_CPPFLAGS"
8890 LIBS="$am_save_LIBS"
8891 if test "$am_cv_func_iconv" = "yes"; then
8892 break
8893 fi
8894 done
8895 fi
8896
8897 if test "$am_cv_func_iconv" != yes; then
8898 am_save_CPPFLAGS="$CPPFLAGS"
8899 am_save_LIBS="$LIBS"
8900 CPPFLAGS="$CPPFLAGS $INCICONV"
8901 LIBS="$LIBS $LIBICONV"
8902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8903 /* end confdefs.h. */
8904 #include <stdlib.h>
8905 #include <iconv.h>
8906 int
8907 main ()
8908 {
8909 iconv_t cd = iconv_open("","");
8910 iconv(cd,NULL,NULL,NULL,NULL);
8911 iconv_close(cd);
8912 ;
8913 return 0;
8914 }
8915 _ACEOF
8916 if ac_fn_c_try_link "$LINENO"; then :
8917 am_cv_lib_iconv=yes
8918 am_cv_func_iconv=yes
8919 fi
8920 rm -f core conftest.err conftest.$ac_objext \
8921 conftest$ac_exeext conftest.$ac_ext
8922 CPPFLAGS="$am_save_CPPFLAGS"
8923 LIBS="$am_save_LIBS"
8924 fi
8925
8926 fi
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8928 $as_echo "$am_cv_func_iconv" >&6; }
8929 if test "$am_cv_func_iconv" = yes; then
8930
8931 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8932
8933 fi
8934 if test "$am_cv_lib_iconv" = yes; then
8935
8936 for element in $INCICONV; do
8937 haveit=
8938 for x in $CPPFLAGS; do
8939
8940 acl_save_prefix="$prefix"
8941 prefix="$acl_final_prefix"
8942 acl_save_exec_prefix="$exec_prefix"
8943 exec_prefix="$acl_final_exec_prefix"
8944 eval x=\"$x\"
8945 exec_prefix="$acl_save_exec_prefix"
8946 prefix="$acl_save_prefix"
8947
8948 if test "X$x" = "X$element"; then
8949 haveit=yes
8950 break
8951 fi
8952 done
8953 if test -z "$haveit"; then
8954 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8955 fi
8956 done
8957
8958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8959 $as_echo_n "checking how to link with libiconv... " >&6; }
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8961 $as_echo "$LIBICONV" >&6; }
8962 else
8963 LIBICONV=
8964 LTLIBICONV=
8965 fi
8966
8967
8968
8969 if test "$am_cv_func_iconv" = yes; then
8970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8971 $as_echo_n "checking for iconv declaration... " >&6; }
8972 if ${am_cv_proto_iconv+:} false; then :
8973 $as_echo_n "(cached) " >&6
8974 else
8975
8976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8977 /* end confdefs.h. */
8978
8979 #include <stdlib.h>
8980 #include <iconv.h>
8981 extern
8982 #ifdef __cplusplus
8983 "C"
8984 #endif
8985 #if defined(__STDC__) || defined(__cplusplus)
8986 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8987 #else
8988 size_t iconv();
8989 #endif
8990
8991 int
8992 main ()
8993 {
8994
8995 ;
8996 return 0;
8997 }
8998 _ACEOF
8999 if ac_fn_c_try_compile "$LINENO"; then :
9000 am_cv_proto_iconv_arg1=""
9001 else
9002 am_cv_proto_iconv_arg1="const"
9003 fi
9004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9005 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);"
9006 fi
9007
9008 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
9010 }$am_cv_proto_iconv" >&5
9011 $as_echo "${ac_t:-
9012 }$am_cv_proto_iconv" >&6; }
9013
9014 cat >>confdefs.h <<_ACEOF
9015 #define ICONV_CONST $am_cv_proto_iconv_arg1
9016 _ACEOF
9017
9018 fi
9019
9020
9021 # GDB may fork/exec the iconv program to get the list of supported character
9022 # sets. Allow the user to specify where to find it.
9023 # There are several factors affecting the choice of option name:
9024 # - There is already --with-libiconv-prefix but we can't use it, it specifies
9025 # the build-time location of libiconv files.
9026 # - The program we need to find is iconv, which comes with glibc. The user
9027 # doesn't necessarily have libiconv installed. Therefore naming this
9028 # --with-libiconv-foo feels wrong.
9029 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9030 # defined to work on directories not files (though it really doesn't know
9031 # the difference).
9032 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
9033 # with --with-libiconv-prefix.
9034 # Putting these together is why the option name is --with-iconv-bin.
9035
9036
9037 # Check whether --with-iconv-bin was given.
9038 if test "${with_iconv_bin+set}" = set; then :
9039 withval=$with_iconv_bin; iconv_bin="${withval}"
9040
9041 cat >>confdefs.h <<_ACEOF
9042 #define ICONV_BIN "${iconv_bin}"
9043 _ACEOF
9044
9045
9046 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9047 if test "x$prefix" = xNONE; then
9048 test_prefix=/usr/local
9049 else
9050 test_prefix=$prefix
9051 fi
9052 else
9053 test_prefix=$exec_prefix
9054 fi
9055 value=0
9056 case ${iconv_bin} in
9057 "${test_prefix}"|"${test_prefix}/"*|\
9058 '${exec_prefix}'|'${exec_prefix}/'*)
9059 value=1
9060 ;;
9061 esac
9062
9063 cat >>confdefs.h <<_ACEOF
9064 #define ICONV_BIN_RELOCATABLE $value
9065 _ACEOF
9066
9067
9068
9069 fi
9070
9071
9072 # For the TUI, we need enhanced curses functionality.
9073 if test x"$enable_tui" != xno; then
9074 prefer_curses=yes
9075 fi
9076
9077 curses_found=no
9078 if test x"$prefer_curses" = xyes; then
9079 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9080 # curses library because the latter might not provide all the
9081 # functionality we need. However, this leads to problems on systems
9082 # where the linker searches /usr/local/lib, but the compiler doesn't
9083 # search /usr/local/include, if ncurses is installed in /usr/local. A
9084 # default installation of ncurses on alpha*-dec-osf* will lead to such
9085 # a situation.
9086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9087 $as_echo_n "checking for library containing waddstr... " >&6; }
9088 if ${ac_cv_search_waddstr+:} false; then :
9089 $as_echo_n "(cached) " >&6
9090 else
9091 ac_func_search_save_LIBS=$LIBS
9092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9093 /* end confdefs.h. */
9094
9095 /* Override any GCC internal prototype to avoid an error.
9096 Use char because int might match the return type of a GCC
9097 builtin and then its argument prototype would still apply. */
9098 #ifdef __cplusplus
9099 extern "C"
9100 #endif
9101 char waddstr ();
9102 int
9103 main ()
9104 {
9105 return waddstr ();
9106 ;
9107 return 0;
9108 }
9109 _ACEOF
9110 for ac_lib in '' ncursesw ncurses cursesX curses; do
9111 if test -z "$ac_lib"; then
9112 ac_res="none required"
9113 else
9114 ac_res=-l$ac_lib
9115 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9116 fi
9117 if ac_fn_c_try_link "$LINENO"; then :
9118 ac_cv_search_waddstr=$ac_res
9119 fi
9120 rm -f core conftest.err conftest.$ac_objext \
9121 conftest$ac_exeext
9122 if ${ac_cv_search_waddstr+:} false; then :
9123 break
9124 fi
9125 done
9126 if ${ac_cv_search_waddstr+:} false; then :
9127
9128 else
9129 ac_cv_search_waddstr=no
9130 fi
9131 rm conftest.$ac_ext
9132 LIBS=$ac_func_search_save_LIBS
9133 fi
9134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9135 $as_echo "$ac_cv_search_waddstr" >&6; }
9136 ac_res=$ac_cv_search_waddstr
9137 if test "$ac_res" != no; then :
9138 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9139
9140 fi
9141
9142
9143 if test "$ac_cv_search_waddstr" != no; then
9144 curses_found=yes
9145 fi
9146 fi
9147
9148 # Check whether we should enable the TUI, but only do so if we really
9149 # can.
9150 if test x"$enable_tui" != xno; then
9151 if test -d "$srcdir/tui"; then
9152 if test "$curses_found" != no; then
9153 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9154 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9155 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9156 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9157 else
9158 if test x"$enable_tui" = xyes; then
9159 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9160 else
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9162 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9163 fi
9164 fi
9165 fi
9166 fi
9167
9168 # Since GDB uses Readline, we need termcap functionality. In many
9169 # cases this will be provided by the curses library, but some systems
9170 # have a separate termcap library, or no curses library at all.
9171
9172 case $host_os in
9173 cygwin*)
9174 if test -d "$srcdir/libtermcap"; then
9175 LIBS="../libtermcap/libtermcap.a $LIBS"
9176 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9177 fi ;;
9178 go32* | *djgpp*)
9179 ac_cv_search_tgetent="none required"
9180 ;;
9181 esac
9182
9183 # These are the libraries checked by Readline.
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9185 $as_echo_n "checking for library containing tgetent... " >&6; }
9186 if ${ac_cv_search_tgetent+:} false; then :
9187 $as_echo_n "(cached) " >&6
9188 else
9189 ac_func_search_save_LIBS=$LIBS
9190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9191 /* end confdefs.h. */
9192
9193 /* Override any GCC internal prototype to avoid an error.
9194 Use char because int might match the return type of a GCC
9195 builtin and then its argument prototype would still apply. */
9196 #ifdef __cplusplus
9197 extern "C"
9198 #endif
9199 char tgetent ();
9200 int
9201 main ()
9202 {
9203 return tgetent ();
9204 ;
9205 return 0;
9206 }
9207 _ACEOF
9208 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9209 if test -z "$ac_lib"; then
9210 ac_res="none required"
9211 else
9212 ac_res=-l$ac_lib
9213 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9214 fi
9215 if ac_fn_c_try_link "$LINENO"; then :
9216 ac_cv_search_tgetent=$ac_res
9217 fi
9218 rm -f core conftest.err conftest.$ac_objext \
9219 conftest$ac_exeext
9220 if ${ac_cv_search_tgetent+:} false; then :
9221 break
9222 fi
9223 done
9224 if ${ac_cv_search_tgetent+:} false; then :
9225
9226 else
9227 ac_cv_search_tgetent=no
9228 fi
9229 rm conftest.$ac_ext
9230 LIBS=$ac_func_search_save_LIBS
9231 fi
9232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9233 $as_echo "$ac_cv_search_tgetent" >&6; }
9234 ac_res=$ac_cv_search_tgetent
9235 if test "$ac_res" != no; then :
9236 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9237
9238 fi
9239
9240
9241 if test "$ac_cv_search_tgetent" = no; then
9242 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9243 fi
9244
9245
9246 # Check whether --with-system-readline was given.
9247 if test "${with_system_readline+set}" = set; then :
9248 withval=$with_system_readline;
9249 fi
9250
9251
9252 if test "$with_system_readline" = yes; then
9253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9254 $as_echo_n "checking whether system readline is new enough... " >&6; }
9255 if ${gdb_cv_readline_ok+:} false; then :
9256 $as_echo_n "(cached) " >&6
9257 else
9258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9259 /* end confdefs.h. */
9260 #include <stdio.h>
9261 #include <readline/readline.h>
9262 int
9263 main ()
9264 {
9265 #if RL_VERSION_MAJOR < 7
9266 # error "readline version 7 required"
9267 #endif
9268 ;
9269 return 0;
9270 }
9271 _ACEOF
9272 if ac_fn_c_try_compile "$LINENO"; then :
9273 gdb_cv_readline_ok=yes
9274 else
9275 gdb_cv_readline_ok=no
9276 fi
9277 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9278 fi
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9280 $as_echo "$gdb_cv_readline_ok" >&6; }
9281 if test "$gdb_cv_readline_ok" != yes; then
9282 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9283 fi
9284
9285 READLINE=-lreadline
9286 READLINE_DEPS=
9287 READLINE_CFLAGS=
9288 READLINE_TEXI_INCFLAG=
9289 else
9290 READLINE='$(READLINE_DIR)/libreadline.a'
9291 READLINE_DEPS='$(READLINE)'
9292 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9293 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9294 fi
9295
9296
9297
9298
9299
9300 # Generate jit-reader.h
9301
9302 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9303 TARGET_PTR=
9304
9305 # The cast to long int works around a bug in the HP C Compiler
9306 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9307 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9308 # This bug is HP SR number 8606223364.
9309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9310 $as_echo_n "checking size of unsigned long long... " >&6; }
9311 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9312 $as_echo_n "(cached) " >&6
9313 else
9314 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9315
9316 else
9317 if test "$ac_cv_type_unsigned_long_long" = yes; then
9318 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9319 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9320 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9321 See \`config.log' for more details" "$LINENO" 5; }
9322 else
9323 ac_cv_sizeof_unsigned_long_long=0
9324 fi
9325 fi
9326
9327 fi
9328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9329 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9330
9331
9332
9333 cat >>confdefs.h <<_ACEOF
9334 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9335 _ACEOF
9336
9337
9338 # The cast to long int works around a bug in the HP C Compiler
9339 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9340 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9341 # This bug is HP SR number 8606223364.
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9343 $as_echo_n "checking size of unsigned long... " >&6; }
9344 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9345 $as_echo_n "(cached) " >&6
9346 else
9347 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9348
9349 else
9350 if test "$ac_cv_type_unsigned_long" = yes; then
9351 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9352 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9353 as_fn_error 77 "cannot compute sizeof (unsigned long)
9354 See \`config.log' for more details" "$LINENO" 5; }
9355 else
9356 ac_cv_sizeof_unsigned_long=0
9357 fi
9358 fi
9359
9360 fi
9361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9362 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9363
9364
9365
9366 cat >>confdefs.h <<_ACEOF
9367 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9368 _ACEOF
9369
9370
9371 # The cast to long int works around a bug in the HP C Compiler
9372 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9373 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9374 # This bug is HP SR number 8606223364.
9375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9376 $as_echo_n "checking size of unsigned __int128... " >&6; }
9377 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9378 $as_echo_n "(cached) " >&6
9379 else
9380 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9381
9382 else
9383 if test "$ac_cv_type_unsigned___int128" = yes; then
9384 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9385 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9386 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9387 See \`config.log' for more details" "$LINENO" 5; }
9388 else
9389 ac_cv_sizeof_unsigned___int128=0
9390 fi
9391 fi
9392
9393 fi
9394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9395 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9396
9397
9398
9399 cat >>confdefs.h <<_ACEOF
9400 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9401 _ACEOF
9402
9403
9404
9405 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9406 TARGET_PTR="unsigned long"
9407 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9408 TARGET_PTR="unsigned long long"
9409 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9410 TARGET_PTR="unsigned __int128"
9411 else
9412 TARGET_PTR="unsigned long"
9413 fi
9414
9415
9416 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9417
9418
9419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9420 $as_echo_n "checking for library containing dlopen... " >&6; }
9421 if ${ac_cv_search_dlopen+:} false; then :
9422 $as_echo_n "(cached) " >&6
9423 else
9424 ac_func_search_save_LIBS=$LIBS
9425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9426 /* end confdefs.h. */
9427
9428 /* Override any GCC internal prototype to avoid an error.
9429 Use char because int might match the return type of a GCC
9430 builtin and then its argument prototype would still apply. */
9431 #ifdef __cplusplus
9432 extern "C"
9433 #endif
9434 char dlopen ();
9435 int
9436 main ()
9437 {
9438 return dlopen ();
9439 ;
9440 return 0;
9441 }
9442 _ACEOF
9443 for ac_lib in '' dl; do
9444 if test -z "$ac_lib"; then
9445 ac_res="none required"
9446 else
9447 ac_res=-l$ac_lib
9448 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9449 fi
9450 if ac_fn_c_try_link "$LINENO"; then :
9451 ac_cv_search_dlopen=$ac_res
9452 fi
9453 rm -f core conftest.err conftest.$ac_objext \
9454 conftest$ac_exeext
9455 if ${ac_cv_search_dlopen+:} false; then :
9456 break
9457 fi
9458 done
9459 if ${ac_cv_search_dlopen+:} false; then :
9460
9461 else
9462 ac_cv_search_dlopen=no
9463 fi
9464 rm conftest.$ac_ext
9465 LIBS=$ac_func_search_save_LIBS
9466 fi
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9468 $as_echo "$ac_cv_search_dlopen" >&6; }
9469 ac_res=$ac_cv_search_dlopen
9470 if test "$ac_res" != no; then :
9471 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9472
9473 fi
9474
9475
9476
9477
9478 # Check whether --with-jit-reader-dir was given.
9479 if test "${with_jit_reader_dir+set}" = set; then :
9480 withval=$with_jit_reader_dir;
9481 JIT_READER_DIR=$withval
9482 else
9483 JIT_READER_DIR=${libdir}/gdb
9484 fi
9485
9486
9487 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9488 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9489 ac_define_dir=`eval echo $JIT_READER_DIR`
9490 ac_define_dir=`eval echo $ac_define_dir`
9491
9492 cat >>confdefs.h <<_ACEOF
9493 #define JIT_READER_DIR "$ac_define_dir"
9494 _ACEOF
9495
9496
9497
9498
9499 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9500 if test "x$prefix" = xNONE; then
9501 test_prefix=/usr/local
9502 else
9503 test_prefix=$prefix
9504 fi
9505 else
9506 test_prefix=$exec_prefix
9507 fi
9508 value=0
9509 case ${ac_define_dir} in
9510 "${test_prefix}"|"${test_prefix}/"*|\
9511 '${exec_prefix}'|'${exec_prefix}/'*)
9512 value=1
9513 ;;
9514 esac
9515
9516 cat >>confdefs.h <<_ACEOF
9517 #define JIT_READER_DIR_RELOCATABLE $value
9518 _ACEOF
9519
9520
9521
9522
9523
9524 # Check whether --with-expat was given.
9525 if test "${with_expat+set}" = set; then :
9526 withval=$with_expat;
9527 else
9528 with_expat=auto
9529 fi
9530
9531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9532 $as_echo_n "checking whether to use expat... " >&6; }
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9534 $as_echo "$with_expat" >&6; }
9535
9536 if test "${with_expat}" = no; then
9537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9538 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9539 HAVE_LIBEXPAT=no
9540 else
9541
9542
9543
9544
9545
9546
9547
9548
9549 use_additional=yes
9550
9551 acl_save_prefix="$prefix"
9552 prefix="$acl_final_prefix"
9553 acl_save_exec_prefix="$exec_prefix"
9554 exec_prefix="$acl_final_exec_prefix"
9555
9556 eval additional_includedir=\"$includedir\"
9557 eval additional_libdir=\"$libdir\"
9558
9559 exec_prefix="$acl_save_exec_prefix"
9560 prefix="$acl_save_prefix"
9561
9562
9563 # Check whether --with-libexpat-prefix was given.
9564 if test "${with_libexpat_prefix+set}" = set; then :
9565 withval=$with_libexpat_prefix;
9566 if test "X$withval" = "Xno"; then
9567 use_additional=no
9568 else
9569 if test "X$withval" = "X"; then
9570
9571 acl_save_prefix="$prefix"
9572 prefix="$acl_final_prefix"
9573 acl_save_exec_prefix="$exec_prefix"
9574 exec_prefix="$acl_final_exec_prefix"
9575
9576 eval additional_includedir=\"$includedir\"
9577 eval additional_libdir=\"$libdir\"
9578
9579 exec_prefix="$acl_save_exec_prefix"
9580 prefix="$acl_save_prefix"
9581
9582 else
9583 additional_includedir="$withval/include"
9584 additional_libdir="$withval/lib"
9585 fi
9586 fi
9587
9588 fi
9589
9590
9591 # Check whether --with-libexpat-type was given.
9592 if test "${with_libexpat_type+set}" = set; then :
9593 withval=$with_libexpat_type; with_libexpat_type=$withval
9594 else
9595 with_libexpat_type=auto
9596 fi
9597
9598 lib_type=`eval echo \$with_libexpat_type`
9599
9600 LIBEXPAT=
9601 LTLIBEXPAT=
9602 INCEXPAT=
9603 rpathdirs=
9604 ltrpathdirs=
9605 names_already_handled=
9606 names_next_round='expat '
9607 while test -n "$names_next_round"; do
9608 names_this_round="$names_next_round"
9609 names_next_round=
9610 for name in $names_this_round; do
9611 already_handled=
9612 for n in $names_already_handled; do
9613 if test "$n" = "$name"; then
9614 already_handled=yes
9615 break
9616 fi
9617 done
9618 if test -z "$already_handled"; then
9619 names_already_handled="$names_already_handled $name"
9620 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9621 eval value=\"\$HAVE_LIB$uppername\"
9622 if test -n "$value"; then
9623 if test "$value" = yes; then
9624 eval value=\"\$LIB$uppername\"
9625 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9626 eval value=\"\$LTLIB$uppername\"
9627 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9628 else
9629 :
9630 fi
9631 else
9632 found_dir=
9633 found_la=
9634 found_so=
9635 found_a=
9636 if test $use_additional = yes; then
9637 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9638 found_dir="$additional_libdir"
9639 found_so="$additional_libdir/lib$name.$shlibext"
9640 if test -f "$additional_libdir/lib$name.la"; then
9641 found_la="$additional_libdir/lib$name.la"
9642 fi
9643 elif test x$lib_type != xshared; then
9644 if test -f "$additional_libdir/lib$name.$libext"; then
9645 found_dir="$additional_libdir"
9646 found_a="$additional_libdir/lib$name.$libext"
9647 if test -f "$additional_libdir/lib$name.la"; then
9648 found_la="$additional_libdir/lib$name.la"
9649 fi
9650 fi
9651 fi
9652 fi
9653 if test "X$found_dir" = "X"; then
9654 for x in $LDFLAGS $LTLIBEXPAT; do
9655
9656 acl_save_prefix="$prefix"
9657 prefix="$acl_final_prefix"
9658 acl_save_exec_prefix="$exec_prefix"
9659 exec_prefix="$acl_final_exec_prefix"
9660 eval x=\"$x\"
9661 exec_prefix="$acl_save_exec_prefix"
9662 prefix="$acl_save_prefix"
9663
9664 case "$x" in
9665 -L*)
9666 dir=`echo "X$x" | sed -e 's/^X-L//'`
9667 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9668 found_dir="$dir"
9669 found_so="$dir/lib$name.$shlibext"
9670 if test -f "$dir/lib$name.la"; then
9671 found_la="$dir/lib$name.la"
9672 fi
9673 elif test x$lib_type != xshared; then
9674 if test -f "$dir/lib$name.$libext"; then
9675 found_dir="$dir"
9676 found_a="$dir/lib$name.$libext"
9677 if test -f "$dir/lib$name.la"; then
9678 found_la="$dir/lib$name.la"
9679 fi
9680 fi
9681 fi
9682 ;;
9683 esac
9684 if test "X$found_dir" != "X"; then
9685 break
9686 fi
9687 done
9688 fi
9689 if test "X$found_dir" != "X"; then
9690 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9691 if test "X$found_so" != "X"; then
9692 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9693 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9694 else
9695 haveit=
9696 for x in $ltrpathdirs; do
9697 if test "X$x" = "X$found_dir"; then
9698 haveit=yes
9699 break
9700 fi
9701 done
9702 if test -z "$haveit"; then
9703 ltrpathdirs="$ltrpathdirs $found_dir"
9704 fi
9705 if test "$hardcode_direct" = yes; then
9706 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9707 else
9708 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9709 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9710 haveit=
9711 for x in $rpathdirs; do
9712 if test "X$x" = "X$found_dir"; then
9713 haveit=yes
9714 break
9715 fi
9716 done
9717 if test -z "$haveit"; then
9718 rpathdirs="$rpathdirs $found_dir"
9719 fi
9720 else
9721 haveit=
9722 for x in $LDFLAGS $LIBEXPAT; do
9723
9724 acl_save_prefix="$prefix"
9725 prefix="$acl_final_prefix"
9726 acl_save_exec_prefix="$exec_prefix"
9727 exec_prefix="$acl_final_exec_prefix"
9728 eval x=\"$x\"
9729 exec_prefix="$acl_save_exec_prefix"
9730 prefix="$acl_save_prefix"
9731
9732 if test "X$x" = "X-L$found_dir"; then
9733 haveit=yes
9734 break
9735 fi
9736 done
9737 if test -z "$haveit"; then
9738 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9739 fi
9740 if test "$hardcode_minus_L" != no; then
9741 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9742 else
9743 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9744 fi
9745 fi
9746 fi
9747 fi
9748 else
9749 if test "X$found_a" != "X"; then
9750 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9751 else
9752 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9753 fi
9754 fi
9755 additional_includedir=
9756 case "$found_dir" in
9757 */lib | */lib/)
9758 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9759 additional_includedir="$basedir/include"
9760 ;;
9761 esac
9762 if test "X$additional_includedir" != "X"; then
9763 if test "X$additional_includedir" != "X/usr/include"; then
9764 haveit=
9765 if test "X$additional_includedir" = "X/usr/local/include"; then
9766 if test -n "$GCC"; then
9767 case $host_os in
9768 linux*) haveit=yes;;
9769 esac
9770 fi
9771 fi
9772 if test -z "$haveit"; then
9773 for x in $CPPFLAGS $INCEXPAT; do
9774
9775 acl_save_prefix="$prefix"
9776 prefix="$acl_final_prefix"
9777 acl_save_exec_prefix="$exec_prefix"
9778 exec_prefix="$acl_final_exec_prefix"
9779 eval x=\"$x\"
9780 exec_prefix="$acl_save_exec_prefix"
9781 prefix="$acl_save_prefix"
9782
9783 if test "X$x" = "X-I$additional_includedir"; then
9784 haveit=yes
9785 break
9786 fi
9787 done
9788 if test -z "$haveit"; then
9789 if test -d "$additional_includedir"; then
9790 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9791 fi
9792 fi
9793 fi
9794 fi
9795 fi
9796 if test -n "$found_la"; then
9797 save_libdir="$libdir"
9798 case "$found_la" in
9799 */* | *\\*) . "$found_la" ;;
9800 *) . "./$found_la" ;;
9801 esac
9802 libdir="$save_libdir"
9803 for dep in $dependency_libs; do
9804 case "$dep" in
9805 -L*)
9806 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9807 if test "X$additional_libdir" != "X/usr/lib"; then
9808 haveit=
9809 if test "X$additional_libdir" = "X/usr/local/lib"; then
9810 if test -n "$GCC"; then
9811 case $host_os in
9812 linux*) haveit=yes;;
9813 esac
9814 fi
9815 fi
9816 if test -z "$haveit"; then
9817 haveit=
9818 for x in $LDFLAGS $LIBEXPAT; do
9819
9820 acl_save_prefix="$prefix"
9821 prefix="$acl_final_prefix"
9822 acl_save_exec_prefix="$exec_prefix"
9823 exec_prefix="$acl_final_exec_prefix"
9824 eval x=\"$x\"
9825 exec_prefix="$acl_save_exec_prefix"
9826 prefix="$acl_save_prefix"
9827
9828 if test "X$x" = "X-L$additional_libdir"; then
9829 haveit=yes
9830 break
9831 fi
9832 done
9833 if test -z "$haveit"; then
9834 if test -d "$additional_libdir"; then
9835 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9836 fi
9837 fi
9838 haveit=
9839 for x in $LDFLAGS $LTLIBEXPAT; do
9840
9841 acl_save_prefix="$prefix"
9842 prefix="$acl_final_prefix"
9843 acl_save_exec_prefix="$exec_prefix"
9844 exec_prefix="$acl_final_exec_prefix"
9845 eval x=\"$x\"
9846 exec_prefix="$acl_save_exec_prefix"
9847 prefix="$acl_save_prefix"
9848
9849 if test "X$x" = "X-L$additional_libdir"; then
9850 haveit=yes
9851 break
9852 fi
9853 done
9854 if test -z "$haveit"; then
9855 if test -d "$additional_libdir"; then
9856 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9857 fi
9858 fi
9859 fi
9860 fi
9861 ;;
9862 -R*)
9863 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9864 if test "$enable_rpath" != no; then
9865 haveit=
9866 for x in $rpathdirs; do
9867 if test "X$x" = "X$dir"; then
9868 haveit=yes
9869 break
9870 fi
9871 done
9872 if test -z "$haveit"; then
9873 rpathdirs="$rpathdirs $dir"
9874 fi
9875 haveit=
9876 for x in $ltrpathdirs; do
9877 if test "X$x" = "X$dir"; then
9878 haveit=yes
9879 break
9880 fi
9881 done
9882 if test -z "$haveit"; then
9883 ltrpathdirs="$ltrpathdirs $dir"
9884 fi
9885 fi
9886 ;;
9887 -l*)
9888 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9889 ;;
9890 *.la)
9891 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9892 ;;
9893 *)
9894 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9895 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9896 ;;
9897 esac
9898 done
9899 fi
9900 else
9901 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9902 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9903 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9904 else
9905 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9906 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9907 fi
9908 fi
9909 fi
9910 fi
9911 done
9912 done
9913 if test "X$rpathdirs" != "X"; then
9914 if test -n "$hardcode_libdir_separator"; then
9915 alldirs=
9916 for found_dir in $rpathdirs; do
9917 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9918 done
9919 acl_save_libdir="$libdir"
9920 libdir="$alldirs"
9921 eval flag=\"$hardcode_libdir_flag_spec\"
9922 libdir="$acl_save_libdir"
9923 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9924 else
9925 for found_dir in $rpathdirs; do
9926 acl_save_libdir="$libdir"
9927 libdir="$found_dir"
9928 eval flag=\"$hardcode_libdir_flag_spec\"
9929 libdir="$acl_save_libdir"
9930 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9931 done
9932 fi
9933 fi
9934 if test "X$ltrpathdirs" != "X"; then
9935 for found_dir in $ltrpathdirs; do
9936 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9937 done
9938 fi
9939
9940
9941 ac_save_CPPFLAGS="$CPPFLAGS"
9942
9943 for element in $INCEXPAT; do
9944 haveit=
9945 for x in $CPPFLAGS; do
9946
9947 acl_save_prefix="$prefix"
9948 prefix="$acl_final_prefix"
9949 acl_save_exec_prefix="$exec_prefix"
9950 exec_prefix="$acl_final_exec_prefix"
9951 eval x=\"$x\"
9952 exec_prefix="$acl_save_exec_prefix"
9953 prefix="$acl_save_prefix"
9954
9955 if test "X$x" = "X$element"; then
9956 haveit=yes
9957 break
9958 fi
9959 done
9960 if test -z "$haveit"; then
9961 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9962 fi
9963 done
9964
9965
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9967 $as_echo_n "checking for libexpat... " >&6; }
9968 if ${ac_cv_libexpat+:} false; then :
9969 $as_echo_n "(cached) " >&6
9970 else
9971
9972 ac_save_LIBS="$LIBS"
9973 LIBS="$LIBS $LIBEXPAT"
9974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9975 /* end confdefs.h. */
9976 #include "expat.h"
9977 int
9978 main ()
9979 {
9980 XML_Parser p = XML_ParserCreate (0);
9981 ;
9982 return 0;
9983 }
9984 _ACEOF
9985 if ac_fn_c_try_link "$LINENO"; then :
9986 ac_cv_libexpat=yes
9987 else
9988 ac_cv_libexpat=no
9989 fi
9990 rm -f core conftest.err conftest.$ac_objext \
9991 conftest$ac_exeext conftest.$ac_ext
9992 LIBS="$ac_save_LIBS"
9993
9994 fi
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9996 $as_echo "$ac_cv_libexpat" >&6; }
9997 if test "$ac_cv_libexpat" = yes; then
9998 HAVE_LIBEXPAT=yes
9999
10000 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
10001
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10003 $as_echo_n "checking how to link with libexpat... " >&6; }
10004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10005 $as_echo "$LIBEXPAT" >&6; }
10006 else
10007 HAVE_LIBEXPAT=no
10008 CPPFLAGS="$ac_save_CPPFLAGS"
10009 LIBEXPAT=
10010 LTLIBEXPAT=
10011 fi
10012
10013
10014
10015
10016
10017
10018 if test "$HAVE_LIBEXPAT" != yes; then
10019 if test "$with_expat" = yes; then
10020 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
10021 else
10022 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10023 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10024 fi
10025 else
10026 save_LIBS=$LIBS
10027 LIBS="$LIBS $LIBEXPAT"
10028 for ac_func in XML_StopParser
10029 do :
10030 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10031 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
10032 cat >>confdefs.h <<_ACEOF
10033 #define HAVE_XML_STOPPARSER 1
10034 _ACEOF
10035
10036 fi
10037 done
10038
10039 LIBS=$save_LIBS
10040 fi
10041 fi
10042
10043
10044 # Check whether --with-mpfr was given.
10045 if test "${with_mpfr+set}" = set; then :
10046 withval=$with_mpfr;
10047 else
10048 with_mpfr=auto
10049 fi
10050
10051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10052 $as_echo_n "checking whether to use MPFR... " >&6; }
10053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10054 $as_echo "$with_mpfr" >&6; }
10055
10056 if test "${with_mpfr}" = no; then
10057 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10058 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10059 HAVE_LIBMPFR=no
10060 else
10061
10062
10063
10064
10065
10066
10067
10068
10069 use_additional=yes
10070
10071 acl_save_prefix="$prefix"
10072 prefix="$acl_final_prefix"
10073 acl_save_exec_prefix="$exec_prefix"
10074 exec_prefix="$acl_final_exec_prefix"
10075
10076 eval additional_includedir=\"$includedir\"
10077 eval additional_libdir=\"$libdir\"
10078
10079 exec_prefix="$acl_save_exec_prefix"
10080 prefix="$acl_save_prefix"
10081
10082
10083 # Check whether --with-libmpfr-prefix was given.
10084 if test "${with_libmpfr_prefix+set}" = set; then :
10085 withval=$with_libmpfr_prefix;
10086 if test "X$withval" = "Xno"; then
10087 use_additional=no
10088 else
10089 if test "X$withval" = "X"; then
10090
10091 acl_save_prefix="$prefix"
10092 prefix="$acl_final_prefix"
10093 acl_save_exec_prefix="$exec_prefix"
10094 exec_prefix="$acl_final_exec_prefix"
10095
10096 eval additional_includedir=\"$includedir\"
10097 eval additional_libdir=\"$libdir\"
10098
10099 exec_prefix="$acl_save_exec_prefix"
10100 prefix="$acl_save_prefix"
10101
10102 else
10103 additional_includedir="$withval/include"
10104 additional_libdir="$withval/lib"
10105 fi
10106 fi
10107
10108 fi
10109
10110
10111 # Check whether --with-libmpfr-type was given.
10112 if test "${with_libmpfr_type+set}" = set; then :
10113 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10114 else
10115 with_libmpfr_type=auto
10116 fi
10117
10118 lib_type=`eval echo \$with_libmpfr_type`
10119
10120 LIBMPFR=
10121 LTLIBMPFR=
10122 INCMPFR=
10123 rpathdirs=
10124 ltrpathdirs=
10125 names_already_handled=
10126 names_next_round='mpfr gmp'
10127 while test -n "$names_next_round"; do
10128 names_this_round="$names_next_round"
10129 names_next_round=
10130 for name in $names_this_round; do
10131 already_handled=
10132 for n in $names_already_handled; do
10133 if test "$n" = "$name"; then
10134 already_handled=yes
10135 break
10136 fi
10137 done
10138 if test -z "$already_handled"; then
10139 names_already_handled="$names_already_handled $name"
10140 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10141 eval value=\"\$HAVE_LIB$uppername\"
10142 if test -n "$value"; then
10143 if test "$value" = yes; then
10144 eval value=\"\$LIB$uppername\"
10145 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10146 eval value=\"\$LTLIB$uppername\"
10147 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10148 else
10149 :
10150 fi
10151 else
10152 found_dir=
10153 found_la=
10154 found_so=
10155 found_a=
10156 if test $use_additional = yes; then
10157 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10158 found_dir="$additional_libdir"
10159 found_so="$additional_libdir/lib$name.$shlibext"
10160 if test -f "$additional_libdir/lib$name.la"; then
10161 found_la="$additional_libdir/lib$name.la"
10162 fi
10163 elif test x$lib_type != xshared; then
10164 if test -f "$additional_libdir/lib$name.$libext"; then
10165 found_dir="$additional_libdir"
10166 found_a="$additional_libdir/lib$name.$libext"
10167 if test -f "$additional_libdir/lib$name.la"; then
10168 found_la="$additional_libdir/lib$name.la"
10169 fi
10170 fi
10171 fi
10172 fi
10173 if test "X$found_dir" = "X"; then
10174 for x in $LDFLAGS $LTLIBMPFR; do
10175
10176 acl_save_prefix="$prefix"
10177 prefix="$acl_final_prefix"
10178 acl_save_exec_prefix="$exec_prefix"
10179 exec_prefix="$acl_final_exec_prefix"
10180 eval x=\"$x\"
10181 exec_prefix="$acl_save_exec_prefix"
10182 prefix="$acl_save_prefix"
10183
10184 case "$x" in
10185 -L*)
10186 dir=`echo "X$x" | sed -e 's/^X-L//'`
10187 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10188 found_dir="$dir"
10189 found_so="$dir/lib$name.$shlibext"
10190 if test -f "$dir/lib$name.la"; then
10191 found_la="$dir/lib$name.la"
10192 fi
10193 elif test x$lib_type != xshared; then
10194 if test -f "$dir/lib$name.$libext"; then
10195 found_dir="$dir"
10196 found_a="$dir/lib$name.$libext"
10197 if test -f "$dir/lib$name.la"; then
10198 found_la="$dir/lib$name.la"
10199 fi
10200 fi
10201 fi
10202 ;;
10203 esac
10204 if test "X$found_dir" != "X"; then
10205 break
10206 fi
10207 done
10208 fi
10209 if test "X$found_dir" != "X"; then
10210 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10211 if test "X$found_so" != "X"; then
10212 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10213 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10214 else
10215 haveit=
10216 for x in $ltrpathdirs; do
10217 if test "X$x" = "X$found_dir"; then
10218 haveit=yes
10219 break
10220 fi
10221 done
10222 if test -z "$haveit"; then
10223 ltrpathdirs="$ltrpathdirs $found_dir"
10224 fi
10225 if test "$hardcode_direct" = yes; then
10226 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10227 else
10228 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10229 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10230 haveit=
10231 for x in $rpathdirs; do
10232 if test "X$x" = "X$found_dir"; then
10233 haveit=yes
10234 break
10235 fi
10236 done
10237 if test -z "$haveit"; then
10238 rpathdirs="$rpathdirs $found_dir"
10239 fi
10240 else
10241 haveit=
10242 for x in $LDFLAGS $LIBMPFR; do
10243
10244 acl_save_prefix="$prefix"
10245 prefix="$acl_final_prefix"
10246 acl_save_exec_prefix="$exec_prefix"
10247 exec_prefix="$acl_final_exec_prefix"
10248 eval x=\"$x\"
10249 exec_prefix="$acl_save_exec_prefix"
10250 prefix="$acl_save_prefix"
10251
10252 if test "X$x" = "X-L$found_dir"; then
10253 haveit=yes
10254 break
10255 fi
10256 done
10257 if test -z "$haveit"; then
10258 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10259 fi
10260 if test "$hardcode_minus_L" != no; then
10261 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10262 else
10263 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10264 fi
10265 fi
10266 fi
10267 fi
10268 else
10269 if test "X$found_a" != "X"; then
10270 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10271 else
10272 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10273 fi
10274 fi
10275 additional_includedir=
10276 case "$found_dir" in
10277 */lib | */lib/)
10278 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10279 additional_includedir="$basedir/include"
10280 ;;
10281 esac
10282 if test "X$additional_includedir" != "X"; then
10283 if test "X$additional_includedir" != "X/usr/include"; then
10284 haveit=
10285 if test "X$additional_includedir" = "X/usr/local/include"; then
10286 if test -n "$GCC"; then
10287 case $host_os in
10288 linux*) haveit=yes;;
10289 esac
10290 fi
10291 fi
10292 if test -z "$haveit"; then
10293 for x in $CPPFLAGS $INCMPFR; do
10294
10295 acl_save_prefix="$prefix"
10296 prefix="$acl_final_prefix"
10297 acl_save_exec_prefix="$exec_prefix"
10298 exec_prefix="$acl_final_exec_prefix"
10299 eval x=\"$x\"
10300 exec_prefix="$acl_save_exec_prefix"
10301 prefix="$acl_save_prefix"
10302
10303 if test "X$x" = "X-I$additional_includedir"; then
10304 haveit=yes
10305 break
10306 fi
10307 done
10308 if test -z "$haveit"; then
10309 if test -d "$additional_includedir"; then
10310 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10311 fi
10312 fi
10313 fi
10314 fi
10315 fi
10316 if test -n "$found_la"; then
10317 save_libdir="$libdir"
10318 case "$found_la" in
10319 */* | *\\*) . "$found_la" ;;
10320 *) . "./$found_la" ;;
10321 esac
10322 libdir="$save_libdir"
10323 for dep in $dependency_libs; do
10324 case "$dep" in
10325 -L*)
10326 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10327 if test "X$additional_libdir" != "X/usr/lib"; then
10328 haveit=
10329 if test "X$additional_libdir" = "X/usr/local/lib"; then
10330 if test -n "$GCC"; then
10331 case $host_os in
10332 linux*) haveit=yes;;
10333 esac
10334 fi
10335 fi
10336 if test -z "$haveit"; then
10337 haveit=
10338 for x in $LDFLAGS $LIBMPFR; do
10339
10340 acl_save_prefix="$prefix"
10341 prefix="$acl_final_prefix"
10342 acl_save_exec_prefix="$exec_prefix"
10343 exec_prefix="$acl_final_exec_prefix"
10344 eval x=\"$x\"
10345 exec_prefix="$acl_save_exec_prefix"
10346 prefix="$acl_save_prefix"
10347
10348 if test "X$x" = "X-L$additional_libdir"; then
10349 haveit=yes
10350 break
10351 fi
10352 done
10353 if test -z "$haveit"; then
10354 if test -d "$additional_libdir"; then
10355 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10356 fi
10357 fi
10358 haveit=
10359 for x in $LDFLAGS $LTLIBMPFR; do
10360
10361 acl_save_prefix="$prefix"
10362 prefix="$acl_final_prefix"
10363 acl_save_exec_prefix="$exec_prefix"
10364 exec_prefix="$acl_final_exec_prefix"
10365 eval x=\"$x\"
10366 exec_prefix="$acl_save_exec_prefix"
10367 prefix="$acl_save_prefix"
10368
10369 if test "X$x" = "X-L$additional_libdir"; then
10370 haveit=yes
10371 break
10372 fi
10373 done
10374 if test -z "$haveit"; then
10375 if test -d "$additional_libdir"; then
10376 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10377 fi
10378 fi
10379 fi
10380 fi
10381 ;;
10382 -R*)
10383 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10384 if test "$enable_rpath" != no; then
10385 haveit=
10386 for x in $rpathdirs; do
10387 if test "X$x" = "X$dir"; then
10388 haveit=yes
10389 break
10390 fi
10391 done
10392 if test -z "$haveit"; then
10393 rpathdirs="$rpathdirs $dir"
10394 fi
10395 haveit=
10396 for x in $ltrpathdirs; do
10397 if test "X$x" = "X$dir"; then
10398 haveit=yes
10399 break
10400 fi
10401 done
10402 if test -z "$haveit"; then
10403 ltrpathdirs="$ltrpathdirs $dir"
10404 fi
10405 fi
10406 ;;
10407 -l*)
10408 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10409 ;;
10410 *.la)
10411 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10412 ;;
10413 *)
10414 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10415 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10416 ;;
10417 esac
10418 done
10419 fi
10420 else
10421 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10422 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10423 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10424 else
10425 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10426 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10427 fi
10428 fi
10429 fi
10430 fi
10431 done
10432 done
10433 if test "X$rpathdirs" != "X"; then
10434 if test -n "$hardcode_libdir_separator"; then
10435 alldirs=
10436 for found_dir in $rpathdirs; do
10437 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10438 done
10439 acl_save_libdir="$libdir"
10440 libdir="$alldirs"
10441 eval flag=\"$hardcode_libdir_flag_spec\"
10442 libdir="$acl_save_libdir"
10443 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10444 else
10445 for found_dir in $rpathdirs; do
10446 acl_save_libdir="$libdir"
10447 libdir="$found_dir"
10448 eval flag=\"$hardcode_libdir_flag_spec\"
10449 libdir="$acl_save_libdir"
10450 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10451 done
10452 fi
10453 fi
10454 if test "X$ltrpathdirs" != "X"; then
10455 for found_dir in $ltrpathdirs; do
10456 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10457 done
10458 fi
10459
10460
10461 ac_save_CPPFLAGS="$CPPFLAGS"
10462
10463 for element in $INCMPFR; do
10464 haveit=
10465 for x in $CPPFLAGS; do
10466
10467 acl_save_prefix="$prefix"
10468 prefix="$acl_final_prefix"
10469 acl_save_exec_prefix="$exec_prefix"
10470 exec_prefix="$acl_final_exec_prefix"
10471 eval x=\"$x\"
10472 exec_prefix="$acl_save_exec_prefix"
10473 prefix="$acl_save_prefix"
10474
10475 if test "X$x" = "X$element"; then
10476 haveit=yes
10477 break
10478 fi
10479 done
10480 if test -z "$haveit"; then
10481 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10482 fi
10483 done
10484
10485
10486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10487 $as_echo_n "checking for libmpfr... " >&6; }
10488 if ${ac_cv_libmpfr+:} false; then :
10489 $as_echo_n "(cached) " >&6
10490 else
10491
10492 ac_save_LIBS="$LIBS"
10493 LIBS="$LIBS $LIBMPFR"
10494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10495 /* end confdefs.h. */
10496 #include <mpfr.h>
10497 int
10498 main ()
10499 {
10500 mpfr_exp_t exp; mpfr_t x;
10501 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10502 ;
10503 return 0;
10504 }
10505 _ACEOF
10506 if ac_fn_c_try_link "$LINENO"; then :
10507 ac_cv_libmpfr=yes
10508 else
10509 ac_cv_libmpfr=no
10510 fi
10511 rm -f core conftest.err conftest.$ac_objext \
10512 conftest$ac_exeext conftest.$ac_ext
10513 LIBS="$ac_save_LIBS"
10514
10515 fi
10516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10517 $as_echo "$ac_cv_libmpfr" >&6; }
10518 if test "$ac_cv_libmpfr" = yes; then
10519 HAVE_LIBMPFR=yes
10520
10521 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10522
10523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10524 $as_echo_n "checking how to link with libmpfr... " >&6; }
10525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10526 $as_echo "$LIBMPFR" >&6; }
10527 else
10528 HAVE_LIBMPFR=no
10529 CPPFLAGS="$ac_save_CPPFLAGS"
10530 LIBMPFR=
10531 LTLIBMPFR=
10532 fi
10533
10534
10535
10536
10537
10538
10539 if test "$HAVE_LIBMPFR" != yes; then
10540 if test "$with_mpfr" = yes; then
10541 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10542 else
10543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10544 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10545 fi
10546 fi
10547 fi
10548
10549 # --------------------- #
10550 # Check for libpython. #
10551 # --------------------- #
10552
10553
10554
10555
10556
10557
10558 # Check whether --with-python was given.
10559 if test "${with_python+set}" = set; then :
10560 withval=$with_python;
10561 else
10562 with_python=auto
10563 fi
10564
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10566 $as_echo_n "checking whether to use python... " >&6; }
10567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10568 $as_echo "$with_python" >&6; }
10569
10570 if test "${with_python}" = no; then
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10572 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10573 have_libpython=no
10574 else
10575 case "${with_python}" in
10576 [\\/]* | ?:[\\/]*)
10577 if test -d "${with_python}"; then
10578 # Assume the python binary is ${with_python}/bin/python.
10579 python_prog="${with_python}/bin/python"
10580 python_prefix=
10581 # If python does not exit ${with_python}/bin, then try in
10582 # ${with_python}. On Windows/MinGW, this is where the Python
10583 # executable is.
10584 if test ! -x "${python_prog}"; then
10585 python_prog="${with_python}/python"
10586 python_prefix=
10587 fi
10588 if test ! -x "${python_prog}"; then
10589 # Fall back to gdb 7.0/7.1 behaviour.
10590 python_prog=missing
10591 python_prefix=${with_python}
10592 fi
10593 elif test -x "${with_python}"; then
10594 # While we can't run python compiled for $host (unless host == build),
10595 # the user could write a script that provides the needed information,
10596 # so we support that.
10597 python_prog=${with_python}
10598 python_prefix=
10599 else
10600 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10601 fi
10602 ;;
10603 */*)
10604 # Disallow --with-python=foo/bar.
10605 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10606 ;;
10607 *)
10608 # The user has either specified auto, yes, or the name of the python
10609 # program assumed to be in $PATH.
10610 python_prefix=
10611 case "${with_python}" in
10612 yes | auto)
10613 if test "${build}" = "${host}"; then
10614 # Extract the first word of "python", so it can be a program name with args.
10615 set dummy python; ac_word=$2
10616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10617 $as_echo_n "checking for $ac_word... " >&6; }
10618 if ${ac_cv_path_python_prog_path+:} false; then :
10619 $as_echo_n "(cached) " >&6
10620 else
10621 case $python_prog_path in
10622 [\\/]* | ?:[\\/]*)
10623 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10624 ;;
10625 *)
10626 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10627 for as_dir in $PATH
10628 do
10629 IFS=$as_save_IFS
10630 test -z "$as_dir" && as_dir=.
10631 for ac_exec_ext in '' $ac_executable_extensions; do
10632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10633 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10635 break 2
10636 fi
10637 done
10638 done
10639 IFS=$as_save_IFS
10640
10641 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10642 ;;
10643 esac
10644 fi
10645 python_prog_path=$ac_cv_path_python_prog_path
10646 if test -n "$python_prog_path"; then
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10648 $as_echo "$python_prog_path" >&6; }
10649 else
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10651 $as_echo "no" >&6; }
10652 fi
10653
10654
10655 if test "${python_prog_path}" = missing; then
10656 python_prog=missing
10657 else
10658 python_prog=${python_prog_path}
10659 fi
10660 else
10661 # Not much we can do except assume the cross-compiler will find the
10662 # right files.
10663 python_prog=missing
10664 fi
10665 ;;
10666 *)
10667 # While we can't run python compiled for $host (unless host == build),
10668 # the user could write a script that provides the needed information,
10669 # so we support that.
10670 python_prog="${with_python}"
10671 # Extract the first word of "${python_prog}", so it can be a program name with args.
10672 set dummy ${python_prog}; ac_word=$2
10673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10674 $as_echo_n "checking for $ac_word... " >&6; }
10675 if ${ac_cv_path_python_prog_path+:} false; then :
10676 $as_echo_n "(cached) " >&6
10677 else
10678 case $python_prog_path in
10679 [\\/]* | ?:[\\/]*)
10680 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10681 ;;
10682 *)
10683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10684 for as_dir in $PATH
10685 do
10686 IFS=$as_save_IFS
10687 test -z "$as_dir" && as_dir=.
10688 for ac_exec_ext in '' $ac_executable_extensions; do
10689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10690 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10692 break 2
10693 fi
10694 done
10695 done
10696 IFS=$as_save_IFS
10697
10698 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10699 ;;
10700 esac
10701 fi
10702 python_prog_path=$ac_cv_path_python_prog_path
10703 if test -n "$python_prog_path"; then
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10705 $as_echo "$python_prog_path" >&6; }
10706 else
10707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10708 $as_echo "no" >&6; }
10709 fi
10710
10711
10712 if test "${python_prog_path}" = missing; then
10713 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10714 fi
10715 ;;
10716 esac
10717 esac
10718
10719 if test "${python_prog}" != missing; then
10720 # We have a python program to use, but it may be too old.
10721 # Don't flag an error for --with-python=auto (the default).
10722 have_python_config=yes
10723 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10724 if test $? != 0; then
10725 have_python_config=failed
10726 if test "${with_python}" != auto; then
10727 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10728 fi
10729 fi
10730 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10731 if test $? != 0; then
10732 have_python_config=failed
10733 if test "${with_python}" != auto; then
10734 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10735 fi
10736 fi
10737 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10738 if test $? != 0; then
10739 have_python_config=failed
10740 if test "${with_python}" != auto; then
10741 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10742 fi
10743 fi
10744 else
10745 # We do not have a python executable we can use to determine where
10746 # to find the Python headers and libs. We cannot guess the include
10747 # path from the python_prefix either, because that include path
10748 # depends on the Python version. So, there is nothing much we can
10749 # do except assume that the compiler will be able to find those files.
10750 python_includes=
10751 python_libs=
10752 have_python_config=no
10753 fi
10754
10755 # If we have python-config, only try the configuration it provides.
10756 # Otherwise fallback on the old way of trying different versions of
10757 # python in turn.
10758
10759 have_libpython=no
10760 if test "${have_python_config}" = yes; then
10761
10762
10763 new_CPPFLAGS=${python_includes}
10764 new_LIBS=${python_libs}
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10766 $as_echo_n "checking for python... " >&6; }
10767 save_CPPFLAGS=$CPPFLAGS
10768 save_LIBS=$LIBS
10769 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10770 LIBS="$new_LIBS $LIBS"
10771 found_usable_python=no
10772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10773 /* end confdefs.h. */
10774 #include "Python.h"
10775 int
10776 main ()
10777 {
10778 Py_Initialize ();
10779 ;
10780 return 0;
10781 }
10782 _ACEOF
10783 if ac_fn_c_try_link "$LINENO"; then :
10784 have_libpython=yes
10785 found_usable_python=yes
10786 PYTHON_CPPFLAGS=$new_CPPFLAGS
10787 PYTHON_LIBS=$new_LIBS
10788 fi
10789 rm -f core conftest.err conftest.$ac_objext \
10790 conftest$ac_exeext conftest.$ac_ext
10791 CPPFLAGS=$save_CPPFLAGS
10792 LIBS=$save_LIBS
10793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10794 $as_echo "${found_usable_python}" >&6; }
10795
10796 elif test "${have_python_config}" != failed; then
10797 if test "${have_libpython}" = no; then
10798
10799
10800 new_CPPFLAGS=${python_includes}
10801 new_LIBS="-lpython2.7 ${python_libs}"
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10803 $as_echo_n "checking for python... " >&6; }
10804 save_CPPFLAGS=$CPPFLAGS
10805 save_LIBS=$LIBS
10806 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10807 LIBS="$new_LIBS $LIBS"
10808 found_usable_python=no
10809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10810 /* end confdefs.h. */
10811 #include "Python.h"
10812 int
10813 main ()
10814 {
10815 Py_Initialize ();
10816 ;
10817 return 0;
10818 }
10819 _ACEOF
10820 if ac_fn_c_try_link "$LINENO"; then :
10821 have_libpython=yes
10822 found_usable_python=yes
10823 PYTHON_CPPFLAGS=$new_CPPFLAGS
10824 PYTHON_LIBS=$new_LIBS
10825 fi
10826 rm -f core conftest.err conftest.$ac_objext \
10827 conftest$ac_exeext conftest.$ac_ext
10828 CPPFLAGS=$save_CPPFLAGS
10829 LIBS=$save_LIBS
10830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10831 $as_echo "${found_usable_python}" >&6; }
10832
10833 fi
10834 if test "${have_libpython}" = no; then
10835
10836
10837 new_CPPFLAGS=${python_includes}
10838 new_LIBS="-lpython2.6 ${python_libs}"
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10840 $as_echo_n "checking for python... " >&6; }
10841 save_CPPFLAGS=$CPPFLAGS
10842 save_LIBS=$LIBS
10843 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10844 LIBS="$new_LIBS $LIBS"
10845 found_usable_python=no
10846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10847 /* end confdefs.h. */
10848 #include "Python.h"
10849 int
10850 main ()
10851 {
10852 Py_Initialize ();
10853 ;
10854 return 0;
10855 }
10856 _ACEOF
10857 if ac_fn_c_try_link "$LINENO"; then :
10858 have_libpython=yes
10859 found_usable_python=yes
10860 PYTHON_CPPFLAGS=$new_CPPFLAGS
10861 PYTHON_LIBS=$new_LIBS
10862 fi
10863 rm -f core conftest.err conftest.$ac_objext \
10864 conftest$ac_exeext conftest.$ac_ext
10865 CPPFLAGS=$save_CPPFLAGS
10866 LIBS=$save_LIBS
10867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10868 $as_echo "${found_usable_python}" >&6; }
10869
10870 fi
10871 fi
10872
10873 if test "${have_libpython}" = no; then
10874 case "${with_python}" in
10875 yes)
10876 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10877 ;;
10878 auto)
10879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10880 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10881 ;;
10882 *)
10883 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10884 ;;
10885 esac
10886 else
10887 if test -n "${python_prefix}"; then
10888
10889 cat >>confdefs.h <<_ACEOF
10890 #define WITH_PYTHON_PATH "${python_prefix}"
10891 _ACEOF
10892
10893
10894 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10895 if test "x$prefix" = xNONE; then
10896 test_prefix=/usr/local
10897 else
10898 test_prefix=$prefix
10899 fi
10900 else
10901 test_prefix=$exec_prefix
10902 fi
10903 value=0
10904 case ${python_prefix} in
10905 "${test_prefix}"|"${test_prefix}/"*|\
10906 '${exec_prefix}'|'${exec_prefix}/'*)
10907 value=1
10908 ;;
10909 esac
10910
10911 cat >>confdefs.h <<_ACEOF
10912 #define PYTHON_PATH_RELOCATABLE $value
10913 _ACEOF
10914
10915
10916 fi
10917 fi
10918 fi
10919
10920
10921 # Check whether --with-python-libdir was given.
10922 if test "${with_python_libdir+set}" = set; then :
10923 withval=$with_python_libdir;
10924 else
10925
10926 # If no python libdir is specified then select one based on
10927 # python's prefix path.
10928 if test -n "${python_prefix}"; then
10929 with_python_libdir=${python_prefix}/lib
10930 fi
10931
10932 fi
10933
10934
10935 if test "${have_libpython}" != no; then
10936
10937 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10938
10939 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10940 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10941 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10942 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10943 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10944
10945 if test -n "${with_python_libdir}"; then
10946
10947 cat >>confdefs.h <<_ACEOF
10948 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10949 _ACEOF
10950
10951
10952 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10953 if test "x$prefix" = xNONE; then
10954 test_prefix=/usr/local
10955 else
10956 test_prefix=$prefix
10957 fi
10958 else
10959 test_prefix=$exec_prefix
10960 fi
10961 value=0
10962 case ${with_python_libdir} in
10963 "${test_prefix}"|"${test_prefix}/"*|\
10964 '${exec_prefix}'|'${exec_prefix}/'*)
10965 value=1
10966 ;;
10967 esac
10968
10969 cat >>confdefs.h <<_ACEOF
10970 #define PYTHON_LIBDIR_RELOCATABLE $value
10971 _ACEOF
10972
10973
10974 fi
10975
10976 # Flags needed to compile Python code (taken from python-config --cflags).
10977 # We cannot call python-config directly because it will output whatever was
10978 # used when compiling the Python interpreter itself, including flags which
10979 # would make the python-related objects be compiled differently from the
10980 # rest of GDB (e.g., -O2 and -fPIC).
10981 if test "${GCC}" = yes; then
10982 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10983 # Python headers recommend -DNDEBUG, but it's unclear if that just
10984 # refers to building Python itself. In release mode, though, it
10985 # doesn't hurt for the Python code in gdb to follow.
10986 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10987 fi
10988
10989 if test "x${tentative_python_cflags}" != x; then
10990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10991 $as_echo_n "checking compiler flags for python code... " >&6; }
10992 for flag in ${tentative_python_cflags}; do
10993 # Check that the compiler accepts it
10994 saved_CFLAGS="$CFLAGS"
10995 CFLAGS="$CFLAGS $flag"
10996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10997 /* end confdefs.h. */
10998
10999 int
11000 main ()
11001 {
11002
11003 ;
11004 return 0;
11005 }
11006 _ACEOF
11007 if ac_fn_c_try_compile "$LINENO"; then :
11008 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11009 fi
11010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11011 CFLAGS="$saved_CFLAGS"
11012 done
11013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11014 $as_echo "${PYTHON_CFLAGS}" >&6; }
11015 fi
11016
11017 # On x64 Windows, Python's include headers, and pyconfig.h in
11018 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11019 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11020 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11021 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11022 # The issue was reported to the Python community, but still isn't
11023 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11024
11025 case "$gdb_host" in
11026 mingw64)
11027 if test "${GCC}" = yes; then
11028 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11029 fi
11030 ;;
11031 esac
11032 else
11033 # Even if Python support is not compiled in, we need to have this file
11034 # included so that the "python" command, et.al., still exists.
11035 CONFIG_OBS="$CONFIG_OBS python/python.o"
11036 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11037 fi
11038
11039 # Work around Python http://bugs.python.org/issue10112. See also
11040 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11041 # no effect. Note that the only test after this that uses Python is
11042 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11043 # run without -export-dynamic too.
11044 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11045
11046
11047
11048
11049 if test "${have_libpython}" != no; then
11050 HAVE_PYTHON_TRUE=
11051 HAVE_PYTHON_FALSE='#'
11052 else
11053 HAVE_PYTHON_TRUE='#'
11054 HAVE_PYTHON_FALSE=
11055 fi
11056
11057
11058 # -------------------- #
11059 # Check for libguile. #
11060 # -------------------- #
11061
11062
11063
11064
11065
11066
11067 # Check whether --with-guile was given.
11068 if test "${with_guile+set}" = set; then :
11069 withval=$with_guile;
11070 else
11071 with_guile=auto
11072 fi
11073
11074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11075 $as_echo_n "checking whether to use guile... " >&6; }
11076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11077 $as_echo "$with_guile" >&6; }
11078
11079 # Extract the first word of "pkg-config", so it can be a program name with args.
11080 set dummy pkg-config; ac_word=$2
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11082 $as_echo_n "checking for $ac_word... " >&6; }
11083 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11084 $as_echo_n "(cached) " >&6
11085 else
11086 case $pkg_config_prog_path in
11087 [\\/]* | ?:[\\/]*)
11088 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11089 ;;
11090 *)
11091 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11092 for as_dir in $PATH
11093 do
11094 IFS=$as_save_IFS
11095 test -z "$as_dir" && as_dir=.
11096 for ac_exec_ext in '' $ac_executable_extensions; do
11097 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11098 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11099 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11100 break 2
11101 fi
11102 done
11103 done
11104 IFS=$as_save_IFS
11105
11106 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11107 ;;
11108 esac
11109 fi
11110 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11111 if test -n "$pkg_config_prog_path"; then
11112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11113 $as_echo "$pkg_config_prog_path" >&6; }
11114 else
11115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11116 $as_echo "no" >&6; }
11117 fi
11118
11119
11120
11121 try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11122 have_libguile=no
11123 case "${with_guile}" in
11124 no)
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11126 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11127 ;;
11128 auto)
11129 if test "${pkg_config_prog_path}" = "missing"; then
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11131 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11132 else
11133
11134 pkg_config=${pkg_config_prog_path}
11135 guile_version_list=${try_guile_versions}
11136 flag_errors=no
11137
11138 found_usable_guile=checking
11139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11140 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11141 for guile_version in ${guile_version_list}; do
11142 ${pkg_config} --exists ${guile_version} 2>/dev/null
11143 if test $? != 0; then
11144 continue
11145 fi
11146 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11147 if test $? != 0; then
11148 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11149 fi
11150 new_LIBS=`${pkg_config} --libs ${guile_version}`
11151 if test $? != 0; then
11152 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11153 fi
11154 found_usable_guile=${guile_version}
11155 break
11156 done
11157 if test "${found_usable_guile}" = "checking"; then
11158 if test "${flag_errors}" = "yes"; then
11159 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11160 else
11161 found_usable_guile=no
11162 fi
11163 fi
11164 if test "${found_usable_guile}" != no; then
11165 save_CPPFLAGS=$CPPFLAGS
11166 save_LIBS=$LIBS
11167 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11168 LIBS="$LIBS $new_LIBS"
11169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11170 /* end confdefs.h. */
11171 #include "libguile.h"
11172 int
11173 main ()
11174 {
11175 scm_init_guile ();
11176 ;
11177 return 0;
11178 }
11179 _ACEOF
11180 if ac_fn_c_try_link "$LINENO"; then :
11181 have_libguile=yes
11182 GUILE_CPPFLAGS=$new_CPPFLAGS
11183 GUILE_LIBS=$new_LIBS
11184 else
11185 found_usable_guile=no
11186 fi
11187 rm -f core conftest.err conftest.$ac_objext \
11188 conftest$ac_exeext conftest.$ac_ext
11189 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11190 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11191
11192 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11193
11194
11195 fi
11196
11197 CPPFLAGS=$save_CPPFLAGS
11198 LIBS=$save_LIBS
11199 if test "${found_usable_guile}" = no; then
11200 if test "${flag_errors}" = yes; then
11201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11202 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11203 as_fn_error $? "linking guile version ${guile_version} test program failed
11204 See \`config.log' for more details" "$LINENO" 5; }
11205 fi
11206 fi
11207 fi
11208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11209 $as_echo "${found_usable_guile}" >&6; }
11210
11211 fi
11212 ;;
11213 yes)
11214 if test "${pkg_config_prog_path}" = "missing"; then
11215 as_fn_error $? "pkg-config not found" "$LINENO" 5
11216 fi
11217
11218 pkg_config=${pkg_config_prog_path}
11219 guile_version_list=${try_guile_versions}
11220 flag_errors=yes
11221
11222 found_usable_guile=checking
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11224 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11225 for guile_version in ${guile_version_list}; do
11226 ${pkg_config} --exists ${guile_version} 2>/dev/null
11227 if test $? != 0; then
11228 continue
11229 fi
11230 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11231 if test $? != 0; then
11232 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11233 fi
11234 new_LIBS=`${pkg_config} --libs ${guile_version}`
11235 if test $? != 0; then
11236 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11237 fi
11238 found_usable_guile=${guile_version}
11239 break
11240 done
11241 if test "${found_usable_guile}" = "checking"; then
11242 if test "${flag_errors}" = "yes"; then
11243 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11244 else
11245 found_usable_guile=no
11246 fi
11247 fi
11248 if test "${found_usable_guile}" != no; then
11249 save_CPPFLAGS=$CPPFLAGS
11250 save_LIBS=$LIBS
11251 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11252 LIBS="$LIBS $new_LIBS"
11253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11254 /* end confdefs.h. */
11255 #include "libguile.h"
11256 int
11257 main ()
11258 {
11259 scm_init_guile ();
11260 ;
11261 return 0;
11262 }
11263 _ACEOF
11264 if ac_fn_c_try_link "$LINENO"; then :
11265 have_libguile=yes
11266 GUILE_CPPFLAGS=$new_CPPFLAGS
11267 GUILE_LIBS=$new_LIBS
11268 else
11269 found_usable_guile=no
11270 fi
11271 rm -f core conftest.err conftest.$ac_objext \
11272 conftest$ac_exeext conftest.$ac_ext
11273 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11274 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11275
11276 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11277
11278
11279 fi
11280
11281 CPPFLAGS=$save_CPPFLAGS
11282 LIBS=$save_LIBS
11283 if test "${found_usable_guile}" = no; then
11284 if test "${flag_errors}" = yes; then
11285 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11286 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11287 as_fn_error $? "linking guile version ${guile_version} test program failed
11288 See \`config.log' for more details" "$LINENO" 5; }
11289 fi
11290 fi
11291 fi
11292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11293 $as_echo "${found_usable_guile}" >&6; }
11294
11295 ;;
11296 [\\/]* | ?:[\\/]*)
11297 if test -x "${with_guile}"; then
11298
11299 pkg_config=${with_guile}
11300 guile_version_list=${try_guile_versions}
11301 flag_errors=yes
11302
11303 found_usable_guile=checking
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11305 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11306 for guile_version in ${guile_version_list}; do
11307 ${pkg_config} --exists ${guile_version} 2>/dev/null
11308 if test $? != 0; then
11309 continue
11310 fi
11311 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11312 if test $? != 0; then
11313 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11314 fi
11315 new_LIBS=`${pkg_config} --libs ${guile_version}`
11316 if test $? != 0; then
11317 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11318 fi
11319 found_usable_guile=${guile_version}
11320 break
11321 done
11322 if test "${found_usable_guile}" = "checking"; then
11323 if test "${flag_errors}" = "yes"; then
11324 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11325 else
11326 found_usable_guile=no
11327 fi
11328 fi
11329 if test "${found_usable_guile}" != no; then
11330 save_CPPFLAGS=$CPPFLAGS
11331 save_LIBS=$LIBS
11332 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11333 LIBS="$LIBS $new_LIBS"
11334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11335 /* end confdefs.h. */
11336 #include "libguile.h"
11337 int
11338 main ()
11339 {
11340 scm_init_guile ();
11341 ;
11342 return 0;
11343 }
11344 _ACEOF
11345 if ac_fn_c_try_link "$LINENO"; then :
11346 have_libguile=yes
11347 GUILE_CPPFLAGS=$new_CPPFLAGS
11348 GUILE_LIBS=$new_LIBS
11349 else
11350 found_usable_guile=no
11351 fi
11352 rm -f core conftest.err conftest.$ac_objext \
11353 conftest$ac_exeext conftest.$ac_ext
11354 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11355 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11356
11357 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11358
11359
11360 fi
11361
11362 CPPFLAGS=$save_CPPFLAGS
11363 LIBS=$save_LIBS
11364 if test "${found_usable_guile}" = no; then
11365 if test "${flag_errors}" = yes; then
11366 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11367 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11368 as_fn_error $? "linking guile version ${guile_version} test program failed
11369 See \`config.log' for more details" "$LINENO" 5; }
11370 fi
11371 fi
11372 fi
11373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11374 $as_echo "${found_usable_guile}" >&6; }
11375
11376 else
11377 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11378 fi
11379 ;;
11380 "" | */*)
11381 # Disallow --with=guile="" and --with-guile=foo/bar.
11382 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11383 ;;
11384 *)
11385 # A space separate list of guile versions to try, in order.
11386 if test "${pkg_config_prog_path}" = "missing"; then
11387 as_fn_error $? "pkg-config not found" "$LINENO" 5
11388 fi
11389
11390 pkg_config=${pkg_config_prog_path}
11391 guile_version_list=${with_guile}
11392 flag_errors=yes
11393
11394 found_usable_guile=checking
11395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11396 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11397 for guile_version in ${guile_version_list}; do
11398 ${pkg_config} --exists ${guile_version} 2>/dev/null
11399 if test $? != 0; then
11400 continue
11401 fi
11402 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11403 if test $? != 0; then
11404 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11405 fi
11406 new_LIBS=`${pkg_config} --libs ${guile_version}`
11407 if test $? != 0; then
11408 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11409 fi
11410 found_usable_guile=${guile_version}
11411 break
11412 done
11413 if test "${found_usable_guile}" = "checking"; then
11414 if test "${flag_errors}" = "yes"; then
11415 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11416 else
11417 found_usable_guile=no
11418 fi
11419 fi
11420 if test "${found_usable_guile}" != no; then
11421 save_CPPFLAGS=$CPPFLAGS
11422 save_LIBS=$LIBS
11423 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11424 LIBS="$LIBS $new_LIBS"
11425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11426 /* end confdefs.h. */
11427 #include "libguile.h"
11428 int
11429 main ()
11430 {
11431 scm_init_guile ();
11432 ;
11433 return 0;
11434 }
11435 _ACEOF
11436 if ac_fn_c_try_link "$LINENO"; then :
11437 have_libguile=yes
11438 GUILE_CPPFLAGS=$new_CPPFLAGS
11439 GUILE_LIBS=$new_LIBS
11440 else
11441 found_usable_guile=no
11442 fi
11443 rm -f core conftest.err conftest.$ac_objext \
11444 conftest$ac_exeext conftest.$ac_ext
11445 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11446 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11447
11448 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11449
11450
11451 fi
11452
11453 CPPFLAGS=$save_CPPFLAGS
11454 LIBS=$save_LIBS
11455 if test "${found_usable_guile}" = no; then
11456 if test "${flag_errors}" = yes; then
11457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11458 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11459 as_fn_error $? "linking guile version ${guile_version} test program failed
11460 See \`config.log' for more details" "$LINENO" 5; }
11461 fi
11462 fi
11463 fi
11464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11465 $as_echo "${found_usable_guile}" >&6; }
11466
11467 ;;
11468 esac
11469
11470 if test "${have_libguile}" != no; then
11471 case "${with_guile}" in
11472 [\\/]* | ?:[\\/]*)
11473
11474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11475 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11476 if ${ac_cv_guild_program_name+:} false; then :
11477 $as_echo_n "(cached) " >&6
11478 else
11479 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11480
11481 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11482 # the 'guild' and 'bindir' variables. In that case, try to guess
11483 # what the program name is, at the risk of getting it wrong if
11484 # Guile was configured with '--program-suffix' or similar.
11485 if test "x$ac_cv_guild_program_name" = "x"; then
11486 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11487 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11488 fi
11489
11490 fi
11491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11492 $as_echo "$ac_cv_guild_program_name" >&6; }
11493
11494 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11495 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11496 fi
11497
11498 GUILD="$ac_cv_guild_program_name"
11499
11500
11501 ;;
11502 *)
11503
11504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11505 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11506 if ${ac_cv_guild_program_name+:} false; then :
11507 $as_echo_n "(cached) " >&6
11508 else
11509 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11510
11511 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11512 # the 'guild' and 'bindir' variables. In that case, try to guess
11513 # what the program name is, at the risk of getting it wrong if
11514 # Guile was configured with '--program-suffix' or similar.
11515 if test "x$ac_cv_guild_program_name" = "x"; then
11516 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11517 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11518 fi
11519
11520 fi
11521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11522 $as_echo "$ac_cv_guild_program_name" >&6; }
11523
11524 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11525 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11526 fi
11527
11528 GUILD="$ac_cv_guild_program_name"
11529
11530
11531 ;;
11532 esac
11533
11534
11535 if test "$cross_compiling" = no; then
11536 GUILD_TARGET_FLAG=
11537 else
11538 GUILD_TARGET_FLAG="--target=$host"
11539 fi
11540
11541
11542
11543
11544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11545 $as_echo_n "checking whether guild supports this host... " >&6; }
11546 if ${ac_cv_guild_ok+:} false; then :
11547 $as_echo_n "(cached) " >&6
11548 else
11549 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11550 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11551 ac_cv_guild_ok=yes
11552 else
11553 ac_cv_guild_ok=no
11554 fi
11555 fi
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11557 $as_echo "$ac_cv_guild_ok" >&6; }
11558
11559 if test "$ac_cv_guild_ok" = no; then
11560 have_libguile=no
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11562 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11563 fi
11564 fi
11565
11566 if test "${have_libguile}" != no; then
11567
11568 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11569
11570 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11571 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11572 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11573 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11574 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11575
11576 save_LIBS="$LIBS"
11577 save_CPPFLAGS="$CPPFLAGS"
11578 LIBS="$GUILE_LIBS"
11579 CPPFLAGS="$GUILE_CPPFLAGS"
11580 for ac_func in scm_new_smob
11581 do :
11582 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11583 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11584 cat >>confdefs.h <<_ACEOF
11585 #define HAVE_SCM_NEW_SMOB 1
11586 _ACEOF
11587
11588 fi
11589 done
11590
11591 LIBS="$save_LIBS"
11592 CPPFLAGS="$save_CPPFLAGS"
11593 else
11594 # Even if Guile support is not compiled in, we need to have these files
11595 # included.
11596 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11597 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11598 fi
11599
11600
11601 if test "${have_libguile}" != no; then
11602 HAVE_GUILE_TRUE=
11603 HAVE_GUILE_FALSE='#'
11604 else
11605 HAVE_GUILE_TRUE='#'
11606 HAVE_GUILE_FALSE=
11607 fi
11608
11609
11610 # ---------------------------- #
11611 # Check for source highlight. #
11612 # ---------------------------- #
11613
11614 SRCHIGH_LIBS=
11615 SRCHIGH_CFLAGS=
11616
11617 # Check whether --enable-source-highlight was given.
11618 if test "${enable_source_highlight+set}" = set; then :
11619 enableval=$enable_source_highlight; case "${enableval}" in
11620 yes) enable_source_highlight=yes ;;
11621 no) enable_source_highlight=no ;;
11622 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11623 esac
11624 else
11625 enable_source_highlight=auto
11626 fi
11627
11628
11629 if test "${enable_source_highlight}" != "no"; then
11630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11631 $as_echo_n "checking for the source-highlight library... " >&6; }
11632 if test "${pkg_config_prog_path}" = "missing"; then
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11634 $as_echo "no - pkg-config not found" >&6; }
11635 if test "${enable_source_highlight}" = "yes"; then
11636 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11637 fi
11638 else
11639 case "$LDFLAGS" in
11640 *static-libstdc*)
11641 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11642 ;;
11643 esac
11644
11645 if ${pkg_config_prog_path} --exists source-highlight; then
11646 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11647 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11648
11649 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11650
11651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11652 $as_echo "yes" >&6; }
11653 else
11654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11655 $as_echo "no" >&6; }
11656 if test "${enable_source_highlight}" = "yes"; then
11657 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11658 fi
11659 fi
11660 fi
11661 fi
11662
11663
11664
11665 # ------------------------- #
11666 # Checks for header files. #
11667 # ------------------------- #
11668
11669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11670 $as_echo_n "checking for ANSI C header files... " >&6; }
11671 if ${ac_cv_header_stdc+:} false; then :
11672 $as_echo_n "(cached) " >&6
11673 else
11674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11675 /* end confdefs.h. */
11676 #include <stdlib.h>
11677 #include <stdarg.h>
11678 #include <string.h>
11679 #include <float.h>
11680
11681 int
11682 main ()
11683 {
11684
11685 ;
11686 return 0;
11687 }
11688 _ACEOF
11689 if ac_fn_c_try_compile "$LINENO"; then :
11690 ac_cv_header_stdc=yes
11691 else
11692 ac_cv_header_stdc=no
11693 fi
11694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11695
11696 if test $ac_cv_header_stdc = yes; then
11697 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11699 /* end confdefs.h. */
11700 #include <string.h>
11701
11702 _ACEOF
11703 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11704 $EGREP "memchr" >/dev/null 2>&1; then :
11705
11706 else
11707 ac_cv_header_stdc=no
11708 fi
11709 rm -f conftest*
11710
11711 fi
11712
11713 if test $ac_cv_header_stdc = yes; then
11714 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11716 /* end confdefs.h. */
11717 #include <stdlib.h>
11718
11719 _ACEOF
11720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11721 $EGREP "free" >/dev/null 2>&1; then :
11722
11723 else
11724 ac_cv_header_stdc=no
11725 fi
11726 rm -f conftest*
11727
11728 fi
11729
11730 if test $ac_cv_header_stdc = yes; then
11731 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11732 if test "$cross_compiling" = yes; then :
11733 :
11734 else
11735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11736 /* end confdefs.h. */
11737 #include <ctype.h>
11738 #include <stdlib.h>
11739 #if ((' ' & 0x0FF) == 0x020)
11740 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11741 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11742 #else
11743 # define ISLOWER(c) \
11744 (('a' <= (c) && (c) <= 'i') \
11745 || ('j' <= (c) && (c) <= 'r') \
11746 || ('s' <= (c) && (c) <= 'z'))
11747 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11748 #endif
11749
11750 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11751 int
11752 main ()
11753 {
11754 int i;
11755 for (i = 0; i < 256; i++)
11756 if (XOR (islower (i), ISLOWER (i))
11757 || toupper (i) != TOUPPER (i))
11758 return 2;
11759 return 0;
11760 }
11761 _ACEOF
11762 if ac_fn_c_try_run "$LINENO"; then :
11763
11764 else
11765 ac_cv_header_stdc=no
11766 fi
11767 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11768 conftest.$ac_objext conftest.beam conftest.$ac_ext
11769 fi
11770
11771 fi
11772 fi
11773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11774 $as_echo "$ac_cv_header_stdc" >&6; }
11775 if test $ac_cv_header_stdc = yes; then
11776
11777 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11778
11779 fi
11780
11781 # elf_hp.h is for HP/UX 64-bit shared library support.
11782 for ac_header in nlist.h machine/reg.h \
11783 thread_db.h \
11784 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11785 sys/resource.h sys/ptrace.h ptrace.h \
11786 sys/reg.h sys/debugreg.h \
11787 termios.h elf_hp.h
11788 do :
11789 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11790 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11791 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11792 cat >>confdefs.h <<_ACEOF
11793 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11794 _ACEOF
11795
11796 fi
11797
11798 done
11799
11800 for ac_header in sys/user.h
11801 do :
11802 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11803 # include <sys/param.h>
11804 #endif
11805
11806 "
11807 if test "x$ac_cv_header_sys_user_h" = xyes; then :
11808 cat >>confdefs.h <<_ACEOF
11809 #define HAVE_SYS_USER_H 1
11810 _ACEOF
11811
11812 fi
11813
11814 done
11815
11816
11817 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11818 do :
11819 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11820 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11821 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11822 cat >>confdefs.h <<_ACEOF
11823 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11824 _ACEOF
11825
11826 fi
11827
11828 done
11829
11830 for ac_header in term.h
11831 do :
11832 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11833 # include <curses.h>
11834 #endif
11835
11836 "
11837 if test "x$ac_cv_header_term_h" = xyes; then :
11838 cat >>confdefs.h <<_ACEOF
11839 #define HAVE_TERM_H 1
11840 _ACEOF
11841
11842 fi
11843
11844 done
11845
11846
11847 # ------------------------- #
11848 # Checks for declarations. #
11849 # ------------------------- #
11850
11851
11852 # Check for presence and size of long long.
11853 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11854 if test "x$ac_cv_type_long_long" = xyes; then :
11855
11856 cat >>confdefs.h <<_ACEOF
11857 #define HAVE_LONG_LONG 1
11858 _ACEOF
11859
11860 # The cast to long int works around a bug in the HP C Compiler
11861 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11862 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11863 # This bug is HP SR number 8606223364.
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11865 $as_echo_n "checking size of long long... " >&6; }
11866 if ${ac_cv_sizeof_long_long+:} false; then :
11867 $as_echo_n "(cached) " >&6
11868 else
11869 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11870
11871 else
11872 if test "$ac_cv_type_long_long" = yes; then
11873 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11874 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11875 as_fn_error 77 "cannot compute sizeof (long long)
11876 See \`config.log' for more details" "$LINENO" 5; }
11877 else
11878 ac_cv_sizeof_long_long=0
11879 fi
11880 fi
11881
11882 fi
11883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11884 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11885
11886
11887
11888 cat >>confdefs.h <<_ACEOF
11889 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11890 _ACEOF
11891
11892
11893 fi
11894
11895
11896 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11897 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11898 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11899 ac_have_decl=1
11900 else
11901 ac_have_decl=0
11902 fi
11903
11904 cat >>confdefs.h <<_ACEOF
11905 #define HAVE_DECL_BASENAME $ac_have_decl
11906 _ACEOF
11907 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11908 if test "x$ac_cv_have_decl_ffs" = xyes; then :
11909 ac_have_decl=1
11910 else
11911 ac_have_decl=0
11912 fi
11913
11914 cat >>confdefs.h <<_ACEOF
11915 #define HAVE_DECL_FFS $ac_have_decl
11916 _ACEOF
11917 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11918 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11919 ac_have_decl=1
11920 else
11921 ac_have_decl=0
11922 fi
11923
11924 cat >>confdefs.h <<_ACEOF
11925 #define HAVE_DECL_ASPRINTF $ac_have_decl
11926 _ACEOF
11927 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11928 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11929 ac_have_decl=1
11930 else
11931 ac_have_decl=0
11932 fi
11933
11934 cat >>confdefs.h <<_ACEOF
11935 #define HAVE_DECL_VASPRINTF $ac_have_decl
11936 _ACEOF
11937 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11938 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11939 ac_have_decl=1
11940 else
11941 ac_have_decl=0
11942 fi
11943
11944 cat >>confdefs.h <<_ACEOF
11945 #define HAVE_DECL_SNPRINTF $ac_have_decl
11946 _ACEOF
11947 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11948 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11949 ac_have_decl=1
11950 else
11951 ac_have_decl=0
11952 fi
11953
11954 cat >>confdefs.h <<_ACEOF
11955 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11956 _ACEOF
11957
11958 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11959 if test "x$ac_cv_have_decl_strtol" = xyes; then :
11960 ac_have_decl=1
11961 else
11962 ac_have_decl=0
11963 fi
11964
11965 cat >>confdefs.h <<_ACEOF
11966 #define HAVE_DECL_STRTOL $ac_have_decl
11967 _ACEOF
11968 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11969 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11970 ac_have_decl=1
11971 else
11972 ac_have_decl=0
11973 fi
11974
11975 cat >>confdefs.h <<_ACEOF
11976 #define HAVE_DECL_STRTOUL $ac_have_decl
11977 _ACEOF
11978 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11979 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11980 ac_have_decl=1
11981 else
11982 ac_have_decl=0
11983 fi
11984
11985 cat >>confdefs.h <<_ACEOF
11986 #define HAVE_DECL_STRTOLL $ac_have_decl
11987 _ACEOF
11988 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11989 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11990 ac_have_decl=1
11991 else
11992 ac_have_decl=0
11993 fi
11994
11995 cat >>confdefs.h <<_ACEOF
11996 #define HAVE_DECL_STRTOULL $ac_have_decl
11997 _ACEOF
11998
11999 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12000 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12001 ac_have_decl=1
12002 else
12003 ac_have_decl=0
12004 fi
12005
12006 cat >>confdefs.h <<_ACEOF
12007 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12008 _ACEOF
12009
12010
12011
12012 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12013 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12014 ac_have_decl=1
12015 else
12016 ac_have_decl=0
12017 fi
12018
12019 cat >>confdefs.h <<_ACEOF
12020 #define HAVE_DECL_SNPRINTF $ac_have_decl
12021 _ACEOF
12022
12023
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12025 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12026 if ${am_cv_val_LC_MESSAGES+:} false; then :
12027 $as_echo_n "(cached) " >&6
12028 else
12029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12030 /* end confdefs.h. */
12031 #include <locale.h>
12032 int
12033 main ()
12034 {
12035 return LC_MESSAGES
12036 ;
12037 return 0;
12038 }
12039 _ACEOF
12040 if ac_fn_c_try_link "$LINENO"; then :
12041 am_cv_val_LC_MESSAGES=yes
12042 else
12043 am_cv_val_LC_MESSAGES=no
12044 fi
12045 rm -f core conftest.err conftest.$ac_objext \
12046 conftest$ac_exeext conftest.$ac_ext
12047 fi
12048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12049 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12050 if test $am_cv_val_LC_MESSAGES = yes; then
12051
12052 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12053
12054 fi
12055
12056
12057 # ------------------ #
12058 # Checks for types. #
12059 # ------------------ #
12060
12061 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12062 #include <sys/socket.h>
12063
12064 "
12065 if test "x$ac_cv_type_socklen_t" = xyes; then :
12066
12067 cat >>confdefs.h <<_ACEOF
12068 #define HAVE_SOCKLEN_T 1
12069 _ACEOF
12070
12071
12072 fi
12073
12074
12075 # ------------------------------------- #
12076 # Checks for compiler characteristics. #
12077 # ------------------------------------- #
12078
12079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12080 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12081 if ${ac_cv_c_const+:} false; then :
12082 $as_echo_n "(cached) " >&6
12083 else
12084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12085 /* end confdefs.h. */
12086
12087 int
12088 main ()
12089 {
12090
12091 #ifndef __cplusplus
12092 /* Ultrix mips cc rejects this sort of thing. */
12093 typedef int charset[2];
12094 const charset cs = { 0, 0 };
12095 /* SunOS 4.1.1 cc rejects this. */
12096 char const *const *pcpcc;
12097 char **ppc;
12098 /* NEC SVR4.0.2 mips cc rejects this. */
12099 struct point {int x, y;};
12100 static struct point const zero = {0,0};
12101 /* AIX XL C 1.02.0.0 rejects this.
12102 It does not let you subtract one const X* pointer from another in
12103 an arm of an if-expression whose if-part is not a constant
12104 expression */
12105 const char *g = "string";
12106 pcpcc = &g + (g ? g-g : 0);
12107 /* HPUX 7.0 cc rejects these. */
12108 ++pcpcc;
12109 ppc = (char**) pcpcc;
12110 pcpcc = (char const *const *) ppc;
12111 { /* SCO 3.2v4 cc rejects this sort of thing. */
12112 char tx;
12113 char *t = &tx;
12114 char const *s = 0 ? (char *) 0 : (char const *) 0;
12115
12116 *t++ = 0;
12117 if (s) return 0;
12118 }
12119 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12120 int x[] = {25, 17};
12121 const int *foo = &x[0];
12122 ++foo;
12123 }
12124 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12125 typedef const int *iptr;
12126 iptr p = 0;
12127 ++p;
12128 }
12129 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12130 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12131 struct s { int j; const int *ap[3]; } bx;
12132 struct s *b = &bx; b->j = 5;
12133 }
12134 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12135 const int foo = 10;
12136 if (!foo) return 0;
12137 }
12138 return !cs[0] && !zero.x;
12139 #endif
12140
12141 ;
12142 return 0;
12143 }
12144 _ACEOF
12145 if ac_fn_c_try_compile "$LINENO"; then :
12146 ac_cv_c_const=yes
12147 else
12148 ac_cv_c_const=no
12149 fi
12150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12151 fi
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12153 $as_echo "$ac_cv_c_const" >&6; }
12154 if test $ac_cv_c_const = no; then
12155
12156 $as_echo "#define const /**/" >>confdefs.h
12157
12158 fi
12159
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12161 $as_echo_n "checking for inline... " >&6; }
12162 if ${ac_cv_c_inline+:} false; then :
12163 $as_echo_n "(cached) " >&6
12164 else
12165 ac_cv_c_inline=no
12166 for ac_kw in inline __inline__ __inline; do
12167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12168 /* end confdefs.h. */
12169 #ifndef __cplusplus
12170 typedef int foo_t;
12171 static $ac_kw foo_t static_foo () {return 0; }
12172 $ac_kw foo_t foo () {return 0; }
12173 #endif
12174
12175 _ACEOF
12176 if ac_fn_c_try_compile "$LINENO"; then :
12177 ac_cv_c_inline=$ac_kw
12178 fi
12179 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12180 test "$ac_cv_c_inline" != no && break
12181 done
12182
12183 fi
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12185 $as_echo "$ac_cv_c_inline" >&6; }
12186
12187 case $ac_cv_c_inline in
12188 inline | yes) ;;
12189 *)
12190 case $ac_cv_c_inline in
12191 no) ac_val=;;
12192 *) ac_val=$ac_cv_c_inline;;
12193 esac
12194 cat >>confdefs.h <<_ACEOF
12195 #ifndef __cplusplus
12196 #define inline $ac_val
12197 #endif
12198 _ACEOF
12199 ;;
12200 esac
12201
12202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12203 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12204 if ${ac_cv_c_bigendian+:} false; then :
12205 $as_echo_n "(cached) " >&6
12206 else
12207 ac_cv_c_bigendian=unknown
12208 # See if we're dealing with a universal compiler.
12209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12210 /* end confdefs.h. */
12211 #ifndef __APPLE_CC__
12212 not a universal capable compiler
12213 #endif
12214 typedef int dummy;
12215
12216 _ACEOF
12217 if ac_fn_c_try_compile "$LINENO"; then :
12218
12219 # Check for potential -arch flags. It is not universal unless
12220 # there are at least two -arch flags with different values.
12221 ac_arch=
12222 ac_prev=
12223 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12224 if test -n "$ac_prev"; then
12225 case $ac_word in
12226 i?86 | x86_64 | ppc | ppc64)
12227 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12228 ac_arch=$ac_word
12229 else
12230 ac_cv_c_bigendian=universal
12231 break
12232 fi
12233 ;;
12234 esac
12235 ac_prev=
12236 elif test "x$ac_word" = "x-arch"; then
12237 ac_prev=arch
12238 fi
12239 done
12240 fi
12241 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12242 if test $ac_cv_c_bigendian = unknown; then
12243 # See if sys/param.h defines the BYTE_ORDER macro.
12244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12245 /* end confdefs.h. */
12246 #include <sys/types.h>
12247 #include <sys/param.h>
12248
12249 int
12250 main ()
12251 {
12252 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12253 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12254 && LITTLE_ENDIAN)
12255 bogus endian macros
12256 #endif
12257
12258 ;
12259 return 0;
12260 }
12261 _ACEOF
12262 if ac_fn_c_try_compile "$LINENO"; then :
12263 # It does; now see whether it defined to BIG_ENDIAN or not.
12264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12265 /* end confdefs.h. */
12266 #include <sys/types.h>
12267 #include <sys/param.h>
12268
12269 int
12270 main ()
12271 {
12272 #if BYTE_ORDER != BIG_ENDIAN
12273 not big endian
12274 #endif
12275
12276 ;
12277 return 0;
12278 }
12279 _ACEOF
12280 if ac_fn_c_try_compile "$LINENO"; then :
12281 ac_cv_c_bigendian=yes
12282 else
12283 ac_cv_c_bigendian=no
12284 fi
12285 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12286 fi
12287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12288 fi
12289 if test $ac_cv_c_bigendian = unknown; then
12290 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12292 /* end confdefs.h. */
12293 #include <limits.h>
12294
12295 int
12296 main ()
12297 {
12298 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12299 bogus endian macros
12300 #endif
12301
12302 ;
12303 return 0;
12304 }
12305 _ACEOF
12306 if ac_fn_c_try_compile "$LINENO"; then :
12307 # It does; now see whether it defined to _BIG_ENDIAN or not.
12308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12309 /* end confdefs.h. */
12310 #include <limits.h>
12311
12312 int
12313 main ()
12314 {
12315 #ifndef _BIG_ENDIAN
12316 not big endian
12317 #endif
12318
12319 ;
12320 return 0;
12321 }
12322 _ACEOF
12323 if ac_fn_c_try_compile "$LINENO"; then :
12324 ac_cv_c_bigendian=yes
12325 else
12326 ac_cv_c_bigendian=no
12327 fi
12328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12329 fi
12330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12331 fi
12332 if test $ac_cv_c_bigendian = unknown; then
12333 # Compile a test program.
12334 if test "$cross_compiling" = yes; then :
12335 # Try to guess by grepping values from an object file.
12336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12337 /* end confdefs.h. */
12338 short int ascii_mm[] =
12339 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12340 short int ascii_ii[] =
12341 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12342 int use_ascii (int i) {
12343 return ascii_mm[i] + ascii_ii[i];
12344 }
12345 short int ebcdic_ii[] =
12346 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12347 short int ebcdic_mm[] =
12348 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12349 int use_ebcdic (int i) {
12350 return ebcdic_mm[i] + ebcdic_ii[i];
12351 }
12352 extern int foo;
12353
12354 int
12355 main ()
12356 {
12357 return use_ascii (foo) == use_ebcdic (foo);
12358 ;
12359 return 0;
12360 }
12361 _ACEOF
12362 if ac_fn_c_try_compile "$LINENO"; then :
12363 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12364 ac_cv_c_bigendian=yes
12365 fi
12366 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12367 if test "$ac_cv_c_bigendian" = unknown; then
12368 ac_cv_c_bigendian=no
12369 else
12370 # finding both strings is unlikely to happen, but who knows?
12371 ac_cv_c_bigendian=unknown
12372 fi
12373 fi
12374 fi
12375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12376 else
12377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12378 /* end confdefs.h. */
12379 $ac_includes_default
12380 int
12381 main ()
12382 {
12383
12384 /* Are we little or big endian? From Harbison&Steele. */
12385 union
12386 {
12387 long int l;
12388 char c[sizeof (long int)];
12389 } u;
12390 u.l = 1;
12391 return u.c[sizeof (long int) - 1] == 1;
12392
12393 ;
12394 return 0;
12395 }
12396 _ACEOF
12397 if ac_fn_c_try_run "$LINENO"; then :
12398 ac_cv_c_bigendian=no
12399 else
12400 ac_cv_c_bigendian=yes
12401 fi
12402 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12403 conftest.$ac_objext conftest.beam conftest.$ac_ext
12404 fi
12405
12406 fi
12407 fi
12408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12409 $as_echo "$ac_cv_c_bigendian" >&6; }
12410 case $ac_cv_c_bigendian in #(
12411 yes)
12412 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12413 ;; #(
12414 no)
12415 ;; #(
12416 universal)
12417
12418 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12419
12420 ;; #(
12421 *)
12422 as_fn_error $? "unknown endianness
12423 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12424 esac
12425
12426
12427 # ------------------------------ #
12428 # Checks for library functions. #
12429 # ------------------------------ #
12430
12431 for ac_func in getuid getgid \
12432 pipe pread pread64 pwrite resize_term \
12433 getpgid setsid \
12434 sigaction sigsetmask socketpair \
12435 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12436 setrlimit getrlimit posix_madvise waitpid \
12437 use_default_colors
12438 do :
12439 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12440 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12441 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12442 cat >>confdefs.h <<_ACEOF
12443 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12444 _ACEOF
12445
12446 fi
12447 done
12448
12449
12450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12451 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12452 if ${am_cv_langinfo_codeset+:} false; then :
12453 $as_echo_n "(cached) " >&6
12454 else
12455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12456 /* end confdefs.h. */
12457 #include <langinfo.h>
12458 int
12459 main ()
12460 {
12461 char* cs = nl_langinfo(CODESET);
12462 ;
12463 return 0;
12464 }
12465 _ACEOF
12466 if ac_fn_c_try_link "$LINENO"; then :
12467 am_cv_langinfo_codeset=yes
12468 else
12469 am_cv_langinfo_codeset=no
12470 fi
12471 rm -f core conftest.err conftest.$ac_objext \
12472 conftest$ac_exeext conftest.$ac_ext
12473
12474 fi
12475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12476 $as_echo "$am_cv_langinfo_codeset" >&6; }
12477 if test $am_cv_langinfo_codeset = yes; then
12478
12479 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12480
12481 fi
12482
12483 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12484 if test "x$ac_cv_type_size_t" = xyes; then :
12485
12486 else
12487
12488 cat >>confdefs.h <<_ACEOF
12489 #define size_t unsigned int
12490 _ACEOF
12491
12492 fi
12493
12494
12495
12496
12497 for ac_header in $ac_header_list
12498 do :
12499 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12500 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12501 "
12502 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12503 cat >>confdefs.h <<_ACEOF
12504 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12505 _ACEOF
12506
12507 fi
12508
12509 done
12510
12511
12512
12513
12514
12515
12516
12517 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12518 if test "x$ac_cv_type_pid_t" = xyes; then :
12519
12520 else
12521
12522 cat >>confdefs.h <<_ACEOF
12523 #define pid_t int
12524 _ACEOF
12525
12526 fi
12527
12528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12529 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12530 if ${ac_cv_path_SED+:} false; then :
12531 $as_echo_n "(cached) " >&6
12532 else
12533 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12534 for ac_i in 1 2 3 4 5 6 7; do
12535 ac_script="$ac_script$as_nl$ac_script"
12536 done
12537 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12538 { ac_script=; unset ac_script;}
12539 if test -z "$SED"; then
12540 ac_path_SED_found=false
12541 # Loop through the user's path and test for each of PROGNAME-LIST
12542 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12543 for as_dir in $PATH
12544 do
12545 IFS=$as_save_IFS
12546 test -z "$as_dir" && as_dir=.
12547 for ac_prog in sed gsed; do
12548 for ac_exec_ext in '' $ac_executable_extensions; do
12549 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12550 as_fn_executable_p "$ac_path_SED" || continue
12551 # Check for GNU ac_path_SED and select it if it is found.
12552 # Check for GNU $ac_path_SED
12553 case `"$ac_path_SED" --version 2>&1` in
12554 *GNU*)
12555 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12556 *)
12557 ac_count=0
12558 $as_echo_n 0123456789 >"conftest.in"
12559 while :
12560 do
12561 cat "conftest.in" "conftest.in" >"conftest.tmp"
12562 mv "conftest.tmp" "conftest.in"
12563 cp "conftest.in" "conftest.nl"
12564 $as_echo '' >> "conftest.nl"
12565 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12566 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12567 as_fn_arith $ac_count + 1 && ac_count=$as_val
12568 if test $ac_count -gt ${ac_path_SED_max-0}; then
12569 # Best one so far, save it but keep looking for a better one
12570 ac_cv_path_SED="$ac_path_SED"
12571 ac_path_SED_max=$ac_count
12572 fi
12573 # 10*(2^10) chars as input seems more than enough
12574 test $ac_count -gt 10 && break
12575 done
12576 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12577 esac
12578
12579 $ac_path_SED_found && break 3
12580 done
12581 done
12582 done
12583 IFS=$as_save_IFS
12584 if test -z "$ac_cv_path_SED"; then
12585 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12586 fi
12587 else
12588 ac_cv_path_SED=$SED
12589 fi
12590
12591 fi
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12593 $as_echo "$ac_cv_path_SED" >&6; }
12594 SED="$ac_cv_path_SED"
12595 rm -f conftest.sed
12596
12597
12598 # Set the 'development' global.
12599 . $srcdir/../bfd/development.sh
12600
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12602 $as_echo_n "checking for ANSI C header files... " >&6; }
12603 if ${ac_cv_header_stdc+:} false; then :
12604 $as_echo_n "(cached) " >&6
12605 else
12606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12607 /* end confdefs.h. */
12608 #include <stdlib.h>
12609 #include <stdarg.h>
12610 #include <string.h>
12611 #include <float.h>
12612
12613 int
12614 main ()
12615 {
12616
12617 ;
12618 return 0;
12619 }
12620 _ACEOF
12621 if ac_fn_c_try_compile "$LINENO"; then :
12622 ac_cv_header_stdc=yes
12623 else
12624 ac_cv_header_stdc=no
12625 fi
12626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12627
12628 if test $ac_cv_header_stdc = yes; then
12629 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12631 /* end confdefs.h. */
12632 #include <string.h>
12633
12634 _ACEOF
12635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12636 $EGREP "memchr" >/dev/null 2>&1; then :
12637
12638 else
12639 ac_cv_header_stdc=no
12640 fi
12641 rm -f conftest*
12642
12643 fi
12644
12645 if test $ac_cv_header_stdc = yes; then
12646 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12648 /* end confdefs.h. */
12649 #include <stdlib.h>
12650
12651 _ACEOF
12652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12653 $EGREP "free" >/dev/null 2>&1; then :
12654
12655 else
12656 ac_cv_header_stdc=no
12657 fi
12658 rm -f conftest*
12659
12660 fi
12661
12662 if test $ac_cv_header_stdc = yes; then
12663 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12664 if test "$cross_compiling" = yes; then :
12665 :
12666 else
12667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12668 /* end confdefs.h. */
12669 #include <ctype.h>
12670 #include <stdlib.h>
12671 #if ((' ' & 0x0FF) == 0x020)
12672 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12673 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12674 #else
12675 # define ISLOWER(c) \
12676 (('a' <= (c) && (c) <= 'i') \
12677 || ('j' <= (c) && (c) <= 'r') \
12678 || ('s' <= (c) && (c) <= 'z'))
12679 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12680 #endif
12681
12682 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12683 int
12684 main ()
12685 {
12686 int i;
12687 for (i = 0; i < 256; i++)
12688 if (XOR (islower (i), ISLOWER (i))
12689 || toupper (i) != TOUPPER (i))
12690 return 2;
12691 return 0;
12692 }
12693 _ACEOF
12694 if ac_fn_c_try_run "$LINENO"; then :
12695
12696 else
12697 ac_cv_header_stdc=no
12698 fi
12699 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12700 conftest.$ac_objext conftest.beam conftest.$ac_ext
12701 fi
12702
12703 fi
12704 fi
12705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12706 $as_echo "$ac_cv_header_stdc" >&6; }
12707 if test $ac_cv_header_stdc = yes; then
12708
12709 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12710
12711 fi
12712
12713 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12714 # for constant arguments. Useless!
12715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12716 $as_echo_n "checking for working alloca.h... " >&6; }
12717 if ${ac_cv_working_alloca_h+:} false; then :
12718 $as_echo_n "(cached) " >&6
12719 else
12720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12721 /* end confdefs.h. */
12722 #include <alloca.h>
12723 int
12724 main ()
12725 {
12726 char *p = (char *) alloca (2 * sizeof (int));
12727 if (p) return 0;
12728 ;
12729 return 0;
12730 }
12731 _ACEOF
12732 if ac_fn_c_try_link "$LINENO"; then :
12733 ac_cv_working_alloca_h=yes
12734 else
12735 ac_cv_working_alloca_h=no
12736 fi
12737 rm -f core conftest.err conftest.$ac_objext \
12738 conftest$ac_exeext conftest.$ac_ext
12739 fi
12740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12741 $as_echo "$ac_cv_working_alloca_h" >&6; }
12742 if test $ac_cv_working_alloca_h = yes; then
12743
12744 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12745
12746 fi
12747
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12749 $as_echo_n "checking for alloca... " >&6; }
12750 if ${ac_cv_func_alloca_works+:} false; then :
12751 $as_echo_n "(cached) " >&6
12752 else
12753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12754 /* end confdefs.h. */
12755 #ifdef __GNUC__
12756 # define alloca __builtin_alloca
12757 #else
12758 # ifdef _MSC_VER
12759 # include <malloc.h>
12760 # define alloca _alloca
12761 # else
12762 # ifdef HAVE_ALLOCA_H
12763 # include <alloca.h>
12764 # else
12765 # ifdef _AIX
12766 #pragma alloca
12767 # else
12768 # ifndef alloca /* predefined by HP cc +Olibcalls */
12769 void *alloca (size_t);
12770 # endif
12771 # endif
12772 # endif
12773 # endif
12774 #endif
12775
12776 int
12777 main ()
12778 {
12779 char *p = (char *) alloca (1);
12780 if (p) return 0;
12781 ;
12782 return 0;
12783 }
12784 _ACEOF
12785 if ac_fn_c_try_link "$LINENO"; then :
12786 ac_cv_func_alloca_works=yes
12787 else
12788 ac_cv_func_alloca_works=no
12789 fi
12790 rm -f core conftest.err conftest.$ac_objext \
12791 conftest$ac_exeext conftest.$ac_ext
12792 fi
12793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12794 $as_echo "$ac_cv_func_alloca_works" >&6; }
12795
12796 if test $ac_cv_func_alloca_works = yes; then
12797
12798 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12799
12800 else
12801 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12802 # that cause trouble. Some versions do not even contain alloca or
12803 # contain a buggy version. If you still want to use their alloca,
12804 # use ar to extract alloca.o from them instead of compiling alloca.c.
12805
12806 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12807
12808 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12809
12810
12811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12812 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12813 if ${ac_cv_os_cray+:} false; then :
12814 $as_echo_n "(cached) " >&6
12815 else
12816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12817 /* end confdefs.h. */
12818 #if defined CRAY && ! defined CRAY2
12819 webecray
12820 #else
12821 wenotbecray
12822 #endif
12823
12824 _ACEOF
12825 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12826 $EGREP "webecray" >/dev/null 2>&1; then :
12827 ac_cv_os_cray=yes
12828 else
12829 ac_cv_os_cray=no
12830 fi
12831 rm -f conftest*
12832
12833 fi
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12835 $as_echo "$ac_cv_os_cray" >&6; }
12836 if test $ac_cv_os_cray = yes; then
12837 for ac_func in _getb67 GETB67 getb67; do
12838 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12839 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12840 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12841
12842 cat >>confdefs.h <<_ACEOF
12843 #define CRAY_STACKSEG_END $ac_func
12844 _ACEOF
12845
12846 break
12847 fi
12848
12849 done
12850 fi
12851
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12853 $as_echo_n "checking stack direction for C alloca... " >&6; }
12854 if ${ac_cv_c_stack_direction+:} false; then :
12855 $as_echo_n "(cached) " >&6
12856 else
12857 if test "$cross_compiling" = yes; then :
12858 ac_cv_c_stack_direction=0
12859 else
12860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12861 /* end confdefs.h. */
12862 $ac_includes_default
12863 int
12864 find_stack_direction (int *addr, int depth)
12865 {
12866 int dir, dummy = 0;
12867 if (! addr)
12868 addr = &dummy;
12869 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12870 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12871 return dir + dummy;
12872 }
12873
12874 int
12875 main (int argc, char **argv)
12876 {
12877 return find_stack_direction (0, argc + !argv + 20) < 0;
12878 }
12879 _ACEOF
12880 if ac_fn_c_try_run "$LINENO"; then :
12881 ac_cv_c_stack_direction=1
12882 else
12883 ac_cv_c_stack_direction=-1
12884 fi
12885 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12886 conftest.$ac_objext conftest.beam conftest.$ac_ext
12887 fi
12888
12889 fi
12890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12891 $as_echo "$ac_cv_c_stack_direction" >&6; }
12892 cat >>confdefs.h <<_ACEOF
12893 #define STACK_DIRECTION $ac_cv_c_stack_direction
12894 _ACEOF
12895
12896
12897 fi
12898
12899
12900 WIN32APILIBS=
12901 case ${host} in
12902 *mingw32*)
12903
12904 $as_echo "#define USE_WIN32API 1" >>confdefs.h
12905
12906 WIN32APILIBS="-lws2_32"
12907 ;;
12908 esac
12909
12910
12911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12912 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12913 if ${am_cv_langinfo_codeset+:} false; then :
12914 $as_echo_n "(cached) " >&6
12915 else
12916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12917 /* end confdefs.h. */
12918 #include <langinfo.h>
12919 int
12920 main ()
12921 {
12922 char* cs = nl_langinfo(CODESET);
12923 ;
12924 return 0;
12925 }
12926 _ACEOF
12927 if ac_fn_c_try_link "$LINENO"; then :
12928 am_cv_langinfo_codeset=yes
12929 else
12930 am_cv_langinfo_codeset=no
12931 fi
12932 rm -f core conftest.err conftest.$ac_objext \
12933 conftest$ac_exeext conftest.$ac_ext
12934
12935 fi
12936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12937 $as_echo "$am_cv_langinfo_codeset" >&6; }
12938 if test $am_cv_langinfo_codeset = yes; then
12939
12940 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12941
12942 fi
12943
12944
12945 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
12946 do :
12947 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12948 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12949 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12950 cat >>confdefs.h <<_ACEOF
12951 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12952 _ACEOF
12953
12954 fi
12955
12956 done
12957
12958
12959
12960 for ac_func in getpagesize
12961 do :
12962 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12963 if test "x$ac_cv_func_getpagesize" = xyes; then :
12964 cat >>confdefs.h <<_ACEOF
12965 #define HAVE_GETPAGESIZE 1
12966 _ACEOF
12967
12968 fi
12969 done
12970
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12972 $as_echo_n "checking for working mmap... " >&6; }
12973 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12974 $as_echo_n "(cached) " >&6
12975 else
12976 if test "$cross_compiling" = yes; then :
12977 ac_cv_func_mmap_fixed_mapped=no
12978 else
12979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12980 /* end confdefs.h. */
12981 $ac_includes_default
12982 /* malloc might have been renamed as rpl_malloc. */
12983 #undef malloc
12984
12985 /* Thanks to Mike Haertel and Jim Avera for this test.
12986 Here is a matrix of mmap possibilities:
12987 mmap private not fixed
12988 mmap private fixed at somewhere currently unmapped
12989 mmap private fixed at somewhere already mapped
12990 mmap shared not fixed
12991 mmap shared fixed at somewhere currently unmapped
12992 mmap shared fixed at somewhere already mapped
12993 For private mappings, we should verify that changes cannot be read()
12994 back from the file, nor mmap's back from the file at a different
12995 address. (There have been systems where private was not correctly
12996 implemented like the infamous i386 svr4.0, and systems where the
12997 VM page cache was not coherent with the file system buffer cache
12998 like early versions of FreeBSD and possibly contemporary NetBSD.)
12999 For shared mappings, we should conversely verify that changes get
13000 propagated back to all the places they're supposed to be.
13001
13002 Grep wants private fixed already mapped.
13003 The main things grep needs to know about mmap are:
13004 * does it exist and is it safe to write into the mmap'd area
13005 * how to use it (BSD variants) */
13006
13007 #include <fcntl.h>
13008 #include <sys/mman.h>
13009
13010 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13011 char *malloc ();
13012 #endif
13013
13014 /* This mess was copied from the GNU getpagesize.h. */
13015 #ifndef HAVE_GETPAGESIZE
13016 # ifdef _SC_PAGESIZE
13017 # define getpagesize() sysconf(_SC_PAGESIZE)
13018 # else /* no _SC_PAGESIZE */
13019 # ifdef HAVE_SYS_PARAM_H
13020 # include <sys/param.h>
13021 # ifdef EXEC_PAGESIZE
13022 # define getpagesize() EXEC_PAGESIZE
13023 # else /* no EXEC_PAGESIZE */
13024 # ifdef NBPG
13025 # define getpagesize() NBPG * CLSIZE
13026 # ifndef CLSIZE
13027 # define CLSIZE 1
13028 # endif /* no CLSIZE */
13029 # else /* no NBPG */
13030 # ifdef NBPC
13031 # define getpagesize() NBPC
13032 # else /* no NBPC */
13033 # ifdef PAGESIZE
13034 # define getpagesize() PAGESIZE
13035 # endif /* PAGESIZE */
13036 # endif /* no NBPC */
13037 # endif /* no NBPG */
13038 # endif /* no EXEC_PAGESIZE */
13039 # else /* no HAVE_SYS_PARAM_H */
13040 # define getpagesize() 8192 /* punt totally */
13041 # endif /* no HAVE_SYS_PARAM_H */
13042 # endif /* no _SC_PAGESIZE */
13043
13044 #endif /* no HAVE_GETPAGESIZE */
13045
13046 int
13047 main ()
13048 {
13049 char *data, *data2, *data3;
13050 const char *cdata2;
13051 int i, pagesize;
13052 int fd, fd2;
13053
13054 pagesize = getpagesize ();
13055
13056 /* First, make a file with some known garbage in it. */
13057 data = (char *) malloc (pagesize);
13058 if (!data)
13059 return 1;
13060 for (i = 0; i < pagesize; ++i)
13061 *(data + i) = rand ();
13062 umask (0);
13063 fd = creat ("conftest.mmap", 0600);
13064 if (fd < 0)
13065 return 2;
13066 if (write (fd, data, pagesize) != pagesize)
13067 return 3;
13068 close (fd);
13069
13070 /* Next, check that the tail of a page is zero-filled. File must have
13071 non-zero length, otherwise we risk SIGBUS for entire page. */
13072 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13073 if (fd2 < 0)
13074 return 4;
13075 cdata2 = "";
13076 if (write (fd2, cdata2, 1) != 1)
13077 return 5;
13078 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13079 if (data2 == MAP_FAILED)
13080 return 6;
13081 for (i = 0; i < pagesize; ++i)
13082 if (*(data2 + i))
13083 return 7;
13084 close (fd2);
13085 if (munmap (data2, pagesize))
13086 return 8;
13087
13088 /* Next, try to mmap the file at a fixed address which already has
13089 something else allocated at it. If we can, also make sure that
13090 we see the same garbage. */
13091 fd = open ("conftest.mmap", O_RDWR);
13092 if (fd < 0)
13093 return 9;
13094 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13095 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13096 return 10;
13097 for (i = 0; i < pagesize; ++i)
13098 if (*(data + i) != *(data2 + i))
13099 return 11;
13100
13101 /* Finally, make sure that changes to the mapped area do not
13102 percolate back to the file as seen by read(). (This is a bug on
13103 some variants of i386 svr4.0.) */
13104 for (i = 0; i < pagesize; ++i)
13105 *(data2 + i) = *(data2 + i) + 1;
13106 data3 = (char *) malloc (pagesize);
13107 if (!data3)
13108 return 12;
13109 if (read (fd, data3, pagesize) != pagesize)
13110 return 13;
13111 for (i = 0; i < pagesize; ++i)
13112 if (*(data + i) != *(data3 + i))
13113 return 14;
13114 close (fd);
13115 return 0;
13116 }
13117 _ACEOF
13118 if ac_fn_c_try_run "$LINENO"; then :
13119 ac_cv_func_mmap_fixed_mapped=yes
13120 else
13121 ac_cv_func_mmap_fixed_mapped=no
13122 fi
13123 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13124 conftest.$ac_objext conftest.beam conftest.$ac_ext
13125 fi
13126
13127 fi
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13129 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13130 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13131
13132 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13133
13134 fi
13135 rm -f conftest.mmap conftest.txt
13136
13137 for ac_header in vfork.h
13138 do :
13139 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13140 if test "x$ac_cv_header_vfork_h" = xyes; then :
13141 cat >>confdefs.h <<_ACEOF
13142 #define HAVE_VFORK_H 1
13143 _ACEOF
13144
13145 fi
13146
13147 done
13148
13149 for ac_func in fork vfork
13150 do :
13151 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13152 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13153 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13154 cat >>confdefs.h <<_ACEOF
13155 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13156 _ACEOF
13157
13158 fi
13159 done
13160
13161 if test "x$ac_cv_func_fork" = xyes; then
13162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13163 $as_echo_n "checking for working fork... " >&6; }
13164 if ${ac_cv_func_fork_works+:} false; then :
13165 $as_echo_n "(cached) " >&6
13166 else
13167 if test "$cross_compiling" = yes; then :
13168 ac_cv_func_fork_works=cross
13169 else
13170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13171 /* end confdefs.h. */
13172 $ac_includes_default
13173 int
13174 main ()
13175 {
13176
13177 /* By Ruediger Kuhlmann. */
13178 return fork () < 0;
13179
13180 ;
13181 return 0;
13182 }
13183 _ACEOF
13184 if ac_fn_c_try_run "$LINENO"; then :
13185 ac_cv_func_fork_works=yes
13186 else
13187 ac_cv_func_fork_works=no
13188 fi
13189 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13190 conftest.$ac_objext conftest.beam conftest.$ac_ext
13191 fi
13192
13193 fi
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13195 $as_echo "$ac_cv_func_fork_works" >&6; }
13196
13197 else
13198 ac_cv_func_fork_works=$ac_cv_func_fork
13199 fi
13200 if test "x$ac_cv_func_fork_works" = xcross; then
13201 case $host in
13202 *-*-amigaos* | *-*-msdosdjgpp*)
13203 # Override, as these systems have only a dummy fork() stub
13204 ac_cv_func_fork_works=no
13205 ;;
13206 *)
13207 ac_cv_func_fork_works=yes
13208 ;;
13209 esac
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13211 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13212 fi
13213 ac_cv_func_vfork_works=$ac_cv_func_vfork
13214 if test "x$ac_cv_func_vfork" = xyes; then
13215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13216 $as_echo_n "checking for working vfork... " >&6; }
13217 if ${ac_cv_func_vfork_works+:} false; then :
13218 $as_echo_n "(cached) " >&6
13219 else
13220 if test "$cross_compiling" = yes; then :
13221 ac_cv_func_vfork_works=cross
13222 else
13223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13224 /* end confdefs.h. */
13225 /* Thanks to Paul Eggert for this test. */
13226 $ac_includes_default
13227 #include <sys/wait.h>
13228 #ifdef HAVE_VFORK_H
13229 # include <vfork.h>
13230 #endif
13231 /* On some sparc systems, changes by the child to local and incoming
13232 argument registers are propagated back to the parent. The compiler
13233 is told about this with #include <vfork.h>, but some compilers
13234 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13235 static variable whose address is put into a register that is
13236 clobbered by the vfork. */
13237 static void
13238 #ifdef __cplusplus
13239 sparc_address_test (int arg)
13240 # else
13241 sparc_address_test (arg) int arg;
13242 #endif
13243 {
13244 static pid_t child;
13245 if (!child) {
13246 child = vfork ();
13247 if (child < 0) {
13248 perror ("vfork");
13249 _exit(2);
13250 }
13251 if (!child) {
13252 arg = getpid();
13253 write(-1, "", 0);
13254 _exit (arg);
13255 }
13256 }
13257 }
13258
13259 int
13260 main ()
13261 {
13262 pid_t parent = getpid ();
13263 pid_t child;
13264
13265 sparc_address_test (0);
13266
13267 child = vfork ();
13268
13269 if (child == 0) {
13270 /* Here is another test for sparc vfork register problems. This
13271 test uses lots of local variables, at least as many local
13272 variables as main has allocated so far including compiler
13273 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13274 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13275 reuse the register of parent for one of the local variables,
13276 since it will think that parent can't possibly be used any more
13277 in this routine. Assigning to the local variable will thus
13278 munge parent in the parent process. */
13279 pid_t
13280 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13281 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13282 /* Convince the compiler that p..p7 are live; otherwise, it might
13283 use the same hardware register for all 8 local variables. */
13284 if (p != p1 || p != p2 || p != p3 || p != p4
13285 || p != p5 || p != p6 || p != p7)
13286 _exit(1);
13287
13288 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13289 from child file descriptors. If the child closes a descriptor
13290 before it execs or exits, this munges the parent's descriptor
13291 as well. Test for this by closing stdout in the child. */
13292 _exit(close(fileno(stdout)) != 0);
13293 } else {
13294 int status;
13295 struct stat st;
13296
13297 while (wait(&status) != child)
13298 ;
13299 return (
13300 /* Was there some problem with vforking? */
13301 child < 0
13302
13303 /* Did the child fail? (This shouldn't happen.) */
13304 || status
13305
13306 /* Did the vfork/compiler bug occur? */
13307 || parent != getpid()
13308
13309 /* Did the file descriptor bug occur? */
13310 || fstat(fileno(stdout), &st) != 0
13311 );
13312 }
13313 }
13314 _ACEOF
13315 if ac_fn_c_try_run "$LINENO"; then :
13316 ac_cv_func_vfork_works=yes
13317 else
13318 ac_cv_func_vfork_works=no
13319 fi
13320 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13321 conftest.$ac_objext conftest.beam conftest.$ac_ext
13322 fi
13323
13324 fi
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13326 $as_echo "$ac_cv_func_vfork_works" >&6; }
13327
13328 fi;
13329 if test "x$ac_cv_func_fork_works" = xcross; then
13330 ac_cv_func_vfork_works=$ac_cv_func_vfork
13331 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13332 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13333 fi
13334
13335 if test "x$ac_cv_func_vfork_works" = xyes; then
13336
13337 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13338
13339 else
13340
13341 $as_echo "#define vfork fork" >>confdefs.h
13342
13343 fi
13344 if test "x$ac_cv_func_fork_works" = xyes; then
13345
13346 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13347
13348 fi
13349
13350 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13351 ptrace64 sbrk setns sigaltstack sigprocmask \
13352 setpgid setpgrp getrusage getauxval
13353 do :
13354 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13355 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13356 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13357 cat >>confdefs.h <<_ACEOF
13358 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13359 _ACEOF
13360
13361 fi
13362 done
13363
13364
13365 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13366 "
13367 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13368 ac_have_decl=1
13369 else
13370 ac_have_decl=0
13371 fi
13372
13373 cat >>confdefs.h <<_ACEOF
13374 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13375 _ACEOF
13376
13377
13378 if test "$cross_compiling" = yes; then :
13379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13380 /* end confdefs.h. */
13381 #include <sys/personality.h>
13382 int
13383 main ()
13384 {
13385
13386 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13387 # define ADDR_NO_RANDOMIZE 0x0040000
13388 # endif
13389 /* Test the flag could be set and stays set. */
13390 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13391 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13392 return 1
13393 ;
13394 return 0;
13395 }
13396 _ACEOF
13397 if ac_fn_c_try_link "$LINENO"; then :
13398 have_personality=true
13399 else
13400 have_personality=false
13401 fi
13402 rm -f core conftest.err conftest.$ac_objext \
13403 conftest$ac_exeext conftest.$ac_ext
13404 else
13405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13406 /* end confdefs.h. */
13407 #include <sys/personality.h>
13408 int
13409 main ()
13410 {
13411
13412 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13413 # define ADDR_NO_RANDOMIZE 0x0040000
13414 # endif
13415 /* Test the flag could be set and stays set. */
13416 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13417 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13418 return 1
13419 ;
13420 return 0;
13421 }
13422 _ACEOF
13423 if ac_fn_c_try_run "$LINENO"; then :
13424 have_personality=true
13425 else
13426 have_personality=false
13427 fi
13428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13429 conftest.$ac_objext conftest.beam conftest.$ac_ext
13430 fi
13431
13432 if $have_personality
13433 then
13434
13435 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
13436
13437 fi
13438
13439 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13440 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13441 ac_have_decl=1
13442 else
13443 ac_have_decl=0
13444 fi
13445
13446 cat >>confdefs.h <<_ACEOF
13447 #define HAVE_DECL_STRSTR $ac_have_decl
13448 _ACEOF
13449
13450
13451 # ----------------------- #
13452 # Checks for structures. #
13453 # ----------------------- #
13454
13455 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13456 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13457
13458 cat >>confdefs.h <<_ACEOF
13459 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13460 _ACEOF
13461
13462
13463 fi
13464 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13465 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13466
13467 cat >>confdefs.h <<_ACEOF
13468 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13469 _ACEOF
13470
13471
13472 fi
13473
13474
13475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13476 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13477 if ${ac_cv_search_kinfo_getfile+:} false; then :
13478 $as_echo_n "(cached) " >&6
13479 else
13480 ac_func_search_save_LIBS=$LIBS
13481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13482 /* end confdefs.h. */
13483
13484 /* Override any GCC internal prototype to avoid an error.
13485 Use char because int might match the return type of a GCC
13486 builtin and then its argument prototype would still apply. */
13487 #ifdef __cplusplus
13488 extern "C"
13489 #endif
13490 char kinfo_getfile ();
13491 int
13492 main ()
13493 {
13494 return kinfo_getfile ();
13495 ;
13496 return 0;
13497 }
13498 _ACEOF
13499 for ac_lib in '' util util-freebsd; do
13500 if test -z "$ac_lib"; then
13501 ac_res="none required"
13502 else
13503 ac_res=-l$ac_lib
13504 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13505 fi
13506 if ac_fn_c_try_link "$LINENO"; then :
13507 ac_cv_search_kinfo_getfile=$ac_res
13508 fi
13509 rm -f core conftest.err conftest.$ac_objext \
13510 conftest$ac_exeext
13511 if ${ac_cv_search_kinfo_getfile+:} false; then :
13512 break
13513 fi
13514 done
13515 if ${ac_cv_search_kinfo_getfile+:} false; then :
13516
13517 else
13518 ac_cv_search_kinfo_getfile=no
13519 fi
13520 rm conftest.$ac_ext
13521 LIBS=$ac_func_search_save_LIBS
13522 fi
13523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13524 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13525 ac_res=$ac_cv_search_kinfo_getfile
13526 if test "$ac_res" != no; then :
13527 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13528
13529 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
13530
13531 fi
13532
13533
13534 # Check for std::thread. This does not work on some platforms, like
13535 # mingw and DJGPP.
13536 ac_ext=cpp
13537 ac_cpp='$CXXCPP $CPPFLAGS'
13538 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13539 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13540 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13541
13542
13543
13544
13545
13546 ac_ext=c
13547 ac_cpp='$CPP $CPPFLAGS'
13548 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13549 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13550 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13551
13552 ax_pthread_ok=no
13553
13554 # We used to check for pthread.h first, but this fails if pthread.h
13555 # requires special compiler flags (e.g. on Tru64 or Sequent).
13556 # It gets checked for in the link test anyway.
13557
13558 # First of all, check if the user has set any of the PTHREAD_LIBS,
13559 # etcetera environment variables, and if threads linking works using
13560 # them:
13561 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13562 ax_pthread_save_CC="$CC"
13563 ax_pthread_save_CFLAGS="$CFLAGS"
13564 ax_pthread_save_LIBS="$LIBS"
13565 if test "x$PTHREAD_CC" != "x"; then :
13566 CC="$PTHREAD_CC"
13567 fi
13568 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13569 LIBS="$PTHREAD_LIBS $LIBS"
13570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13571 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13573 /* end confdefs.h. */
13574
13575 /* Override any GCC internal prototype to avoid an error.
13576 Use char because int might match the return type of a GCC
13577 builtin and then its argument prototype would still apply. */
13578 #ifdef __cplusplus
13579 extern "C"
13580 #endif
13581 char pthread_join ();
13582 int
13583 main ()
13584 {
13585 return pthread_join ();
13586 ;
13587 return 0;
13588 }
13589 _ACEOF
13590 if ac_fn_c_try_link "$LINENO"; then :
13591 ax_pthread_ok=yes
13592 fi
13593 rm -f core conftest.err conftest.$ac_objext \
13594 conftest$ac_exeext conftest.$ac_ext
13595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13596 $as_echo "$ax_pthread_ok" >&6; }
13597 if test "x$ax_pthread_ok" = "xno"; then
13598 PTHREAD_LIBS=""
13599 PTHREAD_CFLAGS=""
13600 fi
13601 CC="$ax_pthread_save_CC"
13602 CFLAGS="$ax_pthread_save_CFLAGS"
13603 LIBS="$ax_pthread_save_LIBS"
13604 fi
13605
13606 # We must check for the threads library under a number of different
13607 # names; the ordering is very important because some systems
13608 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13609 # libraries is broken (non-POSIX).
13610
13611 # Create a list of thread flags to try. Items starting with a "-" are
13612 # C compiler flags, and other items are library names, except for "none"
13613 # which indicates that we try without any flags at all, and "pthread-config"
13614 # which is a program returning the flags for the Pth emulation library.
13615
13616 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13617
13618 # The ordering *is* (sometimes) important. Some notes on the
13619 # individual items follow:
13620
13621 # pthreads: AIX (must check this before -lpthread)
13622 # none: in case threads are in libc; should be tried before -Kthread and
13623 # other compiler flags to prevent continual compiler warnings
13624 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13625 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13626 # (Note: HP C rejects this with "bad form for `-t' option")
13627 # -pthreads: Solaris/gcc (Note: HP C also rejects)
13628 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13629 # doesn't hurt to check since this sometimes defines pthreads and
13630 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
13631 # is present but should not be used directly; and before -mthreads,
13632 # because the compiler interprets this as "-mt" + "-hreads")
13633 # -mthreads: Mingw32/gcc, Lynx/gcc
13634 # pthread: Linux, etcetera
13635 # --thread-safe: KAI C++
13636 # pthread-config: use pthread-config program (for GNU Pth library)
13637
13638 case $host_os in
13639
13640 freebsd*)
13641
13642 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13643 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13644
13645 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13646 ;;
13647
13648 hpux*)
13649
13650 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13651 # multi-threading and also sets -lpthread."
13652
13653 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13654 ;;
13655
13656 openedition*)
13657
13658 # IBM z/OS requires a feature-test macro to be defined in order to
13659 # enable POSIX threads at all, so give the user a hint if this is
13660 # not set. (We don't define these ourselves, as they can affect
13661 # other portions of the system API in unpredictable ways.)
13662
13663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13664 /* end confdefs.h. */
13665
13666 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13667 AX_PTHREAD_ZOS_MISSING
13668 # endif
13669
13670 _ACEOF
13671 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13672 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13674 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13675 fi
13676 rm -f conftest*
13677
13678 ;;
13679
13680 solaris*)
13681
13682 # On Solaris (at least, for some versions), libc contains stubbed
13683 # (non-functional) versions of the pthreads routines, so link-based
13684 # tests will erroneously succeed. (N.B.: The stubs are missing
13685 # pthread_cleanup_push, or rather a function called by this macro,
13686 # so we could check for that, but who knows whether they'll stub
13687 # that too in a future libc.) So we'll check first for the
13688 # standard Solaris way of linking pthreads (-mt -lpthread).
13689
13690 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13691 ;;
13692 esac
13693
13694 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13695
13696 if test "x$GCC" = "xyes"; then :
13697 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13698 fi
13699
13700 # The presence of a feature test macro requesting re-entrant function
13701 # definitions is, on some systems, a strong hint that pthreads support is
13702 # correctly enabled
13703
13704 case $host_os in
13705 darwin* | hpux* | linux* | osf* | solaris*)
13706 ax_pthread_check_macro="_REENTRANT"
13707 ;;
13708
13709 aix*)
13710 ax_pthread_check_macro="_THREAD_SAFE"
13711 ;;
13712
13713 *)
13714 ax_pthread_check_macro="--"
13715 ;;
13716 esac
13717 if test "x$ax_pthread_check_macro" = "x--"; then :
13718 ax_pthread_check_cond=0
13719 else
13720 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13721 fi
13722
13723 # Are we compiling with Clang?
13724
13725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13726 $as_echo_n "checking whether $CC is Clang... " >&6; }
13727 if ${ax_cv_PTHREAD_CLANG+:} false; then :
13728 $as_echo_n "(cached) " >&6
13729 else
13730 ax_cv_PTHREAD_CLANG=no
13731 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13732 if test "x$GCC" = "xyes"; then
13733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13734 /* end confdefs.h. */
13735 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13736 # if defined(__clang__) && defined(__llvm__)
13737 AX_PTHREAD_CC_IS_CLANG
13738 # endif
13739
13740 _ACEOF
13741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13742 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13743 ax_cv_PTHREAD_CLANG=yes
13744 fi
13745 rm -f conftest*
13746
13747 fi
13748
13749 fi
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13751 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13752 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13753
13754 ax_pthread_clang_warning=no
13755
13756 # Clang needs special handling, because older versions handle the -pthread
13757 # option in a rather... idiosyncratic way
13758
13759 if test "x$ax_pthread_clang" = "xyes"; then
13760
13761 # Clang takes -pthread; it has never supported any other flag
13762
13763 # (Note 1: This will need to be revisited if a system that Clang
13764 # supports has POSIX threads in a separate library. This tends not
13765 # to be the way of modern systems, but it's conceivable.)
13766
13767 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13768 # to get POSIX threads support; the API is always present and
13769 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13770 # -pthread does define _REENTRANT, and while the Darwin headers
13771 # ignore this macro, third-party headers might not.)
13772
13773 PTHREAD_CFLAGS="-pthread"
13774 PTHREAD_LIBS=
13775
13776 ax_pthread_ok=yes
13777
13778 # However, older versions of Clang make a point of warning the user
13779 # that, in an invocation where only linking and no compilation is
13780 # taking place, the -pthread option has no effect ("argument unused
13781 # during compilation"). They expect -pthread to be passed in only
13782 # when source code is being compiled.
13783 #
13784 # Problem is, this is at odds with the way Automake and most other
13785 # C build frameworks function, which is that the same flags used in
13786 # compilation (CFLAGS) are also used in linking. Many systems
13787 # supported by AX_PTHREAD require exactly this for POSIX threads
13788 # support, and in fact it is often not straightforward to specify a
13789 # flag that is used only in the compilation phase and not in
13790 # linking. Such a scenario is extremely rare in practice.
13791 #
13792 # Even though use of the -pthread flag in linking would only print
13793 # a warning, this can be a nuisance for well-run software projects
13794 # that build with -Werror. So if the active version of Clang has
13795 # this misfeature, we search for an option to squash it.
13796
13797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13798 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13799 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13800 $as_echo_n "(cached) " >&6
13801 else
13802 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13803 # Create an alternate version of $ac_link that compiles and
13804 # links in two steps (.c -> .o, .o -> exe) instead of one
13805 # (.c -> exe), because the warning occurs only in the second
13806 # step
13807 ax_pthread_save_ac_link="$ac_link"
13808 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13809 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13810 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13811 ax_pthread_save_CFLAGS="$CFLAGS"
13812 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13813 if test "x$ax_pthread_try" = "xunknown"; then :
13814 break
13815 fi
13816 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13817 ac_link="$ax_pthread_save_ac_link"
13818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13819 /* end confdefs.h. */
13820 int main(void){return 0;}
13821 _ACEOF
13822 if ac_fn_c_try_link "$LINENO"; then :
13823 ac_link="$ax_pthread_2step_ac_link"
13824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13825 /* end confdefs.h. */
13826 int main(void){return 0;}
13827 _ACEOF
13828 if ac_fn_c_try_link "$LINENO"; then :
13829 break
13830 fi
13831 rm -f core conftest.err conftest.$ac_objext \
13832 conftest$ac_exeext conftest.$ac_ext
13833
13834 fi
13835 rm -f core conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
13837 done
13838 ac_link="$ax_pthread_save_ac_link"
13839 CFLAGS="$ax_pthread_save_CFLAGS"
13840 if test "x$ax_pthread_try" = "x"; then :
13841 ax_pthread_try=no
13842 fi
13843 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13844
13845 fi
13846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13847 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13848
13849 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13850 no | unknown) ;;
13851 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13852 esac
13853
13854 fi # $ax_pthread_clang = yes
13855
13856 if test "x$ax_pthread_ok" = "xno"; then
13857 for ax_pthread_try_flag in $ax_pthread_flags; do
13858
13859 case $ax_pthread_try_flag in
13860 none)
13861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13862 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
13863 ;;
13864
13865 -mt,pthread)
13866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13867 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13868 PTHREAD_CFLAGS="-mt"
13869 PTHREAD_LIBS="-lpthread"
13870 ;;
13871
13872 -*)
13873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13874 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13875 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13876 ;;
13877
13878 pthread-config)
13879 # Extract the first word of "pthread-config", so it can be a program name with args.
13880 set dummy pthread-config; ac_word=$2
13881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13882 $as_echo_n "checking for $ac_word... " >&6; }
13883 if ${ac_cv_prog_ax_pthread_config+:} false; then :
13884 $as_echo_n "(cached) " >&6
13885 else
13886 if test -n "$ax_pthread_config"; then
13887 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13888 else
13889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13890 for as_dir in $PATH
13891 do
13892 IFS=$as_save_IFS
13893 test -z "$as_dir" && as_dir=.
13894 for ac_exec_ext in '' $ac_executable_extensions; do
13895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13896 ac_cv_prog_ax_pthread_config="yes"
13897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13898 break 2
13899 fi
13900 done
13901 done
13902 IFS=$as_save_IFS
13903
13904 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13905 fi
13906 fi
13907 ax_pthread_config=$ac_cv_prog_ax_pthread_config
13908 if test -n "$ax_pthread_config"; then
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13910 $as_echo "$ax_pthread_config" >&6; }
13911 else
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13913 $as_echo "no" >&6; }
13914 fi
13915
13916
13917 if test "x$ax_pthread_config" = "xno"; then :
13918 continue
13919 fi
13920 PTHREAD_CFLAGS="`pthread-config --cflags`"
13921 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13922 ;;
13923
13924 *)
13925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13926 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13927 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13928 ;;
13929 esac
13930
13931 ax_pthread_save_CFLAGS="$CFLAGS"
13932 ax_pthread_save_LIBS="$LIBS"
13933 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13934 LIBS="$PTHREAD_LIBS $LIBS"
13935
13936 # Check for various functions. We must include pthread.h,
13937 # since some functions may be macros. (On the Sequent, we
13938 # need a special flag -Kthread to make this header compile.)
13939 # We check for pthread_join because it is in -lpthread on IRIX
13940 # while pthread_create is in libc. We check for pthread_attr_init
13941 # due to DEC craziness with -lpthreads. We check for
13942 # pthread_cleanup_push because it is one of the few pthread
13943 # functions on Solaris that doesn't have a non-functional libc stub.
13944 # We try pthread_create on general principles.
13945
13946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13947 /* end confdefs.h. */
13948 #include <pthread.h>
13949 # if $ax_pthread_check_cond
13950 # error "$ax_pthread_check_macro must be defined"
13951 # endif
13952 static void routine(void *a) { a = 0; }
13953 static void *start_routine(void *a) { return a; }
13954 int
13955 main ()
13956 {
13957 pthread_t th; pthread_attr_t attr;
13958 pthread_create(&th, 0, start_routine, 0);
13959 pthread_join(th, 0);
13960 pthread_attr_init(&attr);
13961 pthread_cleanup_push(routine, 0);
13962 pthread_cleanup_pop(0) /* ; */
13963 ;
13964 return 0;
13965 }
13966 _ACEOF
13967 if ac_fn_c_try_link "$LINENO"; then :
13968 ax_pthread_ok=yes
13969 fi
13970 rm -f core conftest.err conftest.$ac_objext \
13971 conftest$ac_exeext conftest.$ac_ext
13972
13973 CFLAGS="$ax_pthread_save_CFLAGS"
13974 LIBS="$ax_pthread_save_LIBS"
13975
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13977 $as_echo "$ax_pthread_ok" >&6; }
13978 if test "x$ax_pthread_ok" = "xyes"; then :
13979 break
13980 fi
13981
13982 PTHREAD_LIBS=""
13983 PTHREAD_CFLAGS=""
13984 done
13985 fi
13986
13987 # Various other checks:
13988 if test "x$ax_pthread_ok" = "xyes"; then
13989 ax_pthread_save_CFLAGS="$CFLAGS"
13990 ax_pthread_save_LIBS="$LIBS"
13991 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13992 LIBS="$PTHREAD_LIBS $LIBS"
13993
13994 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13996 $as_echo_n "checking for joinable pthread attribute... " >&6; }
13997 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13998 $as_echo_n "(cached) " >&6
13999 else
14000 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14001 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14003 /* end confdefs.h. */
14004 #include <pthread.h>
14005 int
14006 main ()
14007 {
14008 int attr = $ax_pthread_attr; return attr /* ; */
14009 ;
14010 return 0;
14011 }
14012 _ACEOF
14013 if ac_fn_c_try_link "$LINENO"; then :
14014 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14015 fi
14016 rm -f core conftest.err conftest.$ac_objext \
14017 conftest$ac_exeext conftest.$ac_ext
14018 done
14019
14020 fi
14021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14022 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14023 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14024 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14025 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14026
14027 cat >>confdefs.h <<_ACEOF
14028 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14029 _ACEOF
14030
14031 ax_pthread_joinable_attr_defined=yes
14032
14033 fi
14034
14035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14036 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14037 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14038 $as_echo_n "(cached) " >&6
14039 else
14040 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14041 case $host_os in
14042 solaris*)
14043 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14044 ;;
14045 esac
14046
14047 fi
14048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14049 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14050 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14051 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14052 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14053 ax_pthread_special_flags_added=yes
14054 fi
14055
14056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14057 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14058 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14059 $as_echo_n "(cached) " >&6
14060 else
14061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14062 /* end confdefs.h. */
14063 #include <pthread.h>
14064 int
14065 main ()
14066 {
14067 int i = PTHREAD_PRIO_INHERIT;
14068 ;
14069 return 0;
14070 }
14071 _ACEOF
14072 if ac_fn_c_try_link "$LINENO"; then :
14073 ax_cv_PTHREAD_PRIO_INHERIT=yes
14074 else
14075 ax_cv_PTHREAD_PRIO_INHERIT=no
14076 fi
14077 rm -f core conftest.err conftest.$ac_objext \
14078 conftest$ac_exeext conftest.$ac_ext
14079
14080 fi
14081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14082 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14083 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14084 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14085
14086 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14087
14088 ax_pthread_prio_inherit_defined=yes
14089
14090 fi
14091
14092 CFLAGS="$ax_pthread_save_CFLAGS"
14093 LIBS="$ax_pthread_save_LIBS"
14094
14095 # More AIX lossage: compile with *_r variant
14096 if test "x$GCC" != "xyes"; then
14097 case $host_os in
14098 aix*)
14099 case "x/$CC" in #(
14100 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14101 #handle absolute path differently from PATH based program lookup
14102 case "x$CC" in #(
14103 x/*) :
14104 if as_fn_executable_p ${CC}_r; then :
14105 PTHREAD_CC="${CC}_r"
14106 fi ;; #(
14107 *) :
14108 for ac_prog in ${CC}_r
14109 do
14110 # Extract the first word of "$ac_prog", so it can be a program name with args.
14111 set dummy $ac_prog; ac_word=$2
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14113 $as_echo_n "checking for $ac_word... " >&6; }
14114 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14115 $as_echo_n "(cached) " >&6
14116 else
14117 if test -n "$PTHREAD_CC"; then
14118 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14119 else
14120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14121 for as_dir in $PATH
14122 do
14123 IFS=$as_save_IFS
14124 test -z "$as_dir" && as_dir=.
14125 for ac_exec_ext in '' $ac_executable_extensions; do
14126 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14127 ac_cv_prog_PTHREAD_CC="$ac_prog"
14128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14129 break 2
14130 fi
14131 done
14132 done
14133 IFS=$as_save_IFS
14134
14135 fi
14136 fi
14137 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14138 if test -n "$PTHREAD_CC"; then
14139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14140 $as_echo "$PTHREAD_CC" >&6; }
14141 else
14142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14143 $as_echo "no" >&6; }
14144 fi
14145
14146
14147 test -n "$PTHREAD_CC" && break
14148 done
14149 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14150 ;;
14151 esac ;; #(
14152 *) :
14153 ;;
14154 esac
14155 ;;
14156 esac
14157 fi
14158 fi
14159
14160 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14161
14162
14163
14164
14165
14166 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14167 if test "x$ax_pthread_ok" = "xyes"; then
14168 threads=yes
14169 :
14170 else
14171 ax_pthread_ok=no
14172 threads=no
14173 fi
14174 ac_ext=cpp
14175 ac_cpp='$CXXCPP $CPPFLAGS'
14176 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14177 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14178 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14179
14180
14181 if test "$threads" = "yes"; then
14182 save_LIBS="$LIBS"
14183 LIBS="$PTHREAD_LIBS $LIBS"
14184 save_CXXFLAGS="$CXXFLAGS"
14185 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14187 $as_echo_n "checking for std::thread... " >&6; }
14188 if ${gdb_cv_cxx_std_thread+:} false; then :
14189 $as_echo_n "(cached) " >&6
14190 else
14191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14192 /* end confdefs.h. */
14193 #include <thread>
14194 void callback() { }
14195 int
14196 main ()
14197 {
14198 std::thread t(callback);
14199 ;
14200 return 0;
14201 }
14202 _ACEOF
14203 if ac_fn_cxx_try_compile "$LINENO"; then :
14204 gdb_cv_cxx_std_thread=yes
14205 else
14206 gdb_cv_cxx_std_thread=no
14207 fi
14208 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14209 fi
14210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14211 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
14212
14213 # This check must be here, while LIBS includes any necessary
14214 # threading library.
14215 for ac_func in pthread_sigmask pthread_setname_np
14216 do :
14217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14218 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14219 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14220 cat >>confdefs.h <<_ACEOF
14221 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14222 _ACEOF
14223
14224 fi
14225 done
14226
14227
14228 LIBS="$save_LIBS"
14229 CXXFLAGS="$save_CXXFLAGS"
14230 fi
14231 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14232
14233 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14234
14235 fi
14236 ac_ext=c
14237 ac_cpp='$CPP $CPPFLAGS'
14238 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14239 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14240 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14241
14242
14243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14244 $as_echo_n "checking for sigsetjmp... " >&6; }
14245 if ${gdb_cv_func_sigsetjmp+:} false; then :
14246 $as_echo_n "(cached) " >&6
14247 else
14248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14249 /* end confdefs.h. */
14250
14251 #include <setjmp.h>
14252
14253 int
14254 main ()
14255 {
14256 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14257 ;
14258 return 0;
14259 }
14260 _ACEOF
14261 if ac_fn_c_try_compile "$LINENO"; then :
14262 gdb_cv_func_sigsetjmp=yes
14263 else
14264 gdb_cv_func_sigsetjmp=no
14265 fi
14266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14267 fi
14268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14269 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14270 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14271
14272 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14273
14274 fi
14275
14276
14277 # Check whether --with-intel_pt was given.
14278 if test "${with_intel_pt+set}" = set; then :
14279 withval=$with_intel_pt;
14280 else
14281 with_intel_pt=auto
14282 fi
14283
14284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14285 $as_echo_n "checking whether to use intel pt... " >&6; }
14286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14287 $as_echo "$with_intel_pt" >&6; }
14288
14289 if test "${with_intel_pt}" = no; then
14290 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14291 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14292 HAVE_LIBIPT=no
14293 else
14294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14295 /* end confdefs.h. */
14296
14297 #include <linux/perf_event.h>
14298 #ifndef PERF_ATTR_SIZE_VER5
14299 # error
14300 #endif
14301
14302 _ACEOF
14303 if ac_fn_c_try_cpp "$LINENO"; then :
14304 perf_event=yes
14305 else
14306 perf_event=no
14307 fi
14308 rm -f conftest.err conftest.i conftest.$ac_ext
14309 if test "$perf_event" != yes; then
14310 if test "$with_intel_pt" = yes; then
14311 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14312 else
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14314 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14315 fi
14316 fi
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326 use_additional=yes
14327
14328 acl_save_prefix="$prefix"
14329 prefix="$acl_final_prefix"
14330 acl_save_exec_prefix="$exec_prefix"
14331 exec_prefix="$acl_final_exec_prefix"
14332
14333 eval additional_includedir=\"$includedir\"
14334 eval additional_libdir=\"$libdir\"
14335
14336 exec_prefix="$acl_save_exec_prefix"
14337 prefix="$acl_save_prefix"
14338
14339
14340 # Check whether --with-libipt-prefix was given.
14341 if test "${with_libipt_prefix+set}" = set; then :
14342 withval=$with_libipt_prefix;
14343 if test "X$withval" = "Xno"; then
14344 use_additional=no
14345 else
14346 if test "X$withval" = "X"; then
14347
14348 acl_save_prefix="$prefix"
14349 prefix="$acl_final_prefix"
14350 acl_save_exec_prefix="$exec_prefix"
14351 exec_prefix="$acl_final_exec_prefix"
14352
14353 eval additional_includedir=\"$includedir\"
14354 eval additional_libdir=\"$libdir\"
14355
14356 exec_prefix="$acl_save_exec_prefix"
14357 prefix="$acl_save_prefix"
14358
14359 else
14360 additional_includedir="$withval/include"
14361 additional_libdir="$withval/lib"
14362 fi
14363 fi
14364
14365 fi
14366
14367
14368 # Check whether --with-libipt-type was given.
14369 if test "${with_libipt_type+set}" = set; then :
14370 withval=$with_libipt_type; with_libipt_type=$withval
14371 else
14372 with_libipt_type=auto
14373 fi
14374
14375 lib_type=`eval echo \$with_libipt_type`
14376
14377 LIBIPT=
14378 LTLIBIPT=
14379 INCIPT=
14380 rpathdirs=
14381 ltrpathdirs=
14382 names_already_handled=
14383 names_next_round='ipt '
14384 while test -n "$names_next_round"; do
14385 names_this_round="$names_next_round"
14386 names_next_round=
14387 for name in $names_this_round; do
14388 already_handled=
14389 for n in $names_already_handled; do
14390 if test "$n" = "$name"; then
14391 already_handled=yes
14392 break
14393 fi
14394 done
14395 if test -z "$already_handled"; then
14396 names_already_handled="$names_already_handled $name"
14397 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14398 eval value=\"\$HAVE_LIB$uppername\"
14399 if test -n "$value"; then
14400 if test "$value" = yes; then
14401 eval value=\"\$LIB$uppername\"
14402 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14403 eval value=\"\$LTLIB$uppername\"
14404 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14405 else
14406 :
14407 fi
14408 else
14409 found_dir=
14410 found_la=
14411 found_so=
14412 found_a=
14413 if test $use_additional = yes; then
14414 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14415 found_dir="$additional_libdir"
14416 found_so="$additional_libdir/lib$name.$shlibext"
14417 if test -f "$additional_libdir/lib$name.la"; then
14418 found_la="$additional_libdir/lib$name.la"
14419 fi
14420 elif test x$lib_type != xshared; then
14421 if test -f "$additional_libdir/lib$name.$libext"; then
14422 found_dir="$additional_libdir"
14423 found_a="$additional_libdir/lib$name.$libext"
14424 if test -f "$additional_libdir/lib$name.la"; then
14425 found_la="$additional_libdir/lib$name.la"
14426 fi
14427 fi
14428 fi
14429 fi
14430 if test "X$found_dir" = "X"; then
14431 for x in $LDFLAGS $LTLIBIPT; do
14432
14433 acl_save_prefix="$prefix"
14434 prefix="$acl_final_prefix"
14435 acl_save_exec_prefix="$exec_prefix"
14436 exec_prefix="$acl_final_exec_prefix"
14437 eval x=\"$x\"
14438 exec_prefix="$acl_save_exec_prefix"
14439 prefix="$acl_save_prefix"
14440
14441 case "$x" in
14442 -L*)
14443 dir=`echo "X$x" | sed -e 's/^X-L//'`
14444 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14445 found_dir="$dir"
14446 found_so="$dir/lib$name.$shlibext"
14447 if test -f "$dir/lib$name.la"; then
14448 found_la="$dir/lib$name.la"
14449 fi
14450 elif test x$lib_type != xshared; then
14451 if test -f "$dir/lib$name.$libext"; then
14452 found_dir="$dir"
14453 found_a="$dir/lib$name.$libext"
14454 if test -f "$dir/lib$name.la"; then
14455 found_la="$dir/lib$name.la"
14456 fi
14457 fi
14458 fi
14459 ;;
14460 esac
14461 if test "X$found_dir" != "X"; then
14462 break
14463 fi
14464 done
14465 fi
14466 if test "X$found_dir" != "X"; then
14467 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14468 if test "X$found_so" != "X"; then
14469 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14470 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14471 else
14472 haveit=
14473 for x in $ltrpathdirs; do
14474 if test "X$x" = "X$found_dir"; then
14475 haveit=yes
14476 break
14477 fi
14478 done
14479 if test -z "$haveit"; then
14480 ltrpathdirs="$ltrpathdirs $found_dir"
14481 fi
14482 if test "$hardcode_direct" = yes; then
14483 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14484 else
14485 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14486 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14487 haveit=
14488 for x in $rpathdirs; do
14489 if test "X$x" = "X$found_dir"; then
14490 haveit=yes
14491 break
14492 fi
14493 done
14494 if test -z "$haveit"; then
14495 rpathdirs="$rpathdirs $found_dir"
14496 fi
14497 else
14498 haveit=
14499 for x in $LDFLAGS $LIBIPT; do
14500
14501 acl_save_prefix="$prefix"
14502 prefix="$acl_final_prefix"
14503 acl_save_exec_prefix="$exec_prefix"
14504 exec_prefix="$acl_final_exec_prefix"
14505 eval x=\"$x\"
14506 exec_prefix="$acl_save_exec_prefix"
14507 prefix="$acl_save_prefix"
14508
14509 if test "X$x" = "X-L$found_dir"; then
14510 haveit=yes
14511 break
14512 fi
14513 done
14514 if test -z "$haveit"; then
14515 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14516 fi
14517 if test "$hardcode_minus_L" != no; then
14518 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14519 else
14520 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14521 fi
14522 fi
14523 fi
14524 fi
14525 else
14526 if test "X$found_a" != "X"; then
14527 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14528 else
14529 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14530 fi
14531 fi
14532 additional_includedir=
14533 case "$found_dir" in
14534 */lib | */lib/)
14535 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14536 additional_includedir="$basedir/include"
14537 ;;
14538 esac
14539 if test "X$additional_includedir" != "X"; then
14540 if test "X$additional_includedir" != "X/usr/include"; then
14541 haveit=
14542 if test "X$additional_includedir" = "X/usr/local/include"; then
14543 if test -n "$GCC"; then
14544 case $host_os in
14545 linux*) haveit=yes;;
14546 esac
14547 fi
14548 fi
14549 if test -z "$haveit"; then
14550 for x in $CPPFLAGS $INCIPT; do
14551
14552 acl_save_prefix="$prefix"
14553 prefix="$acl_final_prefix"
14554 acl_save_exec_prefix="$exec_prefix"
14555 exec_prefix="$acl_final_exec_prefix"
14556 eval x=\"$x\"
14557 exec_prefix="$acl_save_exec_prefix"
14558 prefix="$acl_save_prefix"
14559
14560 if test "X$x" = "X-I$additional_includedir"; then
14561 haveit=yes
14562 break
14563 fi
14564 done
14565 if test -z "$haveit"; then
14566 if test -d "$additional_includedir"; then
14567 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14568 fi
14569 fi
14570 fi
14571 fi
14572 fi
14573 if test -n "$found_la"; then
14574 save_libdir="$libdir"
14575 case "$found_la" in
14576 */* | *\\*) . "$found_la" ;;
14577 *) . "./$found_la" ;;
14578 esac
14579 libdir="$save_libdir"
14580 for dep in $dependency_libs; do
14581 case "$dep" in
14582 -L*)
14583 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14584 if test "X$additional_libdir" != "X/usr/lib"; then
14585 haveit=
14586 if test "X$additional_libdir" = "X/usr/local/lib"; then
14587 if test -n "$GCC"; then
14588 case $host_os in
14589 linux*) haveit=yes;;
14590 esac
14591 fi
14592 fi
14593 if test -z "$haveit"; then
14594 haveit=
14595 for x in $LDFLAGS $LIBIPT; do
14596
14597 acl_save_prefix="$prefix"
14598 prefix="$acl_final_prefix"
14599 acl_save_exec_prefix="$exec_prefix"
14600 exec_prefix="$acl_final_exec_prefix"
14601 eval x=\"$x\"
14602 exec_prefix="$acl_save_exec_prefix"
14603 prefix="$acl_save_prefix"
14604
14605 if test "X$x" = "X-L$additional_libdir"; then
14606 haveit=yes
14607 break
14608 fi
14609 done
14610 if test -z "$haveit"; then
14611 if test -d "$additional_libdir"; then
14612 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14613 fi
14614 fi
14615 haveit=
14616 for x in $LDFLAGS $LTLIBIPT; do
14617
14618 acl_save_prefix="$prefix"
14619 prefix="$acl_final_prefix"
14620 acl_save_exec_prefix="$exec_prefix"
14621 exec_prefix="$acl_final_exec_prefix"
14622 eval x=\"$x\"
14623 exec_prefix="$acl_save_exec_prefix"
14624 prefix="$acl_save_prefix"
14625
14626 if test "X$x" = "X-L$additional_libdir"; then
14627 haveit=yes
14628 break
14629 fi
14630 done
14631 if test -z "$haveit"; then
14632 if test -d "$additional_libdir"; then
14633 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14634 fi
14635 fi
14636 fi
14637 fi
14638 ;;
14639 -R*)
14640 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14641 if test "$enable_rpath" != no; then
14642 haveit=
14643 for x in $rpathdirs; do
14644 if test "X$x" = "X$dir"; then
14645 haveit=yes
14646 break
14647 fi
14648 done
14649 if test -z "$haveit"; then
14650 rpathdirs="$rpathdirs $dir"
14651 fi
14652 haveit=
14653 for x in $ltrpathdirs; do
14654 if test "X$x" = "X$dir"; then
14655 haveit=yes
14656 break
14657 fi
14658 done
14659 if test -z "$haveit"; then
14660 ltrpathdirs="$ltrpathdirs $dir"
14661 fi
14662 fi
14663 ;;
14664 -l*)
14665 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14666 ;;
14667 *.la)
14668 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14669 ;;
14670 *)
14671 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14672 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14673 ;;
14674 esac
14675 done
14676 fi
14677 else
14678 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14679 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14680 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14681 else
14682 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14683 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14684 fi
14685 fi
14686 fi
14687 fi
14688 done
14689 done
14690 if test "X$rpathdirs" != "X"; then
14691 if test -n "$hardcode_libdir_separator"; then
14692 alldirs=
14693 for found_dir in $rpathdirs; do
14694 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14695 done
14696 acl_save_libdir="$libdir"
14697 libdir="$alldirs"
14698 eval flag=\"$hardcode_libdir_flag_spec\"
14699 libdir="$acl_save_libdir"
14700 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14701 else
14702 for found_dir in $rpathdirs; do
14703 acl_save_libdir="$libdir"
14704 libdir="$found_dir"
14705 eval flag=\"$hardcode_libdir_flag_spec\"
14706 libdir="$acl_save_libdir"
14707 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14708 done
14709 fi
14710 fi
14711 if test "X$ltrpathdirs" != "X"; then
14712 for found_dir in $ltrpathdirs; do
14713 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14714 done
14715 fi
14716
14717
14718 ac_save_CPPFLAGS="$CPPFLAGS"
14719
14720 for element in $INCIPT; do
14721 haveit=
14722 for x in $CPPFLAGS; do
14723
14724 acl_save_prefix="$prefix"
14725 prefix="$acl_final_prefix"
14726 acl_save_exec_prefix="$exec_prefix"
14727 exec_prefix="$acl_final_exec_prefix"
14728 eval x=\"$x\"
14729 exec_prefix="$acl_save_exec_prefix"
14730 prefix="$acl_save_prefix"
14731
14732 if test "X$x" = "X$element"; then
14733 haveit=yes
14734 break
14735 fi
14736 done
14737 if test -z "$haveit"; then
14738 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14739 fi
14740 done
14741
14742
14743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14744 $as_echo_n "checking for libipt... " >&6; }
14745 if ${ac_cv_libipt+:} false; then :
14746 $as_echo_n "(cached) " >&6
14747 else
14748
14749 ac_save_LIBS="$LIBS"
14750 LIBS="$LIBS $LIBIPT"
14751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14752 /* end confdefs.h. */
14753 #include "intel-pt.h"
14754 int
14755 main ()
14756 {
14757 pt_insn_alloc_decoder (0);
14758 ;
14759 return 0;
14760 }
14761 _ACEOF
14762 if ac_fn_c_try_link "$LINENO"; then :
14763 ac_cv_libipt=yes
14764 else
14765 ac_cv_libipt=no
14766 fi
14767 rm -f core conftest.err conftest.$ac_objext \
14768 conftest$ac_exeext conftest.$ac_ext
14769 LIBS="$ac_save_LIBS"
14770
14771 fi
14772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14773 $as_echo "$ac_cv_libipt" >&6; }
14774 if test "$ac_cv_libipt" = yes; then
14775 HAVE_LIBIPT=yes
14776
14777 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14778
14779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14780 $as_echo_n "checking how to link with libipt... " >&6; }
14781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14782 $as_echo "$LIBIPT" >&6; }
14783 else
14784 HAVE_LIBIPT=no
14785 CPPFLAGS="$ac_save_CPPFLAGS"
14786 LIBIPT=
14787 LTLIBIPT=
14788 fi
14789
14790
14791
14792
14793
14794
14795 if test "$HAVE_LIBIPT" != yes; then
14796 if test "$with_intel_pt" = yes; then
14797 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14798 else
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14800 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14801 fi
14802 else
14803 save_LIBS=$LIBS
14804 LIBS="$LIBS $LIBIPT"
14805 for ac_func in pt_insn_event
14806 do :
14807 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14808 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
14809 cat >>confdefs.h <<_ACEOF
14810 #define HAVE_PT_INSN_EVENT 1
14811 _ACEOF
14812
14813 fi
14814 done
14815
14816 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14817 "
14818 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
14819
14820 cat >>confdefs.h <<_ACEOF
14821 #define HAVE_STRUCT_PT_INSN_ENABLED 1
14822 _ACEOF
14823
14824
14825 fi
14826 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14827 "
14828 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14829
14830 cat >>confdefs.h <<_ACEOF
14831 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
14832 _ACEOF
14833
14834
14835 fi
14836
14837 LIBS=$save_LIBS
14838 fi
14839 fi
14840
14841 if test "$ac_cv_header_sys_procfs_h" = yes; then
14842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14843 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14844 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14845 $as_echo_n "(cached) " >&6
14846 else
14847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14848 /* end confdefs.h. */
14849
14850 #define _SYSCALL32
14851 /* Needed for new procfs interface on sparc-solaris. */
14852 #define _STRUCTURED_PROC 1
14853 #include <sys/procfs.h>
14854 int
14855 main ()
14856 {
14857 gregset_t avar
14858 ;
14859 return 0;
14860 }
14861 _ACEOF
14862 if ac_fn_c_try_compile "$LINENO"; then :
14863 bfd_cv_have_sys_procfs_type_gregset_t=yes
14864 else
14865 bfd_cv_have_sys_procfs_type_gregset_t=no
14866
14867 fi
14868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14869 fi
14870
14871 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14872
14873 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14874
14875 fi
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14877 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14878
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14880 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14881 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14882 $as_echo_n "(cached) " >&6
14883 else
14884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14885 /* end confdefs.h. */
14886
14887 #define _SYSCALL32
14888 /* Needed for new procfs interface on sparc-solaris. */
14889 #define _STRUCTURED_PROC 1
14890 #include <sys/procfs.h>
14891 int
14892 main ()
14893 {
14894 fpregset_t avar
14895 ;
14896 return 0;
14897 }
14898 _ACEOF
14899 if ac_fn_c_try_compile "$LINENO"; then :
14900 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14901 else
14902 bfd_cv_have_sys_procfs_type_fpregset_t=no
14903
14904 fi
14905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14906 fi
14907
14908 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14909
14910 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14911
14912 fi
14913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14914 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14915
14916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14917 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14918 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14919 $as_echo_n "(cached) " >&6
14920 else
14921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14922 /* end confdefs.h. */
14923
14924 #define _SYSCALL32
14925 /* Needed for new procfs interface on sparc-solaris. */
14926 #define _STRUCTURED_PROC 1
14927 #include <sys/procfs.h>
14928 int
14929 main ()
14930 {
14931 prgregset_t avar
14932 ;
14933 return 0;
14934 }
14935 _ACEOF
14936 if ac_fn_c_try_compile "$LINENO"; then :
14937 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14938 else
14939 bfd_cv_have_sys_procfs_type_prgregset_t=no
14940
14941 fi
14942 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14943 fi
14944
14945 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14946
14947 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14948
14949 fi
14950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14951 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14952
14953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14954 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14955 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14956 $as_echo_n "(cached) " >&6
14957 else
14958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14959 /* end confdefs.h. */
14960
14961 #define _SYSCALL32
14962 /* Needed for new procfs interface on sparc-solaris. */
14963 #define _STRUCTURED_PROC 1
14964 #include <sys/procfs.h>
14965 int
14966 main ()
14967 {
14968 prfpregset_t avar
14969 ;
14970 return 0;
14971 }
14972 _ACEOF
14973 if ac_fn_c_try_compile "$LINENO"; then :
14974 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14975 else
14976 bfd_cv_have_sys_procfs_type_prfpregset_t=no
14977
14978 fi
14979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14980 fi
14981
14982 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14983
14984 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14985
14986 fi
14987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14988 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14989
14990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14991 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14992 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14993 $as_echo_n "(cached) " >&6
14994 else
14995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14996 /* end confdefs.h. */
14997
14998 #define _SYSCALL32
14999 /* Needed for new procfs interface on sparc-solaris. */
15000 #define _STRUCTURED_PROC 1
15001 #include <sys/procfs.h>
15002 int
15003 main ()
15004 {
15005 prgregset32_t avar
15006 ;
15007 return 0;
15008 }
15009 _ACEOF
15010 if ac_fn_c_try_compile "$LINENO"; then :
15011 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15012 else
15013 bfd_cv_have_sys_procfs_type_prgregset32_t=no
15014
15015 fi
15016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15017 fi
15018
15019 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15020
15021 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15022
15023 fi
15024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15025 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15026
15027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15028 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15029 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15030 $as_echo_n "(cached) " >&6
15031 else
15032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15033 /* end confdefs.h. */
15034
15035 #define _SYSCALL32
15036 /* Needed for new procfs interface on sparc-solaris. */
15037 #define _STRUCTURED_PROC 1
15038 #include <sys/procfs.h>
15039 int
15040 main ()
15041 {
15042 lwpid_t avar
15043 ;
15044 return 0;
15045 }
15046 _ACEOF
15047 if ac_fn_c_try_compile "$LINENO"; then :
15048 bfd_cv_have_sys_procfs_type_lwpid_t=yes
15049 else
15050 bfd_cv_have_sys_procfs_type_lwpid_t=no
15051
15052 fi
15053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15054 fi
15055
15056 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15057
15058 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15059
15060 fi
15061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15062 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15063
15064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15065 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15066 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15067 $as_echo_n "(cached) " >&6
15068 else
15069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15070 /* end confdefs.h. */
15071
15072 #define _SYSCALL32
15073 /* Needed for new procfs interface on sparc-solaris. */
15074 #define _STRUCTURED_PROC 1
15075 #include <sys/procfs.h>
15076 int
15077 main ()
15078 {
15079 psaddr_t avar
15080 ;
15081 return 0;
15082 }
15083 _ACEOF
15084 if ac_fn_c_try_compile "$LINENO"; then :
15085 bfd_cv_have_sys_procfs_type_psaddr_t=yes
15086 else
15087 bfd_cv_have_sys_procfs_type_psaddr_t=no
15088
15089 fi
15090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15091 fi
15092
15093 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15094
15095 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15096
15097 fi
15098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15099 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15100
15101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15102 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15103 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15104 $as_echo_n "(cached) " >&6
15105 else
15106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15107 /* end confdefs.h. */
15108
15109 #define _SYSCALL32
15110 /* Needed for new procfs interface on sparc-solaris. */
15111 #define _STRUCTURED_PROC 1
15112 #include <sys/procfs.h>
15113 int
15114 main ()
15115 {
15116 elf_fpregset_t avar
15117 ;
15118 return 0;
15119 }
15120 _ACEOF
15121 if ac_fn_c_try_compile "$LINENO"; then :
15122 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15123 else
15124 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15125
15126 fi
15127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15128 fi
15129
15130 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15131
15132 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15133
15134 fi
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15136 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15137
15138 fi
15139
15140
15141 # Check the return and argument types of ptrace.
15142
15143
15144 for ac_header in sys/ptrace.h ptrace.h
15145 do :
15146 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15147 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15148 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15149 cat >>confdefs.h <<_ACEOF
15150 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15151 _ACEOF
15152
15153 fi
15154
15155 done
15156
15157
15158 gdb_ptrace_headers='
15159 #include <sys/types.h>
15160 #if HAVE_SYS_PTRACE_H
15161 # include <sys/ptrace.h>
15162 #endif
15163 #if HAVE_UNISTD_H
15164 # include <unistd.h>
15165 #endif
15166 '
15167
15168 # Check return type. Varargs (used on GNU/Linux) conflict with the
15169 # empty argument list, so check for that explicitly.
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15171 $as_echo_n "checking return type of ptrace... " >&6; }
15172 if ${gdb_cv_func_ptrace_ret+:} false; then :
15173 $as_echo_n "(cached) " >&6
15174 else
15175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15176 /* end confdefs.h. */
15177 $gdb_ptrace_headers
15178 int
15179 main ()
15180 {
15181 extern long ptrace (enum __ptrace_request, ...);
15182 ;
15183 return 0;
15184 }
15185 _ACEOF
15186 if ac_fn_c_try_compile "$LINENO"; then :
15187 gdb_cv_func_ptrace_ret='long'
15188 else
15189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15190 /* end confdefs.h. */
15191 $gdb_ptrace_headers
15192 int
15193 main ()
15194 {
15195 extern int ptrace ();
15196 ;
15197 return 0;
15198 }
15199 _ACEOF
15200 if ac_fn_c_try_compile "$LINENO"; then :
15201 gdb_cv_func_ptrace_ret='int'
15202 else
15203 gdb_cv_func_ptrace_ret='long'
15204 fi
15205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15206 fi
15207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15208 fi
15209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15210 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15211
15212 cat >>confdefs.h <<_ACEOF
15213 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15214 _ACEOF
15215
15216 # Check argument types.
15217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15218 $as_echo_n "checking types of arguments for ptrace... " >&6; }
15219 if ${gdb_cv_func_ptrace_args+:} false; then :
15220 $as_echo_n "(cached) " >&6
15221 else
15222
15223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15224 /* end confdefs.h. */
15225 $gdb_ptrace_headers
15226 int
15227 main ()
15228 {
15229 extern long ptrace (enum __ptrace_request, ...);
15230 ;
15231 return 0;
15232 }
15233 _ACEOF
15234 if ac_fn_c_try_compile "$LINENO"; then :
15235 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15236 else
15237
15238 for gdb_arg1 in 'int' 'long'; do
15239 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15240 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15241 for gdb_arg4 in 'int' 'long' 'void *'; do
15242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15243 /* end confdefs.h. */
15244 $gdb_ptrace_headers
15245 int
15246 main ()
15247 {
15248
15249 extern $gdb_cv_func_ptrace_ret
15250 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15251
15252 ;
15253 return 0;
15254 }
15255 _ACEOF
15256 if ac_fn_c_try_compile "$LINENO"; then :
15257 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15258 break 4;
15259 fi
15260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15261 for gdb_arg5 in 'int *' 'int' 'long'; do
15262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15263 /* end confdefs.h. */
15264 $gdb_ptrace_headers
15265 int
15266 main ()
15267 {
15268
15269 extern $gdb_cv_func_ptrace_ret
15270 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15271
15272 ;
15273 return 0;
15274 }
15275 _ACEOF
15276 if ac_fn_c_try_compile "$LINENO"; then :
15277
15278 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15279 break 5;
15280 fi
15281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15282 done
15283 done
15284 done
15285 done
15286 done
15287 # Provide a safe default value.
15288 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15289
15290 fi
15291 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15292 fi
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15294 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15295 ac_save_IFS=$IFS; IFS=','
15296 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15297 IFS=$ac_save_IFS
15298 shift
15299
15300 cat >>confdefs.h <<_ACEOF
15301 #define PTRACE_TYPE_ARG1 $1
15302 _ACEOF
15303
15304
15305 cat >>confdefs.h <<_ACEOF
15306 #define PTRACE_TYPE_ARG3 $3
15307 _ACEOF
15308
15309
15310 cat >>confdefs.h <<_ACEOF
15311 #define PTRACE_TYPE_ARG4 $4
15312 _ACEOF
15313
15314 if test -n "$5"; then
15315
15316 cat >>confdefs.h <<_ACEOF
15317 #define PTRACE_TYPE_ARG5 $5
15318 _ACEOF
15319
15320 fi
15321
15322
15323 if test "$cross_compiling" = no; then
15324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15325 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15326 if ${ac_cv_func_setpgrp_void+:} false; then :
15327 $as_echo_n "(cached) " >&6
15328 else
15329 if test "$cross_compiling" = yes; then :
15330 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15331 else
15332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15333 /* end confdefs.h. */
15334 $ac_includes_default
15335 int
15336 main ()
15337 {
15338 /* If this system has a BSD-style setpgrp which takes arguments,
15339 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15340 exit successfully. */
15341 return setpgrp (1,1) != -1;
15342 ;
15343 return 0;
15344 }
15345 _ACEOF
15346 if ac_fn_c_try_run "$LINENO"; then :
15347 ac_cv_func_setpgrp_void=no
15348 else
15349 ac_cv_func_setpgrp_void=yes
15350 fi
15351 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15352 conftest.$ac_objext conftest.beam conftest.$ac_ext
15353 fi
15354
15355 fi
15356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15357 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15358 if test $ac_cv_func_setpgrp_void = yes; then
15359
15360 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15361
15362 fi
15363
15364 else
15365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15366 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15367 if ${ac_cv_func_setpgrp_void+:} false; then :
15368 $as_echo_n "(cached) " >&6
15369 else
15370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15371 /* end confdefs.h. */
15372
15373 #include <unistd.h>
15374
15375 int
15376 main ()
15377 {
15378
15379 if (setpgrp(1,1) == -1)
15380 exit (0);
15381 else
15382 exit (1);
15383
15384 ;
15385 return 0;
15386 }
15387 _ACEOF
15388 if ac_fn_c_try_compile "$LINENO"; then :
15389 ac_cv_func_setpgrp_void=no
15390 else
15391 ac_cv_func_setpgrp_void=yes
15392 fi
15393 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15394 fi
15395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15396 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15397 if test "$ac_cv_func_setpgrp_void" = yes; then
15398 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15399
15400 fi
15401 fi
15402
15403 # Assume we'll default to using the included libiberty regex.
15404 gdb_use_included_regex=yes
15405
15406 # However, if the system regex is GNU regex, then default to *not*
15407 # using the included regex.
15408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15409 $as_echo_n "checking for GNU regex... " >&6; }
15410 if ${gdb_cv_have_gnu_regex+:} false; then :
15411 $as_echo_n "(cached) " >&6
15412 else
15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15414 /* end confdefs.h. */
15415 #include <gnu-versions.h>
15416 int
15417 main ()
15418 {
15419 #define REGEX_INTERFACE_VERSION 1
15420 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15421 # error "Version mismatch"
15422 #endif
15423 ;
15424 return 0;
15425 }
15426 _ACEOF
15427 if ac_fn_c_try_compile "$LINENO"; then :
15428 gdb_cv_have_gnu_regex=yes
15429 else
15430 gdb_cv_have_gnu_regex=no
15431 fi
15432 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15433 fi
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15435 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
15436 if test "$gdb_cv_have_gnu_regex" = yes; then
15437 gdb_use_included_regex=no
15438 fi
15439
15440
15441 # Check whether --with-included-regex was given.
15442 if test "${with_included_regex+set}" = set; then :
15443 withval=$with_included_regex; gdb_with_regex=$withval
15444 else
15445 gdb_with_regex=$gdb_use_included_regex
15446 fi
15447
15448 if test "$gdb_with_regex" = yes; then
15449
15450 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
15451
15452 fi
15453
15454 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15455 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15456 #include <sys/proc.h>
15457
15458 "
15459 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15460
15461 cat >>confdefs.h <<_ACEOF
15462 #define HAVE_STRUCT_THREAD_TD_PCB 1
15463 _ACEOF
15464
15465
15466 fi
15467
15468
15469 # See if <sys/lwp.h> defines `struct lwp`.
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15471 $as_echo_n "checking for struct lwp... " >&6; }
15472 if ${gdb_cv_struct_lwp+:} 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/param.h>
15478 #define _KMEMUSER
15479 #include <sys/lwp.h>
15480 int
15481 main ()
15482 {
15483 struct lwp l;
15484 ;
15485 return 0;
15486 }
15487 _ACEOF
15488 if ac_fn_c_try_compile "$LINENO"; then :
15489 gdb_cv_struct_lwp=yes
15490 else
15491 gdb_cv_struct_lwp=no
15492 fi
15493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15494 fi
15495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15496 $as_echo "$gdb_cv_struct_lwp" >&6; }
15497 if test "$gdb_cv_struct_lwp" = yes; then
15498
15499 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15500
15501 fi
15502
15503 # See if <machine/reg.h> degines `struct reg'.
15504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15505 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15506 if ${gdb_cv_struct_reg+:} 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 <machine/reg.h>
15513 int
15514 main ()
15515 {
15516 struct reg r;
15517 ;
15518 return 0;
15519 }
15520 _ACEOF
15521 if ac_fn_c_try_compile "$LINENO"; then :
15522 gdb_cv_struct_reg=yes
15523 else
15524 gdb_cv_struct_reg=no
15525 fi
15526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15527 fi
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15529 $as_echo "$gdb_cv_struct_reg" >&6; }
15530 if test "$gdb_cv_struct_reg" = yes; then
15531
15532 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15533
15534 fi
15535
15536 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15537 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15538 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15539 #include <machine/reg.h>
15540 "
15541 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15542
15543 cat >>confdefs.h <<_ACEOF
15544 #define HAVE_STRUCT_REG_R_FS 1
15545 _ACEOF
15546
15547
15548 fi
15549 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15550 #include <machine/reg.h>
15551 "
15552 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15553
15554 cat >>confdefs.h <<_ACEOF
15555 #define HAVE_STRUCT_REG_R_GS 1
15556 _ACEOF
15557
15558
15559 fi
15560
15561
15562 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15564 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15565 if ${gdb_cv_have_ptrace_getregs+:} false; then :
15566 $as_echo_n "(cached) " >&6
15567 else
15568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15569 /* end confdefs.h. */
15570 #include <sys/ptrace.h>
15571 int
15572 main ()
15573 {
15574 PTRACE_GETREGS;
15575 ;
15576 return 0;
15577 }
15578 _ACEOF
15579 if ac_fn_c_try_compile "$LINENO"; then :
15580 gdb_cv_have_ptrace_getregs=yes
15581 else
15582 gdb_cv_have_ptrace_getregs=no
15583 fi
15584 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15585 fi
15586
15587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15588 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15589 if test "$gdb_cv_have_ptrace_getregs" = yes; then
15590
15591 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15592
15593 fi
15594
15595 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15597 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15598 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15599 $as_echo_n "(cached) " >&6
15600 else
15601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15602 /* end confdefs.h. */
15603 #include <sys/ptrace.h>
15604 int
15605 main ()
15606 {
15607 PTRACE_GETFPXREGS;
15608 ;
15609 return 0;
15610 }
15611 _ACEOF
15612 if ac_fn_c_try_compile "$LINENO"; then :
15613 gdb_cv_have_ptrace_getfpxregs=yes
15614 else
15615 gdb_cv_have_ptrace_getfpxregs=no
15616 fi
15617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15618 fi
15619
15620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15621 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15622 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
15623
15624 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
15625
15626 fi
15627
15628 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15630 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
15631 if ${gdb_cv_have_pt_getdbregs+:} false; then :
15632 $as_echo_n "(cached) " >&6
15633 else
15634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15635 /* end confdefs.h. */
15636 #include <sys/types.h>
15637 #include <sys/ptrace.h>
15638 int
15639 main ()
15640 {
15641 PT_GETDBREGS;
15642 ;
15643 return 0;
15644 }
15645 _ACEOF
15646 if ac_fn_c_try_compile "$LINENO"; then :
15647 gdb_cv_have_pt_getdbregs=yes
15648 else
15649 gdb_cv_have_pt_getdbregs=no
15650 fi
15651 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15652 fi
15653
15654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15655 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15656 if test "$gdb_cv_have_pt_getdbregs" = yes; then
15657
15658 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
15659
15660 fi
15661
15662 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15664 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15665 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
15666 $as_echo_n "(cached) " >&6
15667 else
15668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15669 /* end confdefs.h. */
15670 #include <sys/types.h>
15671 #include <sys/ptrace.h>
15672 int
15673 main ()
15674 {
15675 PT_GETXMMREGS;
15676 ;
15677 return 0;
15678 }
15679 _ACEOF
15680 if ac_fn_c_try_compile "$LINENO"; then :
15681 gdb_cv_have_pt_getxmmregs=yes
15682 else
15683 gdb_cv_have_pt_getxmmregs=no
15684 fi
15685 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15686 fi
15687
15688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15689 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15690 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
15691
15692 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
15693
15694 fi
15695
15696 # See if <sys/ptrace.h> supports LWP names on FreeBSD
15697 # Older FreeBSD versions don't have the pl_tdname member of
15698 # `struct ptrace_lwpinfo'.
15699 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15700 "
15701 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
15702
15703 cat >>confdefs.h <<_ACEOF
15704 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15705 _ACEOF
15706
15707
15708 fi
15709
15710
15711 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15712 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15713 # FreeBSD 10.3.
15714 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>
15715 "
15716 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15717
15718 cat >>confdefs.h <<_ACEOF
15719 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15720 _ACEOF
15721
15722
15723 fi
15724
15725
15726 # Check if the compiler supports the `long long' type.
15727
15728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15729 $as_echo_n "checking for long long support in compiler... " >&6; }
15730 if ${gdb_cv_c_long_long+:} false; then :
15731 $as_echo_n "(cached) " >&6
15732 else
15733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15734 /* end confdefs.h. */
15735 extern long long foo;
15736 int
15737 main ()
15738 {
15739 switch (foo & 2) { case 0: return 1; }
15740 ;
15741 return 0;
15742 }
15743 _ACEOF
15744 if ac_fn_c_try_compile "$LINENO"; then :
15745 gdb_cv_c_long_long=yes
15746 else
15747 gdb_cv_c_long_long=no
15748 fi
15749 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15750 fi
15751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15752 $as_echo "$gdb_cv_c_long_long" >&6; }
15753 if test "$gdb_cv_c_long_long" != yes; then
15754 # libdecnumber requires long long.
15755 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
15756 fi
15757
15758 # Check if the compiler and runtime support printing long longs.
15759
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15761 $as_echo_n "checking for long long support in printf... " >&6; }
15762 if ${gdb_cv_printf_has_long_long+:} false; then :
15763 $as_echo_n "(cached) " >&6
15764 else
15765 if test "$cross_compiling" = yes; then :
15766 gdb_cv_printf_has_long_long=no
15767 else
15768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15769 /* end confdefs.h. */
15770 $ac_includes_default
15771 int
15772 main ()
15773 {
15774 char buf[32];
15775 long long l = 0;
15776 l = (l << 16) + 0x0123;
15777 l = (l << 16) + 0x4567;
15778 l = (l << 16) + 0x89ab;
15779 l = (l << 16) + 0xcdef;
15780 sprintf (buf, "0x%016llx", l);
15781 return (strcmp ("0x0123456789abcdef", buf));
15782 ;
15783 return 0;
15784 }
15785 _ACEOF
15786 if ac_fn_c_try_run "$LINENO"; then :
15787 gdb_cv_printf_has_long_long=yes
15788 else
15789 gdb_cv_printf_has_long_long=no
15790 fi
15791 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15792 conftest.$ac_objext conftest.beam conftest.$ac_ext
15793 fi
15794
15795 fi
15796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15797 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15798 if test "$gdb_cv_printf_has_long_long" = yes; then
15799
15800 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15801
15802 fi
15803
15804 # Check if the compiler and runtime support printing decfloats.
15805
15806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15807 $as_echo_n "checking for decfloat support in printf... " >&6; }
15808 if ${gdb_cv_printf_has_decfloat+:} false; then :
15809 $as_echo_n "(cached) " >&6
15810 else
15811 if test "$cross_compiling" = yes; then :
15812 gdb_cv_printf_has_decfloat=no
15813 else
15814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15815 /* end confdefs.h. */
15816 $ac_includes_default
15817 int
15818 main ()
15819 {
15820 char buf[64];
15821 _Decimal32 d32 = 1.2345df;
15822 _Decimal64 d64 = 1.2345dd;
15823 _Decimal128 d128 = 1.2345dl;
15824 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15825 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15826 ;
15827 return 0;
15828 }
15829 _ACEOF
15830 if ac_fn_c_try_run "$LINENO"; then :
15831 gdb_cv_printf_has_decfloat=yes
15832 else
15833 gdb_cv_printf_has_decfloat=no
15834 fi
15835 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15836 conftest.$ac_objext conftest.beam conftest.$ac_ext
15837 fi
15838
15839 fi
15840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15841 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
15842 if test "$gdb_cv_printf_has_decfloat" = yes; then
15843
15844 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
15845
15846 fi
15847
15848 # Check if the compiler supports the `long double' type. We can't use
15849 # AC_C_LONG_DOUBLE because that one does additional checks on the
15850 # constants defined in <float.h> that fail on some systems,
15851 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
15852
15853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15854 $as_echo_n "checking for long double support in compiler... " >&6; }
15855 if ${gdb_cv_c_long_double+:} false; then :
15856 $as_echo_n "(cached) " >&6
15857 else
15858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15859 /* end confdefs.h. */
15860 long double foo;
15861 _ACEOF
15862 if ac_fn_c_try_compile "$LINENO"; then :
15863 gdb_cv_c_long_double=yes
15864 else
15865 gdb_cv_c_long_double=no
15866 fi
15867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15868 fi
15869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15870 $as_echo "$gdb_cv_c_long_double" >&6; }
15871 if test "$gdb_cv_c_long_double" = yes; then
15872
15873 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
15874
15875 fi
15876
15877 # Check if the compiler and runtime support printing long doubles.
15878
15879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15880 $as_echo_n "checking for long double support in printf... " >&6; }
15881 if ${gdb_cv_printf_has_long_double+:} false; then :
15882 $as_echo_n "(cached) " >&6
15883 else
15884 if test "$cross_compiling" = yes; then :
15885 gdb_cv_printf_has_long_double=no
15886 else
15887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15888 /* end confdefs.h. */
15889 $ac_includes_default
15890 int
15891 main ()
15892 {
15893 char buf[16];
15894 long double f = 3.141592653;
15895 sprintf (buf, "%Lg", f);
15896 return (strncmp ("3.14159", buf, 7));
15897 ;
15898 return 0;
15899 }
15900 _ACEOF
15901 if ac_fn_c_try_run "$LINENO"; then :
15902 gdb_cv_printf_has_long_double=yes
15903 else
15904 gdb_cv_printf_has_long_double=no
15905 fi
15906 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15907 conftest.$ac_objext conftest.beam conftest.$ac_ext
15908 fi
15909
15910 fi
15911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15912 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
15913 if test "$gdb_cv_printf_has_long_double" = yes; then
15914
15915 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
15916
15917 fi
15918
15919 # Check if the compiler and runtime support scanning long doubles.
15920
15921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15922 $as_echo_n "checking for long double support in scanf... " >&6; }
15923 if ${gdb_cv_scanf_has_long_double+:} false; then :
15924 $as_echo_n "(cached) " >&6
15925 else
15926 if test "$cross_compiling" = yes; then :
15927 gdb_cv_scanf_has_long_double=no
15928 else
15929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15930 /* end confdefs.h. */
15931 #include <stdio.h>
15932 int
15933 main ()
15934 {
15935 char *buf = "3.141592653";
15936 long double f = 0;
15937 sscanf (buf, "%Lg", &f);
15938 return !(f > 3.14159 && f < 3.14160);
15939 ;
15940 return 0;
15941 }
15942 _ACEOF
15943 if ac_fn_c_try_run "$LINENO"; then :
15944 gdb_cv_scanf_has_long_double=yes
15945 else
15946 gdb_cv_scanf_has_long_double=no
15947 fi
15948 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15949 conftest.$ac_objext conftest.beam conftest.$ac_ext
15950 fi
15951
15952 fi
15953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15954 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
15955 if test "$gdb_cv_scanf_has_long_double" = yes; then
15956
15957 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
15958
15959 fi
15960
15961 case ${host_os} in
15962 aix*)
15963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15964 $as_echo_n "checking for -bbigtoc option... " >&6; }
15965 if ${gdb_cv_bigtoc+:} false; then :
15966 $as_echo_n "(cached) " >&6
15967 else
15968
15969 SAVE_LDFLAGS=$LDFLAGS
15970
15971 case $GCC in
15972 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15973 *) gdb_cv_bigtoc=-bbigtoc ;;
15974 esac
15975
15976 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15978 /* end confdefs.h. */
15979
15980 int
15981 main ()
15982 {
15983 int i;
15984 ;
15985 return 0;
15986 }
15987 _ACEOF
15988 if ac_fn_c_try_link "$LINENO"; then :
15989
15990 else
15991 gdb_cv_bigtoc=
15992 fi
15993 rm -f core conftest.err conftest.$ac_objext \
15994 conftest$ac_exeext conftest.$ac_ext
15995 LDFLAGS="${SAVE_LDFLAGS}"
15996
15997 fi
15998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15999 $as_echo "$gdb_cv_bigtoc" >&6; }
16000 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16001 ;;
16002 esac
16003
16004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16005 $as_echo_n "checking for the dynamic export flag... " >&6; }
16006 dynamic_list=false
16007 if test "${gdb_native}" = yes; then
16008 # The dynamically loaded libthread_db needs access to symbols in the gdb
16009 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16010 # may not be supported there.
16011 old_LDFLAGS="$LDFLAGS"
16012 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16013 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16014 LDFLAGS="$LDFLAGS $RDYNAMIC"
16015 if test "${have_libpython}" = no; then
16016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16017 /* end confdefs.h. */
16018
16019 int
16020 main ()
16021 {
16022
16023 ;
16024 return 0;
16025 }
16026 _ACEOF
16027 if ac_fn_c_try_link "$LINENO"; then :
16028 dynamic_list=true
16029 fi
16030 rm -f core conftest.err conftest.$ac_objext \
16031 conftest$ac_exeext conftest.$ac_ext
16032 else
16033 # Workaround http://bugs.python.org/issue4434 where static
16034 # libpythonX.Y.a would get its symbols required for
16035 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16036 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16037
16038 # Note the workaround for Python
16039 # http://bugs.python.org/issue10112 earlier has removed
16040 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16041 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16042 # always pass.
16043 old_CFLAGS="$CFLAGS"
16044 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16045 old_LIBS="$LIBS"
16046 LIBS="$LIBS $PYTHON_LIBS"
16047 old_CPPFLAGS="$CPPFLAGS"
16048 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16049 if test "$cross_compiling" = yes; then :
16050 true
16051 else
16052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16053 /* end confdefs.h. */
16054 #include "Python.h"
16055 int
16056 main ()
16057 {
16058 int err;
16059 Py_Initialize ();
16060 err = PyRun_SimpleString ("import itertools\n");
16061 Py_Finalize ();
16062 return err == 0 ? 0 : 1;
16063 ;
16064 return 0;
16065 }
16066 _ACEOF
16067 if ac_fn_c_try_run "$LINENO"; then :
16068 dynamic_list=true
16069 fi
16070 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16071 conftest.$ac_objext conftest.beam conftest.$ac_ext
16072 fi
16073
16074 LIBS="$old_LIBS"
16075 CFLAGS="$old_CFLAGS"
16076 CPPFLAGS="$old_CPPFLAGS"
16077 fi
16078 LDFLAGS="$old_LDFLAGS"
16079 fi
16080 if $dynamic_list; then
16081 found="-Wl,--dynamic-list"
16082 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16083 else
16084 found="-rdynamic"
16085 RDYNAMIC="-rdynamic"
16086 fi
16087
16088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16089 $as_echo "$found" >&6; }
16090
16091
16092 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16093 case ${host_os} in
16094 aix*)
16095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16096 $as_echo_n "checking for AiX thread debugging library... " >&6; }
16097 if ${gdb_cv_have_aix_thread_debug+:} false; then :
16098 $as_echo_n "(cached) " >&6
16099 else
16100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16101 /* end confdefs.h. */
16102 #include <sys/pthdebug.h>
16103 int
16104 main ()
16105 {
16106 #ifndef PTHDB_VERSION_3
16107 #error
16108 #endif
16109 ;
16110 return 0;
16111 }
16112 _ACEOF
16113 if ac_fn_c_try_compile "$LINENO"; then :
16114 gdb_cv_have_aix_thread_debug=yes
16115 else
16116 gdb_cv_have_aix_thread_debug=no
16117 fi
16118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16119 fi
16120
16121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16122 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16123 if test "$gdb_cv_have_aix_thread_debug" = yes; then
16124 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16125 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16126 LIBS="$LIBS -lpthdebug"
16127
16128 # Older versions of AIX do not provide the declaration for
16129 # the getthrds function (it appears that it was introduced
16130 # with AIX 6.x).
16131 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16132 "
16133 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16134 ac_have_decl=1
16135 else
16136 ac_have_decl=0
16137 fi
16138
16139 cat >>confdefs.h <<_ACEOF
16140 #define HAVE_DECL_GETTHRDS $ac_have_decl
16141 _ACEOF
16142
16143 fi
16144 ;;
16145 esac
16146
16147 fi
16148
16149 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16151 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16152 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16153 $as_echo_n "(cached) " >&6
16154 else
16155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156 /* end confdefs.h. */
16157 #include <thread_db.h>
16158 int
16159 main ()
16160 {
16161 int i = TD_NOTALLOC;
16162 ;
16163 return 0;
16164 }
16165 _ACEOF
16166 if ac_fn_c_try_compile "$LINENO"; then :
16167 gdb_cv_thread_db_h_has_td_notalloc=yes
16168 else
16169 gdb_cv_thread_db_h_has_td_notalloc=no
16170
16171 fi
16172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16173
16174 fi
16175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16176 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16178 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16179 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16180 $as_echo_n "(cached) " >&6
16181 else
16182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16183 /* end confdefs.h. */
16184 #include <thread_db.h>
16185 int
16186 main ()
16187 {
16188 int i = TD_VERSION;
16189 ;
16190 return 0;
16191 }
16192 _ACEOF
16193 if ac_fn_c_try_compile "$LINENO"; then :
16194 gdb_cv_thread_db_h_has_td_version=yes
16195 else
16196 gdb_cv_thread_db_h_has_td_version=no
16197
16198 fi
16199 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16200
16201 fi
16202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16203 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16205 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16206 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16207 $as_echo_n "(cached) " >&6
16208 else
16209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16210 /* end confdefs.h. */
16211 #include <thread_db.h>
16212 int
16213 main ()
16214 {
16215 int i = TD_NOTLS;
16216 ;
16217 return 0;
16218 }
16219 _ACEOF
16220 if ac_fn_c_try_compile "$LINENO"; then :
16221 gdb_cv_thread_db_h_has_td_notls=yes
16222 else
16223 gdb_cv_thread_db_h_has_td_notls=no
16224
16225 fi
16226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16227
16228 fi
16229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16230 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16231 fi
16232 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16233
16234 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16235
16236 fi
16237 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16238
16239 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16240
16241 fi
16242 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16243
16244 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16245
16246 fi
16247
16248 case $host_os in
16249 go32* | *djgpp*)
16250 gdbinit=gdb.ini
16251 ;;
16252 *)
16253 gdbinit=.gdbinit
16254 ;;
16255 esac
16256
16257 cat >>confdefs.h <<_ACEOF
16258 #define GDBINIT "$gdbinit"
16259 _ACEOF
16260
16261
16262
16263 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16264 # except that the argument to --with-sysroot is optional.
16265 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16266 if test "x$with_sysroot" = xyes; then
16267 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16268 fi
16269
16270 # Check whether --with-sysroot was given.
16271 if test "${with_sysroot+set}" = set; then :
16272 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16273 else
16274 TARGET_SYSTEM_ROOT=
16275 fi
16276
16277
16278 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16279 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16280 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16281 ac_define_dir=`eval echo $ac_define_dir`
16282
16283 cat >>confdefs.h <<_ACEOF
16284 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16285 _ACEOF
16286
16287
16288
16289
16290 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16291 if test "x$prefix" = xNONE; then
16292 test_prefix=/usr/local
16293 else
16294 test_prefix=$prefix
16295 fi
16296 else
16297 test_prefix=$exec_prefix
16298 fi
16299 value=0
16300 case ${ac_define_dir} in
16301 "${test_prefix}"|"${test_prefix}/"*|\
16302 '${exec_prefix}'|'${exec_prefix}/'*)
16303 value=1
16304 ;;
16305 esac
16306
16307 cat >>confdefs.h <<_ACEOF
16308 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16309 _ACEOF
16310
16311
16312
16313
16314
16315 # Check whether --with-system-gdbinit was given.
16316 if test "${with_system_gdbinit+set}" = set; then :
16317 withval=$with_system_gdbinit;
16318 SYSTEM_GDBINIT=$withval
16319 else
16320 SYSTEM_GDBINIT=
16321 fi
16322
16323
16324 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16325 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16326 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16327 ac_define_dir=`eval echo $ac_define_dir`
16328
16329 cat >>confdefs.h <<_ACEOF
16330 #define SYSTEM_GDBINIT "$ac_define_dir"
16331 _ACEOF
16332
16333
16334
16335
16336 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16337 if test "x$prefix" = xNONE; then
16338 test_prefix=/usr/local
16339 else
16340 test_prefix=$prefix
16341 fi
16342 else
16343 test_prefix=$exec_prefix
16344 fi
16345 value=0
16346 case ${ac_define_dir} in
16347 "${test_prefix}"|"${test_prefix}/"*|\
16348 '${exec_prefix}'|'${exec_prefix}/'*)
16349 value=1
16350 ;;
16351 esac
16352
16353 cat >>confdefs.h <<_ACEOF
16354 #define SYSTEM_GDBINIT_RELOCATABLE $value
16355 _ACEOF
16356
16357
16358
16359
16360
16361 # Check whether --with-system-gdbinit-dir was given.
16362 if test "${with_system_gdbinit_dir+set}" = set; then :
16363 withval=$with_system_gdbinit_dir;
16364 SYSTEM_GDBINIT_DIR=$withval
16365 else
16366 SYSTEM_GDBINIT_DIR=
16367 fi
16368
16369
16370 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16371 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16372 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16373 ac_define_dir=`eval echo $ac_define_dir`
16374
16375 cat >>confdefs.h <<_ACEOF
16376 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16377 _ACEOF
16378
16379
16380
16381
16382 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16383 if test "x$prefix" = xNONE; then
16384 test_prefix=/usr/local
16385 else
16386 test_prefix=$prefix
16387 fi
16388 else
16389 test_prefix=$exec_prefix
16390 fi
16391 value=0
16392 case ${ac_define_dir} in
16393 "${test_prefix}"|"${test_prefix}/"*|\
16394 '${exec_prefix}'|'${exec_prefix}/'*)
16395 value=1
16396 ;;
16397 esac
16398
16399 cat >>confdefs.h <<_ACEOF
16400 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16401 _ACEOF
16402
16403
16404
16405
16406
16407 # Check whether --enable-werror was given.
16408 if test "${enable_werror+set}" = set; then :
16409 enableval=$enable_werror; case "${enableval}" in
16410 yes | y) ERROR_ON_WARNING="yes" ;;
16411 no | n) ERROR_ON_WARNING="no" ;;
16412 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16413 esac
16414 fi
16415
16416
16417 # Enable -Werror by default when using gcc. Turn it off for releases.
16418 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16419 ERROR_ON_WARNING=yes
16420 fi
16421
16422 WERROR_CFLAGS=""
16423 if test "${ERROR_ON_WARNING}" = yes ; then
16424 WERROR_CFLAGS="-Werror"
16425 fi
16426
16427 # The options we'll try to enable.
16428 build_warnings="-Wall -Wpointer-arith \
16429 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16430 -Wno-switch -Wno-char-subscripts \
16431 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16432 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16433 -Wno-mismatched-tags \
16434 -Wno-error=deprecated-register \
16435 -Wsuggest-override \
16436 -Wimplicit-fallthrough=3 \
16437 -Wduplicated-cond \
16438 -Wshadow=local \
16439 -Wdeprecated-copy \
16440 -Wdeprecated-copy-dtor \
16441 -Wredundant-move \
16442 -Wmissing-declarations \
16443 -Wmissing-prototypes \
16444 -Wstrict-null-sentinel \
16445 "
16446
16447 case "${host}" in
16448 *-*-mingw32*)
16449 # Enable -Wno-format by default when using gcc on mingw since many
16450 # GCC versions complain about %I64.
16451 build_warnings="$build_warnings -Wno-format" ;;
16452 *-*-solaris*)
16453 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16454 # doesn't understand.
16455 build_warnings="$build_warnings -Wno-unknown-pragmas"
16456 # Solaris 11 <unistd.h> marks vfork deprecated.
16457 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16458 *)
16459 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16460 # but there's a special case for this below.
16461 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16462 esac
16463
16464 # Check whether --enable-build-warnings was given.
16465 if test "${enable_build_warnings+set}" = set; then :
16466 enableval=$enable_build_warnings; case "${enableval}" in
16467 yes) ;;
16468 no) build_warnings="-w";;
16469 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16470 build_warnings="${build_warnings} ${t}";;
16471 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16472 build_warnings="${t} ${build_warnings}";;
16473 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16474 esac
16475 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16476 echo "Setting compiler warning flags = $build_warnings" 6>&1
16477 fi
16478 fi
16479 # Check whether --enable-gdb-build-warnings was given.
16480 if test "${enable_gdb_build_warnings+set}" = set; then :
16481 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16482 yes) ;;
16483 no) build_warnings="-w";;
16484 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16485 build_warnings="${build_warnings} ${t}";;
16486 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16487 build_warnings="${t} ${build_warnings}";;
16488 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16489 esac
16490 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16491 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16492 fi
16493 fi
16494
16495 # The set of warnings supported by a C++ compiler is not the same as
16496 # of the C compiler.
16497 ac_ext=cpp
16498 ac_cpp='$CXXCPP $CPPFLAGS'
16499 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16500 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16501 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16502
16503
16504 WARN_CFLAGS=""
16505 if test "x${build_warnings}" != x -a "x$GCC" = xyes
16506 then
16507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16508 $as_echo_n "checking compiler warning flags... " >&6; }
16509 # Separate out the -Werror flag as some files just cannot be
16510 # compiled with it enabled.
16511 for w in ${build_warnings}; do
16512 # GCC does not complain about -Wno-unknown-warning. Invert
16513 # and test -Wunknown-warning instead.
16514 case $w in
16515 -Wno-*)
16516 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16517 -Wformat-nonliteral)
16518 # gcc requires -Wformat before -Wformat-nonliteral
16519 # will work, so stick them together.
16520 w="-Wformat $w"
16521 wtest="$w"
16522 ;;
16523 *)
16524 wtest=$w ;;
16525 esac
16526
16527 case $w in
16528 -Werr*) WERROR_CFLAGS=-Werror ;;
16529 *)
16530 # Check whether GCC accepts it.
16531 saved_CFLAGS="$CFLAGS"
16532 CFLAGS="$CFLAGS -Werror $wtest"
16533 saved_CXXFLAGS="$CXXFLAGS"
16534 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16535 if test "x$w" = "x-Wunused-variable"; then
16536 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16537 # fixed in GCC 4.9. This test is derived from the gdb
16538 # source code that triggered this bug in GCC.
16539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16540 /* end confdefs.h. */
16541 struct scoped_restore_base {};
16542 struct scoped_restore_tmpl : public scoped_restore_base {
16543 ~scoped_restore_tmpl() {}
16544 };
16545 int
16546 main ()
16547 {
16548 const scoped_restore_base &b = scoped_restore_tmpl();
16549 ;
16550 return 0;
16551 }
16552 _ACEOF
16553 if ac_fn_cxx_try_compile "$LINENO"; then :
16554 WARN_CFLAGS="${WARN_CFLAGS} $w"
16555 fi
16556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16557 else
16558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16559 /* end confdefs.h. */
16560
16561 int
16562 main ()
16563 {
16564
16565 ;
16566 return 0;
16567 }
16568 _ACEOF
16569 if ac_fn_cxx_try_compile "$LINENO"; then :
16570 WARN_CFLAGS="${WARN_CFLAGS} $w"
16571 fi
16572 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16573 fi
16574 CFLAGS="$saved_CFLAGS"
16575 CXXFLAGS="$saved_CXXFLAGS"
16576 esac
16577 done
16578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16579 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16580 fi
16581
16582
16583
16584 ac_ext=c
16585 ac_cpp='$CPP $CPPFLAGS'
16586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16589
16590
16591
16592 # Check whether --enable-ubsan was given.
16593 if test "${enable_ubsan+set}" = set; then :
16594 enableval=$enable_ubsan;
16595 else
16596 enable_ubsan=no
16597 fi
16598
16599 if test "x$enable_ubsan" = xauto; then
16600 if $development; then
16601 enable_ubsan=yes
16602 fi
16603 fi
16604 ac_ext=cpp
16605 ac_cpp='$CXXCPP $CPPFLAGS'
16606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16607 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16609
16610 if test "x$enable_ubsan" = xyes; then
16611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16612 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16613 saved_CXXFLAGS="$CXXFLAGS"
16614 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616 /* end confdefs.h. */
16617
16618 int
16619 main ()
16620 {
16621
16622 ;
16623 return 0;
16624 }
16625 _ACEOF
16626 if ac_fn_cxx_try_link "$LINENO"; then :
16627 enable_ubsan=yes
16628 else
16629 enable_ubsan=no
16630 fi
16631 rm -f core conftest.err conftest.$ac_objext \
16632 conftest$ac_exeext conftest.$ac_ext
16633 CXXFLAGS="$saved_CXXFLAGS"
16634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16635 $as_echo "$enable_ubsan" >&6; }
16636 if test "x$enable_ubsan" = xyes; then
16637 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16638 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16639 fi
16640 fi
16641 ac_ext=c
16642 ac_cpp='$CPP $CPPFLAGS'
16643 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16644 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16645 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16646
16647
16648
16649 # In the Cygwin environment, we need some additional flags.
16650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16651 $as_echo_n "checking for cygwin... " >&6; }
16652 if ${gdb_cv_os_cygwin+:} false; then :
16653 $as_echo_n "(cached) " >&6
16654 else
16655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16656 /* end confdefs.h. */
16657
16658 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
16659 lose
16660 #endif
16661 _ACEOF
16662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16663 $EGREP "^lose$" >/dev/null 2>&1; then :
16664 gdb_cv_os_cygwin=yes
16665 else
16666 gdb_cv_os_cygwin=no
16667 fi
16668 rm -f conftest*
16669
16670 fi
16671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16672 $as_echo "$gdb_cv_os_cygwin" >&6; }
16673
16674
16675 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
16676 case ${host} in
16677 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16678 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
16679 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
16680 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
16681 esac
16682
16683
16684 # libreadline needs libuser32.a in a cygwin environment
16685 WIN32LIBS=
16686 if test x"$gdb_cv_os_cygwin" = xyes; then
16687 WIN32LIBS="-luser32"
16688 case "${target}" in
16689 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16690 ;;
16691 esac
16692 fi
16693
16694 # The ser-tcp.c module requires sockets.
16695 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
16696 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
16697
16698 # Add ELF support to GDB, but only if BFD includes ELF support.
16699
16700 OLD_CFLAGS=$CFLAGS
16701 OLD_LDFLAGS=$LDFLAGS
16702 OLD_LIBS=$LIBS
16703 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16704 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16705 # always want our bfd.
16706 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16707 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16708 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16709 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16710 LIBS="-lbfd -liberty -lz $intl $LIBS"
16711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16712 $as_echo_n "checking for ELF support in BFD... " >&6; }
16713 if ${gdb_cv_var_elf+:} false; then :
16714 $as_echo_n "(cached) " >&6
16715 else
16716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16717 /* end confdefs.h. */
16718 #include <stdlib.h>
16719 #include "bfd.h"
16720 #include "elf-bfd.h"
16721
16722 int
16723 main ()
16724 {
16725 return bfd_get_elf_phdr_upper_bound (NULL);
16726 ;
16727 return 0;
16728 }
16729 _ACEOF
16730 if ac_fn_c_try_link "$LINENO"; then :
16731 gdb_cv_var_elf=yes
16732 else
16733 gdb_cv_var_elf=no
16734 fi
16735 rm -f core conftest.err conftest.$ac_objext \
16736 conftest$ac_exeext conftest.$ac_ext
16737 fi
16738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16739 $as_echo "$gdb_cv_var_elf" >&6; }
16740 CFLAGS=$OLD_CFLAGS
16741 LDFLAGS=$OLD_LDFLAGS
16742 LIBS=$OLD_LIBS
16743 if test "$gdb_cv_var_elf" = yes; then
16744 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
16745
16746 $as_echo "#define HAVE_ELF 1" >>confdefs.h
16747
16748 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16749 if test "$plugins" = "yes"; then
16750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16751 $as_echo_n "checking for library containing dlopen... " >&6; }
16752 if ${ac_cv_search_dlopen+:} false; then :
16753 $as_echo_n "(cached) " >&6
16754 else
16755 ac_func_search_save_LIBS=$LIBS
16756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16757 /* end confdefs.h. */
16758
16759 /* Override any GCC internal prototype to avoid an error.
16760 Use char because int might match the return type of a GCC
16761 builtin and then its argument prototype would still apply. */
16762 #ifdef __cplusplus
16763 extern "C"
16764 #endif
16765 char dlopen ();
16766 int
16767 main ()
16768 {
16769 return dlopen ();
16770 ;
16771 return 0;
16772 }
16773 _ACEOF
16774 for ac_lib in '' dl; do
16775 if test -z "$ac_lib"; then
16776 ac_res="none required"
16777 else
16778 ac_res=-l$ac_lib
16779 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16780 fi
16781 if ac_fn_c_try_link "$LINENO"; then :
16782 ac_cv_search_dlopen=$ac_res
16783 fi
16784 rm -f core conftest.err conftest.$ac_objext \
16785 conftest$ac_exeext
16786 if ${ac_cv_search_dlopen+:} false; then :
16787 break
16788 fi
16789 done
16790 if ${ac_cv_search_dlopen+:} false; then :
16791
16792 else
16793 ac_cv_search_dlopen=no
16794 fi
16795 rm conftest.$ac_ext
16796 LIBS=$ac_func_search_save_LIBS
16797 fi
16798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16799 $as_echo "$ac_cv_search_dlopen" >&6; }
16800 ac_res=$ac_cv_search_dlopen
16801 if test "$ac_res" != no; then :
16802 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16803
16804 fi
16805
16806 fi
16807 fi
16808
16809 # Add macho support to GDB, but only if BFD includes it.
16810
16811 OLD_CFLAGS=$CFLAGS
16812 OLD_LDFLAGS=$LDFLAGS
16813 OLD_LIBS=$LIBS
16814 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16815 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16816 # always want our bfd.
16817 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16818 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16819 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16820 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16821 LIBS="-lbfd -liberty -lz $intl $LIBS"
16822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16823 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
16824 if ${gdb_cv_var_macho+:} false; then :
16825 $as_echo_n "(cached) " >&6
16826 else
16827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16828 /* end confdefs.h. */
16829 #include <stdlib.h>
16830 #include "bfd.h"
16831 #include "mach-o.h"
16832
16833 int
16834 main ()
16835 {
16836 return bfd_mach_o_lookup_command (NULL, 0, NULL);
16837 ;
16838 return 0;
16839 }
16840 _ACEOF
16841 if ac_fn_c_try_link "$LINENO"; then :
16842 gdb_cv_var_macho=yes
16843 else
16844 gdb_cv_var_macho=no
16845 fi
16846 rm -f core conftest.err conftest.$ac_objext \
16847 conftest$ac_exeext conftest.$ac_ext
16848 fi
16849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16850 $as_echo "$gdb_cv_var_macho" >&6; }
16851 CFLAGS=$OLD_CFLAGS
16852 LDFLAGS=$OLD_LDFLAGS
16853 LIBS=$OLD_LIBS
16854 if test "$gdb_cv_var_macho" = yes; then
16855 CONFIG_OBS="$CONFIG_OBS machoread.o"
16856 fi
16857
16858 # Add any host-specific objects to GDB.
16859 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16860
16861 # If building on ELF, look for lzma support for embedded compressed debug info.
16862 if test "$gdb_cv_var_elf" = yes; then
16863
16864 # Check whether --with-lzma was given.
16865 if test "${with_lzma+set}" = set; then :
16866 withval=$with_lzma;
16867 else
16868 with_lzma=auto
16869 fi
16870
16871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16872 $as_echo_n "checking whether to use lzma... " >&6; }
16873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16874 $as_echo "$with_lzma" >&6; }
16875
16876 if test "${with_lzma}" != no; then
16877
16878
16879
16880
16881
16882
16883
16884
16885 use_additional=yes
16886
16887 acl_save_prefix="$prefix"
16888 prefix="$acl_final_prefix"
16889 acl_save_exec_prefix="$exec_prefix"
16890 exec_prefix="$acl_final_exec_prefix"
16891
16892 eval additional_includedir=\"$includedir\"
16893 eval additional_libdir=\"$libdir\"
16894
16895 exec_prefix="$acl_save_exec_prefix"
16896 prefix="$acl_save_prefix"
16897
16898
16899 # Check whether --with-liblzma-prefix was given.
16900 if test "${with_liblzma_prefix+set}" = set; then :
16901 withval=$with_liblzma_prefix;
16902 if test "X$withval" = "Xno"; then
16903 use_additional=no
16904 else
16905 if test "X$withval" = "X"; then
16906
16907 acl_save_prefix="$prefix"
16908 prefix="$acl_final_prefix"
16909 acl_save_exec_prefix="$exec_prefix"
16910 exec_prefix="$acl_final_exec_prefix"
16911
16912 eval additional_includedir=\"$includedir\"
16913 eval additional_libdir=\"$libdir\"
16914
16915 exec_prefix="$acl_save_exec_prefix"
16916 prefix="$acl_save_prefix"
16917
16918 else
16919 additional_includedir="$withval/include"
16920 additional_libdir="$withval/lib"
16921 fi
16922 fi
16923
16924 fi
16925
16926
16927 # Check whether --with-liblzma-type was given.
16928 if test "${with_liblzma_type+set}" = set; then :
16929 withval=$with_liblzma_type; with_liblzma_type=$withval
16930 else
16931 with_liblzma_type=auto
16932 fi
16933
16934 lib_type=`eval echo \$with_liblzma_type`
16935
16936 LIBLZMA=
16937 LTLIBLZMA=
16938 INCLZMA=
16939 rpathdirs=
16940 ltrpathdirs=
16941 names_already_handled=
16942 names_next_round='lzma '
16943 while test -n "$names_next_round"; do
16944 names_this_round="$names_next_round"
16945 names_next_round=
16946 for name in $names_this_round; do
16947 already_handled=
16948 for n in $names_already_handled; do
16949 if test "$n" = "$name"; then
16950 already_handled=yes
16951 break
16952 fi
16953 done
16954 if test -z "$already_handled"; then
16955 names_already_handled="$names_already_handled $name"
16956 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16957 eval value=\"\$HAVE_LIB$uppername\"
16958 if test -n "$value"; then
16959 if test "$value" = yes; then
16960 eval value=\"\$LIB$uppername\"
16961 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16962 eval value=\"\$LTLIB$uppername\"
16963 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16964 else
16965 :
16966 fi
16967 else
16968 found_dir=
16969 found_la=
16970 found_so=
16971 found_a=
16972 if test $use_additional = yes; then
16973 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
16974 found_dir="$additional_libdir"
16975 found_so="$additional_libdir/lib$name.$shlibext"
16976 if test -f "$additional_libdir/lib$name.la"; then
16977 found_la="$additional_libdir/lib$name.la"
16978 fi
16979 elif test x$lib_type != xshared; then
16980 if test -f "$additional_libdir/lib$name.$libext"; then
16981 found_dir="$additional_libdir"
16982 found_a="$additional_libdir/lib$name.$libext"
16983 if test -f "$additional_libdir/lib$name.la"; then
16984 found_la="$additional_libdir/lib$name.la"
16985 fi
16986 fi
16987 fi
16988 fi
16989 if test "X$found_dir" = "X"; then
16990 for x in $LDFLAGS $LTLIBLZMA; do
16991
16992 acl_save_prefix="$prefix"
16993 prefix="$acl_final_prefix"
16994 acl_save_exec_prefix="$exec_prefix"
16995 exec_prefix="$acl_final_exec_prefix"
16996 eval x=\"$x\"
16997 exec_prefix="$acl_save_exec_prefix"
16998 prefix="$acl_save_prefix"
16999
17000 case "$x" in
17001 -L*)
17002 dir=`echo "X$x" | sed -e 's/^X-L//'`
17003 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17004 found_dir="$dir"
17005 found_so="$dir/lib$name.$shlibext"
17006 if test -f "$dir/lib$name.la"; then
17007 found_la="$dir/lib$name.la"
17008 fi
17009 elif test x$lib_type != xshared; then
17010 if test -f "$dir/lib$name.$libext"; then
17011 found_dir="$dir"
17012 found_a="$dir/lib$name.$libext"
17013 if test -f "$dir/lib$name.la"; then
17014 found_la="$dir/lib$name.la"
17015 fi
17016 fi
17017 fi
17018 ;;
17019 esac
17020 if test "X$found_dir" != "X"; then
17021 break
17022 fi
17023 done
17024 fi
17025 if test "X$found_dir" != "X"; then
17026 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17027 if test "X$found_so" != "X"; then
17028 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17029 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17030 else
17031 haveit=
17032 for x in $ltrpathdirs; do
17033 if test "X$x" = "X$found_dir"; then
17034 haveit=yes
17035 break
17036 fi
17037 done
17038 if test -z "$haveit"; then
17039 ltrpathdirs="$ltrpathdirs $found_dir"
17040 fi
17041 if test "$hardcode_direct" = yes; then
17042 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17043 else
17044 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17045 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17046 haveit=
17047 for x in $rpathdirs; do
17048 if test "X$x" = "X$found_dir"; then
17049 haveit=yes
17050 break
17051 fi
17052 done
17053 if test -z "$haveit"; then
17054 rpathdirs="$rpathdirs $found_dir"
17055 fi
17056 else
17057 haveit=
17058 for x in $LDFLAGS $LIBLZMA; do
17059
17060 acl_save_prefix="$prefix"
17061 prefix="$acl_final_prefix"
17062 acl_save_exec_prefix="$exec_prefix"
17063 exec_prefix="$acl_final_exec_prefix"
17064 eval x=\"$x\"
17065 exec_prefix="$acl_save_exec_prefix"
17066 prefix="$acl_save_prefix"
17067
17068 if test "X$x" = "X-L$found_dir"; then
17069 haveit=yes
17070 break
17071 fi
17072 done
17073 if test -z "$haveit"; then
17074 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17075 fi
17076 if test "$hardcode_minus_L" != no; then
17077 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17078 else
17079 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17080 fi
17081 fi
17082 fi
17083 fi
17084 else
17085 if test "X$found_a" != "X"; then
17086 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17087 else
17088 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17089 fi
17090 fi
17091 additional_includedir=
17092 case "$found_dir" in
17093 */lib | */lib/)
17094 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17095 additional_includedir="$basedir/include"
17096 ;;
17097 esac
17098 if test "X$additional_includedir" != "X"; then
17099 if test "X$additional_includedir" != "X/usr/include"; then
17100 haveit=
17101 if test "X$additional_includedir" = "X/usr/local/include"; then
17102 if test -n "$GCC"; then
17103 case $host_os in
17104 linux*) haveit=yes;;
17105 esac
17106 fi
17107 fi
17108 if test -z "$haveit"; then
17109 for x in $CPPFLAGS $INCLZMA; do
17110
17111 acl_save_prefix="$prefix"
17112 prefix="$acl_final_prefix"
17113 acl_save_exec_prefix="$exec_prefix"
17114 exec_prefix="$acl_final_exec_prefix"
17115 eval x=\"$x\"
17116 exec_prefix="$acl_save_exec_prefix"
17117 prefix="$acl_save_prefix"
17118
17119 if test "X$x" = "X-I$additional_includedir"; then
17120 haveit=yes
17121 break
17122 fi
17123 done
17124 if test -z "$haveit"; then
17125 if test -d "$additional_includedir"; then
17126 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17127 fi
17128 fi
17129 fi
17130 fi
17131 fi
17132 if test -n "$found_la"; then
17133 save_libdir="$libdir"
17134 case "$found_la" in
17135 */* | *\\*) . "$found_la" ;;
17136 *) . "./$found_la" ;;
17137 esac
17138 libdir="$save_libdir"
17139 for dep in $dependency_libs; do
17140 case "$dep" in
17141 -L*)
17142 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17143 if test "X$additional_libdir" != "X/usr/lib"; then
17144 haveit=
17145 if test "X$additional_libdir" = "X/usr/local/lib"; then
17146 if test -n "$GCC"; then
17147 case $host_os in
17148 linux*) haveit=yes;;
17149 esac
17150 fi
17151 fi
17152 if test -z "$haveit"; then
17153 haveit=
17154 for x in $LDFLAGS $LIBLZMA; do
17155
17156 acl_save_prefix="$prefix"
17157 prefix="$acl_final_prefix"
17158 acl_save_exec_prefix="$exec_prefix"
17159 exec_prefix="$acl_final_exec_prefix"
17160 eval x=\"$x\"
17161 exec_prefix="$acl_save_exec_prefix"
17162 prefix="$acl_save_prefix"
17163
17164 if test "X$x" = "X-L$additional_libdir"; then
17165 haveit=yes
17166 break
17167 fi
17168 done
17169 if test -z "$haveit"; then
17170 if test -d "$additional_libdir"; then
17171 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17172 fi
17173 fi
17174 haveit=
17175 for x in $LDFLAGS $LTLIBLZMA; do
17176
17177 acl_save_prefix="$prefix"
17178 prefix="$acl_final_prefix"
17179 acl_save_exec_prefix="$exec_prefix"
17180 exec_prefix="$acl_final_exec_prefix"
17181 eval x=\"$x\"
17182 exec_prefix="$acl_save_exec_prefix"
17183 prefix="$acl_save_prefix"
17184
17185 if test "X$x" = "X-L$additional_libdir"; then
17186 haveit=yes
17187 break
17188 fi
17189 done
17190 if test -z "$haveit"; then
17191 if test -d "$additional_libdir"; then
17192 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17193 fi
17194 fi
17195 fi
17196 fi
17197 ;;
17198 -R*)
17199 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17200 if test "$enable_rpath" != no; then
17201 haveit=
17202 for x in $rpathdirs; do
17203 if test "X$x" = "X$dir"; then
17204 haveit=yes
17205 break
17206 fi
17207 done
17208 if test -z "$haveit"; then
17209 rpathdirs="$rpathdirs $dir"
17210 fi
17211 haveit=
17212 for x in $ltrpathdirs; do
17213 if test "X$x" = "X$dir"; then
17214 haveit=yes
17215 break
17216 fi
17217 done
17218 if test -z "$haveit"; then
17219 ltrpathdirs="$ltrpathdirs $dir"
17220 fi
17221 fi
17222 ;;
17223 -l*)
17224 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17225 ;;
17226 *.la)
17227 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17228 ;;
17229 *)
17230 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17231 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17232 ;;
17233 esac
17234 done
17235 fi
17236 else
17237 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17238 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17239 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17240 else
17241 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17242 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17243 fi
17244 fi
17245 fi
17246 fi
17247 done
17248 done
17249 if test "X$rpathdirs" != "X"; then
17250 if test -n "$hardcode_libdir_separator"; then
17251 alldirs=
17252 for found_dir in $rpathdirs; do
17253 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17254 done
17255 acl_save_libdir="$libdir"
17256 libdir="$alldirs"
17257 eval flag=\"$hardcode_libdir_flag_spec\"
17258 libdir="$acl_save_libdir"
17259 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17260 else
17261 for found_dir in $rpathdirs; do
17262 acl_save_libdir="$libdir"
17263 libdir="$found_dir"
17264 eval flag=\"$hardcode_libdir_flag_spec\"
17265 libdir="$acl_save_libdir"
17266 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17267 done
17268 fi
17269 fi
17270 if test "X$ltrpathdirs" != "X"; then
17271 for found_dir in $ltrpathdirs; do
17272 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17273 done
17274 fi
17275
17276
17277 ac_save_CPPFLAGS="$CPPFLAGS"
17278
17279 for element in $INCLZMA; do
17280 haveit=
17281 for x in $CPPFLAGS; do
17282
17283 acl_save_prefix="$prefix"
17284 prefix="$acl_final_prefix"
17285 acl_save_exec_prefix="$exec_prefix"
17286 exec_prefix="$acl_final_exec_prefix"
17287 eval x=\"$x\"
17288 exec_prefix="$acl_save_exec_prefix"
17289 prefix="$acl_save_prefix"
17290
17291 if test "X$x" = "X$element"; then
17292 haveit=yes
17293 break
17294 fi
17295 done
17296 if test -z "$haveit"; then
17297 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17298 fi
17299 done
17300
17301
17302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17303 $as_echo_n "checking for liblzma... " >&6; }
17304 if ${ac_cv_liblzma+:} false; then :
17305 $as_echo_n "(cached) " >&6
17306 else
17307
17308 ac_save_LIBS="$LIBS"
17309 LIBS="$LIBS $LIBLZMA"
17310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17311 /* end confdefs.h. */
17312 #include "lzma.h"
17313 int
17314 main ()
17315 {
17316 lzma_index_iter iter;
17317 lzma_index_iter_init (&iter, 0);
17318 lzma_mf_is_supported (LZMA_MF_HC3);
17319 ;
17320 return 0;
17321 }
17322 _ACEOF
17323 if ac_fn_c_try_link "$LINENO"; then :
17324 ac_cv_liblzma=yes
17325 else
17326 ac_cv_liblzma=no
17327 fi
17328 rm -f core conftest.err conftest.$ac_objext \
17329 conftest$ac_exeext conftest.$ac_ext
17330 LIBS="$ac_save_LIBS"
17331
17332 fi
17333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17334 $as_echo "$ac_cv_liblzma" >&6; }
17335 if test "$ac_cv_liblzma" = yes; then
17336 HAVE_LIBLZMA=yes
17337
17338 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17339
17340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17341 $as_echo_n "checking how to link with liblzma... " >&6; }
17342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17343 $as_echo "$LIBLZMA" >&6; }
17344 else
17345 HAVE_LIBLZMA=no
17346 CPPFLAGS="$ac_save_CPPFLAGS"
17347 LIBLZMA=
17348 LTLIBLZMA=
17349 fi
17350
17351
17352
17353
17354
17355
17356 if test "$HAVE_LIBLZMA" != yes; then
17357 if test "$with_lzma" = yes; then
17358 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17359 fi
17360 fi
17361 fi
17362 fi
17363
17364 LIBGUI="../libgui/src/libgui.a"
17365 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17366
17367
17368
17369 WIN32LDAPP=
17370
17371
17372
17373 case "${host}" in
17374 *-*-cygwin* | *-*-mingw* )
17375 configdir="win"
17376 ;;
17377 *)
17378 configdir="unix"
17379 ;;
17380 esac
17381
17382 GDBTKLIBS=
17383 if test "${enable_gdbtk}" = "yes"; then
17384
17385 # Gdbtk must have an absolute path to srcdir in order to run
17386 # properly when not installed.
17387 here=`pwd`
17388 cd ${srcdir}
17389 GDBTK_SRC_DIR=`pwd`
17390 cd $here
17391
17392
17393 #
17394 # Ok, lets find the tcl configuration
17395 # First, look for one uninstalled.
17396 # the alternative search directory is invoked by --with-tcl
17397 #
17398
17399 if test x"${no_tcl}" = x ; then
17400 # we reset no_tcl in case something fails here
17401 no_tcl=true
17402
17403 # Check whether --with-tcl was given.
17404 if test "${with_tcl+set}" = set; then :
17405 withval=$with_tcl; with_tclconfig=${withval}
17406 fi
17407
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17409 $as_echo_n "checking for Tcl configuration... " >&6; }
17410 if ${ac_cv_c_tclconfig+:} false; then :
17411 $as_echo_n "(cached) " >&6
17412 else
17413
17414
17415 # First check to see if --with-tcl was specified.
17416 case "${host}" in
17417 *-*-cygwin*) platDir="win" ;;
17418 *) platDir="unix" ;;
17419 esac
17420 if test x"${with_tclconfig}" != x ; then
17421 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17422 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17423 else
17424 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17425 fi
17426 fi
17427
17428 # then check for a private Tcl installation
17429 if test x"${ac_cv_c_tclconfig}" = x ; then
17430 for i in \
17431 ../tcl \
17432 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17433 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17434 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17435 ../../tcl \
17436 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17437 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17438 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17439 ../../../tcl \
17440 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17441 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17442 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17443 if test -f "$i/$platDir/tclConfig.sh" ; then
17444 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17445 break
17446 fi
17447 done
17448 fi
17449
17450 # on Darwin, check in Framework installation locations
17451 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17452 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17453 `ls -d /Library/Frameworks 2>/dev/null` \
17454 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17455 `ls -d /System/Library/Frameworks 2>/dev/null` \
17456 ; do
17457 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17458 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17459 break
17460 fi
17461 done
17462 fi
17463
17464 # check in a few common install locations
17465 if test x"${ac_cv_c_tclconfig}" = x ; then
17466 for i in `ls -d ${libdir} 2>/dev/null` \
17467 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17468 `ls -d ${prefix}/lib 2>/dev/null` \
17469 `ls -d /usr/local/lib 2>/dev/null` \
17470 `ls -d /usr/contrib/lib 2>/dev/null` \
17471 `ls -d /usr/lib 2>/dev/null` \
17472 ; do
17473 if test -f "$i/tclConfig.sh" ; then
17474 ac_cv_c_tclconfig=`(cd $i; pwd)`
17475 break
17476 fi
17477 done
17478 fi
17479
17480 # check in a few other private locations
17481 if test x"${ac_cv_c_tclconfig}" = x ; then
17482 for i in \
17483 ${srcdir}/../tcl \
17484 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17485 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17486 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17487 if test -f "$i/$platDir/tclConfig.sh" ; then
17488 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17489 break
17490 fi
17491 done
17492 fi
17493
17494 fi
17495
17496
17497 if test x"${ac_cv_c_tclconfig}" = x ; then
17498 TCL_BIN_DIR="# no Tcl configs found"
17499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17500 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17501 else
17502 no_tcl=
17503 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17505 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17506 fi
17507 fi
17508
17509
17510 # If $no_tk is nonempty, then we can't do Tk, and there is no
17511 # point to doing Tcl.
17512
17513 #
17514 # Ok, lets find the tk configuration
17515 # First, look for one uninstalled.
17516 # the alternative search directory is invoked by --with-tk
17517 #
17518
17519 if test x"${no_tk}" = x ; then
17520 # we reset no_tk in case something fails here
17521 no_tk=true
17522
17523 # Check whether --with-tk was given.
17524 if test "${with_tk+set}" = set; then :
17525 withval=$with_tk; with_tkconfig=${withval}
17526 fi
17527
17528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17529 $as_echo_n "checking for Tk configuration... " >&6; }
17530 if ${ac_cv_c_tkconfig+:} false; then :
17531 $as_echo_n "(cached) " >&6
17532 else
17533
17534
17535 # First check to see if --with-tkconfig was specified.
17536 if test x"${with_tkconfig}" != x ; then
17537 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17538 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17539 else
17540 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17541 fi
17542 fi
17543
17544 # then check for a private Tk library
17545 case "${host}" in
17546 *-*-cygwin*) platDir="win" ;;
17547 *) platDir="unix" ;;
17548 esac
17549 if test x"${ac_cv_c_tkconfig}" = x ; then
17550 for i in \
17551 ../tk \
17552 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17553 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17554 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17555 ../../tk \
17556 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17557 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17558 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17559 ../../../tk \
17560 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17561 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17562 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17563 if test -f "$i/$platDir/tkConfig.sh" ; then
17564 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17565 break
17566 fi
17567 done
17568 fi
17569
17570 # on Darwin, check in Framework installation locations
17571 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17572 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17573 `ls -d /Library/Frameworks 2>/dev/null` \
17574 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17575 `ls -d /System/Library/Frameworks 2>/dev/null` \
17576 ; do
17577 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17578 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17579 break
17580 fi
17581 done
17582 fi
17583
17584 # check in a few common install locations
17585 if test x"${ac_cv_c_tkconfig}" = x ; then
17586 for i in `ls -d ${libdir} 2>/dev/null` \
17587 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17588 `ls -d ${prefix}/lib 2>/dev/null` \
17589 `ls -d /usr/local/lib 2>/dev/null` \
17590 `ls -d /usr/contrib/lib 2>/dev/null` \
17591 `ls -d /usr/lib 2>/dev/null` \
17592 ; do
17593 if test -f "$i/tkConfig.sh" ; then
17594 ac_cv_c_tkconfig=`(cd $i; pwd)`
17595 break
17596 fi
17597 done
17598 fi
17599 # check in a few other private locations
17600 if test x"${ac_cv_c_tkconfig}" = x ; then
17601 for i in \
17602 ${srcdir}/../tk \
17603 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17604 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17605 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17606 if test -f "$i/$platDir/tkConfig.sh" ; then
17607 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17608 break
17609 fi
17610 done
17611 fi
17612
17613 fi
17614
17615
17616 if test x"${ac_cv_c_tkconfig}" = x ; then
17617 TK_BIN_DIR="# no Tk configs found"
17618 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17619 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
17620 else
17621 no_tk=
17622 TK_BIN_DIR=${ac_cv_c_tkconfig}
17623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17624 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17625 fi
17626 fi
17627
17628
17629 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17630
17631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17632 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
17633
17634 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
17635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17636 $as_echo "loading" >&6; }
17637 . ${TCL_BIN_DIR}/tclConfig.sh
17638 else
17639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17640 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17641 fi
17642
17643 # eval is required to do the TCL_DBGX substitution
17644 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17645 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17646
17647 # If the TCL_BIN_DIR is the build directory (not the install directory),
17648 # then set the common variable name to the value of the build variables.
17649 # For example, the variable TCL_LIB_SPEC will be set to the value
17650 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17651 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17652 # installed and uninstalled version of Tcl.
17653 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17654 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17655 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17656 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17657 elif test "`uname -s`" = "Darwin"; then
17658 # If Tcl was built as a framework, attempt to use the libraries
17659 # from the framework at the given location so that linking works
17660 # against Tcl.framework installed in an arbitrary location.
17661 case ${TCL_DEFS} in
17662 *TCL_FRAMEWORK*)
17663 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17664 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17665 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17666 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17667 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17668 break
17669 fi
17670 done
17671 fi
17672 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17673 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17674 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17675 fi
17676 ;;
17677 esac
17678 fi
17679
17680 # eval is required to do the TCL_DBGX substitution
17681 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17682 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17683 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17684 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700 # Check for in-tree tcl
17701 here=`pwd`
17702 cd ${srcdir}/..
17703 topdir=`pwd`
17704 cd ${here}
17705
17706 intree="no"
17707 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17708 intree="yes"
17709 fi
17710
17711 # Find Tcl private headers
17712 if test x"${intree}" = xno; then
17713
17714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17715 $as_echo_n "checking for Tcl private headers... " >&6; }
17716 private_dir=""
17717 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17718 if test -f ${dir}/tclInt.h ; then
17719 private_dir=${dir}
17720 fi
17721
17722 if test x"${private_dir}" = x; then
17723 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
17724 else
17725 TCL_PRIVATE_INCLUDE="-I${private_dir}"
17726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17727 $as_echo "${private_dir}" >&6; }
17728 fi
17729
17730 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17731 TCL_LIBRARY="${TCL_LIB_SPEC}"
17732 TCL_DEPS=""
17733 else
17734 # If building tcl in the same src tree, private headers
17735 # are not needed, but we need to be sure to use the right
17736 # headers library
17737 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17738 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17739 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17740 fi
17741
17742
17743
17744
17745
17746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17747 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
17748
17749 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
17750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17751 $as_echo "loading" >&6; }
17752 . ${TK_BIN_DIR}/tkConfig.sh
17753 else
17754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17755 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17756 fi
17757
17758 # eval is required to do the TK_DBGX substitution
17759 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17760 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17761
17762 # If the TK_BIN_DIR is the build directory (not the install directory),
17763 # then set the common variable name to the value of the build variables.
17764 # For example, the variable TK_LIB_SPEC will be set to the value
17765 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17766 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17767 # installed and uninstalled version of Tcl.
17768 if test -f "${TK_BIN_DIR}/Makefile" ; then
17769 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17770 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17771 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17772 elif test "`uname -s`" = "Darwin"; then
17773 # If Tk was built as a framework, attempt to use the libraries
17774 # from the framework at the given location so that linking works
17775 # against Tk.framework installed in an arbitrary location.
17776 case ${TK_DEFS} in
17777 *TK_FRAMEWORK*)
17778 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
17779 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17780 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17781 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17782 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17783 break
17784 fi
17785 done
17786 fi
17787 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
17788 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17789 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17790 fi
17791 ;;
17792 esac
17793 fi
17794
17795 # eval is required to do the TK_DBGX substitution
17796 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17797 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17798 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17799 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814 # Check for in-tree Tk
17815 intree="no"
17816 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17817 intree="yes"
17818 fi
17819
17820 # Find Tk private headers
17821 if test x"${intree}" = xno; then
17822
17823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17824 $as_echo_n "checking for Tk private headers... " >&6; }
17825 private_dir=""
17826 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17827 if test -f ${dir}/tkInt.h; then
17828 private_dir=${dir}
17829 fi
17830
17831 if test x"${private_dir}" = x; then
17832 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
17833 else
17834 TK_PRIVATE_INCLUDE="-I${private_dir}"
17835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17836 $as_echo "${private_dir}" >&6; }
17837 fi
17838
17839 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17840 TK_LIBRARY=${TK_LIB_SPEC}
17841 TK_DEPS=""
17842 else
17843 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17844 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17845 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17846 fi
17847
17848
17849
17850
17851
17852 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
17853
17854 # Include some libraries that Tcl and Tk want.
17855 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17856 # Yes, the ordering seems wrong here. But it isn't.
17857 # TK_LIBS is the list of libraries that need to be linked
17858 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17859 # were in LIBS then any link tests after this point would
17860 # try to include things like `$(LIBGUI)', which wouldn't work.
17861 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
17862
17863 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17864 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17865 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17866 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17867 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17868 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17869 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
17870
17871 if test x"$gdb_cv_os_cygwin" = xyes; then
17872 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17873 WIN32LDAPP="-Wl,--subsystem,console"
17874 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
17875 fi
17876
17877 subdirs="$subdirs gdbtk"
17878
17879 fi
17880 fi
17881
17882
17883
17884
17885
17886
17887
17888
17889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17890 $as_echo_n "checking for X... " >&6; }
17891
17892
17893 # Check whether --with-x was given.
17894 if test "${with_x+set}" = set; then :
17895 withval=$with_x;
17896 fi
17897
17898 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17899 if test "x$with_x" = xno; then
17900 # The user explicitly disabled X.
17901 have_x=disabled
17902 else
17903 case $x_includes,$x_libraries in #(
17904 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17905 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
17906 $as_echo_n "(cached) " >&6
17907 else
17908 # One or both of the vars are not set, and there is no cached value.
17909 ac_x_includes=no ac_x_libraries=no
17910 rm -f -r conftest.dir
17911 if mkdir conftest.dir; then
17912 cd conftest.dir
17913 cat >Imakefile <<'_ACEOF'
17914 incroot:
17915 @echo incroot='${INCROOT}'
17916 usrlibdir:
17917 @echo usrlibdir='${USRLIBDIR}'
17918 libdir:
17919 @echo libdir='${LIBDIR}'
17920 _ACEOF
17921 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17922 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
17923 for ac_var in incroot usrlibdir libdir; do
17924 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17925 done
17926 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17927 for ac_extension in a so sl dylib la dll; do
17928 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17929 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17930 ac_im_usrlibdir=$ac_im_libdir; break
17931 fi
17932 done
17933 # Screen out bogus values from the imake configuration. They are
17934 # bogus both because they are the default anyway, and because
17935 # using them would break gcc on systems where it needs fixed includes.
17936 case $ac_im_incroot in
17937 /usr/include) ac_x_includes= ;;
17938 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17939 esac
17940 case $ac_im_usrlibdir in
17941 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17942 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17943 esac
17944 fi
17945 cd ..
17946 rm -f -r conftest.dir
17947 fi
17948
17949 # Standard set of common directories for X headers.
17950 # Check X11 before X11Rn because it is often a symlink to the current release.
17951 ac_x_header_dirs='
17952 /usr/X11/include
17953 /usr/X11R7/include
17954 /usr/X11R6/include
17955 /usr/X11R5/include
17956 /usr/X11R4/include
17957
17958 /usr/include/X11
17959 /usr/include/X11R7
17960 /usr/include/X11R6
17961 /usr/include/X11R5
17962 /usr/include/X11R4
17963
17964 /usr/local/X11/include
17965 /usr/local/X11R7/include
17966 /usr/local/X11R6/include
17967 /usr/local/X11R5/include
17968 /usr/local/X11R4/include
17969
17970 /usr/local/include/X11
17971 /usr/local/include/X11R7
17972 /usr/local/include/X11R6
17973 /usr/local/include/X11R5
17974 /usr/local/include/X11R4
17975
17976 /usr/X386/include
17977 /usr/x386/include
17978 /usr/XFree86/include/X11
17979
17980 /usr/include
17981 /usr/local/include
17982 /usr/unsupported/include
17983 /usr/athena/include
17984 /usr/local/x11r5/include
17985 /usr/lpp/Xamples/include
17986
17987 /usr/openwin/include
17988 /usr/openwin/share/include'
17989
17990 if test "$ac_x_includes" = no; then
17991 # Guess where to find include files, by looking for Xlib.h.
17992 # First, try using that file with no special directory specified.
17993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17994 /* end confdefs.h. */
17995 #include <X11/Xlib.h>
17996 _ACEOF
17997 if ac_fn_c_try_cpp "$LINENO"; then :
17998 # We can compile using X headers with no special include directory.
17999 ac_x_includes=
18000 else
18001 for ac_dir in $ac_x_header_dirs; do
18002 if test -r "$ac_dir/X11/Xlib.h"; then
18003 ac_x_includes=$ac_dir
18004 break
18005 fi
18006 done
18007 fi
18008 rm -f conftest.err conftest.i conftest.$ac_ext
18009 fi # $ac_x_includes = no
18010
18011 if test "$ac_x_libraries" = no; then
18012 # Check for the libraries.
18013 # See if we find them without any special options.
18014 # Don't add to $LIBS permanently.
18015 ac_save_LIBS=$LIBS
18016 LIBS="-lX11 $LIBS"
18017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18018 /* end confdefs.h. */
18019 #include <X11/Xlib.h>
18020 int
18021 main ()
18022 {
18023 XrmInitialize ()
18024 ;
18025 return 0;
18026 }
18027 _ACEOF
18028 if ac_fn_c_try_link "$LINENO"; then :
18029 LIBS=$ac_save_LIBS
18030 # We can link X programs with no special library path.
18031 ac_x_libraries=
18032 else
18033 LIBS=$ac_save_LIBS
18034 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18035 do
18036 # Don't even attempt the hair of trying to link an X program!
18037 for ac_extension in a so sl dylib la dll; do
18038 if test -r "$ac_dir/libX11.$ac_extension"; then
18039 ac_x_libraries=$ac_dir
18040 break 2
18041 fi
18042 done
18043 done
18044 fi
18045 rm -f core conftest.err conftest.$ac_objext \
18046 conftest$ac_exeext conftest.$ac_ext
18047 fi # $ac_x_libraries = no
18048
18049 case $ac_x_includes,$ac_x_libraries in #(
18050 no,* | *,no | *\'*)
18051 # Didn't find X, or a directory has "'" in its name.
18052 ac_cv_have_x="have_x=no";; #(
18053 *)
18054 # Record where we found X for the cache.
18055 ac_cv_have_x="have_x=yes\
18056 ac_x_includes='$ac_x_includes'\
18057 ac_x_libraries='$ac_x_libraries'"
18058 esac
18059 fi
18060 ;; #(
18061 *) have_x=yes;;
18062 esac
18063 eval "$ac_cv_have_x"
18064 fi # $with_x != no
18065
18066 if test "$have_x" != yes; then
18067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18068 $as_echo "$have_x" >&6; }
18069 no_x=yes
18070 else
18071 # If each of the values was on the command line, it overrides each guess.
18072 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18073 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18074 # Update the cache value to reflect the command line values.
18075 ac_cv_have_x="have_x=yes\
18076 ac_x_includes='$x_includes'\
18077 ac_x_libraries='$x_libraries'"
18078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18079 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18080 fi
18081
18082
18083 # Unlike the sim directory, whether a simulator is linked is controlled by
18084 # presence of a gdb_sim definition in the target configure.tgt entry.
18085 # This code just checks for a few cases where we'd like to ignore those
18086 # definitions, even when they're present in the '.mt' file. These cases
18087 # are when --disable-sim is specified, or if the simulator directory is
18088 # not part of the source tree.
18089 #
18090 # Check whether --enable-sim was given.
18091 if test "${enable_sim+set}" = set; then :
18092 enableval=$enable_sim; echo "enable_sim = $enable_sim";
18093 echo "enableval = ${enableval}";
18094 case "${enableval}" in
18095 yes) ignore_sim=false ;;
18096 no) ignore_sim=true ;;
18097 *) ignore_sim=false ;;
18098 esac
18099 else
18100 ignore_sim=false
18101 fi
18102
18103
18104 if test ! -d "${srcdir}/../sim"; then
18105 ignore_sim=true
18106 fi
18107
18108 SIM=
18109 SIM_OBS=
18110 if test "${ignore_sim}" = "false"; then
18111 if test x"${gdb_sim}" != x ; then
18112 SIM="${gdb_sim}"
18113 SIM_OBS="remote-sim.o"
18114
18115 $as_echo "#define WITH_SIM 1" >>confdefs.h
18116
18117
18118 # Some tdep code should only be compiled in when the ppc sim is
18119 # built. PR sim/13418.
18120 case $target in
18121 powerpc*-*-*)
18122
18123 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18124
18125 ;;
18126 esac
18127 fi
18128 fi
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143 # List of host floatformats.
18144
18145 cat >>confdefs.h <<_ACEOF
18146 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18147 _ACEOF
18148
18149
18150 cat >>confdefs.h <<_ACEOF
18151 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18152 _ACEOF
18153
18154
18155 cat >>confdefs.h <<_ACEOF
18156 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18157 _ACEOF
18158
18159
18160 # target_subdir is used by the testsuite to find the target libraries.
18161 target_subdir=
18162 if test "${host}" != "${target}"; then
18163 target_subdir="${target_alias}/"
18164 fi
18165
18166
18167 # Import nat definitions.
18168 nat_makefile_frag=/dev/null
18169 if test "${gdb_native}" = "yes"; then
18170 . ${srcdir}/configure.nat
18171 nativefile=$NAT_FILE
18172 fi
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184 if test x"${gdb_osabi}" != x ; then
18185
18186 cat >>confdefs.h <<_ACEOF
18187 #define GDB_OSABI_DEFAULT $gdb_osabi
18188 _ACEOF
18189
18190 fi
18191
18192 # Check for babeltrace and babeltrace-ctf
18193
18194 # Check whether --with-babeltrace was given.
18195 if test "${with_babeltrace+set}" = set; then :
18196 withval=$with_babeltrace;
18197 else
18198 with_babeltrace=auto
18199 fi
18200
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18202 $as_echo_n "checking whether to use babeltrace... " >&6; }
18203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18204 $as_echo "$with_babeltrace" >&6; }
18205
18206 if test "x$with_babeltrace" = "xno"; then
18207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18208 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18209 else
18210 # Append -Werror to CFLAGS so that configure can catch the warning
18211 # "assignment from incompatible pointer type", which is related to
18212 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18213 # in GDB, while babeltrace 1.0.3 is broken.
18214 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18215 # safe to save and restore CFLAGS here.
18216 saved_CFLAGS=$CFLAGS
18217 CFLAGS="$CFLAGS -Werror"
18218
18219
18220
18221
18222
18223
18224
18225
18226 use_additional=yes
18227
18228 acl_save_prefix="$prefix"
18229 prefix="$acl_final_prefix"
18230 acl_save_exec_prefix="$exec_prefix"
18231 exec_prefix="$acl_final_exec_prefix"
18232
18233 eval additional_includedir=\"$includedir\"
18234 eval additional_libdir=\"$libdir\"
18235
18236 exec_prefix="$acl_save_exec_prefix"
18237 prefix="$acl_save_prefix"
18238
18239
18240 # Check whether --with-libbabeltrace-prefix was given.
18241 if test "${with_libbabeltrace_prefix+set}" = set; then :
18242 withval=$with_libbabeltrace_prefix;
18243 if test "X$withval" = "Xno"; then
18244 use_additional=no
18245 else
18246 if test "X$withval" = "X"; then
18247
18248 acl_save_prefix="$prefix"
18249 prefix="$acl_final_prefix"
18250 acl_save_exec_prefix="$exec_prefix"
18251 exec_prefix="$acl_final_exec_prefix"
18252
18253 eval additional_includedir=\"$includedir\"
18254 eval additional_libdir=\"$libdir\"
18255
18256 exec_prefix="$acl_save_exec_prefix"
18257 prefix="$acl_save_prefix"
18258
18259 else
18260 additional_includedir="$withval/include"
18261 additional_libdir="$withval/lib"
18262 fi
18263 fi
18264
18265 fi
18266
18267
18268 # Check whether --with-libbabeltrace-type was given.
18269 if test "${with_libbabeltrace_type+set}" = set; then :
18270 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18271 else
18272 with_libbabeltrace_type=auto
18273 fi
18274
18275 lib_type=`eval echo \$with_libbabeltrace_type`
18276
18277 LIBBABELTRACE=
18278 LTLIBBABELTRACE=
18279 INCBABELTRACE=
18280 rpathdirs=
18281 ltrpathdirs=
18282 names_already_handled=
18283 names_next_round='babeltrace babeltrace-ctf'
18284 while test -n "$names_next_round"; do
18285 names_this_round="$names_next_round"
18286 names_next_round=
18287 for name in $names_this_round; do
18288 already_handled=
18289 for n in $names_already_handled; do
18290 if test "$n" = "$name"; then
18291 already_handled=yes
18292 break
18293 fi
18294 done
18295 if test -z "$already_handled"; then
18296 names_already_handled="$names_already_handled $name"
18297 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18298 eval value=\"\$HAVE_LIB$uppername\"
18299 if test -n "$value"; then
18300 if test "$value" = yes; then
18301 eval value=\"\$LIB$uppername\"
18302 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18303 eval value=\"\$LTLIB$uppername\"
18304 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18305 else
18306 :
18307 fi
18308 else
18309 found_dir=
18310 found_la=
18311 found_so=
18312 found_a=
18313 if test $use_additional = yes; then
18314 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18315 found_dir="$additional_libdir"
18316 found_so="$additional_libdir/lib$name.$shlibext"
18317 if test -f "$additional_libdir/lib$name.la"; then
18318 found_la="$additional_libdir/lib$name.la"
18319 fi
18320 elif test x$lib_type != xshared; then
18321 if test -f "$additional_libdir/lib$name.$libext"; then
18322 found_dir="$additional_libdir"
18323 found_a="$additional_libdir/lib$name.$libext"
18324 if test -f "$additional_libdir/lib$name.la"; then
18325 found_la="$additional_libdir/lib$name.la"
18326 fi
18327 fi
18328 fi
18329 fi
18330 if test "X$found_dir" = "X"; then
18331 for x in $LDFLAGS $LTLIBBABELTRACE; do
18332
18333 acl_save_prefix="$prefix"
18334 prefix="$acl_final_prefix"
18335 acl_save_exec_prefix="$exec_prefix"
18336 exec_prefix="$acl_final_exec_prefix"
18337 eval x=\"$x\"
18338 exec_prefix="$acl_save_exec_prefix"
18339 prefix="$acl_save_prefix"
18340
18341 case "$x" in
18342 -L*)
18343 dir=`echo "X$x" | sed -e 's/^X-L//'`
18344 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18345 found_dir="$dir"
18346 found_so="$dir/lib$name.$shlibext"
18347 if test -f "$dir/lib$name.la"; then
18348 found_la="$dir/lib$name.la"
18349 fi
18350 elif test x$lib_type != xshared; then
18351 if test -f "$dir/lib$name.$libext"; then
18352 found_dir="$dir"
18353 found_a="$dir/lib$name.$libext"
18354 if test -f "$dir/lib$name.la"; then
18355 found_la="$dir/lib$name.la"
18356 fi
18357 fi
18358 fi
18359 ;;
18360 esac
18361 if test "X$found_dir" != "X"; then
18362 break
18363 fi
18364 done
18365 fi
18366 if test "X$found_dir" != "X"; then
18367 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18368 if test "X$found_so" != "X"; then
18369 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18370 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18371 else
18372 haveit=
18373 for x in $ltrpathdirs; do
18374 if test "X$x" = "X$found_dir"; then
18375 haveit=yes
18376 break
18377 fi
18378 done
18379 if test -z "$haveit"; then
18380 ltrpathdirs="$ltrpathdirs $found_dir"
18381 fi
18382 if test "$hardcode_direct" = yes; then
18383 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18384 else
18385 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18386 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18387 haveit=
18388 for x in $rpathdirs; do
18389 if test "X$x" = "X$found_dir"; then
18390 haveit=yes
18391 break
18392 fi
18393 done
18394 if test -z "$haveit"; then
18395 rpathdirs="$rpathdirs $found_dir"
18396 fi
18397 else
18398 haveit=
18399 for x in $LDFLAGS $LIBBABELTRACE; do
18400
18401 acl_save_prefix="$prefix"
18402 prefix="$acl_final_prefix"
18403 acl_save_exec_prefix="$exec_prefix"
18404 exec_prefix="$acl_final_exec_prefix"
18405 eval x=\"$x\"
18406 exec_prefix="$acl_save_exec_prefix"
18407 prefix="$acl_save_prefix"
18408
18409 if test "X$x" = "X-L$found_dir"; then
18410 haveit=yes
18411 break
18412 fi
18413 done
18414 if test -z "$haveit"; then
18415 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18416 fi
18417 if test "$hardcode_minus_L" != no; then
18418 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18419 else
18420 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18421 fi
18422 fi
18423 fi
18424 fi
18425 else
18426 if test "X$found_a" != "X"; then
18427 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18428 else
18429 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18430 fi
18431 fi
18432 additional_includedir=
18433 case "$found_dir" in
18434 */lib | */lib/)
18435 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18436 additional_includedir="$basedir/include"
18437 ;;
18438 esac
18439 if test "X$additional_includedir" != "X"; then
18440 if test "X$additional_includedir" != "X/usr/include"; then
18441 haveit=
18442 if test "X$additional_includedir" = "X/usr/local/include"; then
18443 if test -n "$GCC"; then
18444 case $host_os in
18445 linux*) haveit=yes;;
18446 esac
18447 fi
18448 fi
18449 if test -z "$haveit"; then
18450 for x in $CPPFLAGS $INCBABELTRACE; do
18451
18452 acl_save_prefix="$prefix"
18453 prefix="$acl_final_prefix"
18454 acl_save_exec_prefix="$exec_prefix"
18455 exec_prefix="$acl_final_exec_prefix"
18456 eval x=\"$x\"
18457 exec_prefix="$acl_save_exec_prefix"
18458 prefix="$acl_save_prefix"
18459
18460 if test "X$x" = "X-I$additional_includedir"; then
18461 haveit=yes
18462 break
18463 fi
18464 done
18465 if test -z "$haveit"; then
18466 if test -d "$additional_includedir"; then
18467 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18468 fi
18469 fi
18470 fi
18471 fi
18472 fi
18473 if test -n "$found_la"; then
18474 save_libdir="$libdir"
18475 case "$found_la" in
18476 */* | *\\*) . "$found_la" ;;
18477 *) . "./$found_la" ;;
18478 esac
18479 libdir="$save_libdir"
18480 for dep in $dependency_libs; do
18481 case "$dep" in
18482 -L*)
18483 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18484 if test "X$additional_libdir" != "X/usr/lib"; then
18485 haveit=
18486 if test "X$additional_libdir" = "X/usr/local/lib"; then
18487 if test -n "$GCC"; then
18488 case $host_os in
18489 linux*) haveit=yes;;
18490 esac
18491 fi
18492 fi
18493 if test -z "$haveit"; then
18494 haveit=
18495 for x in $LDFLAGS $LIBBABELTRACE; do
18496
18497 acl_save_prefix="$prefix"
18498 prefix="$acl_final_prefix"
18499 acl_save_exec_prefix="$exec_prefix"
18500 exec_prefix="$acl_final_exec_prefix"
18501 eval x=\"$x\"
18502 exec_prefix="$acl_save_exec_prefix"
18503 prefix="$acl_save_prefix"
18504
18505 if test "X$x" = "X-L$additional_libdir"; then
18506 haveit=yes
18507 break
18508 fi
18509 done
18510 if test -z "$haveit"; then
18511 if test -d "$additional_libdir"; then
18512 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18513 fi
18514 fi
18515 haveit=
18516 for x in $LDFLAGS $LTLIBBABELTRACE; do
18517
18518 acl_save_prefix="$prefix"
18519 prefix="$acl_final_prefix"
18520 acl_save_exec_prefix="$exec_prefix"
18521 exec_prefix="$acl_final_exec_prefix"
18522 eval x=\"$x\"
18523 exec_prefix="$acl_save_exec_prefix"
18524 prefix="$acl_save_prefix"
18525
18526 if test "X$x" = "X-L$additional_libdir"; then
18527 haveit=yes
18528 break
18529 fi
18530 done
18531 if test -z "$haveit"; then
18532 if test -d "$additional_libdir"; then
18533 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18534 fi
18535 fi
18536 fi
18537 fi
18538 ;;
18539 -R*)
18540 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18541 if test "$enable_rpath" != no; then
18542 haveit=
18543 for x in $rpathdirs; do
18544 if test "X$x" = "X$dir"; then
18545 haveit=yes
18546 break
18547 fi
18548 done
18549 if test -z "$haveit"; then
18550 rpathdirs="$rpathdirs $dir"
18551 fi
18552 haveit=
18553 for x in $ltrpathdirs; do
18554 if test "X$x" = "X$dir"; then
18555 haveit=yes
18556 break
18557 fi
18558 done
18559 if test -z "$haveit"; then
18560 ltrpathdirs="$ltrpathdirs $dir"
18561 fi
18562 fi
18563 ;;
18564 -l*)
18565 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18566 ;;
18567 *.la)
18568 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18569 ;;
18570 *)
18571 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18572 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18573 ;;
18574 esac
18575 done
18576 fi
18577 else
18578 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18579 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18580 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18581 else
18582 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18583 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18584 fi
18585 fi
18586 fi
18587 fi
18588 done
18589 done
18590 if test "X$rpathdirs" != "X"; then
18591 if test -n "$hardcode_libdir_separator"; then
18592 alldirs=
18593 for found_dir in $rpathdirs; do
18594 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18595 done
18596 acl_save_libdir="$libdir"
18597 libdir="$alldirs"
18598 eval flag=\"$hardcode_libdir_flag_spec\"
18599 libdir="$acl_save_libdir"
18600 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18601 else
18602 for found_dir in $rpathdirs; do
18603 acl_save_libdir="$libdir"
18604 libdir="$found_dir"
18605 eval flag=\"$hardcode_libdir_flag_spec\"
18606 libdir="$acl_save_libdir"
18607 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18608 done
18609 fi
18610 fi
18611 if test "X$ltrpathdirs" != "X"; then
18612 for found_dir in $ltrpathdirs; do
18613 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18614 done
18615 fi
18616
18617
18618 ac_save_CPPFLAGS="$CPPFLAGS"
18619
18620 for element in $INCBABELTRACE; do
18621 haveit=
18622 for x in $CPPFLAGS; do
18623
18624 acl_save_prefix="$prefix"
18625 prefix="$acl_final_prefix"
18626 acl_save_exec_prefix="$exec_prefix"
18627 exec_prefix="$acl_final_exec_prefix"
18628 eval x=\"$x\"
18629 exec_prefix="$acl_save_exec_prefix"
18630 prefix="$acl_save_prefix"
18631
18632 if test "X$x" = "X$element"; then
18633 haveit=yes
18634 break
18635 fi
18636 done
18637 if test -z "$haveit"; then
18638 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18639 fi
18640 done
18641
18642
18643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18644 $as_echo_n "checking for libbabeltrace... " >&6; }
18645 if ${ac_cv_libbabeltrace+:} false; then :
18646 $as_echo_n "(cached) " >&6
18647 else
18648
18649 ac_save_LIBS="$LIBS"
18650 LIBS="$LIBS $LIBBABELTRACE"
18651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18652 /* end confdefs.h. */
18653 #include <babeltrace/babeltrace.h>
18654 #include <babeltrace/ctf/events.h>
18655 #include <babeltrace/ctf/iterator.h>
18656 int
18657 main ()
18658 {
18659 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18660 struct bt_ctf_event *event = NULL;
18661 const struct bt_definition *scope;
18662
18663 pos->type = BT_SEEK_BEGIN;
18664 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
18665 scope = bt_ctf_get_top_level_scope (event,
18666 BT_STREAM_EVENT_HEADER);
18667 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18668
18669 ;
18670 return 0;
18671 }
18672 _ACEOF
18673 if ac_fn_c_try_link "$LINENO"; then :
18674 ac_cv_libbabeltrace=yes
18675 else
18676 ac_cv_libbabeltrace=no
18677 fi
18678 rm -f core conftest.err conftest.$ac_objext \
18679 conftest$ac_exeext conftest.$ac_ext
18680 LIBS="$ac_save_LIBS"
18681
18682 fi
18683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18684 $as_echo "$ac_cv_libbabeltrace" >&6; }
18685 if test "$ac_cv_libbabeltrace" = yes; then
18686 HAVE_LIBBABELTRACE=yes
18687
18688 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18689
18690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18691 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
18692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18693 $as_echo "$LIBBABELTRACE" >&6; }
18694 else
18695 HAVE_LIBBABELTRACE=no
18696 CPPFLAGS="$ac_save_CPPFLAGS"
18697 LIBBABELTRACE=
18698 LTLIBBABELTRACE=
18699 fi
18700
18701
18702
18703
18704
18705
18706 CFLAGS=$saved_CFLAGS
18707
18708 if test "$HAVE_LIBBABELTRACE" != yes; then
18709 if test "$with_babeltrace" = yes; then
18710 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
18711 else
18712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18713 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18714 fi
18715 fi
18716 fi
18717
18718 # Check for xxhash
18719
18720 # Check whether --with-xxhash was given.
18721 if test "${with_xxhash+set}" = set; then :
18722 withval=$with_xxhash;
18723 else
18724 with_xxhash=auto
18725 fi
18726
18727
18728 # Check whether --enable-libctf was given.
18729 if test "${enable_libctf+set}" = set; then :
18730 enableval=$enable_libctf;
18731 case "$enableval" in
18732 yes|no) ;;
18733 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18734 esac
18735
18736 else
18737 enable_libctf=yes
18738 fi
18739
18740
18741 if test x${enable_static} = xno; then
18742 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18743 CTF_DEPS="../libctf/.libs/libctf.so"
18744 else
18745 LIBCTF="../libctf/.libs/libctf.a"
18746 CTF_DEPS="$LIBCTF"
18747 fi
18748 if test "${enable_libctf}" = yes; then
18749
18750 $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18751
18752 else
18753 LIBCTF=
18754 CTF_DEPS=
18755 fi
18756
18757
18758
18759
18760 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18761 # empty version.
18762
18763 if test "x$with_xxhash" != "xno"; then
18764
18765
18766
18767
18768
18769
18770
18771
18772 use_additional=yes
18773
18774 acl_save_prefix="$prefix"
18775 prefix="$acl_final_prefix"
18776 acl_save_exec_prefix="$exec_prefix"
18777 exec_prefix="$acl_final_exec_prefix"
18778
18779 eval additional_includedir=\"$includedir\"
18780 eval additional_libdir=\"$libdir\"
18781
18782 exec_prefix="$acl_save_exec_prefix"
18783 prefix="$acl_save_prefix"
18784
18785
18786 # Check whether --with-libxxhash-prefix was given.
18787 if test "${with_libxxhash_prefix+set}" = set; then :
18788 withval=$with_libxxhash_prefix;
18789 if test "X$withval" = "Xno"; then
18790 use_additional=no
18791 else
18792 if test "X$withval" = "X"; then
18793
18794 acl_save_prefix="$prefix"
18795 prefix="$acl_final_prefix"
18796 acl_save_exec_prefix="$exec_prefix"
18797 exec_prefix="$acl_final_exec_prefix"
18798
18799 eval additional_includedir=\"$includedir\"
18800 eval additional_libdir=\"$libdir\"
18801
18802 exec_prefix="$acl_save_exec_prefix"
18803 prefix="$acl_save_prefix"
18804
18805 else
18806 additional_includedir="$withval/include"
18807 additional_libdir="$withval/lib"
18808 fi
18809 fi
18810
18811 fi
18812
18813
18814 # Check whether --with-libxxhash-type was given.
18815 if test "${with_libxxhash_type+set}" = set; then :
18816 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18817 else
18818 with_libxxhash_type=auto
18819 fi
18820
18821 lib_type=`eval echo \$with_libxxhash_type`
18822
18823 LIBXXHASH=
18824 LTLIBXXHASH=
18825 INCXXHASH=
18826 rpathdirs=
18827 ltrpathdirs=
18828 names_already_handled=
18829 names_next_round='xxhash '
18830 while test -n "$names_next_round"; do
18831 names_this_round="$names_next_round"
18832 names_next_round=
18833 for name in $names_this_round; do
18834 already_handled=
18835 for n in $names_already_handled; do
18836 if test "$n" = "$name"; then
18837 already_handled=yes
18838 break
18839 fi
18840 done
18841 if test -z "$already_handled"; then
18842 names_already_handled="$names_already_handled $name"
18843 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18844 eval value=\"\$HAVE_LIB$uppername\"
18845 if test -n "$value"; then
18846 if test "$value" = yes; then
18847 eval value=\"\$LIB$uppername\"
18848 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18849 eval value=\"\$LTLIB$uppername\"
18850 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18851 else
18852 :
18853 fi
18854 else
18855 found_dir=
18856 found_la=
18857 found_so=
18858 found_a=
18859 if test $use_additional = yes; then
18860 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18861 found_dir="$additional_libdir"
18862 found_so="$additional_libdir/lib$name.$shlibext"
18863 if test -f "$additional_libdir/lib$name.la"; then
18864 found_la="$additional_libdir/lib$name.la"
18865 fi
18866 elif test x$lib_type != xshared; then
18867 if test -f "$additional_libdir/lib$name.$libext"; then
18868 found_dir="$additional_libdir"
18869 found_a="$additional_libdir/lib$name.$libext"
18870 if test -f "$additional_libdir/lib$name.la"; then
18871 found_la="$additional_libdir/lib$name.la"
18872 fi
18873 fi
18874 fi
18875 fi
18876 if test "X$found_dir" = "X"; then
18877 for x in $LDFLAGS $LTLIBXXHASH; do
18878
18879 acl_save_prefix="$prefix"
18880 prefix="$acl_final_prefix"
18881 acl_save_exec_prefix="$exec_prefix"
18882 exec_prefix="$acl_final_exec_prefix"
18883 eval x=\"$x\"
18884 exec_prefix="$acl_save_exec_prefix"
18885 prefix="$acl_save_prefix"
18886
18887 case "$x" in
18888 -L*)
18889 dir=`echo "X$x" | sed -e 's/^X-L//'`
18890 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18891 found_dir="$dir"
18892 found_so="$dir/lib$name.$shlibext"
18893 if test -f "$dir/lib$name.la"; then
18894 found_la="$dir/lib$name.la"
18895 fi
18896 elif test x$lib_type != xshared; then
18897 if test -f "$dir/lib$name.$libext"; then
18898 found_dir="$dir"
18899 found_a="$dir/lib$name.$libext"
18900 if test -f "$dir/lib$name.la"; then
18901 found_la="$dir/lib$name.la"
18902 fi
18903 fi
18904 fi
18905 ;;
18906 esac
18907 if test "X$found_dir" != "X"; then
18908 break
18909 fi
18910 done
18911 fi
18912 if test "X$found_dir" != "X"; then
18913 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18914 if test "X$found_so" != "X"; then
18915 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18916 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18917 else
18918 haveit=
18919 for x in $ltrpathdirs; do
18920 if test "X$x" = "X$found_dir"; then
18921 haveit=yes
18922 break
18923 fi
18924 done
18925 if test -z "$haveit"; then
18926 ltrpathdirs="$ltrpathdirs $found_dir"
18927 fi
18928 if test "$hardcode_direct" = yes; then
18929 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18930 else
18931 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18932 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18933 haveit=
18934 for x in $rpathdirs; do
18935 if test "X$x" = "X$found_dir"; then
18936 haveit=yes
18937 break
18938 fi
18939 done
18940 if test -z "$haveit"; then
18941 rpathdirs="$rpathdirs $found_dir"
18942 fi
18943 else
18944 haveit=
18945 for x in $LDFLAGS $LIBXXHASH; do
18946
18947 acl_save_prefix="$prefix"
18948 prefix="$acl_final_prefix"
18949 acl_save_exec_prefix="$exec_prefix"
18950 exec_prefix="$acl_final_exec_prefix"
18951 eval x=\"$x\"
18952 exec_prefix="$acl_save_exec_prefix"
18953 prefix="$acl_save_prefix"
18954
18955 if test "X$x" = "X-L$found_dir"; then
18956 haveit=yes
18957 break
18958 fi
18959 done
18960 if test -z "$haveit"; then
18961 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18962 fi
18963 if test "$hardcode_minus_L" != no; then
18964 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18965 else
18966 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18967 fi
18968 fi
18969 fi
18970 fi
18971 else
18972 if test "X$found_a" != "X"; then
18973 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18974 else
18975 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18976 fi
18977 fi
18978 additional_includedir=
18979 case "$found_dir" in
18980 */lib | */lib/)
18981 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18982 additional_includedir="$basedir/include"
18983 ;;
18984 esac
18985 if test "X$additional_includedir" != "X"; then
18986 if test "X$additional_includedir" != "X/usr/include"; then
18987 haveit=
18988 if test "X$additional_includedir" = "X/usr/local/include"; then
18989 if test -n "$GCC"; then
18990 case $host_os in
18991 linux*) haveit=yes;;
18992 esac
18993 fi
18994 fi
18995 if test -z "$haveit"; then
18996 for x in $CPPFLAGS $INCXXHASH; do
18997
18998 acl_save_prefix="$prefix"
18999 prefix="$acl_final_prefix"
19000 acl_save_exec_prefix="$exec_prefix"
19001 exec_prefix="$acl_final_exec_prefix"
19002 eval x=\"$x\"
19003 exec_prefix="$acl_save_exec_prefix"
19004 prefix="$acl_save_prefix"
19005
19006 if test "X$x" = "X-I$additional_includedir"; then
19007 haveit=yes
19008 break
19009 fi
19010 done
19011 if test -z "$haveit"; then
19012 if test -d "$additional_includedir"; then
19013 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19014 fi
19015 fi
19016 fi
19017 fi
19018 fi
19019 if test -n "$found_la"; then
19020 save_libdir="$libdir"
19021 case "$found_la" in
19022 */* | *\\*) . "$found_la" ;;
19023 *) . "./$found_la" ;;
19024 esac
19025 libdir="$save_libdir"
19026 for dep in $dependency_libs; do
19027 case "$dep" in
19028 -L*)
19029 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19030 if test "X$additional_libdir" != "X/usr/lib"; then
19031 haveit=
19032 if test "X$additional_libdir" = "X/usr/local/lib"; then
19033 if test -n "$GCC"; then
19034 case $host_os in
19035 linux*) haveit=yes;;
19036 esac
19037 fi
19038 fi
19039 if test -z "$haveit"; then
19040 haveit=
19041 for x in $LDFLAGS $LIBXXHASH; do
19042
19043 acl_save_prefix="$prefix"
19044 prefix="$acl_final_prefix"
19045 acl_save_exec_prefix="$exec_prefix"
19046 exec_prefix="$acl_final_exec_prefix"
19047 eval x=\"$x\"
19048 exec_prefix="$acl_save_exec_prefix"
19049 prefix="$acl_save_prefix"
19050
19051 if test "X$x" = "X-L$additional_libdir"; then
19052 haveit=yes
19053 break
19054 fi
19055 done
19056 if test -z "$haveit"; then
19057 if test -d "$additional_libdir"; then
19058 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19059 fi
19060 fi
19061 haveit=
19062 for x in $LDFLAGS $LTLIBXXHASH; do
19063
19064 acl_save_prefix="$prefix"
19065 prefix="$acl_final_prefix"
19066 acl_save_exec_prefix="$exec_prefix"
19067 exec_prefix="$acl_final_exec_prefix"
19068 eval x=\"$x\"
19069 exec_prefix="$acl_save_exec_prefix"
19070 prefix="$acl_save_prefix"
19071
19072 if test "X$x" = "X-L$additional_libdir"; then
19073 haveit=yes
19074 break
19075 fi
19076 done
19077 if test -z "$haveit"; then
19078 if test -d "$additional_libdir"; then
19079 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19080 fi
19081 fi
19082 fi
19083 fi
19084 ;;
19085 -R*)
19086 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19087 if test "$enable_rpath" != no; then
19088 haveit=
19089 for x in $rpathdirs; do
19090 if test "X$x" = "X$dir"; then
19091 haveit=yes
19092 break
19093 fi
19094 done
19095 if test -z "$haveit"; then
19096 rpathdirs="$rpathdirs $dir"
19097 fi
19098 haveit=
19099 for x in $ltrpathdirs; do
19100 if test "X$x" = "X$dir"; then
19101 haveit=yes
19102 break
19103 fi
19104 done
19105 if test -z "$haveit"; then
19106 ltrpathdirs="$ltrpathdirs $dir"
19107 fi
19108 fi
19109 ;;
19110 -l*)
19111 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19112 ;;
19113 *.la)
19114 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19115 ;;
19116 *)
19117 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19118 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19119 ;;
19120 esac
19121 done
19122 fi
19123 else
19124 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19125 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19126 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19127 else
19128 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19129 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19130 fi
19131 fi
19132 fi
19133 fi
19134 done
19135 done
19136 if test "X$rpathdirs" != "X"; then
19137 if test -n "$hardcode_libdir_separator"; then
19138 alldirs=
19139 for found_dir in $rpathdirs; do
19140 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19141 done
19142 acl_save_libdir="$libdir"
19143 libdir="$alldirs"
19144 eval flag=\"$hardcode_libdir_flag_spec\"
19145 libdir="$acl_save_libdir"
19146 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19147 else
19148 for found_dir in $rpathdirs; do
19149 acl_save_libdir="$libdir"
19150 libdir="$found_dir"
19151 eval flag=\"$hardcode_libdir_flag_spec\"
19152 libdir="$acl_save_libdir"
19153 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19154 done
19155 fi
19156 fi
19157 if test "X$ltrpathdirs" != "X"; then
19158 for found_dir in $ltrpathdirs; do
19159 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19160 done
19161 fi
19162
19163
19164 ac_save_CPPFLAGS="$CPPFLAGS"
19165
19166 for element in $INCXXHASH; do
19167 haveit=
19168 for x in $CPPFLAGS; do
19169
19170 acl_save_prefix="$prefix"
19171 prefix="$acl_final_prefix"
19172 acl_save_exec_prefix="$exec_prefix"
19173 exec_prefix="$acl_final_exec_prefix"
19174 eval x=\"$x\"
19175 exec_prefix="$acl_save_exec_prefix"
19176 prefix="$acl_save_prefix"
19177
19178 if test "X$x" = "X$element"; then
19179 haveit=yes
19180 break
19181 fi
19182 done
19183 if test -z "$haveit"; then
19184 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19185 fi
19186 done
19187
19188
19189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19190 $as_echo_n "checking for libxxhash... " >&6; }
19191 if ${ac_cv_libxxhash+:} false; then :
19192 $as_echo_n "(cached) " >&6
19193 else
19194
19195 ac_save_LIBS="$LIBS"
19196 LIBS="$LIBS $LIBXXHASH"
19197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19198 /* end confdefs.h. */
19199 #include <xxhash.h>
19200 int
19201 main ()
19202 {
19203 XXH32("foo", 3, 0);
19204
19205 ;
19206 return 0;
19207 }
19208 _ACEOF
19209 if ac_fn_c_try_link "$LINENO"; then :
19210 ac_cv_libxxhash=yes
19211 else
19212 ac_cv_libxxhash=no
19213 fi
19214 rm -f core conftest.err conftest.$ac_objext \
19215 conftest$ac_exeext conftest.$ac_ext
19216 LIBS="$ac_save_LIBS"
19217
19218 fi
19219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19220 $as_echo "$ac_cv_libxxhash" >&6; }
19221 if test "$ac_cv_libxxhash" = yes; then
19222 HAVE_LIBXXHASH=yes
19223
19224 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19225
19226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19227 $as_echo_n "checking how to link with libxxhash... " >&6; }
19228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19229 $as_echo "$LIBXXHASH" >&6; }
19230 else
19231 HAVE_LIBXXHASH=no
19232 CPPFLAGS="$ac_save_CPPFLAGS"
19233 LIBXXHASH=
19234 LTLIBXXHASH=
19235 fi
19236
19237
19238
19239
19240
19241
19242 if test "$HAVE_LIBXXHASH" != yes; then
19243 if test "$with_xxhash" = yes; then
19244 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19245 fi
19246 fi
19247 if test "x$with_xxhash" = "xauto"; then
19248 with_xxhash="$HAVE_LIBXXHASH"
19249 fi
19250 fi
19251
19252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19253 $as_echo_n "checking whether to use xxhash... " >&6; }
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19255 $as_echo "$with_xxhash" >&6; }
19256
19257 NM_H=
19258 rm -f nm.h
19259 if test "${nativefile}" != ""; then
19260 case "${nativefile}" in
19261 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19262 * ) GDB_NM_FILE="${nativefile}"
19263 esac
19264 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19265
19266
19267 cat >>confdefs.h <<_ACEOF
19268 #define GDB_NM_FILE "${GDB_NM_FILE}"
19269 _ACEOF
19270
19271 NM_H=nm.h
19272 fi
19273
19274
19275
19276 for ac_prog in xsltproc
19277 do
19278 # Extract the first word of "$ac_prog", so it can be a program name with args.
19279 set dummy $ac_prog; ac_word=$2
19280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19281 $as_echo_n "checking for $ac_word... " >&6; }
19282 if ${ac_cv_path_XSLTPROC+:} false; then :
19283 $as_echo_n "(cached) " >&6
19284 else
19285 case $XSLTPROC in
19286 [\\/]* | ?:[\\/]*)
19287 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19288 ;;
19289 *)
19290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19291 for as_dir in $PATH
19292 do
19293 IFS=$as_save_IFS
19294 test -z "$as_dir" && as_dir=.
19295 for ac_exec_ext in '' $ac_executable_extensions; do
19296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19297 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19299 break 2
19300 fi
19301 done
19302 done
19303 IFS=$as_save_IFS
19304
19305 ;;
19306 esac
19307 fi
19308 XSLTPROC=$ac_cv_path_XSLTPROC
19309 if test -n "$XSLTPROC"; then
19310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19311 $as_echo "$XSLTPROC" >&6; }
19312 else
19313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19314 $as_echo "no" >&6; }
19315 fi
19316
19317
19318 test -n "$XSLTPROC" && break
19319 done
19320 test -n "$XSLTPROC" || XSLTPROC="missing"
19321
19322 if test "x$USE_MAINTAINER_MODE" = xyes; then
19323 if test "${XSLTPROC}" = missing; then
19324 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19325 fi
19326 fi
19327
19328
19329
19330
19331
19332 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19333
19334
19335
19336 # Check whether we will enable the inclusion of unit tests when
19337 # compiling GDB.
19338 #
19339 # The default value of this option changes depending whether we're on
19340 # development mode (in which case it's "true") or not (in which case
19341 # it's "false"). The $development variable is set by the GDB_AC_COMMON
19342 # macro, which must therefore be used before GDB_AC_SELFTEST.
19343
19344 if test "x$development" != xtrue && test "x$development" != xfalse; then :
19345 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19346 fi
19347
19348 # Check whether --enable-unit-tests was given.
19349 if test "${enable_unit_tests+set}" = set; then :
19350 enableval=$enable_unit_tests; case "${enableval}" in
19351 yes) enable_unittests=true ;;
19352 no) enable_unittests=false ;;
19353 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19354 esac
19355 else
19356 enable_unittests=$development
19357 fi
19358
19359
19360 if $enable_unittests; then
19361
19362 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19363
19364
19365 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19366 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19367
19368 fi
19369
19370
19371
19372 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19373 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19374 if test "x$GDB_TRANSFORM_NAME" = x; then
19375 GDB_TRANSFORM_NAME=gdb
19376 fi
19377
19378
19379
19380 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19381 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19382 if test "x$GCORE_TRANSFORM_NAME" = x; then
19383 GCORE_TRANSFORM_NAME=gcore
19384 fi
19385
19386
19387 ac_config_files="$ac_config_files gcore"
19388
19389 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19390
19391
19392 cat >confcache <<\_ACEOF
19393 # This file is a shell script that caches the results of configure
19394 # tests run on this system so they can be shared between configure
19395 # scripts and configure runs, see configure's option --config-cache.
19396 # It is not useful on other systems. If it contains results you don't
19397 # want to keep, you may remove or edit it.
19398 #
19399 # config.status only pays attention to the cache file if you give it
19400 # the --recheck option to rerun configure.
19401 #
19402 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19403 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19404 # following values.
19405
19406 _ACEOF
19407
19408 # The following way of writing the cache mishandles newlines in values,
19409 # but we know of no workaround that is simple, portable, and efficient.
19410 # So, we kill variables containing newlines.
19411 # Ultrix sh set writes to stderr and can't be redirected directly,
19412 # and sets the high bit in the cache file unless we assign to the vars.
19413 (
19414 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19415 eval ac_val=\$$ac_var
19416 case $ac_val in #(
19417 *${as_nl}*)
19418 case $ac_var in #(
19419 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19420 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19421 esac
19422 case $ac_var in #(
19423 _ | IFS | as_nl) ;; #(
19424 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19425 *) { eval $ac_var=; unset $ac_var;} ;;
19426 esac ;;
19427 esac
19428 done
19429
19430 (set) 2>&1 |
19431 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19432 *${as_nl}ac_space=\ *)
19433 # `set' does not quote correctly, so add quotes: double-quote
19434 # substitution turns \\\\ into \\, and sed turns \\ into \.
19435 sed -n \
19436 "s/'/'\\\\''/g;
19437 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19438 ;; #(
19439 *)
19440 # `set' quotes correctly as required by POSIX, so do not add quotes.
19441 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19442 ;;
19443 esac |
19444 sort
19445 ) |
19446 sed '
19447 /^ac_cv_env_/b end
19448 t clear
19449 :clear
19450 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19451 t end
19452 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19453 :end' >>confcache
19454 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19455 if test -w "$cache_file"; then
19456 if test "x$cache_file" != "x/dev/null"; then
19457 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19458 $as_echo "$as_me: updating cache $cache_file" >&6;}
19459 if test ! -f "$cache_file" || test -h "$cache_file"; then
19460 cat confcache >"$cache_file"
19461 else
19462 case $cache_file in #(
19463 */* | ?:*)
19464 mv -f confcache "$cache_file"$$ &&
19465 mv -f "$cache_file"$$ "$cache_file" ;; #(
19466 *)
19467 mv -f confcache "$cache_file" ;;
19468 esac
19469 fi
19470 fi
19471 else
19472 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19473 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19474 fi
19475 fi
19476 rm -f confcache
19477
19478 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19479 # Let make expand exec_prefix.
19480 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19481
19482 DEFS=-DHAVE_CONFIG_H
19483
19484 ac_libobjs=
19485 ac_ltlibobjs=
19486 U=
19487 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19488 # 1. Remove the extension, and $U if already installed.
19489 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19490 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19491 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19492 # will be set to the directory where LIBOBJS objects are built.
19493 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19494 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19495 done
19496 LIBOBJS=$ac_libobjs
19497
19498 LTLIBOBJS=$ac_ltlibobjs
19499
19500
19501 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19502 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19503 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19504 fi
19505 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19506 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19507 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19508 fi
19509 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19510 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19511 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19512 fi
19513
19514
19515 : "${CONFIG_STATUS=./config.status}"
19516 ac_write_fail=0
19517 ac_clean_files_save=$ac_clean_files
19518 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19519 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19520 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19521 as_write_fail=0
19522 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19523 #! $SHELL
19524 # Generated by $as_me.
19525 # Run this file to recreate the current configuration.
19526 # Compiler output produced by configure, useful for debugging
19527 # configure, is in config.log if it exists.
19528
19529 debug=false
19530 ac_cs_recheck=false
19531 ac_cs_silent=false
19532
19533 SHELL=\${CONFIG_SHELL-$SHELL}
19534 export SHELL
19535 _ASEOF
19536 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19537 ## -------------------- ##
19538 ## M4sh Initialization. ##
19539 ## -------------------- ##
19540
19541 # Be more Bourne compatible
19542 DUALCASE=1; export DUALCASE # for MKS sh
19543 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19544 emulate sh
19545 NULLCMD=:
19546 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19547 # is contrary to our usage. Disable this feature.
19548 alias -g '${1+"$@"}'='"$@"'
19549 setopt NO_GLOB_SUBST
19550 else
19551 case `(set -o) 2>/dev/null` in #(
19552 *posix*) :
19553 set -o posix ;; #(
19554 *) :
19555 ;;
19556 esac
19557 fi
19558
19559
19560 as_nl='
19561 '
19562 export as_nl
19563 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19564 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19565 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19566 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19567 # Prefer a ksh shell builtin over an external printf program on Solaris,
19568 # but without wasting forks for bash or zsh.
19569 if test -z "$BASH_VERSION$ZSH_VERSION" \
19570 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19571 as_echo='print -r --'
19572 as_echo_n='print -rn --'
19573 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19574 as_echo='printf %s\n'
19575 as_echo_n='printf %s'
19576 else
19577 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19578 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19579 as_echo_n='/usr/ucb/echo -n'
19580 else
19581 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19582 as_echo_n_body='eval
19583 arg=$1;
19584 case $arg in #(
19585 *"$as_nl"*)
19586 expr "X$arg" : "X\\(.*\\)$as_nl";
19587 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19588 esac;
19589 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19590 '
19591 export as_echo_n_body
19592 as_echo_n='sh -c $as_echo_n_body as_echo'
19593 fi
19594 export as_echo_body
19595 as_echo='sh -c $as_echo_body as_echo'
19596 fi
19597
19598 # The user is always right.
19599 if test "${PATH_SEPARATOR+set}" != set; then
19600 PATH_SEPARATOR=:
19601 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19602 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19603 PATH_SEPARATOR=';'
19604 }
19605 fi
19606
19607
19608 # IFS
19609 # We need space, tab and new line, in precisely that order. Quoting is
19610 # there to prevent editors from complaining about space-tab.
19611 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19612 # splitting by setting IFS to empty value.)
19613 IFS=" "" $as_nl"
19614
19615 # Find who we are. Look in the path if we contain no directory separator.
19616 as_myself=
19617 case $0 in #((
19618 *[\\/]* ) as_myself=$0 ;;
19619 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19620 for as_dir in $PATH
19621 do
19622 IFS=$as_save_IFS
19623 test -z "$as_dir" && as_dir=.
19624 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19625 done
19626 IFS=$as_save_IFS
19627
19628 ;;
19629 esac
19630 # We did not find ourselves, most probably we were run as `sh COMMAND'
19631 # in which case we are not to be found in the path.
19632 if test "x$as_myself" = x; then
19633 as_myself=$0
19634 fi
19635 if test ! -f "$as_myself"; then
19636 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19637 exit 1
19638 fi
19639
19640 # Unset variables that we do not need and which cause bugs (e.g. in
19641 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19642 # suppresses any "Segmentation fault" message there. '((' could
19643 # trigger a bug in pdksh 5.2.14.
19644 for as_var in BASH_ENV ENV MAIL MAILPATH
19645 do eval test x\${$as_var+set} = xset \
19646 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19647 done
19648 PS1='$ '
19649 PS2='> '
19650 PS4='+ '
19651
19652 # NLS nuisances.
19653 LC_ALL=C
19654 export LC_ALL
19655 LANGUAGE=C
19656 export LANGUAGE
19657
19658 # CDPATH.
19659 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19660
19661
19662 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19663 # ----------------------------------------
19664 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19665 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19666 # script with STATUS, using 1 if that was 0.
19667 as_fn_error ()
19668 {
19669 as_status=$1; test $as_status -eq 0 && as_status=1
19670 if test "$4"; then
19671 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19672 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19673 fi
19674 $as_echo "$as_me: error: $2" >&2
19675 as_fn_exit $as_status
19676 } # as_fn_error
19677
19678
19679 # as_fn_set_status STATUS
19680 # -----------------------
19681 # Set $? to STATUS, without forking.
19682 as_fn_set_status ()
19683 {
19684 return $1
19685 } # as_fn_set_status
19686
19687 # as_fn_exit STATUS
19688 # -----------------
19689 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19690 as_fn_exit ()
19691 {
19692 set +e
19693 as_fn_set_status $1
19694 exit $1
19695 } # as_fn_exit
19696
19697 # as_fn_unset VAR
19698 # ---------------
19699 # Portably unset VAR.
19700 as_fn_unset ()
19701 {
19702 { eval $1=; unset $1;}
19703 }
19704 as_unset=as_fn_unset
19705 # as_fn_append VAR VALUE
19706 # ----------------------
19707 # Append the text in VALUE to the end of the definition contained in VAR. Take
19708 # advantage of any shell optimizations that allow amortized linear growth over
19709 # repeated appends, instead of the typical quadratic growth present in naive
19710 # implementations.
19711 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19712 eval 'as_fn_append ()
19713 {
19714 eval $1+=\$2
19715 }'
19716 else
19717 as_fn_append ()
19718 {
19719 eval $1=\$$1\$2
19720 }
19721 fi # as_fn_append
19722
19723 # as_fn_arith ARG...
19724 # ------------------
19725 # Perform arithmetic evaluation on the ARGs, and store the result in the
19726 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19727 # must be portable across $(()) and expr.
19728 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19729 eval 'as_fn_arith ()
19730 {
19731 as_val=$(( $* ))
19732 }'
19733 else
19734 as_fn_arith ()
19735 {
19736 as_val=`expr "$@" || test $? -eq 1`
19737 }
19738 fi # as_fn_arith
19739
19740
19741 if expr a : '\(a\)' >/dev/null 2>&1 &&
19742 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19743 as_expr=expr
19744 else
19745 as_expr=false
19746 fi
19747
19748 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19749 as_basename=basename
19750 else
19751 as_basename=false
19752 fi
19753
19754 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19755 as_dirname=dirname
19756 else
19757 as_dirname=false
19758 fi
19759
19760 as_me=`$as_basename -- "$0" ||
19761 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19762 X"$0" : 'X\(//\)$' \| \
19763 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19764 $as_echo X/"$0" |
19765 sed '/^.*\/\([^/][^/]*\)\/*$/{
19766 s//\1/
19767 q
19768 }
19769 /^X\/\(\/\/\)$/{
19770 s//\1/
19771 q
19772 }
19773 /^X\/\(\/\).*/{
19774 s//\1/
19775 q
19776 }
19777 s/.*/./; q'`
19778
19779 # Avoid depending upon Character Ranges.
19780 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19781 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19782 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19783 as_cr_digits='0123456789'
19784 as_cr_alnum=$as_cr_Letters$as_cr_digits
19785
19786 ECHO_C= ECHO_N= ECHO_T=
19787 case `echo -n x` in #(((((
19788 -n*)
19789 case `echo 'xy\c'` in
19790 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19791 xy) ECHO_C='\c';;
19792 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19793 ECHO_T=' ';;
19794 esac;;
19795 *)
19796 ECHO_N='-n';;
19797 esac
19798
19799 rm -f conf$$ conf$$.exe conf$$.file
19800 if test -d conf$$.dir; then
19801 rm -f conf$$.dir/conf$$.file
19802 else
19803 rm -f conf$$.dir
19804 mkdir conf$$.dir 2>/dev/null
19805 fi
19806 if (echo >conf$$.file) 2>/dev/null; then
19807 if ln -s conf$$.file conf$$ 2>/dev/null; then
19808 as_ln_s='ln -s'
19809 # ... but there are two gotchas:
19810 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19811 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19812 # In both cases, we have to default to `cp -pR'.
19813 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19814 as_ln_s='cp -pR'
19815 elif ln conf$$.file conf$$ 2>/dev/null; then
19816 as_ln_s=ln
19817 else
19818 as_ln_s='cp -pR'
19819 fi
19820 else
19821 as_ln_s='cp -pR'
19822 fi
19823 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19824 rmdir conf$$.dir 2>/dev/null
19825
19826
19827 # as_fn_mkdir_p
19828 # -------------
19829 # Create "$as_dir" as a directory, including parents if necessary.
19830 as_fn_mkdir_p ()
19831 {
19832
19833 case $as_dir in #(
19834 -*) as_dir=./$as_dir;;
19835 esac
19836 test -d "$as_dir" || eval $as_mkdir_p || {
19837 as_dirs=
19838 while :; do
19839 case $as_dir in #(
19840 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19841 *) as_qdir=$as_dir;;
19842 esac
19843 as_dirs="'$as_qdir' $as_dirs"
19844 as_dir=`$as_dirname -- "$as_dir" ||
19845 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19846 X"$as_dir" : 'X\(//\)[^/]' \| \
19847 X"$as_dir" : 'X\(//\)$' \| \
19848 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19849 $as_echo X"$as_dir" |
19850 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19851 s//\1/
19852 q
19853 }
19854 /^X\(\/\/\)[^/].*/{
19855 s//\1/
19856 q
19857 }
19858 /^X\(\/\/\)$/{
19859 s//\1/
19860 q
19861 }
19862 /^X\(\/\).*/{
19863 s//\1/
19864 q
19865 }
19866 s/.*/./; q'`
19867 test -d "$as_dir" && break
19868 done
19869 test -z "$as_dirs" || eval "mkdir $as_dirs"
19870 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19871
19872
19873 } # as_fn_mkdir_p
19874 if mkdir -p . 2>/dev/null; then
19875 as_mkdir_p='mkdir -p "$as_dir"'
19876 else
19877 test -d ./-p && rmdir ./-p
19878 as_mkdir_p=false
19879 fi
19880
19881
19882 # as_fn_executable_p FILE
19883 # -----------------------
19884 # Test if FILE is an executable regular file.
19885 as_fn_executable_p ()
19886 {
19887 test -f "$1" && test -x "$1"
19888 } # as_fn_executable_p
19889 as_test_x='test -x'
19890 as_executable_p=as_fn_executable_p
19891
19892 # Sed expression to map a string onto a valid CPP name.
19893 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19894
19895 # Sed expression to map a string onto a valid variable name.
19896 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19897
19898
19899 exec 6>&1
19900 ## ----------------------------------- ##
19901 ## Main body of $CONFIG_STATUS script. ##
19902 ## ----------------------------------- ##
19903 _ASEOF
19904 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19905
19906 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19907 # Save the log message, to keep $0 and so on meaningful, and to
19908 # report actual input values of CONFIG_FILES etc. instead of their
19909 # values after options handling.
19910 ac_log="
19911 This file was extended by $as_me, which was
19912 generated by GNU Autoconf 2.69. Invocation command line was
19913
19914 CONFIG_FILES = $CONFIG_FILES
19915 CONFIG_HEADERS = $CONFIG_HEADERS
19916 CONFIG_LINKS = $CONFIG_LINKS
19917 CONFIG_COMMANDS = $CONFIG_COMMANDS
19918 $ $0 $@
19919
19920 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19921 "
19922
19923 _ACEOF
19924
19925 case $ac_config_files in *"
19926 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19927 esac
19928
19929 case $ac_config_headers in *"
19930 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19931 esac
19932
19933
19934 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19935 # Files that config.status was made for.
19936 config_files="$ac_config_files"
19937 config_headers="$ac_config_headers"
19938 config_links="$ac_config_links"
19939 config_commands="$ac_config_commands"
19940
19941 _ACEOF
19942
19943 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19944 ac_cs_usage="\
19945 \`$as_me' instantiates files and other configuration actions
19946 from templates according to the current configuration. Unless the files
19947 and actions are specified as TAGs, all are instantiated by default.
19948
19949 Usage: $0 [OPTION]... [TAG]...
19950
19951 -h, --help print this help, then exit
19952 -V, --version print version number and configuration settings, then exit
19953 --config print configuration, then exit
19954 -q, --quiet, --silent
19955 do not print progress messages
19956 -d, --debug don't remove temporary files
19957 --recheck update $as_me by reconfiguring in the same conditions
19958 --file=FILE[:TEMPLATE]
19959 instantiate the configuration file FILE
19960 --header=FILE[:TEMPLATE]
19961 instantiate the configuration header FILE
19962
19963 Configuration files:
19964 $config_files
19965
19966 Configuration headers:
19967 $config_headers
19968
19969 Configuration links:
19970 $config_links
19971
19972 Configuration commands:
19973 $config_commands
19974
19975 Report bugs to the package provider."
19976
19977 _ACEOF
19978 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19979 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19980 ac_cs_version="\\
19981 config.status
19982 configured by $0, generated by GNU Autoconf 2.69,
19983 with options \\"\$ac_cs_config\\"
19984
19985 Copyright (C) 2012 Free Software Foundation, Inc.
19986 This config.status script is free software; the Free Software Foundation
19987 gives unlimited permission to copy, distribute and modify it."
19988
19989 ac_pwd='$ac_pwd'
19990 srcdir='$srcdir'
19991 INSTALL='$INSTALL'
19992 AWK='$AWK'
19993 test -n "\$AWK" || AWK=awk
19994 _ACEOF
19995
19996 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19997 # The default lists apply if the user does not specify any file.
19998 ac_need_defaults=:
19999 while test $# != 0
20000 do
20001 case $1 in
20002 --*=?*)
20003 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20004 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20005 ac_shift=:
20006 ;;
20007 --*=)
20008 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20009 ac_optarg=
20010 ac_shift=:
20011 ;;
20012 *)
20013 ac_option=$1
20014 ac_optarg=$2
20015 ac_shift=shift
20016 ;;
20017 esac
20018
20019 case $ac_option in
20020 # Handling of the options.
20021 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20022 ac_cs_recheck=: ;;
20023 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20024 $as_echo "$ac_cs_version"; exit ;;
20025 --config | --confi | --conf | --con | --co | --c )
20026 $as_echo "$ac_cs_config"; exit ;;
20027 --debug | --debu | --deb | --de | --d | -d )
20028 debug=: ;;
20029 --file | --fil | --fi | --f )
20030 $ac_shift
20031 case $ac_optarg in
20032 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20033 '') as_fn_error $? "missing file argument" ;;
20034 esac
20035 as_fn_append CONFIG_FILES " '$ac_optarg'"
20036 ac_need_defaults=false;;
20037 --header | --heade | --head | --hea )
20038 $ac_shift
20039 case $ac_optarg in
20040 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20041 esac
20042 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20043 ac_need_defaults=false;;
20044 --he | --h)
20045 # Conflict between --help and --header
20046 as_fn_error $? "ambiguous option: \`$1'
20047 Try \`$0 --help' for more information.";;
20048 --help | --hel | -h )
20049 $as_echo "$ac_cs_usage"; exit ;;
20050 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20051 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20052 ac_cs_silent=: ;;
20053
20054 # This is an error.
20055 -*) as_fn_error $? "unrecognized option: \`$1'
20056 Try \`$0 --help' for more information." ;;
20057
20058 *) as_fn_append ac_config_targets " $1"
20059 ac_need_defaults=false ;;
20060
20061 esac
20062 shift
20063 done
20064
20065 ac_configure_extra_args=
20066
20067 if $ac_cs_silent; then
20068 exec 6>/dev/null
20069 ac_configure_extra_args="$ac_configure_extra_args --silent"
20070 fi
20071
20072 _ACEOF
20073 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20074 if \$ac_cs_recheck; then
20075 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20076 shift
20077 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20078 CONFIG_SHELL='$SHELL'
20079 export CONFIG_SHELL
20080 exec "\$@"
20081 fi
20082
20083 _ACEOF
20084 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20085 exec 5>>config.log
20086 {
20087 echo
20088 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20089 ## Running $as_me. ##
20090 _ASBOX
20091 $as_echo "$ac_log"
20092 } >&5
20093
20094 _ACEOF
20095 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20096 #
20097 # INIT-COMMANDS
20098 #
20099 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20100 GDB_NM_FILE=$GDB_NM_FILE
20101
20102 _ACEOF
20103
20104 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20105
20106 # Handling of arguments.
20107 for ac_config_target in $ac_config_targets
20108 do
20109 case $ac_config_target in
20110 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20111 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20112 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20113 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20114 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20115 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20116 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20117 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20118 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20119 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20120
20121 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20122 esac
20123 done
20124
20125
20126 # If the user did not use the arguments to specify the items to instantiate,
20127 # then the envvar interface is used. Set only those that are not.
20128 # We use the long form for the default assignment because of an extremely
20129 # bizarre bug on SunOS 4.1.3.
20130 if $ac_need_defaults; then
20131 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20132 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20133 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20134 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20135 fi
20136
20137 # Have a temporary directory for convenience. Make it in the build tree
20138 # simply because there is no reason against having it here, and in addition,
20139 # creating and moving files from /tmp can sometimes cause problems.
20140 # Hook for its removal unless debugging.
20141 # Note that there is a small window in which the directory will not be cleaned:
20142 # after its creation but before its name has been assigned to `$tmp'.
20143 $debug ||
20144 {
20145 tmp= ac_tmp=
20146 trap 'exit_status=$?
20147 : "${ac_tmp:=$tmp}"
20148 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20149 ' 0
20150 trap 'as_fn_exit 1' 1 2 13 15
20151 }
20152 # Create a (secure) tmp directory for tmp files.
20153
20154 {
20155 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20156 test -d "$tmp"
20157 } ||
20158 {
20159 tmp=./conf$$-$RANDOM
20160 (umask 077 && mkdir "$tmp")
20161 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20162 ac_tmp=$tmp
20163
20164 # Set up the scripts for CONFIG_FILES section.
20165 # No need to generate them if there are no CONFIG_FILES.
20166 # This happens for instance with `./config.status config.h'.
20167 if test -n "$CONFIG_FILES"; then
20168
20169 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20170 ac_cs_awk_getline=:
20171 ac_cs_awk_pipe_init=
20172 ac_cs_awk_read_file='
20173 while ((getline aline < (F[key])) > 0)
20174 print(aline)
20175 close(F[key])'
20176 ac_cs_awk_pipe_fini=
20177 else
20178 ac_cs_awk_getline=false
20179 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20180 ac_cs_awk_read_file='
20181 print "|#_!!_#|"
20182 print "cat " F[key] " &&"
20183 '$ac_cs_awk_pipe_init
20184 # The final `:' finishes the AND list.
20185 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20186 fi
20187 ac_cr=`echo X | tr X '\015'`
20188 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20189 # But we know of no other shell where ac_cr would be empty at this
20190 # point, so we can use a bashism as a fallback.
20191 if test "x$ac_cr" = x; then
20192 eval ac_cr=\$\'\\r\'
20193 fi
20194 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20195 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20196 ac_cs_awk_cr='\\r'
20197 else
20198 ac_cs_awk_cr=$ac_cr
20199 fi
20200
20201 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20202 _ACEOF
20203
20204 # Create commands to substitute file output variables.
20205 {
20206 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20207 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20208 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20209 echo "_ACAWK" &&
20210 echo "_ACEOF"
20211 } >conf$$files.sh &&
20212 . ./conf$$files.sh ||
20213 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20214 rm -f conf$$files.sh
20215
20216 {
20217 echo "cat >conf$$subs.awk <<_ACEOF" &&
20218 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20219 echo "_ACEOF"
20220 } >conf$$subs.sh ||
20221 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20222 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20223 ac_delim='%!_!# '
20224 for ac_last_try in false false false false false :; do
20225 . ./conf$$subs.sh ||
20226 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20227
20228 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20229 if test $ac_delim_n = $ac_delim_num; then
20230 break
20231 elif $ac_last_try; then
20232 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20233 else
20234 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20235 fi
20236 done
20237 rm -f conf$$subs.sh
20238
20239 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20240 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20241 _ACEOF
20242 sed -n '
20243 h
20244 s/^/S["/; s/!.*/"]=/
20245 p
20246 g
20247 s/^[^!]*!//
20248 :repl
20249 t repl
20250 s/'"$ac_delim"'$//
20251 t delim
20252 :nl
20253 h
20254 s/\(.\{148\}\)..*/\1/
20255 t more1
20256 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20257 p
20258 n
20259 b repl
20260 :more1
20261 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20262 p
20263 g
20264 s/.\{148\}//
20265 t nl
20266 :delim
20267 h
20268 s/\(.\{148\}\)..*/\1/
20269 t more2
20270 s/["\\]/\\&/g; s/^/"/; s/$/"/
20271 p
20272 b
20273 :more2
20274 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20275 p
20276 g
20277 s/.\{148\}//
20278 t delim
20279 ' <conf$$subs.awk | sed '
20280 /^[^""]/{
20281 N
20282 s/\n//
20283 }
20284 ' >>$CONFIG_STATUS || ac_write_fail=1
20285 rm -f conf$$subs.awk
20286 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20287 _ACAWK
20288 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20289 for (key in S) S_is_set[key] = 1
20290 FS = "\a"
20291 \$ac_cs_awk_pipe_init
20292 }
20293 {
20294 line = $ 0
20295 nfields = split(line, field, "@")
20296 substed = 0
20297 len = length(field[1])
20298 for (i = 2; i < nfields; i++) {
20299 key = field[i]
20300 keylen = length(key)
20301 if (S_is_set[key]) {
20302 value = S[key]
20303 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20304 len += length(value) + length(field[++i])
20305 substed = 1
20306 } else
20307 len += 1 + keylen
20308 }
20309 if (nfields == 3 && !substed) {
20310 key = field[2]
20311 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20312 \$ac_cs_awk_read_file
20313 next
20314 }
20315 }
20316 print line
20317 }
20318 \$ac_cs_awk_pipe_fini
20319 _ACAWK
20320 _ACEOF
20321 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20322 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20323 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20324 else
20325 cat
20326 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20327 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20328 _ACEOF
20329
20330 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20331 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20332 # trailing colons and then remove the whole line if VPATH becomes empty
20333 # (actually we leave an empty line to preserve line numbers).
20334 if test "x$srcdir" = x.; then
20335 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20336 h
20337 s///
20338 s/^/:/
20339 s/[ ]*$/:/
20340 s/:\$(srcdir):/:/g
20341 s/:\${srcdir}:/:/g
20342 s/:@srcdir@:/:/g
20343 s/^:*//
20344 s/:*$//
20345 x
20346 s/\(=[ ]*\).*/\1/
20347 G
20348 s/\n//
20349 s/^[^=]*=[ ]*$//
20350 }'
20351 fi
20352
20353 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20354 fi # test -n "$CONFIG_FILES"
20355
20356 # Set up the scripts for CONFIG_HEADERS section.
20357 # No need to generate them if there are no CONFIG_HEADERS.
20358 # This happens for instance with `./config.status Makefile'.
20359 if test -n "$CONFIG_HEADERS"; then
20360 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20361 BEGIN {
20362 _ACEOF
20363
20364 # Transform confdefs.h into an awk script `defines.awk', embedded as
20365 # here-document in config.status, that substitutes the proper values into
20366 # config.h.in to produce config.h.
20367
20368 # Create a delimiter string that does not exist in confdefs.h, to ease
20369 # handling of long lines.
20370 ac_delim='%!_!# '
20371 for ac_last_try in false false :; do
20372 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20373 if test -z "$ac_tt"; then
20374 break
20375 elif $ac_last_try; then
20376 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20377 else
20378 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20379 fi
20380 done
20381
20382 # For the awk script, D is an array of macro values keyed by name,
20383 # likewise P contains macro parameters if any. Preserve backslash
20384 # newline sequences.
20385
20386 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20387 sed -n '
20388 s/.\{148\}/&'"$ac_delim"'/g
20389 t rset
20390 :rset
20391 s/^[ ]*#[ ]*define[ ][ ]*/ /
20392 t def
20393 d
20394 :def
20395 s/\\$//
20396 t bsnl
20397 s/["\\]/\\&/g
20398 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20399 D["\1"]=" \3"/p
20400 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20401 d
20402 :bsnl
20403 s/["\\]/\\&/g
20404 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20405 D["\1"]=" \3\\\\\\n"\\/p
20406 t cont
20407 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20408 t cont
20409 d
20410 :cont
20411 n
20412 s/.\{148\}/&'"$ac_delim"'/g
20413 t clear
20414 :clear
20415 s/\\$//
20416 t bsnlc
20417 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20418 d
20419 :bsnlc
20420 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20421 b cont
20422 ' <confdefs.h | sed '
20423 s/'"$ac_delim"'/"\\\
20424 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20425
20426 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20427 for (key in D) D_is_set[key] = 1
20428 FS = "\a"
20429 }
20430 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20431 line = \$ 0
20432 split(line, arg, " ")
20433 if (arg[1] == "#") {
20434 defundef = arg[2]
20435 mac1 = arg[3]
20436 } else {
20437 defundef = substr(arg[1], 2)
20438 mac1 = arg[2]
20439 }
20440 split(mac1, mac2, "(") #)
20441 macro = mac2[1]
20442 prefix = substr(line, 1, index(line, defundef) - 1)
20443 if (D_is_set[macro]) {
20444 # Preserve the white space surrounding the "#".
20445 print prefix "define", macro P[macro] D[macro]
20446 next
20447 } else {
20448 # Replace #undef with comments. This is necessary, for example,
20449 # in the case of _POSIX_SOURCE, which is predefined and required
20450 # on some systems where configure will not decide to define it.
20451 if (defundef == "undef") {
20452 print "/*", prefix defundef, macro, "*/"
20453 next
20454 }
20455 }
20456 }
20457 { print }
20458 _ACAWK
20459 _ACEOF
20460 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20461 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20462 fi # test -n "$CONFIG_HEADERS"
20463
20464
20465 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20466 shift
20467 for ac_tag
20468 do
20469 case $ac_tag in
20470 :[FHLC]) ac_mode=$ac_tag; continue;;
20471 esac
20472 case $ac_mode$ac_tag in
20473 :[FHL]*:*);;
20474 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20475 :[FH]-) ac_tag=-:-;;
20476 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20477 esac
20478 ac_save_IFS=$IFS
20479 IFS=:
20480 set x $ac_tag
20481 IFS=$ac_save_IFS
20482 shift
20483 ac_file=$1
20484 shift
20485
20486 case $ac_mode in
20487 :L) ac_source=$1;;
20488 :[FH])
20489 ac_file_inputs=
20490 for ac_f
20491 do
20492 case $ac_f in
20493 -) ac_f="$ac_tmp/stdin";;
20494 *) # Look for the file first in the build tree, then in the source tree
20495 # (if the path is not absolute). The absolute path cannot be DOS-style,
20496 # because $ac_f cannot contain `:'.
20497 test -f "$ac_f" ||
20498 case $ac_f in
20499 [\\/$]*) false;;
20500 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20501 esac ||
20502 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20503 esac
20504 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20505 as_fn_append ac_file_inputs " '$ac_f'"
20506 done
20507
20508 # Let's still pretend it is `configure' which instantiates (i.e., don't
20509 # use $as_me), people would be surprised to read:
20510 # /* config.h. Generated by config.status. */
20511 configure_input='Generated from '`
20512 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20513 `' by configure.'
20514 if test x"$ac_file" != x-; then
20515 configure_input="$ac_file. $configure_input"
20516 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20517 $as_echo "$as_me: creating $ac_file" >&6;}
20518 fi
20519 # Neutralize special characters interpreted by sed in replacement strings.
20520 case $configure_input in #(
20521 *\&* | *\|* | *\\* )
20522 ac_sed_conf_input=`$as_echo "$configure_input" |
20523 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20524 *) ac_sed_conf_input=$configure_input;;
20525 esac
20526
20527 case $ac_tag in
20528 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20529 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20530 esac
20531 ;;
20532 esac
20533
20534 ac_dir=`$as_dirname -- "$ac_file" ||
20535 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20536 X"$ac_file" : 'X\(//\)[^/]' \| \
20537 X"$ac_file" : 'X\(//\)$' \| \
20538 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20539 $as_echo X"$ac_file" |
20540 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20541 s//\1/
20542 q
20543 }
20544 /^X\(\/\/\)[^/].*/{
20545 s//\1/
20546 q
20547 }
20548 /^X\(\/\/\)$/{
20549 s//\1/
20550 q
20551 }
20552 /^X\(\/\).*/{
20553 s//\1/
20554 q
20555 }
20556 s/.*/./; q'`
20557 as_dir="$ac_dir"; as_fn_mkdir_p
20558 ac_builddir=.
20559
20560 case "$ac_dir" in
20561 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20562 *)
20563 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20564 # A ".." for each directory in $ac_dir_suffix.
20565 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20566 case $ac_top_builddir_sub in
20567 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20568 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20569 esac ;;
20570 esac
20571 ac_abs_top_builddir=$ac_pwd
20572 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20573 # for backward compatibility:
20574 ac_top_builddir=$ac_top_build_prefix
20575
20576 case $srcdir in
20577 .) # We are building in place.
20578 ac_srcdir=.
20579 ac_top_srcdir=$ac_top_builddir_sub
20580 ac_abs_top_srcdir=$ac_pwd ;;
20581 [\\/]* | ?:[\\/]* ) # Absolute name.
20582 ac_srcdir=$srcdir$ac_dir_suffix;
20583 ac_top_srcdir=$srcdir
20584 ac_abs_top_srcdir=$srcdir ;;
20585 *) # Relative name.
20586 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20587 ac_top_srcdir=$ac_top_build_prefix$srcdir
20588 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20589 esac
20590 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20591
20592
20593 case $ac_mode in
20594 :F)
20595 #
20596 # CONFIG_FILE
20597 #
20598
20599 case $INSTALL in
20600 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20601 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20602 esac
20603 _ACEOF
20604
20605 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20606 # If the template does not know about datarootdir, expand it.
20607 # FIXME: This hack should be removed a few years after 2.60.
20608 ac_datarootdir_hack=; ac_datarootdir_seen=
20609 ac_sed_dataroot='
20610 /datarootdir/ {
20611 p
20612 q
20613 }
20614 /@datadir@/p
20615 /@docdir@/p
20616 /@infodir@/p
20617 /@localedir@/p
20618 /@mandir@/p'
20619 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20620 *datarootdir*) ac_datarootdir_seen=yes;;
20621 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20622 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20623 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20624 _ACEOF
20625 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20626 ac_datarootdir_hack='
20627 s&@datadir@&$datadir&g
20628 s&@docdir@&$docdir&g
20629 s&@infodir@&$infodir&g
20630 s&@localedir@&$localedir&g
20631 s&@mandir@&$mandir&g
20632 s&\\\${datarootdir}&$datarootdir&g' ;;
20633 esac
20634 _ACEOF
20635
20636 # Neutralize VPATH when `$srcdir' = `.'.
20637 # Shell code in configure.ac might set extrasub.
20638 # FIXME: do we really want to maintain this feature?
20639 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20640 ac_sed_extra="$ac_vpsub
20641 $extrasub
20642 _ACEOF
20643 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20644 :t
20645 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20646 s|@configure_input@|$ac_sed_conf_input|;t t
20647 s&@top_builddir@&$ac_top_builddir_sub&;t t
20648 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20649 s&@srcdir@&$ac_srcdir&;t t
20650 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20651 s&@top_srcdir@&$ac_top_srcdir&;t t
20652 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20653 s&@builddir@&$ac_builddir&;t t
20654 s&@abs_builddir@&$ac_abs_builddir&;t t
20655 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20656 s&@INSTALL@&$ac_INSTALL&;t t
20657 $ac_datarootdir_hack
20658 "
20659 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20660 if $ac_cs_awk_getline; then
20661 $AWK -f "$ac_tmp/subs.awk"
20662 else
20663 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20664 fi \
20665 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20666
20667 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20668 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20669 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20670 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20672 which seems to be undefined. Please make sure it is defined" >&5
20673 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20674 which seems to be undefined. Please make sure it is defined" >&2;}
20675
20676 rm -f "$ac_tmp/stdin"
20677 case $ac_file in
20678 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20679 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20680 esac \
20681 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20682 ;;
20683 :H)
20684 #
20685 # CONFIG_HEADER
20686 #
20687 if test x"$ac_file" != x-; then
20688 {
20689 $as_echo "/* $configure_input */" \
20690 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20691 } >"$ac_tmp/config.h" \
20692 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20693 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20694 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20695 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20696 else
20697 rm -f "$ac_file"
20698 mv "$ac_tmp/config.h" "$ac_file" \
20699 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20700 fi
20701 else
20702 $as_echo "/* $configure_input */" \
20703 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20704 || as_fn_error $? "could not create -" "$LINENO" 5
20705 fi
20706 ;;
20707 :L)
20708 #
20709 # CONFIG_LINK
20710 #
20711
20712 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20713 :
20714 else
20715 # Prefer the file from the source tree if names are identical.
20716 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20717 ac_source=$srcdir/$ac_source
20718 fi
20719
20720 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20721 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20722
20723 if test ! -r "$ac_source"; then
20724 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20725 fi
20726 rm -f "$ac_file"
20727
20728 # Try a relative symlink, then a hard link, then a copy.
20729 case $ac_source in
20730 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20731 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20732 esac
20733 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20734 ln "$ac_source" "$ac_file" 2>/dev/null ||
20735 cp -p "$ac_source" "$ac_file" ||
20736 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20737 fi
20738 ;;
20739 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20740 $as_echo "$as_me: executing $ac_file commands" >&6;}
20741 ;;
20742 esac
20743
20744
20745 case $ac_file$ac_mode in
20746 "config.h":H) echo > stamp-h ;;
20747 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
20748 "nm.h":L) echo > stamp-nmh ;;
20749 "gcore":F) chmod +x gcore ;;
20750
20751 esac
20752 done # for ac_tag
20753
20754
20755 as_fn_exit 0
20756 _ACEOF
20757 ac_clean_files=$ac_clean_files_save
20758
20759 test $ac_write_fail = 0 ||
20760 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20761
20762
20763 # configure is writing to config.log, and then calls config.status.
20764 # config.status does its own redirection, appending to config.log.
20765 # Unfortunately, on DOS this fails, as config.log is still kept open
20766 # by configure, so config.status won't be able to write to it; its
20767 # output is simply discarded. So we exec the FD to /dev/null,
20768 # effectively closing config.log, so it can be properly (re)opened and
20769 # appended to by config.status. When coming back to configure, we
20770 # need to make the FD available again.
20771 if test "$no_create" != yes; then
20772 ac_cs_success=:
20773 ac_config_status_args=
20774 test "$silent" = yes &&
20775 ac_config_status_args="$ac_config_status_args --quiet"
20776 exec 5>/dev/null
20777 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20778 exec 5>>config.log
20779 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20780 # would make configure fail if this is the last instruction.
20781 $ac_cs_success || as_fn_exit 1
20782 fi
20783
20784 #
20785 # CONFIG_SUBDIRS section.
20786 #
20787 if test "$no_recursion" != yes; then
20788
20789 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20790 # so they do not pile up.
20791 ac_sub_configure_args=
20792 ac_prev=
20793 eval "set x $ac_configure_args"
20794 shift
20795 for ac_arg
20796 do
20797 if test -n "$ac_prev"; then
20798 ac_prev=
20799 continue
20800 fi
20801 case $ac_arg in
20802 -cache-file | --cache-file | --cache-fil | --cache-fi \
20803 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20804 ac_prev=cache_file ;;
20805 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20806 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20807 | --c=*)
20808 ;;
20809 --config-cache | -C)
20810 ;;
20811 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20812 ac_prev=srcdir ;;
20813 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20814 ;;
20815 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20816 ac_prev=prefix ;;
20817 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20818 ;;
20819 --disable-option-checking)
20820 ;;
20821 *)
20822 case $ac_arg in
20823 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20824 esac
20825 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
20826 esac
20827 done
20828
20829 # Always prepend --prefix to ensure using the same prefix
20830 # in subdir configurations.
20831 ac_arg="--prefix=$prefix"
20832 case $ac_arg in
20833 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20834 esac
20835 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20836
20837 # Pass --silent
20838 if test "$silent" = yes; then
20839 ac_sub_configure_args="--silent $ac_sub_configure_args"
20840 fi
20841
20842 # Always prepend --disable-option-checking to silence warnings, since
20843 # different subdirs can have different --enable and --with options.
20844 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20845
20846 ac_popdir=`pwd`
20847 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20848
20849 # Do not complain, so a configure script can configure whichever
20850 # parts of a large source tree are present.
20851 test -d "$srcdir/$ac_dir" || continue
20852
20853 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20854 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20855 $as_echo "$ac_msg" >&6
20856 as_dir="$ac_dir"; as_fn_mkdir_p
20857 ac_builddir=.
20858
20859 case "$ac_dir" in
20860 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20861 *)
20862 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20863 # A ".." for each directory in $ac_dir_suffix.
20864 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20865 case $ac_top_builddir_sub in
20866 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20867 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20868 esac ;;
20869 esac
20870 ac_abs_top_builddir=$ac_pwd
20871 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20872 # for backward compatibility:
20873 ac_top_builddir=$ac_top_build_prefix
20874
20875 case $srcdir in
20876 .) # We are building in place.
20877 ac_srcdir=.
20878 ac_top_srcdir=$ac_top_builddir_sub
20879 ac_abs_top_srcdir=$ac_pwd ;;
20880 [\\/]* | ?:[\\/]* ) # Absolute name.
20881 ac_srcdir=$srcdir$ac_dir_suffix;
20882 ac_top_srcdir=$srcdir
20883 ac_abs_top_srcdir=$srcdir ;;
20884 *) # Relative name.
20885 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20886 ac_top_srcdir=$ac_top_build_prefix$srcdir
20887 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20888 esac
20889 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20890
20891
20892 cd "$ac_dir"
20893
20894 # Check for guested configure; otherwise get Cygnus style configure.
20895 if test -f "$ac_srcdir/configure.gnu"; then
20896 ac_sub_configure=$ac_srcdir/configure.gnu
20897 elif test -f "$ac_srcdir/configure"; then
20898 ac_sub_configure=$ac_srcdir/configure
20899 elif test -f "$ac_srcdir/configure.in"; then
20900 # This should be Cygnus configure.
20901 ac_sub_configure=$ac_aux_dir/configure
20902 else
20903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20904 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20905 ac_sub_configure=
20906 fi
20907
20908 # The recursion is here.
20909 if test -n "$ac_sub_configure"; then
20910 # Make the cache file name correct relative to the subdirectory.
20911 case $cache_file in
20912 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20913 *) # Relative name.
20914 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20915 esac
20916
20917 { $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
20918 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20919 # The eval makes quoting arguments work.
20920 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20921 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20922 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
20923 fi
20924
20925 cd "$ac_popdir"
20926 done
20927 fi
20928 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20930 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20931 fi
20932