gdb/breakpoint: add flags to 'condition' and 'break' commands to force condition
[deliverable/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="main.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 enable_option_checking=no
623 ac_header_list=
624 ac_subst_vars='LTLIBOBJS
625 LIBOBJS
626 GCORE_TRANSFORM_NAME
627 GDB_TRANSFORM_NAME
628 XSLTPROC
629 NM_H
630 GDB_NM_FILE
631 LTLIBXXHASH
632 LIBXXHASH
633 HAVE_LIBXXHASH
634 CTF_DEPS
635 LIBCTF
636 ENABLE_LIBCTF
637 LTLIBBABELTRACE
638 LIBBABELTRACE
639 HAVE_LIBBABELTRACE
640 HAVE_NATIVE_GCORE_HOST
641 NAT_GENERATED_FILES
642 XM_CLIBS
643 MH_CFLAGS
644 LOADLIBES
645 NAT_CDEPS
646 NATDEPFILES
647 NAT_FILE
648 target_subdir
649 CONFIG_UNINSTALL
650 CONFIG_INSTALL
651 CONFIG_CLEAN
652 CONFIG_ALL
653 CONFIG_SRCS
654 CONFIG_DEPS
655 CONFIG_OBS
656 PROFILE_CFLAGS
657 ENABLE_CFLAGS
658 SIM_OBS
659 SIM
660 XMKMF
661 GDBTK_SRC_DIR
662 GDBTK_CFLAGS
663 GDBTKLIBS
664 X_LIBS
665 X_LDFLAGS
666 X_CFLAGS
667 TK_XINCLUDES
668 TK_DEPS
669 TK_LIBRARY
670 TK_INCLUDE
671 TK_STUB_LIB_SPEC
672 TK_STUB_LIB_FLAG
673 TK_STUB_LIB_FILE
674 TK_LIB_SPEC
675 TK_LIB_FLAG
676 TK_LIB_FILE
677 TK_SRC_DIR
678 TK_BIN_DIR
679 TK_VERSION
680 TCL_DEPS
681 TCL_LIBRARY
682 TCL_INCLUDE
683 TCL_STUB_LIB_SPEC
684 TCL_STUB_LIB_FLAG
685 TCL_STUB_LIB_FILE
686 TCL_LIB_SPEC
687 TCL_LIB_FLAG
688 TCL_LIB_FILE
689 TCL_SRC_DIR
690 TCL_BIN_DIR
691 TCL_PATCH_LEVEL
692 TCL_VERSION
693 WIN32LDAPP
694 WIN32LIBS
695 GUI_CFLAGS_X
696 LIBGUI
697 LTLIBLZMA
698 LIBLZMA
699 HAVE_LIBLZMA
700 SER_HARDWIRE
701 WERROR_CFLAGS
702 WARN_CFLAGS
703 SYSTEM_GDBINIT_DIR
704 SYSTEM_GDBINIT
705 TARGET_SYSTEM_ROOT
706 CONFIG_LDFLAGS
707 RDYNAMIC
708 LTLIBIPT
709 LIBIPT
710 HAVE_LIBIPT
711 PTHREAD_CFLAGS
712 PTHREAD_LIBS
713 PTHREAD_CC
714 ax_pthread_config
715 SED
716 ALLOCA
717 SRCHIGH_CFLAGS
718 SRCHIGH_LIBS
719 HAVE_GUILE_FALSE
720 HAVE_GUILE_TRUE
721 GUILE_LIBS
722 GUILE_CPPFLAGS
723 GUILD_TARGET_FLAG
724 GUILD
725 pkg_config_prog_path
726 HAVE_PYTHON_FALSE
727 HAVE_PYTHON_TRUE
728 PYTHON_LIBS
729 PYTHON_CPPFLAGS
730 PYTHON_CFLAGS
731 python_prog_path
732 LTLIBMPFR
733 LIBMPFR
734 HAVE_LIBMPFR
735 LTLIBEXPAT
736 LIBEXPAT
737 HAVE_LIBEXPAT
738 JIT_READER_DIR
739 TARGET_PTR
740 READLINE_TEXI_INCFLAG
741 READLINE_CFLAGS
742 READLINE_DEPS
743 READLINE
744 LTLIBICONV
745 LIBICONV
746 zlibinc
747 zlibdir
748 MIG
749 WINDRES
750 DLLTOOL
751 AR
752 YFLAGS
753 YACC
754 RANLIB
755 LN_S
756 INSTALL_DATA
757 INSTALL_SCRIPT
758 INSTALL_PROGRAM
759 AWK
760 REPORT_BUGS_TEXI
761 REPORT_BUGS_TO
762 PKGVERSION
763 CODESIGN_CERT
764 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 LARGEFILE_CPPFLAGS
799 target_os
800 target_vendor
801 target_cpu
802 target
803 host_os
804 host_vendor
805 host_cpu
806 host
807 build_os
808 build_vendor
809 build_cpu
810 build
811 EGREP
812 GREP
813 CPP
814 ac_ct_CXX
815 CXXFLAGS
816 CXX
817 OBJEXT
818 EXEEXT
819 ac_ct_CC
820 CPPFLAGS
821 LDFLAGS
822 CFLAGS
823 CC
824 MAINT
825 MAINTAINER_MODE_FALSE
826 MAINTAINER_MODE_TRUE
827 target_alias
828 host_alias
829 build_alias
830 LIBS
831 ECHO_T
832 ECHO_N
833 ECHO_C
834 DEFS
835 mandir
836 localedir
837 libdir
838 psdir
839 pdfdir
840 dvidir
841 htmldir
842 infodir
843 docdir
844 oldincludedir
845 includedir
846 localstatedir
847 sharedstatedir
848 sysconfdir
849 datadir
850 datarootdir
851 libexecdir
852 sbindir
853 bindir
854 program_transform_name
855 prefix
856 exec_prefix
857 PACKAGE_URL
858 PACKAGE_BUGREPORT
859 PACKAGE_STRING
860 PACKAGE_VERSION
861 PACKAGE_TARNAME
862 PACKAGE_NAME
863 PATH_SEPARATOR
864 SHELL'
865 ac_subst_files='nat_makefile_frag'
866 ac_user_opts='
867 enable_option_checking
868 enable_maintainer_mode
869 enable_plugins
870 enable_largefile
871 with_separate_debug_dir
872 with_gdb_datadir
873 with_relocated_sources
874 with_auto_load_dir
875 with_auto_load_safe_path
876 enable_targets
877 enable_64_bit_bfd
878 enable_gdbmi
879 enable_tui
880 enable_gdbtk
881 with_debuginfod
882 with_libunwind_ia64
883 with_curses
884 enable_profiling
885 enable_codesign
886 with_pkgversion
887 with_bugurl
888 with_system_zlib
889 with_gnu_ld
890 enable_rpath
891 with_libiconv_prefix
892 with_libiconv_type
893 with_iconv_bin
894 with_system_readline
895 with_jit_reader_dir
896 with_expat
897 with_libexpat_prefix
898 with_libexpat_type
899 with_mpfr
900 with_libmpfr_prefix
901 with_libmpfr_type
902 with_python
903 with_python_libdir
904 with_guile
905 enable_source_highlight
906 with_intel_pt
907 with_libipt_prefix
908 with_libipt_type
909 with_included_regex
910 with_sysroot
911 with_system_gdbinit
912 with_system_gdbinit_dir
913 enable_werror
914 enable_build_warnings
915 enable_gdb_build_warnings
916 enable_ubsan
917 with_lzma
918 with_liblzma_prefix
919 with_liblzma_type
920 with_tcl
921 with_tk
922 with_x
923 enable_sim
924 with_babeltrace
925 with_libbabeltrace_prefix
926 with_libbabeltrace_type
927 with_xxhash
928 enable_libctf
929 with_libxxhash_prefix
930 with_libxxhash_type
931 enable_unit_tests
932 '
933 ac_precious_vars='build_alias
934 host_alias
935 target_alias
936 CC
937 CFLAGS
938 LDFLAGS
939 LIBS
940 CPPFLAGS
941 CXX
942 CXXFLAGS
943 CCC
944 CPP
945 MAKEINFO
946 MAKEINFOFLAGS
947 PKG_CONFIG
948 PKG_CONFIG_PATH
949 PKG_CONFIG_LIBDIR
950 DEBUGINFOD_CFLAGS
951 DEBUGINFOD_LIBS
952 YACC
953 YFLAGS
954 XMKMF'
955 ac_subdirs_all='testsuite
956 gdbtk'
957
958 # Initialize some variables set by options.
959 ac_init_help=
960 ac_init_version=false
961 ac_unrecognized_opts=
962 ac_unrecognized_sep=
963 # The variables have the same names as the options, with
964 # dashes changed to underlines.
965 cache_file=/dev/null
966 exec_prefix=NONE
967 no_create=
968 no_recursion=
969 prefix=NONE
970 program_prefix=NONE
971 program_suffix=NONE
972 program_transform_name=s,x,x,
973 silent=
974 site=
975 srcdir=
976 verbose=
977 x_includes=NONE
978 x_libraries=NONE
979
980 # Installation directory options.
981 # These are left unexpanded so users can "make install exec_prefix=/foo"
982 # and all the variables that are supposed to be based on exec_prefix
983 # by default will actually change.
984 # Use braces instead of parens because sh, perl, etc. also accept them.
985 # (The list follows the same order as the GNU Coding Standards.)
986 bindir='${exec_prefix}/bin'
987 sbindir='${exec_prefix}/sbin'
988 libexecdir='${exec_prefix}/libexec'
989 datarootdir='${prefix}/share'
990 datadir='${datarootdir}'
991 sysconfdir='${prefix}/etc'
992 sharedstatedir='${prefix}/com'
993 localstatedir='${prefix}/var'
994 includedir='${prefix}/include'
995 oldincludedir='/usr/include'
996 docdir='${datarootdir}/doc/${PACKAGE}'
997 infodir='${datarootdir}/info'
998 htmldir='${docdir}'
999 dvidir='${docdir}'
1000 pdfdir='${docdir}'
1001 psdir='${docdir}'
1002 libdir='${exec_prefix}/lib'
1003 localedir='${datarootdir}/locale'
1004 mandir='${datarootdir}/man'
1005
1006 ac_prev=
1007 ac_dashdash=
1008 for ac_option
1009 do
1010 # If the previous option needs an argument, assign it.
1011 if test -n "$ac_prev"; then
1012 eval $ac_prev=\$ac_option
1013 ac_prev=
1014 continue
1015 fi
1016
1017 case $ac_option in
1018 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1019 *=) ac_optarg= ;;
1020 *) ac_optarg=yes ;;
1021 esac
1022
1023 # Accept the important Cygnus configure options, so we can diagnose typos.
1024
1025 case $ac_dashdash$ac_option in
1026 --)
1027 ac_dashdash=yes ;;
1028
1029 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1030 ac_prev=bindir ;;
1031 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1032 bindir=$ac_optarg ;;
1033
1034 -build | --build | --buil | --bui | --bu)
1035 ac_prev=build_alias ;;
1036 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1037 build_alias=$ac_optarg ;;
1038
1039 -cache-file | --cache-file | --cache-fil | --cache-fi \
1040 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1041 ac_prev=cache_file ;;
1042 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1043 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1044 cache_file=$ac_optarg ;;
1045
1046 --config-cache | -C)
1047 cache_file=config.cache ;;
1048
1049 -datadir | --datadir | --datadi | --datad)
1050 ac_prev=datadir ;;
1051 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1052 datadir=$ac_optarg ;;
1053
1054 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1055 | --dataroo | --dataro | --datar)
1056 ac_prev=datarootdir ;;
1057 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1058 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1059 datarootdir=$ac_optarg ;;
1060
1061 -disable-* | --disable-*)
1062 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1063 # Reject names that are not valid shell variable names.
1064 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1065 as_fn_error $? "invalid feature name: $ac_useropt"
1066 ac_useropt_orig=$ac_useropt
1067 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1068 case $ac_user_opts in
1069 *"
1070 "enable_$ac_useropt"
1071 "*) ;;
1072 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1073 ac_unrecognized_sep=', ';;
1074 esac
1075 eval enable_$ac_useropt=no ;;
1076
1077 -docdir | --docdir | --docdi | --doc | --do)
1078 ac_prev=docdir ;;
1079 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1080 docdir=$ac_optarg ;;
1081
1082 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1083 ac_prev=dvidir ;;
1084 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1085 dvidir=$ac_optarg ;;
1086
1087 -enable-* | --enable-*)
1088 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1089 # Reject names that are not valid shell variable names.
1090 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1091 as_fn_error $? "invalid feature name: $ac_useropt"
1092 ac_useropt_orig=$ac_useropt
1093 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1094 case $ac_user_opts in
1095 *"
1096 "enable_$ac_useropt"
1097 "*) ;;
1098 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1099 ac_unrecognized_sep=', ';;
1100 esac
1101 eval enable_$ac_useropt=\$ac_optarg ;;
1102
1103 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1104 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1105 | --exec | --exe | --ex)
1106 ac_prev=exec_prefix ;;
1107 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1108 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1109 | --exec=* | --exe=* | --ex=*)
1110 exec_prefix=$ac_optarg ;;
1111
1112 -gas | --gas | --ga | --g)
1113 # Obsolete; use --with-gas.
1114 with_gas=yes ;;
1115
1116 -help | --help | --hel | --he | -h)
1117 ac_init_help=long ;;
1118 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1119 ac_init_help=recursive ;;
1120 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1121 ac_init_help=short ;;
1122
1123 -host | --host | --hos | --ho)
1124 ac_prev=host_alias ;;
1125 -host=* | --host=* | --hos=* | --ho=*)
1126 host_alias=$ac_optarg ;;
1127
1128 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1129 ac_prev=htmldir ;;
1130 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1131 | --ht=*)
1132 htmldir=$ac_optarg ;;
1133
1134 -includedir | --includedir | --includedi | --included | --include \
1135 | --includ | --inclu | --incl | --inc)
1136 ac_prev=includedir ;;
1137 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1138 | --includ=* | --inclu=* | --incl=* | --inc=*)
1139 includedir=$ac_optarg ;;
1140
1141 -infodir | --infodir | --infodi | --infod | --info | --inf)
1142 ac_prev=infodir ;;
1143 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1144 infodir=$ac_optarg ;;
1145
1146 -libdir | --libdir | --libdi | --libd)
1147 ac_prev=libdir ;;
1148 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1149 libdir=$ac_optarg ;;
1150
1151 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1152 | --libexe | --libex | --libe)
1153 ac_prev=libexecdir ;;
1154 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1155 | --libexe=* | --libex=* | --libe=*)
1156 libexecdir=$ac_optarg ;;
1157
1158 -localedir | --localedir | --localedi | --localed | --locale)
1159 ac_prev=localedir ;;
1160 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1161 localedir=$ac_optarg ;;
1162
1163 -localstatedir | --localstatedir | --localstatedi | --localstated \
1164 | --localstate | --localstat | --localsta | --localst | --locals)
1165 ac_prev=localstatedir ;;
1166 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1167 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1168 localstatedir=$ac_optarg ;;
1169
1170 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1171 ac_prev=mandir ;;
1172 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1173 mandir=$ac_optarg ;;
1174
1175 -nfp | --nfp | --nf)
1176 # Obsolete; use --without-fp.
1177 with_fp=no ;;
1178
1179 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1180 | --no-cr | --no-c | -n)
1181 no_create=yes ;;
1182
1183 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1184 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1185 no_recursion=yes ;;
1186
1187 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1188 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1189 | --oldin | --oldi | --old | --ol | --o)
1190 ac_prev=oldincludedir ;;
1191 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1192 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1193 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1194 oldincludedir=$ac_optarg ;;
1195
1196 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1197 ac_prev=prefix ;;
1198 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1199 prefix=$ac_optarg ;;
1200
1201 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1202 | --program-pre | --program-pr | --program-p)
1203 ac_prev=program_prefix ;;
1204 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1205 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1206 program_prefix=$ac_optarg ;;
1207
1208 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1209 | --program-suf | --program-su | --program-s)
1210 ac_prev=program_suffix ;;
1211 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1212 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1213 program_suffix=$ac_optarg ;;
1214
1215 -program-transform-name | --program-transform-name \
1216 | --program-transform-nam | --program-transform-na \
1217 | --program-transform-n | --program-transform- \
1218 | --program-transform | --program-transfor \
1219 | --program-transfo | --program-transf \
1220 | --program-trans | --program-tran \
1221 | --progr-tra | --program-tr | --program-t)
1222 ac_prev=program_transform_name ;;
1223 -program-transform-name=* | --program-transform-name=* \
1224 | --program-transform-nam=* | --program-transform-na=* \
1225 | --program-transform-n=* | --program-transform-=* \
1226 | --program-transform=* | --program-transfor=* \
1227 | --program-transfo=* | --program-transf=* \
1228 | --program-trans=* | --program-tran=* \
1229 | --progr-tra=* | --program-tr=* | --program-t=*)
1230 program_transform_name=$ac_optarg ;;
1231
1232 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1233 ac_prev=pdfdir ;;
1234 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1235 pdfdir=$ac_optarg ;;
1236
1237 -psdir | --psdir | --psdi | --psd | --ps)
1238 ac_prev=psdir ;;
1239 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1240 psdir=$ac_optarg ;;
1241
1242 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1243 | -silent | --silent | --silen | --sile | --sil)
1244 silent=yes ;;
1245
1246 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1247 ac_prev=sbindir ;;
1248 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1249 | --sbi=* | --sb=*)
1250 sbindir=$ac_optarg ;;
1251
1252 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1253 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1254 | --sharedst | --shareds | --shared | --share | --shar \
1255 | --sha | --sh)
1256 ac_prev=sharedstatedir ;;
1257 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1258 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1259 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1260 | --sha=* | --sh=*)
1261 sharedstatedir=$ac_optarg ;;
1262
1263 -site | --site | --sit)
1264 ac_prev=site ;;
1265 -site=* | --site=* | --sit=*)
1266 site=$ac_optarg ;;
1267
1268 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1269 ac_prev=srcdir ;;
1270 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1271 srcdir=$ac_optarg ;;
1272
1273 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1274 | --syscon | --sysco | --sysc | --sys | --sy)
1275 ac_prev=sysconfdir ;;
1276 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1277 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1278 sysconfdir=$ac_optarg ;;
1279
1280 -target | --target | --targe | --targ | --tar | --ta | --t)
1281 ac_prev=target_alias ;;
1282 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1283 target_alias=$ac_optarg ;;
1284
1285 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1286 verbose=yes ;;
1287
1288 -version | --version | --versio | --versi | --vers | -V)
1289 ac_init_version=: ;;
1290
1291 -with-* | --with-*)
1292 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1293 # Reject names that are not valid shell variable names.
1294 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1295 as_fn_error $? "invalid package name: $ac_useropt"
1296 ac_useropt_orig=$ac_useropt
1297 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1298 case $ac_user_opts in
1299 *"
1300 "with_$ac_useropt"
1301 "*) ;;
1302 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1303 ac_unrecognized_sep=', ';;
1304 esac
1305 eval with_$ac_useropt=\$ac_optarg ;;
1306
1307 -without-* | --without-*)
1308 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1309 # Reject names that are not valid shell variable names.
1310 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1311 as_fn_error $? "invalid package name: $ac_useropt"
1312 ac_useropt_orig=$ac_useropt
1313 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1314 case $ac_user_opts in
1315 *"
1316 "with_$ac_useropt"
1317 "*) ;;
1318 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1319 ac_unrecognized_sep=', ';;
1320 esac
1321 eval with_$ac_useropt=no ;;
1322
1323 --x)
1324 # Obsolete; use --with-x.
1325 with_x=yes ;;
1326
1327 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1328 | --x-incl | --x-inc | --x-in | --x-i)
1329 ac_prev=x_includes ;;
1330 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1331 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1332 x_includes=$ac_optarg ;;
1333
1334 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1335 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1336 ac_prev=x_libraries ;;
1337 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1338 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1339 x_libraries=$ac_optarg ;;
1340
1341 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1342 Try \`$0 --help' for more information"
1343 ;;
1344
1345 *=*)
1346 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1347 # Reject names that are not valid shell variable names.
1348 case $ac_envvar in #(
1349 '' | [0-9]* | *[!_$as_cr_alnum]* )
1350 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1351 esac
1352 eval $ac_envvar=\$ac_optarg
1353 export $ac_envvar ;;
1354
1355 *)
1356 # FIXME: should be removed in autoconf 3.0.
1357 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1358 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1359 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1360 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1361 ;;
1362
1363 esac
1364 done
1365
1366 if test -n "$ac_prev"; then
1367 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1368 as_fn_error $? "missing argument to $ac_option"
1369 fi
1370
1371 if test -n "$ac_unrecognized_opts"; then
1372 case $enable_option_checking in
1373 no) ;;
1374 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1375 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1376 esac
1377 fi
1378
1379 # Check all directory arguments for consistency.
1380 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1381 datadir sysconfdir sharedstatedir localstatedir includedir \
1382 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1383 libdir localedir mandir
1384 do
1385 eval ac_val=\$$ac_var
1386 # Remove trailing slashes.
1387 case $ac_val in
1388 */ )
1389 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1390 eval $ac_var=\$ac_val;;
1391 esac
1392 # Be sure to have absolute directory names.
1393 case $ac_val in
1394 [\\/$]* | ?:[\\/]* ) continue;;
1395 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1396 esac
1397 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1398 done
1399
1400 # There might be people who depend on the old broken behavior: `$host'
1401 # used to hold the argument of --host etc.
1402 # FIXME: To remove some day.
1403 build=$build_alias
1404 host=$host_alias
1405 target=$target_alias
1406
1407 # FIXME: To remove some day.
1408 if test "x$host_alias" != x; then
1409 if test "x$build_alias" = x; then
1410 cross_compiling=maybe
1411 elif test "x$build_alias" != "x$host_alias"; then
1412 cross_compiling=yes
1413 fi
1414 fi
1415
1416 ac_tool_prefix=
1417 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1418
1419 test "$silent" = yes && exec 6>/dev/null
1420
1421
1422 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1423 ac_ls_di=`ls -di .` &&
1424 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1425 as_fn_error $? "working directory cannot be determined"
1426 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1427 as_fn_error $? "pwd does not report name of working directory"
1428
1429
1430 # Find the source files, if location was not specified.
1431 if test -z "$srcdir"; then
1432 ac_srcdir_defaulted=yes
1433 # Try the directory containing this script, then the parent directory.
1434 ac_confdir=`$as_dirname -- "$as_myself" ||
1435 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1436 X"$as_myself" : 'X\(//\)[^/]' \| \
1437 X"$as_myself" : 'X\(//\)$' \| \
1438 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1439 $as_echo X"$as_myself" |
1440 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1441 s//\1/
1442 q
1443 }
1444 /^X\(\/\/\)[^/].*/{
1445 s//\1/
1446 q
1447 }
1448 /^X\(\/\/\)$/{
1449 s//\1/
1450 q
1451 }
1452 /^X\(\/\).*/{
1453 s//\1/
1454 q
1455 }
1456 s/.*/./; q'`
1457 srcdir=$ac_confdir
1458 if test ! -r "$srcdir/$ac_unique_file"; then
1459 srcdir=..
1460 fi
1461 else
1462 ac_srcdir_defaulted=no
1463 fi
1464 if test ! -r "$srcdir/$ac_unique_file"; then
1465 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1466 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1467 fi
1468 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1469 ac_abs_confdir=`(
1470 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1471 pwd)`
1472 # When building in place, set srcdir=.
1473 if test "$ac_abs_confdir" = "$ac_pwd"; then
1474 srcdir=.
1475 fi
1476 # Remove unnecessary trailing slashes from srcdir.
1477 # Double slashes in file names in object file debugging info
1478 # mess up M-x gdb in Emacs.
1479 case $srcdir in
1480 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1481 esac
1482 for ac_var in $ac_precious_vars; do
1483 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1484 eval ac_env_${ac_var}_value=\$${ac_var}
1485 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1486 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1487 done
1488
1489 #
1490 # Report the --help message.
1491 #
1492 if test "$ac_init_help" = "long"; then
1493 # Omit some internal or obsolete options to make the list less imposing.
1494 # This message is too long to be a string in the A/UX 3.1 sh.
1495 cat <<_ACEOF
1496 \`configure' configures this package to adapt to many kinds of systems.
1497
1498 Usage: $0 [OPTION]... [VAR=VALUE]...
1499
1500 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1501 VAR=VALUE. See below for descriptions of some of the useful variables.
1502
1503 Defaults for the options are specified in brackets.
1504
1505 Configuration:
1506 -h, --help display this help and exit
1507 --help=short display options specific to this package
1508 --help=recursive display the short help of all the included packages
1509 -V, --version display version information and exit
1510 -q, --quiet, --silent do not print \`checking ...' messages
1511 --cache-file=FILE cache test results in FILE [disabled]
1512 -C, --config-cache alias for \`--cache-file=config.cache'
1513 -n, --no-create do not create output files
1514 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1515
1516 Installation directories:
1517 --prefix=PREFIX install architecture-independent files in PREFIX
1518 [$ac_default_prefix]
1519 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1520 [PREFIX]
1521
1522 By default, \`make install' will install all the files in
1523 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1524 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1525 for instance \`--prefix=\$HOME'.
1526
1527 For better control, use the options below.
1528
1529 Fine tuning of the installation directories:
1530 --bindir=DIR user executables [EPREFIX/bin]
1531 --sbindir=DIR system admin executables [EPREFIX/sbin]
1532 --libexecdir=DIR program executables [EPREFIX/libexec]
1533 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1534 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1535 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1536 --libdir=DIR object code libraries [EPREFIX/lib]
1537 --includedir=DIR C header files [PREFIX/include]
1538 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1539 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1540 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1541 --infodir=DIR info documentation [DATAROOTDIR/info]
1542 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1543 --mandir=DIR man documentation [DATAROOTDIR/man]
1544 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1545 --htmldir=DIR html documentation [DOCDIR]
1546 --dvidir=DIR dvi documentation [DOCDIR]
1547 --pdfdir=DIR pdf documentation [DOCDIR]
1548 --psdir=DIR ps documentation [DOCDIR]
1549 _ACEOF
1550
1551 cat <<\_ACEOF
1552
1553 Program names:
1554 --program-prefix=PREFIX prepend PREFIX to installed program names
1555 --program-suffix=SUFFIX append SUFFIX to installed program names
1556 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1557
1558 X features:
1559 --x-includes=DIR X include files are in DIR
1560 --x-libraries=DIR X library files are in DIR
1561
1562 System types:
1563 --build=BUILD configure for building on BUILD [guessed]
1564 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1565 --target=TARGET configure for building compilers for TARGET [HOST]
1566 _ACEOF
1567 fi
1568
1569 if test -n "$ac_init_help"; then
1570
1571 cat <<\_ACEOF
1572
1573 Optional Features:
1574 --disable-option-checking ignore unrecognized --enable/--with options
1575 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1576 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1577 --enable-maintainer-mode
1578 enable make rules and dependencies not useful (and
1579 sometimes confusing) to the casual installer
1580 --enable-plugins Enable support for plugins
1581 --disable-largefile omit support for large files
1582 --enable-targets=TARGETS
1583 alternative target configurations
1584 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1585 --disable-gdbmi disable machine-interface (MI)
1586 --enable-tui enable full-screen terminal user interface (TUI)
1587 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1588 --enable-profiling enable profiling of GDB
1589 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1590 --disable-rpath do not hardcode runtime library paths
1591 --enable-source-highlight
1592 enable source-highlight for source listings
1593 --enable-werror treat compile warnings as errors
1594 --enable-build-warnings enable build-time compiler warnings if gcc is used
1595 --enable-gdb-build-warnings
1596 enable GDB specific build-time compiler warnings if
1597 gcc is used
1598 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1599 --enable-sim link gdb with simulator
1600 --enable-libctf Handle .ctf type-info sections [default=yes]
1601 --enable-unit-tests Enable the inclusion of unit tests when compiling
1602 GDB
1603
1604 Optional Packages:
1605 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1606 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1607 --with-separate-debug-dir=PATH
1608 look for global separate debug info in this path
1609 [LIBDIR/debug]
1610 --with-gdb-datadir=PATH look for global separate data files in this path
1611 [DATADIR/gdb]
1612 --with-relocated-sources=PATH
1613 automatically relocate this path for source files
1614 --with-auto-load-dir=PATH
1615 directories from which to load auto-loaded scripts
1616 [$debugdir:$datadir/auto-load]
1617 --with-auto-load-safe-path=PATH
1618 directories safe to hold auto-loaded files
1619 [--with-auto-load-dir]
1620 --without-auto-load-safe-path
1621 do not restrict auto-loaded files locations
1622 --with-debuginfod Enable debuginfo lookups with debuginfod
1623 (auto/yes/no)
1624 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1625 --with-curses use the curses library instead of the termcap
1626 library
1627 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1628 --with-bugurl=URL Direct users to URL to report a bug
1629 --with-system-zlib use installed libz
1630 --with-gnu-ld assume the C compiler uses GNU ld default=no
1631 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1632 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1633 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1634 --with-iconv-bin=PATH specify where to find the iconv program
1635 --with-system-readline use installed readline library
1636 --with-jit-reader-dir=PATH
1637 directory to load the JIT readers from
1638 --with-expat include expat support (auto/yes/no)
1639 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1640 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1641 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1642 --with-mpfr include MPFR support (auto/yes/no)
1643 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1644 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1645 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1646 --with-python[=PYTHON] include python support
1647 (auto/yes/no/<python-program>)
1648 --with-python-libdir[=DIR]
1649 search for python's libraries in DIR
1650 --with-guile[=GUILE] include guile support
1651 (auto/yes/no/<guile-version>/<pkg-config-program>)
1652 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1653 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1654 --without-libipt-prefix don't search for libipt in includedir and libdir
1655 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1656 --without-included-regex
1657 don't use included regex; this is the default on
1658 systems with version 2 of the GNU C library (use
1659 with caution on other system)
1660 --with-sysroot[=DIR] search for usr/lib et al within DIR
1661 --with-system-gdbinit=PATH
1662 automatically load a system-wide gdbinit file
1663 --with-system-gdbinit-dir=PATH
1664 automatically load system-wide gdbinit files from
1665 this directory
1666 --with-lzma support lzma compression (auto/yes/no)
1667 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1668 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1669 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1670 --with-tcl directory containing tcl configuration (tclConfig.sh)
1671 --with-tk directory containing tk configuration (tkConfig.sh)
1672 --with-x use the X Window System
1673 --with-babeltrace include babeltrace support (auto/yes/no)
1674 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1675 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1676 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1677 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1678 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1679 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1680 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1681
1682 Some influential environment variables:
1683 CC C compiler command
1684 CFLAGS C compiler flags
1685 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1686 nonstandard directory <lib dir>
1687 LIBS libraries to pass to the linker, e.g. -l<library>
1688 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1689 you have headers in a nonstandard directory <include dir>
1690 CXX C++ compiler command
1691 CXXFLAGS C++ compiler flags
1692 CPP C preprocessor
1693 MAKEINFO Parent configure detects if it is of sufficient version.
1694 MAKEINFOFLAGS
1695 Parameters for MAKEINFO.
1696 PKG_CONFIG path to pkg-config utility
1697 PKG_CONFIG_PATH
1698 directories to add to pkg-config's search path
1699 PKG_CONFIG_LIBDIR
1700 path overriding pkg-config's built-in search path
1701 DEBUGINFOD_CFLAGS
1702 C compiler flags for DEBUGINFOD, overriding pkg-config
1703 DEBUGINFOD_LIBS
1704 linker flags for DEBUGINFOD, overriding pkg-config
1705 YACC The `Yet Another Compiler Compiler' implementation to use.
1706 Defaults to the first program found out of: `bison -y', `byacc',
1707 `yacc'.
1708 YFLAGS The list of arguments that will be passed by default to $YACC.
1709 This script will default YFLAGS to the empty string to avoid a
1710 default value of `-d' given by some make applications.
1711 XMKMF Path to xmkmf, Makefile generator for X Window System
1712
1713 Use these variables to override the choices made by `configure' or to help
1714 it to find libraries and programs with nonstandard names/locations.
1715
1716 Report bugs to the package provider.
1717 _ACEOF
1718 ac_status=$?
1719 fi
1720
1721 if test "$ac_init_help" = "recursive"; then
1722 # If there are subdirs, report their specific --help.
1723 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1724 test -d "$ac_dir" ||
1725 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1726 continue
1727 ac_builddir=.
1728
1729 case "$ac_dir" in
1730 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1731 *)
1732 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1733 # A ".." for each directory in $ac_dir_suffix.
1734 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1735 case $ac_top_builddir_sub in
1736 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1737 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1738 esac ;;
1739 esac
1740 ac_abs_top_builddir=$ac_pwd
1741 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1742 # for backward compatibility:
1743 ac_top_builddir=$ac_top_build_prefix
1744
1745 case $srcdir in
1746 .) # We are building in place.
1747 ac_srcdir=.
1748 ac_top_srcdir=$ac_top_builddir_sub
1749 ac_abs_top_srcdir=$ac_pwd ;;
1750 [\\/]* | ?:[\\/]* ) # Absolute name.
1751 ac_srcdir=$srcdir$ac_dir_suffix;
1752 ac_top_srcdir=$srcdir
1753 ac_abs_top_srcdir=$srcdir ;;
1754 *) # Relative name.
1755 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1756 ac_top_srcdir=$ac_top_build_prefix$srcdir
1757 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1758 esac
1759 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1760
1761 cd "$ac_dir" || { ac_status=$?; continue; }
1762 # Check for guested configure.
1763 if test -f "$ac_srcdir/configure.gnu"; then
1764 echo &&
1765 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1766 elif test -f "$ac_srcdir/configure"; then
1767 echo &&
1768 $SHELL "$ac_srcdir/configure" --help=recursive
1769 else
1770 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1771 fi || ac_status=$?
1772 cd "$ac_pwd" || { ac_status=$?; break; }
1773 done
1774 fi
1775
1776 test -n "$ac_init_help" && exit $ac_status
1777 if $ac_init_version; then
1778 cat <<\_ACEOF
1779 configure
1780 generated by GNU Autoconf 2.69
1781
1782 Copyright (C) 2012 Free Software Foundation, Inc.
1783 This configure script is free software; the Free Software Foundation
1784 gives unlimited permission to copy, distribute and modify it.
1785 _ACEOF
1786 exit
1787 fi
1788
1789 ## ------------------------ ##
1790 ## Autoconf initialization. ##
1791 ## ------------------------ ##
1792
1793 # ac_fn_c_try_compile LINENO
1794 # --------------------------
1795 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1796 ac_fn_c_try_compile ()
1797 {
1798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 rm -f conftest.$ac_objext
1800 if { { ac_try="$ac_compile"
1801 case "(($ac_try" in
1802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1803 *) ac_try_echo=$ac_try;;
1804 esac
1805 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1806 $as_echo "$ac_try_echo"; } >&5
1807 (eval "$ac_compile") 2>conftest.err
1808 ac_status=$?
1809 if test -s conftest.err; then
1810 grep -v '^ *+' conftest.err >conftest.er1
1811 cat conftest.er1 >&5
1812 mv -f conftest.er1 conftest.err
1813 fi
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; } && {
1816 test -z "$ac_c_werror_flag" ||
1817 test ! -s conftest.err
1818 } && test -s conftest.$ac_objext; then :
1819 ac_retval=0
1820 else
1821 $as_echo "$as_me: failed program was:" >&5
1822 sed 's/^/| /' conftest.$ac_ext >&5
1823
1824 ac_retval=1
1825 fi
1826 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1827 as_fn_set_status $ac_retval
1828
1829 } # ac_fn_c_try_compile
1830
1831 # ac_fn_cxx_try_compile LINENO
1832 # ----------------------------
1833 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1834 ac_fn_cxx_try_compile ()
1835 {
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 rm -f conftest.$ac_objext
1838 if { { ac_try="$ac_compile"
1839 case "(($ac_try" in
1840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1841 *) ac_try_echo=$ac_try;;
1842 esac
1843 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1844 $as_echo "$ac_try_echo"; } >&5
1845 (eval "$ac_compile") 2>conftest.err
1846 ac_status=$?
1847 if test -s conftest.err; then
1848 grep -v '^ *+' conftest.err >conftest.er1
1849 cat conftest.er1 >&5
1850 mv -f conftest.er1 conftest.err
1851 fi
1852 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1853 test $ac_status = 0; } && {
1854 test -z "$ac_cxx_werror_flag" ||
1855 test ! -s conftest.err
1856 } && test -s conftest.$ac_objext; then :
1857 ac_retval=0
1858 else
1859 $as_echo "$as_me: failed program was:" >&5
1860 sed 's/^/| /' conftest.$ac_ext >&5
1861
1862 ac_retval=1
1863 fi
1864 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1865 as_fn_set_status $ac_retval
1866
1867 } # ac_fn_cxx_try_compile
1868
1869 # ac_fn_c_try_cpp LINENO
1870 # ----------------------
1871 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1872 ac_fn_c_try_cpp ()
1873 {
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 if { { ac_try="$ac_cpp conftest.$ac_ext"
1876 case "(($ac_try" in
1877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1878 *) ac_try_echo=$ac_try;;
1879 esac
1880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1881 $as_echo "$ac_try_echo"; } >&5
1882 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1883 ac_status=$?
1884 if test -s conftest.err; then
1885 grep -v '^ *+' conftest.err >conftest.er1
1886 cat conftest.er1 >&5
1887 mv -f conftest.er1 conftest.err
1888 fi
1889 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1890 test $ac_status = 0; } > conftest.i && {
1891 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1892 test ! -s conftest.err
1893 }; then :
1894 ac_retval=0
1895 else
1896 $as_echo "$as_me: failed program was:" >&5
1897 sed 's/^/| /' conftest.$ac_ext >&5
1898
1899 ac_retval=1
1900 fi
1901 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1902 as_fn_set_status $ac_retval
1903
1904 } # ac_fn_c_try_cpp
1905
1906 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1907 # -------------------------------------------------------
1908 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1909 # the include files in INCLUDES and setting the cache variable VAR
1910 # accordingly.
1911 ac_fn_c_check_header_mongrel ()
1912 {
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 if eval \${$3+:} false; then :
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1916 $as_echo_n "checking for $2... " >&6; }
1917 if eval \${$3+:} false; then :
1918 $as_echo_n "(cached) " >&6
1919 fi
1920 eval ac_res=\$$3
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1922 $as_echo "$ac_res" >&6; }
1923 else
1924 # Is the header compilable?
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1926 $as_echo_n "checking $2 usability... " >&6; }
1927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1928 /* end confdefs.h. */
1929 $4
1930 #include <$2>
1931 _ACEOF
1932 if ac_fn_c_try_compile "$LINENO"; then :
1933 ac_header_compiler=yes
1934 else
1935 ac_header_compiler=no
1936 fi
1937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1939 $as_echo "$ac_header_compiler" >&6; }
1940
1941 # Is the header present?
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1943 $as_echo_n "checking $2 presence... " >&6; }
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945 /* end confdefs.h. */
1946 #include <$2>
1947 _ACEOF
1948 if ac_fn_c_try_cpp "$LINENO"; then :
1949 ac_header_preproc=yes
1950 else
1951 ac_header_preproc=no
1952 fi
1953 rm -f conftest.err conftest.i conftest.$ac_ext
1954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1955 $as_echo "$ac_header_preproc" >&6; }
1956
1957 # So? What about this header?
1958 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1959 yes:no: )
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1961 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1963 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1964 ;;
1965 no:yes:* )
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1967 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1969 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1971 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1973 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1975 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1976 ;;
1977 esac
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1979 $as_echo_n "checking for $2... " >&6; }
1980 if eval \${$3+:} false; then :
1981 $as_echo_n "(cached) " >&6
1982 else
1983 eval "$3=\$ac_header_compiler"
1984 fi
1985 eval ac_res=\$$3
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1987 $as_echo "$ac_res" >&6; }
1988 fi
1989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1990
1991 } # ac_fn_c_check_header_mongrel
1992
1993 # ac_fn_c_try_run LINENO
1994 # ----------------------
1995 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1996 # that executables *can* be run.
1997 ac_fn_c_try_run ()
1998 {
1999 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2000 if { { ac_try="$ac_link"
2001 case "(($ac_try" in
2002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2003 *) ac_try_echo=$ac_try;;
2004 esac
2005 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2006 $as_echo "$ac_try_echo"; } >&5
2007 (eval "$ac_link") 2>&5
2008 ac_status=$?
2009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2010 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2011 { { case "(($ac_try" in
2012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2013 *) ac_try_echo=$ac_try;;
2014 esac
2015 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2016 $as_echo "$ac_try_echo"; } >&5
2017 (eval "$ac_try") 2>&5
2018 ac_status=$?
2019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2020 test $ac_status = 0; }; }; then :
2021 ac_retval=0
2022 else
2023 $as_echo "$as_me: program exited with status $ac_status" >&5
2024 $as_echo "$as_me: failed program was:" >&5
2025 sed 's/^/| /' conftest.$ac_ext >&5
2026
2027 ac_retval=$ac_status
2028 fi
2029 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2030 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2031 as_fn_set_status $ac_retval
2032
2033 } # ac_fn_c_try_run
2034
2035 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2036 # -------------------------------------------------------
2037 # Tests whether HEADER exists and can be compiled using the include files in
2038 # INCLUDES, setting the cache variable VAR accordingly.
2039 ac_fn_c_check_header_compile ()
2040 {
2041 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2043 $as_echo_n "checking for $2... " >&6; }
2044 if eval \${$3+:} false; then :
2045 $as_echo_n "(cached) " >&6
2046 else
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048 /* end confdefs.h. */
2049 $4
2050 #include <$2>
2051 _ACEOF
2052 if ac_fn_c_try_compile "$LINENO"; then :
2053 eval "$3=yes"
2054 else
2055 eval "$3=no"
2056 fi
2057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2058 fi
2059 eval ac_res=\$$3
2060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2061 $as_echo "$ac_res" >&6; }
2062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2063
2064 } # ac_fn_c_check_header_compile
2065
2066 # ac_fn_c_try_link LINENO
2067 # -----------------------
2068 # Try to link conftest.$ac_ext, and return whether this succeeded.
2069 ac_fn_c_try_link ()
2070 {
2071 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2072 rm -f conftest.$ac_objext conftest$ac_exeext
2073 if { { ac_try="$ac_link"
2074 case "(($ac_try" in
2075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2076 *) ac_try_echo=$ac_try;;
2077 esac
2078 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2079 $as_echo "$ac_try_echo"; } >&5
2080 (eval "$ac_link") 2>conftest.err
2081 ac_status=$?
2082 if test -s conftest.err; then
2083 grep -v '^ *+' conftest.err >conftest.er1
2084 cat conftest.er1 >&5
2085 mv -f conftest.er1 conftest.err
2086 fi
2087 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2088 test $ac_status = 0; } && {
2089 test -z "$ac_c_werror_flag" ||
2090 test ! -s conftest.err
2091 } && test -s conftest$ac_exeext && {
2092 test "$cross_compiling" = yes ||
2093 test -x conftest$ac_exeext
2094 }; then :
2095 ac_retval=0
2096 else
2097 $as_echo "$as_me: failed program was:" >&5
2098 sed 's/^/| /' conftest.$ac_ext >&5
2099
2100 ac_retval=1
2101 fi
2102 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2103 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2104 # interfere with the next link command; also delete a directory that is
2105 # left behind by Apple's compiler. We do this before executing the actions.
2106 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2107 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2108 as_fn_set_status $ac_retval
2109
2110 } # ac_fn_c_try_link
2111
2112 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2113 # --------------------------------------------
2114 # Tries to find the compile-time value of EXPR in a program that includes
2115 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2116 # computed
2117 ac_fn_c_compute_int ()
2118 {
2119 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2120 if test "$cross_compiling" = yes; then
2121 # Depending upon the size, compute the lo and hi bounds.
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123 /* end confdefs.h. */
2124 $4
2125 int
2126 main ()
2127 {
2128 static int test_array [1 - 2 * !(($2) >= 0)];
2129 test_array [0] = 0;
2130 return test_array [0];
2131
2132 ;
2133 return 0;
2134 }
2135 _ACEOF
2136 if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_lo=0 ac_mid=0
2138 while :; do
2139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2140 /* end confdefs.h. */
2141 $4
2142 int
2143 main ()
2144 {
2145 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2146 test_array [0] = 0;
2147 return test_array [0];
2148
2149 ;
2150 return 0;
2151 }
2152 _ACEOF
2153 if ac_fn_c_try_compile "$LINENO"; then :
2154 ac_hi=$ac_mid; break
2155 else
2156 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2157 if test $ac_lo -le $ac_mid; then
2158 ac_lo= ac_hi=
2159 break
2160 fi
2161 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2162 fi
2163 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2164 done
2165 else
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167 /* end confdefs.h. */
2168 $4
2169 int
2170 main ()
2171 {
2172 static int test_array [1 - 2 * !(($2) < 0)];
2173 test_array [0] = 0;
2174 return test_array [0];
2175
2176 ;
2177 return 0;
2178 }
2179 _ACEOF
2180 if ac_fn_c_try_compile "$LINENO"; then :
2181 ac_hi=-1 ac_mid=-1
2182 while :; do
2183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2184 /* end confdefs.h. */
2185 $4
2186 int
2187 main ()
2188 {
2189 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2190 test_array [0] = 0;
2191 return test_array [0];
2192
2193 ;
2194 return 0;
2195 }
2196 _ACEOF
2197 if ac_fn_c_try_compile "$LINENO"; then :
2198 ac_lo=$ac_mid; break
2199 else
2200 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2201 if test $ac_mid -le $ac_hi; then
2202 ac_lo= ac_hi=
2203 break
2204 fi
2205 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2206 fi
2207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208 done
2209 else
2210 ac_lo= ac_hi=
2211 fi
2212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2213 fi
2214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2215 # Binary search between lo and hi bounds.
2216 while test "x$ac_lo" != "x$ac_hi"; do
2217 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2219 /* end confdefs.h. */
2220 $4
2221 int
2222 main ()
2223 {
2224 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2225 test_array [0] = 0;
2226 return test_array [0];
2227
2228 ;
2229 return 0;
2230 }
2231 _ACEOF
2232 if ac_fn_c_try_compile "$LINENO"; then :
2233 ac_hi=$ac_mid
2234 else
2235 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2236 fi
2237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2238 done
2239 case $ac_lo in #((
2240 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2241 '') ac_retval=1 ;;
2242 esac
2243 else
2244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2245 /* end confdefs.h. */
2246 $4
2247 static long int longval () { return $2; }
2248 static unsigned long int ulongval () { return $2; }
2249 #include <stdio.h>
2250 #include <stdlib.h>
2251 int
2252 main ()
2253 {
2254
2255 FILE *f = fopen ("conftest.val", "w");
2256 if (! f)
2257 return 1;
2258 if (($2) < 0)
2259 {
2260 long int i = longval ();
2261 if (i != ($2))
2262 return 1;
2263 fprintf (f, "%ld", i);
2264 }
2265 else
2266 {
2267 unsigned long int i = ulongval ();
2268 if (i != ($2))
2269 return 1;
2270 fprintf (f, "%lu", i);
2271 }
2272 /* Do not output a trailing newline, as this causes \r\n confusion
2273 on some platforms. */
2274 return ferror (f) || fclose (f) != 0;
2275
2276 ;
2277 return 0;
2278 }
2279 _ACEOF
2280 if ac_fn_c_try_run "$LINENO"; then :
2281 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2282 else
2283 ac_retval=1
2284 fi
2285 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2286 conftest.$ac_objext conftest.beam conftest.$ac_ext
2287 rm -f conftest.val
2288
2289 fi
2290 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2291 as_fn_set_status $ac_retval
2292
2293 } # ac_fn_c_compute_int
2294
2295 # ac_fn_c_check_func LINENO FUNC VAR
2296 # ----------------------------------
2297 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2298 ac_fn_c_check_func ()
2299 {
2300 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2302 $as_echo_n "checking for $2... " >&6; }
2303 if eval \${$3+:} false; then :
2304 $as_echo_n "(cached) " >&6
2305 else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307 /* end confdefs.h. */
2308 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2309 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2310 #define $2 innocuous_$2
2311
2312 /* System header to define __stub macros and hopefully few prototypes,
2313 which can conflict with char $2 (); below.
2314 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2315 <limits.h> exists even on freestanding compilers. */
2316
2317 #ifdef __STDC__
2318 # include <limits.h>
2319 #else
2320 # include <assert.h>
2321 #endif
2322
2323 #undef $2
2324
2325 /* Override any GCC internal prototype to avoid an error.
2326 Use char because int might match the return type of a GCC
2327 builtin and then its argument prototype would still apply. */
2328 #ifdef __cplusplus
2329 extern "C"
2330 #endif
2331 char $2 ();
2332 /* The GNU C library defines this for functions which it implements
2333 to always fail with ENOSYS. Some functions are actually named
2334 something starting with __ and the normal name is an alias. */
2335 #if defined __stub_$2 || defined __stub___$2
2336 choke me
2337 #endif
2338
2339 int
2340 main ()
2341 {
2342 return $2 ();
2343 ;
2344 return 0;
2345 }
2346 _ACEOF
2347 if ac_fn_c_try_link "$LINENO"; then :
2348 eval "$3=yes"
2349 else
2350 eval "$3=no"
2351 fi
2352 rm -f core conftest.err conftest.$ac_objext \
2353 conftest$ac_exeext conftest.$ac_ext
2354 fi
2355 eval ac_res=\$$3
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2357 $as_echo "$ac_res" >&6; }
2358 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2359
2360 } # ac_fn_c_check_func
2361
2362 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2363 # -------------------------------------------
2364 # Tests whether TYPE exists after having included INCLUDES, setting cache
2365 # variable VAR accordingly.
2366 ac_fn_c_check_type ()
2367 {
2368 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2370 $as_echo_n "checking for $2... " >&6; }
2371 if eval \${$3+:} false; then :
2372 $as_echo_n "(cached) " >&6
2373 else
2374 eval "$3=no"
2375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2376 /* end confdefs.h. */
2377 $4
2378 int
2379 main ()
2380 {
2381 if (sizeof ($2))
2382 return 0;
2383 ;
2384 return 0;
2385 }
2386 _ACEOF
2387 if ac_fn_c_try_compile "$LINENO"; then :
2388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2389 /* end confdefs.h. */
2390 $4
2391 int
2392 main ()
2393 {
2394 if (sizeof (($2)))
2395 return 0;
2396 ;
2397 return 0;
2398 }
2399 _ACEOF
2400 if ac_fn_c_try_compile "$LINENO"; then :
2401
2402 else
2403 eval "$3=yes"
2404 fi
2405 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2406 fi
2407 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2408 fi
2409 eval ac_res=\$$3
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2411 $as_echo "$ac_res" >&6; }
2412 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2413
2414 } # ac_fn_c_check_type
2415
2416 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2417 # ---------------------------------------------
2418 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2419 # accordingly.
2420 ac_fn_c_check_decl ()
2421 {
2422 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423 as_decl_name=`echo $2|sed 's/ *(.*//'`
2424 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2426 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2427 if eval \${$3+:} false; then :
2428 $as_echo_n "(cached) " >&6
2429 else
2430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431 /* end confdefs.h. */
2432 $4
2433 int
2434 main ()
2435 {
2436 #ifndef $as_decl_name
2437 #ifdef __cplusplus
2438 (void) $as_decl_use;
2439 #else
2440 (void) $as_decl_name;
2441 #endif
2442 #endif
2443
2444 ;
2445 return 0;
2446 }
2447 _ACEOF
2448 if ac_fn_c_try_compile "$LINENO"; then :
2449 eval "$3=yes"
2450 else
2451 eval "$3=no"
2452 fi
2453 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2454 fi
2455 eval ac_res=\$$3
2456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2457 $as_echo "$ac_res" >&6; }
2458 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2459
2460 } # ac_fn_c_check_decl
2461
2462 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2463 # ----------------------------------------------------
2464 # Tries to find if the field MEMBER exists in type AGGR, after including
2465 # INCLUDES, setting cache variable VAR accordingly.
2466 ac_fn_c_check_member ()
2467 {
2468 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2470 $as_echo_n "checking for $2.$3... " >&6; }
2471 if eval \${$4+:} false; then :
2472 $as_echo_n "(cached) " >&6
2473 else
2474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2475 /* end confdefs.h. */
2476 $5
2477 int
2478 main ()
2479 {
2480 static $2 ac_aggr;
2481 if (ac_aggr.$3)
2482 return 0;
2483 ;
2484 return 0;
2485 }
2486 _ACEOF
2487 if ac_fn_c_try_compile "$LINENO"; then :
2488 eval "$4=yes"
2489 else
2490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2491 /* end confdefs.h. */
2492 $5
2493 int
2494 main ()
2495 {
2496 static $2 ac_aggr;
2497 if (sizeof ac_aggr.$3)
2498 return 0;
2499 ;
2500 return 0;
2501 }
2502 _ACEOF
2503 if ac_fn_c_try_compile "$LINENO"; then :
2504 eval "$4=yes"
2505 else
2506 eval "$4=no"
2507 fi
2508 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2509 fi
2510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2511 fi
2512 eval ac_res=\$$4
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2514 $as_echo "$ac_res" >&6; }
2515 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516
2517 } # ac_fn_c_check_member
2518
2519 # ac_fn_cxx_try_link LINENO
2520 # -------------------------
2521 # Try to link conftest.$ac_ext, and return whether this succeeded.
2522 ac_fn_cxx_try_link ()
2523 {
2524 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525 rm -f conftest.$ac_objext conftest$ac_exeext
2526 if { { ac_try="$ac_link"
2527 case "(($ac_try" in
2528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2529 *) ac_try_echo=$ac_try;;
2530 esac
2531 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2532 $as_echo "$ac_try_echo"; } >&5
2533 (eval "$ac_link") 2>conftest.err
2534 ac_status=$?
2535 if test -s conftest.err; then
2536 grep -v '^ *+' conftest.err >conftest.er1
2537 cat conftest.er1 >&5
2538 mv -f conftest.er1 conftest.err
2539 fi
2540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2541 test $ac_status = 0; } && {
2542 test -z "$ac_cxx_werror_flag" ||
2543 test ! -s conftest.err
2544 } && test -s conftest$ac_exeext && {
2545 test "$cross_compiling" = yes ||
2546 test -x conftest$ac_exeext
2547 }; then :
2548 ac_retval=0
2549 else
2550 $as_echo "$as_me: failed program was:" >&5
2551 sed 's/^/| /' conftest.$ac_ext >&5
2552
2553 ac_retval=1
2554 fi
2555 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2556 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2557 # interfere with the next link command; also delete a directory that is
2558 # left behind by Apple's compiler. We do this before executing the actions.
2559 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2560 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2561 as_fn_set_status $ac_retval
2562
2563 } # ac_fn_cxx_try_link
2564
2565 # ac_fn_cxx_check_func LINENO FUNC VAR
2566 # ------------------------------------
2567 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2568 ac_fn_cxx_check_func ()
2569 {
2570 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2572 $as_echo_n "checking for $2... " >&6; }
2573 if eval \${$3+:} false; then :
2574 $as_echo_n "(cached) " >&6
2575 else
2576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577 /* end confdefs.h. */
2578 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2579 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2580 #define $2 innocuous_$2
2581
2582 /* System header to define __stub macros and hopefully few prototypes,
2583 which can conflict with char $2 (); below.
2584 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2585 <limits.h> exists even on freestanding compilers. */
2586
2587 #ifdef __STDC__
2588 # include <limits.h>
2589 #else
2590 # include <assert.h>
2591 #endif
2592
2593 #undef $2
2594
2595 /* Override any GCC internal prototype to avoid an error.
2596 Use char because int might match the return type of a GCC
2597 builtin and then its argument prototype would still apply. */
2598 #ifdef __cplusplus
2599 extern "C"
2600 #endif
2601 char $2 ();
2602 /* The GNU C library defines this for functions which it implements
2603 to always fail with ENOSYS. Some functions are actually named
2604 something starting with __ and the normal name is an alias. */
2605 #if defined __stub_$2 || defined __stub___$2
2606 choke me
2607 #endif
2608
2609 int
2610 main ()
2611 {
2612 return $2 ();
2613 ;
2614 return 0;
2615 }
2616 _ACEOF
2617 if ac_fn_cxx_try_link "$LINENO"; then :
2618 eval "$3=yes"
2619 else
2620 eval "$3=no"
2621 fi
2622 rm -f core conftest.err conftest.$ac_objext \
2623 conftest$ac_exeext conftest.$ac_ext
2624 fi
2625 eval ac_res=\$$3
2626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2627 $as_echo "$ac_res" >&6; }
2628 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2629
2630 } # ac_fn_cxx_check_func
2631 cat >config.log <<_ACEOF
2632 This file contains any messages produced by compilers while
2633 running configure, to aid debugging if configure makes a mistake.
2634
2635 It was created by $as_me, which was
2636 generated by GNU Autoconf 2.69. Invocation command line was
2637
2638 $ $0 $@
2639
2640 _ACEOF
2641 exec 5>>config.log
2642 {
2643 cat <<_ASUNAME
2644 ## --------- ##
2645 ## Platform. ##
2646 ## --------- ##
2647
2648 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2649 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2650 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2651 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2652 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2653
2654 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2655 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2656
2657 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2658 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2659 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2660 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2661 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2662 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2663 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2664
2665 _ASUNAME
2666
2667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2668 for as_dir in $PATH
2669 do
2670 IFS=$as_save_IFS
2671 test -z "$as_dir" && as_dir=.
2672 $as_echo "PATH: $as_dir"
2673 done
2674 IFS=$as_save_IFS
2675
2676 } >&5
2677
2678 cat >&5 <<_ACEOF
2679
2680
2681 ## ----------- ##
2682 ## Core tests. ##
2683 ## ----------- ##
2684
2685 _ACEOF
2686
2687
2688 # Keep a trace of the command line.
2689 # Strip out --no-create and --no-recursion so they do not pile up.
2690 # Strip out --silent because we don't want to record it for future runs.
2691 # Also quote any args containing shell meta-characters.
2692 # Make two passes to allow for proper duplicate-argument suppression.
2693 ac_configure_args=
2694 ac_configure_args0=
2695 ac_configure_args1=
2696 ac_must_keep_next=false
2697 for ac_pass in 1 2
2698 do
2699 for ac_arg
2700 do
2701 case $ac_arg in
2702 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2703 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2704 | -silent | --silent | --silen | --sile | --sil)
2705 continue ;;
2706 *\'*)
2707 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2708 esac
2709 case $ac_pass in
2710 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2711 2)
2712 as_fn_append ac_configure_args1 " '$ac_arg'"
2713 if test $ac_must_keep_next = true; then
2714 ac_must_keep_next=false # Got value, back to normal.
2715 else
2716 case $ac_arg in
2717 *=* | --config-cache | -C | -disable-* | --disable-* \
2718 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2719 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2720 | -with-* | --with-* | -without-* | --without-* | --x)
2721 case "$ac_configure_args0 " in
2722 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2723 esac
2724 ;;
2725 -* ) ac_must_keep_next=true ;;
2726 esac
2727 fi
2728 as_fn_append ac_configure_args " '$ac_arg'"
2729 ;;
2730 esac
2731 done
2732 done
2733 { ac_configure_args0=; unset ac_configure_args0;}
2734 { ac_configure_args1=; unset ac_configure_args1;}
2735
2736 # When interrupted or exit'd, cleanup temporary files, and complete
2737 # config.log. We remove comments because anyway the quotes in there
2738 # would cause problems or look ugly.
2739 # WARNING: Use '\'' to represent an apostrophe within the trap.
2740 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2741 trap 'exit_status=$?
2742 # Save into config.log some information that might help in debugging.
2743 {
2744 echo
2745
2746 $as_echo "## ---------------- ##
2747 ## Cache variables. ##
2748 ## ---------------- ##"
2749 echo
2750 # The following way of writing the cache mishandles newlines in values,
2751 (
2752 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2753 eval ac_val=\$$ac_var
2754 case $ac_val in #(
2755 *${as_nl}*)
2756 case $ac_var in #(
2757 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2758 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2759 esac
2760 case $ac_var in #(
2761 _ | IFS | as_nl) ;; #(
2762 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2763 *) { eval $ac_var=; unset $ac_var;} ;;
2764 esac ;;
2765 esac
2766 done
2767 (set) 2>&1 |
2768 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2769 *${as_nl}ac_space=\ *)
2770 sed -n \
2771 "s/'\''/'\''\\\\'\'''\''/g;
2772 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2773 ;; #(
2774 *)
2775 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2776 ;;
2777 esac |
2778 sort
2779 )
2780 echo
2781
2782 $as_echo "## ----------------- ##
2783 ## Output variables. ##
2784 ## ----------------- ##"
2785 echo
2786 for ac_var in $ac_subst_vars
2787 do
2788 eval ac_val=\$$ac_var
2789 case $ac_val in
2790 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2791 esac
2792 $as_echo "$ac_var='\''$ac_val'\''"
2793 done | sort
2794 echo
2795
2796 if test -n "$ac_subst_files"; then
2797 $as_echo "## ------------------- ##
2798 ## File substitutions. ##
2799 ## ------------------- ##"
2800 echo
2801 for ac_var in $ac_subst_files
2802 do
2803 eval ac_val=\$$ac_var
2804 case $ac_val in
2805 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2806 esac
2807 $as_echo "$ac_var='\''$ac_val'\''"
2808 done | sort
2809 echo
2810 fi
2811
2812 if test -s confdefs.h; then
2813 $as_echo "## ----------- ##
2814 ## confdefs.h. ##
2815 ## ----------- ##"
2816 echo
2817 cat confdefs.h
2818 echo
2819 fi
2820 test "$ac_signal" != 0 &&
2821 $as_echo "$as_me: caught signal $ac_signal"
2822 $as_echo "$as_me: exit $exit_status"
2823 } >&5
2824 rm -f core *.core core.conftest.* &&
2825 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2826 exit $exit_status
2827 ' 0
2828 for ac_signal in 1 2 13 15; do
2829 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2830 done
2831 ac_signal=0
2832
2833 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2834 rm -f -r conftest* confdefs.h
2835
2836 $as_echo "/* confdefs.h */" > confdefs.h
2837
2838 # Predefined preprocessor variables.
2839
2840 cat >>confdefs.h <<_ACEOF
2841 #define PACKAGE_NAME "$PACKAGE_NAME"
2842 _ACEOF
2843
2844 cat >>confdefs.h <<_ACEOF
2845 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2846 _ACEOF
2847
2848 cat >>confdefs.h <<_ACEOF
2849 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2850 _ACEOF
2851
2852 cat >>confdefs.h <<_ACEOF
2853 #define PACKAGE_STRING "$PACKAGE_STRING"
2854 _ACEOF
2855
2856 cat >>confdefs.h <<_ACEOF
2857 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2858 _ACEOF
2859
2860 cat >>confdefs.h <<_ACEOF
2861 #define PACKAGE_URL "$PACKAGE_URL"
2862 _ACEOF
2863
2864
2865 # Let the site file select an alternate cache file if it wants to.
2866 # Prefer an explicitly selected file to automatically selected ones.
2867 ac_site_file1=NONE
2868 ac_site_file2=NONE
2869 if test -n "$CONFIG_SITE"; then
2870 # We do not want a PATH search for config.site.
2871 case $CONFIG_SITE in #((
2872 -*) ac_site_file1=./$CONFIG_SITE;;
2873 */*) ac_site_file1=$CONFIG_SITE;;
2874 *) ac_site_file1=./$CONFIG_SITE;;
2875 esac
2876 elif test "x$prefix" != xNONE; then
2877 ac_site_file1=$prefix/share/config.site
2878 ac_site_file2=$prefix/etc/config.site
2879 else
2880 ac_site_file1=$ac_default_prefix/share/config.site
2881 ac_site_file2=$ac_default_prefix/etc/config.site
2882 fi
2883 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2884 do
2885 test "x$ac_site_file" = xNONE && continue
2886 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2888 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2889 sed 's/^/| /' "$ac_site_file" >&5
2890 . "$ac_site_file" \
2891 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2892 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2893 as_fn_error $? "failed to load site script $ac_site_file
2894 See \`config.log' for more details" "$LINENO" 5; }
2895 fi
2896 done
2897
2898 if test -r "$cache_file"; then
2899 # Some versions of bash will fail to source /dev/null (special files
2900 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2901 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2903 $as_echo "$as_me: loading cache $cache_file" >&6;}
2904 case $cache_file in
2905 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2906 *) . "./$cache_file";;
2907 esac
2908 fi
2909 else
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2911 $as_echo "$as_me: creating cache $cache_file" >&6;}
2912 >$cache_file
2913 fi
2914
2915 as_fn_append ac_header_list " stdlib.h"
2916 as_fn_append ac_header_list " unistd.h"
2917 as_fn_append ac_header_list " sys/param.h"
2918 # Check that the precious variables saved in the cache have kept the same
2919 # value.
2920 ac_cache_corrupted=false
2921 for ac_var in $ac_precious_vars; do
2922 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2923 eval ac_new_set=\$ac_env_${ac_var}_set
2924 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2925 eval ac_new_val=\$ac_env_${ac_var}_value
2926 case $ac_old_set,$ac_new_set in
2927 set,)
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2929 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2930 ac_cache_corrupted=: ;;
2931 ,set)
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2933 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2934 ac_cache_corrupted=: ;;
2935 ,);;
2936 *)
2937 if test "x$ac_old_val" != "x$ac_new_val"; then
2938 # differences in whitespace do not lead to failure.
2939 ac_old_val_w=`echo x $ac_old_val`
2940 ac_new_val_w=`echo x $ac_new_val`
2941 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2942 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2943 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2944 ac_cache_corrupted=:
2945 else
2946 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2947 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2948 eval $ac_var=\$ac_old_val
2949 fi
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2951 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2952 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2953 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2954 fi;;
2955 esac
2956 # Pass precious variables to config.status.
2957 if test "$ac_new_set" = set; then
2958 case $ac_new_val in
2959 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2960 *) ac_arg=$ac_var=$ac_new_val ;;
2961 esac
2962 case " $ac_configure_args " in
2963 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2964 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2965 esac
2966 fi
2967 done
2968 if $ac_cache_corrupted; then
2969 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2970 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2971 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2972 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2973 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2974 fi
2975 ## -------------------- ##
2976 ## Main body of script. ##
2977 ## -------------------- ##
2978
2979 ac_ext=c
2980 ac_cpp='$CPP $CPPFLAGS'
2981 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2982 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2983 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2984
2985
2986
2987
2988
2989 ac_config_headers="$ac_config_headers config.h:config.in"
2990
2991
2992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2993 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2994 # Check whether --enable-maintainer-mode was given.
2995 if test "${enable_maintainer_mode+set}" = set; then :
2996 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2997 else
2998 USE_MAINTAINER_MODE=no
2999 fi
3000
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3002 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3003 if test $USE_MAINTAINER_MODE = yes; then
3004 MAINTAINER_MODE_TRUE=
3005 MAINTAINER_MODE_FALSE='#'
3006 else
3007 MAINTAINER_MODE_TRUE='#'
3008 MAINTAINER_MODE_FALSE=
3009 fi
3010
3011 MAINT=$MAINTAINER_MODE_TRUE
3012
3013
3014
3015 ac_ext=c
3016 ac_cpp='$CPP $CPPFLAGS'
3017 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3018 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3019 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3020 if test -n "$ac_tool_prefix"; then
3021 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3022 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3024 $as_echo_n "checking for $ac_word... " >&6; }
3025 if ${ac_cv_prog_CC+:} false; then :
3026 $as_echo_n "(cached) " >&6
3027 else
3028 if test -n "$CC"; then
3029 ac_cv_prog_CC="$CC" # Let the user override the test.
3030 else
3031 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3032 for as_dir in $PATH
3033 do
3034 IFS=$as_save_IFS
3035 test -z "$as_dir" && as_dir=.
3036 for ac_exec_ext in '' $ac_executable_extensions; do
3037 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3038 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3039 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3040 break 2
3041 fi
3042 done
3043 done
3044 IFS=$as_save_IFS
3045
3046 fi
3047 fi
3048 CC=$ac_cv_prog_CC
3049 if test -n "$CC"; then
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3051 $as_echo "$CC" >&6; }
3052 else
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3054 $as_echo "no" >&6; }
3055 fi
3056
3057
3058 fi
3059 if test -z "$ac_cv_prog_CC"; then
3060 ac_ct_CC=$CC
3061 # Extract the first word of "gcc", so it can be a program name with args.
3062 set dummy gcc; ac_word=$2
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3064 $as_echo_n "checking for $ac_word... " >&6; }
3065 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3066 $as_echo_n "(cached) " >&6
3067 else
3068 if test -n "$ac_ct_CC"; then
3069 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3070 else
3071 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3072 for as_dir in $PATH
3073 do
3074 IFS=$as_save_IFS
3075 test -z "$as_dir" && as_dir=.
3076 for ac_exec_ext in '' $ac_executable_extensions; do
3077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3078 ac_cv_prog_ac_ct_CC="gcc"
3079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3080 break 2
3081 fi
3082 done
3083 done
3084 IFS=$as_save_IFS
3085
3086 fi
3087 fi
3088 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3089 if test -n "$ac_ct_CC"; then
3090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3091 $as_echo "$ac_ct_CC" >&6; }
3092 else
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3094 $as_echo "no" >&6; }
3095 fi
3096
3097 if test "x$ac_ct_CC" = x; then
3098 CC=""
3099 else
3100 case $cross_compiling:$ac_tool_warned in
3101 yes:)
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3103 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3104 ac_tool_warned=yes ;;
3105 esac
3106 CC=$ac_ct_CC
3107 fi
3108 else
3109 CC="$ac_cv_prog_CC"
3110 fi
3111
3112 if test -z "$CC"; then
3113 if test -n "$ac_tool_prefix"; then
3114 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3115 set dummy ${ac_tool_prefix}cc; ac_word=$2
3116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3117 $as_echo_n "checking for $ac_word... " >&6; }
3118 if ${ac_cv_prog_CC+:} false; then :
3119 $as_echo_n "(cached) " >&6
3120 else
3121 if test -n "$CC"; then
3122 ac_cv_prog_CC="$CC" # Let the user override the test.
3123 else
3124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3125 for as_dir in $PATH
3126 do
3127 IFS=$as_save_IFS
3128 test -z "$as_dir" && as_dir=.
3129 for ac_exec_ext in '' $ac_executable_extensions; do
3130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3131 ac_cv_prog_CC="${ac_tool_prefix}cc"
3132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3133 break 2
3134 fi
3135 done
3136 done
3137 IFS=$as_save_IFS
3138
3139 fi
3140 fi
3141 CC=$ac_cv_prog_CC
3142 if test -n "$CC"; then
3143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3144 $as_echo "$CC" >&6; }
3145 else
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3147 $as_echo "no" >&6; }
3148 fi
3149
3150
3151 fi
3152 fi
3153 if test -z "$CC"; then
3154 # Extract the first word of "cc", so it can be a program name with args.
3155 set dummy cc; ac_word=$2
3156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3157 $as_echo_n "checking for $ac_word... " >&6; }
3158 if ${ac_cv_prog_CC+:} false; then :
3159 $as_echo_n "(cached) " >&6
3160 else
3161 if test -n "$CC"; then
3162 ac_cv_prog_CC="$CC" # Let the user override the test.
3163 else
3164 ac_prog_rejected=no
3165 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3166 for as_dir in $PATH
3167 do
3168 IFS=$as_save_IFS
3169 test -z "$as_dir" && as_dir=.
3170 for ac_exec_ext in '' $ac_executable_extensions; do
3171 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3172 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3173 ac_prog_rejected=yes
3174 continue
3175 fi
3176 ac_cv_prog_CC="cc"
3177 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3178 break 2
3179 fi
3180 done
3181 done
3182 IFS=$as_save_IFS
3183
3184 if test $ac_prog_rejected = yes; then
3185 # We found a bogon in the path, so make sure we never use it.
3186 set dummy $ac_cv_prog_CC
3187 shift
3188 if test $# != 0; then
3189 # We chose a different compiler from the bogus one.
3190 # However, it has the same basename, so the bogon will be chosen
3191 # first if we set CC to just the basename; use the full file name.
3192 shift
3193 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3194 fi
3195 fi
3196 fi
3197 fi
3198 CC=$ac_cv_prog_CC
3199 if test -n "$CC"; then
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3201 $as_echo "$CC" >&6; }
3202 else
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3204 $as_echo "no" >&6; }
3205 fi
3206
3207
3208 fi
3209 if test -z "$CC"; then
3210 if test -n "$ac_tool_prefix"; then
3211 for ac_prog in cl.exe
3212 do
3213 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3214 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3216 $as_echo_n "checking for $ac_word... " >&6; }
3217 if ${ac_cv_prog_CC+:} false; then :
3218 $as_echo_n "(cached) " >&6
3219 else
3220 if test -n "$CC"; then
3221 ac_cv_prog_CC="$CC" # Let the user override the test.
3222 else
3223 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3224 for as_dir in $PATH
3225 do
3226 IFS=$as_save_IFS
3227 test -z "$as_dir" && as_dir=.
3228 for ac_exec_ext in '' $ac_executable_extensions; do
3229 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3230 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3231 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3232 break 2
3233 fi
3234 done
3235 done
3236 IFS=$as_save_IFS
3237
3238 fi
3239 fi
3240 CC=$ac_cv_prog_CC
3241 if test -n "$CC"; then
3242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3243 $as_echo "$CC" >&6; }
3244 else
3245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3246 $as_echo "no" >&6; }
3247 fi
3248
3249
3250 test -n "$CC" && break
3251 done
3252 fi
3253 if test -z "$CC"; then
3254 ac_ct_CC=$CC
3255 for ac_prog in cl.exe
3256 do
3257 # Extract the first word of "$ac_prog", so it can be a program name with args.
3258 set dummy $ac_prog; ac_word=$2
3259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260 $as_echo_n "checking for $ac_word... " >&6; }
3261 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3262 $as_echo_n "(cached) " >&6
3263 else
3264 if test -n "$ac_ct_CC"; then
3265 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3266 else
3267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268 for as_dir in $PATH
3269 do
3270 IFS=$as_save_IFS
3271 test -z "$as_dir" && as_dir=.
3272 for ac_exec_ext in '' $ac_executable_extensions; do
3273 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3274 ac_cv_prog_ac_ct_CC="$ac_prog"
3275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3276 break 2
3277 fi
3278 done
3279 done
3280 IFS=$as_save_IFS
3281
3282 fi
3283 fi
3284 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3285 if test -n "$ac_ct_CC"; then
3286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3287 $as_echo "$ac_ct_CC" >&6; }
3288 else
3289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290 $as_echo "no" >&6; }
3291 fi
3292
3293
3294 test -n "$ac_ct_CC" && break
3295 done
3296
3297 if test "x$ac_ct_CC" = x; then
3298 CC=""
3299 else
3300 case $cross_compiling:$ac_tool_warned in
3301 yes:)
3302 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3303 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3304 ac_tool_warned=yes ;;
3305 esac
3306 CC=$ac_ct_CC
3307 fi
3308 fi
3309
3310 fi
3311
3312
3313 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3314 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3315 as_fn_error $? "no acceptable C compiler found in \$PATH
3316 See \`config.log' for more details" "$LINENO" 5; }
3317
3318 # Provide some information about the compiler.
3319 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3320 set X $ac_compile
3321 ac_compiler=$2
3322 for ac_option in --version -v -V -qversion; do
3323 { { ac_try="$ac_compiler $ac_option >&5"
3324 case "(($ac_try" in
3325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3326 *) ac_try_echo=$ac_try;;
3327 esac
3328 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3329 $as_echo "$ac_try_echo"; } >&5
3330 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3331 ac_status=$?
3332 if test -s conftest.err; then
3333 sed '10a\
3334 ... rest of stderr output deleted ...
3335 10q' conftest.err >conftest.er1
3336 cat conftest.er1 >&5
3337 fi
3338 rm -f conftest.er1 conftest.err
3339 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3340 test $ac_status = 0; }
3341 done
3342
3343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3344 /* end confdefs.h. */
3345
3346 int
3347 main ()
3348 {
3349
3350 ;
3351 return 0;
3352 }
3353 _ACEOF
3354 ac_clean_files_save=$ac_clean_files
3355 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3356 # Try to create an executable without -o first, disregard a.out.
3357 # It will help us diagnose broken compilers, and finding out an intuition
3358 # of exeext.
3359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3360 $as_echo_n "checking whether the C compiler works... " >&6; }
3361 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3362
3363 # The possible output files:
3364 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3365
3366 ac_rmfiles=
3367 for ac_file in $ac_files
3368 do
3369 case $ac_file in
3370 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3371 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3372 esac
3373 done
3374 rm -f $ac_rmfiles
3375
3376 if { { ac_try="$ac_link_default"
3377 case "(($ac_try" in
3378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3379 *) ac_try_echo=$ac_try;;
3380 esac
3381 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3382 $as_echo "$ac_try_echo"; } >&5
3383 (eval "$ac_link_default") 2>&5
3384 ac_status=$?
3385 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3386 test $ac_status = 0; }; then :
3387 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3388 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3389 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3390 # so that the user can short-circuit this test for compilers unknown to
3391 # Autoconf.
3392 for ac_file in $ac_files ''
3393 do
3394 test -f "$ac_file" || continue
3395 case $ac_file in
3396 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3397 ;;
3398 [ab].out )
3399 # We found the default executable, but exeext='' is most
3400 # certainly right.
3401 break;;
3402 *.* )
3403 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3404 then :; else
3405 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3406 fi
3407 # We set ac_cv_exeext here because the later test for it is not
3408 # safe: cross compilers may not add the suffix if given an `-o'
3409 # argument, so we may need to know it at that point already.
3410 # Even if this section looks crufty: it has the advantage of
3411 # actually working.
3412 break;;
3413 * )
3414 break;;
3415 esac
3416 done
3417 test "$ac_cv_exeext" = no && ac_cv_exeext=
3418
3419 else
3420 ac_file=''
3421 fi
3422 if test -z "$ac_file"; then :
3423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3424 $as_echo "no" >&6; }
3425 $as_echo "$as_me: failed program was:" >&5
3426 sed 's/^/| /' conftest.$ac_ext >&5
3427
3428 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3429 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3430 as_fn_error 77 "C compiler cannot create executables
3431 See \`config.log' for more details" "$LINENO" 5; }
3432 else
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3434 $as_echo "yes" >&6; }
3435 fi
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3437 $as_echo_n "checking for C compiler default output file name... " >&6; }
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3439 $as_echo "$ac_file" >&6; }
3440 ac_exeext=$ac_cv_exeext
3441
3442 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3443 ac_clean_files=$ac_clean_files_save
3444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3445 $as_echo_n "checking for suffix of executables... " >&6; }
3446 if { { ac_try="$ac_link"
3447 case "(($ac_try" in
3448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3449 *) ac_try_echo=$ac_try;;
3450 esac
3451 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3452 $as_echo "$ac_try_echo"; } >&5
3453 (eval "$ac_link") 2>&5
3454 ac_status=$?
3455 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3456 test $ac_status = 0; }; then :
3457 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3458 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3459 # work properly (i.e., refer to `conftest.exe'), while it won't with
3460 # `rm'.
3461 for ac_file in conftest.exe conftest conftest.*; do
3462 test -f "$ac_file" || continue
3463 case $ac_file in
3464 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3465 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3466 break;;
3467 * ) break;;
3468 esac
3469 done
3470 else
3471 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3472 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3473 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3474 See \`config.log' for more details" "$LINENO" 5; }
3475 fi
3476 rm -f conftest conftest$ac_cv_exeext
3477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3478 $as_echo "$ac_cv_exeext" >&6; }
3479
3480 rm -f conftest.$ac_ext
3481 EXEEXT=$ac_cv_exeext
3482 ac_exeext=$EXEEXT
3483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3484 /* end confdefs.h. */
3485 #include <stdio.h>
3486 int
3487 main ()
3488 {
3489 FILE *f = fopen ("conftest.out", "w");
3490 return ferror (f) || fclose (f) != 0;
3491
3492 ;
3493 return 0;
3494 }
3495 _ACEOF
3496 ac_clean_files="$ac_clean_files conftest.out"
3497 # Check that the compiler produces executables we can run. If not, either
3498 # the compiler is broken, or we cross compile.
3499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3500 $as_echo_n "checking whether we are cross compiling... " >&6; }
3501 if test "$cross_compiling" != yes; then
3502 { { ac_try="$ac_link"
3503 case "(($ac_try" in
3504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3505 *) ac_try_echo=$ac_try;;
3506 esac
3507 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3508 $as_echo "$ac_try_echo"; } >&5
3509 (eval "$ac_link") 2>&5
3510 ac_status=$?
3511 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3512 test $ac_status = 0; }
3513 if { ac_try='./conftest$ac_cv_exeext'
3514 { { case "(($ac_try" in
3515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3516 *) ac_try_echo=$ac_try;;
3517 esac
3518 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3519 $as_echo "$ac_try_echo"; } >&5
3520 (eval "$ac_try") 2>&5
3521 ac_status=$?
3522 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3523 test $ac_status = 0; }; }; then
3524 cross_compiling=no
3525 else
3526 if test "$cross_compiling" = maybe; then
3527 cross_compiling=yes
3528 else
3529 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3530 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3531 as_fn_error $? "cannot run C compiled programs.
3532 If you meant to cross compile, use \`--host'.
3533 See \`config.log' for more details" "$LINENO" 5; }
3534 fi
3535 fi
3536 fi
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3538 $as_echo "$cross_compiling" >&6; }
3539
3540 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3541 ac_clean_files=$ac_clean_files_save
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3543 $as_echo_n "checking for suffix of object files... " >&6; }
3544 if ${ac_cv_objext+:} false; then :
3545 $as_echo_n "(cached) " >&6
3546 else
3547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3548 /* end confdefs.h. */
3549
3550 int
3551 main ()
3552 {
3553
3554 ;
3555 return 0;
3556 }
3557 _ACEOF
3558 rm -f conftest.o conftest.obj
3559 if { { ac_try="$ac_compile"
3560 case "(($ac_try" in
3561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3562 *) ac_try_echo=$ac_try;;
3563 esac
3564 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3565 $as_echo "$ac_try_echo"; } >&5
3566 (eval "$ac_compile") 2>&5
3567 ac_status=$?
3568 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3569 test $ac_status = 0; }; then :
3570 for ac_file in conftest.o conftest.obj conftest.*; do
3571 test -f "$ac_file" || continue;
3572 case $ac_file in
3573 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3574 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3575 break;;
3576 esac
3577 done
3578 else
3579 $as_echo "$as_me: failed program was:" >&5
3580 sed 's/^/| /' conftest.$ac_ext >&5
3581
3582 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3583 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3584 as_fn_error $? "cannot compute suffix of object files: cannot compile
3585 See \`config.log' for more details" "$LINENO" 5; }
3586 fi
3587 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3588 fi
3589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3590 $as_echo "$ac_cv_objext" >&6; }
3591 OBJEXT=$ac_cv_objext
3592 ac_objext=$OBJEXT
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3594 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3595 if ${ac_cv_c_compiler_gnu+:} false; then :
3596 $as_echo_n "(cached) " >&6
3597 else
3598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3599 /* end confdefs.h. */
3600
3601 int
3602 main ()
3603 {
3604 #ifndef __GNUC__
3605 choke me
3606 #endif
3607
3608 ;
3609 return 0;
3610 }
3611 _ACEOF
3612 if ac_fn_c_try_compile "$LINENO"; then :
3613 ac_compiler_gnu=yes
3614 else
3615 ac_compiler_gnu=no
3616 fi
3617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3618 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3619
3620 fi
3621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3622 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3623 if test $ac_compiler_gnu = yes; then
3624 GCC=yes
3625 else
3626 GCC=
3627 fi
3628 ac_test_CFLAGS=${CFLAGS+set}
3629 ac_save_CFLAGS=$CFLAGS
3630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3631 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3632 if ${ac_cv_prog_cc_g+:} false; then :
3633 $as_echo_n "(cached) " >&6
3634 else
3635 ac_save_c_werror_flag=$ac_c_werror_flag
3636 ac_c_werror_flag=yes
3637 ac_cv_prog_cc_g=no
3638 CFLAGS="-g"
3639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3640 /* end confdefs.h. */
3641
3642 int
3643 main ()
3644 {
3645
3646 ;
3647 return 0;
3648 }
3649 _ACEOF
3650 if ac_fn_c_try_compile "$LINENO"; then :
3651 ac_cv_prog_cc_g=yes
3652 else
3653 CFLAGS=""
3654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3655 /* end confdefs.h. */
3656
3657 int
3658 main ()
3659 {
3660
3661 ;
3662 return 0;
3663 }
3664 _ACEOF
3665 if ac_fn_c_try_compile "$LINENO"; then :
3666
3667 else
3668 ac_c_werror_flag=$ac_save_c_werror_flag
3669 CFLAGS="-g"
3670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3671 /* end confdefs.h. */
3672
3673 int
3674 main ()
3675 {
3676
3677 ;
3678 return 0;
3679 }
3680 _ACEOF
3681 if ac_fn_c_try_compile "$LINENO"; then :
3682 ac_cv_prog_cc_g=yes
3683 fi
3684 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3685 fi
3686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3687 fi
3688 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3689 ac_c_werror_flag=$ac_save_c_werror_flag
3690 fi
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3692 $as_echo "$ac_cv_prog_cc_g" >&6; }
3693 if test "$ac_test_CFLAGS" = set; then
3694 CFLAGS=$ac_save_CFLAGS
3695 elif test $ac_cv_prog_cc_g = yes; then
3696 if test "$GCC" = yes; then
3697 CFLAGS="-g -O2"
3698 else
3699 CFLAGS="-g"
3700 fi
3701 else
3702 if test "$GCC" = yes; then
3703 CFLAGS="-O2"
3704 else
3705 CFLAGS=
3706 fi
3707 fi
3708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3709 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3710 if ${ac_cv_prog_cc_c89+:} false; then :
3711 $as_echo_n "(cached) " >&6
3712 else
3713 ac_cv_prog_cc_c89=no
3714 ac_save_CC=$CC
3715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3716 /* end confdefs.h. */
3717 #include <stdarg.h>
3718 #include <stdio.h>
3719 struct stat;
3720 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3721 struct buf { int x; };
3722 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3723 static char *e (p, i)
3724 char **p;
3725 int i;
3726 {
3727 return p[i];
3728 }
3729 static char *f (char * (*g) (char **, int), char **p, ...)
3730 {
3731 char *s;
3732 va_list v;
3733 va_start (v,p);
3734 s = g (p, va_arg (v,int));
3735 va_end (v);
3736 return s;
3737 }
3738
3739 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3740 function prototypes and stuff, but not '\xHH' hex character constants.
3741 These don't provoke an error unfortunately, instead are silently treated
3742 as 'x'. The following induces an error, until -std is added to get
3743 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3744 array size at least. It's necessary to write '\x00'==0 to get something
3745 that's true only with -std. */
3746 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3747
3748 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3749 inside strings and character constants. */
3750 #define FOO(x) 'x'
3751 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3752
3753 int test (int i, double x);
3754 struct s1 {int (*f) (int a);};
3755 struct s2 {int (*f) (double a);};
3756 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3757 int argc;
3758 char **argv;
3759 int
3760 main ()
3761 {
3762 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3763 ;
3764 return 0;
3765 }
3766 _ACEOF
3767 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3768 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3769 do
3770 CC="$ac_save_CC $ac_arg"
3771 if ac_fn_c_try_compile "$LINENO"; then :
3772 ac_cv_prog_cc_c89=$ac_arg
3773 fi
3774 rm -f core conftest.err conftest.$ac_objext
3775 test "x$ac_cv_prog_cc_c89" != "xno" && break
3776 done
3777 rm -f conftest.$ac_ext
3778 CC=$ac_save_CC
3779
3780 fi
3781 # AC_CACHE_VAL
3782 case "x$ac_cv_prog_cc_c89" in
3783 x)
3784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3785 $as_echo "none needed" >&6; } ;;
3786 xno)
3787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3788 $as_echo "unsupported" >&6; } ;;
3789 *)
3790 CC="$CC $ac_cv_prog_cc_c89"
3791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3792 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3793 esac
3794 if test "x$ac_cv_prog_cc_c89" != xno; then :
3795
3796 fi
3797
3798 ac_ext=c
3799 ac_cpp='$CPP $CPPFLAGS'
3800 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3801 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3802 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3803
3804 ac_ext=cpp
3805 ac_cpp='$CXXCPP $CPPFLAGS'
3806 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3807 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3808 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3809 if test -z "$CXX"; then
3810 if test -n "$CCC"; then
3811 CXX=$CCC
3812 else
3813 if test -n "$ac_tool_prefix"; then
3814 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3815 do
3816 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3817 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3819 $as_echo_n "checking for $ac_word... " >&6; }
3820 if ${ac_cv_prog_CXX+:} false; then :
3821 $as_echo_n "(cached) " >&6
3822 else
3823 if test -n "$CXX"; then
3824 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3825 else
3826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3827 for as_dir in $PATH
3828 do
3829 IFS=$as_save_IFS
3830 test -z "$as_dir" && as_dir=.
3831 for ac_exec_ext in '' $ac_executable_extensions; do
3832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3833 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3835 break 2
3836 fi
3837 done
3838 done
3839 IFS=$as_save_IFS
3840
3841 fi
3842 fi
3843 CXX=$ac_cv_prog_CXX
3844 if test -n "$CXX"; then
3845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3846 $as_echo "$CXX" >&6; }
3847 else
3848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3849 $as_echo "no" >&6; }
3850 fi
3851
3852
3853 test -n "$CXX" && break
3854 done
3855 fi
3856 if test -z "$CXX"; then
3857 ac_ct_CXX=$CXX
3858 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3859 do
3860 # Extract the first word of "$ac_prog", so it can be a program name with args.
3861 set dummy $ac_prog; ac_word=$2
3862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3863 $as_echo_n "checking for $ac_word... " >&6; }
3864 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3865 $as_echo_n "(cached) " >&6
3866 else
3867 if test -n "$ac_ct_CXX"; then
3868 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3869 else
3870 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871 for as_dir in $PATH
3872 do
3873 IFS=$as_save_IFS
3874 test -z "$as_dir" && as_dir=.
3875 for ac_exec_ext in '' $ac_executable_extensions; do
3876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3877 ac_cv_prog_ac_ct_CXX="$ac_prog"
3878 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3879 break 2
3880 fi
3881 done
3882 done
3883 IFS=$as_save_IFS
3884
3885 fi
3886 fi
3887 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3888 if test -n "$ac_ct_CXX"; then
3889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3890 $as_echo "$ac_ct_CXX" >&6; }
3891 else
3892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3893 $as_echo "no" >&6; }
3894 fi
3895
3896
3897 test -n "$ac_ct_CXX" && break
3898 done
3899
3900 if test "x$ac_ct_CXX" = x; then
3901 CXX="g++"
3902 else
3903 case $cross_compiling:$ac_tool_warned in
3904 yes:)
3905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3906 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3907 ac_tool_warned=yes ;;
3908 esac
3909 CXX=$ac_ct_CXX
3910 fi
3911 fi
3912
3913 fi
3914 fi
3915 # Provide some information about the compiler.
3916 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3917 set X $ac_compile
3918 ac_compiler=$2
3919 for ac_option in --version -v -V -qversion; do
3920 { { ac_try="$ac_compiler $ac_option >&5"
3921 case "(($ac_try" in
3922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3923 *) ac_try_echo=$ac_try;;
3924 esac
3925 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3926 $as_echo "$ac_try_echo"; } >&5
3927 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3928 ac_status=$?
3929 if test -s conftest.err; then
3930 sed '10a\
3931 ... rest of stderr output deleted ...
3932 10q' conftest.err >conftest.er1
3933 cat conftest.er1 >&5
3934 fi
3935 rm -f conftest.er1 conftest.err
3936 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3937 test $ac_status = 0; }
3938 done
3939
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3941 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3942 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3943 $as_echo_n "(cached) " >&6
3944 else
3945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3946 /* end confdefs.h. */
3947
3948 int
3949 main ()
3950 {
3951 #ifndef __GNUC__
3952 choke me
3953 #endif
3954
3955 ;
3956 return 0;
3957 }
3958 _ACEOF
3959 if ac_fn_cxx_try_compile "$LINENO"; then :
3960 ac_compiler_gnu=yes
3961 else
3962 ac_compiler_gnu=no
3963 fi
3964 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3965 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3966
3967 fi
3968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3969 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3970 if test $ac_compiler_gnu = yes; then
3971 GXX=yes
3972 else
3973 GXX=
3974 fi
3975 ac_test_CXXFLAGS=${CXXFLAGS+set}
3976 ac_save_CXXFLAGS=$CXXFLAGS
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3978 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3979 if ${ac_cv_prog_cxx_g+:} false; then :
3980 $as_echo_n "(cached) " >&6
3981 else
3982 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3983 ac_cxx_werror_flag=yes
3984 ac_cv_prog_cxx_g=no
3985 CXXFLAGS="-g"
3986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3987 /* end confdefs.h. */
3988
3989 int
3990 main ()
3991 {
3992
3993 ;
3994 return 0;
3995 }
3996 _ACEOF
3997 if ac_fn_cxx_try_compile "$LINENO"; then :
3998 ac_cv_prog_cxx_g=yes
3999 else
4000 CXXFLAGS=""
4001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002 /* end confdefs.h. */
4003
4004 int
4005 main ()
4006 {
4007
4008 ;
4009 return 0;
4010 }
4011 _ACEOF
4012 if ac_fn_cxx_try_compile "$LINENO"; then :
4013
4014 else
4015 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4016 CXXFLAGS="-g"
4017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4018 /* end confdefs.h. */
4019
4020 int
4021 main ()
4022 {
4023
4024 ;
4025 return 0;
4026 }
4027 _ACEOF
4028 if ac_fn_cxx_try_compile "$LINENO"; then :
4029 ac_cv_prog_cxx_g=yes
4030 fi
4031 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4032 fi
4033 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4034 fi
4035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4036 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4037 fi
4038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4039 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4040 if test "$ac_test_CXXFLAGS" = set; then
4041 CXXFLAGS=$ac_save_CXXFLAGS
4042 elif test $ac_cv_prog_cxx_g = yes; then
4043 if test "$GXX" = yes; then
4044 CXXFLAGS="-g -O2"
4045 else
4046 CXXFLAGS="-g"
4047 fi
4048 else
4049 if test "$GXX" = yes; then
4050 CXXFLAGS="-O2"
4051 else
4052 CXXFLAGS=
4053 fi
4054 fi
4055 ac_ext=c
4056 ac_cpp='$CPP $CPPFLAGS'
4057 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4058 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4060
4061
4062
4063 ac_ext=c
4064 ac_cpp='$CPP $CPPFLAGS'
4065 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4066 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4067 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4069 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4070 # On Suns, sometimes $CPP names a directory.
4071 if test -n "$CPP" && test -d "$CPP"; then
4072 CPP=
4073 fi
4074 if test -z "$CPP"; then
4075 if ${ac_cv_prog_CPP+:} false; then :
4076 $as_echo_n "(cached) " >&6
4077 else
4078 # Double quotes because CPP needs to be expanded
4079 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4080 do
4081 ac_preproc_ok=false
4082 for ac_c_preproc_warn_flag in '' yes
4083 do
4084 # Use a header file that comes with gcc, so configuring glibc
4085 # with a fresh cross-compiler works.
4086 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4087 # <limits.h> exists even on freestanding compilers.
4088 # On the NeXT, cc -E runs the code through the compiler's parser,
4089 # not just through cpp. "Syntax error" is here to catch this case.
4090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4091 /* end confdefs.h. */
4092 #ifdef __STDC__
4093 # include <limits.h>
4094 #else
4095 # include <assert.h>
4096 #endif
4097 Syntax error
4098 _ACEOF
4099 if ac_fn_c_try_cpp "$LINENO"; then :
4100
4101 else
4102 # Broken: fails on valid input.
4103 continue
4104 fi
4105 rm -f conftest.err conftest.i conftest.$ac_ext
4106
4107 # OK, works on sane cases. Now check whether nonexistent headers
4108 # can be detected and how.
4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4110 /* end confdefs.h. */
4111 #include <ac_nonexistent.h>
4112 _ACEOF
4113 if ac_fn_c_try_cpp "$LINENO"; then :
4114 # Broken: success on invalid input.
4115 continue
4116 else
4117 # Passes both tests.
4118 ac_preproc_ok=:
4119 break
4120 fi
4121 rm -f conftest.err conftest.i conftest.$ac_ext
4122
4123 done
4124 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4125 rm -f conftest.i conftest.err conftest.$ac_ext
4126 if $ac_preproc_ok; then :
4127 break
4128 fi
4129
4130 done
4131 ac_cv_prog_CPP=$CPP
4132
4133 fi
4134 CPP=$ac_cv_prog_CPP
4135 else
4136 ac_cv_prog_CPP=$CPP
4137 fi
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4139 $as_echo "$CPP" >&6; }
4140 ac_preproc_ok=false
4141 for ac_c_preproc_warn_flag in '' yes
4142 do
4143 # Use a header file that comes with gcc, so configuring glibc
4144 # with a fresh cross-compiler works.
4145 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4146 # <limits.h> exists even on freestanding compilers.
4147 # On the NeXT, cc -E runs the code through the compiler's parser,
4148 # not just through cpp. "Syntax error" is here to catch this case.
4149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4150 /* end confdefs.h. */
4151 #ifdef __STDC__
4152 # include <limits.h>
4153 #else
4154 # include <assert.h>
4155 #endif
4156 Syntax error
4157 _ACEOF
4158 if ac_fn_c_try_cpp "$LINENO"; then :
4159
4160 else
4161 # Broken: fails on valid input.
4162 continue
4163 fi
4164 rm -f conftest.err conftest.i conftest.$ac_ext
4165
4166 # OK, works on sane cases. Now check whether nonexistent headers
4167 # can be detected and how.
4168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4169 /* end confdefs.h. */
4170 #include <ac_nonexistent.h>
4171 _ACEOF
4172 if ac_fn_c_try_cpp "$LINENO"; then :
4173 # Broken: success on invalid input.
4174 continue
4175 else
4176 # Passes both tests.
4177 ac_preproc_ok=:
4178 break
4179 fi
4180 rm -f conftest.err conftest.i conftest.$ac_ext
4181
4182 done
4183 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4184 rm -f conftest.i conftest.err conftest.$ac_ext
4185 if $ac_preproc_ok; then :
4186
4187 else
4188 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4189 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4190 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4191 See \`config.log' for more details" "$LINENO" 5; }
4192 fi
4193
4194 ac_ext=c
4195 ac_cpp='$CPP $CPPFLAGS'
4196 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4197 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4198 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4199
4200
4201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4202 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4203 if ${ac_cv_path_GREP+:} false; then :
4204 $as_echo_n "(cached) " >&6
4205 else
4206 if test -z "$GREP"; then
4207 ac_path_GREP_found=false
4208 # Loop through the user's path and test for each of PROGNAME-LIST
4209 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4210 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4211 do
4212 IFS=$as_save_IFS
4213 test -z "$as_dir" && as_dir=.
4214 for ac_prog in grep ggrep; do
4215 for ac_exec_ext in '' $ac_executable_extensions; do
4216 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4217 as_fn_executable_p "$ac_path_GREP" || continue
4218 # Check for GNU ac_path_GREP and select it if it is found.
4219 # Check for GNU $ac_path_GREP
4220 case `"$ac_path_GREP" --version 2>&1` in
4221 *GNU*)
4222 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4223 *)
4224 ac_count=0
4225 $as_echo_n 0123456789 >"conftest.in"
4226 while :
4227 do
4228 cat "conftest.in" "conftest.in" >"conftest.tmp"
4229 mv "conftest.tmp" "conftest.in"
4230 cp "conftest.in" "conftest.nl"
4231 $as_echo 'GREP' >> "conftest.nl"
4232 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4233 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4234 as_fn_arith $ac_count + 1 && ac_count=$as_val
4235 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4236 # Best one so far, save it but keep looking for a better one
4237 ac_cv_path_GREP="$ac_path_GREP"
4238 ac_path_GREP_max=$ac_count
4239 fi
4240 # 10*(2^10) chars as input seems more than enough
4241 test $ac_count -gt 10 && break
4242 done
4243 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4244 esac
4245
4246 $ac_path_GREP_found && break 3
4247 done
4248 done
4249 done
4250 IFS=$as_save_IFS
4251 if test -z "$ac_cv_path_GREP"; then
4252 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4253 fi
4254 else
4255 ac_cv_path_GREP=$GREP
4256 fi
4257
4258 fi
4259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4260 $as_echo "$ac_cv_path_GREP" >&6; }
4261 GREP="$ac_cv_path_GREP"
4262
4263
4264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4265 $as_echo_n "checking for egrep... " >&6; }
4266 if ${ac_cv_path_EGREP+:} false; then :
4267 $as_echo_n "(cached) " >&6
4268 else
4269 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4270 then ac_cv_path_EGREP="$GREP -E"
4271 else
4272 if test -z "$EGREP"; then
4273 ac_path_EGREP_found=false
4274 # Loop through the user's path and test for each of PROGNAME-LIST
4275 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4276 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4277 do
4278 IFS=$as_save_IFS
4279 test -z "$as_dir" && as_dir=.
4280 for ac_prog in egrep; do
4281 for ac_exec_ext in '' $ac_executable_extensions; do
4282 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4283 as_fn_executable_p "$ac_path_EGREP" || continue
4284 # Check for GNU ac_path_EGREP and select it if it is found.
4285 # Check for GNU $ac_path_EGREP
4286 case `"$ac_path_EGREP" --version 2>&1` in
4287 *GNU*)
4288 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4289 *)
4290 ac_count=0
4291 $as_echo_n 0123456789 >"conftest.in"
4292 while :
4293 do
4294 cat "conftest.in" "conftest.in" >"conftest.tmp"
4295 mv "conftest.tmp" "conftest.in"
4296 cp "conftest.in" "conftest.nl"
4297 $as_echo 'EGREP' >> "conftest.nl"
4298 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4299 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4300 as_fn_arith $ac_count + 1 && ac_count=$as_val
4301 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4302 # Best one so far, save it but keep looking for a better one
4303 ac_cv_path_EGREP="$ac_path_EGREP"
4304 ac_path_EGREP_max=$ac_count
4305 fi
4306 # 10*(2^10) chars as input seems more than enough
4307 test $ac_count -gt 10 && break
4308 done
4309 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4310 esac
4311
4312 $ac_path_EGREP_found && break 3
4313 done
4314 done
4315 done
4316 IFS=$as_save_IFS
4317 if test -z "$ac_cv_path_EGREP"; then
4318 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4319 fi
4320 else
4321 ac_cv_path_EGREP=$EGREP
4322 fi
4323
4324 fi
4325 fi
4326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4327 $as_echo "$ac_cv_path_EGREP" >&6; }
4328 EGREP="$ac_cv_path_EGREP"
4329
4330
4331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4332 $as_echo_n "checking for ANSI C header files... " >&6; }
4333 if ${ac_cv_header_stdc+:} false; then :
4334 $as_echo_n "(cached) " >&6
4335 else
4336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4337 /* end confdefs.h. */
4338 #include <stdlib.h>
4339 #include <stdarg.h>
4340 #include <string.h>
4341 #include <float.h>
4342
4343 int
4344 main ()
4345 {
4346
4347 ;
4348 return 0;
4349 }
4350 _ACEOF
4351 if ac_fn_c_try_compile "$LINENO"; then :
4352 ac_cv_header_stdc=yes
4353 else
4354 ac_cv_header_stdc=no
4355 fi
4356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4357
4358 if test $ac_cv_header_stdc = yes; then
4359 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4361 /* end confdefs.h. */
4362 #include <string.h>
4363
4364 _ACEOF
4365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4366 $EGREP "memchr" >/dev/null 2>&1; then :
4367
4368 else
4369 ac_cv_header_stdc=no
4370 fi
4371 rm -f conftest*
4372
4373 fi
4374
4375 if test $ac_cv_header_stdc = yes; then
4376 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4378 /* end confdefs.h. */
4379 #include <stdlib.h>
4380
4381 _ACEOF
4382 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4383 $EGREP "free" >/dev/null 2>&1; then :
4384
4385 else
4386 ac_cv_header_stdc=no
4387 fi
4388 rm -f conftest*
4389
4390 fi
4391
4392 if test $ac_cv_header_stdc = yes; then
4393 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4394 if test "$cross_compiling" = yes; then :
4395 :
4396 else
4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4398 /* end confdefs.h. */
4399 #include <ctype.h>
4400 #include <stdlib.h>
4401 #if ((' ' & 0x0FF) == 0x020)
4402 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4403 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4404 #else
4405 # define ISLOWER(c) \
4406 (('a' <= (c) && (c) <= 'i') \
4407 || ('j' <= (c) && (c) <= 'r') \
4408 || ('s' <= (c) && (c) <= 'z'))
4409 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4410 #endif
4411
4412 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4413 int
4414 main ()
4415 {
4416 int i;
4417 for (i = 0; i < 256; i++)
4418 if (XOR (islower (i), ISLOWER (i))
4419 || toupper (i) != TOUPPER (i))
4420 return 2;
4421 return 0;
4422 }
4423 _ACEOF
4424 if ac_fn_c_try_run "$LINENO"; then :
4425
4426 else
4427 ac_cv_header_stdc=no
4428 fi
4429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4430 conftest.$ac_objext conftest.beam conftest.$ac_ext
4431 fi
4432
4433 fi
4434 fi
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4436 $as_echo "$ac_cv_header_stdc" >&6; }
4437 if test $ac_cv_header_stdc = yes; then
4438
4439 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4440
4441 fi
4442
4443 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4444 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4445 inttypes.h stdint.h unistd.h
4446 do :
4447 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4448 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4449 "
4450 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4451 cat >>confdefs.h <<_ACEOF
4452 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4453 _ACEOF
4454
4455 fi
4456
4457 done
4458
4459
4460
4461 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4462 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4463 MINIX=yes
4464 else
4465 MINIX=
4466 fi
4467
4468
4469 if test "$MINIX" = yes; then
4470
4471 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4472
4473
4474 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4475
4476
4477 $as_echo "#define _MINIX 1" >>confdefs.h
4478
4479 fi
4480
4481
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4483 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4484 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4485 $as_echo_n "(cached) " >&6
4486 else
4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4488 /* end confdefs.h. */
4489
4490 # define __EXTENSIONS__ 1
4491 $ac_includes_default
4492 int
4493 main ()
4494 {
4495
4496 ;
4497 return 0;
4498 }
4499 _ACEOF
4500 if ac_fn_c_try_compile "$LINENO"; then :
4501 ac_cv_safe_to_define___extensions__=yes
4502 else
4503 ac_cv_safe_to_define___extensions__=no
4504 fi
4505 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4506 fi
4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4508 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4509 test $ac_cv_safe_to_define___extensions__ = yes &&
4510 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4511
4512 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4513
4514 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4515
4516 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4517
4518 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4519
4520
4521 ac_aux_dir=
4522 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4523 if test -f "$ac_dir/install-sh"; then
4524 ac_aux_dir=$ac_dir
4525 ac_install_sh="$ac_aux_dir/install-sh -c"
4526 break
4527 elif test -f "$ac_dir/install.sh"; then
4528 ac_aux_dir=$ac_dir
4529 ac_install_sh="$ac_aux_dir/install.sh -c"
4530 break
4531 elif test -f "$ac_dir/shtool"; then
4532 ac_aux_dir=$ac_dir
4533 ac_install_sh="$ac_aux_dir/shtool install -c"
4534 break
4535 fi
4536 done
4537 if test -z "$ac_aux_dir"; then
4538 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4539 fi
4540
4541 # These three variables are undocumented and unsupported,
4542 # and are intended to be withdrawn in a future Autoconf release.
4543 # They can cause serious problems if a builder's source tree is in a directory
4544 # whose full name contains unusual characters.
4545 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4546 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4547 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4548
4549
4550 # Make sure we can run config.sub.
4551 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4552 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4553
4554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4555 $as_echo_n "checking build system type... " >&6; }
4556 if ${ac_cv_build+:} false; then :
4557 $as_echo_n "(cached) " >&6
4558 else
4559 ac_build_alias=$build_alias
4560 test "x$ac_build_alias" = x &&
4561 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4562 test "x$ac_build_alias" = x &&
4563 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4564 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4565 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4566
4567 fi
4568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4569 $as_echo "$ac_cv_build" >&6; }
4570 case $ac_cv_build in
4571 *-*-*) ;;
4572 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4573 esac
4574 build=$ac_cv_build
4575 ac_save_IFS=$IFS; IFS='-'
4576 set x $ac_cv_build
4577 shift
4578 build_cpu=$1
4579 build_vendor=$2
4580 shift; shift
4581 # Remember, the first character of IFS is used to create $*,
4582 # except with old shells:
4583 build_os=$*
4584 IFS=$ac_save_IFS
4585 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4586
4587
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4589 $as_echo_n "checking host system type... " >&6; }
4590 if ${ac_cv_host+:} false; then :
4591 $as_echo_n "(cached) " >&6
4592 else
4593 if test "x$host_alias" = x; then
4594 ac_cv_host=$ac_cv_build
4595 else
4596 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4597 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4598 fi
4599
4600 fi
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4602 $as_echo "$ac_cv_host" >&6; }
4603 case $ac_cv_host in
4604 *-*-*) ;;
4605 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4606 esac
4607 host=$ac_cv_host
4608 ac_save_IFS=$IFS; IFS='-'
4609 set x $ac_cv_host
4610 shift
4611 host_cpu=$1
4612 host_vendor=$2
4613 shift; shift
4614 # Remember, the first character of IFS is used to create $*,
4615 # except with old shells:
4616 host_os=$*
4617 IFS=$ac_save_IFS
4618 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4619
4620
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4622 $as_echo_n "checking target system type... " >&6; }
4623 if ${ac_cv_target+:} false; then :
4624 $as_echo_n "(cached) " >&6
4625 else
4626 if test "x$target_alias" = x; then
4627 ac_cv_target=$ac_cv_host
4628 else
4629 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4630 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4631 fi
4632
4633 fi
4634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4635 $as_echo "$ac_cv_target" >&6; }
4636 case $ac_cv_target in
4637 *-*-*) ;;
4638 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4639 esac
4640 target=$ac_cv_target
4641 ac_save_IFS=$IFS; IFS='-'
4642 set x $ac_cv_target
4643 shift
4644 target_cpu=$1
4645 target_vendor=$2
4646 shift; shift
4647 # Remember, the first character of IFS is used to create $*,
4648 # except with old shells:
4649 target_os=$*
4650 IFS=$ac_save_IFS
4651 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4652
4653
4654 # The aliases save the names the user supplied, while $host etc.
4655 # will get canonicalized.
4656 test -n "$target_alias" &&
4657 test "$program_prefix$program_suffix$program_transform_name" = \
4658 NONENONEs,x,x, &&
4659 program_prefix=${target_alias}-
4660
4661 # The tests for host and target for $enable_largefile require
4662 # canonical names.
4663
4664
4665
4666 # As the $enable_largefile decision depends on --enable-plugins we must set it
4667 # even in directories otherwise not depending on the $plugins option.
4668
4669
4670 maybe_plugins=no
4671 for ac_header in dlfcn.h
4672 do :
4673 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4674 "
4675 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4676 cat >>confdefs.h <<_ACEOF
4677 #define HAVE_DLFCN_H 1
4678 _ACEOF
4679 maybe_plugins=yes
4680 fi
4681
4682 done
4683
4684 for ac_header in windows.h
4685 do :
4686 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4687 "
4688 if test "x$ac_cv_header_windows_h" = xyes; then :
4689 cat >>confdefs.h <<_ACEOF
4690 #define HAVE_WINDOWS_H 1
4691 _ACEOF
4692 maybe_plugins=yes
4693 fi
4694
4695 done
4696
4697
4698 # Check whether --enable-plugins was given.
4699 if test "${enable_plugins+set}" = set; then :
4700 enableval=$enable_plugins; case "${enableval}" in
4701 no) plugins=no ;;
4702 *) plugins=yes
4703 if test "$maybe_plugins" != "yes" ; then
4704 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4705 fi ;;
4706 esac
4707 else
4708 plugins=$maybe_plugins
4709
4710 fi
4711
4712 if test "$plugins" = "yes"; then
4713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4714 $as_echo_n "checking for library containing dlsym... " >&6; }
4715 if ${ac_cv_search_dlsym+:} false; then :
4716 $as_echo_n "(cached) " >&6
4717 else
4718 ac_func_search_save_LIBS=$LIBS
4719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4720 /* end confdefs.h. */
4721
4722 /* Override any GCC internal prototype to avoid an error.
4723 Use char because int might match the return type of a GCC
4724 builtin and then its argument prototype would still apply. */
4725 #ifdef __cplusplus
4726 extern "C"
4727 #endif
4728 char dlsym ();
4729 int
4730 main ()
4731 {
4732 return dlsym ();
4733 ;
4734 return 0;
4735 }
4736 _ACEOF
4737 for ac_lib in '' dl; do
4738 if test -z "$ac_lib"; then
4739 ac_res="none required"
4740 else
4741 ac_res=-l$ac_lib
4742 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4743 fi
4744 if ac_fn_c_try_link "$LINENO"; then :
4745 ac_cv_search_dlsym=$ac_res
4746 fi
4747 rm -f core conftest.err conftest.$ac_objext \
4748 conftest$ac_exeext
4749 if ${ac_cv_search_dlsym+:} false; then :
4750 break
4751 fi
4752 done
4753 if ${ac_cv_search_dlsym+:} false; then :
4754
4755 else
4756 ac_cv_search_dlsym=no
4757 fi
4758 rm conftest.$ac_ext
4759 LIBS=$ac_func_search_save_LIBS
4760 fi
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4762 $as_echo "$ac_cv_search_dlsym" >&6; }
4763 ac_res=$ac_cv_search_dlsym
4764 if test "$ac_res" != no; then :
4765 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4766
4767 fi
4768
4769 fi
4770
4771
4772 case "${host}" in
4773 sparc-*-solaris*|i?86-*-solaris*)
4774 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4775 # were mutually exclusive until Solaris 11.3. Without procfs support,
4776 # the bfd/ elf module cannot provide certain routines such as
4777 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4778 # explicitly requested large-file support through the
4779 # --enable-largefile switch, disable large-file support in favor of
4780 # procfs support.
4781 #
4782 # Check if <sys/procfs.h> is incompatible with large-file support.
4783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4784 /* end confdefs.h. */
4785 #define _FILE_OFFSET_BITS 64
4786 #define _STRUCTURED_PROC 1
4787 #include <sys/procfs.h>
4788 int
4789 main ()
4790 {
4791
4792 ;
4793 return 0;
4794 }
4795 _ACEOF
4796 if ac_fn_c_try_compile "$LINENO"; then :
4797 acx_cv_procfs_lfs=yes
4798 else
4799 acx_cv_procfs_lfs=no
4800 fi
4801 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4802 #
4803 # Forcefully disable large-file support only if necessary, gdb is in
4804 # tree and enabled.
4805 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4806 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4807 : ${enable_largefile="no"}
4808 if test "$plugins" = yes; then
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4810 plugin support disabled; require large-file support which is incompatible with GDB." >&5
4811 $as_echo "$as_me: WARNING:
4812 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4813 plugins=no
4814 fi
4815 fi
4816 #
4817 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4818 # benefit of g++ 9+ which predefines it on Solaris.
4819 if test "$enable_largefile" = no; then
4820 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4821
4822 fi
4823 ;;
4824 esac
4825
4826 # Check whether --enable-largefile was given.
4827 if test "${enable_largefile+set}" = set; then :
4828 enableval=$enable_largefile;
4829 fi
4830
4831 if test "$enable_largefile" != no; then
4832
4833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4834 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4835 if ${ac_cv_sys_largefile_CC+:} false; then :
4836 $as_echo_n "(cached) " >&6
4837 else
4838 ac_cv_sys_largefile_CC=no
4839 if test "$GCC" != yes; then
4840 ac_save_CC=$CC
4841 while :; do
4842 # IRIX 6.2 and later do not support large files by default,
4843 # so use the C compiler's -n32 option if that helps.
4844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4845 /* end confdefs.h. */
4846 #include <sys/types.h>
4847 /* Check that off_t can represent 2**63 - 1 correctly.
4848 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4849 since some C++ compilers masquerading as C compilers
4850 incorrectly reject 9223372036854775807. */
4851 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4852 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4853 && LARGE_OFF_T % 2147483647 == 1)
4854 ? 1 : -1];
4855 int
4856 main ()
4857 {
4858
4859 ;
4860 return 0;
4861 }
4862 _ACEOF
4863 if ac_fn_c_try_compile "$LINENO"; then :
4864 break
4865 fi
4866 rm -f core conftest.err conftest.$ac_objext
4867 CC="$CC -n32"
4868 if ac_fn_c_try_compile "$LINENO"; then :
4869 ac_cv_sys_largefile_CC=' -n32'; break
4870 fi
4871 rm -f core conftest.err conftest.$ac_objext
4872 break
4873 done
4874 CC=$ac_save_CC
4875 rm -f conftest.$ac_ext
4876 fi
4877 fi
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4879 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4880 if test "$ac_cv_sys_largefile_CC" != no; then
4881 CC=$CC$ac_cv_sys_largefile_CC
4882 fi
4883
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4885 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4886 if ${ac_cv_sys_file_offset_bits+:} false; then :
4887 $as_echo_n "(cached) " >&6
4888 else
4889 while :; do
4890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4891 /* end confdefs.h. */
4892 #include <sys/types.h>
4893 /* Check that off_t can represent 2**63 - 1 correctly.
4894 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4895 since some C++ compilers masquerading as C compilers
4896 incorrectly reject 9223372036854775807. */
4897 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4898 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4899 && LARGE_OFF_T % 2147483647 == 1)
4900 ? 1 : -1];
4901 int
4902 main ()
4903 {
4904
4905 ;
4906 return 0;
4907 }
4908 _ACEOF
4909 if ac_fn_c_try_compile "$LINENO"; then :
4910 ac_cv_sys_file_offset_bits=no; break
4911 fi
4912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4914 /* end confdefs.h. */
4915 #define _FILE_OFFSET_BITS 64
4916 #include <sys/types.h>
4917 /* Check that off_t can represent 2**63 - 1 correctly.
4918 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4919 since some C++ compilers masquerading as C compilers
4920 incorrectly reject 9223372036854775807. */
4921 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4922 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4923 && LARGE_OFF_T % 2147483647 == 1)
4924 ? 1 : -1];
4925 int
4926 main ()
4927 {
4928
4929 ;
4930 return 0;
4931 }
4932 _ACEOF
4933 if ac_fn_c_try_compile "$LINENO"; then :
4934 ac_cv_sys_file_offset_bits=64; break
4935 fi
4936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937 ac_cv_sys_file_offset_bits=unknown
4938 break
4939 done
4940 fi
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4942 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4943 case $ac_cv_sys_file_offset_bits in #(
4944 no | unknown) ;;
4945 *)
4946 cat >>confdefs.h <<_ACEOF
4947 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4948 _ACEOF
4949 ;;
4950 esac
4951 rm -rf conftest*
4952 if test $ac_cv_sys_file_offset_bits = unknown; then
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4954 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4955 if ${ac_cv_sys_large_files+:} false; then :
4956 $as_echo_n "(cached) " >&6
4957 else
4958 while :; do
4959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4960 /* end confdefs.h. */
4961 #include <sys/types.h>
4962 /* Check that off_t can represent 2**63 - 1 correctly.
4963 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4964 since some C++ compilers masquerading as C compilers
4965 incorrectly reject 9223372036854775807. */
4966 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4967 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4968 && LARGE_OFF_T % 2147483647 == 1)
4969 ? 1 : -1];
4970 int
4971 main ()
4972 {
4973
4974 ;
4975 return 0;
4976 }
4977 _ACEOF
4978 if ac_fn_c_try_compile "$LINENO"; then :
4979 ac_cv_sys_large_files=no; break
4980 fi
4981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4983 /* end confdefs.h. */
4984 #define _LARGE_FILES 1
4985 #include <sys/types.h>
4986 /* Check that off_t can represent 2**63 - 1 correctly.
4987 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4988 since some C++ compilers masquerading as C compilers
4989 incorrectly reject 9223372036854775807. */
4990 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4991 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4992 && LARGE_OFF_T % 2147483647 == 1)
4993 ? 1 : -1];
4994 int
4995 main ()
4996 {
4997
4998 ;
4999 return 0;
5000 }
5001 _ACEOF
5002 if ac_fn_c_try_compile "$LINENO"; then :
5003 ac_cv_sys_large_files=1; break
5004 fi
5005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5006 ac_cv_sys_large_files=unknown
5007 break
5008 done
5009 fi
5010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5011 $as_echo "$ac_cv_sys_large_files" >&6; }
5012 case $ac_cv_sys_large_files in #(
5013 no | unknown) ;;
5014 *)
5015 cat >>confdefs.h <<_ACEOF
5016 #define _LARGE_FILES $ac_cv_sys_large_files
5017 _ACEOF
5018 ;;
5019 esac
5020 rm -rf conftest*
5021 fi
5022
5023
5024 fi
5025
5026
5027
5028
5029
5030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
5031 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
5032 if ${am_cv_prog_cc_stdc+:} false; then :
5033 $as_echo_n "(cached) " >&6
5034 else
5035 am_cv_prog_cc_stdc=no
5036 ac_save_CC="$CC"
5037 # Don't try gcc -ansi; that turns off useful extensions and
5038 # breaks some systems' header files.
5039 # AIX -qlanglvl=ansi
5040 # Ultrix and OSF/1 -std1
5041 # HP-UX 10.20 and later -Ae
5042 # HP-UX older versions -Aa -D_HPUX_SOURCE
5043 # SVR4 -Xc -D__EXTENSIONS__
5044 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5045 do
5046 CC="$ac_save_CC $ac_arg"
5047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5048 /* end confdefs.h. */
5049 #include <stdarg.h>
5050 #include <stdio.h>
5051 #include <sys/types.h>
5052 #include <sys/stat.h>
5053 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5054 struct buf { int x; };
5055 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5056 static char *e (p, i)
5057 char **p;
5058 int i;
5059 {
5060 return p[i];
5061 }
5062 static char *f (char * (*g) (char **, int), char **p, ...)
5063 {
5064 char *s;
5065 va_list v;
5066 va_start (v,p);
5067 s = g (p, va_arg (v,int));
5068 va_end (v);
5069 return s;
5070 }
5071 int test (int i, double x);
5072 struct s1 {int (*f) (int a);};
5073 struct s2 {int (*f) (double a);};
5074 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5075 int argc;
5076 char **argv;
5077
5078 int
5079 main ()
5080 {
5081
5082 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5083
5084 ;
5085 return 0;
5086 }
5087 _ACEOF
5088 if ac_fn_c_try_compile "$LINENO"; then :
5089 am_cv_prog_cc_stdc="$ac_arg"; break
5090 fi
5091 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5092 done
5093 CC="$ac_save_CC"
5094
5095 fi
5096
5097 if test -z "$am_cv_prog_cc_stdc"; then
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5099 $as_echo "none needed" >&6; }
5100 else
5101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5102 $as_echo "$am_cv_prog_cc_stdc" >&6; }
5103 fi
5104 case "x$am_cv_prog_cc_stdc" in
5105 x|xno) ;;
5106 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5107 esac
5108
5109 # Expand $ac_aux_dir to an absolute path.
5110 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5111
5112 if test x"${install_sh+set}" != xset; then
5113 case $am_aux_dir in
5114 *\ * | *\ *)
5115 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5116 *)
5117 install_sh="\${SHELL} $am_aux_dir/install-sh"
5118 esac
5119 fi
5120
5121 # Installed binaries are usually stripped using 'strip' when the user
5122 # run "make install-strip". However 'strip' might not be the right
5123 # tool to use in cross-compilation environments, therefore Automake
5124 # will honor the 'STRIP' environment variable to overrule this program.
5125 if test "$cross_compiling" != no; then
5126 if test -n "$ac_tool_prefix"; then
5127 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5128 set dummy ${ac_tool_prefix}strip; ac_word=$2
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130 $as_echo_n "checking for $ac_word... " >&6; }
5131 if ${ac_cv_prog_STRIP+:} false; then :
5132 $as_echo_n "(cached) " >&6
5133 else
5134 if test -n "$STRIP"; then
5135 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5136 else
5137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5138 for as_dir in $PATH
5139 do
5140 IFS=$as_save_IFS
5141 test -z "$as_dir" && as_dir=.
5142 for ac_exec_ext in '' $ac_executable_extensions; do
5143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5144 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5146 break 2
5147 fi
5148 done
5149 done
5150 IFS=$as_save_IFS
5151
5152 fi
5153 fi
5154 STRIP=$ac_cv_prog_STRIP
5155 if test -n "$STRIP"; then
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5157 $as_echo "$STRIP" >&6; }
5158 else
5159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5160 $as_echo "no" >&6; }
5161 fi
5162
5163
5164 fi
5165 if test -z "$ac_cv_prog_STRIP"; then
5166 ac_ct_STRIP=$STRIP
5167 # Extract the first word of "strip", so it can be a program name with args.
5168 set dummy strip; ac_word=$2
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5170 $as_echo_n "checking for $ac_word... " >&6; }
5171 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5172 $as_echo_n "(cached) " >&6
5173 else
5174 if test -n "$ac_ct_STRIP"; then
5175 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5176 else
5177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178 for as_dir in $PATH
5179 do
5180 IFS=$as_save_IFS
5181 test -z "$as_dir" && as_dir=.
5182 for ac_exec_ext in '' $ac_executable_extensions; do
5183 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5184 ac_cv_prog_ac_ct_STRIP="strip"
5185 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186 break 2
5187 fi
5188 done
5189 done
5190 IFS=$as_save_IFS
5191
5192 fi
5193 fi
5194 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5195 if test -n "$ac_ct_STRIP"; then
5196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5197 $as_echo "$ac_ct_STRIP" >&6; }
5198 else
5199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5200 $as_echo "no" >&6; }
5201 fi
5202
5203 if test "x$ac_ct_STRIP" = x; then
5204 STRIP=":"
5205 else
5206 case $cross_compiling:$ac_tool_warned in
5207 yes:)
5208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5209 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5210 ac_tool_warned=yes ;;
5211 esac
5212 STRIP=$ac_ct_STRIP
5213 fi
5214 else
5215 STRIP="$ac_cv_prog_STRIP"
5216 fi
5217
5218 fi
5219 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5220
5221
5222 ac_aux_dir=
5223 for ac_dir in .. "$srcdir"/..; do
5224 if test -f "$ac_dir/install-sh"; then
5225 ac_aux_dir=$ac_dir
5226 ac_install_sh="$ac_aux_dir/install-sh -c"
5227 break
5228 elif test -f "$ac_dir/install.sh"; then
5229 ac_aux_dir=$ac_dir
5230 ac_install_sh="$ac_aux_dir/install.sh -c"
5231 break
5232 elif test -f "$ac_dir/shtool"; then
5233 ac_aux_dir=$ac_dir
5234 ac_install_sh="$ac_aux_dir/shtool install -c"
5235 break
5236 fi
5237 done
5238 if test -z "$ac_aux_dir"; then
5239 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5240 fi
5241
5242 # These three variables are undocumented and unsupported,
5243 # and are intended to be withdrawn in a future Autoconf release.
5244 # They can cause serious problems if a builder's source tree is in a directory
5245 # whose full name contains unusual characters.
5246 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5247 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5248 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5249
5250
5251
5252 test "$program_prefix" != NONE &&
5253 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5254 # Use a double $ so make ignores it.
5255 test "$program_suffix" != NONE &&
5256 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5257 # Double any \ or $.
5258 # By default was `s,x,x', remove it if useless.
5259 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5260 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5261
5262
5263 # We require a C++11 compiler. Check if one is available, and if
5264 # necessary, set CXX_DIALECT to some -std=xxx switch.
5265
5266 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5267 ac_ext=cpp
5268 ac_cpp='$CXXCPP $CPPFLAGS'
5269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5272 CXX_DIALECT=""
5273 ac_success=no
5274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5275 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5276 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5277 $as_echo_n "(cached) " >&6
5278 else
5279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5280 /* end confdefs.h. */
5281
5282
5283 // If the compiler admits that it is not ready for C++11, why torture it?
5284 // Hopefully, this will speed up the test.
5285
5286 #ifndef __cplusplus
5287
5288 #error "This is not a C++ compiler"
5289
5290 #elif __cplusplus < 201103L
5291
5292 #error "This is not a C++11 compiler"
5293
5294 #else
5295
5296 namespace cxx11
5297 {
5298
5299 namespace test_static_assert
5300 {
5301
5302 template <typename T>
5303 struct check
5304 {
5305 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5306 };
5307
5308 }
5309
5310 namespace test_final_override
5311 {
5312
5313 struct Base
5314 {
5315 virtual void f() {}
5316 };
5317
5318 struct Derived : public Base
5319 {
5320 virtual void f() override {}
5321 };
5322
5323 }
5324
5325 namespace test_double_right_angle_brackets
5326 {
5327
5328 template < typename T >
5329 struct check {};
5330
5331 typedef check<void> single_type;
5332 typedef check<check<void>> double_type;
5333 typedef check<check<check<void>>> triple_type;
5334 typedef check<check<check<check<void>>>> quadruple_type;
5335
5336 }
5337
5338 namespace test_decltype
5339 {
5340
5341 int
5342 f()
5343 {
5344 int a = 1;
5345 decltype(a) b = 2;
5346 return a + b;
5347 }
5348
5349 }
5350
5351 namespace test_type_deduction
5352 {
5353
5354 template < typename T1, typename T2 >
5355 struct is_same
5356 {
5357 static const bool value = false;
5358 };
5359
5360 template < typename T >
5361 struct is_same<T, T>
5362 {
5363 static const bool value = true;
5364 };
5365
5366 template < typename T1, typename T2 >
5367 auto
5368 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5369 {
5370 return a1 + a2;
5371 }
5372
5373 int
5374 test(const int c, volatile int v)
5375 {
5376 static_assert(is_same<int, decltype(0)>::value == true, "");
5377 static_assert(is_same<int, decltype(c)>::value == false, "");
5378 static_assert(is_same<int, decltype(v)>::value == false, "");
5379 auto ac = c;
5380 auto av = v;
5381 auto sumi = ac + av + 'x';
5382 auto sumf = ac + av + 1.0;
5383 static_assert(is_same<int, decltype(ac)>::value == true, "");
5384 static_assert(is_same<int, decltype(av)>::value == true, "");
5385 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5386 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5387 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5388 return (sumf > 0.0) ? sumi : add(c, v);
5389 }
5390
5391 }
5392
5393 namespace test_noexcept
5394 {
5395
5396 int f() { return 0; }
5397 int g() noexcept { return 0; }
5398
5399 static_assert(noexcept(f()) == false, "");
5400 static_assert(noexcept(g()) == true, "");
5401
5402 }
5403
5404 namespace test_constexpr
5405 {
5406
5407 template < typename CharT >
5408 unsigned long constexpr
5409 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5410 {
5411 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5412 }
5413
5414 template < typename CharT >
5415 unsigned long constexpr
5416 strlen_c(const CharT *const s) noexcept
5417 {
5418 return strlen_c_r(s, 0UL);
5419 }
5420
5421 static_assert(strlen_c("") == 0UL, "");
5422 static_assert(strlen_c("1") == 1UL, "");
5423 static_assert(strlen_c("example") == 7UL, "");
5424 static_assert(strlen_c("another\0example") == 7UL, "");
5425
5426 }
5427
5428 namespace test_rvalue_references
5429 {
5430
5431 template < int N >
5432 struct answer
5433 {
5434 static constexpr int value = N;
5435 };
5436
5437 answer<1> f(int&) { return answer<1>(); }
5438 answer<2> f(const int&) { return answer<2>(); }
5439 answer<3> f(int&&) { return answer<3>(); }
5440
5441 void
5442 test()
5443 {
5444 int i = 0;
5445 const int c = 0;
5446 static_assert(decltype(f(i))::value == 1, "");
5447 static_assert(decltype(f(c))::value == 2, "");
5448 static_assert(decltype(f(0))::value == 3, "");
5449 }
5450
5451 }
5452
5453 namespace test_uniform_initialization
5454 {
5455
5456 struct test
5457 {
5458 static const int zero {};
5459 static const int one {1};
5460 };
5461
5462 static_assert(test::zero == 0, "");
5463 static_assert(test::one == 1, "");
5464
5465 }
5466
5467 namespace test_lambdas
5468 {
5469
5470 void
5471 test1()
5472 {
5473 auto lambda1 = [](){};
5474 auto lambda2 = lambda1;
5475 lambda1();
5476 lambda2();
5477 }
5478
5479 int
5480 test2()
5481 {
5482 auto a = [](int i, int j){ return i + j; }(1, 2);
5483 auto b = []() -> int { return '0'; }();
5484 auto c = [=](){ return a + b; }();
5485 auto d = [&](){ return c; }();
5486 auto e = [a, &b](int x) mutable {
5487 const auto identity = [](int y){ return y; };
5488 for (auto i = 0; i < a; ++i)
5489 a += b--;
5490 return x + identity(a + b);
5491 }(0);
5492 return a + b + c + d + e;
5493 }
5494
5495 int
5496 test3()
5497 {
5498 const auto nullary = [](){ return 0; };
5499 const auto unary = [](int x){ return x; };
5500 using nullary_t = decltype(nullary);
5501 using unary_t = decltype(unary);
5502 const auto higher1st = [](nullary_t f){ return f(); };
5503 const auto higher2nd = [unary](nullary_t f1){
5504 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5505 };
5506 return higher1st(nullary) + higher2nd(nullary)(unary);
5507 }
5508
5509 }
5510
5511 namespace test_variadic_templates
5512 {
5513
5514 template <int...>
5515 struct sum;
5516
5517 template <int N0, int... N1toN>
5518 struct sum<N0, N1toN...>
5519 {
5520 static constexpr auto value = N0 + sum<N1toN...>::value;
5521 };
5522
5523 template <>
5524 struct sum<>
5525 {
5526 static constexpr auto value = 0;
5527 };
5528
5529 static_assert(sum<>::value == 0, "");
5530 static_assert(sum<1>::value == 1, "");
5531 static_assert(sum<23>::value == 23, "");
5532 static_assert(sum<1, 2>::value == 3, "");
5533 static_assert(sum<5, 5, 11>::value == 21, "");
5534 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5535
5536 }
5537
5538 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5539 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5540 // because of this.
5541 namespace test_template_alias_sfinae
5542 {
5543
5544 struct foo {};
5545
5546 template<typename T>
5547 using member = typename T::member_type;
5548
5549 template<typename T>
5550 void func(...) {}
5551
5552 template<typename T>
5553 void func(member<T>*) {}
5554
5555 void test();
5556
5557 void test() { func<foo>(0); }
5558
5559 }
5560
5561 } // namespace cxx11
5562
5563 #endif // __cplusplus >= 201103L
5564
5565
5566
5567 _ACEOF
5568 if ac_fn_cxx_try_compile "$LINENO"; then :
5569 ax_cv_cxx_compile_cxx11=yes
5570 else
5571 ax_cv_cxx_compile_cxx11=no
5572 fi
5573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5574 fi
5575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5576 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5577 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5578 ac_success=yes
5579 fi
5580
5581 if test x$ac_success = xno; then
5582 for alternative in ${ax_cxx_compile_alternatives}; do
5583 switch="-std=gnu++${alternative}"
5584 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5586 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5587 if eval \${$cachevar+:} false; then :
5588 $as_echo_n "(cached) " >&6
5589 else
5590 ac_save_CXX="$CXX"
5591 CXX="$CXX $switch"
5592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5593 /* end confdefs.h. */
5594
5595
5596 // If the compiler admits that it is not ready for C++11, why torture it?
5597 // Hopefully, this will speed up the test.
5598
5599 #ifndef __cplusplus
5600
5601 #error "This is not a C++ compiler"
5602
5603 #elif __cplusplus < 201103L
5604
5605 #error "This is not a C++11 compiler"
5606
5607 #else
5608
5609 namespace cxx11
5610 {
5611
5612 namespace test_static_assert
5613 {
5614
5615 template <typename T>
5616 struct check
5617 {
5618 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5619 };
5620
5621 }
5622
5623 namespace test_final_override
5624 {
5625
5626 struct Base
5627 {
5628 virtual void f() {}
5629 };
5630
5631 struct Derived : public Base
5632 {
5633 virtual void f() override {}
5634 };
5635
5636 }
5637
5638 namespace test_double_right_angle_brackets
5639 {
5640
5641 template < typename T >
5642 struct check {};
5643
5644 typedef check<void> single_type;
5645 typedef check<check<void>> double_type;
5646 typedef check<check<check<void>>> triple_type;
5647 typedef check<check<check<check<void>>>> quadruple_type;
5648
5649 }
5650
5651 namespace test_decltype
5652 {
5653
5654 int
5655 f()
5656 {
5657 int a = 1;
5658 decltype(a) b = 2;
5659 return a + b;
5660 }
5661
5662 }
5663
5664 namespace test_type_deduction
5665 {
5666
5667 template < typename T1, typename T2 >
5668 struct is_same
5669 {
5670 static const bool value = false;
5671 };
5672
5673 template < typename T >
5674 struct is_same<T, T>
5675 {
5676 static const bool value = true;
5677 };
5678
5679 template < typename T1, typename T2 >
5680 auto
5681 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5682 {
5683 return a1 + a2;
5684 }
5685
5686 int
5687 test(const int c, volatile int v)
5688 {
5689 static_assert(is_same<int, decltype(0)>::value == true, "");
5690 static_assert(is_same<int, decltype(c)>::value == false, "");
5691 static_assert(is_same<int, decltype(v)>::value == false, "");
5692 auto ac = c;
5693 auto av = v;
5694 auto sumi = ac + av + 'x';
5695 auto sumf = ac + av + 1.0;
5696 static_assert(is_same<int, decltype(ac)>::value == true, "");
5697 static_assert(is_same<int, decltype(av)>::value == true, "");
5698 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5699 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5700 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5701 return (sumf > 0.0) ? sumi : add(c, v);
5702 }
5703
5704 }
5705
5706 namespace test_noexcept
5707 {
5708
5709 int f() { return 0; }
5710 int g() noexcept { return 0; }
5711
5712 static_assert(noexcept(f()) == false, "");
5713 static_assert(noexcept(g()) == true, "");
5714
5715 }
5716
5717 namespace test_constexpr
5718 {
5719
5720 template < typename CharT >
5721 unsigned long constexpr
5722 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5723 {
5724 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5725 }
5726
5727 template < typename CharT >
5728 unsigned long constexpr
5729 strlen_c(const CharT *const s) noexcept
5730 {
5731 return strlen_c_r(s, 0UL);
5732 }
5733
5734 static_assert(strlen_c("") == 0UL, "");
5735 static_assert(strlen_c("1") == 1UL, "");
5736 static_assert(strlen_c("example") == 7UL, "");
5737 static_assert(strlen_c("another\0example") == 7UL, "");
5738
5739 }
5740
5741 namespace test_rvalue_references
5742 {
5743
5744 template < int N >
5745 struct answer
5746 {
5747 static constexpr int value = N;
5748 };
5749
5750 answer<1> f(int&) { return answer<1>(); }
5751 answer<2> f(const int&) { return answer<2>(); }
5752 answer<3> f(int&&) { return answer<3>(); }
5753
5754 void
5755 test()
5756 {
5757 int i = 0;
5758 const int c = 0;
5759 static_assert(decltype(f(i))::value == 1, "");
5760 static_assert(decltype(f(c))::value == 2, "");
5761 static_assert(decltype(f(0))::value == 3, "");
5762 }
5763
5764 }
5765
5766 namespace test_uniform_initialization
5767 {
5768
5769 struct test
5770 {
5771 static const int zero {};
5772 static const int one {1};
5773 };
5774
5775 static_assert(test::zero == 0, "");
5776 static_assert(test::one == 1, "");
5777
5778 }
5779
5780 namespace test_lambdas
5781 {
5782
5783 void
5784 test1()
5785 {
5786 auto lambda1 = [](){};
5787 auto lambda2 = lambda1;
5788 lambda1();
5789 lambda2();
5790 }
5791
5792 int
5793 test2()
5794 {
5795 auto a = [](int i, int j){ return i + j; }(1, 2);
5796 auto b = []() -> int { return '0'; }();
5797 auto c = [=](){ return a + b; }();
5798 auto d = [&](){ return c; }();
5799 auto e = [a, &b](int x) mutable {
5800 const auto identity = [](int y){ return y; };
5801 for (auto i = 0; i < a; ++i)
5802 a += b--;
5803 return x + identity(a + b);
5804 }(0);
5805 return a + b + c + d + e;
5806 }
5807
5808 int
5809 test3()
5810 {
5811 const auto nullary = [](){ return 0; };
5812 const auto unary = [](int x){ return x; };
5813 using nullary_t = decltype(nullary);
5814 using unary_t = decltype(unary);
5815 const auto higher1st = [](nullary_t f){ return f(); };
5816 const auto higher2nd = [unary](nullary_t f1){
5817 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5818 };
5819 return higher1st(nullary) + higher2nd(nullary)(unary);
5820 }
5821
5822 }
5823
5824 namespace test_variadic_templates
5825 {
5826
5827 template <int...>
5828 struct sum;
5829
5830 template <int N0, int... N1toN>
5831 struct sum<N0, N1toN...>
5832 {
5833 static constexpr auto value = N0 + sum<N1toN...>::value;
5834 };
5835
5836 template <>
5837 struct sum<>
5838 {
5839 static constexpr auto value = 0;
5840 };
5841
5842 static_assert(sum<>::value == 0, "");
5843 static_assert(sum<1>::value == 1, "");
5844 static_assert(sum<23>::value == 23, "");
5845 static_assert(sum<1, 2>::value == 3, "");
5846 static_assert(sum<5, 5, 11>::value == 21, "");
5847 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5848
5849 }
5850
5851 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5852 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5853 // because of this.
5854 namespace test_template_alias_sfinae
5855 {
5856
5857 struct foo {};
5858
5859 template<typename T>
5860 using member = typename T::member_type;
5861
5862 template<typename T>
5863 void func(...) {}
5864
5865 template<typename T>
5866 void func(member<T>*) {}
5867
5868 void test();
5869
5870 void test() { func<foo>(0); }
5871
5872 }
5873
5874 } // namespace cxx11
5875
5876 #endif // __cplusplus >= 201103L
5877
5878
5879
5880 _ACEOF
5881 if ac_fn_cxx_try_compile "$LINENO"; then :
5882 eval $cachevar=yes
5883 else
5884 eval $cachevar=no
5885 fi
5886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5887 CXX="$ac_save_CXX"
5888 fi
5889 eval ac_res=\$$cachevar
5890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5891 $as_echo "$ac_res" >&6; }
5892 if eval test x\$$cachevar = xyes; then
5893 CXX_DIALECT="$switch"
5894 ac_success=yes
5895 break
5896 fi
5897 done
5898 fi
5899
5900 if test x$ac_success = xno; then
5901 for alternative in ${ax_cxx_compile_alternatives}; do
5902 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5903 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5905 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5906 if eval \${$cachevar+:} false; then :
5907 $as_echo_n "(cached) " >&6
5908 else
5909 ac_save_CXX="$CXX"
5910 CXX="$CXX $switch"
5911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5912 /* end confdefs.h. */
5913
5914
5915 // If the compiler admits that it is not ready for C++11, why torture it?
5916 // Hopefully, this will speed up the test.
5917
5918 #ifndef __cplusplus
5919
5920 #error "This is not a C++ compiler"
5921
5922 #elif __cplusplus < 201103L
5923
5924 #error "This is not a C++11 compiler"
5925
5926 #else
5927
5928 namespace cxx11
5929 {
5930
5931 namespace test_static_assert
5932 {
5933
5934 template <typename T>
5935 struct check
5936 {
5937 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5938 };
5939
5940 }
5941
5942 namespace test_final_override
5943 {
5944
5945 struct Base
5946 {
5947 virtual void f() {}
5948 };
5949
5950 struct Derived : public Base
5951 {
5952 virtual void f() override {}
5953 };
5954
5955 }
5956
5957 namespace test_double_right_angle_brackets
5958 {
5959
5960 template < typename T >
5961 struct check {};
5962
5963 typedef check<void> single_type;
5964 typedef check<check<void>> double_type;
5965 typedef check<check<check<void>>> triple_type;
5966 typedef check<check<check<check<void>>>> quadruple_type;
5967
5968 }
5969
5970 namespace test_decltype
5971 {
5972
5973 int
5974 f()
5975 {
5976 int a = 1;
5977 decltype(a) b = 2;
5978 return a + b;
5979 }
5980
5981 }
5982
5983 namespace test_type_deduction
5984 {
5985
5986 template < typename T1, typename T2 >
5987 struct is_same
5988 {
5989 static const bool value = false;
5990 };
5991
5992 template < typename T >
5993 struct is_same<T, T>
5994 {
5995 static const bool value = true;
5996 };
5997
5998 template < typename T1, typename T2 >
5999 auto
6000 add(T1 a1, T2 a2) -> decltype(a1 + a2)
6001 {
6002 return a1 + a2;
6003 }
6004
6005 int
6006 test(const int c, volatile int v)
6007 {
6008 static_assert(is_same<int, decltype(0)>::value == true, "");
6009 static_assert(is_same<int, decltype(c)>::value == false, "");
6010 static_assert(is_same<int, decltype(v)>::value == false, "");
6011 auto ac = c;
6012 auto av = v;
6013 auto sumi = ac + av + 'x';
6014 auto sumf = ac + av + 1.0;
6015 static_assert(is_same<int, decltype(ac)>::value == true, "");
6016 static_assert(is_same<int, decltype(av)>::value == true, "");
6017 static_assert(is_same<int, decltype(sumi)>::value == true, "");
6018 static_assert(is_same<int, decltype(sumf)>::value == false, "");
6019 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
6020 return (sumf > 0.0) ? sumi : add(c, v);
6021 }
6022
6023 }
6024
6025 namespace test_noexcept
6026 {
6027
6028 int f() { return 0; }
6029 int g() noexcept { return 0; }
6030
6031 static_assert(noexcept(f()) == false, "");
6032 static_assert(noexcept(g()) == true, "");
6033
6034 }
6035
6036 namespace test_constexpr
6037 {
6038
6039 template < typename CharT >
6040 unsigned long constexpr
6041 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6042 {
6043 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6044 }
6045
6046 template < typename CharT >
6047 unsigned long constexpr
6048 strlen_c(const CharT *const s) noexcept
6049 {
6050 return strlen_c_r(s, 0UL);
6051 }
6052
6053 static_assert(strlen_c("") == 0UL, "");
6054 static_assert(strlen_c("1") == 1UL, "");
6055 static_assert(strlen_c("example") == 7UL, "");
6056 static_assert(strlen_c("another\0example") == 7UL, "");
6057
6058 }
6059
6060 namespace test_rvalue_references
6061 {
6062
6063 template < int N >
6064 struct answer
6065 {
6066 static constexpr int value = N;
6067 };
6068
6069 answer<1> f(int&) { return answer<1>(); }
6070 answer<2> f(const int&) { return answer<2>(); }
6071 answer<3> f(int&&) { return answer<3>(); }
6072
6073 void
6074 test()
6075 {
6076 int i = 0;
6077 const int c = 0;
6078 static_assert(decltype(f(i))::value == 1, "");
6079 static_assert(decltype(f(c))::value == 2, "");
6080 static_assert(decltype(f(0))::value == 3, "");
6081 }
6082
6083 }
6084
6085 namespace test_uniform_initialization
6086 {
6087
6088 struct test
6089 {
6090 static const int zero {};
6091 static const int one {1};
6092 };
6093
6094 static_assert(test::zero == 0, "");
6095 static_assert(test::one == 1, "");
6096
6097 }
6098
6099 namespace test_lambdas
6100 {
6101
6102 void
6103 test1()
6104 {
6105 auto lambda1 = [](){};
6106 auto lambda2 = lambda1;
6107 lambda1();
6108 lambda2();
6109 }
6110
6111 int
6112 test2()
6113 {
6114 auto a = [](int i, int j){ return i + j; }(1, 2);
6115 auto b = []() -> int { return '0'; }();
6116 auto c = [=](){ return a + b; }();
6117 auto d = [&](){ return c; }();
6118 auto e = [a, &b](int x) mutable {
6119 const auto identity = [](int y){ return y; };
6120 for (auto i = 0; i < a; ++i)
6121 a += b--;
6122 return x + identity(a + b);
6123 }(0);
6124 return a + b + c + d + e;
6125 }
6126
6127 int
6128 test3()
6129 {
6130 const auto nullary = [](){ return 0; };
6131 const auto unary = [](int x){ return x; };
6132 using nullary_t = decltype(nullary);
6133 using unary_t = decltype(unary);
6134 const auto higher1st = [](nullary_t f){ return f(); };
6135 const auto higher2nd = [unary](nullary_t f1){
6136 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6137 };
6138 return higher1st(nullary) + higher2nd(nullary)(unary);
6139 }
6140
6141 }
6142
6143 namespace test_variadic_templates
6144 {
6145
6146 template <int...>
6147 struct sum;
6148
6149 template <int N0, int... N1toN>
6150 struct sum<N0, N1toN...>
6151 {
6152 static constexpr auto value = N0 + sum<N1toN...>::value;
6153 };
6154
6155 template <>
6156 struct sum<>
6157 {
6158 static constexpr auto value = 0;
6159 };
6160
6161 static_assert(sum<>::value == 0, "");
6162 static_assert(sum<1>::value == 1, "");
6163 static_assert(sum<23>::value == 23, "");
6164 static_assert(sum<1, 2>::value == 3, "");
6165 static_assert(sum<5, 5, 11>::value == 21, "");
6166 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6167
6168 }
6169
6170 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6171 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6172 // because of this.
6173 namespace test_template_alias_sfinae
6174 {
6175
6176 struct foo {};
6177
6178 template<typename T>
6179 using member = typename T::member_type;
6180
6181 template<typename T>
6182 void func(...) {}
6183
6184 template<typename T>
6185 void func(member<T>*) {}
6186
6187 void test();
6188
6189 void test() { func<foo>(0); }
6190
6191 }
6192
6193 } // namespace cxx11
6194
6195 #endif // __cplusplus >= 201103L
6196
6197
6198
6199 _ACEOF
6200 if ac_fn_cxx_try_compile "$LINENO"; then :
6201 eval $cachevar=yes
6202 else
6203 eval $cachevar=no
6204 fi
6205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6206 CXX="$ac_save_CXX"
6207 fi
6208 eval ac_res=\$$cachevar
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6210 $as_echo "$ac_res" >&6; }
6211 if eval test x\$$cachevar = xyes; then
6212 CXX_DIALECT="$switch"
6213 ac_success=yes
6214 break
6215 fi
6216 done
6217 if test x$ac_success = xyes; then
6218 break
6219 fi
6220 done
6221 fi
6222 ac_ext=c
6223 ac_cpp='$CPP $CPPFLAGS'
6224 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6225 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6226 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6227
6228 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6229 if test x$ac_success = xno; then
6230 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6231 fi
6232 fi
6233 if test x$ac_success = xno; then
6234 HAVE_CXX11=0
6235 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6236 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6237 else
6238 HAVE_CXX11=1
6239
6240 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6241
6242 fi
6243
6244
6245
6246
6247 # Dependency checking.
6248 rm -rf .tst 2>/dev/null
6249 mkdir .tst 2>/dev/null
6250 if test -d .tst; then
6251 am__leading_dot=.
6252 else
6253 am__leading_dot=_
6254 fi
6255 rmdir .tst 2>/dev/null
6256
6257 DEPDIR="${am__leading_dot}deps"
6258
6259 ac_config_commands="$ac_config_commands depdir"
6260
6261
6262 depcc="$CC" am_compiler_list=
6263
6264 am_depcomp=$ac_aux_dir/depcomp
6265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6266 $as_echo_n "checking dependency style of $depcc... " >&6; }
6267 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6268 $as_echo_n "(cached) " >&6
6269 else
6270 if test -f "$am_depcomp"; then
6271 # We make a subdir and do the tests there. Otherwise we can end up
6272 # making bogus files that we don't know about and never remove. For
6273 # instance it was reported that on HP-UX the gcc test will end up
6274 # making a dummy file named `D' -- because `-MD' means `put the output
6275 # in D'.
6276 mkdir conftest.dir
6277 # Copy depcomp to subdir because otherwise we won't find it if we're
6278 # using a relative directory.
6279 cp "$am_depcomp" conftest.dir
6280 cd conftest.dir
6281 # We will build objects and dependencies in a subdirectory because
6282 # it helps to detect inapplicable dependency modes. For instance
6283 # both Tru64's cc and ICC support -MD to output dependencies as a
6284 # side effect of compilation, but ICC will put the dependencies in
6285 # the current directory while Tru64 will put them in the object
6286 # directory.
6287 mkdir sub
6288
6289 am_cv_CC_dependencies_compiler_type=none
6290 if test "$am_compiler_list" = ""; then
6291 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6292 fi
6293 for depmode in $am_compiler_list; do
6294 if test $depmode = none; then break; fi
6295
6296 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6297 # Setup a source with many dependencies, because some compilers
6298 # like to wrap large dependency lists on column 80 (with \), and
6299 # we should not choose a depcomp mode which is confused by this.
6300 #
6301 # We need to recreate these files for each test, as the compiler may
6302 # overwrite some of them when testing with obscure command lines.
6303 # This happens at least with the AIX C compiler.
6304 : > sub/conftest.c
6305 for i in 1 2 3 4 5 6; do
6306 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6307 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6308 # Solaris 8's {/usr,}/bin/sh.
6309 touch sub/conftst$i.h
6310 done
6311 echo "include sub/conftest.Po" > confmf
6312
6313 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6314 # mode. It turns out that the SunPro C++ compiler does not properly
6315 # handle `-M -o', and we need to detect this.
6316 depcmd="depmode=$depmode \
6317 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6318 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6319 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6320 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6321 if env $depcmd > conftest.err 2>&1 &&
6322 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6323 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6324 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6325 # icc doesn't choke on unknown options, it will just issue warnings
6326 # or remarks (even with -Werror). So we grep stderr for any message
6327 # that says an option was ignored or not supported.
6328 # When given -MP, icc 7.0 and 7.1 complain thusly:
6329 # icc: Command line warning: ignoring option '-M'; no argument required
6330 # The diagnosis changed in icc 8.0:
6331 # icc: Command line remark: option '-MP' not supported
6332 if (grep 'ignoring option' conftest.err ||
6333 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6334 am_cv_CC_dependencies_compiler_type=$depmode
6335 $as_echo "$as_me:$LINENO: success" >&5
6336 break
6337 fi
6338 fi
6339 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6340 sed -e 's/^/| /' < conftest.err >&5
6341 done
6342
6343 cd ..
6344 rm -rf conftest.dir
6345 else
6346 am_cv_CC_dependencies_compiler_type=none
6347 fi
6348
6349 fi
6350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6351 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6352 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6353 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6354 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6355
6356 fi
6357
6358
6359
6360 CONFIG_OBS=
6361 CONFIG_DEPS=
6362 CONFIG_SRCS=
6363 ENABLE_CFLAGS=
6364
6365 CONFIG_ALL=
6366 CONFIG_CLEAN=
6367 CONFIG_INSTALL=
6368 CONFIG_UNINSTALL=
6369
6370 # If we haven't got the data from the intl directory,
6371 # assume NLS is disabled.
6372 USE_NLS=no
6373 LIBINTL=
6374 LIBINTL_DEP=
6375 INCINTL=
6376 XGETTEXT=
6377 GMSGFMT=
6378 POSUB=
6379
6380 if test -f ../intl/config.intl; then
6381 . ../intl/config.intl
6382 fi
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6384 $as_echo_n "checking whether NLS is requested... " >&6; }
6385 if test x"$USE_NLS" != xyes; then
6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387 $as_echo "no" >&6; }
6388 else
6389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6390 $as_echo "yes" >&6; }
6391
6392 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6393
6394
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6396 $as_echo_n "checking for catalogs to be installed... " >&6; }
6397 # Look for .po and .gmo files in the source directory.
6398 CATALOGS=
6399 XLINGUAS=
6400 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6401 # If there aren't any .gmo files the shell will give us the
6402 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6403 # weeded out.
6404 case "$cat" in *\**)
6405 continue;;
6406 esac
6407 # The quadruple backslash is collapsed to a double backslash
6408 # by the backticks, then collapsed again by the double quotes,
6409 # leaving us with one backslash in the sed expression (right
6410 # before the dot that mustn't act as a wildcard).
6411 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6412 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6413 # The user is allowed to set LINGUAS to a list of languages to
6414 # install catalogs for. If it's empty that means "all of them."
6415 if test "x$LINGUAS" = x; then
6416 CATALOGS="$CATALOGS $cat"
6417 XLINGUAS="$XLINGUAS $lang"
6418 else
6419 case "$LINGUAS" in *$lang*)
6420 CATALOGS="$CATALOGS $cat"
6421 XLINGUAS="$XLINGUAS $lang"
6422 ;;
6423 esac
6424 fi
6425 done
6426 LINGUAS="$XLINGUAS"
6427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6428 $as_echo "$LINGUAS" >&6; }
6429
6430
6431 DATADIRNAME=share
6432
6433 INSTOBJEXT=.mo
6434
6435 GENCAT=gencat
6436
6437 CATOBJEXT=.gmo
6438
6439 fi
6440
6441 localedir='${datadir}/locale'
6442
6443
6444 if test x"$USE_NLS" = xyes; then
6445 CONFIG_ALL="$CONFIG_ALL all-po"
6446 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6447 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6448 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6449 fi
6450
6451 PACKAGE=gdb
6452
6453 cat >>confdefs.h <<_ACEOF
6454 #define PACKAGE "$PACKAGE"
6455 _ACEOF
6456
6457
6458
6459 # We never need to detect it in this sub-configure.
6460 # But preserve it for config.status --recheck.
6461
6462
6463
6464 MAKEINFO_EXTRA_FLAGS=""
6465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6466 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6467 if ${gdb_cv_have_makeinfo_click+:} false; then :
6468 $as_echo_n "(cached) " >&6
6469 else
6470 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6471 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6472 gdb_cv_have_makeinfo_click=yes
6473 else
6474 gdb_cv_have_makeinfo_click=no
6475 fi
6476 fi
6477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6478 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6479 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6480 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6481 fi
6482
6483
6484
6485
6486 # Check whether --with-separate-debug-dir was given.
6487 if test "${with_separate_debug_dir+set}" = set; then :
6488 withval=$with_separate_debug_dir;
6489 DEBUGDIR=$withval
6490 else
6491 DEBUGDIR=${libdir}/debug
6492 fi
6493
6494
6495 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6496 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6497 ac_define_dir=`eval echo $DEBUGDIR`
6498 ac_define_dir=`eval echo $ac_define_dir`
6499
6500 cat >>confdefs.h <<_ACEOF
6501 #define DEBUGDIR "$ac_define_dir"
6502 _ACEOF
6503
6504
6505
6506
6507 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6508 if test "x$prefix" = xNONE; then
6509 test_prefix=/usr/local
6510 else
6511 test_prefix=$prefix
6512 fi
6513 else
6514 test_prefix=$exec_prefix
6515 fi
6516 value=0
6517 case ${ac_define_dir} in
6518 "${test_prefix}"|"${test_prefix}/"*|\
6519 '${exec_prefix}'|'${exec_prefix}/'*)
6520 value=1
6521 ;;
6522 esac
6523
6524 cat >>confdefs.h <<_ACEOF
6525 #define DEBUGDIR_RELOCATABLE $value
6526 _ACEOF
6527
6528
6529
6530
6531 # We can't pass paths as command line arguments.
6532 # Mingw32 tries to be clever and will convert the paths for us.
6533 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6534 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6535 # This breaks GDB's relocatable path conversions since paths passed in
6536 # config.h would not get so translated, the path prefixes no longer match.
6537
6538 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6539 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6540 ac_define_dir=`eval echo $bindir`
6541 ac_define_dir=`eval echo $ac_define_dir`
6542
6543 cat >>confdefs.h <<_ACEOF
6544 #define BINDIR "$ac_define_dir"
6545 _ACEOF
6546
6547
6548
6549 # GDB's datadir relocation
6550
6551
6552
6553 # Check whether --with-gdb-datadir was given.
6554 if test "${with_gdb_datadir+set}" = set; then :
6555 withval=$with_gdb_datadir;
6556 GDB_DATADIR=$withval
6557 else
6558 GDB_DATADIR=${datadir}/gdb
6559 fi
6560
6561
6562 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6563 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6564 ac_define_dir=`eval echo $GDB_DATADIR`
6565 ac_define_dir=`eval echo $ac_define_dir`
6566
6567 cat >>confdefs.h <<_ACEOF
6568 #define GDB_DATADIR "$ac_define_dir"
6569 _ACEOF
6570
6571
6572
6573
6574 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6575 if test "x$prefix" = xNONE; then
6576 test_prefix=/usr/local
6577 else
6578 test_prefix=$prefix
6579 fi
6580 else
6581 test_prefix=$exec_prefix
6582 fi
6583 value=0
6584 case ${ac_define_dir} in
6585 "${test_prefix}"|"${test_prefix}/"*|\
6586 '${exec_prefix}'|'${exec_prefix}/'*)
6587 value=1
6588 ;;
6589 esac
6590
6591 cat >>confdefs.h <<_ACEOF
6592 #define GDB_DATADIR_RELOCATABLE $value
6593 _ACEOF
6594
6595
6596
6597
6598
6599 # Check whether --with-relocated-sources was given.
6600 if test "${with_relocated_sources+set}" = set; then :
6601 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6602
6603 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6604 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6605 ac_define_dir=`eval echo $reloc_srcdir`
6606 ac_define_dir=`eval echo $ac_define_dir`
6607
6608 cat >>confdefs.h <<_ACEOF
6609 #define RELOC_SRCDIR "$ac_define_dir"
6610 _ACEOF
6611
6612
6613
6614 fi
6615
6616
6617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6618 $as_echo_n "checking for default auto-load directory... " >&6; }
6619
6620 # Check whether --with-auto-load-dir was given.
6621 if test "${with_auto_load_dir+set}" = set; then :
6622 withval=$with_auto_load_dir;
6623 else
6624 with_auto_load_dir='$debugdir:$datadir/auto-load'
6625 fi
6626
6627 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6628
6629 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6630 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6631 ac_define_dir=`eval echo $escape_dir`
6632 ac_define_dir=`eval echo $ac_define_dir`
6633
6634 cat >>confdefs.h <<_ACEOF
6635 #define AUTO_LOAD_DIR "$ac_define_dir"
6636 _ACEOF
6637
6638
6639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6640 $as_echo "$with_auto_load_dir" >&6; }
6641
6642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6643 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6644
6645 # Check whether --with-auto-load-safe-path was given.
6646 if test "${with_auto_load_safe_path+set}" = set; then :
6647 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6648 with_auto_load_safe_path="/"
6649 fi
6650 else
6651 with_auto_load_safe_path="$with_auto_load_dir"
6652 fi
6653
6654 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6655
6656 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6657 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6658 ac_define_dir=`eval echo $escape_dir`
6659 ac_define_dir=`eval echo $ac_define_dir`
6660
6661 cat >>confdefs.h <<_ACEOF
6662 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6663 _ACEOF
6664
6665
6666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6667 $as_echo "$with_auto_load_safe_path" >&6; }
6668
6669
6670
6671 subdirs="$subdirs testsuite"
6672
6673
6674 # Check whether to support alternative target configurations
6675 # Check whether --enable-targets was given.
6676 if test "${enable_targets+set}" = set; then :
6677 enableval=$enable_targets; case "${enableval}" in
6678 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6679 ;;
6680 no) enable_targets= ;;
6681 *) enable_targets=$enableval ;;
6682 esac
6683 fi
6684
6685
6686 # Check whether to enable 64-bit support on 32-bit hosts
6687 # Check whether --enable-64-bit-bfd was given.
6688 if test "${enable_64_bit_bfd+set}" = set; then :
6689 enableval=$enable_64_bit_bfd; case "${enableval}" in
6690 yes) want64=true ;;
6691 no) want64=false ;;
6692 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6693 esac
6694 else
6695 want64=false
6696 fi
6697
6698 # Provide defaults for some variables set by the per-host and per-target
6699 # configuration.
6700 gdb_host_obs=posix-hdep.o
6701
6702 if test "${target}" = "${host}"; then
6703 gdb_native=yes
6704 else
6705 gdb_native=no
6706 fi
6707
6708 . $srcdir/configure.host
6709
6710 # Accumulate some settings from configure.tgt over all enabled targets
6711
6712 TARGET_OBS=
6713 all_targets=
6714 HAVE_NATIVE_GCORE_TARGET=
6715
6716 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6717 do
6718 if test "$targ_alias" = "all"; then
6719 all_targets=true
6720 else
6721 # Canonicalize the secondary target names.
6722 result=`$ac_config_sub $targ_alias 2>/dev/null`
6723 if test -n "$result"; then
6724 targ=$result
6725 else
6726 targ=$targ_alias
6727 fi
6728
6729 . ${srcdir}/configure.tgt
6730
6731 if test -z "${gdb_target_obs}"; then :
6732 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6733 fi
6734
6735 # Target-specific object files
6736 for i in ${gdb_target_obs}; do
6737 case " $TARGET_OBS " in
6738 *" ${i} "*) ;;
6739 *)
6740 TARGET_OBS="$TARGET_OBS ${i}"
6741 ;;
6742 esac
6743 done
6744
6745 # Check whether this target needs 64-bit CORE_ADDR
6746 if test x${want64} = xfalse; then
6747 . ${srcdir}/../bfd/config.bfd
6748 fi
6749
6750 # Check whether this target is native and supports gcore.
6751 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6752 && $gdb_have_gcore; then
6753 HAVE_NATIVE_GCORE_TARGET=1
6754 fi
6755 fi
6756 done
6757
6758 if test x${all_targets} = xtrue; then
6759
6760 # We want all 64-bit targets if we either:
6761 # - run on a 64-bit host or
6762 # - already require 64-bit support for some other target or
6763 # - the --enable-64-bit-bfd option was supplied
6764 # Otherwise we only support all 32-bit targets.
6765 #
6766 # NOTE: This test must be in sync with the corresponding
6767 # tests in BFD!
6768
6769 if test x${want64} = xfalse; then
6770 # The cast to long int works around a bug in the HP C Compiler
6771 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6772 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6773 # This bug is HP SR number 8606223364.
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6775 $as_echo_n "checking size of long... " >&6; }
6776 if ${ac_cv_sizeof_long+:} false; then :
6777 $as_echo_n "(cached) " >&6
6778 else
6779 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6780
6781 else
6782 if test "$ac_cv_type_long" = yes; then
6783 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6784 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6785 as_fn_error 77 "cannot compute sizeof (long)
6786 See \`config.log' for more details" "$LINENO" 5; }
6787 else
6788 ac_cv_sizeof_long=0
6789 fi
6790 fi
6791
6792 fi
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6794 $as_echo "$ac_cv_sizeof_long" >&6; }
6795
6796
6797
6798 cat >>confdefs.h <<_ACEOF
6799 #define SIZEOF_LONG $ac_cv_sizeof_long
6800 _ACEOF
6801
6802
6803 if test "x${ac_cv_sizeof_long}" = "x8"; then
6804 want64=true
6805 fi
6806 fi
6807 if test x${want64} = xtrue; then
6808 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6809 else
6810 TARGET_OBS='$(ALL_TARGET_OBS)'
6811 fi
6812 fi
6813
6814
6815
6816
6817 # For other settings, only the main target counts.
6818 gdb_sim=
6819 gdb_osabi=
6820 targ=$target; . ${srcdir}/configure.tgt
6821
6822 # Fetch the default architecture and default target vector from BFD.
6823 targ=$target; . $srcdir/../bfd/config.bfd
6824
6825 # We only want the first architecture, so strip off the others if
6826 # there is more than one.
6827 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6828
6829 if test "x$targ_archs" != x; then
6830
6831 cat >>confdefs.h <<_ACEOF
6832 #define DEFAULT_BFD_ARCH $targ_archs
6833 _ACEOF
6834
6835 fi
6836 if test "x$targ_defvec" != x; then
6837
6838 cat >>confdefs.h <<_ACEOF
6839 #define DEFAULT_BFD_VEC $targ_defvec
6840 _ACEOF
6841
6842 fi
6843
6844 # Enable MI.
6845 # Check whether --enable-gdbmi was given.
6846 if test "${enable_gdbmi+set}" = set; then :
6847 enableval=$enable_gdbmi; case $enableval in
6848 yes | no)
6849 ;;
6850 *)
6851 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6852 esac
6853 else
6854 enable_gdbmi=yes
6855 fi
6856
6857 if test x"$enable_gdbmi" = xyes; then
6858 if test -d "$srcdir/mi"; then
6859 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6860 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6861 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6862 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6863 fi
6864 fi
6865
6866 # Enable TUI.
6867 # Check whether --enable-tui was given.
6868 if test "${enable_tui+set}" = set; then :
6869 enableval=$enable_tui; case $enableval in
6870 yes | no | auto)
6871 ;;
6872 *)
6873 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6874 esac
6875 else
6876 enable_tui=auto
6877 fi
6878
6879
6880 # Enable gdbtk.
6881 # Check whether --enable-gdbtk was given.
6882 if test "${enable_gdbtk+set}" = set; then :
6883 enableval=$enable_gdbtk; case $enableval in
6884 yes | no)
6885 ;;
6886 *)
6887 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6888 esac
6889 else
6890 if test -d "$srcdir/gdbtk"; then
6891 enable_gdbtk=yes
6892 else
6893 enable_gdbtk=no
6894 fi
6895 fi
6896
6897 # We unconditionally disable gdbtk tests on selected platforms.
6898 case $host_os in
6899 go32* | windows*)
6900 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6901 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6902 enable_gdbtk=no ;;
6903 esac
6904
6905 # Handle optional debuginfod support
6906
6907
6908
6909
6910
6911
6912
6913 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6914 if test -n "$ac_tool_prefix"; then
6915 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6916 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6918 $as_echo_n "checking for $ac_word... " >&6; }
6919 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6920 $as_echo_n "(cached) " >&6
6921 else
6922 case $PKG_CONFIG in
6923 [\\/]* | ?:[\\/]*)
6924 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6925 ;;
6926 *)
6927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6928 for as_dir in $PATH
6929 do
6930 IFS=$as_save_IFS
6931 test -z "$as_dir" && as_dir=.
6932 for ac_exec_ext in '' $ac_executable_extensions; do
6933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6934 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6936 break 2
6937 fi
6938 done
6939 done
6940 IFS=$as_save_IFS
6941
6942 ;;
6943 esac
6944 fi
6945 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6946 if test -n "$PKG_CONFIG"; then
6947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6948 $as_echo "$PKG_CONFIG" >&6; }
6949 else
6950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6951 $as_echo "no" >&6; }
6952 fi
6953
6954
6955 fi
6956 if test -z "$ac_cv_path_PKG_CONFIG"; then
6957 ac_pt_PKG_CONFIG=$PKG_CONFIG
6958 # Extract the first word of "pkg-config", so it can be a program name with args.
6959 set dummy pkg-config; ac_word=$2
6960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6961 $as_echo_n "checking for $ac_word... " >&6; }
6962 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6963 $as_echo_n "(cached) " >&6
6964 else
6965 case $ac_pt_PKG_CONFIG in
6966 [\\/]* | ?:[\\/]*)
6967 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6968 ;;
6969 *)
6970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6971 for as_dir in $PATH
6972 do
6973 IFS=$as_save_IFS
6974 test -z "$as_dir" && as_dir=.
6975 for ac_exec_ext in '' $ac_executable_extensions; do
6976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6977 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6979 break 2
6980 fi
6981 done
6982 done
6983 IFS=$as_save_IFS
6984
6985 ;;
6986 esac
6987 fi
6988 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6989 if test -n "$ac_pt_PKG_CONFIG"; then
6990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6991 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
6992 else
6993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6994 $as_echo "no" >&6; }
6995 fi
6996
6997 if test "x$ac_pt_PKG_CONFIG" = x; then
6998 PKG_CONFIG=""
6999 else
7000 case $cross_compiling:$ac_tool_warned in
7001 yes:)
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7003 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7004 ac_tool_warned=yes ;;
7005 esac
7006 PKG_CONFIG=$ac_pt_PKG_CONFIG
7007 fi
7008 else
7009 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7010 fi
7011
7012 fi
7013 if test -n "$PKG_CONFIG"; then
7014 _pkg_min_version=0.9.0
7015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7016 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7017 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7019 $as_echo "yes" >&6; }
7020 else
7021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7022 $as_echo "no" >&6; }
7023 PKG_CONFIG=""
7024 fi
7025 fi
7026
7027 # Handle optional debuginfod support
7028
7029 # Check whether --with-debuginfod was given.
7030 if test "${with_debuginfod+set}" = set; then :
7031 withval=$with_debuginfod;
7032 else
7033 with_debuginfod=auto
7034 fi
7035
7036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
7037 $as_echo_n "checking whether to use debuginfod... " >&6; }
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
7039 $as_echo "$with_debuginfod" >&6; }
7040
7041 if test "x$with_debuginfod" != xno; then
7042
7043 pkg_failed=no
7044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7045 $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7046
7047 if test -n "$DEBUGINFOD_CFLAGS"; then
7048 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7049 elif test -n "$PKG_CONFIG"; then
7050 if test -n "$PKG_CONFIG" && \
7051 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7052 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7053 ac_status=$?
7054 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7055 test $ac_status = 0; }; then
7056 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7057 test "x$?" != "x0" && pkg_failed=yes
7058 else
7059 pkg_failed=yes
7060 fi
7061 else
7062 pkg_failed=untried
7063 fi
7064 if test -n "$DEBUGINFOD_LIBS"; then
7065 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7066 elif test -n "$PKG_CONFIG"; then
7067 if test -n "$PKG_CONFIG" && \
7068 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7069 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7070 ac_status=$?
7071 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7072 test $ac_status = 0; }; then
7073 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7074 test "x$?" != "x0" && pkg_failed=yes
7075 else
7076 pkg_failed=yes
7077 fi
7078 else
7079 pkg_failed=untried
7080 fi
7081
7082 if test $pkg_failed = no; then
7083 pkg_save_LDFLAGS="$LDFLAGS"
7084 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7086 /* end confdefs.h. */
7087
7088 int
7089 main ()
7090 {
7091
7092 ;
7093 return 0;
7094 }
7095 _ACEOF
7096 if ac_fn_c_try_link "$LINENO"; then :
7097
7098 else
7099 pkg_failed=yes
7100 fi
7101 rm -f core conftest.err conftest.$ac_objext \
7102 conftest$ac_exeext conftest.$ac_ext
7103 LDFLAGS=$pkg_save_LDFLAGS
7104 fi
7105
7106
7107
7108 if test $pkg_failed = yes; then
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7110 $as_echo "no" >&6; }
7111
7112 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7113 _pkg_short_errors_supported=yes
7114 else
7115 _pkg_short_errors_supported=no
7116 fi
7117 if test $_pkg_short_errors_supported = yes; then
7118 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7119 else
7120 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7121 fi
7122 # Put the nasty error message in config.log where it belongs
7123 echo "$DEBUGINFOD_PKG_ERRORS" >&5
7124
7125 if test "x$with_debuginfod" = xyes; then
7126 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7127 else
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7129 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7130 fi
7131 elif test $pkg_failed = untried; then
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7133 $as_echo "no" >&6; }
7134 if test "x$with_debuginfod" = xyes; then
7135 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7136 else
7137 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7138 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7139 fi
7140 else
7141 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7142 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7144 $as_echo "yes" >&6; }
7145
7146 $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7147
7148 fi
7149 else
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7151 $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7152 fi
7153
7154
7155 # Libunwind support for ia64.
7156
7157 # Check whether --with-libunwind-ia64 was given.
7158 if test "${with_libunwind_ia64+set}" = set; then :
7159 withval=$with_libunwind_ia64;
7160 else
7161 with_libunwind_ia64=auto
7162 fi
7163
7164
7165 # Backward compatibility option.
7166 if test "${with_libunwind+set}" = set; then
7167 if test x"$with_libunwind_ia64" != xauto; then
7168 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7169 fi
7170 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7171 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7172 with_libunwind_ia64="$with_libunwind"
7173 fi
7174
7175 case "$with_libunwind_ia64" in
7176 yes | no)
7177 ;;
7178 auto)
7179 for ac_header in libunwind-ia64.h
7180 do :
7181 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7182 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7183 cat >>confdefs.h <<_ACEOF
7184 #define HAVE_LIBUNWIND_IA64_H 1
7185 _ACEOF
7186
7187 fi
7188
7189 done
7190
7191 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7192 ;;
7193 *)
7194 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7195 ;;
7196 esac
7197
7198 if test x"$with_libunwind_ia64" = xyes; then
7199 for ac_header in libunwind-ia64.h
7200 do :
7201 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7202 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7203 cat >>confdefs.h <<_ACEOF
7204 #define HAVE_LIBUNWIND_IA64_H 1
7205 _ACEOF
7206
7207 fi
7208
7209 done
7210
7211 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7212 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7213 fi
7214 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7215 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7216 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7217 fi
7218
7219 opt_curses=no
7220
7221 # Check whether --with-curses was given.
7222 if test "${with_curses+set}" = set; then :
7223 withval=$with_curses; opt_curses=$withval
7224 fi
7225
7226
7227 prefer_curses=no
7228 if test "$opt_curses" = "yes"; then
7229 prefer_curses=yes
7230 fi
7231
7232 # Profiling support.
7233 # Check whether --enable-profiling was given.
7234 if test "${enable_profiling+set}" = set; then :
7235 enableval=$enable_profiling; case $enableval in
7236 yes | no)
7237 ;;
7238 *)
7239 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
7240 esac
7241 else
7242 enable_profiling=no
7243 fi
7244
7245
7246 for ac_func in monstartup _mcleanup
7247 do :
7248 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7249 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7250 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7251 cat >>confdefs.h <<_ACEOF
7252 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7253 _ACEOF
7254
7255 fi
7256 done
7257
7258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7259 $as_echo_n "checking for _etext... " >&6; }
7260 if ${ac_cv_var__etext+:} false; then :
7261 $as_echo_n "(cached) " >&6
7262 else
7263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7264 /* end confdefs.h. */
7265 #include <stdlib.h>
7266 extern char _etext;
7267
7268 int
7269 main ()
7270 {
7271 free (&_etext);
7272 ;
7273 return 0;
7274 }
7275 _ACEOF
7276 if ac_fn_c_try_link "$LINENO"; then :
7277 ac_cv_var__etext=yes
7278 else
7279 ac_cv_var__etext=no
7280 fi
7281 rm -f core conftest.err conftest.$ac_objext \
7282 conftest$ac_exeext conftest.$ac_ext
7283 fi
7284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7285 $as_echo "$ac_cv_var__etext" >&6; }
7286 if test "$ac_cv_var__etext" = yes; then
7287
7288 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7289
7290 fi
7291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7292 $as_echo_n "checking for etext... " >&6; }
7293 if ${ac_cv_var_etext+:} false; then :
7294 $as_echo_n "(cached) " >&6
7295 else
7296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7297 /* end confdefs.h. */
7298 #include <stdlib.h>
7299 extern char etext;
7300
7301 int
7302 main ()
7303 {
7304 free (&etext);
7305 ;
7306 return 0;
7307 }
7308 _ACEOF
7309 if ac_fn_c_try_link "$LINENO"; then :
7310 ac_cv_var_etext=yes
7311 else
7312 ac_cv_var_etext=no
7313 fi
7314 rm -f core conftest.err conftest.$ac_objext \
7315 conftest$ac_exeext conftest.$ac_ext
7316 fi
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7318 $as_echo "$ac_cv_var_etext" >&6; }
7319 if test "$ac_cv_var_etext" = yes; then
7320
7321 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7322
7323 fi
7324 if test "$enable_profiling" = yes ; then
7325 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7326 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7327 fi
7328 PROFILE_CFLAGS=-pg
7329 OLD_CFLAGS="$CFLAGS"
7330 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7331
7332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7333 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7334 if ${ac_cv_cc_supports_pg+:} false; then :
7335 $as_echo_n "(cached) " >&6
7336 else
7337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7338 /* end confdefs.h. */
7339
7340 int
7341 main ()
7342 {
7343 int x;
7344 ;
7345 return 0;
7346 }
7347 _ACEOF
7348 if ac_fn_c_try_compile "$LINENO"; then :
7349 ac_cv_cc_supports_pg=yes
7350 else
7351 ac_cv_cc_supports_pg=no
7352 fi
7353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7354 fi
7355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7356 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7357
7358 if test "$ac_cv_cc_supports_pg" = no; then
7359 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7360 fi
7361
7362 CFLAGS="$OLD_CFLAGS"
7363 fi
7364
7365 CODESIGN_CERT=
7366 # Check whether --enable-codesign was given.
7367 if test "${enable_codesign+set}" = set; then :
7368 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7369 fi
7370
7371
7372
7373
7374
7375 # Check whether --with-pkgversion was given.
7376 if test "${with_pkgversion+set}" = set; then :
7377 withval=$with_pkgversion; case "$withval" in
7378 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7379 no) PKGVERSION= ;;
7380 *) PKGVERSION="($withval) " ;;
7381 esac
7382 else
7383 PKGVERSION="(GDB) "
7384
7385 fi
7386
7387
7388
7389
7390
7391 # Check whether --with-bugurl was given.
7392 if test "${with_bugurl+set}" = set; then :
7393 withval=$with_bugurl; case "$withval" in
7394 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7395 no) BUGURL=
7396 ;;
7397 *) BUGURL="$withval"
7398 ;;
7399 esac
7400 else
7401 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7402
7403 fi
7404
7405 case ${BUGURL} in
7406 "")
7407 REPORT_BUGS_TO=
7408 REPORT_BUGS_TEXI=
7409 ;;
7410 *)
7411 REPORT_BUGS_TO="<$BUGURL>"
7412 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7413 ;;
7414 esac;
7415
7416
7417
7418
7419 cat >>confdefs.h <<_ACEOF
7420 #define PKGVERSION "$PKGVERSION"
7421 _ACEOF
7422
7423
7424 cat >>confdefs.h <<_ACEOF
7425 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7426 _ACEOF
7427
7428
7429 # --------------------- #
7430 # Checks for programs. #
7431 # --------------------- #
7432
7433 for ac_prog in gawk mawk nawk awk
7434 do
7435 # Extract the first word of "$ac_prog", so it can be a program name with args.
7436 set dummy $ac_prog; ac_word=$2
7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7438 $as_echo_n "checking for $ac_word... " >&6; }
7439 if ${ac_cv_prog_AWK+:} false; then :
7440 $as_echo_n "(cached) " >&6
7441 else
7442 if test -n "$AWK"; then
7443 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7444 else
7445 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7446 for as_dir in $PATH
7447 do
7448 IFS=$as_save_IFS
7449 test -z "$as_dir" && as_dir=.
7450 for ac_exec_ext in '' $ac_executable_extensions; do
7451 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7452 ac_cv_prog_AWK="$ac_prog"
7453 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7454 break 2
7455 fi
7456 done
7457 done
7458 IFS=$as_save_IFS
7459
7460 fi
7461 fi
7462 AWK=$ac_cv_prog_AWK
7463 if test -n "$AWK"; then
7464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7465 $as_echo "$AWK" >&6; }
7466 else
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7468 $as_echo "no" >&6; }
7469 fi
7470
7471
7472 test -n "$AWK" && break
7473 done
7474
7475 # Find a good install program. We prefer a C program (faster),
7476 # so one script is as good as another. But avoid the broken or
7477 # incompatible versions:
7478 # SysV /etc/install, /usr/sbin/install
7479 # SunOS /usr/etc/install
7480 # IRIX /sbin/install
7481 # AIX /bin/install
7482 # AmigaOS /C/install, which installs bootblocks on floppy discs
7483 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7484 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7485 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7486 # OS/2's system install, which has a completely different semantic
7487 # ./install, which can be erroneously created by make from ./install.sh.
7488 # Reject install programs that cannot install multiple files.
7489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7490 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7491 if test -z "$INSTALL"; then
7492 if ${ac_cv_path_install+:} false; then :
7493 $as_echo_n "(cached) " >&6
7494 else
7495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7496 for as_dir in $PATH
7497 do
7498 IFS=$as_save_IFS
7499 test -z "$as_dir" && as_dir=.
7500 # Account for people who put trailing slashes in PATH elements.
7501 case $as_dir/ in #((
7502 ./ | .// | /[cC]/* | \
7503 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7504 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7505 /usr/ucb/* ) ;;
7506 *)
7507 # OSF1 and SCO ODT 3.0 have their own names for install.
7508 # Don't use installbsd from OSF since it installs stuff as root
7509 # by default.
7510 for ac_prog in ginstall scoinst install; do
7511 for ac_exec_ext in '' $ac_executable_extensions; do
7512 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7513 if test $ac_prog = install &&
7514 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7515 # AIX install. It has an incompatible calling convention.
7516 :
7517 elif test $ac_prog = install &&
7518 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7519 # program-specific install script used by HP pwplus--don't use.
7520 :
7521 else
7522 rm -rf conftest.one conftest.two conftest.dir
7523 echo one > conftest.one
7524 echo two > conftest.two
7525 mkdir conftest.dir
7526 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7527 test -s conftest.one && test -s conftest.two &&
7528 test -s conftest.dir/conftest.one &&
7529 test -s conftest.dir/conftest.two
7530 then
7531 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7532 break 3
7533 fi
7534 fi
7535 fi
7536 done
7537 done
7538 ;;
7539 esac
7540
7541 done
7542 IFS=$as_save_IFS
7543
7544 rm -rf conftest.one conftest.two conftest.dir
7545
7546 fi
7547 if test "${ac_cv_path_install+set}" = set; then
7548 INSTALL=$ac_cv_path_install
7549 else
7550 # As a last resort, use the slow shell script. Don't cache a
7551 # value for INSTALL within a source directory, because that will
7552 # break other packages using the cache if that directory is
7553 # removed, or if the value is a relative name.
7554 INSTALL=$ac_install_sh
7555 fi
7556 fi
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7558 $as_echo "$INSTALL" >&6; }
7559
7560 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7561 # It thinks the first close brace ends the variable substitution.
7562 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7563
7564 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7565
7566 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7567
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7569 $as_echo_n "checking whether ln -s works... " >&6; }
7570 LN_S=$as_ln_s
7571 if test "$LN_S" = "ln -s"; then
7572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7573 $as_echo "yes" >&6; }
7574 else
7575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7576 $as_echo "no, using $LN_S" >&6; }
7577 fi
7578
7579 if test -n "$ac_tool_prefix"; then
7580 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7581 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7583 $as_echo_n "checking for $ac_word... " >&6; }
7584 if ${ac_cv_prog_RANLIB+:} false; then :
7585 $as_echo_n "(cached) " >&6
7586 else
7587 if test -n "$RANLIB"; then
7588 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7589 else
7590 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591 for as_dir in $PATH
7592 do
7593 IFS=$as_save_IFS
7594 test -z "$as_dir" && as_dir=.
7595 for ac_exec_ext in '' $ac_executable_extensions; do
7596 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7597 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7598 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7599 break 2
7600 fi
7601 done
7602 done
7603 IFS=$as_save_IFS
7604
7605 fi
7606 fi
7607 RANLIB=$ac_cv_prog_RANLIB
7608 if test -n "$RANLIB"; then
7609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7610 $as_echo "$RANLIB" >&6; }
7611 else
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7613 $as_echo "no" >&6; }
7614 fi
7615
7616
7617 fi
7618 if test -z "$ac_cv_prog_RANLIB"; then
7619 ac_ct_RANLIB=$RANLIB
7620 # Extract the first word of "ranlib", so it can be a program name with args.
7621 set dummy ranlib; ac_word=$2
7622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623 $as_echo_n "checking for $ac_word... " >&6; }
7624 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7625 $as_echo_n "(cached) " >&6
7626 else
7627 if test -n "$ac_ct_RANLIB"; then
7628 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7629 else
7630 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7631 for as_dir in $PATH
7632 do
7633 IFS=$as_save_IFS
7634 test -z "$as_dir" && as_dir=.
7635 for ac_exec_ext in '' $ac_executable_extensions; do
7636 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7637 ac_cv_prog_ac_ct_RANLIB="ranlib"
7638 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7639 break 2
7640 fi
7641 done
7642 done
7643 IFS=$as_save_IFS
7644
7645 fi
7646 fi
7647 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7648 if test -n "$ac_ct_RANLIB"; then
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7650 $as_echo "$ac_ct_RANLIB" >&6; }
7651 else
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7653 $as_echo "no" >&6; }
7654 fi
7655
7656 if test "x$ac_ct_RANLIB" = x; then
7657 RANLIB=":"
7658 else
7659 case $cross_compiling:$ac_tool_warned in
7660 yes:)
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7662 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7663 ac_tool_warned=yes ;;
7664 esac
7665 RANLIB=$ac_ct_RANLIB
7666 fi
7667 else
7668 RANLIB="$ac_cv_prog_RANLIB"
7669 fi
7670
7671 for ac_prog in 'bison -y' byacc
7672 do
7673 # Extract the first word of "$ac_prog", so it can be a program name with args.
7674 set dummy $ac_prog; ac_word=$2
7675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7676 $as_echo_n "checking for $ac_word... " >&6; }
7677 if ${ac_cv_prog_YACC+:} false; then :
7678 $as_echo_n "(cached) " >&6
7679 else
7680 if test -n "$YACC"; then
7681 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7682 else
7683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684 for as_dir in $PATH
7685 do
7686 IFS=$as_save_IFS
7687 test -z "$as_dir" && as_dir=.
7688 for ac_exec_ext in '' $ac_executable_extensions; do
7689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690 ac_cv_prog_YACC="$ac_prog"
7691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692 break 2
7693 fi
7694 done
7695 done
7696 IFS=$as_save_IFS
7697
7698 fi
7699 fi
7700 YACC=$ac_cv_prog_YACC
7701 if test -n "$YACC"; then
7702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7703 $as_echo "$YACC" >&6; }
7704 else
7705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7706 $as_echo "no" >&6; }
7707 fi
7708
7709
7710 test -n "$YACC" && break
7711 done
7712 test -n "$YACC" || YACC="yacc"
7713
7714
7715 if test -n "$ac_tool_prefix"; then
7716 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7717 set dummy ${ac_tool_prefix}ar; ac_word=$2
7718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7719 $as_echo_n "checking for $ac_word... " >&6; }
7720 if ${ac_cv_prog_AR+:} false; then :
7721 $as_echo_n "(cached) " >&6
7722 else
7723 if test -n "$AR"; then
7724 ac_cv_prog_AR="$AR" # Let the user override the test.
7725 else
7726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727 for as_dir in $PATH
7728 do
7729 IFS=$as_save_IFS
7730 test -z "$as_dir" && as_dir=.
7731 for ac_exec_ext in '' $ac_executable_extensions; do
7732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7733 ac_cv_prog_AR="${ac_tool_prefix}ar"
7734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7735 break 2
7736 fi
7737 done
7738 done
7739 IFS=$as_save_IFS
7740
7741 fi
7742 fi
7743 AR=$ac_cv_prog_AR
7744 if test -n "$AR"; then
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7746 $as_echo "$AR" >&6; }
7747 else
7748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749 $as_echo "no" >&6; }
7750 fi
7751
7752
7753 fi
7754 if test -z "$ac_cv_prog_AR"; then
7755 ac_ct_AR=$AR
7756 # Extract the first word of "ar", so it can be a program name with args.
7757 set dummy ar; ac_word=$2
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7759 $as_echo_n "checking for $ac_word... " >&6; }
7760 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7761 $as_echo_n "(cached) " >&6
7762 else
7763 if test -n "$ac_ct_AR"; then
7764 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7765 else
7766 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7767 for as_dir in $PATH
7768 do
7769 IFS=$as_save_IFS
7770 test -z "$as_dir" && as_dir=.
7771 for ac_exec_ext in '' $ac_executable_extensions; do
7772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7773 ac_cv_prog_ac_ct_AR="ar"
7774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7775 break 2
7776 fi
7777 done
7778 done
7779 IFS=$as_save_IFS
7780
7781 fi
7782 fi
7783 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7784 if test -n "$ac_ct_AR"; then
7785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7786 $as_echo "$ac_ct_AR" >&6; }
7787 else
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7789 $as_echo "no" >&6; }
7790 fi
7791
7792 if test "x$ac_ct_AR" = x; then
7793 AR=""
7794 else
7795 case $cross_compiling:$ac_tool_warned in
7796 yes:)
7797 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7798 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7799 ac_tool_warned=yes ;;
7800 esac
7801 AR=$ac_ct_AR
7802 fi
7803 else
7804 AR="$ac_cv_prog_AR"
7805 fi
7806
7807 if test -n "$ac_tool_prefix"; then
7808 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7809 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7811 $as_echo_n "checking for $ac_word... " >&6; }
7812 if ${ac_cv_prog_DLLTOOL+:} false; then :
7813 $as_echo_n "(cached) " >&6
7814 else
7815 if test -n "$DLLTOOL"; then
7816 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7817 else
7818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7819 for as_dir in $PATH
7820 do
7821 IFS=$as_save_IFS
7822 test -z "$as_dir" && as_dir=.
7823 for ac_exec_ext in '' $ac_executable_extensions; do
7824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7825 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7827 break 2
7828 fi
7829 done
7830 done
7831 IFS=$as_save_IFS
7832
7833 fi
7834 fi
7835 DLLTOOL=$ac_cv_prog_DLLTOOL
7836 if test -n "$DLLTOOL"; then
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7838 $as_echo "$DLLTOOL" >&6; }
7839 else
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7841 $as_echo "no" >&6; }
7842 fi
7843
7844
7845 fi
7846 if test -z "$ac_cv_prog_DLLTOOL"; then
7847 ac_ct_DLLTOOL=$DLLTOOL
7848 # Extract the first word of "dlltool", so it can be a program name with args.
7849 set dummy dlltool; ac_word=$2
7850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7851 $as_echo_n "checking for $ac_word... " >&6; }
7852 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7853 $as_echo_n "(cached) " >&6
7854 else
7855 if test -n "$ac_ct_DLLTOOL"; then
7856 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7857 else
7858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859 for as_dir in $PATH
7860 do
7861 IFS=$as_save_IFS
7862 test -z "$as_dir" && as_dir=.
7863 for ac_exec_ext in '' $ac_executable_extensions; do
7864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7865 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7867 break 2
7868 fi
7869 done
7870 done
7871 IFS=$as_save_IFS
7872
7873 fi
7874 fi
7875 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7876 if test -n "$ac_ct_DLLTOOL"; then
7877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7878 $as_echo "$ac_ct_DLLTOOL" >&6; }
7879 else
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7881 $as_echo "no" >&6; }
7882 fi
7883
7884 if test "x$ac_ct_DLLTOOL" = x; then
7885 DLLTOOL=""
7886 else
7887 case $cross_compiling:$ac_tool_warned in
7888 yes:)
7889 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7890 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7891 ac_tool_warned=yes ;;
7892 esac
7893 DLLTOOL=$ac_ct_DLLTOOL
7894 fi
7895 else
7896 DLLTOOL="$ac_cv_prog_DLLTOOL"
7897 fi
7898
7899 if test -n "$ac_tool_prefix"; then
7900 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7901 set dummy ${ac_tool_prefix}windres; ac_word=$2
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7903 $as_echo_n "checking for $ac_word... " >&6; }
7904 if ${ac_cv_prog_WINDRES+:} false; then :
7905 $as_echo_n "(cached) " >&6
7906 else
7907 if test -n "$WINDRES"; then
7908 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7909 else
7910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7911 for as_dir in $PATH
7912 do
7913 IFS=$as_save_IFS
7914 test -z "$as_dir" && as_dir=.
7915 for ac_exec_ext in '' $ac_executable_extensions; do
7916 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7917 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7918 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7919 break 2
7920 fi
7921 done
7922 done
7923 IFS=$as_save_IFS
7924
7925 fi
7926 fi
7927 WINDRES=$ac_cv_prog_WINDRES
7928 if test -n "$WINDRES"; then
7929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7930 $as_echo "$WINDRES" >&6; }
7931 else
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7933 $as_echo "no" >&6; }
7934 fi
7935
7936
7937 fi
7938 if test -z "$ac_cv_prog_WINDRES"; then
7939 ac_ct_WINDRES=$WINDRES
7940 # Extract the first word of "windres", so it can be a program name with args.
7941 set dummy windres; ac_word=$2
7942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7943 $as_echo_n "checking for $ac_word... " >&6; }
7944 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7945 $as_echo_n "(cached) " >&6
7946 else
7947 if test -n "$ac_ct_WINDRES"; then
7948 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7949 else
7950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7951 for as_dir in $PATH
7952 do
7953 IFS=$as_save_IFS
7954 test -z "$as_dir" && as_dir=.
7955 for ac_exec_ext in '' $ac_executable_extensions; do
7956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7957 ac_cv_prog_ac_ct_WINDRES="windres"
7958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7959 break 2
7960 fi
7961 done
7962 done
7963 IFS=$as_save_IFS
7964
7965 fi
7966 fi
7967 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7968 if test -n "$ac_ct_WINDRES"; then
7969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7970 $as_echo "$ac_ct_WINDRES" >&6; }
7971 else
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7973 $as_echo "no" >&6; }
7974 fi
7975
7976 if test "x$ac_ct_WINDRES" = x; then
7977 WINDRES=""
7978 else
7979 case $cross_compiling:$ac_tool_warned in
7980 yes:)
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7982 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7983 ac_tool_warned=yes ;;
7984 esac
7985 WINDRES=$ac_ct_WINDRES
7986 fi
7987 else
7988 WINDRES="$ac_cv_prog_WINDRES"
7989 fi
7990
7991
7992 case $host_os in
7993 gnu*)
7994 # Needed for GNU Hurd hosts.
7995 if test -n "$ac_tool_prefix"; then
7996 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7997 set dummy ${ac_tool_prefix}mig; ac_word=$2
7998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999 $as_echo_n "checking for $ac_word... " >&6; }
8000 if ${ac_cv_prog_MIG+:} false; then :
8001 $as_echo_n "(cached) " >&6
8002 else
8003 if test -n "$MIG"; then
8004 ac_cv_prog_MIG="$MIG" # Let the user override the test.
8005 else
8006 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8007 for as_dir in $PATH
8008 do
8009 IFS=$as_save_IFS
8010 test -z "$as_dir" && as_dir=.
8011 for ac_exec_ext in '' $ac_executable_extensions; do
8012 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8013 ac_cv_prog_MIG="${ac_tool_prefix}mig"
8014 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8015 break 2
8016 fi
8017 done
8018 done
8019 IFS=$as_save_IFS
8020
8021 fi
8022 fi
8023 MIG=$ac_cv_prog_MIG
8024 if test -n "$MIG"; then
8025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8026 $as_echo "$MIG" >&6; }
8027 else
8028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8029 $as_echo "no" >&6; }
8030 fi
8031
8032
8033 fi
8034 if test -z "$ac_cv_prog_MIG"; then
8035 ac_ct_MIG=$MIG
8036 # Extract the first word of "mig", so it can be a program name with args.
8037 set dummy mig; ac_word=$2
8038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8039 $as_echo_n "checking for $ac_word... " >&6; }
8040 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
8041 $as_echo_n "(cached) " >&6
8042 else
8043 if test -n "$ac_ct_MIG"; then
8044 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8045 else
8046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8047 for as_dir in $PATH
8048 do
8049 IFS=$as_save_IFS
8050 test -z "$as_dir" && as_dir=.
8051 for ac_exec_ext in '' $ac_executable_extensions; do
8052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8053 ac_cv_prog_ac_ct_MIG="mig"
8054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8055 break 2
8056 fi
8057 done
8058 done
8059 IFS=$as_save_IFS
8060
8061 fi
8062 fi
8063 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8064 if test -n "$ac_ct_MIG"; then
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8066 $as_echo "$ac_ct_MIG" >&6; }
8067 else
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8069 $as_echo "no" >&6; }
8070 fi
8071
8072 if test "x$ac_ct_MIG" = x; then
8073 MIG=""
8074 else
8075 case $cross_compiling:$ac_tool_warned in
8076 yes:)
8077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8078 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8079 ac_tool_warned=yes ;;
8080 esac
8081 MIG=$ac_ct_MIG
8082 fi
8083 else
8084 MIG="$ac_cv_prog_MIG"
8085 fi
8086
8087 if test x"$MIG" = x; then
8088 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8089 fi
8090 ;;
8091 esac
8092
8093 # ---------------------- #
8094 # Checks for libraries. #
8095 # ---------------------- #
8096
8097 # We might need to link with -lm; most simulators need it.
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8099 $as_echo_n "checking for main in -lm... " >&6; }
8100 if ${ac_cv_lib_m_main+:} false; then :
8101 $as_echo_n "(cached) " >&6
8102 else
8103 ac_check_lib_save_LIBS=$LIBS
8104 LIBS="-lm $LIBS"
8105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8106 /* end confdefs.h. */
8107
8108
8109 int
8110 main ()
8111 {
8112 return main ();
8113 ;
8114 return 0;
8115 }
8116 _ACEOF
8117 if ac_fn_c_try_link "$LINENO"; then :
8118 ac_cv_lib_m_main=yes
8119 else
8120 ac_cv_lib_m_main=no
8121 fi
8122 rm -f core conftest.err conftest.$ac_objext \
8123 conftest$ac_exeext conftest.$ac_ext
8124 LIBS=$ac_check_lib_save_LIBS
8125 fi
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8127 $as_echo "$ac_cv_lib_m_main" >&6; }
8128 if test "x$ac_cv_lib_m_main" = xyes; then :
8129 cat >>confdefs.h <<_ACEOF
8130 #define HAVE_LIBM 1
8131 _ACEOF
8132
8133 LIBS="-lm $LIBS"
8134
8135 fi
8136
8137
8138 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8140 $as_echo_n "checking for library containing gethostbyname... " >&6; }
8141 if ${ac_cv_search_gethostbyname+:} false; then :
8142 $as_echo_n "(cached) " >&6
8143 else
8144 ac_func_search_save_LIBS=$LIBS
8145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8146 /* end confdefs.h. */
8147
8148 /* Override any GCC internal prototype to avoid an error.
8149 Use char because int might match the return type of a GCC
8150 builtin and then its argument prototype would still apply. */
8151 #ifdef __cplusplus
8152 extern "C"
8153 #endif
8154 char gethostbyname ();
8155 int
8156 main ()
8157 {
8158 return gethostbyname ();
8159 ;
8160 return 0;
8161 }
8162 _ACEOF
8163 for ac_lib in '' nsl; do
8164 if test -z "$ac_lib"; then
8165 ac_res="none required"
8166 else
8167 ac_res=-l$ac_lib
8168 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8169 fi
8170 if ac_fn_c_try_link "$LINENO"; then :
8171 ac_cv_search_gethostbyname=$ac_res
8172 fi
8173 rm -f core conftest.err conftest.$ac_objext \
8174 conftest$ac_exeext
8175 if ${ac_cv_search_gethostbyname+:} false; then :
8176 break
8177 fi
8178 done
8179 if ${ac_cv_search_gethostbyname+:} false; then :
8180
8181 else
8182 ac_cv_search_gethostbyname=no
8183 fi
8184 rm conftest.$ac_ext
8185 LIBS=$ac_func_search_save_LIBS
8186 fi
8187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8188 $as_echo "$ac_cv_search_gethostbyname" >&6; }
8189 ac_res=$ac_cv_search_gethostbyname
8190 if test "$ac_res" != no; then :
8191 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8192
8193 fi
8194
8195
8196 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8198 $as_echo_n "checking for library containing socketpair... " >&6; }
8199 if ${ac_cv_search_socketpair+:} false; then :
8200 $as_echo_n "(cached) " >&6
8201 else
8202 ac_func_search_save_LIBS=$LIBS
8203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8204 /* end confdefs.h. */
8205
8206 /* Override any GCC internal prototype to avoid an error.
8207 Use char because int might match the return type of a GCC
8208 builtin and then its argument prototype would still apply. */
8209 #ifdef __cplusplus
8210 extern "C"
8211 #endif
8212 char socketpair ();
8213 int
8214 main ()
8215 {
8216 return socketpair ();
8217 ;
8218 return 0;
8219 }
8220 _ACEOF
8221 for ac_lib in '' socket; do
8222 if test -z "$ac_lib"; then
8223 ac_res="none required"
8224 else
8225 ac_res=-l$ac_lib
8226 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8227 fi
8228 if ac_fn_c_try_link "$LINENO"; then :
8229 ac_cv_search_socketpair=$ac_res
8230 fi
8231 rm -f core conftest.err conftest.$ac_objext \
8232 conftest$ac_exeext
8233 if ${ac_cv_search_socketpair+:} false; then :
8234 break
8235 fi
8236 done
8237 if ${ac_cv_search_socketpair+:} false; then :
8238
8239 else
8240 ac_cv_search_socketpair=no
8241 fi
8242 rm conftest.$ac_ext
8243 LIBS=$ac_func_search_save_LIBS
8244 fi
8245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8246 $as_echo "$ac_cv_search_socketpair" >&6; }
8247 ac_res=$ac_cv_search_socketpair
8248 if test "$ac_res" != no; then :
8249 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8250
8251 fi
8252
8253
8254 # Link in zlib if we can. This allows us to read compressed debug sections.
8255
8256 # Use the system's zlib library.
8257 zlibdir="-L\$(top_builddir)/../zlib"
8258 zlibinc="-I\$(top_srcdir)/../zlib"
8259
8260 # Check whether --with-system-zlib was given.
8261 if test "${with_system_zlib+set}" = set; then :
8262 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8263 zlibdir=
8264 zlibinc=
8265 fi
8266
8267 fi
8268
8269
8270
8271
8272
8273
8274 if test "X$prefix" = "XNONE"; then
8275 acl_final_prefix="$ac_default_prefix"
8276 else
8277 acl_final_prefix="$prefix"
8278 fi
8279 if test "X$exec_prefix" = "XNONE"; then
8280 acl_final_exec_prefix='${prefix}'
8281 else
8282 acl_final_exec_prefix="$exec_prefix"
8283 fi
8284 acl_save_prefix="$prefix"
8285 prefix="$acl_final_prefix"
8286 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8287 prefix="$acl_save_prefix"
8288
8289
8290 # Check whether --with-gnu-ld was given.
8291 if test "${with_gnu_ld+set}" = set; then :
8292 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8293 else
8294 with_gnu_ld=no
8295 fi
8296
8297 # Prepare PATH_SEPARATOR.
8298 # The user is always right.
8299 if test "${PATH_SEPARATOR+set}" != set; then
8300 echo "#! /bin/sh" >conf$$.sh
8301 echo "exit 0" >>conf$$.sh
8302 chmod +x conf$$.sh
8303 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8304 PATH_SEPARATOR=';'
8305 else
8306 PATH_SEPARATOR=:
8307 fi
8308 rm -f conf$$.sh
8309 fi
8310 ac_prog=ld
8311 if test "$GCC" = yes; then
8312 # Check if gcc -print-prog-name=ld gives a path.
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8314 $as_echo_n "checking for ld used by GCC... " >&6; }
8315 case $host in
8316 *-*-mingw*)
8317 # gcc leaves a trailing carriage return which upsets mingw
8318 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8319 *)
8320 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8321 esac
8322 case $ac_prog in
8323 # Accept absolute paths.
8324 [\\/]* | [A-Za-z]:[\\/]*)
8325 re_direlt='/[^/][^/]*/\.\./'
8326 # Canonicalize the path of ld
8327 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8328 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8329 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8330 done
8331 test -z "$LD" && LD="$ac_prog"
8332 ;;
8333 "")
8334 # If it fails, then pretend we aren't using GCC.
8335 ac_prog=ld
8336 ;;
8337 *)
8338 # If it is relative, then search for the first ld in PATH.
8339 with_gnu_ld=unknown
8340 ;;
8341 esac
8342 elif test "$with_gnu_ld" = yes; then
8343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8344 $as_echo_n "checking for GNU ld... " >&6; }
8345 else
8346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8347 $as_echo_n "checking for non-GNU ld... " >&6; }
8348 fi
8349 if ${acl_cv_path_LD+:} false; then :
8350 $as_echo_n "(cached) " >&6
8351 else
8352 if test -z "$LD"; then
8353 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8354 for ac_dir in $PATH; do
8355 test -z "$ac_dir" && ac_dir=.
8356 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8357 acl_cv_path_LD="$ac_dir/$ac_prog"
8358 # Check to see if the program is GNU ld. I'd rather use --version,
8359 # but apparently some GNU ld's only accept -v.
8360 # Break only if it was the GNU/non-GNU ld that we prefer.
8361 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8362 test "$with_gnu_ld" != no && break
8363 else
8364 test "$with_gnu_ld" != yes && break
8365 fi
8366 fi
8367 done
8368 IFS="$ac_save_ifs"
8369 else
8370 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8371 fi
8372 fi
8373
8374 LD="$acl_cv_path_LD"
8375 if test -n "$LD"; then
8376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8377 $as_echo "$LD" >&6; }
8378 else
8379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380 $as_echo "no" >&6; }
8381 fi
8382 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8384 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8385 if ${acl_cv_prog_gnu_ld+:} false; then :
8386 $as_echo_n "(cached) " >&6
8387 else
8388 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8389 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8390 acl_cv_prog_gnu_ld=yes
8391 else
8392 acl_cv_prog_gnu_ld=no
8393 fi
8394 fi
8395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8396 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8397 with_gnu_ld=$acl_cv_prog_gnu_ld
8398
8399
8400
8401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8402 $as_echo_n "checking for shared library run path origin... " >&6; }
8403 if ${acl_cv_rpath+:} false; then :
8404 $as_echo_n "(cached) " >&6
8405 else
8406
8407 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8408 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8409 . ./conftest.sh
8410 rm -f ./conftest.sh
8411 acl_cv_rpath=done
8412
8413 fi
8414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8415 $as_echo "$acl_cv_rpath" >&6; }
8416 wl="$acl_cv_wl"
8417 libext="$acl_cv_libext"
8418 shlibext="$acl_cv_shlibext"
8419 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8420 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8421 hardcode_direct="$acl_cv_hardcode_direct"
8422 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8423 # Check whether --enable-rpath was given.
8424 if test "${enable_rpath+set}" = set; then :
8425 enableval=$enable_rpath; :
8426 else
8427 enable_rpath=yes
8428 fi
8429
8430
8431
8432
8433
8434
8435
8436
8437 use_additional=yes
8438
8439 acl_save_prefix="$prefix"
8440 prefix="$acl_final_prefix"
8441 acl_save_exec_prefix="$exec_prefix"
8442 exec_prefix="$acl_final_exec_prefix"
8443
8444 eval additional_includedir=\"$includedir\"
8445 eval additional_libdir=\"$libdir\"
8446
8447 exec_prefix="$acl_save_exec_prefix"
8448 prefix="$acl_save_prefix"
8449
8450
8451 # Check whether --with-libiconv-prefix was given.
8452 if test "${with_libiconv_prefix+set}" = set; then :
8453 withval=$with_libiconv_prefix;
8454 if test "X$withval" = "Xno"; then
8455 use_additional=no
8456 else
8457 if test "X$withval" = "X"; then
8458
8459 acl_save_prefix="$prefix"
8460 prefix="$acl_final_prefix"
8461 acl_save_exec_prefix="$exec_prefix"
8462 exec_prefix="$acl_final_exec_prefix"
8463
8464 eval additional_includedir=\"$includedir\"
8465 eval additional_libdir=\"$libdir\"
8466
8467 exec_prefix="$acl_save_exec_prefix"
8468 prefix="$acl_save_prefix"
8469
8470 else
8471 additional_includedir="$withval/include"
8472 additional_libdir="$withval/lib"
8473 fi
8474 fi
8475
8476 fi
8477
8478
8479 # Check whether --with-libiconv-type was given.
8480 if test "${with_libiconv_type+set}" = set; then :
8481 withval=$with_libiconv_type; with_libiconv_type=$withval
8482 else
8483 with_libiconv_type=auto
8484 fi
8485
8486 lib_type=`eval echo \$with_libiconv_type`
8487
8488 LIBICONV=
8489 LTLIBICONV=
8490 INCICONV=
8491 rpathdirs=
8492 ltrpathdirs=
8493 names_already_handled=
8494 names_next_round='iconv '
8495 while test -n "$names_next_round"; do
8496 names_this_round="$names_next_round"
8497 names_next_round=
8498 for name in $names_this_round; do
8499 already_handled=
8500 for n in $names_already_handled; do
8501 if test "$n" = "$name"; then
8502 already_handled=yes
8503 break
8504 fi
8505 done
8506 if test -z "$already_handled"; then
8507 names_already_handled="$names_already_handled $name"
8508 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8509 eval value=\"\$HAVE_LIB$uppername\"
8510 if test -n "$value"; then
8511 if test "$value" = yes; then
8512 eval value=\"\$LIB$uppername\"
8513 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8514 eval value=\"\$LTLIB$uppername\"
8515 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8516 else
8517 :
8518 fi
8519 else
8520 found_dir=
8521 found_la=
8522 found_so=
8523 found_a=
8524 if test $use_additional = yes; then
8525 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8526 found_dir="$additional_libdir"
8527 found_so="$additional_libdir/lib$name.$shlibext"
8528 if test -f "$additional_libdir/lib$name.la"; then
8529 found_la="$additional_libdir/lib$name.la"
8530 fi
8531 elif test x$lib_type != xshared; then
8532 if test -f "$additional_libdir/lib$name.$libext"; then
8533 found_dir="$additional_libdir"
8534 found_a="$additional_libdir/lib$name.$libext"
8535 if test -f "$additional_libdir/lib$name.la"; then
8536 found_la="$additional_libdir/lib$name.la"
8537 fi
8538 fi
8539 fi
8540 fi
8541 if test "X$found_dir" = "X"; then
8542 for x in $LDFLAGS $LTLIBICONV; do
8543
8544 acl_save_prefix="$prefix"
8545 prefix="$acl_final_prefix"
8546 acl_save_exec_prefix="$exec_prefix"
8547 exec_prefix="$acl_final_exec_prefix"
8548 eval x=\"$x\"
8549 exec_prefix="$acl_save_exec_prefix"
8550 prefix="$acl_save_prefix"
8551
8552 case "$x" in
8553 -L*)
8554 dir=`echo "X$x" | sed -e 's/^X-L//'`
8555 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8556 found_dir="$dir"
8557 found_so="$dir/lib$name.$shlibext"
8558 if test -f "$dir/lib$name.la"; then
8559 found_la="$dir/lib$name.la"
8560 fi
8561 elif test x$lib_type != xshared; then
8562 if test -f "$dir/lib$name.$libext"; then
8563 found_dir="$dir"
8564 found_a="$dir/lib$name.$libext"
8565 if test -f "$dir/lib$name.la"; then
8566 found_la="$dir/lib$name.la"
8567 fi
8568 fi
8569 fi
8570 ;;
8571 esac
8572 if test "X$found_dir" != "X"; then
8573 break
8574 fi
8575 done
8576 fi
8577 if test "X$found_dir" != "X"; then
8578 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8579 if test "X$found_so" != "X"; then
8580 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8581 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8582 else
8583 haveit=
8584 for x in $ltrpathdirs; do
8585 if test "X$x" = "X$found_dir"; then
8586 haveit=yes
8587 break
8588 fi
8589 done
8590 if test -z "$haveit"; then
8591 ltrpathdirs="$ltrpathdirs $found_dir"
8592 fi
8593 if test "$hardcode_direct" = yes; then
8594 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8595 else
8596 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8597 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8598 haveit=
8599 for x in $rpathdirs; do
8600 if test "X$x" = "X$found_dir"; then
8601 haveit=yes
8602 break
8603 fi
8604 done
8605 if test -z "$haveit"; then
8606 rpathdirs="$rpathdirs $found_dir"
8607 fi
8608 else
8609 haveit=
8610 for x in $LDFLAGS $LIBICONV; do
8611
8612 acl_save_prefix="$prefix"
8613 prefix="$acl_final_prefix"
8614 acl_save_exec_prefix="$exec_prefix"
8615 exec_prefix="$acl_final_exec_prefix"
8616 eval x=\"$x\"
8617 exec_prefix="$acl_save_exec_prefix"
8618 prefix="$acl_save_prefix"
8619
8620 if test "X$x" = "X-L$found_dir"; then
8621 haveit=yes
8622 break
8623 fi
8624 done
8625 if test -z "$haveit"; then
8626 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8627 fi
8628 if test "$hardcode_minus_L" != no; then
8629 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8630 else
8631 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8632 fi
8633 fi
8634 fi
8635 fi
8636 else
8637 if test "X$found_a" != "X"; then
8638 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8639 else
8640 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8641 fi
8642 fi
8643 additional_includedir=
8644 case "$found_dir" in
8645 */lib | */lib/)
8646 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8647 additional_includedir="$basedir/include"
8648 ;;
8649 esac
8650 if test "X$additional_includedir" != "X"; then
8651 if test "X$additional_includedir" != "X/usr/include"; then
8652 haveit=
8653 if test "X$additional_includedir" = "X/usr/local/include"; then
8654 if test -n "$GCC"; then
8655 case $host_os in
8656 linux*) haveit=yes;;
8657 esac
8658 fi
8659 fi
8660 if test -z "$haveit"; then
8661 for x in $CPPFLAGS $INCICONV; do
8662
8663 acl_save_prefix="$prefix"
8664 prefix="$acl_final_prefix"
8665 acl_save_exec_prefix="$exec_prefix"
8666 exec_prefix="$acl_final_exec_prefix"
8667 eval x=\"$x\"
8668 exec_prefix="$acl_save_exec_prefix"
8669 prefix="$acl_save_prefix"
8670
8671 if test "X$x" = "X-I$additional_includedir"; then
8672 haveit=yes
8673 break
8674 fi
8675 done
8676 if test -z "$haveit"; then
8677 if test -d "$additional_includedir"; then
8678 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8679 fi
8680 fi
8681 fi
8682 fi
8683 fi
8684 if test -n "$found_la"; then
8685 save_libdir="$libdir"
8686 case "$found_la" in
8687 */* | *\\*) . "$found_la" ;;
8688 *) . "./$found_la" ;;
8689 esac
8690 libdir="$save_libdir"
8691 for dep in $dependency_libs; do
8692 case "$dep" in
8693 -L*)
8694 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8695 if test "X$additional_libdir" != "X/usr/lib"; then
8696 haveit=
8697 if test "X$additional_libdir" = "X/usr/local/lib"; then
8698 if test -n "$GCC"; then
8699 case $host_os in
8700 linux*) haveit=yes;;
8701 esac
8702 fi
8703 fi
8704 if test -z "$haveit"; then
8705 haveit=
8706 for x in $LDFLAGS $LIBICONV; do
8707
8708 acl_save_prefix="$prefix"
8709 prefix="$acl_final_prefix"
8710 acl_save_exec_prefix="$exec_prefix"
8711 exec_prefix="$acl_final_exec_prefix"
8712 eval x=\"$x\"
8713 exec_prefix="$acl_save_exec_prefix"
8714 prefix="$acl_save_prefix"
8715
8716 if test "X$x" = "X-L$additional_libdir"; then
8717 haveit=yes
8718 break
8719 fi
8720 done
8721 if test -z "$haveit"; then
8722 if test -d "$additional_libdir"; then
8723 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8724 fi
8725 fi
8726 haveit=
8727 for x in $LDFLAGS $LTLIBICONV; do
8728
8729 acl_save_prefix="$prefix"
8730 prefix="$acl_final_prefix"
8731 acl_save_exec_prefix="$exec_prefix"
8732 exec_prefix="$acl_final_exec_prefix"
8733 eval x=\"$x\"
8734 exec_prefix="$acl_save_exec_prefix"
8735 prefix="$acl_save_prefix"
8736
8737 if test "X$x" = "X-L$additional_libdir"; then
8738 haveit=yes
8739 break
8740 fi
8741 done
8742 if test -z "$haveit"; then
8743 if test -d "$additional_libdir"; then
8744 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8745 fi
8746 fi
8747 fi
8748 fi
8749 ;;
8750 -R*)
8751 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8752 if test "$enable_rpath" != no; then
8753 haveit=
8754 for x in $rpathdirs; do
8755 if test "X$x" = "X$dir"; then
8756 haveit=yes
8757 break
8758 fi
8759 done
8760 if test -z "$haveit"; then
8761 rpathdirs="$rpathdirs $dir"
8762 fi
8763 haveit=
8764 for x in $ltrpathdirs; do
8765 if test "X$x" = "X$dir"; then
8766 haveit=yes
8767 break
8768 fi
8769 done
8770 if test -z "$haveit"; then
8771 ltrpathdirs="$ltrpathdirs $dir"
8772 fi
8773 fi
8774 ;;
8775 -l*)
8776 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8777 ;;
8778 *.la)
8779 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8780 ;;
8781 *)
8782 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8783 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8784 ;;
8785 esac
8786 done
8787 fi
8788 else
8789 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8790 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8791 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8792 else
8793 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8794 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8795 fi
8796 fi
8797 fi
8798 fi
8799 done
8800 done
8801 if test "X$rpathdirs" != "X"; then
8802 if test -n "$hardcode_libdir_separator"; then
8803 alldirs=
8804 for found_dir in $rpathdirs; do
8805 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8806 done
8807 acl_save_libdir="$libdir"
8808 libdir="$alldirs"
8809 eval flag=\"$hardcode_libdir_flag_spec\"
8810 libdir="$acl_save_libdir"
8811 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8812 else
8813 for found_dir in $rpathdirs; do
8814 acl_save_libdir="$libdir"
8815 libdir="$found_dir"
8816 eval flag=\"$hardcode_libdir_flag_spec\"
8817 libdir="$acl_save_libdir"
8818 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8819 done
8820 fi
8821 fi
8822 if test "X$ltrpathdirs" != "X"; then
8823 for found_dir in $ltrpathdirs; do
8824 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8825 done
8826 fi
8827
8828
8829
8830
8831
8832
8833
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8835 $as_echo_n "checking for iconv... " >&6; }
8836 if ${am_cv_func_iconv+:} false; then :
8837 $as_echo_n "(cached) " >&6
8838 else
8839
8840 am_cv_func_iconv="no, consider installing GNU libiconv"
8841 am_cv_lib_iconv=no
8842 am_save_CPPFLAGS="$CPPFLAGS"
8843 CPPFLAGS="$CPPFLAGS $INCICONV"
8844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8845 /* end confdefs.h. */
8846 #include <stdlib.h>
8847 #include <iconv.h>
8848 int
8849 main ()
8850 {
8851 iconv_t cd = iconv_open("","");
8852 iconv(cd,NULL,NULL,NULL,NULL);
8853 iconv_close(cd);
8854 ;
8855 return 0;
8856 }
8857 _ACEOF
8858 if ac_fn_c_try_link "$LINENO"; then :
8859 am_cv_func_iconv=yes
8860 fi
8861 rm -f core conftest.err conftest.$ac_objext \
8862 conftest$ac_exeext conftest.$ac_ext
8863 CPPFLAGS="$am_save_CPPFLAGS"
8864
8865 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8866 for _libs in .libs _libs; do
8867 am_save_CPPFLAGS="$CPPFLAGS"
8868 am_save_LIBS="$LIBS"
8869 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8870 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8872 /* end confdefs.h. */
8873 #include <stdlib.h>
8874 #include <iconv.h>
8875 int
8876 main ()
8877 {
8878 iconv_t cd = iconv_open("","");
8879 iconv(cd,NULL,NULL,NULL,NULL);
8880 iconv_close(cd);
8881 ;
8882 return 0;
8883 }
8884 _ACEOF
8885 if ac_fn_c_try_link "$LINENO"; then :
8886 INCICONV="-I../libiconv/include"
8887 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8888 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8889 am_cv_lib_iconv=yes
8890 am_cv_func_iconv=yes
8891 fi
8892 rm -f core conftest.err conftest.$ac_objext \
8893 conftest$ac_exeext conftest.$ac_ext
8894 CPPFLAGS="$am_save_CPPFLAGS"
8895 LIBS="$am_save_LIBS"
8896 if test "$am_cv_func_iconv" = "yes"; then
8897 break
8898 fi
8899 done
8900 fi
8901
8902 if test "$am_cv_func_iconv" != yes; then
8903 am_save_CPPFLAGS="$CPPFLAGS"
8904 am_save_LIBS="$LIBS"
8905 CPPFLAGS="$CPPFLAGS $INCICONV"
8906 LIBS="$LIBS $LIBICONV"
8907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8908 /* end confdefs.h. */
8909 #include <stdlib.h>
8910 #include <iconv.h>
8911 int
8912 main ()
8913 {
8914 iconv_t cd = iconv_open("","");
8915 iconv(cd,NULL,NULL,NULL,NULL);
8916 iconv_close(cd);
8917 ;
8918 return 0;
8919 }
8920 _ACEOF
8921 if ac_fn_c_try_link "$LINENO"; then :
8922 am_cv_lib_iconv=yes
8923 am_cv_func_iconv=yes
8924 fi
8925 rm -f core conftest.err conftest.$ac_objext \
8926 conftest$ac_exeext conftest.$ac_ext
8927 CPPFLAGS="$am_save_CPPFLAGS"
8928 LIBS="$am_save_LIBS"
8929 fi
8930
8931 fi
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8933 $as_echo "$am_cv_func_iconv" >&6; }
8934 if test "$am_cv_func_iconv" = yes; then
8935
8936 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8937
8938 fi
8939 if test "$am_cv_lib_iconv" = yes; then
8940
8941 for element in $INCICONV; do
8942 haveit=
8943 for x in $CPPFLAGS; do
8944
8945 acl_save_prefix="$prefix"
8946 prefix="$acl_final_prefix"
8947 acl_save_exec_prefix="$exec_prefix"
8948 exec_prefix="$acl_final_exec_prefix"
8949 eval x=\"$x\"
8950 exec_prefix="$acl_save_exec_prefix"
8951 prefix="$acl_save_prefix"
8952
8953 if test "X$x" = "X$element"; then
8954 haveit=yes
8955 break
8956 fi
8957 done
8958 if test -z "$haveit"; then
8959 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8960 fi
8961 done
8962
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8964 $as_echo_n "checking how to link with libiconv... " >&6; }
8965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8966 $as_echo "$LIBICONV" >&6; }
8967 else
8968 LIBICONV=
8969 LTLIBICONV=
8970 fi
8971
8972
8973
8974 if test "$am_cv_func_iconv" = yes; then
8975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8976 $as_echo_n "checking for iconv declaration... " >&6; }
8977 if ${am_cv_proto_iconv+:} false; then :
8978 $as_echo_n "(cached) " >&6
8979 else
8980
8981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8982 /* end confdefs.h. */
8983
8984 #include <stdlib.h>
8985 #include <iconv.h>
8986 extern
8987 #ifdef __cplusplus
8988 "C"
8989 #endif
8990 #if defined(__STDC__) || defined(__cplusplus)
8991 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8992 #else
8993 size_t iconv();
8994 #endif
8995
8996 int
8997 main ()
8998 {
8999
9000 ;
9001 return 0;
9002 }
9003 _ACEOF
9004 if ac_fn_c_try_compile "$LINENO"; then :
9005 am_cv_proto_iconv_arg1=""
9006 else
9007 am_cv_proto_iconv_arg1="const"
9008 fi
9009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9010 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);"
9011 fi
9012
9013 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
9015 }$am_cv_proto_iconv" >&5
9016 $as_echo "${ac_t:-
9017 }$am_cv_proto_iconv" >&6; }
9018
9019 cat >>confdefs.h <<_ACEOF
9020 #define ICONV_CONST $am_cv_proto_iconv_arg1
9021 _ACEOF
9022
9023 fi
9024
9025
9026 # GDB may fork/exec the iconv program to get the list of supported character
9027 # sets. Allow the user to specify where to find it.
9028 # There are several factors affecting the choice of option name:
9029 # - There is already --with-libiconv-prefix but we can't use it, it specifies
9030 # the build-time location of libiconv files.
9031 # - The program we need to find is iconv, which comes with glibc. The user
9032 # doesn't necessarily have libiconv installed. Therefore naming this
9033 # --with-libiconv-foo feels wrong.
9034 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9035 # defined to work on directories not files (though it really doesn't know
9036 # the difference).
9037 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
9038 # with --with-libiconv-prefix.
9039 # Putting these together is why the option name is --with-iconv-bin.
9040
9041
9042 # Check whether --with-iconv-bin was given.
9043 if test "${with_iconv_bin+set}" = set; then :
9044 withval=$with_iconv_bin; iconv_bin="${withval}"
9045
9046 cat >>confdefs.h <<_ACEOF
9047 #define ICONV_BIN "${iconv_bin}"
9048 _ACEOF
9049
9050
9051 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9052 if test "x$prefix" = xNONE; then
9053 test_prefix=/usr/local
9054 else
9055 test_prefix=$prefix
9056 fi
9057 else
9058 test_prefix=$exec_prefix
9059 fi
9060 value=0
9061 case ${iconv_bin} in
9062 "${test_prefix}"|"${test_prefix}/"*|\
9063 '${exec_prefix}'|'${exec_prefix}/'*)
9064 value=1
9065 ;;
9066 esac
9067
9068 cat >>confdefs.h <<_ACEOF
9069 #define ICONV_BIN_RELOCATABLE $value
9070 _ACEOF
9071
9072
9073
9074 fi
9075
9076
9077 # For the TUI, we need enhanced curses functionality.
9078 if test x"$enable_tui" != xno; then
9079 prefer_curses=yes
9080 fi
9081
9082 curses_found=no
9083 if test x"$prefer_curses" = xyes; then
9084 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9085 # curses library because the latter might not provide all the
9086 # functionality we need. However, this leads to problems on systems
9087 # where the linker searches /usr/local/lib, but the compiler doesn't
9088 # search /usr/local/include, if ncurses is installed in /usr/local. A
9089 # default installation of ncurses on alpha*-dec-osf* will lead to such
9090 # a situation.
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9092 $as_echo_n "checking for library containing waddstr... " >&6; }
9093 if ${ac_cv_search_waddstr+:} false; then :
9094 $as_echo_n "(cached) " >&6
9095 else
9096 ac_func_search_save_LIBS=$LIBS
9097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9098 /* end confdefs.h. */
9099
9100 /* Override any GCC internal prototype to avoid an error.
9101 Use char because int might match the return type of a GCC
9102 builtin and then its argument prototype would still apply. */
9103 #ifdef __cplusplus
9104 extern "C"
9105 #endif
9106 char waddstr ();
9107 int
9108 main ()
9109 {
9110 return waddstr ();
9111 ;
9112 return 0;
9113 }
9114 _ACEOF
9115 for ac_lib in '' ncursesw ncurses cursesX curses; do
9116 if test -z "$ac_lib"; then
9117 ac_res="none required"
9118 else
9119 ac_res=-l$ac_lib
9120 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9121 fi
9122 if ac_fn_c_try_link "$LINENO"; then :
9123 ac_cv_search_waddstr=$ac_res
9124 fi
9125 rm -f core conftest.err conftest.$ac_objext \
9126 conftest$ac_exeext
9127 if ${ac_cv_search_waddstr+:} false; then :
9128 break
9129 fi
9130 done
9131 if ${ac_cv_search_waddstr+:} false; then :
9132
9133 else
9134 ac_cv_search_waddstr=no
9135 fi
9136 rm conftest.$ac_ext
9137 LIBS=$ac_func_search_save_LIBS
9138 fi
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9140 $as_echo "$ac_cv_search_waddstr" >&6; }
9141 ac_res=$ac_cv_search_waddstr
9142 if test "$ac_res" != no; then :
9143 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9144
9145 fi
9146
9147
9148 if test "$ac_cv_search_waddstr" != no; then
9149 curses_found=yes
9150 fi
9151 fi
9152
9153 # Check whether we should enable the TUI, but only do so if we really
9154 # can.
9155 if test x"$enable_tui" != xno; then
9156 if test -d "$srcdir/tui"; then
9157 if test "$curses_found" != no; then
9158 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9159 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9160 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9161 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9162 else
9163 if test x"$enable_tui" = xyes; then
9164 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9165 else
9166 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9167 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9168 fi
9169 fi
9170 fi
9171 fi
9172
9173 # Since GDB uses Readline, we need termcap functionality. In many
9174 # cases this will be provided by the curses library, but some systems
9175 # have a separate termcap library, or no curses library at all.
9176
9177 case $host_os in
9178 cygwin*)
9179 if test -d "$srcdir/libtermcap"; then
9180 LIBS="../libtermcap/libtermcap.a $LIBS"
9181 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9182 fi ;;
9183 go32* | *djgpp*)
9184 ac_cv_search_tgetent="none required"
9185 ;;
9186 esac
9187
9188 # These are the libraries checked by Readline.
9189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9190 $as_echo_n "checking for library containing tgetent... " >&6; }
9191 if ${ac_cv_search_tgetent+:} false; then :
9192 $as_echo_n "(cached) " >&6
9193 else
9194 ac_func_search_save_LIBS=$LIBS
9195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9196 /* end confdefs.h. */
9197
9198 /* Override any GCC internal prototype to avoid an error.
9199 Use char because int might match the return type of a GCC
9200 builtin and then its argument prototype would still apply. */
9201 #ifdef __cplusplus
9202 extern "C"
9203 #endif
9204 char tgetent ();
9205 int
9206 main ()
9207 {
9208 return tgetent ();
9209 ;
9210 return 0;
9211 }
9212 _ACEOF
9213 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9214 if test -z "$ac_lib"; then
9215 ac_res="none required"
9216 else
9217 ac_res=-l$ac_lib
9218 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9219 fi
9220 if ac_fn_c_try_link "$LINENO"; then :
9221 ac_cv_search_tgetent=$ac_res
9222 fi
9223 rm -f core conftest.err conftest.$ac_objext \
9224 conftest$ac_exeext
9225 if ${ac_cv_search_tgetent+:} false; then :
9226 break
9227 fi
9228 done
9229 if ${ac_cv_search_tgetent+:} false; then :
9230
9231 else
9232 ac_cv_search_tgetent=no
9233 fi
9234 rm conftest.$ac_ext
9235 LIBS=$ac_func_search_save_LIBS
9236 fi
9237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9238 $as_echo "$ac_cv_search_tgetent" >&6; }
9239 ac_res=$ac_cv_search_tgetent
9240 if test "$ac_res" != no; then :
9241 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9242
9243 fi
9244
9245
9246 if test "$ac_cv_search_tgetent" = no; then
9247 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9248 fi
9249
9250
9251 # Check whether --with-system-readline was given.
9252 if test "${with_system_readline+set}" = set; then :
9253 withval=$with_system_readline;
9254 fi
9255
9256
9257 if test "$with_system_readline" = yes; then
9258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9259 $as_echo_n "checking whether system readline is new enough... " >&6; }
9260 if ${gdb_cv_readline_ok+:} false; then :
9261 $as_echo_n "(cached) " >&6
9262 else
9263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9264 /* end confdefs.h. */
9265 #include <stdio.h>
9266 #include <readline/readline.h>
9267 int
9268 main ()
9269 {
9270 #if RL_VERSION_MAJOR < 7
9271 # error "readline version 7 required"
9272 #endif
9273 ;
9274 return 0;
9275 }
9276 _ACEOF
9277 if ac_fn_c_try_compile "$LINENO"; then :
9278 gdb_cv_readline_ok=yes
9279 else
9280 gdb_cv_readline_ok=no
9281 fi
9282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9283 fi
9284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9285 $as_echo "$gdb_cv_readline_ok" >&6; }
9286 if test "$gdb_cv_readline_ok" != yes; then
9287 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9288 fi
9289
9290 READLINE=-lreadline
9291 READLINE_DEPS=
9292 READLINE_CFLAGS=
9293 READLINE_TEXI_INCFLAG=
9294 else
9295 READLINE='$(READLINE_DIR)/libreadline.a'
9296 READLINE_DEPS='$(READLINE)'
9297 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9298 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9299 fi
9300
9301
9302
9303
9304
9305 # Generate jit-reader.h
9306
9307 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9308 TARGET_PTR=
9309
9310 # The cast to long int works around a bug in the HP C Compiler
9311 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9312 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9313 # This bug is HP SR number 8606223364.
9314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9315 $as_echo_n "checking size of unsigned long long... " >&6; }
9316 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9317 $as_echo_n "(cached) " >&6
9318 else
9319 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9320
9321 else
9322 if test "$ac_cv_type_unsigned_long_long" = yes; then
9323 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9324 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9325 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9326 See \`config.log' for more details" "$LINENO" 5; }
9327 else
9328 ac_cv_sizeof_unsigned_long_long=0
9329 fi
9330 fi
9331
9332 fi
9333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9334 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9335
9336
9337
9338 cat >>confdefs.h <<_ACEOF
9339 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9340 _ACEOF
9341
9342
9343 # The cast to long int works around a bug in the HP C Compiler
9344 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9345 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9346 # This bug is HP SR number 8606223364.
9347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9348 $as_echo_n "checking size of unsigned long... " >&6; }
9349 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9350 $as_echo_n "(cached) " >&6
9351 else
9352 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9353
9354 else
9355 if test "$ac_cv_type_unsigned_long" = yes; then
9356 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9357 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9358 as_fn_error 77 "cannot compute sizeof (unsigned long)
9359 See \`config.log' for more details" "$LINENO" 5; }
9360 else
9361 ac_cv_sizeof_unsigned_long=0
9362 fi
9363 fi
9364
9365 fi
9366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9367 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9368
9369
9370
9371 cat >>confdefs.h <<_ACEOF
9372 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9373 _ACEOF
9374
9375
9376 # The cast to long int works around a bug in the HP C Compiler
9377 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9378 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9379 # This bug is HP SR number 8606223364.
9380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9381 $as_echo_n "checking size of unsigned __int128... " >&6; }
9382 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9383 $as_echo_n "(cached) " >&6
9384 else
9385 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9386
9387 else
9388 if test "$ac_cv_type_unsigned___int128" = yes; then
9389 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9390 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9391 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9392 See \`config.log' for more details" "$LINENO" 5; }
9393 else
9394 ac_cv_sizeof_unsigned___int128=0
9395 fi
9396 fi
9397
9398 fi
9399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9400 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9401
9402
9403
9404 cat >>confdefs.h <<_ACEOF
9405 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9406 _ACEOF
9407
9408
9409
9410 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9411 TARGET_PTR="unsigned long"
9412 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9413 TARGET_PTR="unsigned long long"
9414 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9415 TARGET_PTR="unsigned __int128"
9416 else
9417 TARGET_PTR="unsigned long"
9418 fi
9419
9420
9421 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9422
9423
9424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9425 $as_echo_n "checking for library containing dlopen... " >&6; }
9426 if ${ac_cv_search_dlopen+:} false; then :
9427 $as_echo_n "(cached) " >&6
9428 else
9429 ac_func_search_save_LIBS=$LIBS
9430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9431 /* end confdefs.h. */
9432
9433 /* Override any GCC internal prototype to avoid an error.
9434 Use char because int might match the return type of a GCC
9435 builtin and then its argument prototype would still apply. */
9436 #ifdef __cplusplus
9437 extern "C"
9438 #endif
9439 char dlopen ();
9440 int
9441 main ()
9442 {
9443 return dlopen ();
9444 ;
9445 return 0;
9446 }
9447 _ACEOF
9448 for ac_lib in '' dl; do
9449 if test -z "$ac_lib"; then
9450 ac_res="none required"
9451 else
9452 ac_res=-l$ac_lib
9453 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9454 fi
9455 if ac_fn_c_try_link "$LINENO"; then :
9456 ac_cv_search_dlopen=$ac_res
9457 fi
9458 rm -f core conftest.err conftest.$ac_objext \
9459 conftest$ac_exeext
9460 if ${ac_cv_search_dlopen+:} false; then :
9461 break
9462 fi
9463 done
9464 if ${ac_cv_search_dlopen+:} false; then :
9465
9466 else
9467 ac_cv_search_dlopen=no
9468 fi
9469 rm conftest.$ac_ext
9470 LIBS=$ac_func_search_save_LIBS
9471 fi
9472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9473 $as_echo "$ac_cv_search_dlopen" >&6; }
9474 ac_res=$ac_cv_search_dlopen
9475 if test "$ac_res" != no; then :
9476 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9477
9478 fi
9479
9480
9481
9482
9483 # Check whether --with-jit-reader-dir was given.
9484 if test "${with_jit_reader_dir+set}" = set; then :
9485 withval=$with_jit_reader_dir;
9486 JIT_READER_DIR=$withval
9487 else
9488 JIT_READER_DIR=${libdir}/gdb
9489 fi
9490
9491
9492 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9493 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9494 ac_define_dir=`eval echo $JIT_READER_DIR`
9495 ac_define_dir=`eval echo $ac_define_dir`
9496
9497 cat >>confdefs.h <<_ACEOF
9498 #define JIT_READER_DIR "$ac_define_dir"
9499 _ACEOF
9500
9501
9502
9503
9504 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9505 if test "x$prefix" = xNONE; then
9506 test_prefix=/usr/local
9507 else
9508 test_prefix=$prefix
9509 fi
9510 else
9511 test_prefix=$exec_prefix
9512 fi
9513 value=0
9514 case ${ac_define_dir} in
9515 "${test_prefix}"|"${test_prefix}/"*|\
9516 '${exec_prefix}'|'${exec_prefix}/'*)
9517 value=1
9518 ;;
9519 esac
9520
9521 cat >>confdefs.h <<_ACEOF
9522 #define JIT_READER_DIR_RELOCATABLE $value
9523 _ACEOF
9524
9525
9526
9527
9528
9529 # Check whether --with-expat was given.
9530 if test "${with_expat+set}" = set; then :
9531 withval=$with_expat;
9532 else
9533 with_expat=auto
9534 fi
9535
9536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9537 $as_echo_n "checking whether to use expat... " >&6; }
9538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9539 $as_echo "$with_expat" >&6; }
9540
9541 if test "${with_expat}" = no; then
9542 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9543 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9544 HAVE_LIBEXPAT=no
9545 else
9546
9547
9548
9549
9550
9551
9552
9553
9554 use_additional=yes
9555
9556 acl_save_prefix="$prefix"
9557 prefix="$acl_final_prefix"
9558 acl_save_exec_prefix="$exec_prefix"
9559 exec_prefix="$acl_final_exec_prefix"
9560
9561 eval additional_includedir=\"$includedir\"
9562 eval additional_libdir=\"$libdir\"
9563
9564 exec_prefix="$acl_save_exec_prefix"
9565 prefix="$acl_save_prefix"
9566
9567
9568 # Check whether --with-libexpat-prefix was given.
9569 if test "${with_libexpat_prefix+set}" = set; then :
9570 withval=$with_libexpat_prefix;
9571 if test "X$withval" = "Xno"; then
9572 use_additional=no
9573 else
9574 if test "X$withval" = "X"; then
9575
9576 acl_save_prefix="$prefix"
9577 prefix="$acl_final_prefix"
9578 acl_save_exec_prefix="$exec_prefix"
9579 exec_prefix="$acl_final_exec_prefix"
9580
9581 eval additional_includedir=\"$includedir\"
9582 eval additional_libdir=\"$libdir\"
9583
9584 exec_prefix="$acl_save_exec_prefix"
9585 prefix="$acl_save_prefix"
9586
9587 else
9588 additional_includedir="$withval/include"
9589 additional_libdir="$withval/lib"
9590 fi
9591 fi
9592
9593 fi
9594
9595
9596 # Check whether --with-libexpat-type was given.
9597 if test "${with_libexpat_type+set}" = set; then :
9598 withval=$with_libexpat_type; with_libexpat_type=$withval
9599 else
9600 with_libexpat_type=auto
9601 fi
9602
9603 lib_type=`eval echo \$with_libexpat_type`
9604
9605 LIBEXPAT=
9606 LTLIBEXPAT=
9607 INCEXPAT=
9608 rpathdirs=
9609 ltrpathdirs=
9610 names_already_handled=
9611 names_next_round='expat '
9612 while test -n "$names_next_round"; do
9613 names_this_round="$names_next_round"
9614 names_next_round=
9615 for name in $names_this_round; do
9616 already_handled=
9617 for n in $names_already_handled; do
9618 if test "$n" = "$name"; then
9619 already_handled=yes
9620 break
9621 fi
9622 done
9623 if test -z "$already_handled"; then
9624 names_already_handled="$names_already_handled $name"
9625 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9626 eval value=\"\$HAVE_LIB$uppername\"
9627 if test -n "$value"; then
9628 if test "$value" = yes; then
9629 eval value=\"\$LIB$uppername\"
9630 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9631 eval value=\"\$LTLIB$uppername\"
9632 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9633 else
9634 :
9635 fi
9636 else
9637 found_dir=
9638 found_la=
9639 found_so=
9640 found_a=
9641 if test $use_additional = yes; then
9642 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9643 found_dir="$additional_libdir"
9644 found_so="$additional_libdir/lib$name.$shlibext"
9645 if test -f "$additional_libdir/lib$name.la"; then
9646 found_la="$additional_libdir/lib$name.la"
9647 fi
9648 elif test x$lib_type != xshared; then
9649 if test -f "$additional_libdir/lib$name.$libext"; then
9650 found_dir="$additional_libdir"
9651 found_a="$additional_libdir/lib$name.$libext"
9652 if test -f "$additional_libdir/lib$name.la"; then
9653 found_la="$additional_libdir/lib$name.la"
9654 fi
9655 fi
9656 fi
9657 fi
9658 if test "X$found_dir" = "X"; then
9659 for x in $LDFLAGS $LTLIBEXPAT; do
9660
9661 acl_save_prefix="$prefix"
9662 prefix="$acl_final_prefix"
9663 acl_save_exec_prefix="$exec_prefix"
9664 exec_prefix="$acl_final_exec_prefix"
9665 eval x=\"$x\"
9666 exec_prefix="$acl_save_exec_prefix"
9667 prefix="$acl_save_prefix"
9668
9669 case "$x" in
9670 -L*)
9671 dir=`echo "X$x" | sed -e 's/^X-L//'`
9672 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9673 found_dir="$dir"
9674 found_so="$dir/lib$name.$shlibext"
9675 if test -f "$dir/lib$name.la"; then
9676 found_la="$dir/lib$name.la"
9677 fi
9678 elif test x$lib_type != xshared; then
9679 if test -f "$dir/lib$name.$libext"; then
9680 found_dir="$dir"
9681 found_a="$dir/lib$name.$libext"
9682 if test -f "$dir/lib$name.la"; then
9683 found_la="$dir/lib$name.la"
9684 fi
9685 fi
9686 fi
9687 ;;
9688 esac
9689 if test "X$found_dir" != "X"; then
9690 break
9691 fi
9692 done
9693 fi
9694 if test "X$found_dir" != "X"; then
9695 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9696 if test "X$found_so" != "X"; then
9697 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9698 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9699 else
9700 haveit=
9701 for x in $ltrpathdirs; do
9702 if test "X$x" = "X$found_dir"; then
9703 haveit=yes
9704 break
9705 fi
9706 done
9707 if test -z "$haveit"; then
9708 ltrpathdirs="$ltrpathdirs $found_dir"
9709 fi
9710 if test "$hardcode_direct" = yes; then
9711 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9712 else
9713 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9714 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9715 haveit=
9716 for x in $rpathdirs; do
9717 if test "X$x" = "X$found_dir"; then
9718 haveit=yes
9719 break
9720 fi
9721 done
9722 if test -z "$haveit"; then
9723 rpathdirs="$rpathdirs $found_dir"
9724 fi
9725 else
9726 haveit=
9727 for x in $LDFLAGS $LIBEXPAT; do
9728
9729 acl_save_prefix="$prefix"
9730 prefix="$acl_final_prefix"
9731 acl_save_exec_prefix="$exec_prefix"
9732 exec_prefix="$acl_final_exec_prefix"
9733 eval x=\"$x\"
9734 exec_prefix="$acl_save_exec_prefix"
9735 prefix="$acl_save_prefix"
9736
9737 if test "X$x" = "X-L$found_dir"; then
9738 haveit=yes
9739 break
9740 fi
9741 done
9742 if test -z "$haveit"; then
9743 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9744 fi
9745 if test "$hardcode_minus_L" != no; then
9746 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9747 else
9748 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9749 fi
9750 fi
9751 fi
9752 fi
9753 else
9754 if test "X$found_a" != "X"; then
9755 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9756 else
9757 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9758 fi
9759 fi
9760 additional_includedir=
9761 case "$found_dir" in
9762 */lib | */lib/)
9763 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9764 additional_includedir="$basedir/include"
9765 ;;
9766 esac
9767 if test "X$additional_includedir" != "X"; then
9768 if test "X$additional_includedir" != "X/usr/include"; then
9769 haveit=
9770 if test "X$additional_includedir" = "X/usr/local/include"; then
9771 if test -n "$GCC"; then
9772 case $host_os in
9773 linux*) haveit=yes;;
9774 esac
9775 fi
9776 fi
9777 if test -z "$haveit"; then
9778 for x in $CPPFLAGS $INCEXPAT; do
9779
9780 acl_save_prefix="$prefix"
9781 prefix="$acl_final_prefix"
9782 acl_save_exec_prefix="$exec_prefix"
9783 exec_prefix="$acl_final_exec_prefix"
9784 eval x=\"$x\"
9785 exec_prefix="$acl_save_exec_prefix"
9786 prefix="$acl_save_prefix"
9787
9788 if test "X$x" = "X-I$additional_includedir"; then
9789 haveit=yes
9790 break
9791 fi
9792 done
9793 if test -z "$haveit"; then
9794 if test -d "$additional_includedir"; then
9795 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9796 fi
9797 fi
9798 fi
9799 fi
9800 fi
9801 if test -n "$found_la"; then
9802 save_libdir="$libdir"
9803 case "$found_la" in
9804 */* | *\\*) . "$found_la" ;;
9805 *) . "./$found_la" ;;
9806 esac
9807 libdir="$save_libdir"
9808 for dep in $dependency_libs; do
9809 case "$dep" in
9810 -L*)
9811 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9812 if test "X$additional_libdir" != "X/usr/lib"; then
9813 haveit=
9814 if test "X$additional_libdir" = "X/usr/local/lib"; then
9815 if test -n "$GCC"; then
9816 case $host_os in
9817 linux*) haveit=yes;;
9818 esac
9819 fi
9820 fi
9821 if test -z "$haveit"; then
9822 haveit=
9823 for x in $LDFLAGS $LIBEXPAT; do
9824
9825 acl_save_prefix="$prefix"
9826 prefix="$acl_final_prefix"
9827 acl_save_exec_prefix="$exec_prefix"
9828 exec_prefix="$acl_final_exec_prefix"
9829 eval x=\"$x\"
9830 exec_prefix="$acl_save_exec_prefix"
9831 prefix="$acl_save_prefix"
9832
9833 if test "X$x" = "X-L$additional_libdir"; then
9834 haveit=yes
9835 break
9836 fi
9837 done
9838 if test -z "$haveit"; then
9839 if test -d "$additional_libdir"; then
9840 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9841 fi
9842 fi
9843 haveit=
9844 for x in $LDFLAGS $LTLIBEXPAT; do
9845
9846 acl_save_prefix="$prefix"
9847 prefix="$acl_final_prefix"
9848 acl_save_exec_prefix="$exec_prefix"
9849 exec_prefix="$acl_final_exec_prefix"
9850 eval x=\"$x\"
9851 exec_prefix="$acl_save_exec_prefix"
9852 prefix="$acl_save_prefix"
9853
9854 if test "X$x" = "X-L$additional_libdir"; then
9855 haveit=yes
9856 break
9857 fi
9858 done
9859 if test -z "$haveit"; then
9860 if test -d "$additional_libdir"; then
9861 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9862 fi
9863 fi
9864 fi
9865 fi
9866 ;;
9867 -R*)
9868 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9869 if test "$enable_rpath" != no; then
9870 haveit=
9871 for x in $rpathdirs; do
9872 if test "X$x" = "X$dir"; then
9873 haveit=yes
9874 break
9875 fi
9876 done
9877 if test -z "$haveit"; then
9878 rpathdirs="$rpathdirs $dir"
9879 fi
9880 haveit=
9881 for x in $ltrpathdirs; do
9882 if test "X$x" = "X$dir"; then
9883 haveit=yes
9884 break
9885 fi
9886 done
9887 if test -z "$haveit"; then
9888 ltrpathdirs="$ltrpathdirs $dir"
9889 fi
9890 fi
9891 ;;
9892 -l*)
9893 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9894 ;;
9895 *.la)
9896 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9897 ;;
9898 *)
9899 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9900 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9901 ;;
9902 esac
9903 done
9904 fi
9905 else
9906 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9907 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9908 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9909 else
9910 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9911 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9912 fi
9913 fi
9914 fi
9915 fi
9916 done
9917 done
9918 if test "X$rpathdirs" != "X"; then
9919 if test -n "$hardcode_libdir_separator"; then
9920 alldirs=
9921 for found_dir in $rpathdirs; do
9922 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9923 done
9924 acl_save_libdir="$libdir"
9925 libdir="$alldirs"
9926 eval flag=\"$hardcode_libdir_flag_spec\"
9927 libdir="$acl_save_libdir"
9928 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9929 else
9930 for found_dir in $rpathdirs; do
9931 acl_save_libdir="$libdir"
9932 libdir="$found_dir"
9933 eval flag=\"$hardcode_libdir_flag_spec\"
9934 libdir="$acl_save_libdir"
9935 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9936 done
9937 fi
9938 fi
9939 if test "X$ltrpathdirs" != "X"; then
9940 for found_dir in $ltrpathdirs; do
9941 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9942 done
9943 fi
9944
9945
9946 ac_save_CPPFLAGS="$CPPFLAGS"
9947
9948 for element in $INCEXPAT; do
9949 haveit=
9950 for x in $CPPFLAGS; do
9951
9952 acl_save_prefix="$prefix"
9953 prefix="$acl_final_prefix"
9954 acl_save_exec_prefix="$exec_prefix"
9955 exec_prefix="$acl_final_exec_prefix"
9956 eval x=\"$x\"
9957 exec_prefix="$acl_save_exec_prefix"
9958 prefix="$acl_save_prefix"
9959
9960 if test "X$x" = "X$element"; then
9961 haveit=yes
9962 break
9963 fi
9964 done
9965 if test -z "$haveit"; then
9966 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9967 fi
9968 done
9969
9970
9971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9972 $as_echo_n "checking for libexpat... " >&6; }
9973 if ${ac_cv_libexpat+:} false; then :
9974 $as_echo_n "(cached) " >&6
9975 else
9976
9977 ac_save_LIBS="$LIBS"
9978 LIBS="$LIBS $LIBEXPAT"
9979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9980 /* end confdefs.h. */
9981 #include "expat.h"
9982 int
9983 main ()
9984 {
9985 XML_Parser p = XML_ParserCreate (0);
9986 ;
9987 return 0;
9988 }
9989 _ACEOF
9990 if ac_fn_c_try_link "$LINENO"; then :
9991 ac_cv_libexpat=yes
9992 else
9993 ac_cv_libexpat=no
9994 fi
9995 rm -f core conftest.err conftest.$ac_objext \
9996 conftest$ac_exeext conftest.$ac_ext
9997 LIBS="$ac_save_LIBS"
9998
9999 fi
10000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10001 $as_echo "$ac_cv_libexpat" >&6; }
10002 if test "$ac_cv_libexpat" = yes; then
10003 HAVE_LIBEXPAT=yes
10004
10005 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
10006
10007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10008 $as_echo_n "checking how to link with libexpat... " >&6; }
10009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10010 $as_echo "$LIBEXPAT" >&6; }
10011 else
10012 HAVE_LIBEXPAT=no
10013 CPPFLAGS="$ac_save_CPPFLAGS"
10014 LIBEXPAT=
10015 LTLIBEXPAT=
10016 fi
10017
10018
10019
10020
10021
10022
10023 if test "$HAVE_LIBEXPAT" != yes; then
10024 if test "$with_expat" = yes; then
10025 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
10026 else
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10028 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10029 fi
10030 else
10031 save_LIBS=$LIBS
10032 LIBS="$LIBS $LIBEXPAT"
10033 for ac_func in XML_StopParser
10034 do :
10035 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10036 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
10037 cat >>confdefs.h <<_ACEOF
10038 #define HAVE_XML_STOPPARSER 1
10039 _ACEOF
10040
10041 fi
10042 done
10043
10044 LIBS=$save_LIBS
10045 fi
10046 fi
10047
10048
10049 # Check whether --with-mpfr was given.
10050 if test "${with_mpfr+set}" = set; then :
10051 withval=$with_mpfr;
10052 else
10053 with_mpfr=auto
10054 fi
10055
10056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10057 $as_echo_n "checking whether to use MPFR... " >&6; }
10058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10059 $as_echo "$with_mpfr" >&6; }
10060
10061 if test "${with_mpfr}" = no; then
10062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10063 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10064 HAVE_LIBMPFR=no
10065 else
10066
10067
10068
10069
10070
10071
10072
10073
10074 use_additional=yes
10075
10076 acl_save_prefix="$prefix"
10077 prefix="$acl_final_prefix"
10078 acl_save_exec_prefix="$exec_prefix"
10079 exec_prefix="$acl_final_exec_prefix"
10080
10081 eval additional_includedir=\"$includedir\"
10082 eval additional_libdir=\"$libdir\"
10083
10084 exec_prefix="$acl_save_exec_prefix"
10085 prefix="$acl_save_prefix"
10086
10087
10088 # Check whether --with-libmpfr-prefix was given.
10089 if test "${with_libmpfr_prefix+set}" = set; then :
10090 withval=$with_libmpfr_prefix;
10091 if test "X$withval" = "Xno"; then
10092 use_additional=no
10093 else
10094 if test "X$withval" = "X"; then
10095
10096 acl_save_prefix="$prefix"
10097 prefix="$acl_final_prefix"
10098 acl_save_exec_prefix="$exec_prefix"
10099 exec_prefix="$acl_final_exec_prefix"
10100
10101 eval additional_includedir=\"$includedir\"
10102 eval additional_libdir=\"$libdir\"
10103
10104 exec_prefix="$acl_save_exec_prefix"
10105 prefix="$acl_save_prefix"
10106
10107 else
10108 additional_includedir="$withval/include"
10109 additional_libdir="$withval/lib"
10110 fi
10111 fi
10112
10113 fi
10114
10115
10116 # Check whether --with-libmpfr-type was given.
10117 if test "${with_libmpfr_type+set}" = set; then :
10118 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10119 else
10120 with_libmpfr_type=auto
10121 fi
10122
10123 lib_type=`eval echo \$with_libmpfr_type`
10124
10125 LIBMPFR=
10126 LTLIBMPFR=
10127 INCMPFR=
10128 rpathdirs=
10129 ltrpathdirs=
10130 names_already_handled=
10131 names_next_round='mpfr gmp'
10132 while test -n "$names_next_round"; do
10133 names_this_round="$names_next_round"
10134 names_next_round=
10135 for name in $names_this_round; do
10136 already_handled=
10137 for n in $names_already_handled; do
10138 if test "$n" = "$name"; then
10139 already_handled=yes
10140 break
10141 fi
10142 done
10143 if test -z "$already_handled"; then
10144 names_already_handled="$names_already_handled $name"
10145 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10146 eval value=\"\$HAVE_LIB$uppername\"
10147 if test -n "$value"; then
10148 if test "$value" = yes; then
10149 eval value=\"\$LIB$uppername\"
10150 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10151 eval value=\"\$LTLIB$uppername\"
10152 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10153 else
10154 :
10155 fi
10156 else
10157 found_dir=
10158 found_la=
10159 found_so=
10160 found_a=
10161 if test $use_additional = yes; then
10162 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10163 found_dir="$additional_libdir"
10164 found_so="$additional_libdir/lib$name.$shlibext"
10165 if test -f "$additional_libdir/lib$name.la"; then
10166 found_la="$additional_libdir/lib$name.la"
10167 fi
10168 elif test x$lib_type != xshared; then
10169 if test -f "$additional_libdir/lib$name.$libext"; then
10170 found_dir="$additional_libdir"
10171 found_a="$additional_libdir/lib$name.$libext"
10172 if test -f "$additional_libdir/lib$name.la"; then
10173 found_la="$additional_libdir/lib$name.la"
10174 fi
10175 fi
10176 fi
10177 fi
10178 if test "X$found_dir" = "X"; then
10179 for x in $LDFLAGS $LTLIBMPFR; do
10180
10181 acl_save_prefix="$prefix"
10182 prefix="$acl_final_prefix"
10183 acl_save_exec_prefix="$exec_prefix"
10184 exec_prefix="$acl_final_exec_prefix"
10185 eval x=\"$x\"
10186 exec_prefix="$acl_save_exec_prefix"
10187 prefix="$acl_save_prefix"
10188
10189 case "$x" in
10190 -L*)
10191 dir=`echo "X$x" | sed -e 's/^X-L//'`
10192 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10193 found_dir="$dir"
10194 found_so="$dir/lib$name.$shlibext"
10195 if test -f "$dir/lib$name.la"; then
10196 found_la="$dir/lib$name.la"
10197 fi
10198 elif test x$lib_type != xshared; then
10199 if test -f "$dir/lib$name.$libext"; then
10200 found_dir="$dir"
10201 found_a="$dir/lib$name.$libext"
10202 if test -f "$dir/lib$name.la"; then
10203 found_la="$dir/lib$name.la"
10204 fi
10205 fi
10206 fi
10207 ;;
10208 esac
10209 if test "X$found_dir" != "X"; then
10210 break
10211 fi
10212 done
10213 fi
10214 if test "X$found_dir" != "X"; then
10215 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10216 if test "X$found_so" != "X"; then
10217 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10218 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10219 else
10220 haveit=
10221 for x in $ltrpathdirs; do
10222 if test "X$x" = "X$found_dir"; then
10223 haveit=yes
10224 break
10225 fi
10226 done
10227 if test -z "$haveit"; then
10228 ltrpathdirs="$ltrpathdirs $found_dir"
10229 fi
10230 if test "$hardcode_direct" = yes; then
10231 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10232 else
10233 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10234 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10235 haveit=
10236 for x in $rpathdirs; do
10237 if test "X$x" = "X$found_dir"; then
10238 haveit=yes
10239 break
10240 fi
10241 done
10242 if test -z "$haveit"; then
10243 rpathdirs="$rpathdirs $found_dir"
10244 fi
10245 else
10246 haveit=
10247 for x in $LDFLAGS $LIBMPFR; do
10248
10249 acl_save_prefix="$prefix"
10250 prefix="$acl_final_prefix"
10251 acl_save_exec_prefix="$exec_prefix"
10252 exec_prefix="$acl_final_exec_prefix"
10253 eval x=\"$x\"
10254 exec_prefix="$acl_save_exec_prefix"
10255 prefix="$acl_save_prefix"
10256
10257 if test "X$x" = "X-L$found_dir"; then
10258 haveit=yes
10259 break
10260 fi
10261 done
10262 if test -z "$haveit"; then
10263 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10264 fi
10265 if test "$hardcode_minus_L" != no; then
10266 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10267 else
10268 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10269 fi
10270 fi
10271 fi
10272 fi
10273 else
10274 if test "X$found_a" != "X"; then
10275 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10276 else
10277 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10278 fi
10279 fi
10280 additional_includedir=
10281 case "$found_dir" in
10282 */lib | */lib/)
10283 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10284 additional_includedir="$basedir/include"
10285 ;;
10286 esac
10287 if test "X$additional_includedir" != "X"; then
10288 if test "X$additional_includedir" != "X/usr/include"; then
10289 haveit=
10290 if test "X$additional_includedir" = "X/usr/local/include"; then
10291 if test -n "$GCC"; then
10292 case $host_os in
10293 linux*) haveit=yes;;
10294 esac
10295 fi
10296 fi
10297 if test -z "$haveit"; then
10298 for x in $CPPFLAGS $INCMPFR; do
10299
10300 acl_save_prefix="$prefix"
10301 prefix="$acl_final_prefix"
10302 acl_save_exec_prefix="$exec_prefix"
10303 exec_prefix="$acl_final_exec_prefix"
10304 eval x=\"$x\"
10305 exec_prefix="$acl_save_exec_prefix"
10306 prefix="$acl_save_prefix"
10307
10308 if test "X$x" = "X-I$additional_includedir"; then
10309 haveit=yes
10310 break
10311 fi
10312 done
10313 if test -z "$haveit"; then
10314 if test -d "$additional_includedir"; then
10315 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10316 fi
10317 fi
10318 fi
10319 fi
10320 fi
10321 if test -n "$found_la"; then
10322 save_libdir="$libdir"
10323 case "$found_la" in
10324 */* | *\\*) . "$found_la" ;;
10325 *) . "./$found_la" ;;
10326 esac
10327 libdir="$save_libdir"
10328 for dep in $dependency_libs; do
10329 case "$dep" in
10330 -L*)
10331 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10332 if test "X$additional_libdir" != "X/usr/lib"; then
10333 haveit=
10334 if test "X$additional_libdir" = "X/usr/local/lib"; then
10335 if test -n "$GCC"; then
10336 case $host_os in
10337 linux*) haveit=yes;;
10338 esac
10339 fi
10340 fi
10341 if test -z "$haveit"; then
10342 haveit=
10343 for x in $LDFLAGS $LIBMPFR; do
10344
10345 acl_save_prefix="$prefix"
10346 prefix="$acl_final_prefix"
10347 acl_save_exec_prefix="$exec_prefix"
10348 exec_prefix="$acl_final_exec_prefix"
10349 eval x=\"$x\"
10350 exec_prefix="$acl_save_exec_prefix"
10351 prefix="$acl_save_prefix"
10352
10353 if test "X$x" = "X-L$additional_libdir"; then
10354 haveit=yes
10355 break
10356 fi
10357 done
10358 if test -z "$haveit"; then
10359 if test -d "$additional_libdir"; then
10360 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10361 fi
10362 fi
10363 haveit=
10364 for x in $LDFLAGS $LTLIBMPFR; do
10365
10366 acl_save_prefix="$prefix"
10367 prefix="$acl_final_prefix"
10368 acl_save_exec_prefix="$exec_prefix"
10369 exec_prefix="$acl_final_exec_prefix"
10370 eval x=\"$x\"
10371 exec_prefix="$acl_save_exec_prefix"
10372 prefix="$acl_save_prefix"
10373
10374 if test "X$x" = "X-L$additional_libdir"; then
10375 haveit=yes
10376 break
10377 fi
10378 done
10379 if test -z "$haveit"; then
10380 if test -d "$additional_libdir"; then
10381 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10382 fi
10383 fi
10384 fi
10385 fi
10386 ;;
10387 -R*)
10388 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10389 if test "$enable_rpath" != no; then
10390 haveit=
10391 for x in $rpathdirs; do
10392 if test "X$x" = "X$dir"; then
10393 haveit=yes
10394 break
10395 fi
10396 done
10397 if test -z "$haveit"; then
10398 rpathdirs="$rpathdirs $dir"
10399 fi
10400 haveit=
10401 for x in $ltrpathdirs; do
10402 if test "X$x" = "X$dir"; then
10403 haveit=yes
10404 break
10405 fi
10406 done
10407 if test -z "$haveit"; then
10408 ltrpathdirs="$ltrpathdirs $dir"
10409 fi
10410 fi
10411 ;;
10412 -l*)
10413 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10414 ;;
10415 *.la)
10416 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10417 ;;
10418 *)
10419 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10420 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10421 ;;
10422 esac
10423 done
10424 fi
10425 else
10426 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10427 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10428 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10429 else
10430 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10431 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10432 fi
10433 fi
10434 fi
10435 fi
10436 done
10437 done
10438 if test "X$rpathdirs" != "X"; then
10439 if test -n "$hardcode_libdir_separator"; then
10440 alldirs=
10441 for found_dir in $rpathdirs; do
10442 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10443 done
10444 acl_save_libdir="$libdir"
10445 libdir="$alldirs"
10446 eval flag=\"$hardcode_libdir_flag_spec\"
10447 libdir="$acl_save_libdir"
10448 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10449 else
10450 for found_dir in $rpathdirs; do
10451 acl_save_libdir="$libdir"
10452 libdir="$found_dir"
10453 eval flag=\"$hardcode_libdir_flag_spec\"
10454 libdir="$acl_save_libdir"
10455 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10456 done
10457 fi
10458 fi
10459 if test "X$ltrpathdirs" != "X"; then
10460 for found_dir in $ltrpathdirs; do
10461 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10462 done
10463 fi
10464
10465
10466 ac_save_CPPFLAGS="$CPPFLAGS"
10467
10468 for element in $INCMPFR; do
10469 haveit=
10470 for x in $CPPFLAGS; do
10471
10472 acl_save_prefix="$prefix"
10473 prefix="$acl_final_prefix"
10474 acl_save_exec_prefix="$exec_prefix"
10475 exec_prefix="$acl_final_exec_prefix"
10476 eval x=\"$x\"
10477 exec_prefix="$acl_save_exec_prefix"
10478 prefix="$acl_save_prefix"
10479
10480 if test "X$x" = "X$element"; then
10481 haveit=yes
10482 break
10483 fi
10484 done
10485 if test -z "$haveit"; then
10486 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10487 fi
10488 done
10489
10490
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10492 $as_echo_n "checking for libmpfr... " >&6; }
10493 if ${ac_cv_libmpfr+:} false; then :
10494 $as_echo_n "(cached) " >&6
10495 else
10496
10497 ac_save_LIBS="$LIBS"
10498 LIBS="$LIBS $LIBMPFR"
10499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10500 /* end confdefs.h. */
10501 #include <mpfr.h>
10502 int
10503 main ()
10504 {
10505 mpfr_exp_t exp; mpfr_t x;
10506 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10507 ;
10508 return 0;
10509 }
10510 _ACEOF
10511 if ac_fn_c_try_link "$LINENO"; then :
10512 ac_cv_libmpfr=yes
10513 else
10514 ac_cv_libmpfr=no
10515 fi
10516 rm -f core conftest.err conftest.$ac_objext \
10517 conftest$ac_exeext conftest.$ac_ext
10518 LIBS="$ac_save_LIBS"
10519
10520 fi
10521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10522 $as_echo "$ac_cv_libmpfr" >&6; }
10523 if test "$ac_cv_libmpfr" = yes; then
10524 HAVE_LIBMPFR=yes
10525
10526 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10527
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10529 $as_echo_n "checking how to link with libmpfr... " >&6; }
10530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10531 $as_echo "$LIBMPFR" >&6; }
10532 else
10533 HAVE_LIBMPFR=no
10534 CPPFLAGS="$ac_save_CPPFLAGS"
10535 LIBMPFR=
10536 LTLIBMPFR=
10537 fi
10538
10539
10540
10541
10542
10543
10544 if test "$HAVE_LIBMPFR" != yes; then
10545 if test "$with_mpfr" = yes; then
10546 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10547 else
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10549 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10550 fi
10551 fi
10552 fi
10553
10554 # --------------------- #
10555 # Check for libpython. #
10556 # --------------------- #
10557
10558
10559
10560
10561
10562
10563 # Check whether --with-python was given.
10564 if test "${with_python+set}" = set; then :
10565 withval=$with_python;
10566 else
10567 with_python=auto
10568 fi
10569
10570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10571 $as_echo_n "checking whether to use python... " >&6; }
10572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10573 $as_echo "$with_python" >&6; }
10574
10575 if test "${with_python}" = no; then
10576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10577 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10578 have_libpython=no
10579 else
10580 case "${with_python}" in
10581 [\\/]* | ?:[\\/]*)
10582 if test -d "${with_python}"; then
10583 # Assume the python binary is ${with_python}/bin/python.
10584 python_prog="${with_python}/bin/python"
10585 python_prefix=
10586 # If python does not exit ${with_python}/bin, then try in
10587 # ${with_python}. On Windows/MinGW, this is where the Python
10588 # executable is.
10589 if test ! -x "${python_prog}"; then
10590 python_prog="${with_python}/python"
10591 python_prefix=
10592 fi
10593 if test ! -x "${python_prog}"; then
10594 # Fall back to gdb 7.0/7.1 behaviour.
10595 python_prog=missing
10596 python_prefix=${with_python}
10597 fi
10598 elif test -x "${with_python}"; then
10599 # While we can't run python compiled for $host (unless host == build),
10600 # the user could write a script that provides the needed information,
10601 # so we support that.
10602 python_prog=${with_python}
10603 python_prefix=
10604 else
10605 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10606 fi
10607 ;;
10608 */*)
10609 # Disallow --with-python=foo/bar.
10610 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10611 ;;
10612 *)
10613 # The user has either specified auto, yes, or the name of the python
10614 # program assumed to be in $PATH.
10615 python_prefix=
10616 case "${with_python}" in
10617 yes | auto)
10618 if test "${build}" = "${host}"; then
10619 # Extract the first word of "python", so it can be a program name with args.
10620 set dummy python; ac_word=$2
10621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10622 $as_echo_n "checking for $ac_word... " >&6; }
10623 if ${ac_cv_path_python_prog_path+:} false; then :
10624 $as_echo_n "(cached) " >&6
10625 else
10626 case $python_prog_path in
10627 [\\/]* | ?:[\\/]*)
10628 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10629 ;;
10630 *)
10631 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10632 for as_dir in $PATH
10633 do
10634 IFS=$as_save_IFS
10635 test -z "$as_dir" && as_dir=.
10636 for ac_exec_ext in '' $ac_executable_extensions; do
10637 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10638 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10639 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10640 break 2
10641 fi
10642 done
10643 done
10644 IFS=$as_save_IFS
10645
10646 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10647 ;;
10648 esac
10649 fi
10650 python_prog_path=$ac_cv_path_python_prog_path
10651 if test -n "$python_prog_path"; then
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10653 $as_echo "$python_prog_path" >&6; }
10654 else
10655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10656 $as_echo "no" >&6; }
10657 fi
10658
10659
10660 if test "${python_prog_path}" = missing; then
10661 python_prog=missing
10662 else
10663 python_prog=${python_prog_path}
10664 fi
10665 else
10666 # Not much we can do except assume the cross-compiler will find the
10667 # right files.
10668 python_prog=missing
10669 fi
10670 ;;
10671 *)
10672 # While we can't run python compiled for $host (unless host == build),
10673 # the user could write a script that provides the needed information,
10674 # so we support that.
10675 python_prog="${with_python}"
10676 # Extract the first word of "${python_prog}", so it can be a program name with args.
10677 set dummy ${python_prog}; ac_word=$2
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679 $as_echo_n "checking for $ac_word... " >&6; }
10680 if ${ac_cv_path_python_prog_path+:} false; then :
10681 $as_echo_n "(cached) " >&6
10682 else
10683 case $python_prog_path in
10684 [\\/]* | ?:[\\/]*)
10685 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10686 ;;
10687 *)
10688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689 for as_dir in $PATH
10690 do
10691 IFS=$as_save_IFS
10692 test -z "$as_dir" && as_dir=.
10693 for ac_exec_ext in '' $ac_executable_extensions; do
10694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10695 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10697 break 2
10698 fi
10699 done
10700 done
10701 IFS=$as_save_IFS
10702
10703 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10704 ;;
10705 esac
10706 fi
10707 python_prog_path=$ac_cv_path_python_prog_path
10708 if test -n "$python_prog_path"; then
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10710 $as_echo "$python_prog_path" >&6; }
10711 else
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713 $as_echo "no" >&6; }
10714 fi
10715
10716
10717 if test "${python_prog_path}" = missing; then
10718 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10719 fi
10720 ;;
10721 esac
10722 esac
10723
10724 if test "${python_prog}" != missing; then
10725 # We have a python program to use, but it may be too old.
10726 # Don't flag an error for --with-python=auto (the default).
10727 have_python_config=yes
10728 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10729 if test $? != 0; then
10730 have_python_config=failed
10731 if test "${with_python}" != auto; then
10732 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10733 fi
10734 fi
10735 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10736 if test $? != 0; then
10737 have_python_config=failed
10738 if test "${with_python}" != auto; then
10739 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10740 fi
10741 fi
10742 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10743 if test $? != 0; then
10744 have_python_config=failed
10745 if test "${with_python}" != auto; then
10746 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10747 fi
10748 fi
10749 else
10750 # We do not have a python executable we can use to determine where
10751 # to find the Python headers and libs. We cannot guess the include
10752 # path from the python_prefix either, because that include path
10753 # depends on the Python version. So, there is nothing much we can
10754 # do except assume that the compiler will be able to find those files.
10755 python_includes=
10756 python_libs=
10757 have_python_config=no
10758 fi
10759
10760 # If we have python-config, only try the configuration it provides.
10761 # Otherwise fallback on the old way of trying different versions of
10762 # python in turn.
10763
10764 have_libpython=no
10765 if test "${have_python_config}" = yes; then
10766
10767
10768 new_CPPFLAGS=${python_includes}
10769 new_LIBS=${python_libs}
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10771 $as_echo_n "checking for python... " >&6; }
10772 save_CPPFLAGS=$CPPFLAGS
10773 save_LIBS=$LIBS
10774 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10775 LIBS="$new_LIBS $LIBS"
10776 found_usable_python=no
10777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10778 /* end confdefs.h. */
10779 #include "Python.h"
10780 int
10781 main ()
10782 {
10783 Py_Initialize ();
10784 ;
10785 return 0;
10786 }
10787 _ACEOF
10788 if ac_fn_c_try_link "$LINENO"; then :
10789 have_libpython=yes
10790 found_usable_python=yes
10791 PYTHON_CPPFLAGS=$new_CPPFLAGS
10792 PYTHON_LIBS=$new_LIBS
10793 fi
10794 rm -f core conftest.err conftest.$ac_objext \
10795 conftest$ac_exeext conftest.$ac_ext
10796 CPPFLAGS=$save_CPPFLAGS
10797 LIBS=$save_LIBS
10798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10799 $as_echo "${found_usable_python}" >&6; }
10800
10801 elif test "${have_python_config}" != failed; then
10802 if test "${have_libpython}" = no; then
10803
10804
10805 new_CPPFLAGS=${python_includes}
10806 new_LIBS="-lpython2.7 ${python_libs}"
10807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10808 $as_echo_n "checking for python... " >&6; }
10809 save_CPPFLAGS=$CPPFLAGS
10810 save_LIBS=$LIBS
10811 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10812 LIBS="$new_LIBS $LIBS"
10813 found_usable_python=no
10814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10815 /* end confdefs.h. */
10816 #include "Python.h"
10817 int
10818 main ()
10819 {
10820 Py_Initialize ();
10821 ;
10822 return 0;
10823 }
10824 _ACEOF
10825 if ac_fn_c_try_link "$LINENO"; then :
10826 have_libpython=yes
10827 found_usable_python=yes
10828 PYTHON_CPPFLAGS=$new_CPPFLAGS
10829 PYTHON_LIBS=$new_LIBS
10830 fi
10831 rm -f core conftest.err conftest.$ac_objext \
10832 conftest$ac_exeext conftest.$ac_ext
10833 CPPFLAGS=$save_CPPFLAGS
10834 LIBS=$save_LIBS
10835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10836 $as_echo "${found_usable_python}" >&6; }
10837
10838 fi
10839 if test "${have_libpython}" = no; then
10840
10841
10842 new_CPPFLAGS=${python_includes}
10843 new_LIBS="-lpython2.6 ${python_libs}"
10844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10845 $as_echo_n "checking for python... " >&6; }
10846 save_CPPFLAGS=$CPPFLAGS
10847 save_LIBS=$LIBS
10848 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10849 LIBS="$new_LIBS $LIBS"
10850 found_usable_python=no
10851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10852 /* end confdefs.h. */
10853 #include "Python.h"
10854 int
10855 main ()
10856 {
10857 Py_Initialize ();
10858 ;
10859 return 0;
10860 }
10861 _ACEOF
10862 if ac_fn_c_try_link "$LINENO"; then :
10863 have_libpython=yes
10864 found_usable_python=yes
10865 PYTHON_CPPFLAGS=$new_CPPFLAGS
10866 PYTHON_LIBS=$new_LIBS
10867 fi
10868 rm -f core conftest.err conftest.$ac_objext \
10869 conftest$ac_exeext conftest.$ac_ext
10870 CPPFLAGS=$save_CPPFLAGS
10871 LIBS=$save_LIBS
10872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10873 $as_echo "${found_usable_python}" >&6; }
10874
10875 fi
10876 fi
10877
10878 if test "${have_libpython}" = no; then
10879 case "${with_python}" in
10880 yes)
10881 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10882 ;;
10883 auto)
10884 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10885 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10886 ;;
10887 *)
10888 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10889 ;;
10890 esac
10891 else
10892 if test -n "${python_prefix}"; then
10893
10894 cat >>confdefs.h <<_ACEOF
10895 #define WITH_PYTHON_PATH "${python_prefix}"
10896 _ACEOF
10897
10898
10899 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10900 if test "x$prefix" = xNONE; then
10901 test_prefix=/usr/local
10902 else
10903 test_prefix=$prefix
10904 fi
10905 else
10906 test_prefix=$exec_prefix
10907 fi
10908 value=0
10909 case ${python_prefix} in
10910 "${test_prefix}"|"${test_prefix}/"*|\
10911 '${exec_prefix}'|'${exec_prefix}/'*)
10912 value=1
10913 ;;
10914 esac
10915
10916 cat >>confdefs.h <<_ACEOF
10917 #define PYTHON_PATH_RELOCATABLE $value
10918 _ACEOF
10919
10920
10921 fi
10922 fi
10923 fi
10924
10925
10926 # Check whether --with-python-libdir was given.
10927 if test "${with_python_libdir+set}" = set; then :
10928 withval=$with_python_libdir;
10929 else
10930
10931 # If no python libdir is specified then select one based on
10932 # python's prefix path.
10933 if test -n "${python_prefix}"; then
10934 with_python_libdir=${python_prefix}/lib
10935 fi
10936
10937 fi
10938
10939
10940 if test "${have_libpython}" != no; then
10941
10942 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10943
10944 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10945 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10946 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10947 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10948 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10949
10950 if test -n "${with_python_libdir}"; then
10951
10952 cat >>confdefs.h <<_ACEOF
10953 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
10954 _ACEOF
10955
10956
10957 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10958 if test "x$prefix" = xNONE; then
10959 test_prefix=/usr/local
10960 else
10961 test_prefix=$prefix
10962 fi
10963 else
10964 test_prefix=$exec_prefix
10965 fi
10966 value=0
10967 case ${with_python_libdir} in
10968 "${test_prefix}"|"${test_prefix}/"*|\
10969 '${exec_prefix}'|'${exec_prefix}/'*)
10970 value=1
10971 ;;
10972 esac
10973
10974 cat >>confdefs.h <<_ACEOF
10975 #define PYTHON_LIBDIR_RELOCATABLE $value
10976 _ACEOF
10977
10978
10979 fi
10980
10981 # Flags needed to compile Python code (taken from python-config --cflags).
10982 # We cannot call python-config directly because it will output whatever was
10983 # used when compiling the Python interpreter itself, including flags which
10984 # would make the python-related objects be compiled differently from the
10985 # rest of GDB (e.g., -O2 and -fPIC).
10986 if test "${GCC}" = yes; then
10987 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10988 # Python headers recommend -DNDEBUG, but it's unclear if that just
10989 # refers to building Python itself. In release mode, though, it
10990 # doesn't hurt for the Python code in gdb to follow.
10991 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10992 fi
10993
10994 if test "x${tentative_python_cflags}" != x; then
10995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10996 $as_echo_n "checking compiler flags for python code... " >&6; }
10997 for flag in ${tentative_python_cflags}; do
10998 # Check that the compiler accepts it
10999 saved_CFLAGS="$CFLAGS"
11000 CFLAGS="$CFLAGS $flag"
11001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11002 /* end confdefs.h. */
11003
11004 int
11005 main ()
11006 {
11007
11008 ;
11009 return 0;
11010 }
11011 _ACEOF
11012 if ac_fn_c_try_compile "$LINENO"; then :
11013 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11014 fi
11015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11016 CFLAGS="$saved_CFLAGS"
11017 done
11018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11019 $as_echo "${PYTHON_CFLAGS}" >&6; }
11020 fi
11021
11022 # On x64 Windows, Python's include headers, and pyconfig.h in
11023 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11024 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11025 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11026 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11027 # The issue was reported to the Python community, but still isn't
11028 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11029
11030 case "$gdb_host" in
11031 mingw64)
11032 if test "${GCC}" = yes; then
11033 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11034 fi
11035 ;;
11036 esac
11037 else
11038 # Even if Python support is not compiled in, we need to have this file
11039 # included so that the "python" command, et.al., still exists.
11040 CONFIG_OBS="$CONFIG_OBS python/python.o"
11041 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11042 fi
11043
11044 # Work around Python http://bugs.python.org/issue10112. See also
11045 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11046 # no effect. Note that the only test after this that uses Python is
11047 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11048 # run without -export-dynamic too.
11049 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11050
11051
11052
11053
11054 if test "${have_libpython}" != no; then
11055 HAVE_PYTHON_TRUE=
11056 HAVE_PYTHON_FALSE='#'
11057 else
11058 HAVE_PYTHON_TRUE='#'
11059 HAVE_PYTHON_FALSE=
11060 fi
11061
11062
11063 # -------------------- #
11064 # Check for libguile. #
11065 # -------------------- #
11066
11067
11068
11069
11070
11071
11072 # Check whether --with-guile was given.
11073 if test "${with_guile+set}" = set; then :
11074 withval=$with_guile;
11075 else
11076 with_guile=auto
11077 fi
11078
11079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11080 $as_echo_n "checking whether to use guile... " >&6; }
11081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11082 $as_echo "$with_guile" >&6; }
11083
11084 # Extract the first word of "pkg-config", so it can be a program name with args.
11085 set dummy pkg-config; ac_word=$2
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11087 $as_echo_n "checking for $ac_word... " >&6; }
11088 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11089 $as_echo_n "(cached) " >&6
11090 else
11091 case $pkg_config_prog_path in
11092 [\\/]* | ?:[\\/]*)
11093 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11094 ;;
11095 *)
11096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11097 for as_dir in $PATH
11098 do
11099 IFS=$as_save_IFS
11100 test -z "$as_dir" && as_dir=.
11101 for ac_exec_ext in '' $ac_executable_extensions; do
11102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11103 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11105 break 2
11106 fi
11107 done
11108 done
11109 IFS=$as_save_IFS
11110
11111 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11112 ;;
11113 esac
11114 fi
11115 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11116 if test -n "$pkg_config_prog_path"; then
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11118 $as_echo "$pkg_config_prog_path" >&6; }
11119 else
11120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11121 $as_echo "no" >&6; }
11122 fi
11123
11124
11125
11126 try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11127 have_libguile=no
11128 case "${with_guile}" in
11129 no)
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11131 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11132 ;;
11133 auto)
11134 if test "${pkg_config_prog_path}" = "missing"; then
11135 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11136 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11137 else
11138
11139 pkg_config=${pkg_config_prog_path}
11140 guile_version_list=${try_guile_versions}
11141 flag_errors=no
11142
11143 found_usable_guile=checking
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11145 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11146 for guile_version in ${guile_version_list}; do
11147 ${pkg_config} --exists ${guile_version} 2>/dev/null
11148 if test $? != 0; then
11149 continue
11150 fi
11151 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11152 if test $? != 0; then
11153 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11154 fi
11155 new_LIBS=`${pkg_config} --libs ${guile_version}`
11156 if test $? != 0; then
11157 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11158 fi
11159 found_usable_guile=${guile_version}
11160 break
11161 done
11162 if test "${found_usable_guile}" = "checking"; then
11163 if test "${flag_errors}" = "yes"; then
11164 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11165 else
11166 found_usable_guile=no
11167 fi
11168 fi
11169 if test "${found_usable_guile}" != no; then
11170 save_CPPFLAGS=$CPPFLAGS
11171 save_LIBS=$LIBS
11172 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11173 LIBS="$LIBS $new_LIBS"
11174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11175 /* end confdefs.h. */
11176 #include "libguile.h"
11177 int
11178 main ()
11179 {
11180 scm_init_guile ();
11181 ;
11182 return 0;
11183 }
11184 _ACEOF
11185 if ac_fn_c_try_link "$LINENO"; then :
11186 have_libguile=yes
11187 GUILE_CPPFLAGS=$new_CPPFLAGS
11188 GUILE_LIBS=$new_LIBS
11189 else
11190 found_usable_guile=no
11191 fi
11192 rm -f core conftest.err conftest.$ac_objext \
11193 conftest$ac_exeext conftest.$ac_ext
11194 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11195 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11196
11197 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11198
11199
11200 fi
11201
11202 CPPFLAGS=$save_CPPFLAGS
11203 LIBS=$save_LIBS
11204 if test "${found_usable_guile}" = no; then
11205 if test "${flag_errors}" = yes; then
11206 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11207 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11208 as_fn_error $? "linking guile version ${guile_version} test program failed
11209 See \`config.log' for more details" "$LINENO" 5; }
11210 fi
11211 fi
11212 fi
11213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11214 $as_echo "${found_usable_guile}" >&6; }
11215
11216 fi
11217 ;;
11218 yes)
11219 if test "${pkg_config_prog_path}" = "missing"; then
11220 as_fn_error $? "pkg-config not found" "$LINENO" 5
11221 fi
11222
11223 pkg_config=${pkg_config_prog_path}
11224 guile_version_list=${try_guile_versions}
11225 flag_errors=yes
11226
11227 found_usable_guile=checking
11228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11229 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11230 for guile_version in ${guile_version_list}; do
11231 ${pkg_config} --exists ${guile_version} 2>/dev/null
11232 if test $? != 0; then
11233 continue
11234 fi
11235 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11236 if test $? != 0; then
11237 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11238 fi
11239 new_LIBS=`${pkg_config} --libs ${guile_version}`
11240 if test $? != 0; then
11241 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11242 fi
11243 found_usable_guile=${guile_version}
11244 break
11245 done
11246 if test "${found_usable_guile}" = "checking"; then
11247 if test "${flag_errors}" = "yes"; then
11248 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11249 else
11250 found_usable_guile=no
11251 fi
11252 fi
11253 if test "${found_usable_guile}" != no; then
11254 save_CPPFLAGS=$CPPFLAGS
11255 save_LIBS=$LIBS
11256 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11257 LIBS="$LIBS $new_LIBS"
11258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11259 /* end confdefs.h. */
11260 #include "libguile.h"
11261 int
11262 main ()
11263 {
11264 scm_init_guile ();
11265 ;
11266 return 0;
11267 }
11268 _ACEOF
11269 if ac_fn_c_try_link "$LINENO"; then :
11270 have_libguile=yes
11271 GUILE_CPPFLAGS=$new_CPPFLAGS
11272 GUILE_LIBS=$new_LIBS
11273 else
11274 found_usable_guile=no
11275 fi
11276 rm -f core conftest.err conftest.$ac_objext \
11277 conftest$ac_exeext conftest.$ac_ext
11278 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11279 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11280
11281 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11282
11283
11284 fi
11285
11286 CPPFLAGS=$save_CPPFLAGS
11287 LIBS=$save_LIBS
11288 if test "${found_usable_guile}" = no; then
11289 if test "${flag_errors}" = yes; then
11290 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11291 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11292 as_fn_error $? "linking guile version ${guile_version} test program failed
11293 See \`config.log' for more details" "$LINENO" 5; }
11294 fi
11295 fi
11296 fi
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11298 $as_echo "${found_usable_guile}" >&6; }
11299
11300 ;;
11301 [\\/]* | ?:[\\/]*)
11302 if test -x "${with_guile}"; then
11303
11304 pkg_config=${with_guile}
11305 guile_version_list=${try_guile_versions}
11306 flag_errors=yes
11307
11308 found_usable_guile=checking
11309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11310 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11311 for guile_version in ${guile_version_list}; do
11312 ${pkg_config} --exists ${guile_version} 2>/dev/null
11313 if test $? != 0; then
11314 continue
11315 fi
11316 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11317 if test $? != 0; then
11318 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11319 fi
11320 new_LIBS=`${pkg_config} --libs ${guile_version}`
11321 if test $? != 0; then
11322 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11323 fi
11324 found_usable_guile=${guile_version}
11325 break
11326 done
11327 if test "${found_usable_guile}" = "checking"; then
11328 if test "${flag_errors}" = "yes"; then
11329 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11330 else
11331 found_usable_guile=no
11332 fi
11333 fi
11334 if test "${found_usable_guile}" != no; then
11335 save_CPPFLAGS=$CPPFLAGS
11336 save_LIBS=$LIBS
11337 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11338 LIBS="$LIBS $new_LIBS"
11339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340 /* end confdefs.h. */
11341 #include "libguile.h"
11342 int
11343 main ()
11344 {
11345 scm_init_guile ();
11346 ;
11347 return 0;
11348 }
11349 _ACEOF
11350 if ac_fn_c_try_link "$LINENO"; then :
11351 have_libguile=yes
11352 GUILE_CPPFLAGS=$new_CPPFLAGS
11353 GUILE_LIBS=$new_LIBS
11354 else
11355 found_usable_guile=no
11356 fi
11357 rm -f core conftest.err conftest.$ac_objext \
11358 conftest$ac_exeext conftest.$ac_ext
11359 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11360 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11361
11362 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11363
11364
11365 fi
11366
11367 CPPFLAGS=$save_CPPFLAGS
11368 LIBS=$save_LIBS
11369 if test "${found_usable_guile}" = no; then
11370 if test "${flag_errors}" = yes; then
11371 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11372 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11373 as_fn_error $? "linking guile version ${guile_version} test program failed
11374 See \`config.log' for more details" "$LINENO" 5; }
11375 fi
11376 fi
11377 fi
11378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11379 $as_echo "${found_usable_guile}" >&6; }
11380
11381 else
11382 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11383 fi
11384 ;;
11385 "" | */*)
11386 # Disallow --with=guile="" and --with-guile=foo/bar.
11387 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11388 ;;
11389 *)
11390 # A space separate list of guile versions to try, in order.
11391 if test "${pkg_config_prog_path}" = "missing"; then
11392 as_fn_error $? "pkg-config not found" "$LINENO" 5
11393 fi
11394
11395 pkg_config=${pkg_config_prog_path}
11396 guile_version_list=${with_guile}
11397 flag_errors=yes
11398
11399 found_usable_guile=checking
11400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11401 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11402 for guile_version in ${guile_version_list}; do
11403 ${pkg_config} --exists ${guile_version} 2>/dev/null
11404 if test $? != 0; then
11405 continue
11406 fi
11407 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11408 if test $? != 0; then
11409 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11410 fi
11411 new_LIBS=`${pkg_config} --libs ${guile_version}`
11412 if test $? != 0; then
11413 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11414 fi
11415 found_usable_guile=${guile_version}
11416 break
11417 done
11418 if test "${found_usable_guile}" = "checking"; then
11419 if test "${flag_errors}" = "yes"; then
11420 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11421 else
11422 found_usable_guile=no
11423 fi
11424 fi
11425 if test "${found_usable_guile}" != no; then
11426 save_CPPFLAGS=$CPPFLAGS
11427 save_LIBS=$LIBS
11428 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11429 LIBS="$LIBS $new_LIBS"
11430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11431 /* end confdefs.h. */
11432 #include "libguile.h"
11433 int
11434 main ()
11435 {
11436 scm_init_guile ();
11437 ;
11438 return 0;
11439 }
11440 _ACEOF
11441 if ac_fn_c_try_link "$LINENO"; then :
11442 have_libguile=yes
11443 GUILE_CPPFLAGS=$new_CPPFLAGS
11444 GUILE_LIBS=$new_LIBS
11445 else
11446 found_usable_guile=no
11447 fi
11448 rm -f core conftest.err conftest.$ac_objext \
11449 conftest$ac_exeext conftest.$ac_ext
11450 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11451 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11452
11453 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11454
11455
11456 fi
11457
11458 CPPFLAGS=$save_CPPFLAGS
11459 LIBS=$save_LIBS
11460 if test "${found_usable_guile}" = no; then
11461 if test "${flag_errors}" = yes; then
11462 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11463 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11464 as_fn_error $? "linking guile version ${guile_version} test program failed
11465 See \`config.log' for more details" "$LINENO" 5; }
11466 fi
11467 fi
11468 fi
11469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11470 $as_echo "${found_usable_guile}" >&6; }
11471
11472 ;;
11473 esac
11474
11475 if test "${have_libguile}" != no; then
11476 case "${with_guile}" in
11477 [\\/]* | ?:[\\/]*)
11478
11479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11480 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11481 if ${ac_cv_guild_program_name+:} false; then :
11482 $as_echo_n "(cached) " >&6
11483 else
11484 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11485
11486 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11487 # the 'guild' and 'bindir' variables. In that case, try to guess
11488 # what the program name is, at the risk of getting it wrong if
11489 # Guile was configured with '--program-suffix' or similar.
11490 if test "x$ac_cv_guild_program_name" = "x"; then
11491 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11492 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11493 fi
11494
11495 fi
11496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11497 $as_echo "$ac_cv_guild_program_name" >&6; }
11498
11499 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11500 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11501 fi
11502
11503 GUILD="$ac_cv_guild_program_name"
11504
11505
11506 ;;
11507 *)
11508
11509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11510 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11511 if ${ac_cv_guild_program_name+:} false; then :
11512 $as_echo_n "(cached) " >&6
11513 else
11514 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11515
11516 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11517 # the 'guild' and 'bindir' variables. In that case, try to guess
11518 # what the program name is, at the risk of getting it wrong if
11519 # Guile was configured with '--program-suffix' or similar.
11520 if test "x$ac_cv_guild_program_name" = "x"; then
11521 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11522 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11523 fi
11524
11525 fi
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11527 $as_echo "$ac_cv_guild_program_name" >&6; }
11528
11529 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11530 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11531 fi
11532
11533 GUILD="$ac_cv_guild_program_name"
11534
11535
11536 ;;
11537 esac
11538
11539
11540 if test "$cross_compiling" = no; then
11541 GUILD_TARGET_FLAG=
11542 else
11543 GUILD_TARGET_FLAG="--target=$host"
11544 fi
11545
11546
11547
11548
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11550 $as_echo_n "checking whether guild supports this host... " >&6; }
11551 if ${ac_cv_guild_ok+:} false; then :
11552 $as_echo_n "(cached) " >&6
11553 else
11554 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11555 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11556 ac_cv_guild_ok=yes
11557 else
11558 ac_cv_guild_ok=no
11559 fi
11560 fi
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11562 $as_echo "$ac_cv_guild_ok" >&6; }
11563
11564 if test "$ac_cv_guild_ok" = no; then
11565 have_libguile=no
11566 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11567 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11568 fi
11569 fi
11570
11571 if test "${have_libguile}" != no; then
11572
11573 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11574
11575 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11576 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11577 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11578 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11579 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11580
11581 save_LIBS="$LIBS"
11582 save_CPPFLAGS="$CPPFLAGS"
11583 LIBS="$GUILE_LIBS"
11584 CPPFLAGS="$GUILE_CPPFLAGS"
11585 for ac_func in scm_new_smob
11586 do :
11587 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11588 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11589 cat >>confdefs.h <<_ACEOF
11590 #define HAVE_SCM_NEW_SMOB 1
11591 _ACEOF
11592
11593 fi
11594 done
11595
11596 LIBS="$save_LIBS"
11597 CPPFLAGS="$save_CPPFLAGS"
11598 else
11599 # Even if Guile support is not compiled in, we need to have these files
11600 # included.
11601 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11602 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11603 fi
11604
11605
11606 if test "${have_libguile}" != no; then
11607 HAVE_GUILE_TRUE=
11608 HAVE_GUILE_FALSE='#'
11609 else
11610 HAVE_GUILE_TRUE='#'
11611 HAVE_GUILE_FALSE=
11612 fi
11613
11614
11615 # ---------------------------- #
11616 # Check for source highlight. #
11617 # ---------------------------- #
11618
11619 SRCHIGH_LIBS=
11620 SRCHIGH_CFLAGS=
11621
11622 # Check whether --enable-source-highlight was given.
11623 if test "${enable_source_highlight+set}" = set; then :
11624 enableval=$enable_source_highlight; case "${enableval}" in
11625 yes) enable_source_highlight=yes ;;
11626 no) enable_source_highlight=no ;;
11627 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11628 esac
11629 else
11630 enable_source_highlight=auto
11631 fi
11632
11633
11634 if test "${enable_source_highlight}" != "no"; then
11635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11636 $as_echo_n "checking for the source-highlight library... " >&6; }
11637 if test "${pkg_config_prog_path}" = "missing"; then
11638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11639 $as_echo "no - pkg-config not found" >&6; }
11640 if test "${enable_source_highlight}" = "yes"; then
11641 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11642 fi
11643 else
11644 case "$LDFLAGS" in
11645 *static-libstdc*)
11646 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11647 ;;
11648 esac
11649
11650 if ${pkg_config_prog_path} --exists source-highlight; then
11651 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11652 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11653
11654 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11655
11656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11657 $as_echo "yes" >&6; }
11658 else
11659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660 $as_echo "no" >&6; }
11661 if test "${enable_source_highlight}" = "yes"; then
11662 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11663 fi
11664 fi
11665 fi
11666 fi
11667
11668
11669
11670 # ------------------------- #
11671 # Checks for header files. #
11672 # ------------------------- #
11673
11674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11675 $as_echo_n "checking for ANSI C header files... " >&6; }
11676 if ${ac_cv_header_stdc+:} false; then :
11677 $as_echo_n "(cached) " >&6
11678 else
11679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11680 /* end confdefs.h. */
11681 #include <stdlib.h>
11682 #include <stdarg.h>
11683 #include <string.h>
11684 #include <float.h>
11685
11686 int
11687 main ()
11688 {
11689
11690 ;
11691 return 0;
11692 }
11693 _ACEOF
11694 if ac_fn_c_try_compile "$LINENO"; then :
11695 ac_cv_header_stdc=yes
11696 else
11697 ac_cv_header_stdc=no
11698 fi
11699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11700
11701 if test $ac_cv_header_stdc = yes; then
11702 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11704 /* end confdefs.h. */
11705 #include <string.h>
11706
11707 _ACEOF
11708 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11709 $EGREP "memchr" >/dev/null 2>&1; then :
11710
11711 else
11712 ac_cv_header_stdc=no
11713 fi
11714 rm -f conftest*
11715
11716 fi
11717
11718 if test $ac_cv_header_stdc = yes; then
11719 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11721 /* end confdefs.h. */
11722 #include <stdlib.h>
11723
11724 _ACEOF
11725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11726 $EGREP "free" >/dev/null 2>&1; then :
11727
11728 else
11729 ac_cv_header_stdc=no
11730 fi
11731 rm -f conftest*
11732
11733 fi
11734
11735 if test $ac_cv_header_stdc = yes; then
11736 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11737 if test "$cross_compiling" = yes; then :
11738 :
11739 else
11740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11741 /* end confdefs.h. */
11742 #include <ctype.h>
11743 #include <stdlib.h>
11744 #if ((' ' & 0x0FF) == 0x020)
11745 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11746 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11747 #else
11748 # define ISLOWER(c) \
11749 (('a' <= (c) && (c) <= 'i') \
11750 || ('j' <= (c) && (c) <= 'r') \
11751 || ('s' <= (c) && (c) <= 'z'))
11752 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11753 #endif
11754
11755 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11756 int
11757 main ()
11758 {
11759 int i;
11760 for (i = 0; i < 256; i++)
11761 if (XOR (islower (i), ISLOWER (i))
11762 || toupper (i) != TOUPPER (i))
11763 return 2;
11764 return 0;
11765 }
11766 _ACEOF
11767 if ac_fn_c_try_run "$LINENO"; then :
11768
11769 else
11770 ac_cv_header_stdc=no
11771 fi
11772 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11773 conftest.$ac_objext conftest.beam conftest.$ac_ext
11774 fi
11775
11776 fi
11777 fi
11778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11779 $as_echo "$ac_cv_header_stdc" >&6; }
11780 if test $ac_cv_header_stdc = yes; then
11781
11782 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11783
11784 fi
11785
11786 # elf_hp.h is for HP/UX 64-bit shared library support.
11787 for ac_header in nlist.h machine/reg.h \
11788 thread_db.h \
11789 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11790 sys/resource.h sys/ptrace.h ptrace.h \
11791 sys/reg.h sys/debugreg.h \
11792 termios.h elf_hp.h
11793 do :
11794 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11795 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11796 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11797 cat >>confdefs.h <<_ACEOF
11798 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11799 _ACEOF
11800
11801 fi
11802
11803 done
11804
11805 for ac_header in sys/user.h
11806 do :
11807 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11808 # include <sys/param.h>
11809 #endif
11810
11811 "
11812 if test "x$ac_cv_header_sys_user_h" = xyes; then :
11813 cat >>confdefs.h <<_ACEOF
11814 #define HAVE_SYS_USER_H 1
11815 _ACEOF
11816
11817 fi
11818
11819 done
11820
11821
11822 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11823 do :
11824 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11825 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11826 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11827 cat >>confdefs.h <<_ACEOF
11828 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11829 _ACEOF
11830
11831 fi
11832
11833 done
11834
11835 for ac_header in term.h
11836 do :
11837 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11838 # include <curses.h>
11839 #endif
11840
11841 "
11842 if test "x$ac_cv_header_term_h" = xyes; then :
11843 cat >>confdefs.h <<_ACEOF
11844 #define HAVE_TERM_H 1
11845 _ACEOF
11846
11847 fi
11848
11849 done
11850
11851
11852 for ac_header in sys/socket.h
11853 do :
11854 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
11855 if test "x$ac_cv_header_sys_socket_h" = xyes; then :
11856 cat >>confdefs.h <<_ACEOF
11857 #define HAVE_SYS_SOCKET_H 1
11858 _ACEOF
11859
11860 fi
11861
11862 done
11863
11864 for ac_header in ws2tcpip.h
11865 do :
11866 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
11867 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
11868 cat >>confdefs.h <<_ACEOF
11869 #define HAVE_WS2TCPIP_H 1
11870 _ACEOF
11871
11872 fi
11873
11874 done
11875
11876
11877 # ------------------------- #
11878 # Checks for declarations. #
11879 # ------------------------- #
11880
11881
11882 # Check for presence and size of long long.
11883 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11884 if test "x$ac_cv_type_long_long" = xyes; then :
11885
11886 cat >>confdefs.h <<_ACEOF
11887 #define HAVE_LONG_LONG 1
11888 _ACEOF
11889
11890 # The cast to long int works around a bug in the HP C Compiler
11891 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11892 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11893 # This bug is HP SR number 8606223364.
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11895 $as_echo_n "checking size of long long... " >&6; }
11896 if ${ac_cv_sizeof_long_long+:} false; then :
11897 $as_echo_n "(cached) " >&6
11898 else
11899 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11900
11901 else
11902 if test "$ac_cv_type_long_long" = yes; then
11903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11904 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11905 as_fn_error 77 "cannot compute sizeof (long long)
11906 See \`config.log' for more details" "$LINENO" 5; }
11907 else
11908 ac_cv_sizeof_long_long=0
11909 fi
11910 fi
11911
11912 fi
11913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11914 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11915
11916
11917
11918 cat >>confdefs.h <<_ACEOF
11919 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11920 _ACEOF
11921
11922
11923 fi
11924
11925
11926 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11927 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11928 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; 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_BASENAME $ac_have_decl
11936 _ACEOF
11937 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11938 if test "x$ac_cv_have_decl_ffs" = 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_FFS $ac_have_decl
11946 _ACEOF
11947 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11948 if test "x$ac_cv_have_decl_asprintf" = 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_ASPRINTF $ac_have_decl
11956 _ACEOF
11957 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11958 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11959 ac_have_decl=1
11960 else
11961 ac_have_decl=0
11962 fi
11963
11964 cat >>confdefs.h <<_ACEOF
11965 #define HAVE_DECL_VASPRINTF $ac_have_decl
11966 _ACEOF
11967 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11968 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11969 ac_have_decl=1
11970 else
11971 ac_have_decl=0
11972 fi
11973
11974 cat >>confdefs.h <<_ACEOF
11975 #define HAVE_DECL_SNPRINTF $ac_have_decl
11976 _ACEOF
11977 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11978 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11979 ac_have_decl=1
11980 else
11981 ac_have_decl=0
11982 fi
11983
11984 cat >>confdefs.h <<_ACEOF
11985 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11986 _ACEOF
11987
11988 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11989 if test "x$ac_cv_have_decl_strtol" = 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_STRTOL $ac_have_decl
11997 _ACEOF
11998 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11999 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12000 ac_have_decl=1
12001 else
12002 ac_have_decl=0
12003 fi
12004
12005 cat >>confdefs.h <<_ACEOF
12006 #define HAVE_DECL_STRTOUL $ac_have_decl
12007 _ACEOF
12008 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12009 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12010 ac_have_decl=1
12011 else
12012 ac_have_decl=0
12013 fi
12014
12015 cat >>confdefs.h <<_ACEOF
12016 #define HAVE_DECL_STRTOLL $ac_have_decl
12017 _ACEOF
12018 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12019 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12020 ac_have_decl=1
12021 else
12022 ac_have_decl=0
12023 fi
12024
12025 cat >>confdefs.h <<_ACEOF
12026 #define HAVE_DECL_STRTOULL $ac_have_decl
12027 _ACEOF
12028
12029 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12030 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12031 ac_have_decl=1
12032 else
12033 ac_have_decl=0
12034 fi
12035
12036 cat >>confdefs.h <<_ACEOF
12037 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12038 _ACEOF
12039
12040
12041
12042 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12043 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12044 ac_have_decl=1
12045 else
12046 ac_have_decl=0
12047 fi
12048
12049 cat >>confdefs.h <<_ACEOF
12050 #define HAVE_DECL_SNPRINTF $ac_have_decl
12051 _ACEOF
12052
12053
12054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12055 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12056 if ${am_cv_val_LC_MESSAGES+:} false; then :
12057 $as_echo_n "(cached) " >&6
12058 else
12059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12060 /* end confdefs.h. */
12061 #include <locale.h>
12062 int
12063 main ()
12064 {
12065 return LC_MESSAGES
12066 ;
12067 return 0;
12068 }
12069 _ACEOF
12070 if ac_fn_c_try_link "$LINENO"; then :
12071 am_cv_val_LC_MESSAGES=yes
12072 else
12073 am_cv_val_LC_MESSAGES=no
12074 fi
12075 rm -f core conftest.err conftest.$ac_objext \
12076 conftest$ac_exeext conftest.$ac_ext
12077 fi
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12079 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12080 if test $am_cv_val_LC_MESSAGES = yes; then
12081
12082 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12083
12084 fi
12085
12086
12087 # ------------------ #
12088 # Checks for types. #
12089 # ------------------ #
12090
12091 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12092 #if HAVE_SYS_SOCKET_H
12093 # include <sys/socket.h>
12094 #elif HAVE_WS2TCPIP_H
12095 # include <ws2tcpip.h>
12096 #endif
12097
12098 "
12099 if test "x$ac_cv_type_socklen_t" = xyes; then :
12100
12101 cat >>confdefs.h <<_ACEOF
12102 #define HAVE_SOCKLEN_T 1
12103 _ACEOF
12104
12105
12106 fi
12107
12108
12109 # ------------------------------------- #
12110 # Checks for compiler characteristics. #
12111 # ------------------------------------- #
12112
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12114 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12115 if ${ac_cv_c_const+:} false; then :
12116 $as_echo_n "(cached) " >&6
12117 else
12118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12119 /* end confdefs.h. */
12120
12121 int
12122 main ()
12123 {
12124
12125 #ifndef __cplusplus
12126 /* Ultrix mips cc rejects this sort of thing. */
12127 typedef int charset[2];
12128 const charset cs = { 0, 0 };
12129 /* SunOS 4.1.1 cc rejects this. */
12130 char const *const *pcpcc;
12131 char **ppc;
12132 /* NEC SVR4.0.2 mips cc rejects this. */
12133 struct point {int x, y;};
12134 static struct point const zero = {0,0};
12135 /* AIX XL C 1.02.0.0 rejects this.
12136 It does not let you subtract one const X* pointer from another in
12137 an arm of an if-expression whose if-part is not a constant
12138 expression */
12139 const char *g = "string";
12140 pcpcc = &g + (g ? g-g : 0);
12141 /* HPUX 7.0 cc rejects these. */
12142 ++pcpcc;
12143 ppc = (char**) pcpcc;
12144 pcpcc = (char const *const *) ppc;
12145 { /* SCO 3.2v4 cc rejects this sort of thing. */
12146 char tx;
12147 char *t = &tx;
12148 char const *s = 0 ? (char *) 0 : (char const *) 0;
12149
12150 *t++ = 0;
12151 if (s) return 0;
12152 }
12153 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12154 int x[] = {25, 17};
12155 const int *foo = &x[0];
12156 ++foo;
12157 }
12158 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12159 typedef const int *iptr;
12160 iptr p = 0;
12161 ++p;
12162 }
12163 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12164 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12165 struct s { int j; const int *ap[3]; } bx;
12166 struct s *b = &bx; b->j = 5;
12167 }
12168 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12169 const int foo = 10;
12170 if (!foo) return 0;
12171 }
12172 return !cs[0] && !zero.x;
12173 #endif
12174
12175 ;
12176 return 0;
12177 }
12178 _ACEOF
12179 if ac_fn_c_try_compile "$LINENO"; then :
12180 ac_cv_c_const=yes
12181 else
12182 ac_cv_c_const=no
12183 fi
12184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12185 fi
12186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12187 $as_echo "$ac_cv_c_const" >&6; }
12188 if test $ac_cv_c_const = no; then
12189
12190 $as_echo "#define const /**/" >>confdefs.h
12191
12192 fi
12193
12194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12195 $as_echo_n "checking for inline... " >&6; }
12196 if ${ac_cv_c_inline+:} false; then :
12197 $as_echo_n "(cached) " >&6
12198 else
12199 ac_cv_c_inline=no
12200 for ac_kw in inline __inline__ __inline; do
12201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12202 /* end confdefs.h. */
12203 #ifndef __cplusplus
12204 typedef int foo_t;
12205 static $ac_kw foo_t static_foo () {return 0; }
12206 $ac_kw foo_t foo () {return 0; }
12207 #endif
12208
12209 _ACEOF
12210 if ac_fn_c_try_compile "$LINENO"; then :
12211 ac_cv_c_inline=$ac_kw
12212 fi
12213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12214 test "$ac_cv_c_inline" != no && break
12215 done
12216
12217 fi
12218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12219 $as_echo "$ac_cv_c_inline" >&6; }
12220
12221 case $ac_cv_c_inline in
12222 inline | yes) ;;
12223 *)
12224 case $ac_cv_c_inline in
12225 no) ac_val=;;
12226 *) ac_val=$ac_cv_c_inline;;
12227 esac
12228 cat >>confdefs.h <<_ACEOF
12229 #ifndef __cplusplus
12230 #define inline $ac_val
12231 #endif
12232 _ACEOF
12233 ;;
12234 esac
12235
12236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12237 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12238 if ${ac_cv_c_bigendian+:} false; then :
12239 $as_echo_n "(cached) " >&6
12240 else
12241 ac_cv_c_bigendian=unknown
12242 # See if we're dealing with a universal compiler.
12243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244 /* end confdefs.h. */
12245 #ifndef __APPLE_CC__
12246 not a universal capable compiler
12247 #endif
12248 typedef int dummy;
12249
12250 _ACEOF
12251 if ac_fn_c_try_compile "$LINENO"; then :
12252
12253 # Check for potential -arch flags. It is not universal unless
12254 # there are at least two -arch flags with different values.
12255 ac_arch=
12256 ac_prev=
12257 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12258 if test -n "$ac_prev"; then
12259 case $ac_word in
12260 i?86 | x86_64 | ppc | ppc64)
12261 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12262 ac_arch=$ac_word
12263 else
12264 ac_cv_c_bigendian=universal
12265 break
12266 fi
12267 ;;
12268 esac
12269 ac_prev=
12270 elif test "x$ac_word" = "x-arch"; then
12271 ac_prev=arch
12272 fi
12273 done
12274 fi
12275 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12276 if test $ac_cv_c_bigendian = unknown; then
12277 # See if sys/param.h defines the BYTE_ORDER macro.
12278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12279 /* end confdefs.h. */
12280 #include <sys/types.h>
12281 #include <sys/param.h>
12282
12283 int
12284 main ()
12285 {
12286 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12287 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12288 && LITTLE_ENDIAN)
12289 bogus endian macros
12290 #endif
12291
12292 ;
12293 return 0;
12294 }
12295 _ACEOF
12296 if ac_fn_c_try_compile "$LINENO"; then :
12297 # It does; now see whether it defined to BIG_ENDIAN or not.
12298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12299 /* end confdefs.h. */
12300 #include <sys/types.h>
12301 #include <sys/param.h>
12302
12303 int
12304 main ()
12305 {
12306 #if BYTE_ORDER != BIG_ENDIAN
12307 not big endian
12308 #endif
12309
12310 ;
12311 return 0;
12312 }
12313 _ACEOF
12314 if ac_fn_c_try_compile "$LINENO"; then :
12315 ac_cv_c_bigendian=yes
12316 else
12317 ac_cv_c_bigendian=no
12318 fi
12319 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12320 fi
12321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12322 fi
12323 if test $ac_cv_c_bigendian = unknown; then
12324 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12326 /* end confdefs.h. */
12327 #include <limits.h>
12328
12329 int
12330 main ()
12331 {
12332 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12333 bogus endian macros
12334 #endif
12335
12336 ;
12337 return 0;
12338 }
12339 _ACEOF
12340 if ac_fn_c_try_compile "$LINENO"; then :
12341 # It does; now see whether it defined to _BIG_ENDIAN or not.
12342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12343 /* end confdefs.h. */
12344 #include <limits.h>
12345
12346 int
12347 main ()
12348 {
12349 #ifndef _BIG_ENDIAN
12350 not big endian
12351 #endif
12352
12353 ;
12354 return 0;
12355 }
12356 _ACEOF
12357 if ac_fn_c_try_compile "$LINENO"; then :
12358 ac_cv_c_bigendian=yes
12359 else
12360 ac_cv_c_bigendian=no
12361 fi
12362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12363 fi
12364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12365 fi
12366 if test $ac_cv_c_bigendian = unknown; then
12367 # Compile a test program.
12368 if test "$cross_compiling" = yes; then :
12369 # Try to guess by grepping values from an object file.
12370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12371 /* end confdefs.h. */
12372 short int ascii_mm[] =
12373 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12374 short int ascii_ii[] =
12375 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12376 int use_ascii (int i) {
12377 return ascii_mm[i] + ascii_ii[i];
12378 }
12379 short int ebcdic_ii[] =
12380 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12381 short int ebcdic_mm[] =
12382 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12383 int use_ebcdic (int i) {
12384 return ebcdic_mm[i] + ebcdic_ii[i];
12385 }
12386 extern int foo;
12387
12388 int
12389 main ()
12390 {
12391 return use_ascii (foo) == use_ebcdic (foo);
12392 ;
12393 return 0;
12394 }
12395 _ACEOF
12396 if ac_fn_c_try_compile "$LINENO"; then :
12397 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12398 ac_cv_c_bigendian=yes
12399 fi
12400 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12401 if test "$ac_cv_c_bigendian" = unknown; then
12402 ac_cv_c_bigendian=no
12403 else
12404 # finding both strings is unlikely to happen, but who knows?
12405 ac_cv_c_bigendian=unknown
12406 fi
12407 fi
12408 fi
12409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12410 else
12411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12412 /* end confdefs.h. */
12413 $ac_includes_default
12414 int
12415 main ()
12416 {
12417
12418 /* Are we little or big endian? From Harbison&Steele. */
12419 union
12420 {
12421 long int l;
12422 char c[sizeof (long int)];
12423 } u;
12424 u.l = 1;
12425 return u.c[sizeof (long int) - 1] == 1;
12426
12427 ;
12428 return 0;
12429 }
12430 _ACEOF
12431 if ac_fn_c_try_run "$LINENO"; then :
12432 ac_cv_c_bigendian=no
12433 else
12434 ac_cv_c_bigendian=yes
12435 fi
12436 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12437 conftest.$ac_objext conftest.beam conftest.$ac_ext
12438 fi
12439
12440 fi
12441 fi
12442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12443 $as_echo "$ac_cv_c_bigendian" >&6; }
12444 case $ac_cv_c_bigendian in #(
12445 yes)
12446 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12447 ;; #(
12448 no)
12449 ;; #(
12450 universal)
12451
12452 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12453
12454 ;; #(
12455 *)
12456 as_fn_error $? "unknown endianness
12457 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12458 esac
12459
12460
12461 # ------------------------------ #
12462 # Checks for library functions. #
12463 # ------------------------------ #
12464
12465 for ac_func in getuid getgid \
12466 pipe pread pread64 pwrite resize_term \
12467 getpgid setsid \
12468 sigaction sigsetmask socketpair \
12469 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12470 setrlimit getrlimit posix_madvise waitpid \
12471 use_default_colors
12472 do :
12473 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12474 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12475 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12476 cat >>confdefs.h <<_ACEOF
12477 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12478 _ACEOF
12479
12480 fi
12481 done
12482
12483
12484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12485 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12486 if ${am_cv_langinfo_codeset+:} false; then :
12487 $as_echo_n "(cached) " >&6
12488 else
12489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12490 /* end confdefs.h. */
12491 #include <langinfo.h>
12492 int
12493 main ()
12494 {
12495 char* cs = nl_langinfo(CODESET);
12496 ;
12497 return 0;
12498 }
12499 _ACEOF
12500 if ac_fn_c_try_link "$LINENO"; then :
12501 am_cv_langinfo_codeset=yes
12502 else
12503 am_cv_langinfo_codeset=no
12504 fi
12505 rm -f core conftest.err conftest.$ac_objext \
12506 conftest$ac_exeext conftest.$ac_ext
12507
12508 fi
12509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12510 $as_echo "$am_cv_langinfo_codeset" >&6; }
12511 if test $am_cv_langinfo_codeset = yes; then
12512
12513 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12514
12515 fi
12516
12517 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12518 if test "x$ac_cv_type_size_t" = xyes; then :
12519
12520 else
12521
12522 cat >>confdefs.h <<_ACEOF
12523 #define size_t unsigned int
12524 _ACEOF
12525
12526 fi
12527
12528
12529
12530
12531 for ac_header in $ac_header_list
12532 do :
12533 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12534 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12535 "
12536 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12537 cat >>confdefs.h <<_ACEOF
12538 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12539 _ACEOF
12540
12541 fi
12542
12543 done
12544
12545
12546
12547
12548
12549
12550
12551 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12552 if test "x$ac_cv_type_pid_t" = xyes; then :
12553
12554 else
12555
12556 cat >>confdefs.h <<_ACEOF
12557 #define pid_t int
12558 _ACEOF
12559
12560 fi
12561
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12563 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12564 if ${ac_cv_path_SED+:} false; then :
12565 $as_echo_n "(cached) " >&6
12566 else
12567 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12568 for ac_i in 1 2 3 4 5 6 7; do
12569 ac_script="$ac_script$as_nl$ac_script"
12570 done
12571 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12572 { ac_script=; unset ac_script;}
12573 if test -z "$SED"; then
12574 ac_path_SED_found=false
12575 # Loop through the user's path and test for each of PROGNAME-LIST
12576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12577 for as_dir in $PATH
12578 do
12579 IFS=$as_save_IFS
12580 test -z "$as_dir" && as_dir=.
12581 for ac_prog in sed gsed; do
12582 for ac_exec_ext in '' $ac_executable_extensions; do
12583 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12584 as_fn_executable_p "$ac_path_SED" || continue
12585 # Check for GNU ac_path_SED and select it if it is found.
12586 # Check for GNU $ac_path_SED
12587 case `"$ac_path_SED" --version 2>&1` in
12588 *GNU*)
12589 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12590 *)
12591 ac_count=0
12592 $as_echo_n 0123456789 >"conftest.in"
12593 while :
12594 do
12595 cat "conftest.in" "conftest.in" >"conftest.tmp"
12596 mv "conftest.tmp" "conftest.in"
12597 cp "conftest.in" "conftest.nl"
12598 $as_echo '' >> "conftest.nl"
12599 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12600 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12601 as_fn_arith $ac_count + 1 && ac_count=$as_val
12602 if test $ac_count -gt ${ac_path_SED_max-0}; then
12603 # Best one so far, save it but keep looking for a better one
12604 ac_cv_path_SED="$ac_path_SED"
12605 ac_path_SED_max=$ac_count
12606 fi
12607 # 10*(2^10) chars as input seems more than enough
12608 test $ac_count -gt 10 && break
12609 done
12610 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12611 esac
12612
12613 $ac_path_SED_found && break 3
12614 done
12615 done
12616 done
12617 IFS=$as_save_IFS
12618 if test -z "$ac_cv_path_SED"; then
12619 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12620 fi
12621 else
12622 ac_cv_path_SED=$SED
12623 fi
12624
12625 fi
12626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12627 $as_echo "$ac_cv_path_SED" >&6; }
12628 SED="$ac_cv_path_SED"
12629 rm -f conftest.sed
12630
12631
12632 # Set the 'development' global.
12633 . $srcdir/../bfd/development.sh
12634
12635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12636 $as_echo_n "checking for ANSI C header files... " >&6; }
12637 if ${ac_cv_header_stdc+:} false; then :
12638 $as_echo_n "(cached) " >&6
12639 else
12640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12641 /* end confdefs.h. */
12642 #include <stdlib.h>
12643 #include <stdarg.h>
12644 #include <string.h>
12645 #include <float.h>
12646
12647 int
12648 main ()
12649 {
12650
12651 ;
12652 return 0;
12653 }
12654 _ACEOF
12655 if ac_fn_c_try_compile "$LINENO"; then :
12656 ac_cv_header_stdc=yes
12657 else
12658 ac_cv_header_stdc=no
12659 fi
12660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12661
12662 if test $ac_cv_header_stdc = yes; then
12663 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12665 /* end confdefs.h. */
12666 #include <string.h>
12667
12668 _ACEOF
12669 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12670 $EGREP "memchr" >/dev/null 2>&1; then :
12671
12672 else
12673 ac_cv_header_stdc=no
12674 fi
12675 rm -f conftest*
12676
12677 fi
12678
12679 if test $ac_cv_header_stdc = yes; then
12680 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12682 /* end confdefs.h. */
12683 #include <stdlib.h>
12684
12685 _ACEOF
12686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12687 $EGREP "free" >/dev/null 2>&1; then :
12688
12689 else
12690 ac_cv_header_stdc=no
12691 fi
12692 rm -f conftest*
12693
12694 fi
12695
12696 if test $ac_cv_header_stdc = yes; then
12697 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12698 if test "$cross_compiling" = yes; then :
12699 :
12700 else
12701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12702 /* end confdefs.h. */
12703 #include <ctype.h>
12704 #include <stdlib.h>
12705 #if ((' ' & 0x0FF) == 0x020)
12706 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12707 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12708 #else
12709 # define ISLOWER(c) \
12710 (('a' <= (c) && (c) <= 'i') \
12711 || ('j' <= (c) && (c) <= 'r') \
12712 || ('s' <= (c) && (c) <= 'z'))
12713 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12714 #endif
12715
12716 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12717 int
12718 main ()
12719 {
12720 int i;
12721 for (i = 0; i < 256; i++)
12722 if (XOR (islower (i), ISLOWER (i))
12723 || toupper (i) != TOUPPER (i))
12724 return 2;
12725 return 0;
12726 }
12727 _ACEOF
12728 if ac_fn_c_try_run "$LINENO"; then :
12729
12730 else
12731 ac_cv_header_stdc=no
12732 fi
12733 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12734 conftest.$ac_objext conftest.beam conftest.$ac_ext
12735 fi
12736
12737 fi
12738 fi
12739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12740 $as_echo "$ac_cv_header_stdc" >&6; }
12741 if test $ac_cv_header_stdc = yes; then
12742
12743 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12744
12745 fi
12746
12747 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12748 # for constant arguments. Useless!
12749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12750 $as_echo_n "checking for working alloca.h... " >&6; }
12751 if ${ac_cv_working_alloca_h+:} false; then :
12752 $as_echo_n "(cached) " >&6
12753 else
12754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12755 /* end confdefs.h. */
12756 #include <alloca.h>
12757 int
12758 main ()
12759 {
12760 char *p = (char *) alloca (2 * sizeof (int));
12761 if (p) return 0;
12762 ;
12763 return 0;
12764 }
12765 _ACEOF
12766 if ac_fn_c_try_link "$LINENO"; then :
12767 ac_cv_working_alloca_h=yes
12768 else
12769 ac_cv_working_alloca_h=no
12770 fi
12771 rm -f core conftest.err conftest.$ac_objext \
12772 conftest$ac_exeext conftest.$ac_ext
12773 fi
12774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12775 $as_echo "$ac_cv_working_alloca_h" >&6; }
12776 if test $ac_cv_working_alloca_h = yes; then
12777
12778 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12779
12780 fi
12781
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12783 $as_echo_n "checking for alloca... " >&6; }
12784 if ${ac_cv_func_alloca_works+:} false; then :
12785 $as_echo_n "(cached) " >&6
12786 else
12787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12788 /* end confdefs.h. */
12789 #ifdef __GNUC__
12790 # define alloca __builtin_alloca
12791 #else
12792 # ifdef _MSC_VER
12793 # include <malloc.h>
12794 # define alloca _alloca
12795 # else
12796 # ifdef HAVE_ALLOCA_H
12797 # include <alloca.h>
12798 # else
12799 # ifdef _AIX
12800 #pragma alloca
12801 # else
12802 # ifndef alloca /* predefined by HP cc +Olibcalls */
12803 void *alloca (size_t);
12804 # endif
12805 # endif
12806 # endif
12807 # endif
12808 #endif
12809
12810 int
12811 main ()
12812 {
12813 char *p = (char *) alloca (1);
12814 if (p) return 0;
12815 ;
12816 return 0;
12817 }
12818 _ACEOF
12819 if ac_fn_c_try_link "$LINENO"; then :
12820 ac_cv_func_alloca_works=yes
12821 else
12822 ac_cv_func_alloca_works=no
12823 fi
12824 rm -f core conftest.err conftest.$ac_objext \
12825 conftest$ac_exeext conftest.$ac_ext
12826 fi
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12828 $as_echo "$ac_cv_func_alloca_works" >&6; }
12829
12830 if test $ac_cv_func_alloca_works = yes; then
12831
12832 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12833
12834 else
12835 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12836 # that cause trouble. Some versions do not even contain alloca or
12837 # contain a buggy version. If you still want to use their alloca,
12838 # use ar to extract alloca.o from them instead of compiling alloca.c.
12839
12840 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12841
12842 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12843
12844
12845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12846 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12847 if ${ac_cv_os_cray+:} false; then :
12848 $as_echo_n "(cached) " >&6
12849 else
12850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12851 /* end confdefs.h. */
12852 #if defined CRAY && ! defined CRAY2
12853 webecray
12854 #else
12855 wenotbecray
12856 #endif
12857
12858 _ACEOF
12859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12860 $EGREP "webecray" >/dev/null 2>&1; then :
12861 ac_cv_os_cray=yes
12862 else
12863 ac_cv_os_cray=no
12864 fi
12865 rm -f conftest*
12866
12867 fi
12868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12869 $as_echo "$ac_cv_os_cray" >&6; }
12870 if test $ac_cv_os_cray = yes; then
12871 for ac_func in _getb67 GETB67 getb67; do
12872 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12873 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12874 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12875
12876 cat >>confdefs.h <<_ACEOF
12877 #define CRAY_STACKSEG_END $ac_func
12878 _ACEOF
12879
12880 break
12881 fi
12882
12883 done
12884 fi
12885
12886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12887 $as_echo_n "checking stack direction for C alloca... " >&6; }
12888 if ${ac_cv_c_stack_direction+:} false; then :
12889 $as_echo_n "(cached) " >&6
12890 else
12891 if test "$cross_compiling" = yes; then :
12892 ac_cv_c_stack_direction=0
12893 else
12894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12895 /* end confdefs.h. */
12896 $ac_includes_default
12897 int
12898 find_stack_direction (int *addr, int depth)
12899 {
12900 int dir, dummy = 0;
12901 if (! addr)
12902 addr = &dummy;
12903 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12904 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12905 return dir + dummy;
12906 }
12907
12908 int
12909 main (int argc, char **argv)
12910 {
12911 return find_stack_direction (0, argc + !argv + 20) < 0;
12912 }
12913 _ACEOF
12914 if ac_fn_c_try_run "$LINENO"; then :
12915 ac_cv_c_stack_direction=1
12916 else
12917 ac_cv_c_stack_direction=-1
12918 fi
12919 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12920 conftest.$ac_objext conftest.beam conftest.$ac_ext
12921 fi
12922
12923 fi
12924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12925 $as_echo "$ac_cv_c_stack_direction" >&6; }
12926 cat >>confdefs.h <<_ACEOF
12927 #define STACK_DIRECTION $ac_cv_c_stack_direction
12928 _ACEOF
12929
12930
12931 fi
12932
12933
12934 WIN32APILIBS=
12935 case ${host} in
12936 *mingw32*)
12937
12938 $as_echo "#define USE_WIN32API 1" >>confdefs.h
12939
12940 WIN32APILIBS="-lws2_32"
12941 ;;
12942 esac
12943
12944
12945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12946 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12947 if ${am_cv_langinfo_codeset+:} false; then :
12948 $as_echo_n "(cached) " >&6
12949 else
12950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12951 /* end confdefs.h. */
12952 #include <langinfo.h>
12953 int
12954 main ()
12955 {
12956 char* cs = nl_langinfo(CODESET);
12957 ;
12958 return 0;
12959 }
12960 _ACEOF
12961 if ac_fn_c_try_link "$LINENO"; then :
12962 am_cv_langinfo_codeset=yes
12963 else
12964 am_cv_langinfo_codeset=no
12965 fi
12966 rm -f core conftest.err conftest.$ac_objext \
12967 conftest$ac_exeext conftest.$ac_ext
12968
12969 fi
12970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12971 $as_echo "$am_cv_langinfo_codeset" >&6; }
12972 if test $am_cv_langinfo_codeset = yes; then
12973
12974 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12975
12976 fi
12977
12978
12979 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 proc_service.h poll.h sys/poll.h sys/select.h
12980 do :
12981 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12982 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12983 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12984 cat >>confdefs.h <<_ACEOF
12985 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12986 _ACEOF
12987
12988 fi
12989
12990 done
12991
12992
12993
12994 for ac_func in getpagesize
12995 do :
12996 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12997 if test "x$ac_cv_func_getpagesize" = xyes; then :
12998 cat >>confdefs.h <<_ACEOF
12999 #define HAVE_GETPAGESIZE 1
13000 _ACEOF
13001
13002 fi
13003 done
13004
13005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13006 $as_echo_n "checking for working mmap... " >&6; }
13007 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
13008 $as_echo_n "(cached) " >&6
13009 else
13010 if test "$cross_compiling" = yes; then :
13011 ac_cv_func_mmap_fixed_mapped=no
13012 else
13013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13014 /* end confdefs.h. */
13015 $ac_includes_default
13016 /* malloc might have been renamed as rpl_malloc. */
13017 #undef malloc
13018
13019 /* Thanks to Mike Haertel and Jim Avera for this test.
13020 Here is a matrix of mmap possibilities:
13021 mmap private not fixed
13022 mmap private fixed at somewhere currently unmapped
13023 mmap private fixed at somewhere already mapped
13024 mmap shared not fixed
13025 mmap shared fixed at somewhere currently unmapped
13026 mmap shared fixed at somewhere already mapped
13027 For private mappings, we should verify that changes cannot be read()
13028 back from the file, nor mmap's back from the file at a different
13029 address. (There have been systems where private was not correctly
13030 implemented like the infamous i386 svr4.0, and systems where the
13031 VM page cache was not coherent with the file system buffer cache
13032 like early versions of FreeBSD and possibly contemporary NetBSD.)
13033 For shared mappings, we should conversely verify that changes get
13034 propagated back to all the places they're supposed to be.
13035
13036 Grep wants private fixed already mapped.
13037 The main things grep needs to know about mmap are:
13038 * does it exist and is it safe to write into the mmap'd area
13039 * how to use it (BSD variants) */
13040
13041 #include <fcntl.h>
13042 #include <sys/mman.h>
13043
13044 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13045 char *malloc ();
13046 #endif
13047
13048 /* This mess was copied from the GNU getpagesize.h. */
13049 #ifndef HAVE_GETPAGESIZE
13050 # ifdef _SC_PAGESIZE
13051 # define getpagesize() sysconf(_SC_PAGESIZE)
13052 # else /* no _SC_PAGESIZE */
13053 # ifdef HAVE_SYS_PARAM_H
13054 # include <sys/param.h>
13055 # ifdef EXEC_PAGESIZE
13056 # define getpagesize() EXEC_PAGESIZE
13057 # else /* no EXEC_PAGESIZE */
13058 # ifdef NBPG
13059 # define getpagesize() NBPG * CLSIZE
13060 # ifndef CLSIZE
13061 # define CLSIZE 1
13062 # endif /* no CLSIZE */
13063 # else /* no NBPG */
13064 # ifdef NBPC
13065 # define getpagesize() NBPC
13066 # else /* no NBPC */
13067 # ifdef PAGESIZE
13068 # define getpagesize() PAGESIZE
13069 # endif /* PAGESIZE */
13070 # endif /* no NBPC */
13071 # endif /* no NBPG */
13072 # endif /* no EXEC_PAGESIZE */
13073 # else /* no HAVE_SYS_PARAM_H */
13074 # define getpagesize() 8192 /* punt totally */
13075 # endif /* no HAVE_SYS_PARAM_H */
13076 # endif /* no _SC_PAGESIZE */
13077
13078 #endif /* no HAVE_GETPAGESIZE */
13079
13080 int
13081 main ()
13082 {
13083 char *data, *data2, *data3;
13084 const char *cdata2;
13085 int i, pagesize;
13086 int fd, fd2;
13087
13088 pagesize = getpagesize ();
13089
13090 /* First, make a file with some known garbage in it. */
13091 data = (char *) malloc (pagesize);
13092 if (!data)
13093 return 1;
13094 for (i = 0; i < pagesize; ++i)
13095 *(data + i) = rand ();
13096 umask (0);
13097 fd = creat ("conftest.mmap", 0600);
13098 if (fd < 0)
13099 return 2;
13100 if (write (fd, data, pagesize) != pagesize)
13101 return 3;
13102 close (fd);
13103
13104 /* Next, check that the tail of a page is zero-filled. File must have
13105 non-zero length, otherwise we risk SIGBUS for entire page. */
13106 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13107 if (fd2 < 0)
13108 return 4;
13109 cdata2 = "";
13110 if (write (fd2, cdata2, 1) != 1)
13111 return 5;
13112 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13113 if (data2 == MAP_FAILED)
13114 return 6;
13115 for (i = 0; i < pagesize; ++i)
13116 if (*(data2 + i))
13117 return 7;
13118 close (fd2);
13119 if (munmap (data2, pagesize))
13120 return 8;
13121
13122 /* Next, try to mmap the file at a fixed address which already has
13123 something else allocated at it. If we can, also make sure that
13124 we see the same garbage. */
13125 fd = open ("conftest.mmap", O_RDWR);
13126 if (fd < 0)
13127 return 9;
13128 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13129 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13130 return 10;
13131 for (i = 0; i < pagesize; ++i)
13132 if (*(data + i) != *(data2 + i))
13133 return 11;
13134
13135 /* Finally, make sure that changes to the mapped area do not
13136 percolate back to the file as seen by read(). (This is a bug on
13137 some variants of i386 svr4.0.) */
13138 for (i = 0; i < pagesize; ++i)
13139 *(data2 + i) = *(data2 + i) + 1;
13140 data3 = (char *) malloc (pagesize);
13141 if (!data3)
13142 return 12;
13143 if (read (fd, data3, pagesize) != pagesize)
13144 return 13;
13145 for (i = 0; i < pagesize; ++i)
13146 if (*(data + i) != *(data3 + i))
13147 return 14;
13148 close (fd);
13149 return 0;
13150 }
13151 _ACEOF
13152 if ac_fn_c_try_run "$LINENO"; then :
13153 ac_cv_func_mmap_fixed_mapped=yes
13154 else
13155 ac_cv_func_mmap_fixed_mapped=no
13156 fi
13157 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13158 conftest.$ac_objext conftest.beam conftest.$ac_ext
13159 fi
13160
13161 fi
13162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13163 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13164 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13165
13166 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13167
13168 fi
13169 rm -f conftest.mmap conftest.txt
13170
13171 for ac_header in vfork.h
13172 do :
13173 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13174 if test "x$ac_cv_header_vfork_h" = xyes; then :
13175 cat >>confdefs.h <<_ACEOF
13176 #define HAVE_VFORK_H 1
13177 _ACEOF
13178
13179 fi
13180
13181 done
13182
13183 for ac_func in fork vfork
13184 do :
13185 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13186 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13187 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13188 cat >>confdefs.h <<_ACEOF
13189 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13190 _ACEOF
13191
13192 fi
13193 done
13194
13195 if test "x$ac_cv_func_fork" = xyes; then
13196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13197 $as_echo_n "checking for working fork... " >&6; }
13198 if ${ac_cv_func_fork_works+:} false; then :
13199 $as_echo_n "(cached) " >&6
13200 else
13201 if test "$cross_compiling" = yes; then :
13202 ac_cv_func_fork_works=cross
13203 else
13204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13205 /* end confdefs.h. */
13206 $ac_includes_default
13207 int
13208 main ()
13209 {
13210
13211 /* By Ruediger Kuhlmann. */
13212 return fork () < 0;
13213
13214 ;
13215 return 0;
13216 }
13217 _ACEOF
13218 if ac_fn_c_try_run "$LINENO"; then :
13219 ac_cv_func_fork_works=yes
13220 else
13221 ac_cv_func_fork_works=no
13222 fi
13223 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13224 conftest.$ac_objext conftest.beam conftest.$ac_ext
13225 fi
13226
13227 fi
13228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13229 $as_echo "$ac_cv_func_fork_works" >&6; }
13230
13231 else
13232 ac_cv_func_fork_works=$ac_cv_func_fork
13233 fi
13234 if test "x$ac_cv_func_fork_works" = xcross; then
13235 case $host in
13236 *-*-amigaos* | *-*-msdosdjgpp*)
13237 # Override, as these systems have only a dummy fork() stub
13238 ac_cv_func_fork_works=no
13239 ;;
13240 *)
13241 ac_cv_func_fork_works=yes
13242 ;;
13243 esac
13244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13245 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13246 fi
13247 ac_cv_func_vfork_works=$ac_cv_func_vfork
13248 if test "x$ac_cv_func_vfork" = xyes; then
13249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13250 $as_echo_n "checking for working vfork... " >&6; }
13251 if ${ac_cv_func_vfork_works+:} false; then :
13252 $as_echo_n "(cached) " >&6
13253 else
13254 if test "$cross_compiling" = yes; then :
13255 ac_cv_func_vfork_works=cross
13256 else
13257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13258 /* end confdefs.h. */
13259 /* Thanks to Paul Eggert for this test. */
13260 $ac_includes_default
13261 #include <sys/wait.h>
13262 #ifdef HAVE_VFORK_H
13263 # include <vfork.h>
13264 #endif
13265 /* On some sparc systems, changes by the child to local and incoming
13266 argument registers are propagated back to the parent. The compiler
13267 is told about this with #include <vfork.h>, but some compilers
13268 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13269 static variable whose address is put into a register that is
13270 clobbered by the vfork. */
13271 static void
13272 #ifdef __cplusplus
13273 sparc_address_test (int arg)
13274 # else
13275 sparc_address_test (arg) int arg;
13276 #endif
13277 {
13278 static pid_t child;
13279 if (!child) {
13280 child = vfork ();
13281 if (child < 0) {
13282 perror ("vfork");
13283 _exit(2);
13284 }
13285 if (!child) {
13286 arg = getpid();
13287 write(-1, "", 0);
13288 _exit (arg);
13289 }
13290 }
13291 }
13292
13293 int
13294 main ()
13295 {
13296 pid_t parent = getpid ();
13297 pid_t child;
13298
13299 sparc_address_test (0);
13300
13301 child = vfork ();
13302
13303 if (child == 0) {
13304 /* Here is another test for sparc vfork register problems. This
13305 test uses lots of local variables, at least as many local
13306 variables as main has allocated so far including compiler
13307 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13308 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13309 reuse the register of parent for one of the local variables,
13310 since it will think that parent can't possibly be used any more
13311 in this routine. Assigning to the local variable will thus
13312 munge parent in the parent process. */
13313 pid_t
13314 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13315 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13316 /* Convince the compiler that p..p7 are live; otherwise, it might
13317 use the same hardware register for all 8 local variables. */
13318 if (p != p1 || p != p2 || p != p3 || p != p4
13319 || p != p5 || p != p6 || p != p7)
13320 _exit(1);
13321
13322 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13323 from child file descriptors. If the child closes a descriptor
13324 before it execs or exits, this munges the parent's descriptor
13325 as well. Test for this by closing stdout in the child. */
13326 _exit(close(fileno(stdout)) != 0);
13327 } else {
13328 int status;
13329 struct stat st;
13330
13331 while (wait(&status) != child)
13332 ;
13333 return (
13334 /* Was there some problem with vforking? */
13335 child < 0
13336
13337 /* Did the child fail? (This shouldn't happen.) */
13338 || status
13339
13340 /* Did the vfork/compiler bug occur? */
13341 || parent != getpid()
13342
13343 /* Did the file descriptor bug occur? */
13344 || fstat(fileno(stdout), &st) != 0
13345 );
13346 }
13347 }
13348 _ACEOF
13349 if ac_fn_c_try_run "$LINENO"; then :
13350 ac_cv_func_vfork_works=yes
13351 else
13352 ac_cv_func_vfork_works=no
13353 fi
13354 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13355 conftest.$ac_objext conftest.beam conftest.$ac_ext
13356 fi
13357
13358 fi
13359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13360 $as_echo "$ac_cv_func_vfork_works" >&6; }
13361
13362 fi;
13363 if test "x$ac_cv_func_fork_works" = xcross; then
13364 ac_cv_func_vfork_works=$ac_cv_func_vfork
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13366 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13367 fi
13368
13369 if test "x$ac_cv_func_vfork_works" = xyes; then
13370
13371 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13372
13373 else
13374
13375 $as_echo "#define vfork fork" >>confdefs.h
13376
13377 fi
13378 if test "x$ac_cv_func_fork_works" = xyes; then
13379
13380 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13381
13382 fi
13383
13384 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13385 ptrace64 sbrk setns sigaltstack sigprocmask \
13386 setpgid setpgrp getrusage getauxval
13387 do :
13388 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13389 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13390 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13391 cat >>confdefs.h <<_ACEOF
13392 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13393 _ACEOF
13394
13395 fi
13396 done
13397
13398
13399 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13400 "
13401 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13402 ac_have_decl=1
13403 else
13404 ac_have_decl=0
13405 fi
13406
13407 cat >>confdefs.h <<_ACEOF
13408 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13409 _ACEOF
13410
13411
13412 if test "$cross_compiling" = yes; then :
13413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13414 /* end confdefs.h. */
13415 #include <sys/personality.h>
13416 int
13417 main ()
13418 {
13419
13420 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13421 # define ADDR_NO_RANDOMIZE 0x0040000
13422 # endif
13423 /* Test the flag could be set and stays set. */
13424 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13425 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13426 return 1
13427 ;
13428 return 0;
13429 }
13430 _ACEOF
13431 if ac_fn_c_try_link "$LINENO"; then :
13432 have_personality=true
13433 else
13434 have_personality=false
13435 fi
13436 rm -f core conftest.err conftest.$ac_objext \
13437 conftest$ac_exeext conftest.$ac_ext
13438 else
13439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13440 /* end confdefs.h. */
13441 #include <sys/personality.h>
13442 int
13443 main ()
13444 {
13445
13446 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13447 # define ADDR_NO_RANDOMIZE 0x0040000
13448 # endif
13449 /* Test the flag could be set and stays set. */
13450 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13451 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13452 return 1
13453 ;
13454 return 0;
13455 }
13456 _ACEOF
13457 if ac_fn_c_try_run "$LINENO"; then :
13458 have_personality=true
13459 else
13460 have_personality=false
13461 fi
13462 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13463 conftest.$ac_objext conftest.beam conftest.$ac_ext
13464 fi
13465
13466 if $have_personality
13467 then
13468
13469 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
13470
13471 fi
13472
13473 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13474 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13475 ac_have_decl=1
13476 else
13477 ac_have_decl=0
13478 fi
13479
13480 cat >>confdefs.h <<_ACEOF
13481 #define HAVE_DECL_STRSTR $ac_have_decl
13482 _ACEOF
13483
13484
13485 # ----------------------- #
13486 # Checks for structures. #
13487 # ----------------------- #
13488
13489 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13490 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13491
13492 cat >>confdefs.h <<_ACEOF
13493 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13494 _ACEOF
13495
13496
13497 fi
13498 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13499 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13500
13501 cat >>confdefs.h <<_ACEOF
13502 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13503 _ACEOF
13504
13505
13506 fi
13507
13508
13509 # On FreeBSD we need libutil for the kinfo_get* functions. On
13510 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13511 # Figure out which one to use.
13512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13513 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13514 if ${ac_cv_search_kinfo_getfile+:} false; then :
13515 $as_echo_n "(cached) " >&6
13516 else
13517 ac_func_search_save_LIBS=$LIBS
13518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13519 /* end confdefs.h. */
13520
13521 /* Override any GCC internal prototype to avoid an error.
13522 Use char because int might match the return type of a GCC
13523 builtin and then its argument prototype would still apply. */
13524 #ifdef __cplusplus
13525 extern "C"
13526 #endif
13527 char kinfo_getfile ();
13528 int
13529 main ()
13530 {
13531 return kinfo_getfile ();
13532 ;
13533 return 0;
13534 }
13535 _ACEOF
13536 for ac_lib in '' util util-freebsd; do
13537 if test -z "$ac_lib"; then
13538 ac_res="none required"
13539 else
13540 ac_res=-l$ac_lib
13541 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13542 fi
13543 if ac_fn_c_try_link "$LINENO"; then :
13544 ac_cv_search_kinfo_getfile=$ac_res
13545 fi
13546 rm -f core conftest.err conftest.$ac_objext \
13547 conftest$ac_exeext
13548 if ${ac_cv_search_kinfo_getfile+:} false; then :
13549 break
13550 fi
13551 done
13552 if ${ac_cv_search_kinfo_getfile+:} false; then :
13553
13554 else
13555 ac_cv_search_kinfo_getfile=no
13556 fi
13557 rm conftest.$ac_ext
13558 LIBS=$ac_func_search_save_LIBS
13559 fi
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13561 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13562 ac_res=$ac_cv_search_kinfo_getfile
13563 if test "$ac_res" != no; then :
13564 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13565
13566 fi
13567
13568
13569 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
13570 for ac_func in kinfo_getfile
13571 do :
13572 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
13573 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
13574 cat >>confdefs.h <<_ACEOF
13575 #define HAVE_KINFO_GETFILE 1
13576 _ACEOF
13577
13578 fi
13579 done
13580
13581
13582 # Check for std::thread. This does not work on some platforms, like
13583 # mingw and DJGPP.
13584 ac_ext=cpp
13585 ac_cpp='$CXXCPP $CPPFLAGS'
13586 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13587 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13588 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13589
13590
13591
13592
13593
13594 ac_ext=c
13595 ac_cpp='$CPP $CPPFLAGS'
13596 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13597 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13598 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13599
13600 ax_pthread_ok=no
13601
13602 # We used to check for pthread.h first, but this fails if pthread.h
13603 # requires special compiler flags (e.g. on Tru64 or Sequent).
13604 # It gets checked for in the link test anyway.
13605
13606 # First of all, check if the user has set any of the PTHREAD_LIBS,
13607 # etcetera environment variables, and if threads linking works using
13608 # them:
13609 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13610 ax_pthread_save_CC="$CC"
13611 ax_pthread_save_CFLAGS="$CFLAGS"
13612 ax_pthread_save_LIBS="$LIBS"
13613 if test "x$PTHREAD_CC" != "x"; then :
13614 CC="$PTHREAD_CC"
13615 fi
13616 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13617 LIBS="$PTHREAD_LIBS $LIBS"
13618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13619 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13621 /* end confdefs.h. */
13622
13623 /* Override any GCC internal prototype to avoid an error.
13624 Use char because int might match the return type of a GCC
13625 builtin and then its argument prototype would still apply. */
13626 #ifdef __cplusplus
13627 extern "C"
13628 #endif
13629 char pthread_join ();
13630 int
13631 main ()
13632 {
13633 return pthread_join ();
13634 ;
13635 return 0;
13636 }
13637 _ACEOF
13638 if ac_fn_c_try_link "$LINENO"; then :
13639 ax_pthread_ok=yes
13640 fi
13641 rm -f core conftest.err conftest.$ac_objext \
13642 conftest$ac_exeext conftest.$ac_ext
13643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13644 $as_echo "$ax_pthread_ok" >&6; }
13645 if test "x$ax_pthread_ok" = "xno"; then
13646 PTHREAD_LIBS=""
13647 PTHREAD_CFLAGS=""
13648 fi
13649 CC="$ax_pthread_save_CC"
13650 CFLAGS="$ax_pthread_save_CFLAGS"
13651 LIBS="$ax_pthread_save_LIBS"
13652 fi
13653
13654 # We must check for the threads library under a number of different
13655 # names; the ordering is very important because some systems
13656 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13657 # libraries is broken (non-POSIX).
13658
13659 # Create a list of thread flags to try. Items starting with a "-" are
13660 # C compiler flags, and other items are library names, except for "none"
13661 # which indicates that we try without any flags at all, and "pthread-config"
13662 # which is a program returning the flags for the Pth emulation library.
13663
13664 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13665
13666 # The ordering *is* (sometimes) important. Some notes on the
13667 # individual items follow:
13668
13669 # pthreads: AIX (must check this before -lpthread)
13670 # none: in case threads are in libc; should be tried before -Kthread and
13671 # other compiler flags to prevent continual compiler warnings
13672 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13673 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13674 # (Note: HP C rejects this with "bad form for `-t' option")
13675 # -pthreads: Solaris/gcc (Note: HP C also rejects)
13676 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13677 # doesn't hurt to check since this sometimes defines pthreads and
13678 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
13679 # is present but should not be used directly; and before -mthreads,
13680 # because the compiler interprets this as "-mt" + "-hreads")
13681 # -mthreads: Mingw32/gcc, Lynx/gcc
13682 # pthread: Linux, etcetera
13683 # --thread-safe: KAI C++
13684 # pthread-config: use pthread-config program (for GNU Pth library)
13685
13686 case $host_os in
13687
13688 freebsd*)
13689
13690 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13691 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13692
13693 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13694 ;;
13695
13696 hpux*)
13697
13698 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13699 # multi-threading and also sets -lpthread."
13700
13701 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13702 ;;
13703
13704 openedition*)
13705
13706 # IBM z/OS requires a feature-test macro to be defined in order to
13707 # enable POSIX threads at all, so give the user a hint if this is
13708 # not set. (We don't define these ourselves, as they can affect
13709 # other portions of the system API in unpredictable ways.)
13710
13711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13712 /* end confdefs.h. */
13713
13714 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13715 AX_PTHREAD_ZOS_MISSING
13716 # endif
13717
13718 _ACEOF
13719 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13720 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13722 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13723 fi
13724 rm -f conftest*
13725
13726 ;;
13727
13728 solaris*)
13729
13730 # On Solaris (at least, for some versions), libc contains stubbed
13731 # (non-functional) versions of the pthreads routines, so link-based
13732 # tests will erroneously succeed. (N.B.: The stubs are missing
13733 # pthread_cleanup_push, or rather a function called by this macro,
13734 # so we could check for that, but who knows whether they'll stub
13735 # that too in a future libc.) So we'll check first for the
13736 # standard Solaris way of linking pthreads (-mt -lpthread).
13737
13738 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13739 ;;
13740 esac
13741
13742 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13743
13744 if test "x$GCC" = "xyes"; then :
13745 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13746 fi
13747
13748 # The presence of a feature test macro requesting re-entrant function
13749 # definitions is, on some systems, a strong hint that pthreads support is
13750 # correctly enabled
13751
13752 case $host_os in
13753 darwin* | hpux* | linux* | osf* | solaris*)
13754 ax_pthread_check_macro="_REENTRANT"
13755 ;;
13756
13757 aix*)
13758 ax_pthread_check_macro="_THREAD_SAFE"
13759 ;;
13760
13761 *)
13762 ax_pthread_check_macro="--"
13763 ;;
13764 esac
13765 if test "x$ax_pthread_check_macro" = "x--"; then :
13766 ax_pthread_check_cond=0
13767 else
13768 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13769 fi
13770
13771 # Are we compiling with Clang?
13772
13773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13774 $as_echo_n "checking whether $CC is Clang... " >&6; }
13775 if ${ax_cv_PTHREAD_CLANG+:} false; then :
13776 $as_echo_n "(cached) " >&6
13777 else
13778 ax_cv_PTHREAD_CLANG=no
13779 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13780 if test "x$GCC" = "xyes"; then
13781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13782 /* end confdefs.h. */
13783 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13784 # if defined(__clang__) && defined(__llvm__)
13785 AX_PTHREAD_CC_IS_CLANG
13786 # endif
13787
13788 _ACEOF
13789 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13790 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13791 ax_cv_PTHREAD_CLANG=yes
13792 fi
13793 rm -f conftest*
13794
13795 fi
13796
13797 fi
13798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13799 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13800 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13801
13802 ax_pthread_clang_warning=no
13803
13804 # Clang needs special handling, because older versions handle the -pthread
13805 # option in a rather... idiosyncratic way
13806
13807 if test "x$ax_pthread_clang" = "xyes"; then
13808
13809 # Clang takes -pthread; it has never supported any other flag
13810
13811 # (Note 1: This will need to be revisited if a system that Clang
13812 # supports has POSIX threads in a separate library. This tends not
13813 # to be the way of modern systems, but it's conceivable.)
13814
13815 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13816 # to get POSIX threads support; the API is always present and
13817 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13818 # -pthread does define _REENTRANT, and while the Darwin headers
13819 # ignore this macro, third-party headers might not.)
13820
13821 PTHREAD_CFLAGS="-pthread"
13822 PTHREAD_LIBS=
13823
13824 ax_pthread_ok=yes
13825
13826 # However, older versions of Clang make a point of warning the user
13827 # that, in an invocation where only linking and no compilation is
13828 # taking place, the -pthread option has no effect ("argument unused
13829 # during compilation"). They expect -pthread to be passed in only
13830 # when source code is being compiled.
13831 #
13832 # Problem is, this is at odds with the way Automake and most other
13833 # C build frameworks function, which is that the same flags used in
13834 # compilation (CFLAGS) are also used in linking. Many systems
13835 # supported by AX_PTHREAD require exactly this for POSIX threads
13836 # support, and in fact it is often not straightforward to specify a
13837 # flag that is used only in the compilation phase and not in
13838 # linking. Such a scenario is extremely rare in practice.
13839 #
13840 # Even though use of the -pthread flag in linking would only print
13841 # a warning, this can be a nuisance for well-run software projects
13842 # that build with -Werror. So if the active version of Clang has
13843 # this misfeature, we search for an option to squash it.
13844
13845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13846 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13847 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13848 $as_echo_n "(cached) " >&6
13849 else
13850 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13851 # Create an alternate version of $ac_link that compiles and
13852 # links in two steps (.c -> .o, .o -> exe) instead of one
13853 # (.c -> exe), because the warning occurs only in the second
13854 # step
13855 ax_pthread_save_ac_link="$ac_link"
13856 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13857 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13858 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13859 ax_pthread_save_CFLAGS="$CFLAGS"
13860 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13861 if test "x$ax_pthread_try" = "xunknown"; then :
13862 break
13863 fi
13864 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13865 ac_link="$ax_pthread_save_ac_link"
13866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13867 /* end confdefs.h. */
13868 int main(void){return 0;}
13869 _ACEOF
13870 if ac_fn_c_try_link "$LINENO"; then :
13871 ac_link="$ax_pthread_2step_ac_link"
13872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13873 /* end confdefs.h. */
13874 int main(void){return 0;}
13875 _ACEOF
13876 if ac_fn_c_try_link "$LINENO"; then :
13877 break
13878 fi
13879 rm -f core conftest.err conftest.$ac_objext \
13880 conftest$ac_exeext conftest.$ac_ext
13881
13882 fi
13883 rm -f core conftest.err conftest.$ac_objext \
13884 conftest$ac_exeext conftest.$ac_ext
13885 done
13886 ac_link="$ax_pthread_save_ac_link"
13887 CFLAGS="$ax_pthread_save_CFLAGS"
13888 if test "x$ax_pthread_try" = "x"; then :
13889 ax_pthread_try=no
13890 fi
13891 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13892
13893 fi
13894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13895 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13896
13897 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13898 no | unknown) ;;
13899 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13900 esac
13901
13902 fi # $ax_pthread_clang = yes
13903
13904 if test "x$ax_pthread_ok" = "xno"; then
13905 for ax_pthread_try_flag in $ax_pthread_flags; do
13906
13907 case $ax_pthread_try_flag in
13908 none)
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13910 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
13911 ;;
13912
13913 -mt,pthread)
13914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13915 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13916 PTHREAD_CFLAGS="-mt"
13917 PTHREAD_LIBS="-lpthread"
13918 ;;
13919
13920 -*)
13921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13922 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13923 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13924 ;;
13925
13926 pthread-config)
13927 # Extract the first word of "pthread-config", so it can be a program name with args.
13928 set dummy pthread-config; ac_word=$2
13929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13930 $as_echo_n "checking for $ac_word... " >&6; }
13931 if ${ac_cv_prog_ax_pthread_config+:} false; then :
13932 $as_echo_n "(cached) " >&6
13933 else
13934 if test -n "$ax_pthread_config"; then
13935 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13936 else
13937 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13938 for as_dir in $PATH
13939 do
13940 IFS=$as_save_IFS
13941 test -z "$as_dir" && as_dir=.
13942 for ac_exec_ext in '' $ac_executable_extensions; do
13943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13944 ac_cv_prog_ax_pthread_config="yes"
13945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13946 break 2
13947 fi
13948 done
13949 done
13950 IFS=$as_save_IFS
13951
13952 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13953 fi
13954 fi
13955 ax_pthread_config=$ac_cv_prog_ax_pthread_config
13956 if test -n "$ax_pthread_config"; then
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13958 $as_echo "$ax_pthread_config" >&6; }
13959 else
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13961 $as_echo "no" >&6; }
13962 fi
13963
13964
13965 if test "x$ax_pthread_config" = "xno"; then :
13966 continue
13967 fi
13968 PTHREAD_CFLAGS="`pthread-config --cflags`"
13969 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13970 ;;
13971
13972 *)
13973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13974 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13975 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13976 ;;
13977 esac
13978
13979 ax_pthread_save_CFLAGS="$CFLAGS"
13980 ax_pthread_save_LIBS="$LIBS"
13981 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13982 LIBS="$PTHREAD_LIBS $LIBS"
13983
13984 # Check for various functions. We must include pthread.h,
13985 # since some functions may be macros. (On the Sequent, we
13986 # need a special flag -Kthread to make this header compile.)
13987 # We check for pthread_join because it is in -lpthread on IRIX
13988 # while pthread_create is in libc. We check for pthread_attr_init
13989 # due to DEC craziness with -lpthreads. We check for
13990 # pthread_cleanup_push because it is one of the few pthread
13991 # functions on Solaris that doesn't have a non-functional libc stub.
13992 # We try pthread_create on general principles.
13993
13994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13995 /* end confdefs.h. */
13996 #include <pthread.h>
13997 # if $ax_pthread_check_cond
13998 # error "$ax_pthread_check_macro must be defined"
13999 # endif
14000 static void routine(void *a) { a = 0; }
14001 static void *start_routine(void *a) { return a; }
14002 int
14003 main ()
14004 {
14005 pthread_t th; pthread_attr_t attr;
14006 pthread_create(&th, 0, start_routine, 0);
14007 pthread_join(th, 0);
14008 pthread_attr_init(&attr);
14009 pthread_cleanup_push(routine, 0);
14010 pthread_cleanup_pop(0) /* ; */
14011 ;
14012 return 0;
14013 }
14014 _ACEOF
14015 if ac_fn_c_try_link "$LINENO"; then :
14016 ax_pthread_ok=yes
14017 fi
14018 rm -f core conftest.err conftest.$ac_objext \
14019 conftest$ac_exeext conftest.$ac_ext
14020
14021 CFLAGS="$ax_pthread_save_CFLAGS"
14022 LIBS="$ax_pthread_save_LIBS"
14023
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14025 $as_echo "$ax_pthread_ok" >&6; }
14026 if test "x$ax_pthread_ok" = "xyes"; then :
14027 break
14028 fi
14029
14030 PTHREAD_LIBS=""
14031 PTHREAD_CFLAGS=""
14032 done
14033 fi
14034
14035 # Various other checks:
14036 if test "x$ax_pthread_ok" = "xyes"; then
14037 ax_pthread_save_CFLAGS="$CFLAGS"
14038 ax_pthread_save_LIBS="$LIBS"
14039 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14040 LIBS="$PTHREAD_LIBS $LIBS"
14041
14042 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14044 $as_echo_n "checking for joinable pthread attribute... " >&6; }
14045 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14046 $as_echo_n "(cached) " >&6
14047 else
14048 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14049 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14051 /* end confdefs.h. */
14052 #include <pthread.h>
14053 int
14054 main ()
14055 {
14056 int attr = $ax_pthread_attr; return attr /* ; */
14057 ;
14058 return 0;
14059 }
14060 _ACEOF
14061 if ac_fn_c_try_link "$LINENO"; then :
14062 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14063 fi
14064 rm -f core conftest.err conftest.$ac_objext \
14065 conftest$ac_exeext conftest.$ac_ext
14066 done
14067
14068 fi
14069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14070 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14071 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14072 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14073 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14074
14075 cat >>confdefs.h <<_ACEOF
14076 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14077 _ACEOF
14078
14079 ax_pthread_joinable_attr_defined=yes
14080
14081 fi
14082
14083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14084 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14085 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14086 $as_echo_n "(cached) " >&6
14087 else
14088 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14089 case $host_os in
14090 solaris*)
14091 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14092 ;;
14093 esac
14094
14095 fi
14096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14097 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14098 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14099 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14100 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14101 ax_pthread_special_flags_added=yes
14102 fi
14103
14104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14105 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14106 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14107 $as_echo_n "(cached) " >&6
14108 else
14109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14110 /* end confdefs.h. */
14111 #include <pthread.h>
14112 int
14113 main ()
14114 {
14115 int i = PTHREAD_PRIO_INHERIT;
14116 ;
14117 return 0;
14118 }
14119 _ACEOF
14120 if ac_fn_c_try_link "$LINENO"; then :
14121 ax_cv_PTHREAD_PRIO_INHERIT=yes
14122 else
14123 ax_cv_PTHREAD_PRIO_INHERIT=no
14124 fi
14125 rm -f core conftest.err conftest.$ac_objext \
14126 conftest$ac_exeext conftest.$ac_ext
14127
14128 fi
14129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14130 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14131 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14132 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14133
14134 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14135
14136 ax_pthread_prio_inherit_defined=yes
14137
14138 fi
14139
14140 CFLAGS="$ax_pthread_save_CFLAGS"
14141 LIBS="$ax_pthread_save_LIBS"
14142
14143 # More AIX lossage: compile with *_r variant
14144 if test "x$GCC" != "xyes"; then
14145 case $host_os in
14146 aix*)
14147 case "x/$CC" in #(
14148 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14149 #handle absolute path differently from PATH based program lookup
14150 case "x$CC" in #(
14151 x/*) :
14152 if as_fn_executable_p ${CC}_r; then :
14153 PTHREAD_CC="${CC}_r"
14154 fi ;; #(
14155 *) :
14156 for ac_prog in ${CC}_r
14157 do
14158 # Extract the first word of "$ac_prog", so it can be a program name with args.
14159 set dummy $ac_prog; ac_word=$2
14160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14161 $as_echo_n "checking for $ac_word... " >&6; }
14162 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14163 $as_echo_n "(cached) " >&6
14164 else
14165 if test -n "$PTHREAD_CC"; then
14166 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14167 else
14168 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14169 for as_dir in $PATH
14170 do
14171 IFS=$as_save_IFS
14172 test -z "$as_dir" && as_dir=.
14173 for ac_exec_ext in '' $ac_executable_extensions; do
14174 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14175 ac_cv_prog_PTHREAD_CC="$ac_prog"
14176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14177 break 2
14178 fi
14179 done
14180 done
14181 IFS=$as_save_IFS
14182
14183 fi
14184 fi
14185 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14186 if test -n "$PTHREAD_CC"; then
14187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14188 $as_echo "$PTHREAD_CC" >&6; }
14189 else
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14191 $as_echo "no" >&6; }
14192 fi
14193
14194
14195 test -n "$PTHREAD_CC" && break
14196 done
14197 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14198 ;;
14199 esac ;; #(
14200 *) :
14201 ;;
14202 esac
14203 ;;
14204 esac
14205 fi
14206 fi
14207
14208 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14209
14210
14211
14212
14213
14214 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14215 if test "x$ax_pthread_ok" = "xyes"; then
14216 threads=yes
14217 :
14218 else
14219 ax_pthread_ok=no
14220 threads=no
14221 fi
14222 ac_ext=cpp
14223 ac_cpp='$CXXCPP $CPPFLAGS'
14224 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14225 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14226 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14227
14228
14229 if test "$threads" = "yes"; then
14230 save_LIBS="$LIBS"
14231 LIBS="$PTHREAD_LIBS $LIBS"
14232 save_CXXFLAGS="$CXXFLAGS"
14233 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14235 $as_echo_n "checking for std::thread... " >&6; }
14236 if ${gdb_cv_cxx_std_thread+:} false; then :
14237 $as_echo_n "(cached) " >&6
14238 else
14239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14240 /* end confdefs.h. */
14241 #include <thread>
14242 void callback() { }
14243 int
14244 main ()
14245 {
14246 std::thread t(callback);
14247 ;
14248 return 0;
14249 }
14250 _ACEOF
14251 if ac_fn_cxx_try_compile "$LINENO"; then :
14252 gdb_cv_cxx_std_thread=yes
14253 else
14254 gdb_cv_cxx_std_thread=no
14255 fi
14256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14257 fi
14258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14259 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
14260
14261 # This check must be here, while LIBS includes any necessary
14262 # threading library.
14263 for ac_func in pthread_sigmask pthread_setname_np
14264 do :
14265 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14266 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14267 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14268 cat >>confdefs.h <<_ACEOF
14269 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14270 _ACEOF
14271
14272 fi
14273 done
14274
14275
14276 LIBS="$save_LIBS"
14277 CXXFLAGS="$save_CXXFLAGS"
14278 fi
14279 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14280
14281 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14282
14283 fi
14284 ac_ext=c
14285 ac_cpp='$CPP $CPPFLAGS'
14286 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14287 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14288 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14289
14290
14291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14292 $as_echo_n "checking for sigsetjmp... " >&6; }
14293 if ${gdb_cv_func_sigsetjmp+:} false; then :
14294 $as_echo_n "(cached) " >&6
14295 else
14296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14297 /* end confdefs.h. */
14298
14299 #include <setjmp.h>
14300
14301 int
14302 main ()
14303 {
14304 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
14305 ;
14306 return 0;
14307 }
14308 _ACEOF
14309 if ac_fn_c_try_compile "$LINENO"; then :
14310 gdb_cv_func_sigsetjmp=yes
14311 else
14312 gdb_cv_func_sigsetjmp=no
14313 fi
14314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14315 fi
14316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14317 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14318 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14319
14320 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14321
14322 fi
14323
14324
14325 # Check whether --with-intel_pt was given.
14326 if test "${with_intel_pt+set}" = set; then :
14327 withval=$with_intel_pt;
14328 else
14329 with_intel_pt=auto
14330 fi
14331
14332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14333 $as_echo_n "checking whether to use intel pt... " >&6; }
14334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14335 $as_echo "$with_intel_pt" >&6; }
14336
14337 if test "${with_intel_pt}" = no; then
14338 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14339 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14340 HAVE_LIBIPT=no
14341 else
14342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14343 /* end confdefs.h. */
14344
14345 #include <linux/perf_event.h>
14346 #ifndef PERF_ATTR_SIZE_VER5
14347 # error
14348 #endif
14349
14350 _ACEOF
14351 if ac_fn_c_try_cpp "$LINENO"; then :
14352 perf_event=yes
14353 else
14354 perf_event=no
14355 fi
14356 rm -f conftest.err conftest.i conftest.$ac_ext
14357 if test "$perf_event" != yes; then
14358 if test "$with_intel_pt" = yes; then
14359 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14360 else
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14362 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14363 fi
14364 fi
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374 use_additional=yes
14375
14376 acl_save_prefix="$prefix"
14377 prefix="$acl_final_prefix"
14378 acl_save_exec_prefix="$exec_prefix"
14379 exec_prefix="$acl_final_exec_prefix"
14380
14381 eval additional_includedir=\"$includedir\"
14382 eval additional_libdir=\"$libdir\"
14383
14384 exec_prefix="$acl_save_exec_prefix"
14385 prefix="$acl_save_prefix"
14386
14387
14388 # Check whether --with-libipt-prefix was given.
14389 if test "${with_libipt_prefix+set}" = set; then :
14390 withval=$with_libipt_prefix;
14391 if test "X$withval" = "Xno"; then
14392 use_additional=no
14393 else
14394 if test "X$withval" = "X"; then
14395
14396 acl_save_prefix="$prefix"
14397 prefix="$acl_final_prefix"
14398 acl_save_exec_prefix="$exec_prefix"
14399 exec_prefix="$acl_final_exec_prefix"
14400
14401 eval additional_includedir=\"$includedir\"
14402 eval additional_libdir=\"$libdir\"
14403
14404 exec_prefix="$acl_save_exec_prefix"
14405 prefix="$acl_save_prefix"
14406
14407 else
14408 additional_includedir="$withval/include"
14409 additional_libdir="$withval/lib"
14410 fi
14411 fi
14412
14413 fi
14414
14415
14416 # Check whether --with-libipt-type was given.
14417 if test "${with_libipt_type+set}" = set; then :
14418 withval=$with_libipt_type; with_libipt_type=$withval
14419 else
14420 with_libipt_type=auto
14421 fi
14422
14423 lib_type=`eval echo \$with_libipt_type`
14424
14425 LIBIPT=
14426 LTLIBIPT=
14427 INCIPT=
14428 rpathdirs=
14429 ltrpathdirs=
14430 names_already_handled=
14431 names_next_round='ipt '
14432 while test -n "$names_next_round"; do
14433 names_this_round="$names_next_round"
14434 names_next_round=
14435 for name in $names_this_round; do
14436 already_handled=
14437 for n in $names_already_handled; do
14438 if test "$n" = "$name"; then
14439 already_handled=yes
14440 break
14441 fi
14442 done
14443 if test -z "$already_handled"; then
14444 names_already_handled="$names_already_handled $name"
14445 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14446 eval value=\"\$HAVE_LIB$uppername\"
14447 if test -n "$value"; then
14448 if test "$value" = yes; then
14449 eval value=\"\$LIB$uppername\"
14450 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14451 eval value=\"\$LTLIB$uppername\"
14452 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14453 else
14454 :
14455 fi
14456 else
14457 found_dir=
14458 found_la=
14459 found_so=
14460 found_a=
14461 if test $use_additional = yes; then
14462 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14463 found_dir="$additional_libdir"
14464 found_so="$additional_libdir/lib$name.$shlibext"
14465 if test -f "$additional_libdir/lib$name.la"; then
14466 found_la="$additional_libdir/lib$name.la"
14467 fi
14468 elif test x$lib_type != xshared; then
14469 if test -f "$additional_libdir/lib$name.$libext"; then
14470 found_dir="$additional_libdir"
14471 found_a="$additional_libdir/lib$name.$libext"
14472 if test -f "$additional_libdir/lib$name.la"; then
14473 found_la="$additional_libdir/lib$name.la"
14474 fi
14475 fi
14476 fi
14477 fi
14478 if test "X$found_dir" = "X"; then
14479 for x in $LDFLAGS $LTLIBIPT; do
14480
14481 acl_save_prefix="$prefix"
14482 prefix="$acl_final_prefix"
14483 acl_save_exec_prefix="$exec_prefix"
14484 exec_prefix="$acl_final_exec_prefix"
14485 eval x=\"$x\"
14486 exec_prefix="$acl_save_exec_prefix"
14487 prefix="$acl_save_prefix"
14488
14489 case "$x" in
14490 -L*)
14491 dir=`echo "X$x" | sed -e 's/^X-L//'`
14492 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14493 found_dir="$dir"
14494 found_so="$dir/lib$name.$shlibext"
14495 if test -f "$dir/lib$name.la"; then
14496 found_la="$dir/lib$name.la"
14497 fi
14498 elif test x$lib_type != xshared; then
14499 if test -f "$dir/lib$name.$libext"; then
14500 found_dir="$dir"
14501 found_a="$dir/lib$name.$libext"
14502 if test -f "$dir/lib$name.la"; then
14503 found_la="$dir/lib$name.la"
14504 fi
14505 fi
14506 fi
14507 ;;
14508 esac
14509 if test "X$found_dir" != "X"; then
14510 break
14511 fi
14512 done
14513 fi
14514 if test "X$found_dir" != "X"; then
14515 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14516 if test "X$found_so" != "X"; then
14517 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14518 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14519 else
14520 haveit=
14521 for x in $ltrpathdirs; do
14522 if test "X$x" = "X$found_dir"; then
14523 haveit=yes
14524 break
14525 fi
14526 done
14527 if test -z "$haveit"; then
14528 ltrpathdirs="$ltrpathdirs $found_dir"
14529 fi
14530 if test "$hardcode_direct" = yes; then
14531 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14532 else
14533 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14534 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14535 haveit=
14536 for x in $rpathdirs; do
14537 if test "X$x" = "X$found_dir"; then
14538 haveit=yes
14539 break
14540 fi
14541 done
14542 if test -z "$haveit"; then
14543 rpathdirs="$rpathdirs $found_dir"
14544 fi
14545 else
14546 haveit=
14547 for x in $LDFLAGS $LIBIPT; do
14548
14549 acl_save_prefix="$prefix"
14550 prefix="$acl_final_prefix"
14551 acl_save_exec_prefix="$exec_prefix"
14552 exec_prefix="$acl_final_exec_prefix"
14553 eval x=\"$x\"
14554 exec_prefix="$acl_save_exec_prefix"
14555 prefix="$acl_save_prefix"
14556
14557 if test "X$x" = "X-L$found_dir"; then
14558 haveit=yes
14559 break
14560 fi
14561 done
14562 if test -z "$haveit"; then
14563 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14564 fi
14565 if test "$hardcode_minus_L" != no; then
14566 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14567 else
14568 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14569 fi
14570 fi
14571 fi
14572 fi
14573 else
14574 if test "X$found_a" != "X"; then
14575 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14576 else
14577 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14578 fi
14579 fi
14580 additional_includedir=
14581 case "$found_dir" in
14582 */lib | */lib/)
14583 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14584 additional_includedir="$basedir/include"
14585 ;;
14586 esac
14587 if test "X$additional_includedir" != "X"; then
14588 if test "X$additional_includedir" != "X/usr/include"; then
14589 haveit=
14590 if test "X$additional_includedir" = "X/usr/local/include"; then
14591 if test -n "$GCC"; then
14592 case $host_os in
14593 linux*) haveit=yes;;
14594 esac
14595 fi
14596 fi
14597 if test -z "$haveit"; then
14598 for x in $CPPFLAGS $INCIPT; do
14599
14600 acl_save_prefix="$prefix"
14601 prefix="$acl_final_prefix"
14602 acl_save_exec_prefix="$exec_prefix"
14603 exec_prefix="$acl_final_exec_prefix"
14604 eval x=\"$x\"
14605 exec_prefix="$acl_save_exec_prefix"
14606 prefix="$acl_save_prefix"
14607
14608 if test "X$x" = "X-I$additional_includedir"; then
14609 haveit=yes
14610 break
14611 fi
14612 done
14613 if test -z "$haveit"; then
14614 if test -d "$additional_includedir"; then
14615 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14616 fi
14617 fi
14618 fi
14619 fi
14620 fi
14621 if test -n "$found_la"; then
14622 save_libdir="$libdir"
14623 case "$found_la" in
14624 */* | *\\*) . "$found_la" ;;
14625 *) . "./$found_la" ;;
14626 esac
14627 libdir="$save_libdir"
14628 for dep in $dependency_libs; do
14629 case "$dep" in
14630 -L*)
14631 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14632 if test "X$additional_libdir" != "X/usr/lib"; then
14633 haveit=
14634 if test "X$additional_libdir" = "X/usr/local/lib"; then
14635 if test -n "$GCC"; then
14636 case $host_os in
14637 linux*) haveit=yes;;
14638 esac
14639 fi
14640 fi
14641 if test -z "$haveit"; then
14642 haveit=
14643 for x in $LDFLAGS $LIBIPT; do
14644
14645 acl_save_prefix="$prefix"
14646 prefix="$acl_final_prefix"
14647 acl_save_exec_prefix="$exec_prefix"
14648 exec_prefix="$acl_final_exec_prefix"
14649 eval x=\"$x\"
14650 exec_prefix="$acl_save_exec_prefix"
14651 prefix="$acl_save_prefix"
14652
14653 if test "X$x" = "X-L$additional_libdir"; then
14654 haveit=yes
14655 break
14656 fi
14657 done
14658 if test -z "$haveit"; then
14659 if test -d "$additional_libdir"; then
14660 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14661 fi
14662 fi
14663 haveit=
14664 for x in $LDFLAGS $LTLIBIPT; do
14665
14666 acl_save_prefix="$prefix"
14667 prefix="$acl_final_prefix"
14668 acl_save_exec_prefix="$exec_prefix"
14669 exec_prefix="$acl_final_exec_prefix"
14670 eval x=\"$x\"
14671 exec_prefix="$acl_save_exec_prefix"
14672 prefix="$acl_save_prefix"
14673
14674 if test "X$x" = "X-L$additional_libdir"; then
14675 haveit=yes
14676 break
14677 fi
14678 done
14679 if test -z "$haveit"; then
14680 if test -d "$additional_libdir"; then
14681 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14682 fi
14683 fi
14684 fi
14685 fi
14686 ;;
14687 -R*)
14688 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14689 if test "$enable_rpath" != no; then
14690 haveit=
14691 for x in $rpathdirs; do
14692 if test "X$x" = "X$dir"; then
14693 haveit=yes
14694 break
14695 fi
14696 done
14697 if test -z "$haveit"; then
14698 rpathdirs="$rpathdirs $dir"
14699 fi
14700 haveit=
14701 for x in $ltrpathdirs; do
14702 if test "X$x" = "X$dir"; then
14703 haveit=yes
14704 break
14705 fi
14706 done
14707 if test -z "$haveit"; then
14708 ltrpathdirs="$ltrpathdirs $dir"
14709 fi
14710 fi
14711 ;;
14712 -l*)
14713 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14714 ;;
14715 *.la)
14716 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14717 ;;
14718 *)
14719 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14720 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14721 ;;
14722 esac
14723 done
14724 fi
14725 else
14726 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14727 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14728 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14729 else
14730 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14731 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14732 fi
14733 fi
14734 fi
14735 fi
14736 done
14737 done
14738 if test "X$rpathdirs" != "X"; then
14739 if test -n "$hardcode_libdir_separator"; then
14740 alldirs=
14741 for found_dir in $rpathdirs; do
14742 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14743 done
14744 acl_save_libdir="$libdir"
14745 libdir="$alldirs"
14746 eval flag=\"$hardcode_libdir_flag_spec\"
14747 libdir="$acl_save_libdir"
14748 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14749 else
14750 for found_dir in $rpathdirs; do
14751 acl_save_libdir="$libdir"
14752 libdir="$found_dir"
14753 eval flag=\"$hardcode_libdir_flag_spec\"
14754 libdir="$acl_save_libdir"
14755 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14756 done
14757 fi
14758 fi
14759 if test "X$ltrpathdirs" != "X"; then
14760 for found_dir in $ltrpathdirs; do
14761 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14762 done
14763 fi
14764
14765
14766 ac_save_CPPFLAGS="$CPPFLAGS"
14767
14768 for element in $INCIPT; do
14769 haveit=
14770 for x in $CPPFLAGS; do
14771
14772 acl_save_prefix="$prefix"
14773 prefix="$acl_final_prefix"
14774 acl_save_exec_prefix="$exec_prefix"
14775 exec_prefix="$acl_final_exec_prefix"
14776 eval x=\"$x\"
14777 exec_prefix="$acl_save_exec_prefix"
14778 prefix="$acl_save_prefix"
14779
14780 if test "X$x" = "X$element"; then
14781 haveit=yes
14782 break
14783 fi
14784 done
14785 if test -z "$haveit"; then
14786 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14787 fi
14788 done
14789
14790
14791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14792 $as_echo_n "checking for libipt... " >&6; }
14793 if ${ac_cv_libipt+:} false; then :
14794 $as_echo_n "(cached) " >&6
14795 else
14796
14797 ac_save_LIBS="$LIBS"
14798 LIBS="$LIBS $LIBIPT"
14799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14800 /* end confdefs.h. */
14801 #include "intel-pt.h"
14802 int
14803 main ()
14804 {
14805 pt_insn_alloc_decoder (0);
14806 ;
14807 return 0;
14808 }
14809 _ACEOF
14810 if ac_fn_c_try_link "$LINENO"; then :
14811 ac_cv_libipt=yes
14812 else
14813 ac_cv_libipt=no
14814 fi
14815 rm -f core conftest.err conftest.$ac_objext \
14816 conftest$ac_exeext conftest.$ac_ext
14817 LIBS="$ac_save_LIBS"
14818
14819 fi
14820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14821 $as_echo "$ac_cv_libipt" >&6; }
14822 if test "$ac_cv_libipt" = yes; then
14823 HAVE_LIBIPT=yes
14824
14825 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14826
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14828 $as_echo_n "checking how to link with libipt... " >&6; }
14829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14830 $as_echo "$LIBIPT" >&6; }
14831 else
14832 HAVE_LIBIPT=no
14833 CPPFLAGS="$ac_save_CPPFLAGS"
14834 LIBIPT=
14835 LTLIBIPT=
14836 fi
14837
14838
14839
14840
14841
14842
14843 if test "$HAVE_LIBIPT" != yes; then
14844 if test "$with_intel_pt" = yes; then
14845 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14846 else
14847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14848 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14849 fi
14850 else
14851 save_LIBS=$LIBS
14852 LIBS="$LIBS $LIBIPT"
14853 for ac_func in pt_insn_event
14854 do :
14855 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14856 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
14857 cat >>confdefs.h <<_ACEOF
14858 #define HAVE_PT_INSN_EVENT 1
14859 _ACEOF
14860
14861 fi
14862 done
14863
14864 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14865 "
14866 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
14867
14868 cat >>confdefs.h <<_ACEOF
14869 #define HAVE_STRUCT_PT_INSN_ENABLED 1
14870 _ACEOF
14871
14872
14873 fi
14874 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14875 "
14876 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14877
14878 cat >>confdefs.h <<_ACEOF
14879 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
14880 _ACEOF
14881
14882
14883 fi
14884
14885 LIBS=$save_LIBS
14886 fi
14887 fi
14888
14889
14890 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
14891
14892 for ac_header in sys/procfs.h
14893 do :
14894 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
14895 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
14896 cat >>confdefs.h <<_ACEOF
14897 #define HAVE_SYS_PROCFS_H 1
14898 _ACEOF
14899
14900 fi
14901
14902 done
14903
14904 if test "$ac_cv_header_sys_procfs_h" = yes; then
14905
14906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14907 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14908 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14909 $as_echo_n "(cached) " >&6
14910 else
14911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14912 /* end confdefs.h. */
14913
14914 #define _SYSCALL32
14915 #include <sys/procfs.h>
14916 int
14917 main ()
14918 {
14919 gregset_t avar
14920 ;
14921 return 0;
14922 }
14923 _ACEOF
14924 if ac_fn_c_try_compile "$LINENO"; then :
14925 bfd_cv_have_sys_procfs_type_gregset_t=yes
14926 else
14927 bfd_cv_have_sys_procfs_type_gregset_t=no
14928
14929 fi
14930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14931 fi
14932
14933 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14934
14935 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14936
14937 fi
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14939 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14940
14941
14942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14943 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14944 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14945 $as_echo_n "(cached) " >&6
14946 else
14947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14948 /* end confdefs.h. */
14949
14950 #define _SYSCALL32
14951 #include <sys/procfs.h>
14952 int
14953 main ()
14954 {
14955 fpregset_t avar
14956 ;
14957 return 0;
14958 }
14959 _ACEOF
14960 if ac_fn_c_try_compile "$LINENO"; then :
14961 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14962 else
14963 bfd_cv_have_sys_procfs_type_fpregset_t=no
14964
14965 fi
14966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14967 fi
14968
14969 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14970
14971 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14972
14973 fi
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14975 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14976
14977
14978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14979 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14980 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14981 $as_echo_n "(cached) " >&6
14982 else
14983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984 /* end confdefs.h. */
14985
14986 #define _SYSCALL32
14987 #include <sys/procfs.h>
14988 int
14989 main ()
14990 {
14991 prgregset_t avar
14992 ;
14993 return 0;
14994 }
14995 _ACEOF
14996 if ac_fn_c_try_compile "$LINENO"; then :
14997 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14998 else
14999 bfd_cv_have_sys_procfs_type_prgregset_t=no
15000
15001 fi
15002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15003 fi
15004
15005 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
15006
15007 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15008
15009 fi
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15011 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15012
15013
15014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15015 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15016 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
15017 $as_echo_n "(cached) " >&6
15018 else
15019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15020 /* end confdefs.h. */
15021
15022 #define _SYSCALL32
15023 #include <sys/procfs.h>
15024 int
15025 main ()
15026 {
15027 prfpregset_t avar
15028 ;
15029 return 0;
15030 }
15031 _ACEOF
15032 if ac_fn_c_try_compile "$LINENO"; then :
15033 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
15034 else
15035 bfd_cv_have_sys_procfs_type_prfpregset_t=no
15036
15037 fi
15038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15039 fi
15040
15041 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15042
15043 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15044
15045 fi
15046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15047 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15048
15049
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15051 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15052 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15053 $as_echo_n "(cached) " >&6
15054 else
15055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056 /* end confdefs.h. */
15057
15058 #define _SYSCALL32
15059 #include <sys/procfs.h>
15060 int
15061 main ()
15062 {
15063 prgregset32_t avar
15064 ;
15065 return 0;
15066 }
15067 _ACEOF
15068 if ac_fn_c_try_compile "$LINENO"; then :
15069 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15070 else
15071 bfd_cv_have_sys_procfs_type_prgregset32_t=no
15072
15073 fi
15074 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15075 fi
15076
15077 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15078
15079 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15080
15081 fi
15082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15083 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15084
15085
15086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15087 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15088 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15089 $as_echo_n "(cached) " >&6
15090 else
15091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15092 /* end confdefs.h. */
15093
15094 #define _SYSCALL32
15095 #include <sys/procfs.h>
15096 int
15097 main ()
15098 {
15099 lwpid_t avar
15100 ;
15101 return 0;
15102 }
15103 _ACEOF
15104 if ac_fn_c_try_compile "$LINENO"; then :
15105 bfd_cv_have_sys_procfs_type_lwpid_t=yes
15106 else
15107 bfd_cv_have_sys_procfs_type_lwpid_t=no
15108
15109 fi
15110 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15111 fi
15112
15113 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15114
15115 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15116
15117 fi
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15119 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15120
15121
15122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15123 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15124 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15125 $as_echo_n "(cached) " >&6
15126 else
15127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15128 /* end confdefs.h. */
15129
15130 #define _SYSCALL32
15131 #include <sys/procfs.h>
15132 int
15133 main ()
15134 {
15135 psaddr_t avar
15136 ;
15137 return 0;
15138 }
15139 _ACEOF
15140 if ac_fn_c_try_compile "$LINENO"; then :
15141 bfd_cv_have_sys_procfs_type_psaddr_t=yes
15142 else
15143 bfd_cv_have_sys_procfs_type_psaddr_t=no
15144
15145 fi
15146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15147 fi
15148
15149 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15150
15151 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15152
15153 fi
15154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15155 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15156
15157
15158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15159 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15160 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15161 $as_echo_n "(cached) " >&6
15162 else
15163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15164 /* end confdefs.h. */
15165
15166 #define _SYSCALL32
15167 #include <sys/procfs.h>
15168 int
15169 main ()
15170 {
15171 elf_fpregset_t avar
15172 ;
15173 return 0;
15174 }
15175 _ACEOF
15176 if ac_fn_c_try_compile "$LINENO"; then :
15177 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15178 else
15179 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15180
15181 fi
15182 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15183 fi
15184
15185 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15186
15187 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15188
15189 fi
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15191 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15192
15193 fi
15194
15195
15196 # Check the return and argument types of ptrace.
15197
15198
15199 for ac_header in sys/ptrace.h ptrace.h
15200 do :
15201 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15202 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15203 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15204 cat >>confdefs.h <<_ACEOF
15205 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15206 _ACEOF
15207
15208 fi
15209
15210 done
15211
15212
15213 gdb_ptrace_headers='
15214 #include <sys/types.h>
15215 #if HAVE_SYS_PTRACE_H
15216 # include <sys/ptrace.h>
15217 #endif
15218 #if HAVE_UNISTD_H
15219 # include <unistd.h>
15220 #endif
15221 '
15222
15223 # Check return type. Varargs (used on GNU/Linux) conflict with the
15224 # empty argument list, so check for that explicitly.
15225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15226 $as_echo_n "checking return type of ptrace... " >&6; }
15227 if ${gdb_cv_func_ptrace_ret+:} false; then :
15228 $as_echo_n "(cached) " >&6
15229 else
15230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15231 /* end confdefs.h. */
15232 $gdb_ptrace_headers
15233 int
15234 main ()
15235 {
15236 extern long ptrace (enum __ptrace_request, ...);
15237 ;
15238 return 0;
15239 }
15240 _ACEOF
15241 if ac_fn_c_try_compile "$LINENO"; then :
15242 gdb_cv_func_ptrace_ret='long'
15243 else
15244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15245 /* end confdefs.h. */
15246 $gdb_ptrace_headers
15247 int
15248 main ()
15249 {
15250 extern int ptrace ();
15251 ;
15252 return 0;
15253 }
15254 _ACEOF
15255 if ac_fn_c_try_compile "$LINENO"; then :
15256 gdb_cv_func_ptrace_ret='int'
15257 else
15258 gdb_cv_func_ptrace_ret='long'
15259 fi
15260 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15261 fi
15262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15263 fi
15264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15265 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15266
15267 cat >>confdefs.h <<_ACEOF
15268 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15269 _ACEOF
15270
15271 # Check argument types.
15272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15273 $as_echo_n "checking types of arguments for ptrace... " >&6; }
15274 if ${gdb_cv_func_ptrace_args+:} false; then :
15275 $as_echo_n "(cached) " >&6
15276 else
15277
15278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15279 /* end confdefs.h. */
15280 $gdb_ptrace_headers
15281 int
15282 main ()
15283 {
15284 extern long ptrace (enum __ptrace_request, ...);
15285 ;
15286 return 0;
15287 }
15288 _ACEOF
15289 if ac_fn_c_try_compile "$LINENO"; then :
15290 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15291 else
15292
15293 for gdb_arg1 in 'int' 'long'; do
15294 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15295 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15296 for gdb_arg4 in 'int' 'long' 'void *'; do
15297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15298 /* end confdefs.h. */
15299 $gdb_ptrace_headers
15300 int
15301 main ()
15302 {
15303
15304 extern $gdb_cv_func_ptrace_ret
15305 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15306
15307 ;
15308 return 0;
15309 }
15310 _ACEOF
15311 if ac_fn_c_try_compile "$LINENO"; then :
15312 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15313 break 4;
15314 fi
15315 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15316 for gdb_arg5 in 'int *' 'int' 'long'; do
15317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15318 /* end confdefs.h. */
15319 $gdb_ptrace_headers
15320 int
15321 main ()
15322 {
15323
15324 extern $gdb_cv_func_ptrace_ret
15325 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15326
15327 ;
15328 return 0;
15329 }
15330 _ACEOF
15331 if ac_fn_c_try_compile "$LINENO"; then :
15332
15333 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15334 break 5;
15335 fi
15336 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15337 done
15338 done
15339 done
15340 done
15341 done
15342 # Provide a safe default value.
15343 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15344
15345 fi
15346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15347 fi
15348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15349 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15350 ac_save_IFS=$IFS; IFS=','
15351 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15352 IFS=$ac_save_IFS
15353 shift
15354
15355 cat >>confdefs.h <<_ACEOF
15356 #define PTRACE_TYPE_ARG1 $1
15357 _ACEOF
15358
15359
15360 cat >>confdefs.h <<_ACEOF
15361 #define PTRACE_TYPE_ARG3 $3
15362 _ACEOF
15363
15364
15365 cat >>confdefs.h <<_ACEOF
15366 #define PTRACE_TYPE_ARG4 $4
15367 _ACEOF
15368
15369 if test -n "$5"; then
15370
15371 cat >>confdefs.h <<_ACEOF
15372 #define PTRACE_TYPE_ARG5 $5
15373 _ACEOF
15374
15375 fi
15376
15377
15378 if test "$cross_compiling" = no; then
15379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15380 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15381 if ${ac_cv_func_setpgrp_void+:} false; then :
15382 $as_echo_n "(cached) " >&6
15383 else
15384 if test "$cross_compiling" = yes; then :
15385 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15386 else
15387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15388 /* end confdefs.h. */
15389 $ac_includes_default
15390 int
15391 main ()
15392 {
15393 /* If this system has a BSD-style setpgrp which takes arguments,
15394 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15395 exit successfully. */
15396 return setpgrp (1,1) != -1;
15397 ;
15398 return 0;
15399 }
15400 _ACEOF
15401 if ac_fn_c_try_run "$LINENO"; then :
15402 ac_cv_func_setpgrp_void=no
15403 else
15404 ac_cv_func_setpgrp_void=yes
15405 fi
15406 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15407 conftest.$ac_objext conftest.beam conftest.$ac_ext
15408 fi
15409
15410 fi
15411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15412 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15413 if test $ac_cv_func_setpgrp_void = yes; then
15414
15415 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15416
15417 fi
15418
15419 else
15420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15421 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15422 if ${ac_cv_func_setpgrp_void+:} false; then :
15423 $as_echo_n "(cached) " >&6
15424 else
15425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15426 /* end confdefs.h. */
15427
15428 #include <unistd.h>
15429
15430 int
15431 main ()
15432 {
15433
15434 if (setpgrp(1,1) == -1)
15435 exit (0);
15436 else
15437 exit (1);
15438
15439 ;
15440 return 0;
15441 }
15442 _ACEOF
15443 if ac_fn_c_try_compile "$LINENO"; then :
15444 ac_cv_func_setpgrp_void=no
15445 else
15446 ac_cv_func_setpgrp_void=yes
15447 fi
15448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15449 fi
15450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15451 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15452 if test "$ac_cv_func_setpgrp_void" = yes; then
15453 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15454
15455 fi
15456 fi
15457
15458 # Assume we'll default to using the included libiberty regex.
15459 gdb_use_included_regex=yes
15460
15461 # However, if the system regex is GNU regex, then default to *not*
15462 # using the included regex.
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15464 $as_echo_n "checking for GNU regex... " >&6; }
15465 if ${gdb_cv_have_gnu_regex+:} false; then :
15466 $as_echo_n "(cached) " >&6
15467 else
15468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15469 /* end confdefs.h. */
15470 #include <gnu-versions.h>
15471 int
15472 main ()
15473 {
15474 #define REGEX_INTERFACE_VERSION 1
15475 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15476 # error "Version mismatch"
15477 #endif
15478 ;
15479 return 0;
15480 }
15481 _ACEOF
15482 if ac_fn_c_try_compile "$LINENO"; then :
15483 gdb_cv_have_gnu_regex=yes
15484 else
15485 gdb_cv_have_gnu_regex=no
15486 fi
15487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15488 fi
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15490 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
15491 if test "$gdb_cv_have_gnu_regex" = yes; then
15492 gdb_use_included_regex=no
15493 fi
15494
15495
15496 # Check whether --with-included-regex was given.
15497 if test "${with_included_regex+set}" = set; then :
15498 withval=$with_included_regex; gdb_with_regex=$withval
15499 else
15500 gdb_with_regex=$gdb_use_included_regex
15501 fi
15502
15503 if test "$gdb_with_regex" = yes; then
15504
15505 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
15506
15507 fi
15508
15509 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15510 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15511 #include <sys/proc.h>
15512
15513 "
15514 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15515
15516 cat >>confdefs.h <<_ACEOF
15517 #define HAVE_STRUCT_THREAD_TD_PCB 1
15518 _ACEOF
15519
15520
15521 fi
15522
15523
15524 # See if <sys/lwp.h> defines `struct lwp`.
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15526 $as_echo_n "checking for struct lwp... " >&6; }
15527 if ${gdb_cv_struct_lwp+:} false; then :
15528 $as_echo_n "(cached) " >&6
15529 else
15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15531 /* end confdefs.h. */
15532 #include <sys/param.h>
15533 #define _KMEMUSER
15534 #include <sys/lwp.h>
15535 int
15536 main ()
15537 {
15538 struct lwp l;
15539 ;
15540 return 0;
15541 }
15542 _ACEOF
15543 if ac_fn_c_try_compile "$LINENO"; then :
15544 gdb_cv_struct_lwp=yes
15545 else
15546 gdb_cv_struct_lwp=no
15547 fi
15548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15549 fi
15550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15551 $as_echo "$gdb_cv_struct_lwp" >&6; }
15552 if test "$gdb_cv_struct_lwp" = yes; then
15553
15554 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15555
15556 fi
15557
15558 # See if <machine/reg.h> degines `struct reg'.
15559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15560 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15561 if ${gdb_cv_struct_reg+:} false; then :
15562 $as_echo_n "(cached) " >&6
15563 else
15564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15565 /* end confdefs.h. */
15566 #include <sys/types.h>
15567 #include <machine/reg.h>
15568 int
15569 main ()
15570 {
15571 struct reg r;
15572 ;
15573 return 0;
15574 }
15575 _ACEOF
15576 if ac_fn_c_try_compile "$LINENO"; then :
15577 gdb_cv_struct_reg=yes
15578 else
15579 gdb_cv_struct_reg=no
15580 fi
15581 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15582 fi
15583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15584 $as_echo "$gdb_cv_struct_reg" >&6; }
15585 if test "$gdb_cv_struct_reg" = yes; then
15586
15587 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15588
15589 fi
15590
15591 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15592 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15593 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15594 #include <machine/reg.h>
15595 "
15596 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15597
15598 cat >>confdefs.h <<_ACEOF
15599 #define HAVE_STRUCT_REG_R_FS 1
15600 _ACEOF
15601
15602
15603 fi
15604 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15605 #include <machine/reg.h>
15606 "
15607 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15608
15609 cat >>confdefs.h <<_ACEOF
15610 #define HAVE_STRUCT_REG_R_GS 1
15611 _ACEOF
15612
15613
15614 fi
15615
15616
15617 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15619 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15620 if ${gdb_cv_have_ptrace_getregs+:} false; then :
15621 $as_echo_n "(cached) " >&6
15622 else
15623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15624 /* end confdefs.h. */
15625 #include <sys/ptrace.h>
15626 int
15627 main ()
15628 {
15629 PTRACE_GETREGS;
15630 ;
15631 return 0;
15632 }
15633 _ACEOF
15634 if ac_fn_c_try_compile "$LINENO"; then :
15635 gdb_cv_have_ptrace_getregs=yes
15636 else
15637 gdb_cv_have_ptrace_getregs=no
15638 fi
15639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15640 fi
15641
15642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15643 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15644 if test "$gdb_cv_have_ptrace_getregs" = yes; then
15645
15646 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15647
15648 fi
15649
15650 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15652 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15653 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15654 $as_echo_n "(cached) " >&6
15655 else
15656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15657 /* end confdefs.h. */
15658 #include <sys/ptrace.h>
15659 int
15660 main ()
15661 {
15662 PTRACE_GETFPXREGS;
15663 ;
15664 return 0;
15665 }
15666 _ACEOF
15667 if ac_fn_c_try_compile "$LINENO"; then :
15668 gdb_cv_have_ptrace_getfpxregs=yes
15669 else
15670 gdb_cv_have_ptrace_getfpxregs=no
15671 fi
15672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15673 fi
15674
15675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15676 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15677 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
15678
15679 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
15680
15681 fi
15682
15683 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15685 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
15686 if ${gdb_cv_have_pt_getdbregs+:} false; then :
15687 $as_echo_n "(cached) " >&6
15688 else
15689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15690 /* end confdefs.h. */
15691 #include <sys/types.h>
15692 #include <sys/ptrace.h>
15693 int
15694 main ()
15695 {
15696 PT_GETDBREGS;
15697 ;
15698 return 0;
15699 }
15700 _ACEOF
15701 if ac_fn_c_try_compile "$LINENO"; then :
15702 gdb_cv_have_pt_getdbregs=yes
15703 else
15704 gdb_cv_have_pt_getdbregs=no
15705 fi
15706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15707 fi
15708
15709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15710 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15711 if test "$gdb_cv_have_pt_getdbregs" = yes; then
15712
15713 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
15714
15715 fi
15716
15717 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15719 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15720 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
15721 $as_echo_n "(cached) " >&6
15722 else
15723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15724 /* end confdefs.h. */
15725 #include <sys/types.h>
15726 #include <sys/ptrace.h>
15727 int
15728 main ()
15729 {
15730 PT_GETXMMREGS;
15731 ;
15732 return 0;
15733 }
15734 _ACEOF
15735 if ac_fn_c_try_compile "$LINENO"; then :
15736 gdb_cv_have_pt_getxmmregs=yes
15737 else
15738 gdb_cv_have_pt_getxmmregs=no
15739 fi
15740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15741 fi
15742
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15744 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15745 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
15746
15747 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
15748
15749 fi
15750
15751 # See if <sys/ptrace.h> supports LWP names on FreeBSD
15752 # Older FreeBSD versions don't have the pl_tdname member of
15753 # `struct ptrace_lwpinfo'.
15754 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15755 "
15756 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
15757
15758 cat >>confdefs.h <<_ACEOF
15759 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15760 _ACEOF
15761
15762
15763 fi
15764
15765
15766 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15767 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15768 # FreeBSD 10.3.
15769 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>
15770 "
15771 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15772
15773 cat >>confdefs.h <<_ACEOF
15774 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15775 _ACEOF
15776
15777
15778 fi
15779
15780
15781 # Check if the compiler supports the `long long' type.
15782
15783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15784 $as_echo_n "checking for long long support in compiler... " >&6; }
15785 if ${gdb_cv_c_long_long+:} false; then :
15786 $as_echo_n "(cached) " >&6
15787 else
15788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15789 /* end confdefs.h. */
15790 extern long long foo;
15791 int
15792 main ()
15793 {
15794 switch (foo & 2) { case 0: return 1; }
15795 ;
15796 return 0;
15797 }
15798 _ACEOF
15799 if ac_fn_c_try_compile "$LINENO"; then :
15800 gdb_cv_c_long_long=yes
15801 else
15802 gdb_cv_c_long_long=no
15803 fi
15804 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15805 fi
15806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15807 $as_echo "$gdb_cv_c_long_long" >&6; }
15808 if test "$gdb_cv_c_long_long" != yes; then
15809 # libdecnumber requires long long.
15810 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
15811 fi
15812
15813 # Check if the compiler and runtime support printing long longs.
15814
15815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15816 $as_echo_n "checking for long long support in printf... " >&6; }
15817 if ${gdb_cv_printf_has_long_long+:} false; then :
15818 $as_echo_n "(cached) " >&6
15819 else
15820 if test "$cross_compiling" = yes; then :
15821 gdb_cv_printf_has_long_long=no
15822 else
15823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15824 /* end confdefs.h. */
15825 $ac_includes_default
15826 int
15827 main ()
15828 {
15829 char buf[32];
15830 long long l = 0;
15831 l = (l << 16) + 0x0123;
15832 l = (l << 16) + 0x4567;
15833 l = (l << 16) + 0x89ab;
15834 l = (l << 16) + 0xcdef;
15835 sprintf (buf, "0x%016llx", l);
15836 return (strcmp ("0x0123456789abcdef", buf));
15837 ;
15838 return 0;
15839 }
15840 _ACEOF
15841 if ac_fn_c_try_run "$LINENO"; then :
15842 gdb_cv_printf_has_long_long=yes
15843 else
15844 gdb_cv_printf_has_long_long=no
15845 fi
15846 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15847 conftest.$ac_objext conftest.beam conftest.$ac_ext
15848 fi
15849
15850 fi
15851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15852 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15853 if test "$gdb_cv_printf_has_long_long" = yes; then
15854
15855 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15856
15857 fi
15858
15859 # Check if the compiler and runtime support printing decfloats.
15860
15861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15862 $as_echo_n "checking for decfloat support in printf... " >&6; }
15863 if ${gdb_cv_printf_has_decfloat+:} false; then :
15864 $as_echo_n "(cached) " >&6
15865 else
15866 if test "$cross_compiling" = yes; then :
15867 gdb_cv_printf_has_decfloat=no
15868 else
15869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15870 /* end confdefs.h. */
15871 $ac_includes_default
15872 int
15873 main ()
15874 {
15875 char buf[64];
15876 _Decimal32 d32 = 1.2345df;
15877 _Decimal64 d64 = 1.2345dd;
15878 _Decimal128 d128 = 1.2345dl;
15879 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15880 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15881 ;
15882 return 0;
15883 }
15884 _ACEOF
15885 if ac_fn_c_try_run "$LINENO"; then :
15886 gdb_cv_printf_has_decfloat=yes
15887 else
15888 gdb_cv_printf_has_decfloat=no
15889 fi
15890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15891 conftest.$ac_objext conftest.beam conftest.$ac_ext
15892 fi
15893
15894 fi
15895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15896 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
15897 if test "$gdb_cv_printf_has_decfloat" = yes; then
15898
15899 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
15900
15901 fi
15902
15903 # Check if the compiler supports the `long double' type. We can't use
15904 # AC_C_LONG_DOUBLE because that one does additional checks on the
15905 # constants defined in <float.h> that fail on some systems,
15906 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
15907
15908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15909 $as_echo_n "checking for long double support in compiler... " >&6; }
15910 if ${gdb_cv_c_long_double+:} false; then :
15911 $as_echo_n "(cached) " >&6
15912 else
15913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15914 /* end confdefs.h. */
15915 long double foo;
15916 _ACEOF
15917 if ac_fn_c_try_compile "$LINENO"; then :
15918 gdb_cv_c_long_double=yes
15919 else
15920 gdb_cv_c_long_double=no
15921 fi
15922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15923 fi
15924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15925 $as_echo "$gdb_cv_c_long_double" >&6; }
15926 if test "$gdb_cv_c_long_double" = yes; then
15927
15928 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
15929
15930 fi
15931
15932 # Check if the compiler and runtime support printing long doubles.
15933
15934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15935 $as_echo_n "checking for long double support in printf... " >&6; }
15936 if ${gdb_cv_printf_has_long_double+:} false; then :
15937 $as_echo_n "(cached) " >&6
15938 else
15939 if test "$cross_compiling" = yes; then :
15940 gdb_cv_printf_has_long_double=no
15941 else
15942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15943 /* end confdefs.h. */
15944 $ac_includes_default
15945 int
15946 main ()
15947 {
15948 char buf[16];
15949 long double f = 3.141592653;
15950 sprintf (buf, "%Lg", f);
15951 return (strncmp ("3.14159", buf, 7));
15952 ;
15953 return 0;
15954 }
15955 _ACEOF
15956 if ac_fn_c_try_run "$LINENO"; then :
15957 gdb_cv_printf_has_long_double=yes
15958 else
15959 gdb_cv_printf_has_long_double=no
15960 fi
15961 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15962 conftest.$ac_objext conftest.beam conftest.$ac_ext
15963 fi
15964
15965 fi
15966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15967 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
15968 if test "$gdb_cv_printf_has_long_double" = yes; then
15969
15970 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
15971
15972 fi
15973
15974 # Check if the compiler and runtime support scanning long doubles.
15975
15976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15977 $as_echo_n "checking for long double support in scanf... " >&6; }
15978 if ${gdb_cv_scanf_has_long_double+:} false; then :
15979 $as_echo_n "(cached) " >&6
15980 else
15981 if test "$cross_compiling" = yes; then :
15982 gdb_cv_scanf_has_long_double=no
15983 else
15984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15985 /* end confdefs.h. */
15986 #include <stdio.h>
15987 int
15988 main ()
15989 {
15990 char *buf = "3.141592653";
15991 long double f = 0;
15992 sscanf (buf, "%Lg", &f);
15993 return !(f > 3.14159 && f < 3.14160);
15994 ;
15995 return 0;
15996 }
15997 _ACEOF
15998 if ac_fn_c_try_run "$LINENO"; then :
15999 gdb_cv_scanf_has_long_double=yes
16000 else
16001 gdb_cv_scanf_has_long_double=no
16002 fi
16003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16004 conftest.$ac_objext conftest.beam conftest.$ac_ext
16005 fi
16006
16007 fi
16008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16009 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
16010 if test "$gdb_cv_scanf_has_long_double" = yes; then
16011
16012 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
16013
16014 fi
16015
16016 case ${host_os} in
16017 aix*)
16018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16019 $as_echo_n "checking for -bbigtoc option... " >&6; }
16020 if ${gdb_cv_bigtoc+:} false; then :
16021 $as_echo_n "(cached) " >&6
16022 else
16023
16024 SAVE_LDFLAGS=$LDFLAGS
16025
16026 case $GCC in
16027 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16028 *) gdb_cv_bigtoc=-bbigtoc ;;
16029 esac
16030
16031 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16033 /* end confdefs.h. */
16034
16035 int
16036 main ()
16037 {
16038 int i;
16039 ;
16040 return 0;
16041 }
16042 _ACEOF
16043 if ac_fn_c_try_link "$LINENO"; then :
16044
16045 else
16046 gdb_cv_bigtoc=
16047 fi
16048 rm -f core conftest.err conftest.$ac_objext \
16049 conftest$ac_exeext conftest.$ac_ext
16050 LDFLAGS="${SAVE_LDFLAGS}"
16051
16052 fi
16053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16054 $as_echo "$gdb_cv_bigtoc" >&6; }
16055 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16056 ;;
16057 esac
16058
16059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16060 $as_echo_n "checking for the dynamic export flag... " >&6; }
16061 dynamic_list=false
16062 if test "${gdb_native}" = yes; then
16063 # The dynamically loaded libthread_db needs access to symbols in the gdb
16064 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16065 # may not be supported there.
16066 old_LDFLAGS="$LDFLAGS"
16067 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16068 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16069 LDFLAGS="$LDFLAGS $RDYNAMIC"
16070 if test "${have_libpython}" = no; then
16071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16072 /* end confdefs.h. */
16073
16074 int
16075 main ()
16076 {
16077
16078 ;
16079 return 0;
16080 }
16081 _ACEOF
16082 if ac_fn_c_try_link "$LINENO"; then :
16083 dynamic_list=true
16084 fi
16085 rm -f core conftest.err conftest.$ac_objext \
16086 conftest$ac_exeext conftest.$ac_ext
16087 else
16088 # Workaround http://bugs.python.org/issue4434 where static
16089 # libpythonX.Y.a would get its symbols required for
16090 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16091 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16092
16093 # Note the workaround for Python
16094 # http://bugs.python.org/issue10112 earlier has removed
16095 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16096 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16097 # always pass.
16098 old_CFLAGS="$CFLAGS"
16099 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16100 old_LIBS="$LIBS"
16101 LIBS="$LIBS $PYTHON_LIBS"
16102 old_CPPFLAGS="$CPPFLAGS"
16103 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16104 if test "$cross_compiling" = yes; then :
16105 true
16106 else
16107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16108 /* end confdefs.h. */
16109 #include "Python.h"
16110 int
16111 main ()
16112 {
16113 int err;
16114 Py_Initialize ();
16115 err = PyRun_SimpleString ("import itertools\n");
16116 Py_Finalize ();
16117 return err == 0 ? 0 : 1;
16118 ;
16119 return 0;
16120 }
16121 _ACEOF
16122 if ac_fn_c_try_run "$LINENO"; then :
16123 dynamic_list=true
16124 fi
16125 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16126 conftest.$ac_objext conftest.beam conftest.$ac_ext
16127 fi
16128
16129 LIBS="$old_LIBS"
16130 CFLAGS="$old_CFLAGS"
16131 CPPFLAGS="$old_CPPFLAGS"
16132 fi
16133 LDFLAGS="$old_LDFLAGS"
16134 fi
16135 if $dynamic_list; then
16136 found="-Wl,--dynamic-list"
16137 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16138 else
16139 found="-rdynamic"
16140 RDYNAMIC="-rdynamic"
16141 fi
16142
16143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16144 $as_echo "$found" >&6; }
16145
16146
16147 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16148 case ${host_os} in
16149 aix*)
16150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16151 $as_echo_n "checking for AiX thread debugging library... " >&6; }
16152 if ${gdb_cv_have_aix_thread_debug+:} false; then :
16153 $as_echo_n "(cached) " >&6
16154 else
16155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16156 /* end confdefs.h. */
16157 #include <sys/pthdebug.h>
16158 int
16159 main ()
16160 {
16161 #ifndef PTHDB_VERSION_3
16162 #error
16163 #endif
16164 ;
16165 return 0;
16166 }
16167 _ACEOF
16168 if ac_fn_c_try_compile "$LINENO"; then :
16169 gdb_cv_have_aix_thread_debug=yes
16170 else
16171 gdb_cv_have_aix_thread_debug=no
16172 fi
16173 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16174 fi
16175
16176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16177 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16178 if test "$gdb_cv_have_aix_thread_debug" = yes; then
16179 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16180 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16181 LIBS="$LIBS -lpthdebug"
16182
16183 # Older versions of AIX do not provide the declaration for
16184 # the getthrds function (it appears that it was introduced
16185 # with AIX 6.x).
16186 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16187 "
16188 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16189 ac_have_decl=1
16190 else
16191 ac_have_decl=0
16192 fi
16193
16194 cat >>confdefs.h <<_ACEOF
16195 #define HAVE_DECL_GETTHRDS $ac_have_decl
16196 _ACEOF
16197
16198 fi
16199 ;;
16200 esac
16201
16202 fi
16203
16204 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16206 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16207 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16208 $as_echo_n "(cached) " >&6
16209 else
16210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16211 /* end confdefs.h. */
16212 #include <thread_db.h>
16213 int
16214 main ()
16215 {
16216 int i = TD_NOTALLOC;
16217 ;
16218 return 0;
16219 }
16220 _ACEOF
16221 if ac_fn_c_try_compile "$LINENO"; then :
16222 gdb_cv_thread_db_h_has_td_notalloc=yes
16223 else
16224 gdb_cv_thread_db_h_has_td_notalloc=no
16225
16226 fi
16227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16228
16229 fi
16230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16231 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16233 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16234 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16235 $as_echo_n "(cached) " >&6
16236 else
16237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16238 /* end confdefs.h. */
16239 #include <thread_db.h>
16240 int
16241 main ()
16242 {
16243 int i = TD_VERSION;
16244 ;
16245 return 0;
16246 }
16247 _ACEOF
16248 if ac_fn_c_try_compile "$LINENO"; then :
16249 gdb_cv_thread_db_h_has_td_version=yes
16250 else
16251 gdb_cv_thread_db_h_has_td_version=no
16252
16253 fi
16254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16255
16256 fi
16257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16258 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16260 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16261 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16262 $as_echo_n "(cached) " >&6
16263 else
16264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16265 /* end confdefs.h. */
16266 #include <thread_db.h>
16267 int
16268 main ()
16269 {
16270 int i = TD_NOTLS;
16271 ;
16272 return 0;
16273 }
16274 _ACEOF
16275 if ac_fn_c_try_compile "$LINENO"; then :
16276 gdb_cv_thread_db_h_has_td_notls=yes
16277 else
16278 gdb_cv_thread_db_h_has_td_notls=no
16279
16280 fi
16281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16282
16283 fi
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16285 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16286 fi
16287 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16288
16289 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16290
16291 fi
16292 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16293
16294 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16295
16296 fi
16297 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16298
16299 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16300
16301 fi
16302
16303 case $host_os in
16304 go32* | *djgpp*)
16305 gdbinit=gdb.ini
16306 ;;
16307 *)
16308 gdbinit=.gdbinit
16309 ;;
16310 esac
16311
16312 cat >>confdefs.h <<_ACEOF
16313 #define GDBINIT "$gdbinit"
16314 _ACEOF
16315
16316
16317
16318 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16319 # except that the argument to --with-sysroot is optional.
16320 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16321 if test "x$with_sysroot" = xyes; then
16322 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16323 fi
16324
16325 # Check whether --with-sysroot was given.
16326 if test "${with_sysroot+set}" = set; then :
16327 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16328 else
16329 TARGET_SYSTEM_ROOT=
16330 fi
16331
16332
16333 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16334 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16335 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16336 ac_define_dir=`eval echo $ac_define_dir`
16337
16338 cat >>confdefs.h <<_ACEOF
16339 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16340 _ACEOF
16341
16342
16343
16344
16345 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16346 if test "x$prefix" = xNONE; then
16347 test_prefix=/usr/local
16348 else
16349 test_prefix=$prefix
16350 fi
16351 else
16352 test_prefix=$exec_prefix
16353 fi
16354 value=0
16355 case ${ac_define_dir} in
16356 "${test_prefix}"|"${test_prefix}/"*|\
16357 '${exec_prefix}'|'${exec_prefix}/'*)
16358 value=1
16359 ;;
16360 esac
16361
16362 cat >>confdefs.h <<_ACEOF
16363 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16364 _ACEOF
16365
16366
16367
16368
16369
16370 # Check whether --with-system-gdbinit was given.
16371 if test "${with_system_gdbinit+set}" = set; then :
16372 withval=$with_system_gdbinit;
16373 SYSTEM_GDBINIT=$withval
16374 else
16375 SYSTEM_GDBINIT=
16376 fi
16377
16378
16379 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16380 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16381 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16382 ac_define_dir=`eval echo $ac_define_dir`
16383
16384 cat >>confdefs.h <<_ACEOF
16385 #define SYSTEM_GDBINIT "$ac_define_dir"
16386 _ACEOF
16387
16388
16389
16390
16391 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16392 if test "x$prefix" = xNONE; then
16393 test_prefix=/usr/local
16394 else
16395 test_prefix=$prefix
16396 fi
16397 else
16398 test_prefix=$exec_prefix
16399 fi
16400 value=0
16401 case ${ac_define_dir} in
16402 "${test_prefix}"|"${test_prefix}/"*|\
16403 '${exec_prefix}'|'${exec_prefix}/'*)
16404 value=1
16405 ;;
16406 esac
16407
16408 cat >>confdefs.h <<_ACEOF
16409 #define SYSTEM_GDBINIT_RELOCATABLE $value
16410 _ACEOF
16411
16412
16413
16414
16415
16416 # Check whether --with-system-gdbinit-dir was given.
16417 if test "${with_system_gdbinit_dir+set}" = set; then :
16418 withval=$with_system_gdbinit_dir;
16419 SYSTEM_GDBINIT_DIR=$withval
16420 else
16421 SYSTEM_GDBINIT_DIR=
16422 fi
16423
16424
16425 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16426 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16427 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16428 ac_define_dir=`eval echo $ac_define_dir`
16429
16430 cat >>confdefs.h <<_ACEOF
16431 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16432 _ACEOF
16433
16434
16435
16436
16437 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16438 if test "x$prefix" = xNONE; then
16439 test_prefix=/usr/local
16440 else
16441 test_prefix=$prefix
16442 fi
16443 else
16444 test_prefix=$exec_prefix
16445 fi
16446 value=0
16447 case ${ac_define_dir} in
16448 "${test_prefix}"|"${test_prefix}/"*|\
16449 '${exec_prefix}'|'${exec_prefix}/'*)
16450 value=1
16451 ;;
16452 esac
16453
16454 cat >>confdefs.h <<_ACEOF
16455 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16456 _ACEOF
16457
16458
16459
16460
16461
16462 # Check whether --enable-werror was given.
16463 if test "${enable_werror+set}" = set; then :
16464 enableval=$enable_werror; case "${enableval}" in
16465 yes | y) ERROR_ON_WARNING="yes" ;;
16466 no | n) ERROR_ON_WARNING="no" ;;
16467 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16468 esac
16469 fi
16470
16471
16472 # Enable -Werror by default when using gcc. Turn it off for releases.
16473 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16474 ERROR_ON_WARNING=yes
16475 fi
16476
16477 WERROR_CFLAGS=""
16478 if test "${ERROR_ON_WARNING}" = yes ; then
16479 WERROR_CFLAGS="-Werror"
16480 fi
16481
16482 # The options we'll try to enable.
16483 build_warnings="-Wall -Wpointer-arith \
16484 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16485 -Wno-switch -Wno-char-subscripts \
16486 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16487 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16488 -Wno-mismatched-tags \
16489 -Wno-error=deprecated-register \
16490 -Wsuggest-override \
16491 -Wimplicit-fallthrough=3 \
16492 -Wduplicated-cond \
16493 -Wshadow=local \
16494 -Wdeprecated-copy \
16495 -Wdeprecated-copy-dtor \
16496 -Wredundant-move \
16497 -Wmissing-declarations \
16498 -Wmissing-prototypes \
16499 -Wstrict-null-sentinel \
16500 "
16501
16502 case "${host}" in
16503 *-*-mingw32*)
16504 # Enable -Wno-format by default when using gcc on mingw since many
16505 # GCC versions complain about %I64.
16506 build_warnings="$build_warnings -Wno-format" ;;
16507 *-*-solaris*)
16508 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16509 # doesn't understand.
16510 build_warnings="$build_warnings -Wno-unknown-pragmas"
16511 # Solaris 11 <unistd.h> marks vfork deprecated.
16512 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16513 *)
16514 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16515 # but there's a special case for this below.
16516 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16517 esac
16518
16519 # Check whether --enable-build-warnings was given.
16520 if test "${enable_build_warnings+set}" = set; then :
16521 enableval=$enable_build_warnings; case "${enableval}" in
16522 yes) ;;
16523 no) build_warnings="-w";;
16524 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16525 build_warnings="${build_warnings} ${t}";;
16526 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16527 build_warnings="${t} ${build_warnings}";;
16528 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16529 esac
16530 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16531 echo "Setting compiler warning flags = $build_warnings" 6>&1
16532 fi
16533 fi
16534 # Check whether --enable-gdb-build-warnings was given.
16535 if test "${enable_gdb_build_warnings+set}" = set; then :
16536 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16537 yes) ;;
16538 no) build_warnings="-w";;
16539 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16540 build_warnings="${build_warnings} ${t}";;
16541 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16542 build_warnings="${t} ${build_warnings}";;
16543 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16544 esac
16545 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16546 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16547 fi
16548 fi
16549
16550 # The set of warnings supported by a C++ compiler is not the same as
16551 # of the C compiler.
16552 ac_ext=cpp
16553 ac_cpp='$CXXCPP $CPPFLAGS'
16554 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16555 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16556 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16557
16558
16559 WARN_CFLAGS=""
16560 if test "x${build_warnings}" != x -a "x$GCC" = xyes
16561 then
16562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16563 $as_echo_n "checking compiler warning flags... " >&6; }
16564 # Separate out the -Werror flag as some files just cannot be
16565 # compiled with it enabled.
16566 for w in ${build_warnings}; do
16567 # GCC does not complain about -Wno-unknown-warning. Invert
16568 # and test -Wunknown-warning instead.
16569 case $w in
16570 -Wno-*)
16571 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16572 -Wformat-nonliteral)
16573 # gcc requires -Wformat before -Wformat-nonliteral
16574 # will work, so stick them together.
16575 w="-Wformat $w"
16576 wtest="$w"
16577 ;;
16578 *)
16579 wtest=$w ;;
16580 esac
16581
16582 case $w in
16583 -Werr*) WERROR_CFLAGS=-Werror ;;
16584 *)
16585 # Check whether GCC accepts it.
16586 saved_CFLAGS="$CFLAGS"
16587 CFLAGS="$CFLAGS -Werror $wtest"
16588 saved_CXXFLAGS="$CXXFLAGS"
16589 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16590 if test "x$w" = "x-Wunused-variable"; then
16591 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16592 # fixed in GCC 4.9. This test is derived from the gdb
16593 # source code that triggered this bug in GCC.
16594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16595 /* end confdefs.h. */
16596 struct scoped_restore_base {};
16597 struct scoped_restore_tmpl : public scoped_restore_base {
16598 ~scoped_restore_tmpl() {}
16599 };
16600 int
16601 main ()
16602 {
16603 const scoped_restore_base &b = scoped_restore_tmpl();
16604 ;
16605 return 0;
16606 }
16607 _ACEOF
16608 if ac_fn_cxx_try_compile "$LINENO"; then :
16609 WARN_CFLAGS="${WARN_CFLAGS} $w"
16610 fi
16611 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16612 else
16613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16614 /* end confdefs.h. */
16615
16616 int
16617 main ()
16618 {
16619
16620 ;
16621 return 0;
16622 }
16623 _ACEOF
16624 if ac_fn_cxx_try_compile "$LINENO"; then :
16625 WARN_CFLAGS="${WARN_CFLAGS} $w"
16626 fi
16627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16628 fi
16629 CFLAGS="$saved_CFLAGS"
16630 CXXFLAGS="$saved_CXXFLAGS"
16631 esac
16632 done
16633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16634 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16635 fi
16636
16637
16638
16639 ac_ext=c
16640 ac_cpp='$CPP $CPPFLAGS'
16641 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16642 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16643 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16644
16645
16646
16647 # Check whether --enable-ubsan was given.
16648 if test "${enable_ubsan+set}" = set; then :
16649 enableval=$enable_ubsan;
16650 else
16651 enable_ubsan=no
16652 fi
16653
16654 if test "x$enable_ubsan" = xauto; then
16655 if $development; then
16656 enable_ubsan=yes
16657 fi
16658 fi
16659 ac_ext=cpp
16660 ac_cpp='$CXXCPP $CPPFLAGS'
16661 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16662 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16663 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16664
16665 if test "x$enable_ubsan" = xyes; then
16666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16667 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16668 saved_CXXFLAGS="$CXXFLAGS"
16669 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16671 /* end confdefs.h. */
16672
16673 int
16674 main ()
16675 {
16676
16677 ;
16678 return 0;
16679 }
16680 _ACEOF
16681 if ac_fn_cxx_try_link "$LINENO"; then :
16682 enable_ubsan=yes
16683 else
16684 enable_ubsan=no
16685 fi
16686 rm -f core conftest.err conftest.$ac_objext \
16687 conftest$ac_exeext conftest.$ac_ext
16688 CXXFLAGS="$saved_CXXFLAGS"
16689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16690 $as_echo "$enable_ubsan" >&6; }
16691 if test "x$enable_ubsan" = xyes; then
16692 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16693 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16694 fi
16695 fi
16696 ac_ext=c
16697 ac_cpp='$CPP $CPPFLAGS'
16698 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16699 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16700 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16701
16702
16703
16704 # In the Cygwin environment, we need some additional flags.
16705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16706 $as_echo_n "checking for cygwin... " >&6; }
16707 if ${gdb_cv_os_cygwin+:} false; then :
16708 $as_echo_n "(cached) " >&6
16709 else
16710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16711 /* end confdefs.h. */
16712
16713 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
16714 lose
16715 #endif
16716 _ACEOF
16717 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16718 $EGREP "^lose$" >/dev/null 2>&1; then :
16719 gdb_cv_os_cygwin=yes
16720 else
16721 gdb_cv_os_cygwin=no
16722 fi
16723 rm -f conftest*
16724
16725 fi
16726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16727 $as_echo "$gdb_cv_os_cygwin" >&6; }
16728
16729
16730 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
16731 case ${host} in
16732 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16733 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
16734 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
16735 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
16736 esac
16737
16738
16739 # libreadline needs libuser32.a in a cygwin environment
16740 WIN32LIBS=
16741 if test x"$gdb_cv_os_cygwin" = xyes; then
16742 WIN32LIBS="-luser32"
16743 case "${target}" in
16744 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16745 ;;
16746 esac
16747 fi
16748
16749 # The ser-tcp.c module requires sockets.
16750 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
16751 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
16752
16753 # Add ELF support to GDB, but only if BFD includes ELF support.
16754
16755 OLD_CFLAGS=$CFLAGS
16756 OLD_LDFLAGS=$LDFLAGS
16757 OLD_LIBS=$LIBS
16758 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16759 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16760 # always want our bfd.
16761 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16762 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16763 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16764 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16765 LIBS="-lbfd -liberty -lz $intl $LIBS"
16766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16767 $as_echo_n "checking for ELF support in BFD... " >&6; }
16768 if ${gdb_cv_var_elf+:} false; then :
16769 $as_echo_n "(cached) " >&6
16770 else
16771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16772 /* end confdefs.h. */
16773 #include <stdlib.h>
16774 #include "bfd.h"
16775 #include "elf-bfd.h"
16776
16777 int
16778 main ()
16779 {
16780 return bfd_get_elf_phdr_upper_bound (NULL);
16781 ;
16782 return 0;
16783 }
16784 _ACEOF
16785 if ac_fn_c_try_link "$LINENO"; then :
16786 gdb_cv_var_elf=yes
16787 else
16788 gdb_cv_var_elf=no
16789 fi
16790 rm -f core conftest.err conftest.$ac_objext \
16791 conftest$ac_exeext conftest.$ac_ext
16792 fi
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16794 $as_echo "$gdb_cv_var_elf" >&6; }
16795 CFLAGS=$OLD_CFLAGS
16796 LDFLAGS=$OLD_LDFLAGS
16797 LIBS=$OLD_LIBS
16798 if test "$gdb_cv_var_elf" = yes; then
16799 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
16800
16801 $as_echo "#define HAVE_ELF 1" >>confdefs.h
16802
16803 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16804 if test "$plugins" = "yes"; then
16805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16806 $as_echo_n "checking for library containing dlopen... " >&6; }
16807 if ${ac_cv_search_dlopen+:} false; then :
16808 $as_echo_n "(cached) " >&6
16809 else
16810 ac_func_search_save_LIBS=$LIBS
16811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16812 /* end confdefs.h. */
16813
16814 /* Override any GCC internal prototype to avoid an error.
16815 Use char because int might match the return type of a GCC
16816 builtin and then its argument prototype would still apply. */
16817 #ifdef __cplusplus
16818 extern "C"
16819 #endif
16820 char dlopen ();
16821 int
16822 main ()
16823 {
16824 return dlopen ();
16825 ;
16826 return 0;
16827 }
16828 _ACEOF
16829 for ac_lib in '' dl; do
16830 if test -z "$ac_lib"; then
16831 ac_res="none required"
16832 else
16833 ac_res=-l$ac_lib
16834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16835 fi
16836 if ac_fn_c_try_link "$LINENO"; then :
16837 ac_cv_search_dlopen=$ac_res
16838 fi
16839 rm -f core conftest.err conftest.$ac_objext \
16840 conftest$ac_exeext
16841 if ${ac_cv_search_dlopen+:} false; then :
16842 break
16843 fi
16844 done
16845 if ${ac_cv_search_dlopen+:} false; then :
16846
16847 else
16848 ac_cv_search_dlopen=no
16849 fi
16850 rm conftest.$ac_ext
16851 LIBS=$ac_func_search_save_LIBS
16852 fi
16853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16854 $as_echo "$ac_cv_search_dlopen" >&6; }
16855 ac_res=$ac_cv_search_dlopen
16856 if test "$ac_res" != no; then :
16857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16858
16859 fi
16860
16861 fi
16862 fi
16863
16864 # Add macho support to GDB, but only if BFD includes it.
16865
16866 OLD_CFLAGS=$CFLAGS
16867 OLD_LDFLAGS=$LDFLAGS
16868 OLD_LIBS=$LIBS
16869 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16870 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16871 # always want our bfd.
16872 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16873 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16874 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16875 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16876 LIBS="-lbfd -liberty -lz $intl $LIBS"
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16878 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
16879 if ${gdb_cv_var_macho+:} false; then :
16880 $as_echo_n "(cached) " >&6
16881 else
16882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16883 /* end confdefs.h. */
16884 #include <stdlib.h>
16885 #include "bfd.h"
16886 #include "mach-o.h"
16887
16888 int
16889 main ()
16890 {
16891 return bfd_mach_o_lookup_command (NULL, 0, NULL);
16892 ;
16893 return 0;
16894 }
16895 _ACEOF
16896 if ac_fn_c_try_link "$LINENO"; then :
16897 gdb_cv_var_macho=yes
16898 else
16899 gdb_cv_var_macho=no
16900 fi
16901 rm -f core conftest.err conftest.$ac_objext \
16902 conftest$ac_exeext conftest.$ac_ext
16903 fi
16904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16905 $as_echo "$gdb_cv_var_macho" >&6; }
16906 CFLAGS=$OLD_CFLAGS
16907 LDFLAGS=$OLD_LDFLAGS
16908 LIBS=$OLD_LIBS
16909 if test "$gdb_cv_var_macho" = yes; then
16910 CONFIG_OBS="$CONFIG_OBS machoread.o"
16911 fi
16912
16913 # Add any host-specific objects to GDB.
16914 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16915
16916 # If building on ELF, look for lzma support for embedded compressed debug info.
16917 if test "$gdb_cv_var_elf" = yes; then
16918
16919 # Check whether --with-lzma was given.
16920 if test "${with_lzma+set}" = set; then :
16921 withval=$with_lzma;
16922 else
16923 with_lzma=auto
16924 fi
16925
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16927 $as_echo_n "checking whether to use lzma... " >&6; }
16928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16929 $as_echo "$with_lzma" >&6; }
16930
16931 if test "${with_lzma}" != no; then
16932
16933
16934
16935
16936
16937
16938
16939
16940 use_additional=yes
16941
16942 acl_save_prefix="$prefix"
16943 prefix="$acl_final_prefix"
16944 acl_save_exec_prefix="$exec_prefix"
16945 exec_prefix="$acl_final_exec_prefix"
16946
16947 eval additional_includedir=\"$includedir\"
16948 eval additional_libdir=\"$libdir\"
16949
16950 exec_prefix="$acl_save_exec_prefix"
16951 prefix="$acl_save_prefix"
16952
16953
16954 # Check whether --with-liblzma-prefix was given.
16955 if test "${with_liblzma_prefix+set}" = set; then :
16956 withval=$with_liblzma_prefix;
16957 if test "X$withval" = "Xno"; then
16958 use_additional=no
16959 else
16960 if test "X$withval" = "X"; then
16961
16962 acl_save_prefix="$prefix"
16963 prefix="$acl_final_prefix"
16964 acl_save_exec_prefix="$exec_prefix"
16965 exec_prefix="$acl_final_exec_prefix"
16966
16967 eval additional_includedir=\"$includedir\"
16968 eval additional_libdir=\"$libdir\"
16969
16970 exec_prefix="$acl_save_exec_prefix"
16971 prefix="$acl_save_prefix"
16972
16973 else
16974 additional_includedir="$withval/include"
16975 additional_libdir="$withval/lib"
16976 fi
16977 fi
16978
16979 fi
16980
16981
16982 # Check whether --with-liblzma-type was given.
16983 if test "${with_liblzma_type+set}" = set; then :
16984 withval=$with_liblzma_type; with_liblzma_type=$withval
16985 else
16986 with_liblzma_type=auto
16987 fi
16988
16989 lib_type=`eval echo \$with_liblzma_type`
16990
16991 LIBLZMA=
16992 LTLIBLZMA=
16993 INCLZMA=
16994 rpathdirs=
16995 ltrpathdirs=
16996 names_already_handled=
16997 names_next_round='lzma '
16998 while test -n "$names_next_round"; do
16999 names_this_round="$names_next_round"
17000 names_next_round=
17001 for name in $names_this_round; do
17002 already_handled=
17003 for n in $names_already_handled; do
17004 if test "$n" = "$name"; then
17005 already_handled=yes
17006 break
17007 fi
17008 done
17009 if test -z "$already_handled"; then
17010 names_already_handled="$names_already_handled $name"
17011 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17012 eval value=\"\$HAVE_LIB$uppername\"
17013 if test -n "$value"; then
17014 if test "$value" = yes; then
17015 eval value=\"\$LIB$uppername\"
17016 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17017 eval value=\"\$LTLIB$uppername\"
17018 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17019 else
17020 :
17021 fi
17022 else
17023 found_dir=
17024 found_la=
17025 found_so=
17026 found_a=
17027 if test $use_additional = yes; then
17028 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17029 found_dir="$additional_libdir"
17030 found_so="$additional_libdir/lib$name.$shlibext"
17031 if test -f "$additional_libdir/lib$name.la"; then
17032 found_la="$additional_libdir/lib$name.la"
17033 fi
17034 elif test x$lib_type != xshared; then
17035 if test -f "$additional_libdir/lib$name.$libext"; then
17036 found_dir="$additional_libdir"
17037 found_a="$additional_libdir/lib$name.$libext"
17038 if test -f "$additional_libdir/lib$name.la"; then
17039 found_la="$additional_libdir/lib$name.la"
17040 fi
17041 fi
17042 fi
17043 fi
17044 if test "X$found_dir" = "X"; then
17045 for x in $LDFLAGS $LTLIBLZMA; do
17046
17047 acl_save_prefix="$prefix"
17048 prefix="$acl_final_prefix"
17049 acl_save_exec_prefix="$exec_prefix"
17050 exec_prefix="$acl_final_exec_prefix"
17051 eval x=\"$x\"
17052 exec_prefix="$acl_save_exec_prefix"
17053 prefix="$acl_save_prefix"
17054
17055 case "$x" in
17056 -L*)
17057 dir=`echo "X$x" | sed -e 's/^X-L//'`
17058 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17059 found_dir="$dir"
17060 found_so="$dir/lib$name.$shlibext"
17061 if test -f "$dir/lib$name.la"; then
17062 found_la="$dir/lib$name.la"
17063 fi
17064 elif test x$lib_type != xshared; then
17065 if test -f "$dir/lib$name.$libext"; then
17066 found_dir="$dir"
17067 found_a="$dir/lib$name.$libext"
17068 if test -f "$dir/lib$name.la"; then
17069 found_la="$dir/lib$name.la"
17070 fi
17071 fi
17072 fi
17073 ;;
17074 esac
17075 if test "X$found_dir" != "X"; then
17076 break
17077 fi
17078 done
17079 fi
17080 if test "X$found_dir" != "X"; then
17081 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17082 if test "X$found_so" != "X"; then
17083 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17084 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17085 else
17086 haveit=
17087 for x in $ltrpathdirs; do
17088 if test "X$x" = "X$found_dir"; then
17089 haveit=yes
17090 break
17091 fi
17092 done
17093 if test -z "$haveit"; then
17094 ltrpathdirs="$ltrpathdirs $found_dir"
17095 fi
17096 if test "$hardcode_direct" = yes; then
17097 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17098 else
17099 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17100 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17101 haveit=
17102 for x in $rpathdirs; do
17103 if test "X$x" = "X$found_dir"; then
17104 haveit=yes
17105 break
17106 fi
17107 done
17108 if test -z "$haveit"; then
17109 rpathdirs="$rpathdirs $found_dir"
17110 fi
17111 else
17112 haveit=
17113 for x in $LDFLAGS $LIBLZMA; do
17114
17115 acl_save_prefix="$prefix"
17116 prefix="$acl_final_prefix"
17117 acl_save_exec_prefix="$exec_prefix"
17118 exec_prefix="$acl_final_exec_prefix"
17119 eval x=\"$x\"
17120 exec_prefix="$acl_save_exec_prefix"
17121 prefix="$acl_save_prefix"
17122
17123 if test "X$x" = "X-L$found_dir"; then
17124 haveit=yes
17125 break
17126 fi
17127 done
17128 if test -z "$haveit"; then
17129 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17130 fi
17131 if test "$hardcode_minus_L" != no; then
17132 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17133 else
17134 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17135 fi
17136 fi
17137 fi
17138 fi
17139 else
17140 if test "X$found_a" != "X"; then
17141 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17142 else
17143 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17144 fi
17145 fi
17146 additional_includedir=
17147 case "$found_dir" in
17148 */lib | */lib/)
17149 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17150 additional_includedir="$basedir/include"
17151 ;;
17152 esac
17153 if test "X$additional_includedir" != "X"; then
17154 if test "X$additional_includedir" != "X/usr/include"; then
17155 haveit=
17156 if test "X$additional_includedir" = "X/usr/local/include"; then
17157 if test -n "$GCC"; then
17158 case $host_os in
17159 linux*) haveit=yes;;
17160 esac
17161 fi
17162 fi
17163 if test -z "$haveit"; then
17164 for x in $CPPFLAGS $INCLZMA; do
17165
17166 acl_save_prefix="$prefix"
17167 prefix="$acl_final_prefix"
17168 acl_save_exec_prefix="$exec_prefix"
17169 exec_prefix="$acl_final_exec_prefix"
17170 eval x=\"$x\"
17171 exec_prefix="$acl_save_exec_prefix"
17172 prefix="$acl_save_prefix"
17173
17174 if test "X$x" = "X-I$additional_includedir"; then
17175 haveit=yes
17176 break
17177 fi
17178 done
17179 if test -z "$haveit"; then
17180 if test -d "$additional_includedir"; then
17181 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17182 fi
17183 fi
17184 fi
17185 fi
17186 fi
17187 if test -n "$found_la"; then
17188 save_libdir="$libdir"
17189 case "$found_la" in
17190 */* | *\\*) . "$found_la" ;;
17191 *) . "./$found_la" ;;
17192 esac
17193 libdir="$save_libdir"
17194 for dep in $dependency_libs; do
17195 case "$dep" in
17196 -L*)
17197 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17198 if test "X$additional_libdir" != "X/usr/lib"; then
17199 haveit=
17200 if test "X$additional_libdir" = "X/usr/local/lib"; then
17201 if test -n "$GCC"; then
17202 case $host_os in
17203 linux*) haveit=yes;;
17204 esac
17205 fi
17206 fi
17207 if test -z "$haveit"; then
17208 haveit=
17209 for x in $LDFLAGS $LIBLZMA; do
17210
17211 acl_save_prefix="$prefix"
17212 prefix="$acl_final_prefix"
17213 acl_save_exec_prefix="$exec_prefix"
17214 exec_prefix="$acl_final_exec_prefix"
17215 eval x=\"$x\"
17216 exec_prefix="$acl_save_exec_prefix"
17217 prefix="$acl_save_prefix"
17218
17219 if test "X$x" = "X-L$additional_libdir"; then
17220 haveit=yes
17221 break
17222 fi
17223 done
17224 if test -z "$haveit"; then
17225 if test -d "$additional_libdir"; then
17226 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17227 fi
17228 fi
17229 haveit=
17230 for x in $LDFLAGS $LTLIBLZMA; do
17231
17232 acl_save_prefix="$prefix"
17233 prefix="$acl_final_prefix"
17234 acl_save_exec_prefix="$exec_prefix"
17235 exec_prefix="$acl_final_exec_prefix"
17236 eval x=\"$x\"
17237 exec_prefix="$acl_save_exec_prefix"
17238 prefix="$acl_save_prefix"
17239
17240 if test "X$x" = "X-L$additional_libdir"; then
17241 haveit=yes
17242 break
17243 fi
17244 done
17245 if test -z "$haveit"; then
17246 if test -d "$additional_libdir"; then
17247 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17248 fi
17249 fi
17250 fi
17251 fi
17252 ;;
17253 -R*)
17254 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17255 if test "$enable_rpath" != no; then
17256 haveit=
17257 for x in $rpathdirs; do
17258 if test "X$x" = "X$dir"; then
17259 haveit=yes
17260 break
17261 fi
17262 done
17263 if test -z "$haveit"; then
17264 rpathdirs="$rpathdirs $dir"
17265 fi
17266 haveit=
17267 for x in $ltrpathdirs; do
17268 if test "X$x" = "X$dir"; then
17269 haveit=yes
17270 break
17271 fi
17272 done
17273 if test -z "$haveit"; then
17274 ltrpathdirs="$ltrpathdirs $dir"
17275 fi
17276 fi
17277 ;;
17278 -l*)
17279 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17280 ;;
17281 *.la)
17282 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17283 ;;
17284 *)
17285 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17286 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17287 ;;
17288 esac
17289 done
17290 fi
17291 else
17292 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17293 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17294 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17295 else
17296 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17297 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17298 fi
17299 fi
17300 fi
17301 fi
17302 done
17303 done
17304 if test "X$rpathdirs" != "X"; then
17305 if test -n "$hardcode_libdir_separator"; then
17306 alldirs=
17307 for found_dir in $rpathdirs; do
17308 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17309 done
17310 acl_save_libdir="$libdir"
17311 libdir="$alldirs"
17312 eval flag=\"$hardcode_libdir_flag_spec\"
17313 libdir="$acl_save_libdir"
17314 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17315 else
17316 for found_dir in $rpathdirs; do
17317 acl_save_libdir="$libdir"
17318 libdir="$found_dir"
17319 eval flag=\"$hardcode_libdir_flag_spec\"
17320 libdir="$acl_save_libdir"
17321 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17322 done
17323 fi
17324 fi
17325 if test "X$ltrpathdirs" != "X"; then
17326 for found_dir in $ltrpathdirs; do
17327 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17328 done
17329 fi
17330
17331
17332 ac_save_CPPFLAGS="$CPPFLAGS"
17333
17334 for element in $INCLZMA; do
17335 haveit=
17336 for x in $CPPFLAGS; do
17337
17338 acl_save_prefix="$prefix"
17339 prefix="$acl_final_prefix"
17340 acl_save_exec_prefix="$exec_prefix"
17341 exec_prefix="$acl_final_exec_prefix"
17342 eval x=\"$x\"
17343 exec_prefix="$acl_save_exec_prefix"
17344 prefix="$acl_save_prefix"
17345
17346 if test "X$x" = "X$element"; then
17347 haveit=yes
17348 break
17349 fi
17350 done
17351 if test -z "$haveit"; then
17352 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17353 fi
17354 done
17355
17356
17357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17358 $as_echo_n "checking for liblzma... " >&6; }
17359 if ${ac_cv_liblzma+:} false; then :
17360 $as_echo_n "(cached) " >&6
17361 else
17362
17363 ac_save_LIBS="$LIBS"
17364 LIBS="$LIBS $LIBLZMA"
17365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17366 /* end confdefs.h. */
17367 #include "lzma.h"
17368 int
17369 main ()
17370 {
17371 lzma_index_iter iter;
17372 lzma_index_iter_init (&iter, 0);
17373 lzma_mf_is_supported (LZMA_MF_HC3);
17374 ;
17375 return 0;
17376 }
17377 _ACEOF
17378 if ac_fn_c_try_link "$LINENO"; then :
17379 ac_cv_liblzma=yes
17380 else
17381 ac_cv_liblzma=no
17382 fi
17383 rm -f core conftest.err conftest.$ac_objext \
17384 conftest$ac_exeext conftest.$ac_ext
17385 LIBS="$ac_save_LIBS"
17386
17387 fi
17388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17389 $as_echo "$ac_cv_liblzma" >&6; }
17390 if test "$ac_cv_liblzma" = yes; then
17391 HAVE_LIBLZMA=yes
17392
17393 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17394
17395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17396 $as_echo_n "checking how to link with liblzma... " >&6; }
17397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17398 $as_echo "$LIBLZMA" >&6; }
17399 else
17400 HAVE_LIBLZMA=no
17401 CPPFLAGS="$ac_save_CPPFLAGS"
17402 LIBLZMA=
17403 LTLIBLZMA=
17404 fi
17405
17406
17407
17408
17409
17410
17411 if test "$HAVE_LIBLZMA" != yes; then
17412 if test "$with_lzma" = yes; then
17413 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17414 fi
17415 fi
17416 fi
17417 fi
17418
17419 LIBGUI="../libgui/src/libgui.a"
17420 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17421
17422
17423
17424 WIN32LDAPP=
17425
17426
17427
17428 case "${host}" in
17429 *-*-cygwin* | *-*-mingw* )
17430 configdir="win"
17431 ;;
17432 *)
17433 configdir="unix"
17434 ;;
17435 esac
17436
17437 GDBTKLIBS=
17438 if test "${enable_gdbtk}" = "yes"; then
17439
17440 # Gdbtk must have an absolute path to srcdir in order to run
17441 # properly when not installed.
17442 here=`pwd`
17443 cd ${srcdir}
17444 GDBTK_SRC_DIR=`pwd`
17445 cd $here
17446
17447
17448 #
17449 # Ok, lets find the tcl configuration
17450 # First, look for one uninstalled.
17451 # the alternative search directory is invoked by --with-tcl
17452 #
17453
17454 if test x"${no_tcl}" = x ; then
17455 # we reset no_tcl in case something fails here
17456 no_tcl=true
17457
17458 # Check whether --with-tcl was given.
17459 if test "${with_tcl+set}" = set; then :
17460 withval=$with_tcl; with_tclconfig=${withval}
17461 fi
17462
17463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17464 $as_echo_n "checking for Tcl configuration... " >&6; }
17465 if ${ac_cv_c_tclconfig+:} false; then :
17466 $as_echo_n "(cached) " >&6
17467 else
17468
17469
17470 # First check to see if --with-tcl was specified.
17471 case "${host}" in
17472 *-*-cygwin*) platDir="win" ;;
17473 *) platDir="unix" ;;
17474 esac
17475 if test x"${with_tclconfig}" != x ; then
17476 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17477 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17478 else
17479 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17480 fi
17481 fi
17482
17483 # then check for a private Tcl installation
17484 if test x"${ac_cv_c_tclconfig}" = x ; then
17485 for i in \
17486 ../tcl \
17487 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17488 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17489 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17490 ../../tcl \
17491 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17492 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17493 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17494 ../../../tcl \
17495 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17496 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17497 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17498 if test -f "$i/$platDir/tclConfig.sh" ; then
17499 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17500 break
17501 fi
17502 done
17503 fi
17504
17505 # on Darwin, check in Framework installation locations
17506 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17507 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17508 `ls -d /Library/Frameworks 2>/dev/null` \
17509 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17510 `ls -d /System/Library/Frameworks 2>/dev/null` \
17511 ; do
17512 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17513 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17514 break
17515 fi
17516 done
17517 fi
17518
17519 # check in a few common install locations
17520 if test x"${ac_cv_c_tclconfig}" = x ; then
17521 for i in `ls -d ${libdir} 2>/dev/null` \
17522 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17523 `ls -d ${prefix}/lib 2>/dev/null` \
17524 `ls -d /usr/local/lib 2>/dev/null` \
17525 `ls -d /usr/contrib/lib 2>/dev/null` \
17526 `ls -d /usr/lib 2>/dev/null` \
17527 ; do
17528 if test -f "$i/tclConfig.sh" ; then
17529 ac_cv_c_tclconfig=`(cd $i; pwd)`
17530 break
17531 fi
17532 done
17533 fi
17534
17535 # check in a few other private locations
17536 if test x"${ac_cv_c_tclconfig}" = x ; then
17537 for i in \
17538 ${srcdir}/../tcl \
17539 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17540 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17541 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17542 if test -f "$i/$platDir/tclConfig.sh" ; then
17543 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17544 break
17545 fi
17546 done
17547 fi
17548
17549 fi
17550
17551
17552 if test x"${ac_cv_c_tclconfig}" = x ; then
17553 TCL_BIN_DIR="# no Tcl configs found"
17554 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17555 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17556 else
17557 no_tcl=
17558 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17560 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17561 fi
17562 fi
17563
17564
17565 # If $no_tk is nonempty, then we can't do Tk, and there is no
17566 # point to doing Tcl.
17567
17568 #
17569 # Ok, lets find the tk configuration
17570 # First, look for one uninstalled.
17571 # the alternative search directory is invoked by --with-tk
17572 #
17573
17574 if test x"${no_tk}" = x ; then
17575 # we reset no_tk in case something fails here
17576 no_tk=true
17577
17578 # Check whether --with-tk was given.
17579 if test "${with_tk+set}" = set; then :
17580 withval=$with_tk; with_tkconfig=${withval}
17581 fi
17582
17583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17584 $as_echo_n "checking for Tk configuration... " >&6; }
17585 if ${ac_cv_c_tkconfig+:} false; then :
17586 $as_echo_n "(cached) " >&6
17587 else
17588
17589
17590 # First check to see if --with-tkconfig was specified.
17591 if test x"${with_tkconfig}" != x ; then
17592 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17593 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17594 else
17595 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17596 fi
17597 fi
17598
17599 # then check for a private Tk library
17600 case "${host}" in
17601 *-*-cygwin*) platDir="win" ;;
17602 *) platDir="unix" ;;
17603 esac
17604 if test x"${ac_cv_c_tkconfig}" = x ; then
17605 for i in \
17606 ../tk \
17607 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17608 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17609 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17610 ../../tk \
17611 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17612 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17613 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17614 ../../../tk \
17615 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17616 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17617 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17618 if test -f "$i/$platDir/tkConfig.sh" ; then
17619 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17620 break
17621 fi
17622 done
17623 fi
17624
17625 # on Darwin, check in Framework installation locations
17626 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17627 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17628 `ls -d /Library/Frameworks 2>/dev/null` \
17629 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17630 `ls -d /System/Library/Frameworks 2>/dev/null` \
17631 ; do
17632 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17633 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17634 break
17635 fi
17636 done
17637 fi
17638
17639 # check in a few common install locations
17640 if test x"${ac_cv_c_tkconfig}" = x ; then
17641 for i in `ls -d ${libdir} 2>/dev/null` \
17642 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17643 `ls -d ${prefix}/lib 2>/dev/null` \
17644 `ls -d /usr/local/lib 2>/dev/null` \
17645 `ls -d /usr/contrib/lib 2>/dev/null` \
17646 `ls -d /usr/lib 2>/dev/null` \
17647 ; do
17648 if test -f "$i/tkConfig.sh" ; then
17649 ac_cv_c_tkconfig=`(cd $i; pwd)`
17650 break
17651 fi
17652 done
17653 fi
17654 # check in a few other private locations
17655 if test x"${ac_cv_c_tkconfig}" = x ; then
17656 for i in \
17657 ${srcdir}/../tk \
17658 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17659 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17660 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17661 if test -f "$i/$platDir/tkConfig.sh" ; then
17662 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17663 break
17664 fi
17665 done
17666 fi
17667
17668 fi
17669
17670
17671 if test x"${ac_cv_c_tkconfig}" = x ; then
17672 TK_BIN_DIR="# no Tk configs found"
17673 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17674 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
17675 else
17676 no_tk=
17677 TK_BIN_DIR=${ac_cv_c_tkconfig}
17678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17679 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17680 fi
17681 fi
17682
17683
17684 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17685
17686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17687 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
17688
17689 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
17690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17691 $as_echo "loading" >&6; }
17692 . ${TCL_BIN_DIR}/tclConfig.sh
17693 else
17694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17695 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17696 fi
17697
17698 # eval is required to do the TCL_DBGX substitution
17699 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17700 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17701
17702 # If the TCL_BIN_DIR is the build directory (not the install directory),
17703 # then set the common variable name to the value of the build variables.
17704 # For example, the variable TCL_LIB_SPEC will be set to the value
17705 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17706 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17707 # installed and uninstalled version of Tcl.
17708 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17709 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17710 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17711 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17712 elif test "`uname -s`" = "Darwin"; then
17713 # If Tcl was built as a framework, attempt to use the libraries
17714 # from the framework at the given location so that linking works
17715 # against Tcl.framework installed in an arbitrary location.
17716 case ${TCL_DEFS} in
17717 *TCL_FRAMEWORK*)
17718 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17719 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17720 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17721 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17722 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17723 break
17724 fi
17725 done
17726 fi
17727 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17728 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17729 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17730 fi
17731 ;;
17732 esac
17733 fi
17734
17735 # eval is required to do the TCL_DBGX substitution
17736 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17737 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17738 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17739 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755 # Check for in-tree tcl
17756 here=`pwd`
17757 cd ${srcdir}/..
17758 topdir=`pwd`
17759 cd ${here}
17760
17761 intree="no"
17762 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17763 intree="yes"
17764 fi
17765
17766 # Find Tcl private headers
17767 if test x"${intree}" = xno; then
17768
17769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17770 $as_echo_n "checking for Tcl private headers... " >&6; }
17771 private_dir=""
17772 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17773 if test -f ${dir}/tclInt.h ; then
17774 private_dir=${dir}
17775 fi
17776
17777 if test x"${private_dir}" = x; then
17778 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
17779 else
17780 TCL_PRIVATE_INCLUDE="-I${private_dir}"
17781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17782 $as_echo "${private_dir}" >&6; }
17783 fi
17784
17785 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17786 TCL_LIBRARY="${TCL_LIB_SPEC}"
17787 TCL_DEPS=""
17788 else
17789 # If building tcl in the same src tree, private headers
17790 # are not needed, but we need to be sure to use the right
17791 # headers library
17792 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17793 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17794 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17795 fi
17796
17797
17798
17799
17800
17801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17802 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
17803
17804 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
17805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17806 $as_echo "loading" >&6; }
17807 . ${TK_BIN_DIR}/tkConfig.sh
17808 else
17809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17810 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17811 fi
17812
17813 # eval is required to do the TK_DBGX substitution
17814 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17815 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17816
17817 # If the TK_BIN_DIR is the build directory (not the install directory),
17818 # then set the common variable name to the value of the build variables.
17819 # For example, the variable TK_LIB_SPEC will be set to the value
17820 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17821 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17822 # installed and uninstalled version of Tcl.
17823 if test -f "${TK_BIN_DIR}/Makefile" ; then
17824 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17825 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17826 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17827 elif test "`uname -s`" = "Darwin"; then
17828 # If Tk was built as a framework, attempt to use the libraries
17829 # from the framework at the given location so that linking works
17830 # against Tk.framework installed in an arbitrary location.
17831 case ${TK_DEFS} in
17832 *TK_FRAMEWORK*)
17833 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
17834 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17835 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17836 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17837 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17838 break
17839 fi
17840 done
17841 fi
17842 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
17843 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17844 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17845 fi
17846 ;;
17847 esac
17848 fi
17849
17850 # eval is required to do the TK_DBGX substitution
17851 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17852 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17853 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17854 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869 # Check for in-tree Tk
17870 intree="no"
17871 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17872 intree="yes"
17873 fi
17874
17875 # Find Tk private headers
17876 if test x"${intree}" = xno; then
17877
17878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17879 $as_echo_n "checking for Tk private headers... " >&6; }
17880 private_dir=""
17881 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17882 if test -f ${dir}/tkInt.h; then
17883 private_dir=${dir}
17884 fi
17885
17886 if test x"${private_dir}" = x; then
17887 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
17888 else
17889 TK_PRIVATE_INCLUDE="-I${private_dir}"
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17891 $as_echo "${private_dir}" >&6; }
17892 fi
17893
17894 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17895 TK_LIBRARY=${TK_LIB_SPEC}
17896 TK_DEPS=""
17897 else
17898 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17899 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17900 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17901 fi
17902
17903
17904
17905
17906
17907 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
17908
17909 # Include some libraries that Tcl and Tk want.
17910 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17911 # Yes, the ordering seems wrong here. But it isn't.
17912 # TK_LIBS is the list of libraries that need to be linked
17913 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17914 # were in LIBS then any link tests after this point would
17915 # try to include things like `$(LIBGUI)', which wouldn't work.
17916 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
17917
17918 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17919 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17920 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17921 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17922 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17923 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17924 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
17925
17926 if test x"$gdb_cv_os_cygwin" = xyes; then
17927 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17928 WIN32LDAPP="-Wl,--subsystem,console"
17929 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
17930 fi
17931
17932 subdirs="$subdirs gdbtk"
17933
17934 fi
17935 fi
17936
17937
17938
17939
17940
17941
17942
17943
17944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17945 $as_echo_n "checking for X... " >&6; }
17946
17947
17948 # Check whether --with-x was given.
17949 if test "${with_x+set}" = set; then :
17950 withval=$with_x;
17951 fi
17952
17953 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17954 if test "x$with_x" = xno; then
17955 # The user explicitly disabled X.
17956 have_x=disabled
17957 else
17958 case $x_includes,$x_libraries in #(
17959 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17960 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
17961 $as_echo_n "(cached) " >&6
17962 else
17963 # One or both of the vars are not set, and there is no cached value.
17964 ac_x_includes=no ac_x_libraries=no
17965 rm -f -r conftest.dir
17966 if mkdir conftest.dir; then
17967 cd conftest.dir
17968 cat >Imakefile <<'_ACEOF'
17969 incroot:
17970 @echo incroot='${INCROOT}'
17971 usrlibdir:
17972 @echo usrlibdir='${USRLIBDIR}'
17973 libdir:
17974 @echo libdir='${LIBDIR}'
17975 _ACEOF
17976 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17977 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
17978 for ac_var in incroot usrlibdir libdir; do
17979 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17980 done
17981 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17982 for ac_extension in a so sl dylib la dll; do
17983 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17984 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17985 ac_im_usrlibdir=$ac_im_libdir; break
17986 fi
17987 done
17988 # Screen out bogus values from the imake configuration. They are
17989 # bogus both because they are the default anyway, and because
17990 # using them would break gcc on systems where it needs fixed includes.
17991 case $ac_im_incroot in
17992 /usr/include) ac_x_includes= ;;
17993 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17994 esac
17995 case $ac_im_usrlibdir in
17996 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17997 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17998 esac
17999 fi
18000 cd ..
18001 rm -f -r conftest.dir
18002 fi
18003
18004 # Standard set of common directories for X headers.
18005 # Check X11 before X11Rn because it is often a symlink to the current release.
18006 ac_x_header_dirs='
18007 /usr/X11/include
18008 /usr/X11R7/include
18009 /usr/X11R6/include
18010 /usr/X11R5/include
18011 /usr/X11R4/include
18012
18013 /usr/include/X11
18014 /usr/include/X11R7
18015 /usr/include/X11R6
18016 /usr/include/X11R5
18017 /usr/include/X11R4
18018
18019 /usr/local/X11/include
18020 /usr/local/X11R7/include
18021 /usr/local/X11R6/include
18022 /usr/local/X11R5/include
18023 /usr/local/X11R4/include
18024
18025 /usr/local/include/X11
18026 /usr/local/include/X11R7
18027 /usr/local/include/X11R6
18028 /usr/local/include/X11R5
18029 /usr/local/include/X11R4
18030
18031 /usr/X386/include
18032 /usr/x386/include
18033 /usr/XFree86/include/X11
18034
18035 /usr/include
18036 /usr/local/include
18037 /usr/unsupported/include
18038 /usr/athena/include
18039 /usr/local/x11r5/include
18040 /usr/lpp/Xamples/include
18041
18042 /usr/openwin/include
18043 /usr/openwin/share/include'
18044
18045 if test "$ac_x_includes" = no; then
18046 # Guess where to find include files, by looking for Xlib.h.
18047 # First, try using that file with no special directory specified.
18048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18049 /* end confdefs.h. */
18050 #include <X11/Xlib.h>
18051 _ACEOF
18052 if ac_fn_c_try_cpp "$LINENO"; then :
18053 # We can compile using X headers with no special include directory.
18054 ac_x_includes=
18055 else
18056 for ac_dir in $ac_x_header_dirs; do
18057 if test -r "$ac_dir/X11/Xlib.h"; then
18058 ac_x_includes=$ac_dir
18059 break
18060 fi
18061 done
18062 fi
18063 rm -f conftest.err conftest.i conftest.$ac_ext
18064 fi # $ac_x_includes = no
18065
18066 if test "$ac_x_libraries" = no; then
18067 # Check for the libraries.
18068 # See if we find them without any special options.
18069 # Don't add to $LIBS permanently.
18070 ac_save_LIBS=$LIBS
18071 LIBS="-lX11 $LIBS"
18072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18073 /* end confdefs.h. */
18074 #include <X11/Xlib.h>
18075 int
18076 main ()
18077 {
18078 XrmInitialize ()
18079 ;
18080 return 0;
18081 }
18082 _ACEOF
18083 if ac_fn_c_try_link "$LINENO"; then :
18084 LIBS=$ac_save_LIBS
18085 # We can link X programs with no special library path.
18086 ac_x_libraries=
18087 else
18088 LIBS=$ac_save_LIBS
18089 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18090 do
18091 # Don't even attempt the hair of trying to link an X program!
18092 for ac_extension in a so sl dylib la dll; do
18093 if test -r "$ac_dir/libX11.$ac_extension"; then
18094 ac_x_libraries=$ac_dir
18095 break 2
18096 fi
18097 done
18098 done
18099 fi
18100 rm -f core conftest.err conftest.$ac_objext \
18101 conftest$ac_exeext conftest.$ac_ext
18102 fi # $ac_x_libraries = no
18103
18104 case $ac_x_includes,$ac_x_libraries in #(
18105 no,* | *,no | *\'*)
18106 # Didn't find X, or a directory has "'" in its name.
18107 ac_cv_have_x="have_x=no";; #(
18108 *)
18109 # Record where we found X for the cache.
18110 ac_cv_have_x="have_x=yes\
18111 ac_x_includes='$ac_x_includes'\
18112 ac_x_libraries='$ac_x_libraries'"
18113 esac
18114 fi
18115 ;; #(
18116 *) have_x=yes;;
18117 esac
18118 eval "$ac_cv_have_x"
18119 fi # $with_x != no
18120
18121 if test "$have_x" != yes; then
18122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18123 $as_echo "$have_x" >&6; }
18124 no_x=yes
18125 else
18126 # If each of the values was on the command line, it overrides each guess.
18127 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18128 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18129 # Update the cache value to reflect the command line values.
18130 ac_cv_have_x="have_x=yes\
18131 ac_x_includes='$x_includes'\
18132 ac_x_libraries='$x_libraries'"
18133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18134 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18135 fi
18136
18137
18138 # Unlike the sim directory, whether a simulator is linked is controlled by
18139 # presence of a gdb_sim definition in the target configure.tgt entry.
18140 # This code just checks for a few cases where we'd like to ignore those
18141 # definitions, even when they're present in the '.mt' file. These cases
18142 # are when --disable-sim is specified, or if the simulator directory is
18143 # not part of the source tree.
18144 #
18145 # Check whether --enable-sim was given.
18146 if test "${enable_sim+set}" = set; then :
18147 enableval=$enable_sim; echo "enable_sim = $enable_sim";
18148 echo "enableval = ${enableval}";
18149 case "${enableval}" in
18150 yes) ignore_sim=false ;;
18151 no) ignore_sim=true ;;
18152 *) ignore_sim=false ;;
18153 esac
18154 else
18155 ignore_sim=false
18156 fi
18157
18158
18159 if test ! -d "${srcdir}/../sim"; then
18160 ignore_sim=true
18161 fi
18162
18163 SIM=
18164 SIM_OBS=
18165 if test "${ignore_sim}" = "false"; then
18166 if test x"${gdb_sim}" != x ; then
18167 SIM="${gdb_sim}"
18168 SIM_OBS="remote-sim.o"
18169
18170 $as_echo "#define WITH_SIM 1" >>confdefs.h
18171
18172
18173 # Some tdep code should only be compiled in when the ppc sim is
18174 # built. PR sim/13418.
18175 case $target in
18176 powerpc*-*-*)
18177
18178 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18179
18180 ;;
18181 esac
18182 fi
18183 fi
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198 # List of host floatformats.
18199
18200 cat >>confdefs.h <<_ACEOF
18201 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18202 _ACEOF
18203
18204
18205 cat >>confdefs.h <<_ACEOF
18206 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18207 _ACEOF
18208
18209
18210 cat >>confdefs.h <<_ACEOF
18211 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18212 _ACEOF
18213
18214
18215 # target_subdir is used by the testsuite to find the target libraries.
18216 target_subdir=
18217 if test "${host}" != "${target}"; then
18218 target_subdir="${target_alias}/"
18219 fi
18220
18221
18222 # Import nat definitions.
18223 nat_makefile_frag=/dev/null
18224 if test "${gdb_native}" = "yes"; then
18225 . ${srcdir}/configure.nat
18226 nativefile=$NAT_FILE
18227 fi
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239 if test x"${gdb_osabi}" != x ; then
18240
18241 cat >>confdefs.h <<_ACEOF
18242 #define GDB_OSABI_DEFAULT $gdb_osabi
18243 _ACEOF
18244
18245 fi
18246
18247 # Check for babeltrace and babeltrace-ctf
18248
18249 # Check whether --with-babeltrace was given.
18250 if test "${with_babeltrace+set}" = set; then :
18251 withval=$with_babeltrace;
18252 else
18253 with_babeltrace=auto
18254 fi
18255
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18257 $as_echo_n "checking whether to use babeltrace... " >&6; }
18258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18259 $as_echo "$with_babeltrace" >&6; }
18260
18261 if test "x$with_babeltrace" = "xno"; then
18262 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18263 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18264 else
18265 # Append -Werror to CFLAGS so that configure can catch the warning
18266 # "assignment from incompatible pointer type", which is related to
18267 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18268 # in GDB, while babeltrace 1.0.3 is broken.
18269 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18270 # safe to save and restore CFLAGS here.
18271 saved_CFLAGS=$CFLAGS
18272 CFLAGS="$CFLAGS -Werror"
18273
18274
18275
18276
18277
18278
18279
18280
18281 use_additional=yes
18282
18283 acl_save_prefix="$prefix"
18284 prefix="$acl_final_prefix"
18285 acl_save_exec_prefix="$exec_prefix"
18286 exec_prefix="$acl_final_exec_prefix"
18287
18288 eval additional_includedir=\"$includedir\"
18289 eval additional_libdir=\"$libdir\"
18290
18291 exec_prefix="$acl_save_exec_prefix"
18292 prefix="$acl_save_prefix"
18293
18294
18295 # Check whether --with-libbabeltrace-prefix was given.
18296 if test "${with_libbabeltrace_prefix+set}" = set; then :
18297 withval=$with_libbabeltrace_prefix;
18298 if test "X$withval" = "Xno"; then
18299 use_additional=no
18300 else
18301 if test "X$withval" = "X"; then
18302
18303 acl_save_prefix="$prefix"
18304 prefix="$acl_final_prefix"
18305 acl_save_exec_prefix="$exec_prefix"
18306 exec_prefix="$acl_final_exec_prefix"
18307
18308 eval additional_includedir=\"$includedir\"
18309 eval additional_libdir=\"$libdir\"
18310
18311 exec_prefix="$acl_save_exec_prefix"
18312 prefix="$acl_save_prefix"
18313
18314 else
18315 additional_includedir="$withval/include"
18316 additional_libdir="$withval/lib"
18317 fi
18318 fi
18319
18320 fi
18321
18322
18323 # Check whether --with-libbabeltrace-type was given.
18324 if test "${with_libbabeltrace_type+set}" = set; then :
18325 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18326 else
18327 with_libbabeltrace_type=auto
18328 fi
18329
18330 lib_type=`eval echo \$with_libbabeltrace_type`
18331
18332 LIBBABELTRACE=
18333 LTLIBBABELTRACE=
18334 INCBABELTRACE=
18335 rpathdirs=
18336 ltrpathdirs=
18337 names_already_handled=
18338 names_next_round='babeltrace babeltrace-ctf'
18339 while test -n "$names_next_round"; do
18340 names_this_round="$names_next_round"
18341 names_next_round=
18342 for name in $names_this_round; do
18343 already_handled=
18344 for n in $names_already_handled; do
18345 if test "$n" = "$name"; then
18346 already_handled=yes
18347 break
18348 fi
18349 done
18350 if test -z "$already_handled"; then
18351 names_already_handled="$names_already_handled $name"
18352 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18353 eval value=\"\$HAVE_LIB$uppername\"
18354 if test -n "$value"; then
18355 if test "$value" = yes; then
18356 eval value=\"\$LIB$uppername\"
18357 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18358 eval value=\"\$LTLIB$uppername\"
18359 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18360 else
18361 :
18362 fi
18363 else
18364 found_dir=
18365 found_la=
18366 found_so=
18367 found_a=
18368 if test $use_additional = yes; then
18369 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18370 found_dir="$additional_libdir"
18371 found_so="$additional_libdir/lib$name.$shlibext"
18372 if test -f "$additional_libdir/lib$name.la"; then
18373 found_la="$additional_libdir/lib$name.la"
18374 fi
18375 elif test x$lib_type != xshared; then
18376 if test -f "$additional_libdir/lib$name.$libext"; then
18377 found_dir="$additional_libdir"
18378 found_a="$additional_libdir/lib$name.$libext"
18379 if test -f "$additional_libdir/lib$name.la"; then
18380 found_la="$additional_libdir/lib$name.la"
18381 fi
18382 fi
18383 fi
18384 fi
18385 if test "X$found_dir" = "X"; then
18386 for x in $LDFLAGS $LTLIBBABELTRACE; do
18387
18388 acl_save_prefix="$prefix"
18389 prefix="$acl_final_prefix"
18390 acl_save_exec_prefix="$exec_prefix"
18391 exec_prefix="$acl_final_exec_prefix"
18392 eval x=\"$x\"
18393 exec_prefix="$acl_save_exec_prefix"
18394 prefix="$acl_save_prefix"
18395
18396 case "$x" in
18397 -L*)
18398 dir=`echo "X$x" | sed -e 's/^X-L//'`
18399 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18400 found_dir="$dir"
18401 found_so="$dir/lib$name.$shlibext"
18402 if test -f "$dir/lib$name.la"; then
18403 found_la="$dir/lib$name.la"
18404 fi
18405 elif test x$lib_type != xshared; then
18406 if test -f "$dir/lib$name.$libext"; then
18407 found_dir="$dir"
18408 found_a="$dir/lib$name.$libext"
18409 if test -f "$dir/lib$name.la"; then
18410 found_la="$dir/lib$name.la"
18411 fi
18412 fi
18413 fi
18414 ;;
18415 esac
18416 if test "X$found_dir" != "X"; then
18417 break
18418 fi
18419 done
18420 fi
18421 if test "X$found_dir" != "X"; then
18422 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18423 if test "X$found_so" != "X"; then
18424 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18425 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18426 else
18427 haveit=
18428 for x in $ltrpathdirs; do
18429 if test "X$x" = "X$found_dir"; then
18430 haveit=yes
18431 break
18432 fi
18433 done
18434 if test -z "$haveit"; then
18435 ltrpathdirs="$ltrpathdirs $found_dir"
18436 fi
18437 if test "$hardcode_direct" = yes; then
18438 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18439 else
18440 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18441 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18442 haveit=
18443 for x in $rpathdirs; do
18444 if test "X$x" = "X$found_dir"; then
18445 haveit=yes
18446 break
18447 fi
18448 done
18449 if test -z "$haveit"; then
18450 rpathdirs="$rpathdirs $found_dir"
18451 fi
18452 else
18453 haveit=
18454 for x in $LDFLAGS $LIBBABELTRACE; do
18455
18456 acl_save_prefix="$prefix"
18457 prefix="$acl_final_prefix"
18458 acl_save_exec_prefix="$exec_prefix"
18459 exec_prefix="$acl_final_exec_prefix"
18460 eval x=\"$x\"
18461 exec_prefix="$acl_save_exec_prefix"
18462 prefix="$acl_save_prefix"
18463
18464 if test "X$x" = "X-L$found_dir"; then
18465 haveit=yes
18466 break
18467 fi
18468 done
18469 if test -z "$haveit"; then
18470 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18471 fi
18472 if test "$hardcode_minus_L" != no; then
18473 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18474 else
18475 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18476 fi
18477 fi
18478 fi
18479 fi
18480 else
18481 if test "X$found_a" != "X"; then
18482 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18483 else
18484 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18485 fi
18486 fi
18487 additional_includedir=
18488 case "$found_dir" in
18489 */lib | */lib/)
18490 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18491 additional_includedir="$basedir/include"
18492 ;;
18493 esac
18494 if test "X$additional_includedir" != "X"; then
18495 if test "X$additional_includedir" != "X/usr/include"; then
18496 haveit=
18497 if test "X$additional_includedir" = "X/usr/local/include"; then
18498 if test -n "$GCC"; then
18499 case $host_os in
18500 linux*) haveit=yes;;
18501 esac
18502 fi
18503 fi
18504 if test -z "$haveit"; then
18505 for x in $CPPFLAGS $INCBABELTRACE; do
18506
18507 acl_save_prefix="$prefix"
18508 prefix="$acl_final_prefix"
18509 acl_save_exec_prefix="$exec_prefix"
18510 exec_prefix="$acl_final_exec_prefix"
18511 eval x=\"$x\"
18512 exec_prefix="$acl_save_exec_prefix"
18513 prefix="$acl_save_prefix"
18514
18515 if test "X$x" = "X-I$additional_includedir"; then
18516 haveit=yes
18517 break
18518 fi
18519 done
18520 if test -z "$haveit"; then
18521 if test -d "$additional_includedir"; then
18522 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18523 fi
18524 fi
18525 fi
18526 fi
18527 fi
18528 if test -n "$found_la"; then
18529 save_libdir="$libdir"
18530 case "$found_la" in
18531 */* | *\\*) . "$found_la" ;;
18532 *) . "./$found_la" ;;
18533 esac
18534 libdir="$save_libdir"
18535 for dep in $dependency_libs; do
18536 case "$dep" in
18537 -L*)
18538 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18539 if test "X$additional_libdir" != "X/usr/lib"; then
18540 haveit=
18541 if test "X$additional_libdir" = "X/usr/local/lib"; then
18542 if test -n "$GCC"; then
18543 case $host_os in
18544 linux*) haveit=yes;;
18545 esac
18546 fi
18547 fi
18548 if test -z "$haveit"; then
18549 haveit=
18550 for x in $LDFLAGS $LIBBABELTRACE; do
18551
18552 acl_save_prefix="$prefix"
18553 prefix="$acl_final_prefix"
18554 acl_save_exec_prefix="$exec_prefix"
18555 exec_prefix="$acl_final_exec_prefix"
18556 eval x=\"$x\"
18557 exec_prefix="$acl_save_exec_prefix"
18558 prefix="$acl_save_prefix"
18559
18560 if test "X$x" = "X-L$additional_libdir"; then
18561 haveit=yes
18562 break
18563 fi
18564 done
18565 if test -z "$haveit"; then
18566 if test -d "$additional_libdir"; then
18567 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18568 fi
18569 fi
18570 haveit=
18571 for x in $LDFLAGS $LTLIBBABELTRACE; do
18572
18573 acl_save_prefix="$prefix"
18574 prefix="$acl_final_prefix"
18575 acl_save_exec_prefix="$exec_prefix"
18576 exec_prefix="$acl_final_exec_prefix"
18577 eval x=\"$x\"
18578 exec_prefix="$acl_save_exec_prefix"
18579 prefix="$acl_save_prefix"
18580
18581 if test "X$x" = "X-L$additional_libdir"; then
18582 haveit=yes
18583 break
18584 fi
18585 done
18586 if test -z "$haveit"; then
18587 if test -d "$additional_libdir"; then
18588 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18589 fi
18590 fi
18591 fi
18592 fi
18593 ;;
18594 -R*)
18595 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18596 if test "$enable_rpath" != no; then
18597 haveit=
18598 for x in $rpathdirs; do
18599 if test "X$x" = "X$dir"; then
18600 haveit=yes
18601 break
18602 fi
18603 done
18604 if test -z "$haveit"; then
18605 rpathdirs="$rpathdirs $dir"
18606 fi
18607 haveit=
18608 for x in $ltrpathdirs; do
18609 if test "X$x" = "X$dir"; then
18610 haveit=yes
18611 break
18612 fi
18613 done
18614 if test -z "$haveit"; then
18615 ltrpathdirs="$ltrpathdirs $dir"
18616 fi
18617 fi
18618 ;;
18619 -l*)
18620 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18621 ;;
18622 *.la)
18623 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18624 ;;
18625 *)
18626 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18627 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18628 ;;
18629 esac
18630 done
18631 fi
18632 else
18633 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18634 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18635 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18636 else
18637 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18638 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18639 fi
18640 fi
18641 fi
18642 fi
18643 done
18644 done
18645 if test "X$rpathdirs" != "X"; then
18646 if test -n "$hardcode_libdir_separator"; then
18647 alldirs=
18648 for found_dir in $rpathdirs; do
18649 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18650 done
18651 acl_save_libdir="$libdir"
18652 libdir="$alldirs"
18653 eval flag=\"$hardcode_libdir_flag_spec\"
18654 libdir="$acl_save_libdir"
18655 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18656 else
18657 for found_dir in $rpathdirs; do
18658 acl_save_libdir="$libdir"
18659 libdir="$found_dir"
18660 eval flag=\"$hardcode_libdir_flag_spec\"
18661 libdir="$acl_save_libdir"
18662 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18663 done
18664 fi
18665 fi
18666 if test "X$ltrpathdirs" != "X"; then
18667 for found_dir in $ltrpathdirs; do
18668 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18669 done
18670 fi
18671
18672
18673 ac_save_CPPFLAGS="$CPPFLAGS"
18674
18675 for element in $INCBABELTRACE; do
18676 haveit=
18677 for x in $CPPFLAGS; do
18678
18679 acl_save_prefix="$prefix"
18680 prefix="$acl_final_prefix"
18681 acl_save_exec_prefix="$exec_prefix"
18682 exec_prefix="$acl_final_exec_prefix"
18683 eval x=\"$x\"
18684 exec_prefix="$acl_save_exec_prefix"
18685 prefix="$acl_save_prefix"
18686
18687 if test "X$x" = "X$element"; then
18688 haveit=yes
18689 break
18690 fi
18691 done
18692 if test -z "$haveit"; then
18693 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18694 fi
18695 done
18696
18697
18698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18699 $as_echo_n "checking for libbabeltrace... " >&6; }
18700 if ${ac_cv_libbabeltrace+:} false; then :
18701 $as_echo_n "(cached) " >&6
18702 else
18703
18704 ac_save_LIBS="$LIBS"
18705 LIBS="$LIBS $LIBBABELTRACE"
18706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18707 /* end confdefs.h. */
18708 #include <babeltrace/babeltrace.h>
18709 #include <babeltrace/ctf/events.h>
18710 #include <babeltrace/ctf/iterator.h>
18711 int
18712 main ()
18713 {
18714 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18715 struct bt_ctf_event *event = NULL;
18716 const struct bt_definition *scope;
18717
18718 pos->type = BT_SEEK_BEGIN;
18719 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
18720 scope = bt_ctf_get_top_level_scope (event,
18721 BT_STREAM_EVENT_HEADER);
18722 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18723
18724 ;
18725 return 0;
18726 }
18727 _ACEOF
18728 if ac_fn_c_try_link "$LINENO"; then :
18729 ac_cv_libbabeltrace=yes
18730 else
18731 ac_cv_libbabeltrace=no
18732 fi
18733 rm -f core conftest.err conftest.$ac_objext \
18734 conftest$ac_exeext conftest.$ac_ext
18735 LIBS="$ac_save_LIBS"
18736
18737 fi
18738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18739 $as_echo "$ac_cv_libbabeltrace" >&6; }
18740 if test "$ac_cv_libbabeltrace" = yes; then
18741 HAVE_LIBBABELTRACE=yes
18742
18743 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18744
18745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18746 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
18747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18748 $as_echo "$LIBBABELTRACE" >&6; }
18749 else
18750 HAVE_LIBBABELTRACE=no
18751 CPPFLAGS="$ac_save_CPPFLAGS"
18752 LIBBABELTRACE=
18753 LTLIBBABELTRACE=
18754 fi
18755
18756
18757
18758
18759
18760
18761 CFLAGS=$saved_CFLAGS
18762
18763 if test "$HAVE_LIBBABELTRACE" != yes; then
18764 if test "$with_babeltrace" = yes; then
18765 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
18766 else
18767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18768 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18769 fi
18770 fi
18771 fi
18772
18773 # Check for xxhash
18774
18775 # Check whether --with-xxhash was given.
18776 if test "${with_xxhash+set}" = set; then :
18777 withval=$with_xxhash;
18778 else
18779 with_xxhash=auto
18780 fi
18781
18782
18783 # Check whether --enable-libctf was given.
18784 if test "${enable_libctf+set}" = set; then :
18785 enableval=$enable_libctf;
18786 case "$enableval" in
18787 yes|no) ;;
18788 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
18789 esac
18790
18791 else
18792 enable_libctf=yes
18793 fi
18794
18795
18796 if test x${enable_static} = xno; then
18797 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
18798 CTF_DEPS="../libctf/.libs/libctf.so"
18799 else
18800 LIBCTF="../libctf/.libs/libctf.a"
18801 CTF_DEPS="$LIBCTF"
18802 fi
18803 if test "${enable_libctf}" = yes; then
18804
18805 $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
18806
18807 else
18808 LIBCTF=
18809 CTF_DEPS=
18810 fi
18811
18812
18813
18814
18815 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
18816 # empty version.
18817
18818 if test "x$with_xxhash" != "xno"; then
18819
18820
18821
18822
18823
18824
18825
18826
18827 use_additional=yes
18828
18829 acl_save_prefix="$prefix"
18830 prefix="$acl_final_prefix"
18831 acl_save_exec_prefix="$exec_prefix"
18832 exec_prefix="$acl_final_exec_prefix"
18833
18834 eval additional_includedir=\"$includedir\"
18835 eval additional_libdir=\"$libdir\"
18836
18837 exec_prefix="$acl_save_exec_prefix"
18838 prefix="$acl_save_prefix"
18839
18840
18841 # Check whether --with-libxxhash-prefix was given.
18842 if test "${with_libxxhash_prefix+set}" = set; then :
18843 withval=$with_libxxhash_prefix;
18844 if test "X$withval" = "Xno"; then
18845 use_additional=no
18846 else
18847 if test "X$withval" = "X"; then
18848
18849 acl_save_prefix="$prefix"
18850 prefix="$acl_final_prefix"
18851 acl_save_exec_prefix="$exec_prefix"
18852 exec_prefix="$acl_final_exec_prefix"
18853
18854 eval additional_includedir=\"$includedir\"
18855 eval additional_libdir=\"$libdir\"
18856
18857 exec_prefix="$acl_save_exec_prefix"
18858 prefix="$acl_save_prefix"
18859
18860 else
18861 additional_includedir="$withval/include"
18862 additional_libdir="$withval/lib"
18863 fi
18864 fi
18865
18866 fi
18867
18868
18869 # Check whether --with-libxxhash-type was given.
18870 if test "${with_libxxhash_type+set}" = set; then :
18871 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18872 else
18873 with_libxxhash_type=auto
18874 fi
18875
18876 lib_type=`eval echo \$with_libxxhash_type`
18877
18878 LIBXXHASH=
18879 LTLIBXXHASH=
18880 INCXXHASH=
18881 rpathdirs=
18882 ltrpathdirs=
18883 names_already_handled=
18884 names_next_round='xxhash '
18885 while test -n "$names_next_round"; do
18886 names_this_round="$names_next_round"
18887 names_next_round=
18888 for name in $names_this_round; do
18889 already_handled=
18890 for n in $names_already_handled; do
18891 if test "$n" = "$name"; then
18892 already_handled=yes
18893 break
18894 fi
18895 done
18896 if test -z "$already_handled"; then
18897 names_already_handled="$names_already_handled $name"
18898 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18899 eval value=\"\$HAVE_LIB$uppername\"
18900 if test -n "$value"; then
18901 if test "$value" = yes; then
18902 eval value=\"\$LIB$uppername\"
18903 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18904 eval value=\"\$LTLIB$uppername\"
18905 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18906 else
18907 :
18908 fi
18909 else
18910 found_dir=
18911 found_la=
18912 found_so=
18913 found_a=
18914 if test $use_additional = yes; then
18915 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18916 found_dir="$additional_libdir"
18917 found_so="$additional_libdir/lib$name.$shlibext"
18918 if test -f "$additional_libdir/lib$name.la"; then
18919 found_la="$additional_libdir/lib$name.la"
18920 fi
18921 elif test x$lib_type != xshared; then
18922 if test -f "$additional_libdir/lib$name.$libext"; then
18923 found_dir="$additional_libdir"
18924 found_a="$additional_libdir/lib$name.$libext"
18925 if test -f "$additional_libdir/lib$name.la"; then
18926 found_la="$additional_libdir/lib$name.la"
18927 fi
18928 fi
18929 fi
18930 fi
18931 if test "X$found_dir" = "X"; then
18932 for x in $LDFLAGS $LTLIBXXHASH; do
18933
18934 acl_save_prefix="$prefix"
18935 prefix="$acl_final_prefix"
18936 acl_save_exec_prefix="$exec_prefix"
18937 exec_prefix="$acl_final_exec_prefix"
18938 eval x=\"$x\"
18939 exec_prefix="$acl_save_exec_prefix"
18940 prefix="$acl_save_prefix"
18941
18942 case "$x" in
18943 -L*)
18944 dir=`echo "X$x" | sed -e 's/^X-L//'`
18945 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18946 found_dir="$dir"
18947 found_so="$dir/lib$name.$shlibext"
18948 if test -f "$dir/lib$name.la"; then
18949 found_la="$dir/lib$name.la"
18950 fi
18951 elif test x$lib_type != xshared; then
18952 if test -f "$dir/lib$name.$libext"; then
18953 found_dir="$dir"
18954 found_a="$dir/lib$name.$libext"
18955 if test -f "$dir/lib$name.la"; then
18956 found_la="$dir/lib$name.la"
18957 fi
18958 fi
18959 fi
18960 ;;
18961 esac
18962 if test "X$found_dir" != "X"; then
18963 break
18964 fi
18965 done
18966 fi
18967 if test "X$found_dir" != "X"; then
18968 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18969 if test "X$found_so" != "X"; then
18970 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18971 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18972 else
18973 haveit=
18974 for x in $ltrpathdirs; do
18975 if test "X$x" = "X$found_dir"; then
18976 haveit=yes
18977 break
18978 fi
18979 done
18980 if test -z "$haveit"; then
18981 ltrpathdirs="$ltrpathdirs $found_dir"
18982 fi
18983 if test "$hardcode_direct" = yes; then
18984 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18985 else
18986 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18987 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18988 haveit=
18989 for x in $rpathdirs; do
18990 if test "X$x" = "X$found_dir"; then
18991 haveit=yes
18992 break
18993 fi
18994 done
18995 if test -z "$haveit"; then
18996 rpathdirs="$rpathdirs $found_dir"
18997 fi
18998 else
18999 haveit=
19000 for x in $LDFLAGS $LIBXXHASH; do
19001
19002 acl_save_prefix="$prefix"
19003 prefix="$acl_final_prefix"
19004 acl_save_exec_prefix="$exec_prefix"
19005 exec_prefix="$acl_final_exec_prefix"
19006 eval x=\"$x\"
19007 exec_prefix="$acl_save_exec_prefix"
19008 prefix="$acl_save_prefix"
19009
19010 if test "X$x" = "X-L$found_dir"; then
19011 haveit=yes
19012 break
19013 fi
19014 done
19015 if test -z "$haveit"; then
19016 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19017 fi
19018 if test "$hardcode_minus_L" != no; then
19019 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19020 else
19021 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19022 fi
19023 fi
19024 fi
19025 fi
19026 else
19027 if test "X$found_a" != "X"; then
19028 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19029 else
19030 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19031 fi
19032 fi
19033 additional_includedir=
19034 case "$found_dir" in
19035 */lib | */lib/)
19036 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19037 additional_includedir="$basedir/include"
19038 ;;
19039 esac
19040 if test "X$additional_includedir" != "X"; then
19041 if test "X$additional_includedir" != "X/usr/include"; then
19042 haveit=
19043 if test "X$additional_includedir" = "X/usr/local/include"; then
19044 if test -n "$GCC"; then
19045 case $host_os in
19046 linux*) haveit=yes;;
19047 esac
19048 fi
19049 fi
19050 if test -z "$haveit"; then
19051 for x in $CPPFLAGS $INCXXHASH; do
19052
19053 acl_save_prefix="$prefix"
19054 prefix="$acl_final_prefix"
19055 acl_save_exec_prefix="$exec_prefix"
19056 exec_prefix="$acl_final_exec_prefix"
19057 eval x=\"$x\"
19058 exec_prefix="$acl_save_exec_prefix"
19059 prefix="$acl_save_prefix"
19060
19061 if test "X$x" = "X-I$additional_includedir"; then
19062 haveit=yes
19063 break
19064 fi
19065 done
19066 if test -z "$haveit"; then
19067 if test -d "$additional_includedir"; then
19068 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19069 fi
19070 fi
19071 fi
19072 fi
19073 fi
19074 if test -n "$found_la"; then
19075 save_libdir="$libdir"
19076 case "$found_la" in
19077 */* | *\\*) . "$found_la" ;;
19078 *) . "./$found_la" ;;
19079 esac
19080 libdir="$save_libdir"
19081 for dep in $dependency_libs; do
19082 case "$dep" in
19083 -L*)
19084 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19085 if test "X$additional_libdir" != "X/usr/lib"; then
19086 haveit=
19087 if test "X$additional_libdir" = "X/usr/local/lib"; then
19088 if test -n "$GCC"; then
19089 case $host_os in
19090 linux*) haveit=yes;;
19091 esac
19092 fi
19093 fi
19094 if test -z "$haveit"; then
19095 haveit=
19096 for x in $LDFLAGS $LIBXXHASH; do
19097
19098 acl_save_prefix="$prefix"
19099 prefix="$acl_final_prefix"
19100 acl_save_exec_prefix="$exec_prefix"
19101 exec_prefix="$acl_final_exec_prefix"
19102 eval x=\"$x\"
19103 exec_prefix="$acl_save_exec_prefix"
19104 prefix="$acl_save_prefix"
19105
19106 if test "X$x" = "X-L$additional_libdir"; then
19107 haveit=yes
19108 break
19109 fi
19110 done
19111 if test -z "$haveit"; then
19112 if test -d "$additional_libdir"; then
19113 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19114 fi
19115 fi
19116 haveit=
19117 for x in $LDFLAGS $LTLIBXXHASH; do
19118
19119 acl_save_prefix="$prefix"
19120 prefix="$acl_final_prefix"
19121 acl_save_exec_prefix="$exec_prefix"
19122 exec_prefix="$acl_final_exec_prefix"
19123 eval x=\"$x\"
19124 exec_prefix="$acl_save_exec_prefix"
19125 prefix="$acl_save_prefix"
19126
19127 if test "X$x" = "X-L$additional_libdir"; then
19128 haveit=yes
19129 break
19130 fi
19131 done
19132 if test -z "$haveit"; then
19133 if test -d "$additional_libdir"; then
19134 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19135 fi
19136 fi
19137 fi
19138 fi
19139 ;;
19140 -R*)
19141 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19142 if test "$enable_rpath" != no; then
19143 haveit=
19144 for x in $rpathdirs; do
19145 if test "X$x" = "X$dir"; then
19146 haveit=yes
19147 break
19148 fi
19149 done
19150 if test -z "$haveit"; then
19151 rpathdirs="$rpathdirs $dir"
19152 fi
19153 haveit=
19154 for x in $ltrpathdirs; do
19155 if test "X$x" = "X$dir"; then
19156 haveit=yes
19157 break
19158 fi
19159 done
19160 if test -z "$haveit"; then
19161 ltrpathdirs="$ltrpathdirs $dir"
19162 fi
19163 fi
19164 ;;
19165 -l*)
19166 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19167 ;;
19168 *.la)
19169 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19170 ;;
19171 *)
19172 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19173 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19174 ;;
19175 esac
19176 done
19177 fi
19178 else
19179 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19180 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19181 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19182 else
19183 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19184 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19185 fi
19186 fi
19187 fi
19188 fi
19189 done
19190 done
19191 if test "X$rpathdirs" != "X"; then
19192 if test -n "$hardcode_libdir_separator"; then
19193 alldirs=
19194 for found_dir in $rpathdirs; do
19195 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19196 done
19197 acl_save_libdir="$libdir"
19198 libdir="$alldirs"
19199 eval flag=\"$hardcode_libdir_flag_spec\"
19200 libdir="$acl_save_libdir"
19201 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19202 else
19203 for found_dir in $rpathdirs; do
19204 acl_save_libdir="$libdir"
19205 libdir="$found_dir"
19206 eval flag=\"$hardcode_libdir_flag_spec\"
19207 libdir="$acl_save_libdir"
19208 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19209 done
19210 fi
19211 fi
19212 if test "X$ltrpathdirs" != "X"; then
19213 for found_dir in $ltrpathdirs; do
19214 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19215 done
19216 fi
19217
19218
19219 ac_save_CPPFLAGS="$CPPFLAGS"
19220
19221 for element in $INCXXHASH; do
19222 haveit=
19223 for x in $CPPFLAGS; do
19224
19225 acl_save_prefix="$prefix"
19226 prefix="$acl_final_prefix"
19227 acl_save_exec_prefix="$exec_prefix"
19228 exec_prefix="$acl_final_exec_prefix"
19229 eval x=\"$x\"
19230 exec_prefix="$acl_save_exec_prefix"
19231 prefix="$acl_save_prefix"
19232
19233 if test "X$x" = "X$element"; then
19234 haveit=yes
19235 break
19236 fi
19237 done
19238 if test -z "$haveit"; then
19239 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19240 fi
19241 done
19242
19243
19244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19245 $as_echo_n "checking for libxxhash... " >&6; }
19246 if ${ac_cv_libxxhash+:} false; then :
19247 $as_echo_n "(cached) " >&6
19248 else
19249
19250 ac_save_LIBS="$LIBS"
19251 LIBS="$LIBS $LIBXXHASH"
19252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19253 /* end confdefs.h. */
19254 #include <xxhash.h>
19255 int
19256 main ()
19257 {
19258 XXH32("foo", 3, 0);
19259
19260 ;
19261 return 0;
19262 }
19263 _ACEOF
19264 if ac_fn_c_try_link "$LINENO"; then :
19265 ac_cv_libxxhash=yes
19266 else
19267 ac_cv_libxxhash=no
19268 fi
19269 rm -f core conftest.err conftest.$ac_objext \
19270 conftest$ac_exeext conftest.$ac_ext
19271 LIBS="$ac_save_LIBS"
19272
19273 fi
19274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19275 $as_echo "$ac_cv_libxxhash" >&6; }
19276 if test "$ac_cv_libxxhash" = yes; then
19277 HAVE_LIBXXHASH=yes
19278
19279 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19280
19281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19282 $as_echo_n "checking how to link with libxxhash... " >&6; }
19283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19284 $as_echo "$LIBXXHASH" >&6; }
19285 else
19286 HAVE_LIBXXHASH=no
19287 CPPFLAGS="$ac_save_CPPFLAGS"
19288 LIBXXHASH=
19289 LTLIBXXHASH=
19290 fi
19291
19292
19293
19294
19295
19296
19297 if test "$HAVE_LIBXXHASH" != yes; then
19298 if test "$with_xxhash" = yes; then
19299 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19300 fi
19301 fi
19302 if test "x$with_xxhash" = "xauto"; then
19303 with_xxhash="$HAVE_LIBXXHASH"
19304 fi
19305 fi
19306
19307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19308 $as_echo_n "checking whether to use xxhash... " >&6; }
19309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19310 $as_echo "$with_xxhash" >&6; }
19311
19312 NM_H=
19313 rm -f nm.h
19314 if test "${nativefile}" != ""; then
19315 case "${nativefile}" in
19316 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19317 * ) GDB_NM_FILE="${nativefile}"
19318 esac
19319 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19320
19321
19322 cat >>confdefs.h <<_ACEOF
19323 #define GDB_NM_FILE "${GDB_NM_FILE}"
19324 _ACEOF
19325
19326 NM_H=nm.h
19327 fi
19328
19329
19330
19331 for ac_prog in xsltproc
19332 do
19333 # Extract the first word of "$ac_prog", so it can be a program name with args.
19334 set dummy $ac_prog; ac_word=$2
19335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19336 $as_echo_n "checking for $ac_word... " >&6; }
19337 if ${ac_cv_path_XSLTPROC+:} false; then :
19338 $as_echo_n "(cached) " >&6
19339 else
19340 case $XSLTPROC in
19341 [\\/]* | ?:[\\/]*)
19342 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19343 ;;
19344 *)
19345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19346 for as_dir in $PATH
19347 do
19348 IFS=$as_save_IFS
19349 test -z "$as_dir" && as_dir=.
19350 for ac_exec_ext in '' $ac_executable_extensions; do
19351 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19352 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19353 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19354 break 2
19355 fi
19356 done
19357 done
19358 IFS=$as_save_IFS
19359
19360 ;;
19361 esac
19362 fi
19363 XSLTPROC=$ac_cv_path_XSLTPROC
19364 if test -n "$XSLTPROC"; then
19365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19366 $as_echo "$XSLTPROC" >&6; }
19367 else
19368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19369 $as_echo "no" >&6; }
19370 fi
19371
19372
19373 test -n "$XSLTPROC" && break
19374 done
19375 test -n "$XSLTPROC" || XSLTPROC="missing"
19376
19377 if test "x$USE_MAINTAINER_MODE" = xyes; then
19378 if test "${XSLTPROC}" = missing; then
19379 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19380 fi
19381 fi
19382
19383
19384
19385
19386
19387 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19388
19389
19390
19391 # Check whether we will enable the inclusion of unit tests when
19392 # compiling GDB.
19393 #
19394 # The default value of this option changes depending whether we're on
19395 # development mode (in which case it's "true") or not (in which case
19396 # it's "false"). The $development variable is set by the GDB_AC_COMMON
19397 # macro, which must therefore be used before GDB_AC_SELFTEST.
19398
19399 if test "x$development" != xtrue && test "x$development" != xfalse; then :
19400 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19401 fi
19402
19403 # Check whether --enable-unit-tests was given.
19404 if test "${enable_unit_tests+set}" = set; then :
19405 enableval=$enable_unit_tests; case "${enableval}" in
19406 yes) enable_unittests=true ;;
19407 no) enable_unittests=false ;;
19408 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19409 esac
19410 else
19411 enable_unittests=$development
19412 fi
19413
19414
19415 if $enable_unittests; then
19416
19417 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19418
19419
19420 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19421 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19422
19423 fi
19424
19425
19426
19427 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19428 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19429 if test "x$GDB_TRANSFORM_NAME" = x; then
19430 GDB_TRANSFORM_NAME=gdb
19431 fi
19432
19433
19434
19435 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19436 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19437 if test "x$GCORE_TRANSFORM_NAME" = x; then
19438 GCORE_TRANSFORM_NAME=gcore
19439 fi
19440
19441
19442 ac_config_files="$ac_config_files gcore"
19443
19444 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19445
19446
19447 cat >confcache <<\_ACEOF
19448 # This file is a shell script that caches the results of configure
19449 # tests run on this system so they can be shared between configure
19450 # scripts and configure runs, see configure's option --config-cache.
19451 # It is not useful on other systems. If it contains results you don't
19452 # want to keep, you may remove or edit it.
19453 #
19454 # config.status only pays attention to the cache file if you give it
19455 # the --recheck option to rerun configure.
19456 #
19457 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19458 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19459 # following values.
19460
19461 _ACEOF
19462
19463 # The following way of writing the cache mishandles newlines in values,
19464 # but we know of no workaround that is simple, portable, and efficient.
19465 # So, we kill variables containing newlines.
19466 # Ultrix sh set writes to stderr and can't be redirected directly,
19467 # and sets the high bit in the cache file unless we assign to the vars.
19468 (
19469 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19470 eval ac_val=\$$ac_var
19471 case $ac_val in #(
19472 *${as_nl}*)
19473 case $ac_var in #(
19474 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19475 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19476 esac
19477 case $ac_var in #(
19478 _ | IFS | as_nl) ;; #(
19479 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19480 *) { eval $ac_var=; unset $ac_var;} ;;
19481 esac ;;
19482 esac
19483 done
19484
19485 (set) 2>&1 |
19486 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19487 *${as_nl}ac_space=\ *)
19488 # `set' does not quote correctly, so add quotes: double-quote
19489 # substitution turns \\\\ into \\, and sed turns \\ into \.
19490 sed -n \
19491 "s/'/'\\\\''/g;
19492 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19493 ;; #(
19494 *)
19495 # `set' quotes correctly as required by POSIX, so do not add quotes.
19496 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19497 ;;
19498 esac |
19499 sort
19500 ) |
19501 sed '
19502 /^ac_cv_env_/b end
19503 t clear
19504 :clear
19505 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19506 t end
19507 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19508 :end' >>confcache
19509 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19510 if test -w "$cache_file"; then
19511 if test "x$cache_file" != "x/dev/null"; then
19512 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19513 $as_echo "$as_me: updating cache $cache_file" >&6;}
19514 if test ! -f "$cache_file" || test -h "$cache_file"; then
19515 cat confcache >"$cache_file"
19516 else
19517 case $cache_file in #(
19518 */* | ?:*)
19519 mv -f confcache "$cache_file"$$ &&
19520 mv -f "$cache_file"$$ "$cache_file" ;; #(
19521 *)
19522 mv -f confcache "$cache_file" ;;
19523 esac
19524 fi
19525 fi
19526 else
19527 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19528 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19529 fi
19530 fi
19531 rm -f confcache
19532
19533 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19534 # Let make expand exec_prefix.
19535 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19536
19537 DEFS=-DHAVE_CONFIG_H
19538
19539 ac_libobjs=
19540 ac_ltlibobjs=
19541 U=
19542 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19543 # 1. Remove the extension, and $U if already installed.
19544 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19545 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19546 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19547 # will be set to the directory where LIBOBJS objects are built.
19548 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19549 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19550 done
19551 LIBOBJS=$ac_libobjs
19552
19553 LTLIBOBJS=$ac_ltlibobjs
19554
19555
19556 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19557 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19558 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19559 fi
19560 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19561 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19562 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19563 fi
19564 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19565 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19566 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19567 fi
19568
19569
19570 : "${CONFIG_STATUS=./config.status}"
19571 ac_write_fail=0
19572 ac_clean_files_save=$ac_clean_files
19573 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19574 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19575 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19576 as_write_fail=0
19577 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19578 #! $SHELL
19579 # Generated by $as_me.
19580 # Run this file to recreate the current configuration.
19581 # Compiler output produced by configure, useful for debugging
19582 # configure, is in config.log if it exists.
19583
19584 debug=false
19585 ac_cs_recheck=false
19586 ac_cs_silent=false
19587
19588 SHELL=\${CONFIG_SHELL-$SHELL}
19589 export SHELL
19590 _ASEOF
19591 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19592 ## -------------------- ##
19593 ## M4sh Initialization. ##
19594 ## -------------------- ##
19595
19596 # Be more Bourne compatible
19597 DUALCASE=1; export DUALCASE # for MKS sh
19598 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19599 emulate sh
19600 NULLCMD=:
19601 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19602 # is contrary to our usage. Disable this feature.
19603 alias -g '${1+"$@"}'='"$@"'
19604 setopt NO_GLOB_SUBST
19605 else
19606 case `(set -o) 2>/dev/null` in #(
19607 *posix*) :
19608 set -o posix ;; #(
19609 *) :
19610 ;;
19611 esac
19612 fi
19613
19614
19615 as_nl='
19616 '
19617 export as_nl
19618 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19619 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19620 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19621 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19622 # Prefer a ksh shell builtin over an external printf program on Solaris,
19623 # but without wasting forks for bash or zsh.
19624 if test -z "$BASH_VERSION$ZSH_VERSION" \
19625 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19626 as_echo='print -r --'
19627 as_echo_n='print -rn --'
19628 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19629 as_echo='printf %s\n'
19630 as_echo_n='printf %s'
19631 else
19632 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19633 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19634 as_echo_n='/usr/ucb/echo -n'
19635 else
19636 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19637 as_echo_n_body='eval
19638 arg=$1;
19639 case $arg in #(
19640 *"$as_nl"*)
19641 expr "X$arg" : "X\\(.*\\)$as_nl";
19642 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19643 esac;
19644 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19645 '
19646 export as_echo_n_body
19647 as_echo_n='sh -c $as_echo_n_body as_echo'
19648 fi
19649 export as_echo_body
19650 as_echo='sh -c $as_echo_body as_echo'
19651 fi
19652
19653 # The user is always right.
19654 if test "${PATH_SEPARATOR+set}" != set; then
19655 PATH_SEPARATOR=:
19656 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19657 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19658 PATH_SEPARATOR=';'
19659 }
19660 fi
19661
19662
19663 # IFS
19664 # We need space, tab and new line, in precisely that order. Quoting is
19665 # there to prevent editors from complaining about space-tab.
19666 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19667 # splitting by setting IFS to empty value.)
19668 IFS=" "" $as_nl"
19669
19670 # Find who we are. Look in the path if we contain no directory separator.
19671 as_myself=
19672 case $0 in #((
19673 *[\\/]* ) as_myself=$0 ;;
19674 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19675 for as_dir in $PATH
19676 do
19677 IFS=$as_save_IFS
19678 test -z "$as_dir" && as_dir=.
19679 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19680 done
19681 IFS=$as_save_IFS
19682
19683 ;;
19684 esac
19685 # We did not find ourselves, most probably we were run as `sh COMMAND'
19686 # in which case we are not to be found in the path.
19687 if test "x$as_myself" = x; then
19688 as_myself=$0
19689 fi
19690 if test ! -f "$as_myself"; then
19691 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19692 exit 1
19693 fi
19694
19695 # Unset variables that we do not need and which cause bugs (e.g. in
19696 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19697 # suppresses any "Segmentation fault" message there. '((' could
19698 # trigger a bug in pdksh 5.2.14.
19699 for as_var in BASH_ENV ENV MAIL MAILPATH
19700 do eval test x\${$as_var+set} = xset \
19701 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19702 done
19703 PS1='$ '
19704 PS2='> '
19705 PS4='+ '
19706
19707 # NLS nuisances.
19708 LC_ALL=C
19709 export LC_ALL
19710 LANGUAGE=C
19711 export LANGUAGE
19712
19713 # CDPATH.
19714 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19715
19716
19717 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19718 # ----------------------------------------
19719 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19720 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19721 # script with STATUS, using 1 if that was 0.
19722 as_fn_error ()
19723 {
19724 as_status=$1; test $as_status -eq 0 && as_status=1
19725 if test "$4"; then
19726 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19727 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19728 fi
19729 $as_echo "$as_me: error: $2" >&2
19730 as_fn_exit $as_status
19731 } # as_fn_error
19732
19733
19734 # as_fn_set_status STATUS
19735 # -----------------------
19736 # Set $? to STATUS, without forking.
19737 as_fn_set_status ()
19738 {
19739 return $1
19740 } # as_fn_set_status
19741
19742 # as_fn_exit STATUS
19743 # -----------------
19744 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19745 as_fn_exit ()
19746 {
19747 set +e
19748 as_fn_set_status $1
19749 exit $1
19750 } # as_fn_exit
19751
19752 # as_fn_unset VAR
19753 # ---------------
19754 # Portably unset VAR.
19755 as_fn_unset ()
19756 {
19757 { eval $1=; unset $1;}
19758 }
19759 as_unset=as_fn_unset
19760 # as_fn_append VAR VALUE
19761 # ----------------------
19762 # Append the text in VALUE to the end of the definition contained in VAR. Take
19763 # advantage of any shell optimizations that allow amortized linear growth over
19764 # repeated appends, instead of the typical quadratic growth present in naive
19765 # implementations.
19766 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19767 eval 'as_fn_append ()
19768 {
19769 eval $1+=\$2
19770 }'
19771 else
19772 as_fn_append ()
19773 {
19774 eval $1=\$$1\$2
19775 }
19776 fi # as_fn_append
19777
19778 # as_fn_arith ARG...
19779 # ------------------
19780 # Perform arithmetic evaluation on the ARGs, and store the result in the
19781 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19782 # must be portable across $(()) and expr.
19783 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19784 eval 'as_fn_arith ()
19785 {
19786 as_val=$(( $* ))
19787 }'
19788 else
19789 as_fn_arith ()
19790 {
19791 as_val=`expr "$@" || test $? -eq 1`
19792 }
19793 fi # as_fn_arith
19794
19795
19796 if expr a : '\(a\)' >/dev/null 2>&1 &&
19797 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19798 as_expr=expr
19799 else
19800 as_expr=false
19801 fi
19802
19803 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19804 as_basename=basename
19805 else
19806 as_basename=false
19807 fi
19808
19809 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19810 as_dirname=dirname
19811 else
19812 as_dirname=false
19813 fi
19814
19815 as_me=`$as_basename -- "$0" ||
19816 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19817 X"$0" : 'X\(//\)$' \| \
19818 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19819 $as_echo X/"$0" |
19820 sed '/^.*\/\([^/][^/]*\)\/*$/{
19821 s//\1/
19822 q
19823 }
19824 /^X\/\(\/\/\)$/{
19825 s//\1/
19826 q
19827 }
19828 /^X\/\(\/\).*/{
19829 s//\1/
19830 q
19831 }
19832 s/.*/./; q'`
19833
19834 # Avoid depending upon Character Ranges.
19835 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19836 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19837 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19838 as_cr_digits='0123456789'
19839 as_cr_alnum=$as_cr_Letters$as_cr_digits
19840
19841 ECHO_C= ECHO_N= ECHO_T=
19842 case `echo -n x` in #(((((
19843 -n*)
19844 case `echo 'xy\c'` in
19845 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19846 xy) ECHO_C='\c';;
19847 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19848 ECHO_T=' ';;
19849 esac;;
19850 *)
19851 ECHO_N='-n';;
19852 esac
19853
19854 rm -f conf$$ conf$$.exe conf$$.file
19855 if test -d conf$$.dir; then
19856 rm -f conf$$.dir/conf$$.file
19857 else
19858 rm -f conf$$.dir
19859 mkdir conf$$.dir 2>/dev/null
19860 fi
19861 if (echo >conf$$.file) 2>/dev/null; then
19862 if ln -s conf$$.file conf$$ 2>/dev/null; then
19863 as_ln_s='ln -s'
19864 # ... but there are two gotchas:
19865 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19866 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19867 # In both cases, we have to default to `cp -pR'.
19868 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19869 as_ln_s='cp -pR'
19870 elif ln conf$$.file conf$$ 2>/dev/null; then
19871 as_ln_s=ln
19872 else
19873 as_ln_s='cp -pR'
19874 fi
19875 else
19876 as_ln_s='cp -pR'
19877 fi
19878 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19879 rmdir conf$$.dir 2>/dev/null
19880
19881
19882 # as_fn_mkdir_p
19883 # -------------
19884 # Create "$as_dir" as a directory, including parents if necessary.
19885 as_fn_mkdir_p ()
19886 {
19887
19888 case $as_dir in #(
19889 -*) as_dir=./$as_dir;;
19890 esac
19891 test -d "$as_dir" || eval $as_mkdir_p || {
19892 as_dirs=
19893 while :; do
19894 case $as_dir in #(
19895 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19896 *) as_qdir=$as_dir;;
19897 esac
19898 as_dirs="'$as_qdir' $as_dirs"
19899 as_dir=`$as_dirname -- "$as_dir" ||
19900 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19901 X"$as_dir" : 'X\(//\)[^/]' \| \
19902 X"$as_dir" : 'X\(//\)$' \| \
19903 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19904 $as_echo X"$as_dir" |
19905 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19906 s//\1/
19907 q
19908 }
19909 /^X\(\/\/\)[^/].*/{
19910 s//\1/
19911 q
19912 }
19913 /^X\(\/\/\)$/{
19914 s//\1/
19915 q
19916 }
19917 /^X\(\/\).*/{
19918 s//\1/
19919 q
19920 }
19921 s/.*/./; q'`
19922 test -d "$as_dir" && break
19923 done
19924 test -z "$as_dirs" || eval "mkdir $as_dirs"
19925 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19926
19927
19928 } # as_fn_mkdir_p
19929 if mkdir -p . 2>/dev/null; then
19930 as_mkdir_p='mkdir -p "$as_dir"'
19931 else
19932 test -d ./-p && rmdir ./-p
19933 as_mkdir_p=false
19934 fi
19935
19936
19937 # as_fn_executable_p FILE
19938 # -----------------------
19939 # Test if FILE is an executable regular file.
19940 as_fn_executable_p ()
19941 {
19942 test -f "$1" && test -x "$1"
19943 } # as_fn_executable_p
19944 as_test_x='test -x'
19945 as_executable_p=as_fn_executable_p
19946
19947 # Sed expression to map a string onto a valid CPP name.
19948 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19949
19950 # Sed expression to map a string onto a valid variable name.
19951 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19952
19953
19954 exec 6>&1
19955 ## ----------------------------------- ##
19956 ## Main body of $CONFIG_STATUS script. ##
19957 ## ----------------------------------- ##
19958 _ASEOF
19959 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19960
19961 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19962 # Save the log message, to keep $0 and so on meaningful, and to
19963 # report actual input values of CONFIG_FILES etc. instead of their
19964 # values after options handling.
19965 ac_log="
19966 This file was extended by $as_me, which was
19967 generated by GNU Autoconf 2.69. Invocation command line was
19968
19969 CONFIG_FILES = $CONFIG_FILES
19970 CONFIG_HEADERS = $CONFIG_HEADERS
19971 CONFIG_LINKS = $CONFIG_LINKS
19972 CONFIG_COMMANDS = $CONFIG_COMMANDS
19973 $ $0 $@
19974
19975 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19976 "
19977
19978 _ACEOF
19979
19980 case $ac_config_files in *"
19981 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19982 esac
19983
19984 case $ac_config_headers in *"
19985 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19986 esac
19987
19988
19989 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19990 # Files that config.status was made for.
19991 config_files="$ac_config_files"
19992 config_headers="$ac_config_headers"
19993 config_links="$ac_config_links"
19994 config_commands="$ac_config_commands"
19995
19996 _ACEOF
19997
19998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19999 ac_cs_usage="\
20000 \`$as_me' instantiates files and other configuration actions
20001 from templates according to the current configuration. Unless the files
20002 and actions are specified as TAGs, all are instantiated by default.
20003
20004 Usage: $0 [OPTION]... [TAG]...
20005
20006 -h, --help print this help, then exit
20007 -V, --version print version number and configuration settings, then exit
20008 --config print configuration, then exit
20009 -q, --quiet, --silent
20010 do not print progress messages
20011 -d, --debug don't remove temporary files
20012 --recheck update $as_me by reconfiguring in the same conditions
20013 --file=FILE[:TEMPLATE]
20014 instantiate the configuration file FILE
20015 --header=FILE[:TEMPLATE]
20016 instantiate the configuration header FILE
20017
20018 Configuration files:
20019 $config_files
20020
20021 Configuration headers:
20022 $config_headers
20023
20024 Configuration links:
20025 $config_links
20026
20027 Configuration commands:
20028 $config_commands
20029
20030 Report bugs to the package provider."
20031
20032 _ACEOF
20033 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20034 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20035 ac_cs_version="\\
20036 config.status
20037 configured by $0, generated by GNU Autoconf 2.69,
20038 with options \\"\$ac_cs_config\\"
20039
20040 Copyright (C) 2012 Free Software Foundation, Inc.
20041 This config.status script is free software; the Free Software Foundation
20042 gives unlimited permission to copy, distribute and modify it."
20043
20044 ac_pwd='$ac_pwd'
20045 srcdir='$srcdir'
20046 INSTALL='$INSTALL'
20047 AWK='$AWK'
20048 test -n "\$AWK" || AWK=awk
20049 _ACEOF
20050
20051 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20052 # The default lists apply if the user does not specify any file.
20053 ac_need_defaults=:
20054 while test $# != 0
20055 do
20056 case $1 in
20057 --*=?*)
20058 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20059 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20060 ac_shift=:
20061 ;;
20062 --*=)
20063 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20064 ac_optarg=
20065 ac_shift=:
20066 ;;
20067 *)
20068 ac_option=$1
20069 ac_optarg=$2
20070 ac_shift=shift
20071 ;;
20072 esac
20073
20074 case $ac_option in
20075 # Handling of the options.
20076 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20077 ac_cs_recheck=: ;;
20078 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20079 $as_echo "$ac_cs_version"; exit ;;
20080 --config | --confi | --conf | --con | --co | --c )
20081 $as_echo "$ac_cs_config"; exit ;;
20082 --debug | --debu | --deb | --de | --d | -d )
20083 debug=: ;;
20084 --file | --fil | --fi | --f )
20085 $ac_shift
20086 case $ac_optarg in
20087 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20088 '') as_fn_error $? "missing file argument" ;;
20089 esac
20090 as_fn_append CONFIG_FILES " '$ac_optarg'"
20091 ac_need_defaults=false;;
20092 --header | --heade | --head | --hea )
20093 $ac_shift
20094 case $ac_optarg in
20095 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20096 esac
20097 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20098 ac_need_defaults=false;;
20099 --he | --h)
20100 # Conflict between --help and --header
20101 as_fn_error $? "ambiguous option: \`$1'
20102 Try \`$0 --help' for more information.";;
20103 --help | --hel | -h )
20104 $as_echo "$ac_cs_usage"; exit ;;
20105 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20106 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20107 ac_cs_silent=: ;;
20108
20109 # This is an error.
20110 -*) as_fn_error $? "unrecognized option: \`$1'
20111 Try \`$0 --help' for more information." ;;
20112
20113 *) as_fn_append ac_config_targets " $1"
20114 ac_need_defaults=false ;;
20115
20116 esac
20117 shift
20118 done
20119
20120 ac_configure_extra_args=
20121
20122 if $ac_cs_silent; then
20123 exec 6>/dev/null
20124 ac_configure_extra_args="$ac_configure_extra_args --silent"
20125 fi
20126
20127 _ACEOF
20128 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20129 if \$ac_cs_recheck; then
20130 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20131 shift
20132 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20133 CONFIG_SHELL='$SHELL'
20134 export CONFIG_SHELL
20135 exec "\$@"
20136 fi
20137
20138 _ACEOF
20139 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20140 exec 5>>config.log
20141 {
20142 echo
20143 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20144 ## Running $as_me. ##
20145 _ASBOX
20146 $as_echo "$ac_log"
20147 } >&5
20148
20149 _ACEOF
20150 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20151 #
20152 # INIT-COMMANDS
20153 #
20154 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20155 GDB_NM_FILE=$GDB_NM_FILE
20156
20157 _ACEOF
20158
20159 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20160
20161 # Handling of arguments.
20162 for ac_config_target in $ac_config_targets
20163 do
20164 case $ac_config_target in
20165 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20166 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20167 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20168 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20169 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20170 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20171 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20172 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20173 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20174 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20175
20176 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20177 esac
20178 done
20179
20180
20181 # If the user did not use the arguments to specify the items to instantiate,
20182 # then the envvar interface is used. Set only those that are not.
20183 # We use the long form for the default assignment because of an extremely
20184 # bizarre bug on SunOS 4.1.3.
20185 if $ac_need_defaults; then
20186 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20187 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20188 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20189 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20190 fi
20191
20192 # Have a temporary directory for convenience. Make it in the build tree
20193 # simply because there is no reason against having it here, and in addition,
20194 # creating and moving files from /tmp can sometimes cause problems.
20195 # Hook for its removal unless debugging.
20196 # Note that there is a small window in which the directory will not be cleaned:
20197 # after its creation but before its name has been assigned to `$tmp'.
20198 $debug ||
20199 {
20200 tmp= ac_tmp=
20201 trap 'exit_status=$?
20202 : "${ac_tmp:=$tmp}"
20203 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20204 ' 0
20205 trap 'as_fn_exit 1' 1 2 13 15
20206 }
20207 # Create a (secure) tmp directory for tmp files.
20208
20209 {
20210 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20211 test -d "$tmp"
20212 } ||
20213 {
20214 tmp=./conf$$-$RANDOM
20215 (umask 077 && mkdir "$tmp")
20216 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20217 ac_tmp=$tmp
20218
20219 # Set up the scripts for CONFIG_FILES section.
20220 # No need to generate them if there are no CONFIG_FILES.
20221 # This happens for instance with `./config.status config.h'.
20222 if test -n "$CONFIG_FILES"; then
20223
20224 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20225 ac_cs_awk_getline=:
20226 ac_cs_awk_pipe_init=
20227 ac_cs_awk_read_file='
20228 while ((getline aline < (F[key])) > 0)
20229 print(aline)
20230 close(F[key])'
20231 ac_cs_awk_pipe_fini=
20232 else
20233 ac_cs_awk_getline=false
20234 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20235 ac_cs_awk_read_file='
20236 print "|#_!!_#|"
20237 print "cat " F[key] " &&"
20238 '$ac_cs_awk_pipe_init
20239 # The final `:' finishes the AND list.
20240 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20241 fi
20242 ac_cr=`echo X | tr X '\015'`
20243 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20244 # But we know of no other shell where ac_cr would be empty at this
20245 # point, so we can use a bashism as a fallback.
20246 if test "x$ac_cr" = x; then
20247 eval ac_cr=\$\'\\r\'
20248 fi
20249 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20250 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20251 ac_cs_awk_cr='\\r'
20252 else
20253 ac_cs_awk_cr=$ac_cr
20254 fi
20255
20256 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20257 _ACEOF
20258
20259 # Create commands to substitute file output variables.
20260 {
20261 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20262 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20263 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20264 echo "_ACAWK" &&
20265 echo "_ACEOF"
20266 } >conf$$files.sh &&
20267 . ./conf$$files.sh ||
20268 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20269 rm -f conf$$files.sh
20270
20271 {
20272 echo "cat >conf$$subs.awk <<_ACEOF" &&
20273 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20274 echo "_ACEOF"
20275 } >conf$$subs.sh ||
20276 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20277 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20278 ac_delim='%!_!# '
20279 for ac_last_try in false false false false false :; do
20280 . ./conf$$subs.sh ||
20281 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20282
20283 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20284 if test $ac_delim_n = $ac_delim_num; then
20285 break
20286 elif $ac_last_try; then
20287 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20288 else
20289 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20290 fi
20291 done
20292 rm -f conf$$subs.sh
20293
20294 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20295 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20296 _ACEOF
20297 sed -n '
20298 h
20299 s/^/S["/; s/!.*/"]=/
20300 p
20301 g
20302 s/^[^!]*!//
20303 :repl
20304 t repl
20305 s/'"$ac_delim"'$//
20306 t delim
20307 :nl
20308 h
20309 s/\(.\{148\}\)..*/\1/
20310 t more1
20311 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20312 p
20313 n
20314 b repl
20315 :more1
20316 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20317 p
20318 g
20319 s/.\{148\}//
20320 t nl
20321 :delim
20322 h
20323 s/\(.\{148\}\)..*/\1/
20324 t more2
20325 s/["\\]/\\&/g; s/^/"/; s/$/"/
20326 p
20327 b
20328 :more2
20329 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20330 p
20331 g
20332 s/.\{148\}//
20333 t delim
20334 ' <conf$$subs.awk | sed '
20335 /^[^""]/{
20336 N
20337 s/\n//
20338 }
20339 ' >>$CONFIG_STATUS || ac_write_fail=1
20340 rm -f conf$$subs.awk
20341 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20342 _ACAWK
20343 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20344 for (key in S) S_is_set[key] = 1
20345 FS = "\a"
20346 \$ac_cs_awk_pipe_init
20347 }
20348 {
20349 line = $ 0
20350 nfields = split(line, field, "@")
20351 substed = 0
20352 len = length(field[1])
20353 for (i = 2; i < nfields; i++) {
20354 key = field[i]
20355 keylen = length(key)
20356 if (S_is_set[key]) {
20357 value = S[key]
20358 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20359 len += length(value) + length(field[++i])
20360 substed = 1
20361 } else
20362 len += 1 + keylen
20363 }
20364 if (nfields == 3 && !substed) {
20365 key = field[2]
20366 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20367 \$ac_cs_awk_read_file
20368 next
20369 }
20370 }
20371 print line
20372 }
20373 \$ac_cs_awk_pipe_fini
20374 _ACAWK
20375 _ACEOF
20376 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20377 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20378 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20379 else
20380 cat
20381 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20382 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20383 _ACEOF
20384
20385 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20386 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20387 # trailing colons and then remove the whole line if VPATH becomes empty
20388 # (actually we leave an empty line to preserve line numbers).
20389 if test "x$srcdir" = x.; then
20390 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20391 h
20392 s///
20393 s/^/:/
20394 s/[ ]*$/:/
20395 s/:\$(srcdir):/:/g
20396 s/:\${srcdir}:/:/g
20397 s/:@srcdir@:/:/g
20398 s/^:*//
20399 s/:*$//
20400 x
20401 s/\(=[ ]*\).*/\1/
20402 G
20403 s/\n//
20404 s/^[^=]*=[ ]*$//
20405 }'
20406 fi
20407
20408 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20409 fi # test -n "$CONFIG_FILES"
20410
20411 # Set up the scripts for CONFIG_HEADERS section.
20412 # No need to generate them if there are no CONFIG_HEADERS.
20413 # This happens for instance with `./config.status Makefile'.
20414 if test -n "$CONFIG_HEADERS"; then
20415 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20416 BEGIN {
20417 _ACEOF
20418
20419 # Transform confdefs.h into an awk script `defines.awk', embedded as
20420 # here-document in config.status, that substitutes the proper values into
20421 # config.h.in to produce config.h.
20422
20423 # Create a delimiter string that does not exist in confdefs.h, to ease
20424 # handling of long lines.
20425 ac_delim='%!_!# '
20426 for ac_last_try in false false :; do
20427 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20428 if test -z "$ac_tt"; then
20429 break
20430 elif $ac_last_try; then
20431 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20432 else
20433 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20434 fi
20435 done
20436
20437 # For the awk script, D is an array of macro values keyed by name,
20438 # likewise P contains macro parameters if any. Preserve backslash
20439 # newline sequences.
20440
20441 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20442 sed -n '
20443 s/.\{148\}/&'"$ac_delim"'/g
20444 t rset
20445 :rset
20446 s/^[ ]*#[ ]*define[ ][ ]*/ /
20447 t def
20448 d
20449 :def
20450 s/\\$//
20451 t bsnl
20452 s/["\\]/\\&/g
20453 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20454 D["\1"]=" \3"/p
20455 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20456 d
20457 :bsnl
20458 s/["\\]/\\&/g
20459 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20460 D["\1"]=" \3\\\\\\n"\\/p
20461 t cont
20462 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20463 t cont
20464 d
20465 :cont
20466 n
20467 s/.\{148\}/&'"$ac_delim"'/g
20468 t clear
20469 :clear
20470 s/\\$//
20471 t bsnlc
20472 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20473 d
20474 :bsnlc
20475 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20476 b cont
20477 ' <confdefs.h | sed '
20478 s/'"$ac_delim"'/"\\\
20479 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20480
20481 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20482 for (key in D) D_is_set[key] = 1
20483 FS = "\a"
20484 }
20485 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20486 line = \$ 0
20487 split(line, arg, " ")
20488 if (arg[1] == "#") {
20489 defundef = arg[2]
20490 mac1 = arg[3]
20491 } else {
20492 defundef = substr(arg[1], 2)
20493 mac1 = arg[2]
20494 }
20495 split(mac1, mac2, "(") #)
20496 macro = mac2[1]
20497 prefix = substr(line, 1, index(line, defundef) - 1)
20498 if (D_is_set[macro]) {
20499 # Preserve the white space surrounding the "#".
20500 print prefix "define", macro P[macro] D[macro]
20501 next
20502 } else {
20503 # Replace #undef with comments. This is necessary, for example,
20504 # in the case of _POSIX_SOURCE, which is predefined and required
20505 # on some systems where configure will not decide to define it.
20506 if (defundef == "undef") {
20507 print "/*", prefix defundef, macro, "*/"
20508 next
20509 }
20510 }
20511 }
20512 { print }
20513 _ACAWK
20514 _ACEOF
20515 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20516 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20517 fi # test -n "$CONFIG_HEADERS"
20518
20519
20520 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20521 shift
20522 for ac_tag
20523 do
20524 case $ac_tag in
20525 :[FHLC]) ac_mode=$ac_tag; continue;;
20526 esac
20527 case $ac_mode$ac_tag in
20528 :[FHL]*:*);;
20529 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20530 :[FH]-) ac_tag=-:-;;
20531 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20532 esac
20533 ac_save_IFS=$IFS
20534 IFS=:
20535 set x $ac_tag
20536 IFS=$ac_save_IFS
20537 shift
20538 ac_file=$1
20539 shift
20540
20541 case $ac_mode in
20542 :L) ac_source=$1;;
20543 :[FH])
20544 ac_file_inputs=
20545 for ac_f
20546 do
20547 case $ac_f in
20548 -) ac_f="$ac_tmp/stdin";;
20549 *) # Look for the file first in the build tree, then in the source tree
20550 # (if the path is not absolute). The absolute path cannot be DOS-style,
20551 # because $ac_f cannot contain `:'.
20552 test -f "$ac_f" ||
20553 case $ac_f in
20554 [\\/$]*) false;;
20555 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20556 esac ||
20557 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20558 esac
20559 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20560 as_fn_append ac_file_inputs " '$ac_f'"
20561 done
20562
20563 # Let's still pretend it is `configure' which instantiates (i.e., don't
20564 # use $as_me), people would be surprised to read:
20565 # /* config.h. Generated by config.status. */
20566 configure_input='Generated from '`
20567 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20568 `' by configure.'
20569 if test x"$ac_file" != x-; then
20570 configure_input="$ac_file. $configure_input"
20571 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20572 $as_echo "$as_me: creating $ac_file" >&6;}
20573 fi
20574 # Neutralize special characters interpreted by sed in replacement strings.
20575 case $configure_input in #(
20576 *\&* | *\|* | *\\* )
20577 ac_sed_conf_input=`$as_echo "$configure_input" |
20578 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20579 *) ac_sed_conf_input=$configure_input;;
20580 esac
20581
20582 case $ac_tag in
20583 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20584 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20585 esac
20586 ;;
20587 esac
20588
20589 ac_dir=`$as_dirname -- "$ac_file" ||
20590 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20591 X"$ac_file" : 'X\(//\)[^/]' \| \
20592 X"$ac_file" : 'X\(//\)$' \| \
20593 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20594 $as_echo X"$ac_file" |
20595 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20596 s//\1/
20597 q
20598 }
20599 /^X\(\/\/\)[^/].*/{
20600 s//\1/
20601 q
20602 }
20603 /^X\(\/\/\)$/{
20604 s//\1/
20605 q
20606 }
20607 /^X\(\/\).*/{
20608 s//\1/
20609 q
20610 }
20611 s/.*/./; q'`
20612 as_dir="$ac_dir"; as_fn_mkdir_p
20613 ac_builddir=.
20614
20615 case "$ac_dir" in
20616 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20617 *)
20618 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20619 # A ".." for each directory in $ac_dir_suffix.
20620 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20621 case $ac_top_builddir_sub in
20622 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20623 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20624 esac ;;
20625 esac
20626 ac_abs_top_builddir=$ac_pwd
20627 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20628 # for backward compatibility:
20629 ac_top_builddir=$ac_top_build_prefix
20630
20631 case $srcdir in
20632 .) # We are building in place.
20633 ac_srcdir=.
20634 ac_top_srcdir=$ac_top_builddir_sub
20635 ac_abs_top_srcdir=$ac_pwd ;;
20636 [\\/]* | ?:[\\/]* ) # Absolute name.
20637 ac_srcdir=$srcdir$ac_dir_suffix;
20638 ac_top_srcdir=$srcdir
20639 ac_abs_top_srcdir=$srcdir ;;
20640 *) # Relative name.
20641 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20642 ac_top_srcdir=$ac_top_build_prefix$srcdir
20643 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20644 esac
20645 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20646
20647
20648 case $ac_mode in
20649 :F)
20650 #
20651 # CONFIG_FILE
20652 #
20653
20654 case $INSTALL in
20655 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20656 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20657 esac
20658 _ACEOF
20659
20660 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20661 # If the template does not know about datarootdir, expand it.
20662 # FIXME: This hack should be removed a few years after 2.60.
20663 ac_datarootdir_hack=; ac_datarootdir_seen=
20664 ac_sed_dataroot='
20665 /datarootdir/ {
20666 p
20667 q
20668 }
20669 /@datadir@/p
20670 /@docdir@/p
20671 /@infodir@/p
20672 /@localedir@/p
20673 /@mandir@/p'
20674 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20675 *datarootdir*) ac_datarootdir_seen=yes;;
20676 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20678 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20679 _ACEOF
20680 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20681 ac_datarootdir_hack='
20682 s&@datadir@&$datadir&g
20683 s&@docdir@&$docdir&g
20684 s&@infodir@&$infodir&g
20685 s&@localedir@&$localedir&g
20686 s&@mandir@&$mandir&g
20687 s&\\\${datarootdir}&$datarootdir&g' ;;
20688 esac
20689 _ACEOF
20690
20691 # Neutralize VPATH when `$srcdir' = `.'.
20692 # Shell code in configure.ac might set extrasub.
20693 # FIXME: do we really want to maintain this feature?
20694 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20695 ac_sed_extra="$ac_vpsub
20696 $extrasub
20697 _ACEOF
20698 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20699 :t
20700 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20701 s|@configure_input@|$ac_sed_conf_input|;t t
20702 s&@top_builddir@&$ac_top_builddir_sub&;t t
20703 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20704 s&@srcdir@&$ac_srcdir&;t t
20705 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20706 s&@top_srcdir@&$ac_top_srcdir&;t t
20707 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20708 s&@builddir@&$ac_builddir&;t t
20709 s&@abs_builddir@&$ac_abs_builddir&;t t
20710 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20711 s&@INSTALL@&$ac_INSTALL&;t t
20712 $ac_datarootdir_hack
20713 "
20714 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20715 if $ac_cs_awk_getline; then
20716 $AWK -f "$ac_tmp/subs.awk"
20717 else
20718 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20719 fi \
20720 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20721
20722 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20723 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20724 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20725 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20727 which seems to be undefined. Please make sure it is defined" >&5
20728 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20729 which seems to be undefined. Please make sure it is defined" >&2;}
20730
20731 rm -f "$ac_tmp/stdin"
20732 case $ac_file in
20733 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20734 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20735 esac \
20736 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20737 ;;
20738 :H)
20739 #
20740 # CONFIG_HEADER
20741 #
20742 if test x"$ac_file" != x-; then
20743 {
20744 $as_echo "/* $configure_input */" \
20745 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20746 } >"$ac_tmp/config.h" \
20747 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20748 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20749 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20750 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20751 else
20752 rm -f "$ac_file"
20753 mv "$ac_tmp/config.h" "$ac_file" \
20754 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20755 fi
20756 else
20757 $as_echo "/* $configure_input */" \
20758 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20759 || as_fn_error $? "could not create -" "$LINENO" 5
20760 fi
20761 ;;
20762 :L)
20763 #
20764 # CONFIG_LINK
20765 #
20766
20767 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20768 :
20769 else
20770 # Prefer the file from the source tree if names are identical.
20771 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20772 ac_source=$srcdir/$ac_source
20773 fi
20774
20775 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20776 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20777
20778 if test ! -r "$ac_source"; then
20779 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20780 fi
20781 rm -f "$ac_file"
20782
20783 # Try a relative symlink, then a hard link, then a copy.
20784 case $ac_source in
20785 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20786 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20787 esac
20788 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20789 ln "$ac_source" "$ac_file" 2>/dev/null ||
20790 cp -p "$ac_source" "$ac_file" ||
20791 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20792 fi
20793 ;;
20794 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20795 $as_echo "$as_me: executing $ac_file commands" >&6;}
20796 ;;
20797 esac
20798
20799
20800 case $ac_file$ac_mode in
20801 "config.h":H) echo > stamp-h ;;
20802 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
20803 "nm.h":L) echo > stamp-nmh ;;
20804 "gcore":F) chmod +x gcore ;;
20805
20806 esac
20807 done # for ac_tag
20808
20809
20810 as_fn_exit 0
20811 _ACEOF
20812 ac_clean_files=$ac_clean_files_save
20813
20814 test $ac_write_fail = 0 ||
20815 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20816
20817
20818 # configure is writing to config.log, and then calls config.status.
20819 # config.status does its own redirection, appending to config.log.
20820 # Unfortunately, on DOS this fails, as config.log is still kept open
20821 # by configure, so config.status won't be able to write to it; its
20822 # output is simply discarded. So we exec the FD to /dev/null,
20823 # effectively closing config.log, so it can be properly (re)opened and
20824 # appended to by config.status. When coming back to configure, we
20825 # need to make the FD available again.
20826 if test "$no_create" != yes; then
20827 ac_cs_success=:
20828 ac_config_status_args=
20829 test "$silent" = yes &&
20830 ac_config_status_args="$ac_config_status_args --quiet"
20831 exec 5>/dev/null
20832 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20833 exec 5>>config.log
20834 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20835 # would make configure fail if this is the last instruction.
20836 $ac_cs_success || as_fn_exit 1
20837 fi
20838
20839 #
20840 # CONFIG_SUBDIRS section.
20841 #
20842 if test "$no_recursion" != yes; then
20843
20844 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20845 # so they do not pile up.
20846 ac_sub_configure_args=
20847 ac_prev=
20848 eval "set x $ac_configure_args"
20849 shift
20850 for ac_arg
20851 do
20852 if test -n "$ac_prev"; then
20853 ac_prev=
20854 continue
20855 fi
20856 case $ac_arg in
20857 -cache-file | --cache-file | --cache-fil | --cache-fi \
20858 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20859 ac_prev=cache_file ;;
20860 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20861 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20862 | --c=*)
20863 ;;
20864 --config-cache | -C)
20865 ;;
20866 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20867 ac_prev=srcdir ;;
20868 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20869 ;;
20870 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20871 ac_prev=prefix ;;
20872 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20873 ;;
20874 --disable-option-checking)
20875 ;;
20876 *)
20877 case $ac_arg in
20878 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20879 esac
20880 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
20881 esac
20882 done
20883
20884 # Always prepend --prefix to ensure using the same prefix
20885 # in subdir configurations.
20886 ac_arg="--prefix=$prefix"
20887 case $ac_arg in
20888 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20889 esac
20890 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20891
20892 # Pass --silent
20893 if test "$silent" = yes; then
20894 ac_sub_configure_args="--silent $ac_sub_configure_args"
20895 fi
20896
20897 # Always prepend --disable-option-checking to silence warnings, since
20898 # different subdirs can have different --enable and --with options.
20899 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20900
20901 ac_popdir=`pwd`
20902 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20903
20904 # Do not complain, so a configure script can configure whichever
20905 # parts of a large source tree are present.
20906 test -d "$srcdir/$ac_dir" || continue
20907
20908 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20909 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20910 $as_echo "$ac_msg" >&6
20911 as_dir="$ac_dir"; as_fn_mkdir_p
20912 ac_builddir=.
20913
20914 case "$ac_dir" in
20915 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20916 *)
20917 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20918 # A ".." for each directory in $ac_dir_suffix.
20919 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20920 case $ac_top_builddir_sub in
20921 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20922 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20923 esac ;;
20924 esac
20925 ac_abs_top_builddir=$ac_pwd
20926 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20927 # for backward compatibility:
20928 ac_top_builddir=$ac_top_build_prefix
20929
20930 case $srcdir in
20931 .) # We are building in place.
20932 ac_srcdir=.
20933 ac_top_srcdir=$ac_top_builddir_sub
20934 ac_abs_top_srcdir=$ac_pwd ;;
20935 [\\/]* | ?:[\\/]* ) # Absolute name.
20936 ac_srcdir=$srcdir$ac_dir_suffix;
20937 ac_top_srcdir=$srcdir
20938 ac_abs_top_srcdir=$srcdir ;;
20939 *) # Relative name.
20940 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20941 ac_top_srcdir=$ac_top_build_prefix$srcdir
20942 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20943 esac
20944 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20945
20946
20947 cd "$ac_dir"
20948
20949 # Check for guested configure; otherwise get Cygnus style configure.
20950 if test -f "$ac_srcdir/configure.gnu"; then
20951 ac_sub_configure=$ac_srcdir/configure.gnu
20952 elif test -f "$ac_srcdir/configure"; then
20953 ac_sub_configure=$ac_srcdir/configure
20954 elif test -f "$ac_srcdir/configure.in"; then
20955 # This should be Cygnus configure.
20956 ac_sub_configure=$ac_aux_dir/configure
20957 else
20958 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20959 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20960 ac_sub_configure=
20961 fi
20962
20963 # The recursion is here.
20964 if test -n "$ac_sub_configure"; then
20965 # Make the cache file name correct relative to the subdirectory.
20966 case $cache_file in
20967 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20968 *) # Relative name.
20969 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20970 esac
20971
20972 { $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
20973 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20974 # The eval makes quoting arguments work.
20975 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20976 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20977 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
20978 fi
20979
20980 cd "$ac_popdir"
20981 done
20982 fi
20983 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20985 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20986 fi
20987
This page took 0.471013 seconds and 4 git commands to generate.