]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/configure
2f6ecb5c7a1179a112e5bfa7a5d9e5f29e03fae8
[thirdparty/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 LTLIBBABELTRACE
635 LIBBABELTRACE
636 HAVE_LIBBABELTRACE
637 HAVE_NATIVE_GCORE_HOST
638 NAT_GENERATED_FILES
639 XM_CLIBS
640 MH_CFLAGS
641 LOADLIBES
642 NAT_CDEPS
643 NATDEPFILES
644 NAT_FILE
645 target_subdir
646 CONFIG_UNINSTALL
647 CONFIG_INSTALL
648 CONFIG_CLEAN
649 CONFIG_ALL
650 CONFIG_SRCS
651 CONFIG_DEPS
652 CONFIG_OBS
653 PROFILE_CFLAGS
654 ENABLE_CFLAGS
655 SIM_OBS
656 SIM
657 XMKMF
658 GDBTK_SRC_DIR
659 GDBTK_CFLAGS
660 GDBTKLIBS
661 X_LIBS
662 X_LDFLAGS
663 X_CFLAGS
664 TK_XINCLUDES
665 TK_DEPS
666 TK_LIBRARY
667 TK_INCLUDE
668 TK_STUB_LIB_SPEC
669 TK_STUB_LIB_FLAG
670 TK_STUB_LIB_FILE
671 TK_LIB_SPEC
672 TK_LIB_FLAG
673 TK_LIB_FILE
674 TK_SRC_DIR
675 TK_BIN_DIR
676 TK_VERSION
677 TCL_DEPS
678 TCL_LIBRARY
679 TCL_INCLUDE
680 TCL_STUB_LIB_SPEC
681 TCL_STUB_LIB_FLAG
682 TCL_STUB_LIB_FILE
683 TCL_LIB_SPEC
684 TCL_LIB_FLAG
685 TCL_LIB_FILE
686 TCL_SRC_DIR
687 TCL_BIN_DIR
688 TCL_PATCH_LEVEL
689 TCL_VERSION
690 WIN32LDAPP
691 WIN32LIBS
692 GUI_CFLAGS_X
693 LIBGUI
694 LTLIBLZMA
695 LIBLZMA
696 HAVE_LIBLZMA
697 SER_HARDWIRE
698 WERROR_CFLAGS
699 WARN_CFLAGS
700 SYSTEM_GDBINIT_DIR
701 SYSTEM_GDBINIT
702 TARGET_SYSTEM_ROOT
703 CONFIG_LDFLAGS
704 RDYNAMIC
705 LTLIBIPT
706 LIBIPT
707 HAVE_LIBIPT
708 PTHREAD_CFLAGS
709 PTHREAD_LIBS
710 PTHREAD_CC
711 ax_pthread_config
712 SED
713 ALLOCA
714 SRCHIGH_CFLAGS
715 SRCHIGH_LIBS
716 HAVE_GUILE_FALSE
717 HAVE_GUILE_TRUE
718 GUILE_LIBS
719 GUILE_CPPFLAGS
720 GUILD_TARGET_FLAG
721 GUILD
722 pkg_config_prog_path
723 HAVE_PYTHON_FALSE
724 HAVE_PYTHON_TRUE
725 PYTHON_LIBS
726 PYTHON_CPPFLAGS
727 PYTHON_CFLAGS
728 python_prog_path
729 LTLIBMPFR
730 LIBMPFR
731 HAVE_LIBMPFR
732 LTLIBEXPAT
733 LIBEXPAT
734 HAVE_LIBEXPAT
735 JIT_READER_DIR
736 TARGET_PTR
737 READLINE_TEXI_INCFLAG
738 READLINE_CFLAGS
739 READLINE_DEPS
740 READLINE
741 LTLIBICONV
742 LIBICONV
743 zlibinc
744 zlibdir
745 MIG
746 WINDRES
747 DLLTOOL
748 AR
749 YFLAGS
750 YACC
751 RANLIB
752 LN_S
753 INSTALL_DATA
754 INSTALL_SCRIPT
755 INSTALL_PROGRAM
756 AWK
757 REPORT_BUGS_TEXI
758 REPORT_BUGS_TO
759 PKGVERSION
760 CODESIGN_CERT
761 HAVE_NATIVE_GCORE_TARGET
762 TARGET_OBS
763 subdirs
764 GDB_DATADIR
765 DEBUGDIR
766 MAKEINFO_EXTRA_FLAGS
767 MAKEINFOFLAGS
768 MAKEINFO
769 PACKAGE
770 CATOBJEXT
771 GENCAT
772 INSTOBJEXT
773 DATADIRNAME
774 CATALOGS
775 POSUB
776 GMSGFMT
777 XGETTEXT
778 INCINTL
779 LIBINTL_DEP
780 LIBINTL
781 USE_NLS
782 CCDEPMODE
783 DEPDIR
784 am__leading_dot
785 CXX_DIALECT
786 HAVE_CXX11
787 INSTALL_STRIP_PROGRAM
788 STRIP
789 install_sh
790 target_os
791 target_vendor
792 target_cpu
793 target
794 host_os
795 host_vendor
796 host_cpu
797 host
798 build_os
799 build_vendor
800 build_cpu
801 build
802 EGREP
803 GREP
804 CPP
805 ac_ct_CXX
806 CXXFLAGS
807 CXX
808 OBJEXT
809 EXEEXT
810 ac_ct_CC
811 CPPFLAGS
812 LDFLAGS
813 CFLAGS
814 CC
815 MAINT
816 MAINTAINER_MODE_FALSE
817 MAINTAINER_MODE_TRUE
818 target_alias
819 host_alias
820 build_alias
821 LIBS
822 ECHO_T
823 ECHO_N
824 ECHO_C
825 DEFS
826 mandir
827 localedir
828 libdir
829 psdir
830 pdfdir
831 dvidir
832 htmldir
833 infodir
834 docdir
835 oldincludedir
836 includedir
837 localstatedir
838 sharedstatedir
839 sysconfdir
840 datadir
841 datarootdir
842 libexecdir
843 sbindir
844 bindir
845 program_transform_name
846 prefix
847 exec_prefix
848 PACKAGE_URL
849 PACKAGE_BUGREPORT
850 PACKAGE_STRING
851 PACKAGE_VERSION
852 PACKAGE_TARNAME
853 PACKAGE_NAME
854 PATH_SEPARATOR
855 SHELL'
856 ac_subst_files='nat_makefile_frag'
857 ac_user_opts='
858 enable_option_checking
859 enable_maintainer_mode
860 enable_plugins
861 enable_largefile
862 with_separate_debug_dir
863 with_gdb_datadir
864 with_relocated_sources
865 with_auto_load_dir
866 with_auto_load_safe_path
867 enable_targets
868 enable_64_bit_bfd
869 enable_gdbmi
870 enable_tui
871 enable_gdbtk
872 with_libunwind_ia64
873 with_curses
874 enable_profiling
875 enable_codesign
876 with_pkgversion
877 with_bugurl
878 with_system_zlib
879 with_gnu_ld
880 enable_rpath
881 with_libiconv_prefix
882 with_libiconv_type
883 with_iconv_bin
884 with_system_readline
885 with_jit_reader_dir
886 with_expat
887 with_libexpat_prefix
888 with_libexpat_type
889 with_mpfr
890 with_libmpfr_prefix
891 with_libmpfr_type
892 with_python
893 with_guile
894 enable_source_highlight
895 with_intel_pt
896 with_libipt_prefix
897 with_libipt_type
898 with_included_regex
899 with_sysroot
900 with_system_gdbinit
901 with_system_gdbinit_dir
902 enable_werror
903 enable_build_warnings
904 enable_gdb_build_warnings
905 enable_ubsan
906 with_lzma
907 with_liblzma_prefix
908 with_liblzma_type
909 with_tcl
910 with_tk
911 with_x
912 enable_sim
913 with_babeltrace
914 with_libbabeltrace_prefix
915 with_libbabeltrace_type
916 with_xxhash
917 with_libxxhash_prefix
918 with_libxxhash_type
919 enable_unit_tests
920 '
921 ac_precious_vars='build_alias
922 host_alias
923 target_alias
924 CC
925 CFLAGS
926 LDFLAGS
927 LIBS
928 CPPFLAGS
929 CXX
930 CXXFLAGS
931 CCC
932 CPP
933 MAKEINFO
934 MAKEINFOFLAGS
935 YACC
936 YFLAGS
937 XMKMF'
938 ac_subdirs_all='testsuite
939 gdbtk'
940
941 # Initialize some variables set by options.
942 ac_init_help=
943 ac_init_version=false
944 ac_unrecognized_opts=
945 ac_unrecognized_sep=
946 # The variables have the same names as the options, with
947 # dashes changed to underlines.
948 cache_file=/dev/null
949 exec_prefix=NONE
950 no_create=
951 no_recursion=
952 prefix=NONE
953 program_prefix=NONE
954 program_suffix=NONE
955 program_transform_name=s,x,x,
956 silent=
957 site=
958 srcdir=
959 verbose=
960 x_includes=NONE
961 x_libraries=NONE
962
963 # Installation directory options.
964 # These are left unexpanded so users can "make install exec_prefix=/foo"
965 # and all the variables that are supposed to be based on exec_prefix
966 # by default will actually change.
967 # Use braces instead of parens because sh, perl, etc. also accept them.
968 # (The list follows the same order as the GNU Coding Standards.)
969 bindir='${exec_prefix}/bin'
970 sbindir='${exec_prefix}/sbin'
971 libexecdir='${exec_prefix}/libexec'
972 datarootdir='${prefix}/share'
973 datadir='${datarootdir}'
974 sysconfdir='${prefix}/etc'
975 sharedstatedir='${prefix}/com'
976 localstatedir='${prefix}/var'
977 includedir='${prefix}/include'
978 oldincludedir='/usr/include'
979 docdir='${datarootdir}/doc/${PACKAGE}'
980 infodir='${datarootdir}/info'
981 htmldir='${docdir}'
982 dvidir='${docdir}'
983 pdfdir='${docdir}'
984 psdir='${docdir}'
985 libdir='${exec_prefix}/lib'
986 localedir='${datarootdir}/locale'
987 mandir='${datarootdir}/man'
988
989 ac_prev=
990 ac_dashdash=
991 for ac_option
992 do
993 # If the previous option needs an argument, assign it.
994 if test -n "$ac_prev"; then
995 eval $ac_prev=\$ac_option
996 ac_prev=
997 continue
998 fi
999
1000 case $ac_option in
1001 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1002 *=) ac_optarg= ;;
1003 *) ac_optarg=yes ;;
1004 esac
1005
1006 # Accept the important Cygnus configure options, so we can diagnose typos.
1007
1008 case $ac_dashdash$ac_option in
1009 --)
1010 ac_dashdash=yes ;;
1011
1012 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1013 ac_prev=bindir ;;
1014 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1015 bindir=$ac_optarg ;;
1016
1017 -build | --build | --buil | --bui | --bu)
1018 ac_prev=build_alias ;;
1019 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1020 build_alias=$ac_optarg ;;
1021
1022 -cache-file | --cache-file | --cache-fil | --cache-fi \
1023 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1024 ac_prev=cache_file ;;
1025 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1026 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1027 cache_file=$ac_optarg ;;
1028
1029 --config-cache | -C)
1030 cache_file=config.cache ;;
1031
1032 -datadir | --datadir | --datadi | --datad)
1033 ac_prev=datadir ;;
1034 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1035 datadir=$ac_optarg ;;
1036
1037 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1038 | --dataroo | --dataro | --datar)
1039 ac_prev=datarootdir ;;
1040 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1041 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1042 datarootdir=$ac_optarg ;;
1043
1044 -disable-* | --disable-*)
1045 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1046 # Reject names that are not valid shell variable names.
1047 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1048 as_fn_error $? "invalid feature name: $ac_useropt"
1049 ac_useropt_orig=$ac_useropt
1050 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1051 case $ac_user_opts in
1052 *"
1053 "enable_$ac_useropt"
1054 "*) ;;
1055 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1056 ac_unrecognized_sep=', ';;
1057 esac
1058 eval enable_$ac_useropt=no ;;
1059
1060 -docdir | --docdir | --docdi | --doc | --do)
1061 ac_prev=docdir ;;
1062 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1063 docdir=$ac_optarg ;;
1064
1065 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1066 ac_prev=dvidir ;;
1067 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1068 dvidir=$ac_optarg ;;
1069
1070 -enable-* | --enable-*)
1071 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1072 # Reject names that are not valid shell variable names.
1073 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1074 as_fn_error $? "invalid feature name: $ac_useropt"
1075 ac_useropt_orig=$ac_useropt
1076 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1077 case $ac_user_opts in
1078 *"
1079 "enable_$ac_useropt"
1080 "*) ;;
1081 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1082 ac_unrecognized_sep=', ';;
1083 esac
1084 eval enable_$ac_useropt=\$ac_optarg ;;
1085
1086 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1087 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1088 | --exec | --exe | --ex)
1089 ac_prev=exec_prefix ;;
1090 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1091 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1092 | --exec=* | --exe=* | --ex=*)
1093 exec_prefix=$ac_optarg ;;
1094
1095 -gas | --gas | --ga | --g)
1096 # Obsolete; use --with-gas.
1097 with_gas=yes ;;
1098
1099 -help | --help | --hel | --he | -h)
1100 ac_init_help=long ;;
1101 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1102 ac_init_help=recursive ;;
1103 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1104 ac_init_help=short ;;
1105
1106 -host | --host | --hos | --ho)
1107 ac_prev=host_alias ;;
1108 -host=* | --host=* | --hos=* | --ho=*)
1109 host_alias=$ac_optarg ;;
1110
1111 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1112 ac_prev=htmldir ;;
1113 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1114 | --ht=*)
1115 htmldir=$ac_optarg ;;
1116
1117 -includedir | --includedir | --includedi | --included | --include \
1118 | --includ | --inclu | --incl | --inc)
1119 ac_prev=includedir ;;
1120 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1121 | --includ=* | --inclu=* | --incl=* | --inc=*)
1122 includedir=$ac_optarg ;;
1123
1124 -infodir | --infodir | --infodi | --infod | --info | --inf)
1125 ac_prev=infodir ;;
1126 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1127 infodir=$ac_optarg ;;
1128
1129 -libdir | --libdir | --libdi | --libd)
1130 ac_prev=libdir ;;
1131 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1132 libdir=$ac_optarg ;;
1133
1134 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1135 | --libexe | --libex | --libe)
1136 ac_prev=libexecdir ;;
1137 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1138 | --libexe=* | --libex=* | --libe=*)
1139 libexecdir=$ac_optarg ;;
1140
1141 -localedir | --localedir | --localedi | --localed | --locale)
1142 ac_prev=localedir ;;
1143 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1144 localedir=$ac_optarg ;;
1145
1146 -localstatedir | --localstatedir | --localstatedi | --localstated \
1147 | --localstate | --localstat | --localsta | --localst | --locals)
1148 ac_prev=localstatedir ;;
1149 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1150 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1151 localstatedir=$ac_optarg ;;
1152
1153 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1154 ac_prev=mandir ;;
1155 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1156 mandir=$ac_optarg ;;
1157
1158 -nfp | --nfp | --nf)
1159 # Obsolete; use --without-fp.
1160 with_fp=no ;;
1161
1162 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1163 | --no-cr | --no-c | -n)
1164 no_create=yes ;;
1165
1166 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1167 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1168 no_recursion=yes ;;
1169
1170 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1171 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1172 | --oldin | --oldi | --old | --ol | --o)
1173 ac_prev=oldincludedir ;;
1174 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1175 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1176 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1177 oldincludedir=$ac_optarg ;;
1178
1179 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1180 ac_prev=prefix ;;
1181 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1182 prefix=$ac_optarg ;;
1183
1184 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1185 | --program-pre | --program-pr | --program-p)
1186 ac_prev=program_prefix ;;
1187 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1188 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1189 program_prefix=$ac_optarg ;;
1190
1191 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1192 | --program-suf | --program-su | --program-s)
1193 ac_prev=program_suffix ;;
1194 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1195 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1196 program_suffix=$ac_optarg ;;
1197
1198 -program-transform-name | --program-transform-name \
1199 | --program-transform-nam | --program-transform-na \
1200 | --program-transform-n | --program-transform- \
1201 | --program-transform | --program-transfor \
1202 | --program-transfo | --program-transf \
1203 | --program-trans | --program-tran \
1204 | --progr-tra | --program-tr | --program-t)
1205 ac_prev=program_transform_name ;;
1206 -program-transform-name=* | --program-transform-name=* \
1207 | --program-transform-nam=* | --program-transform-na=* \
1208 | --program-transform-n=* | --program-transform-=* \
1209 | --program-transform=* | --program-transfor=* \
1210 | --program-transfo=* | --program-transf=* \
1211 | --program-trans=* | --program-tran=* \
1212 | --progr-tra=* | --program-tr=* | --program-t=*)
1213 program_transform_name=$ac_optarg ;;
1214
1215 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1216 ac_prev=pdfdir ;;
1217 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1218 pdfdir=$ac_optarg ;;
1219
1220 -psdir | --psdir | --psdi | --psd | --ps)
1221 ac_prev=psdir ;;
1222 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1223 psdir=$ac_optarg ;;
1224
1225 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1226 | -silent | --silent | --silen | --sile | --sil)
1227 silent=yes ;;
1228
1229 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1230 ac_prev=sbindir ;;
1231 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1232 | --sbi=* | --sb=*)
1233 sbindir=$ac_optarg ;;
1234
1235 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1236 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1237 | --sharedst | --shareds | --shared | --share | --shar \
1238 | --sha | --sh)
1239 ac_prev=sharedstatedir ;;
1240 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1241 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1242 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1243 | --sha=* | --sh=*)
1244 sharedstatedir=$ac_optarg ;;
1245
1246 -site | --site | --sit)
1247 ac_prev=site ;;
1248 -site=* | --site=* | --sit=*)
1249 site=$ac_optarg ;;
1250
1251 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1252 ac_prev=srcdir ;;
1253 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1254 srcdir=$ac_optarg ;;
1255
1256 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1257 | --syscon | --sysco | --sysc | --sys | --sy)
1258 ac_prev=sysconfdir ;;
1259 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1260 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1261 sysconfdir=$ac_optarg ;;
1262
1263 -target | --target | --targe | --targ | --tar | --ta | --t)
1264 ac_prev=target_alias ;;
1265 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1266 target_alias=$ac_optarg ;;
1267
1268 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1269 verbose=yes ;;
1270
1271 -version | --version | --versio | --versi | --vers | -V)
1272 ac_init_version=: ;;
1273
1274 -with-* | --with-*)
1275 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1276 # Reject names that are not valid shell variable names.
1277 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1278 as_fn_error $? "invalid package name: $ac_useropt"
1279 ac_useropt_orig=$ac_useropt
1280 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1281 case $ac_user_opts in
1282 *"
1283 "with_$ac_useropt"
1284 "*) ;;
1285 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1286 ac_unrecognized_sep=', ';;
1287 esac
1288 eval with_$ac_useropt=\$ac_optarg ;;
1289
1290 -without-* | --without-*)
1291 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1292 # Reject names that are not valid shell variable names.
1293 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1294 as_fn_error $? "invalid package name: $ac_useropt"
1295 ac_useropt_orig=$ac_useropt
1296 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1297 case $ac_user_opts in
1298 *"
1299 "with_$ac_useropt"
1300 "*) ;;
1301 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1302 ac_unrecognized_sep=', ';;
1303 esac
1304 eval with_$ac_useropt=no ;;
1305
1306 --x)
1307 # Obsolete; use --with-x.
1308 with_x=yes ;;
1309
1310 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1311 | --x-incl | --x-inc | --x-in | --x-i)
1312 ac_prev=x_includes ;;
1313 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1314 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1315 x_includes=$ac_optarg ;;
1316
1317 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1318 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1319 ac_prev=x_libraries ;;
1320 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1321 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1322 x_libraries=$ac_optarg ;;
1323
1324 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1325 Try \`$0 --help' for more information"
1326 ;;
1327
1328 *=*)
1329 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1330 # Reject names that are not valid shell variable names.
1331 case $ac_envvar in #(
1332 '' | [0-9]* | *[!_$as_cr_alnum]* )
1333 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1334 esac
1335 eval $ac_envvar=\$ac_optarg
1336 export $ac_envvar ;;
1337
1338 *)
1339 # FIXME: should be removed in autoconf 3.0.
1340 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1341 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1342 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1343 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1344 ;;
1345
1346 esac
1347 done
1348
1349 if test -n "$ac_prev"; then
1350 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1351 as_fn_error $? "missing argument to $ac_option"
1352 fi
1353
1354 if test -n "$ac_unrecognized_opts"; then
1355 case $enable_option_checking in
1356 no) ;;
1357 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1358 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1359 esac
1360 fi
1361
1362 # Check all directory arguments for consistency.
1363 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1364 datadir sysconfdir sharedstatedir localstatedir includedir \
1365 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1366 libdir localedir mandir
1367 do
1368 eval ac_val=\$$ac_var
1369 # Remove trailing slashes.
1370 case $ac_val in
1371 */ )
1372 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1373 eval $ac_var=\$ac_val;;
1374 esac
1375 # Be sure to have absolute directory names.
1376 case $ac_val in
1377 [\\/$]* | ?:[\\/]* ) continue;;
1378 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1379 esac
1380 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1381 done
1382
1383 # There might be people who depend on the old broken behavior: `$host'
1384 # used to hold the argument of --host etc.
1385 # FIXME: To remove some day.
1386 build=$build_alias
1387 host=$host_alias
1388 target=$target_alias
1389
1390 # FIXME: To remove some day.
1391 if test "x$host_alias" != x; then
1392 if test "x$build_alias" = x; then
1393 cross_compiling=maybe
1394 elif test "x$build_alias" != "x$host_alias"; then
1395 cross_compiling=yes
1396 fi
1397 fi
1398
1399 ac_tool_prefix=
1400 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1401
1402 test "$silent" = yes && exec 6>/dev/null
1403
1404
1405 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1406 ac_ls_di=`ls -di .` &&
1407 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1408 as_fn_error $? "working directory cannot be determined"
1409 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1410 as_fn_error $? "pwd does not report name of working directory"
1411
1412
1413 # Find the source files, if location was not specified.
1414 if test -z "$srcdir"; then
1415 ac_srcdir_defaulted=yes
1416 # Try the directory containing this script, then the parent directory.
1417 ac_confdir=`$as_dirname -- "$as_myself" ||
1418 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1419 X"$as_myself" : 'X\(//\)[^/]' \| \
1420 X"$as_myself" : 'X\(//\)$' \| \
1421 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1422 $as_echo X"$as_myself" |
1423 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1424 s//\1/
1425 q
1426 }
1427 /^X\(\/\/\)[^/].*/{
1428 s//\1/
1429 q
1430 }
1431 /^X\(\/\/\)$/{
1432 s//\1/
1433 q
1434 }
1435 /^X\(\/\).*/{
1436 s//\1/
1437 q
1438 }
1439 s/.*/./; q'`
1440 srcdir=$ac_confdir
1441 if test ! -r "$srcdir/$ac_unique_file"; then
1442 srcdir=..
1443 fi
1444 else
1445 ac_srcdir_defaulted=no
1446 fi
1447 if test ! -r "$srcdir/$ac_unique_file"; then
1448 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1449 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1450 fi
1451 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1452 ac_abs_confdir=`(
1453 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1454 pwd)`
1455 # When building in place, set srcdir=.
1456 if test "$ac_abs_confdir" = "$ac_pwd"; then
1457 srcdir=.
1458 fi
1459 # Remove unnecessary trailing slashes from srcdir.
1460 # Double slashes in file names in object file debugging info
1461 # mess up M-x gdb in Emacs.
1462 case $srcdir in
1463 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1464 esac
1465 for ac_var in $ac_precious_vars; do
1466 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1467 eval ac_env_${ac_var}_value=\$${ac_var}
1468 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1469 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1470 done
1471
1472 #
1473 # Report the --help message.
1474 #
1475 if test "$ac_init_help" = "long"; then
1476 # Omit some internal or obsolete options to make the list less imposing.
1477 # This message is too long to be a string in the A/UX 3.1 sh.
1478 cat <<_ACEOF
1479 \`configure' configures this package to adapt to many kinds of systems.
1480
1481 Usage: $0 [OPTION]... [VAR=VALUE]...
1482
1483 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1484 VAR=VALUE. See below for descriptions of some of the useful variables.
1485
1486 Defaults for the options are specified in brackets.
1487
1488 Configuration:
1489 -h, --help display this help and exit
1490 --help=short display options specific to this package
1491 --help=recursive display the short help of all the included packages
1492 -V, --version display version information and exit
1493 -q, --quiet, --silent do not print \`checking ...' messages
1494 --cache-file=FILE cache test results in FILE [disabled]
1495 -C, --config-cache alias for \`--cache-file=config.cache'
1496 -n, --no-create do not create output files
1497 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1498
1499 Installation directories:
1500 --prefix=PREFIX install architecture-independent files in PREFIX
1501 [$ac_default_prefix]
1502 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1503 [PREFIX]
1504
1505 By default, \`make install' will install all the files in
1506 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1507 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1508 for instance \`--prefix=\$HOME'.
1509
1510 For better control, use the options below.
1511
1512 Fine tuning of the installation directories:
1513 --bindir=DIR user executables [EPREFIX/bin]
1514 --sbindir=DIR system admin executables [EPREFIX/sbin]
1515 --libexecdir=DIR program executables [EPREFIX/libexec]
1516 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1517 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1518 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1519 --libdir=DIR object code libraries [EPREFIX/lib]
1520 --includedir=DIR C header files [PREFIX/include]
1521 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1522 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1523 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1524 --infodir=DIR info documentation [DATAROOTDIR/info]
1525 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1526 --mandir=DIR man documentation [DATAROOTDIR/man]
1527 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1528 --htmldir=DIR html documentation [DOCDIR]
1529 --dvidir=DIR dvi documentation [DOCDIR]
1530 --pdfdir=DIR pdf documentation [DOCDIR]
1531 --psdir=DIR ps documentation [DOCDIR]
1532 _ACEOF
1533
1534 cat <<\_ACEOF
1535
1536 Program names:
1537 --program-prefix=PREFIX prepend PREFIX to installed program names
1538 --program-suffix=SUFFIX append SUFFIX to installed program names
1539 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1540
1541 X features:
1542 --x-includes=DIR X include files are in DIR
1543 --x-libraries=DIR X library files are in DIR
1544
1545 System types:
1546 --build=BUILD configure for building on BUILD [guessed]
1547 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1548 --target=TARGET configure for building compilers for TARGET [HOST]
1549 _ACEOF
1550 fi
1551
1552 if test -n "$ac_init_help"; then
1553
1554 cat <<\_ACEOF
1555
1556 Optional Features:
1557 --disable-option-checking ignore unrecognized --enable/--with options
1558 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1559 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1560 --enable-maintainer-mode
1561 enable make rules and dependencies not useful (and
1562 sometimes confusing) to the casual installer
1563 --enable-plugins Enable support for plugins
1564 --disable-largefile omit support for large files
1565 --enable-targets=TARGETS
1566 alternative target configurations
1567 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1568 --disable-gdbmi disable machine-interface (MI)
1569 --enable-tui enable full-screen terminal user interface (TUI)
1570 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1571 --enable-profiling enable profiling of GDB
1572 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1573 --disable-rpath do not hardcode runtime library paths
1574 --enable-source-highlight
1575 enable source-highlight for source listings
1576 --enable-werror treat compile warnings as errors
1577 --enable-build-warnings enable build-time compiler warnings if gcc is used
1578 --enable-gdb-build-warnings
1579 enable GDB specific build-time compiler warnings if
1580 gcc is used
1581 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1582 --enable-sim link gdb with simulator
1583 --enable-unit-tests Enable the inclusion of unit tests when compiling
1584 GDB
1585
1586 Optional Packages:
1587 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1588 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1589 --with-separate-debug-dir=PATH
1590 look for global separate debug info in this path
1591 [LIBDIR/debug]
1592 --with-gdb-datadir=PATH look for global separate data files in this path
1593 [DATADIR/gdb]
1594 --with-relocated-sources=PATH
1595 automatically relocate this path for source files
1596 --with-auto-load-dir=PATH
1597 directories from which to load auto-loaded scripts
1598 [$debugdir:$datadir/auto-load]
1599 --with-auto-load-safe-path=PATH
1600 directories safe to hold auto-loaded files
1601 [--with-auto-load-dir]
1602 --without-auto-load-safe-path
1603 do not restrict auto-loaded files locations
1604 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1605 --with-curses use the curses library instead of the termcap
1606 library
1607 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1608 --with-bugurl=URL Direct users to URL to report a bug
1609 --with-system-zlib use installed libz
1610 --with-gnu-ld assume the C compiler uses GNU ld default=no
1611 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1612 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1613 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1614 --with-iconv-bin=PATH specify where to find the iconv program
1615 --with-system-readline use installed readline library
1616 --with-jit-reader-dir=PATH
1617 directory to load the JIT readers from
1618 --with-expat include expat support (auto/yes/no)
1619 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1620 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1621 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1622 --with-mpfr include MPFR support (auto/yes/no)
1623 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1624 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1625 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1626 --with-python[=PYTHON] include python support
1627 (auto/yes/no/<python-program>)
1628 --with-guile[=GUILE] include guile support
1629 (auto/yes/no/<guile-version>/<pkg-config-program>)
1630 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1631 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1632 --without-libipt-prefix don't search for libipt in includedir and libdir
1633 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1634 --without-included-regex
1635 don't use included regex; this is the default on
1636 systems with version 2 of the GNU C library (use
1637 with caution on other system)
1638 --with-sysroot[=DIR] search for usr/lib et al within DIR
1639 --with-system-gdbinit=PATH
1640 automatically load a system-wide gdbinit file
1641 --with-system-gdbinit-dir=PATH
1642 automatically load system-wide gdbinit files from
1643 this directory
1644 --with-lzma support lzma compression (auto/yes/no)
1645 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1646 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1647 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1648 --with-tcl directory containing tcl configuration (tclConfig.sh)
1649 --with-tk directory containing tk configuration (tkConfig.sh)
1650 --with-x use the X Window System
1651 --with-babeltrace include babeltrace support (auto/yes/no)
1652 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1653 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1654 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1655 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1656 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1657 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1658 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1659
1660 Some influential environment variables:
1661 CC C compiler command
1662 CFLAGS C compiler flags
1663 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1664 nonstandard directory <lib dir>
1665 LIBS libraries to pass to the linker, e.g. -l<library>
1666 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1667 you have headers in a nonstandard directory <include dir>
1668 CXX C++ compiler command
1669 CXXFLAGS C++ compiler flags
1670 CPP C preprocessor
1671 MAKEINFO Parent configure detects if it is of sufficient version.
1672 MAKEINFOFLAGS
1673 Parameters for MAKEINFO.
1674 YACC The `Yet Another Compiler Compiler' implementation to use.
1675 Defaults to the first program found out of: `bison -y', `byacc',
1676 `yacc'.
1677 YFLAGS The list of arguments that will be passed by default to $YACC.
1678 This script will default YFLAGS to the empty string to avoid a
1679 default value of `-d' given by some make applications.
1680 XMKMF Path to xmkmf, Makefile generator for X Window System
1681
1682 Use these variables to override the choices made by `configure' or to help
1683 it to find libraries and programs with nonstandard names/locations.
1684
1685 Report bugs to the package provider.
1686 _ACEOF
1687 ac_status=$?
1688 fi
1689
1690 if test "$ac_init_help" = "recursive"; then
1691 # If there are subdirs, report their specific --help.
1692 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1693 test -d "$ac_dir" ||
1694 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1695 continue
1696 ac_builddir=.
1697
1698 case "$ac_dir" in
1699 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1700 *)
1701 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1702 # A ".." for each directory in $ac_dir_suffix.
1703 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1704 case $ac_top_builddir_sub in
1705 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1706 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1707 esac ;;
1708 esac
1709 ac_abs_top_builddir=$ac_pwd
1710 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1711 # for backward compatibility:
1712 ac_top_builddir=$ac_top_build_prefix
1713
1714 case $srcdir in
1715 .) # We are building in place.
1716 ac_srcdir=.
1717 ac_top_srcdir=$ac_top_builddir_sub
1718 ac_abs_top_srcdir=$ac_pwd ;;
1719 [\\/]* | ?:[\\/]* ) # Absolute name.
1720 ac_srcdir=$srcdir$ac_dir_suffix;
1721 ac_top_srcdir=$srcdir
1722 ac_abs_top_srcdir=$srcdir ;;
1723 *) # Relative name.
1724 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1725 ac_top_srcdir=$ac_top_build_prefix$srcdir
1726 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1727 esac
1728 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1729
1730 cd "$ac_dir" || { ac_status=$?; continue; }
1731 # Check for guested configure.
1732 if test -f "$ac_srcdir/configure.gnu"; then
1733 echo &&
1734 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1735 elif test -f "$ac_srcdir/configure"; then
1736 echo &&
1737 $SHELL "$ac_srcdir/configure" --help=recursive
1738 else
1739 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1740 fi || ac_status=$?
1741 cd "$ac_pwd" || { ac_status=$?; break; }
1742 done
1743 fi
1744
1745 test -n "$ac_init_help" && exit $ac_status
1746 if $ac_init_version; then
1747 cat <<\_ACEOF
1748 configure
1749 generated by GNU Autoconf 2.69
1750
1751 Copyright (C) 2012 Free Software Foundation, Inc.
1752 This configure script is free software; the Free Software Foundation
1753 gives unlimited permission to copy, distribute and modify it.
1754 _ACEOF
1755 exit
1756 fi
1757
1758 ## ------------------------ ##
1759 ## Autoconf initialization. ##
1760 ## ------------------------ ##
1761
1762 # ac_fn_c_try_compile LINENO
1763 # --------------------------
1764 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1765 ac_fn_c_try_compile ()
1766 {
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 rm -f conftest.$ac_objext
1769 if { { ac_try="$ac_compile"
1770 case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773 esac
1774 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775 $as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_compile") 2>conftest.err
1777 ac_status=$?
1778 if test -s conftest.err; then
1779 grep -v '^ *+' conftest.err >conftest.er1
1780 cat conftest.er1 >&5
1781 mv -f conftest.er1 conftest.err
1782 fi
1783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784 test $ac_status = 0; } && {
1785 test -z "$ac_c_werror_flag" ||
1786 test ! -s conftest.err
1787 } && test -s conftest.$ac_objext; then :
1788 ac_retval=0
1789 else
1790 $as_echo "$as_me: failed program was:" >&5
1791 sed 's/^/| /' conftest.$ac_ext >&5
1792
1793 ac_retval=1
1794 fi
1795 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1796 as_fn_set_status $ac_retval
1797
1798 } # ac_fn_c_try_compile
1799
1800 # ac_fn_cxx_try_compile LINENO
1801 # ----------------------------
1802 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1803 ac_fn_cxx_try_compile ()
1804 {
1805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1806 rm -f conftest.$ac_objext
1807 if { { ac_try="$ac_compile"
1808 case "(($ac_try" in
1809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1810 *) ac_try_echo=$ac_try;;
1811 esac
1812 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1813 $as_echo "$ac_try_echo"; } >&5
1814 (eval "$ac_compile") 2>conftest.err
1815 ac_status=$?
1816 if test -s conftest.err; then
1817 grep -v '^ *+' conftest.err >conftest.er1
1818 cat conftest.er1 >&5
1819 mv -f conftest.er1 conftest.err
1820 fi
1821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1822 test $ac_status = 0; } && {
1823 test -z "$ac_cxx_werror_flag" ||
1824 test ! -s conftest.err
1825 } && test -s conftest.$ac_objext; then :
1826 ac_retval=0
1827 else
1828 $as_echo "$as_me: failed program was:" >&5
1829 sed 's/^/| /' conftest.$ac_ext >&5
1830
1831 ac_retval=1
1832 fi
1833 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1834 as_fn_set_status $ac_retval
1835
1836 } # ac_fn_cxx_try_compile
1837
1838 # ac_fn_c_try_cpp LINENO
1839 # ----------------------
1840 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1841 ac_fn_c_try_cpp ()
1842 {
1843 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1844 if { { ac_try="$ac_cpp conftest.$ac_ext"
1845 case "(($ac_try" in
1846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1847 *) ac_try_echo=$ac_try;;
1848 esac
1849 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1850 $as_echo "$ac_try_echo"; } >&5
1851 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1852 ac_status=$?
1853 if test -s conftest.err; then
1854 grep -v '^ *+' conftest.err >conftest.er1
1855 cat conftest.er1 >&5
1856 mv -f conftest.er1 conftest.err
1857 fi
1858 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1859 test $ac_status = 0; } > conftest.i && {
1860 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1861 test ! -s conftest.err
1862 }; then :
1863 ac_retval=0
1864 else
1865 $as_echo "$as_me: failed program was:" >&5
1866 sed 's/^/| /' conftest.$ac_ext >&5
1867
1868 ac_retval=1
1869 fi
1870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1871 as_fn_set_status $ac_retval
1872
1873 } # ac_fn_c_try_cpp
1874
1875 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1876 # -------------------------------------------------------
1877 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1878 # the include files in INCLUDES and setting the cache variable VAR
1879 # accordingly.
1880 ac_fn_c_check_header_mongrel ()
1881 {
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 if eval \${$3+:} false; then :
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885 $as_echo_n "checking for $2... " >&6; }
1886 if eval \${$3+:} false; then :
1887 $as_echo_n "(cached) " >&6
1888 fi
1889 eval ac_res=\$$3
1890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1891 $as_echo "$ac_res" >&6; }
1892 else
1893 # Is the header compilable?
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1895 $as_echo_n "checking $2 usability... " >&6; }
1896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1897 /* end confdefs.h. */
1898 $4
1899 #include <$2>
1900 _ACEOF
1901 if ac_fn_c_try_compile "$LINENO"; then :
1902 ac_header_compiler=yes
1903 else
1904 ac_header_compiler=no
1905 fi
1906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1908 $as_echo "$ac_header_compiler" >&6; }
1909
1910 # Is the header present?
1911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1912 $as_echo_n "checking $2 presence... " >&6; }
1913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914 /* end confdefs.h. */
1915 #include <$2>
1916 _ACEOF
1917 if ac_fn_c_try_cpp "$LINENO"; then :
1918 ac_header_preproc=yes
1919 else
1920 ac_header_preproc=no
1921 fi
1922 rm -f conftest.err conftest.i conftest.$ac_ext
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1924 $as_echo "$ac_header_preproc" >&6; }
1925
1926 # So? What about this header?
1927 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1928 yes:no: )
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1930 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1931 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1932 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1933 ;;
1934 no:yes:* )
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1936 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1938 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1939 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1940 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1942 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1944 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1945 ;;
1946 esac
1947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1948 $as_echo_n "checking for $2... " >&6; }
1949 if eval \${$3+:} false; then :
1950 $as_echo_n "(cached) " >&6
1951 else
1952 eval "$3=\$ac_header_compiler"
1953 fi
1954 eval ac_res=\$$3
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1956 $as_echo "$ac_res" >&6; }
1957 fi
1958 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1959
1960 } # ac_fn_c_check_header_mongrel
1961
1962 # ac_fn_c_try_run LINENO
1963 # ----------------------
1964 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1965 # that executables *can* be run.
1966 ac_fn_c_try_run ()
1967 {
1968 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1969 if { { ac_try="$ac_link"
1970 case "(($ac_try" in
1971 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1972 *) ac_try_echo=$ac_try;;
1973 esac
1974 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1975 $as_echo "$ac_try_echo"; } >&5
1976 (eval "$ac_link") 2>&5
1977 ac_status=$?
1978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1979 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1980 { { case "(($ac_try" in
1981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1982 *) ac_try_echo=$ac_try;;
1983 esac
1984 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1985 $as_echo "$ac_try_echo"; } >&5
1986 (eval "$ac_try") 2>&5
1987 ac_status=$?
1988 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1989 test $ac_status = 0; }; }; then :
1990 ac_retval=0
1991 else
1992 $as_echo "$as_me: program exited with status $ac_status" >&5
1993 $as_echo "$as_me: failed program was:" >&5
1994 sed 's/^/| /' conftest.$ac_ext >&5
1995
1996 ac_retval=$ac_status
1997 fi
1998 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1999 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2000 as_fn_set_status $ac_retval
2001
2002 } # ac_fn_c_try_run
2003
2004 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2005 # -------------------------------------------------------
2006 # Tests whether HEADER exists and can be compiled using the include files in
2007 # INCLUDES, setting the cache variable VAR accordingly.
2008 ac_fn_c_check_header_compile ()
2009 {
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2012 $as_echo_n "checking for $2... " >&6; }
2013 if eval \${$3+:} false; then :
2014 $as_echo_n "(cached) " >&6
2015 else
2016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2017 /* end confdefs.h. */
2018 $4
2019 #include <$2>
2020 _ACEOF
2021 if ac_fn_c_try_compile "$LINENO"; then :
2022 eval "$3=yes"
2023 else
2024 eval "$3=no"
2025 fi
2026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2027 fi
2028 eval ac_res=\$$3
2029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2030 $as_echo "$ac_res" >&6; }
2031 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2032
2033 } # ac_fn_c_check_header_compile
2034
2035 # ac_fn_c_try_link LINENO
2036 # -----------------------
2037 # Try to link conftest.$ac_ext, and return whether this succeeded.
2038 ac_fn_c_try_link ()
2039 {
2040 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2041 rm -f conftest.$ac_objext conftest$ac_exeext
2042 if { { ac_try="$ac_link"
2043 case "(($ac_try" in
2044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2045 *) ac_try_echo=$ac_try;;
2046 esac
2047 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2048 $as_echo "$ac_try_echo"; } >&5
2049 (eval "$ac_link") 2>conftest.err
2050 ac_status=$?
2051 if test -s conftest.err; then
2052 grep -v '^ *+' conftest.err >conftest.er1
2053 cat conftest.er1 >&5
2054 mv -f conftest.er1 conftest.err
2055 fi
2056 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2057 test $ac_status = 0; } && {
2058 test -z "$ac_c_werror_flag" ||
2059 test ! -s conftest.err
2060 } && test -s conftest$ac_exeext && {
2061 test "$cross_compiling" = yes ||
2062 test -x conftest$ac_exeext
2063 }; then :
2064 ac_retval=0
2065 else
2066 $as_echo "$as_me: failed program was:" >&5
2067 sed 's/^/| /' conftest.$ac_ext >&5
2068
2069 ac_retval=1
2070 fi
2071 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2072 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2073 # interfere with the next link command; also delete a directory that is
2074 # left behind by Apple's compiler. We do this before executing the actions.
2075 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2076 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2077 as_fn_set_status $ac_retval
2078
2079 } # ac_fn_c_try_link
2080
2081 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2082 # --------------------------------------------
2083 # Tries to find the compile-time value of EXPR in a program that includes
2084 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2085 # computed
2086 ac_fn_c_compute_int ()
2087 {
2088 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2089 if test "$cross_compiling" = yes; then
2090 # Depending upon the size, compute the lo and hi bounds.
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092 /* end confdefs.h. */
2093 $4
2094 int
2095 main ()
2096 {
2097 static int test_array [1 - 2 * !(($2) >= 0)];
2098 test_array [0] = 0;
2099 return test_array [0];
2100
2101 ;
2102 return 0;
2103 }
2104 _ACEOF
2105 if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_lo=0 ac_mid=0
2107 while :; do
2108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2109 /* end confdefs.h. */
2110 $4
2111 int
2112 main ()
2113 {
2114 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2115 test_array [0] = 0;
2116 return test_array [0];
2117
2118 ;
2119 return 0;
2120 }
2121 _ACEOF
2122 if ac_fn_c_try_compile "$LINENO"; then :
2123 ac_hi=$ac_mid; break
2124 else
2125 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2126 if test $ac_lo -le $ac_mid; then
2127 ac_lo= ac_hi=
2128 break
2129 fi
2130 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2131 fi
2132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2133 done
2134 else
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136 /* end confdefs.h. */
2137 $4
2138 int
2139 main ()
2140 {
2141 static int test_array [1 - 2 * !(($2) < 0)];
2142 test_array [0] = 0;
2143 return test_array [0];
2144
2145 ;
2146 return 0;
2147 }
2148 _ACEOF
2149 if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_hi=-1 ac_mid=-1
2151 while :; do
2152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2153 /* end confdefs.h. */
2154 $4
2155 int
2156 main ()
2157 {
2158 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2159 test_array [0] = 0;
2160 return test_array [0];
2161
2162 ;
2163 return 0;
2164 }
2165 _ACEOF
2166 if ac_fn_c_try_compile "$LINENO"; then :
2167 ac_lo=$ac_mid; break
2168 else
2169 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2170 if test $ac_mid -le $ac_hi; then
2171 ac_lo= ac_hi=
2172 break
2173 fi
2174 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2175 fi
2176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 done
2178 else
2179 ac_lo= ac_hi=
2180 fi
2181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2182 fi
2183 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184 # Binary search between lo and hi bounds.
2185 while test "x$ac_lo" != "x$ac_hi"; do
2186 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2188 /* end confdefs.h. */
2189 $4
2190 int
2191 main ()
2192 {
2193 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2194 test_array [0] = 0;
2195 return test_array [0];
2196
2197 ;
2198 return 0;
2199 }
2200 _ACEOF
2201 if ac_fn_c_try_compile "$LINENO"; then :
2202 ac_hi=$ac_mid
2203 else
2204 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2205 fi
2206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207 done
2208 case $ac_lo in #((
2209 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2210 '') ac_retval=1 ;;
2211 esac
2212 else
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214 /* end confdefs.h. */
2215 $4
2216 static long int longval () { return $2; }
2217 static unsigned long int ulongval () { return $2; }
2218 #include <stdio.h>
2219 #include <stdlib.h>
2220 int
2221 main ()
2222 {
2223
2224 FILE *f = fopen ("conftest.val", "w");
2225 if (! f)
2226 return 1;
2227 if (($2) < 0)
2228 {
2229 long int i = longval ();
2230 if (i != ($2))
2231 return 1;
2232 fprintf (f, "%ld", i);
2233 }
2234 else
2235 {
2236 unsigned long int i = ulongval ();
2237 if (i != ($2))
2238 return 1;
2239 fprintf (f, "%lu", i);
2240 }
2241 /* Do not output a trailing newline, as this causes \r\n confusion
2242 on some platforms. */
2243 return ferror (f) || fclose (f) != 0;
2244
2245 ;
2246 return 0;
2247 }
2248 _ACEOF
2249 if ac_fn_c_try_run "$LINENO"; then :
2250 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2251 else
2252 ac_retval=1
2253 fi
2254 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2255 conftest.$ac_objext conftest.beam conftest.$ac_ext
2256 rm -f conftest.val
2257
2258 fi
2259 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2260 as_fn_set_status $ac_retval
2261
2262 } # ac_fn_c_compute_int
2263
2264 # ac_fn_c_check_func LINENO FUNC VAR
2265 # ----------------------------------
2266 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2267 ac_fn_c_check_func ()
2268 {
2269 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2271 $as_echo_n "checking for $2... " >&6; }
2272 if eval \${$3+:} false; then :
2273 $as_echo_n "(cached) " >&6
2274 else
2275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2276 /* end confdefs.h. */
2277 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2278 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2279 #define $2 innocuous_$2
2280
2281 /* System header to define __stub macros and hopefully few prototypes,
2282 which can conflict with char $2 (); below.
2283 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2284 <limits.h> exists even on freestanding compilers. */
2285
2286 #ifdef __STDC__
2287 # include <limits.h>
2288 #else
2289 # include <assert.h>
2290 #endif
2291
2292 #undef $2
2293
2294 /* Override any GCC internal prototype to avoid an error.
2295 Use char because int might match the return type of a GCC
2296 builtin and then its argument prototype would still apply. */
2297 #ifdef __cplusplus
2298 extern "C"
2299 #endif
2300 char $2 ();
2301 /* The GNU C library defines this for functions which it implements
2302 to always fail with ENOSYS. Some functions are actually named
2303 something starting with __ and the normal name is an alias. */
2304 #if defined __stub_$2 || defined __stub___$2
2305 choke me
2306 #endif
2307
2308 int
2309 main ()
2310 {
2311 return $2 ();
2312 ;
2313 return 0;
2314 }
2315 _ACEOF
2316 if ac_fn_c_try_link "$LINENO"; then :
2317 eval "$3=yes"
2318 else
2319 eval "$3=no"
2320 fi
2321 rm -f core conftest.err conftest.$ac_objext \
2322 conftest$ac_exeext conftest.$ac_ext
2323 fi
2324 eval ac_res=\$$3
2325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2326 $as_echo "$ac_res" >&6; }
2327 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2328
2329 } # ac_fn_c_check_func
2330
2331 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2332 # -------------------------------------------
2333 # Tests whether TYPE exists after having included INCLUDES, setting cache
2334 # variable VAR accordingly.
2335 ac_fn_c_check_type ()
2336 {
2337 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2339 $as_echo_n "checking for $2... " >&6; }
2340 if eval \${$3+:} false; then :
2341 $as_echo_n "(cached) " >&6
2342 else
2343 eval "$3=no"
2344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2345 /* end confdefs.h. */
2346 $4
2347 int
2348 main ()
2349 {
2350 if (sizeof ($2))
2351 return 0;
2352 ;
2353 return 0;
2354 }
2355 _ACEOF
2356 if ac_fn_c_try_compile "$LINENO"; then :
2357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358 /* end confdefs.h. */
2359 $4
2360 int
2361 main ()
2362 {
2363 if (sizeof (($2)))
2364 return 0;
2365 ;
2366 return 0;
2367 }
2368 _ACEOF
2369 if ac_fn_c_try_compile "$LINENO"; then :
2370
2371 else
2372 eval "$3=yes"
2373 fi
2374 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375 fi
2376 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2377 fi
2378 eval ac_res=\$$3
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2380 $as_echo "$ac_res" >&6; }
2381 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2382
2383 } # ac_fn_c_check_type
2384
2385 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2386 # ---------------------------------------------
2387 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2388 # accordingly.
2389 ac_fn_c_check_decl ()
2390 {
2391 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2392 as_decl_name=`echo $2|sed 's/ *(.*//'`
2393 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2395 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2396 if eval \${$3+:} false; then :
2397 $as_echo_n "(cached) " >&6
2398 else
2399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400 /* end confdefs.h. */
2401 $4
2402 int
2403 main ()
2404 {
2405 #ifndef $as_decl_name
2406 #ifdef __cplusplus
2407 (void) $as_decl_use;
2408 #else
2409 (void) $as_decl_name;
2410 #endif
2411 #endif
2412
2413 ;
2414 return 0;
2415 }
2416 _ACEOF
2417 if ac_fn_c_try_compile "$LINENO"; then :
2418 eval "$3=yes"
2419 else
2420 eval "$3=no"
2421 fi
2422 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423 fi
2424 eval ac_res=\$$3
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426 $as_echo "$ac_res" >&6; }
2427 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2428
2429 } # ac_fn_c_check_decl
2430
2431 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2432 # ----------------------------------------------------
2433 # Tries to find if the field MEMBER exists in type AGGR, after including
2434 # INCLUDES, setting cache variable VAR accordingly.
2435 ac_fn_c_check_member ()
2436 {
2437 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2439 $as_echo_n "checking for $2.$3... " >&6; }
2440 if eval \${$4+:} false; then :
2441 $as_echo_n "(cached) " >&6
2442 else
2443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2444 /* end confdefs.h. */
2445 $5
2446 int
2447 main ()
2448 {
2449 static $2 ac_aggr;
2450 if (ac_aggr.$3)
2451 return 0;
2452 ;
2453 return 0;
2454 }
2455 _ACEOF
2456 if ac_fn_c_try_compile "$LINENO"; then :
2457 eval "$4=yes"
2458 else
2459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2460 /* end confdefs.h. */
2461 $5
2462 int
2463 main ()
2464 {
2465 static $2 ac_aggr;
2466 if (sizeof ac_aggr.$3)
2467 return 0;
2468 ;
2469 return 0;
2470 }
2471 _ACEOF
2472 if ac_fn_c_try_compile "$LINENO"; then :
2473 eval "$4=yes"
2474 else
2475 eval "$4=no"
2476 fi
2477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2478 fi
2479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2480 fi
2481 eval ac_res=\$$4
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2483 $as_echo "$ac_res" >&6; }
2484 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2485
2486 } # ac_fn_c_check_member
2487
2488 # ac_fn_cxx_try_link LINENO
2489 # -------------------------
2490 # Try to link conftest.$ac_ext, and return whether this succeeded.
2491 ac_fn_cxx_try_link ()
2492 {
2493 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494 rm -f conftest.$ac_objext conftest$ac_exeext
2495 if { { ac_try="$ac_link"
2496 case "(($ac_try" in
2497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2498 *) ac_try_echo=$ac_try;;
2499 esac
2500 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2501 $as_echo "$ac_try_echo"; } >&5
2502 (eval "$ac_link") 2>conftest.err
2503 ac_status=$?
2504 if test -s conftest.err; then
2505 grep -v '^ *+' conftest.err >conftest.er1
2506 cat conftest.er1 >&5
2507 mv -f conftest.er1 conftest.err
2508 fi
2509 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2510 test $ac_status = 0; } && {
2511 test -z "$ac_cxx_werror_flag" ||
2512 test ! -s conftest.err
2513 } && test -s conftest$ac_exeext && {
2514 test "$cross_compiling" = yes ||
2515 test -x conftest$ac_exeext
2516 }; then :
2517 ac_retval=0
2518 else
2519 $as_echo "$as_me: failed program was:" >&5
2520 sed 's/^/| /' conftest.$ac_ext >&5
2521
2522 ac_retval=1
2523 fi
2524 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2525 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2526 # interfere with the next link command; also delete a directory that is
2527 # left behind by Apple's compiler. We do this before executing the actions.
2528 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2529 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2530 as_fn_set_status $ac_retval
2531
2532 } # ac_fn_cxx_try_link
2533
2534 # ac_fn_cxx_check_func LINENO FUNC VAR
2535 # ------------------------------------
2536 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2537 ac_fn_cxx_check_func ()
2538 {
2539 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2541 $as_echo_n "checking for $2... " >&6; }
2542 if eval \${$3+:} false; then :
2543 $as_echo_n "(cached) " >&6
2544 else
2545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2546 /* end confdefs.h. */
2547 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2548 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2549 #define $2 innocuous_$2
2550
2551 /* System header to define __stub macros and hopefully few prototypes,
2552 which can conflict with char $2 (); below.
2553 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2554 <limits.h> exists even on freestanding compilers. */
2555
2556 #ifdef __STDC__
2557 # include <limits.h>
2558 #else
2559 # include <assert.h>
2560 #endif
2561
2562 #undef $2
2563
2564 /* Override any GCC internal prototype to avoid an error.
2565 Use char because int might match the return type of a GCC
2566 builtin and then its argument prototype would still apply. */
2567 #ifdef __cplusplus
2568 extern "C"
2569 #endif
2570 char $2 ();
2571 /* The GNU C library defines this for functions which it implements
2572 to always fail with ENOSYS. Some functions are actually named
2573 something starting with __ and the normal name is an alias. */
2574 #if defined __stub_$2 || defined __stub___$2
2575 choke me
2576 #endif
2577
2578 int
2579 main ()
2580 {
2581 return $2 ();
2582 ;
2583 return 0;
2584 }
2585 _ACEOF
2586 if ac_fn_cxx_try_link "$LINENO"; then :
2587 eval "$3=yes"
2588 else
2589 eval "$3=no"
2590 fi
2591 rm -f core conftest.err conftest.$ac_objext \
2592 conftest$ac_exeext conftest.$ac_ext
2593 fi
2594 eval ac_res=\$$3
2595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2596 $as_echo "$ac_res" >&6; }
2597 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2598
2599 } # ac_fn_cxx_check_func
2600 cat >config.log <<_ACEOF
2601 This file contains any messages produced by compilers while
2602 running configure, to aid debugging if configure makes a mistake.
2603
2604 It was created by $as_me, which was
2605 generated by GNU Autoconf 2.69. Invocation command line was
2606
2607 $ $0 $@
2608
2609 _ACEOF
2610 exec 5>>config.log
2611 {
2612 cat <<_ASUNAME
2613 ## --------- ##
2614 ## Platform. ##
2615 ## --------- ##
2616
2617 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2618 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2619 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2620 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2621 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2622
2623 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2624 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2625
2626 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2627 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2628 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2629 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2630 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2631 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2632 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2633
2634 _ASUNAME
2635
2636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2637 for as_dir in $PATH
2638 do
2639 IFS=$as_save_IFS
2640 test -z "$as_dir" && as_dir=.
2641 $as_echo "PATH: $as_dir"
2642 done
2643 IFS=$as_save_IFS
2644
2645 } >&5
2646
2647 cat >&5 <<_ACEOF
2648
2649
2650 ## ----------- ##
2651 ## Core tests. ##
2652 ## ----------- ##
2653
2654 _ACEOF
2655
2656
2657 # Keep a trace of the command line.
2658 # Strip out --no-create and --no-recursion so they do not pile up.
2659 # Strip out --silent because we don't want to record it for future runs.
2660 # Also quote any args containing shell meta-characters.
2661 # Make two passes to allow for proper duplicate-argument suppression.
2662 ac_configure_args=
2663 ac_configure_args0=
2664 ac_configure_args1=
2665 ac_must_keep_next=false
2666 for ac_pass in 1 2
2667 do
2668 for ac_arg
2669 do
2670 case $ac_arg in
2671 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2672 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2673 | -silent | --silent | --silen | --sile | --sil)
2674 continue ;;
2675 *\'*)
2676 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2677 esac
2678 case $ac_pass in
2679 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2680 2)
2681 as_fn_append ac_configure_args1 " '$ac_arg'"
2682 if test $ac_must_keep_next = true; then
2683 ac_must_keep_next=false # Got value, back to normal.
2684 else
2685 case $ac_arg in
2686 *=* | --config-cache | -C | -disable-* | --disable-* \
2687 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2688 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2689 | -with-* | --with-* | -without-* | --without-* | --x)
2690 case "$ac_configure_args0 " in
2691 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2692 esac
2693 ;;
2694 -* ) ac_must_keep_next=true ;;
2695 esac
2696 fi
2697 as_fn_append ac_configure_args " '$ac_arg'"
2698 ;;
2699 esac
2700 done
2701 done
2702 { ac_configure_args0=; unset ac_configure_args0;}
2703 { ac_configure_args1=; unset ac_configure_args1;}
2704
2705 # When interrupted or exit'd, cleanup temporary files, and complete
2706 # config.log. We remove comments because anyway the quotes in there
2707 # would cause problems or look ugly.
2708 # WARNING: Use '\'' to represent an apostrophe within the trap.
2709 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2710 trap 'exit_status=$?
2711 # Save into config.log some information that might help in debugging.
2712 {
2713 echo
2714
2715 $as_echo "## ---------------- ##
2716 ## Cache variables. ##
2717 ## ---------------- ##"
2718 echo
2719 # The following way of writing the cache mishandles newlines in values,
2720 (
2721 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2722 eval ac_val=\$$ac_var
2723 case $ac_val in #(
2724 *${as_nl}*)
2725 case $ac_var in #(
2726 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2727 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2728 esac
2729 case $ac_var in #(
2730 _ | IFS | as_nl) ;; #(
2731 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2732 *) { eval $ac_var=; unset $ac_var;} ;;
2733 esac ;;
2734 esac
2735 done
2736 (set) 2>&1 |
2737 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2738 *${as_nl}ac_space=\ *)
2739 sed -n \
2740 "s/'\''/'\''\\\\'\'''\''/g;
2741 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2742 ;; #(
2743 *)
2744 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2745 ;;
2746 esac |
2747 sort
2748 )
2749 echo
2750
2751 $as_echo "## ----------------- ##
2752 ## Output variables. ##
2753 ## ----------------- ##"
2754 echo
2755 for ac_var in $ac_subst_vars
2756 do
2757 eval ac_val=\$$ac_var
2758 case $ac_val in
2759 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2760 esac
2761 $as_echo "$ac_var='\''$ac_val'\''"
2762 done | sort
2763 echo
2764
2765 if test -n "$ac_subst_files"; then
2766 $as_echo "## ------------------- ##
2767 ## File substitutions. ##
2768 ## ------------------- ##"
2769 echo
2770 for ac_var in $ac_subst_files
2771 do
2772 eval ac_val=\$$ac_var
2773 case $ac_val in
2774 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2775 esac
2776 $as_echo "$ac_var='\''$ac_val'\''"
2777 done | sort
2778 echo
2779 fi
2780
2781 if test -s confdefs.h; then
2782 $as_echo "## ----------- ##
2783 ## confdefs.h. ##
2784 ## ----------- ##"
2785 echo
2786 cat confdefs.h
2787 echo
2788 fi
2789 test "$ac_signal" != 0 &&
2790 $as_echo "$as_me: caught signal $ac_signal"
2791 $as_echo "$as_me: exit $exit_status"
2792 } >&5
2793 rm -f core *.core core.conftest.* &&
2794 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2795 exit $exit_status
2796 ' 0
2797 for ac_signal in 1 2 13 15; do
2798 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2799 done
2800 ac_signal=0
2801
2802 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2803 rm -f -r conftest* confdefs.h
2804
2805 $as_echo "/* confdefs.h */" > confdefs.h
2806
2807 # Predefined preprocessor variables.
2808
2809 cat >>confdefs.h <<_ACEOF
2810 #define PACKAGE_NAME "$PACKAGE_NAME"
2811 _ACEOF
2812
2813 cat >>confdefs.h <<_ACEOF
2814 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2815 _ACEOF
2816
2817 cat >>confdefs.h <<_ACEOF
2818 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2819 _ACEOF
2820
2821 cat >>confdefs.h <<_ACEOF
2822 #define PACKAGE_STRING "$PACKAGE_STRING"
2823 _ACEOF
2824
2825 cat >>confdefs.h <<_ACEOF
2826 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2827 _ACEOF
2828
2829 cat >>confdefs.h <<_ACEOF
2830 #define PACKAGE_URL "$PACKAGE_URL"
2831 _ACEOF
2832
2833
2834 # Let the site file select an alternate cache file if it wants to.
2835 # Prefer an explicitly selected file to automatically selected ones.
2836 ac_site_file1=NONE
2837 ac_site_file2=NONE
2838 if test -n "$CONFIG_SITE"; then
2839 # We do not want a PATH search for config.site.
2840 case $CONFIG_SITE in #((
2841 -*) ac_site_file1=./$CONFIG_SITE;;
2842 */*) ac_site_file1=$CONFIG_SITE;;
2843 *) ac_site_file1=./$CONFIG_SITE;;
2844 esac
2845 elif test "x$prefix" != xNONE; then
2846 ac_site_file1=$prefix/share/config.site
2847 ac_site_file2=$prefix/etc/config.site
2848 else
2849 ac_site_file1=$ac_default_prefix/share/config.site
2850 ac_site_file2=$ac_default_prefix/etc/config.site
2851 fi
2852 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2853 do
2854 test "x$ac_site_file" = xNONE && continue
2855 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2857 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2858 sed 's/^/| /' "$ac_site_file" >&5
2859 . "$ac_site_file" \
2860 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2861 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2862 as_fn_error $? "failed to load site script $ac_site_file
2863 See \`config.log' for more details" "$LINENO" 5; }
2864 fi
2865 done
2866
2867 if test -r "$cache_file"; then
2868 # Some versions of bash will fail to source /dev/null (special files
2869 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2870 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2871 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2872 $as_echo "$as_me: loading cache $cache_file" >&6;}
2873 case $cache_file in
2874 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2875 *) . "./$cache_file";;
2876 esac
2877 fi
2878 else
2879 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2880 $as_echo "$as_me: creating cache $cache_file" >&6;}
2881 >$cache_file
2882 fi
2883
2884 as_fn_append ac_header_list " stdlib.h"
2885 as_fn_append ac_header_list " unistd.h"
2886 as_fn_append ac_header_list " sys/param.h"
2887 # Check that the precious variables saved in the cache have kept the same
2888 # value.
2889 ac_cache_corrupted=false
2890 for ac_var in $ac_precious_vars; do
2891 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2892 eval ac_new_set=\$ac_env_${ac_var}_set
2893 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2894 eval ac_new_val=\$ac_env_${ac_var}_value
2895 case $ac_old_set,$ac_new_set in
2896 set,)
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2898 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2899 ac_cache_corrupted=: ;;
2900 ,set)
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2902 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2903 ac_cache_corrupted=: ;;
2904 ,);;
2905 *)
2906 if test "x$ac_old_val" != "x$ac_new_val"; then
2907 # differences in whitespace do not lead to failure.
2908 ac_old_val_w=`echo x $ac_old_val`
2909 ac_new_val_w=`echo x $ac_new_val`
2910 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2912 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2913 ac_cache_corrupted=:
2914 else
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2916 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2917 eval $ac_var=\$ac_old_val
2918 fi
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2920 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2922 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2923 fi;;
2924 esac
2925 # Pass precious variables to config.status.
2926 if test "$ac_new_set" = set; then
2927 case $ac_new_val in
2928 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2929 *) ac_arg=$ac_var=$ac_new_val ;;
2930 esac
2931 case " $ac_configure_args " in
2932 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2933 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2934 esac
2935 fi
2936 done
2937 if $ac_cache_corrupted; then
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2939 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2941 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2942 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2943 fi
2944 ## -------------------- ##
2945 ## Main body of script. ##
2946 ## -------------------- ##
2947
2948 ac_ext=c
2949 ac_cpp='$CPP $CPPFLAGS'
2950 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2951 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2952 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2953
2954
2955
2956
2957
2958 ac_config_headers="$ac_config_headers config.h:config.in"
2959
2960
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2962 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2963 # Check whether --enable-maintainer-mode was given.
2964 if test "${enable_maintainer_mode+set}" = set; then :
2965 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2966 else
2967 USE_MAINTAINER_MODE=no
2968 fi
2969
2970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2971 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2972 if test $USE_MAINTAINER_MODE = yes; then
2973 MAINTAINER_MODE_TRUE=
2974 MAINTAINER_MODE_FALSE='#'
2975 else
2976 MAINTAINER_MODE_TRUE='#'
2977 MAINTAINER_MODE_FALSE=
2978 fi
2979
2980 MAINT=$MAINTAINER_MODE_TRUE
2981
2982
2983
2984 # Set the 'development' global.
2985 . $srcdir/../bfd/development.sh
2986
2987 ac_ext=c
2988 ac_cpp='$CPP $CPPFLAGS'
2989 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2990 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2991 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2992 if test -n "$ac_tool_prefix"; then
2993 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2994 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2996 $as_echo_n "checking for $ac_word... " >&6; }
2997 if ${ac_cv_prog_CC+:} false; then :
2998 $as_echo_n "(cached) " >&6
2999 else
3000 if test -n "$CC"; then
3001 ac_cv_prog_CC="$CC" # Let the user override the test.
3002 else
3003 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3004 for as_dir in $PATH
3005 do
3006 IFS=$as_save_IFS
3007 test -z "$as_dir" && as_dir=.
3008 for ac_exec_ext in '' $ac_executable_extensions; do
3009 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3010 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3011 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3012 break 2
3013 fi
3014 done
3015 done
3016 IFS=$as_save_IFS
3017
3018 fi
3019 fi
3020 CC=$ac_cv_prog_CC
3021 if test -n "$CC"; then
3022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3023 $as_echo "$CC" >&6; }
3024 else
3025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3026 $as_echo "no" >&6; }
3027 fi
3028
3029
3030 fi
3031 if test -z "$ac_cv_prog_CC"; then
3032 ac_ct_CC=$CC
3033 # Extract the first word of "gcc", so it can be a program name with args.
3034 set dummy gcc; ac_word=$2
3035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3036 $as_echo_n "checking for $ac_word... " >&6; }
3037 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3038 $as_echo_n "(cached) " >&6
3039 else
3040 if test -n "$ac_ct_CC"; then
3041 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3042 else
3043 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3044 for as_dir in $PATH
3045 do
3046 IFS=$as_save_IFS
3047 test -z "$as_dir" && as_dir=.
3048 for ac_exec_ext in '' $ac_executable_extensions; do
3049 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3050 ac_cv_prog_ac_ct_CC="gcc"
3051 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3052 break 2
3053 fi
3054 done
3055 done
3056 IFS=$as_save_IFS
3057
3058 fi
3059 fi
3060 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3061 if test -n "$ac_ct_CC"; then
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3063 $as_echo "$ac_ct_CC" >&6; }
3064 else
3065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3066 $as_echo "no" >&6; }
3067 fi
3068
3069 if test "x$ac_ct_CC" = x; then
3070 CC=""
3071 else
3072 case $cross_compiling:$ac_tool_warned in
3073 yes:)
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3075 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3076 ac_tool_warned=yes ;;
3077 esac
3078 CC=$ac_ct_CC
3079 fi
3080 else
3081 CC="$ac_cv_prog_CC"
3082 fi
3083
3084 if test -z "$CC"; then
3085 if test -n "$ac_tool_prefix"; then
3086 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3087 set dummy ${ac_tool_prefix}cc; ac_word=$2
3088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3089 $as_echo_n "checking for $ac_word... " >&6; }
3090 if ${ac_cv_prog_CC+:} false; then :
3091 $as_echo_n "(cached) " >&6
3092 else
3093 if test -n "$CC"; then
3094 ac_cv_prog_CC="$CC" # Let the user override the test.
3095 else
3096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3097 for as_dir in $PATH
3098 do
3099 IFS=$as_save_IFS
3100 test -z "$as_dir" && as_dir=.
3101 for ac_exec_ext in '' $ac_executable_extensions; do
3102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3103 ac_cv_prog_CC="${ac_tool_prefix}cc"
3104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3105 break 2
3106 fi
3107 done
3108 done
3109 IFS=$as_save_IFS
3110
3111 fi
3112 fi
3113 CC=$ac_cv_prog_CC
3114 if test -n "$CC"; then
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3116 $as_echo "$CC" >&6; }
3117 else
3118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3119 $as_echo "no" >&6; }
3120 fi
3121
3122
3123 fi
3124 fi
3125 if test -z "$CC"; then
3126 # Extract the first word of "cc", so it can be a program name with args.
3127 set dummy cc; ac_word=$2
3128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3129 $as_echo_n "checking for $ac_word... " >&6; }
3130 if ${ac_cv_prog_CC+:} false; then :
3131 $as_echo_n "(cached) " >&6
3132 else
3133 if test -n "$CC"; then
3134 ac_cv_prog_CC="$CC" # Let the user override the test.
3135 else
3136 ac_prog_rejected=no
3137 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3138 for as_dir in $PATH
3139 do
3140 IFS=$as_save_IFS
3141 test -z "$as_dir" && as_dir=.
3142 for ac_exec_ext in '' $ac_executable_extensions; do
3143 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3144 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3145 ac_prog_rejected=yes
3146 continue
3147 fi
3148 ac_cv_prog_CC="cc"
3149 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3150 break 2
3151 fi
3152 done
3153 done
3154 IFS=$as_save_IFS
3155
3156 if test $ac_prog_rejected = yes; then
3157 # We found a bogon in the path, so make sure we never use it.
3158 set dummy $ac_cv_prog_CC
3159 shift
3160 if test $# != 0; then
3161 # We chose a different compiler from the bogus one.
3162 # However, it has the same basename, so the bogon will be chosen
3163 # first if we set CC to just the basename; use the full file name.
3164 shift
3165 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3166 fi
3167 fi
3168 fi
3169 fi
3170 CC=$ac_cv_prog_CC
3171 if test -n "$CC"; then
3172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3173 $as_echo "$CC" >&6; }
3174 else
3175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3176 $as_echo "no" >&6; }
3177 fi
3178
3179
3180 fi
3181 if test -z "$CC"; then
3182 if test -n "$ac_tool_prefix"; then
3183 for ac_prog in cl.exe
3184 do
3185 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3186 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3188 $as_echo_n "checking for $ac_word... " >&6; }
3189 if ${ac_cv_prog_CC+:} false; then :
3190 $as_echo_n "(cached) " >&6
3191 else
3192 if test -n "$CC"; then
3193 ac_cv_prog_CC="$CC" # Let the user override the test.
3194 else
3195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3196 for as_dir in $PATH
3197 do
3198 IFS=$as_save_IFS
3199 test -z "$as_dir" && as_dir=.
3200 for ac_exec_ext in '' $ac_executable_extensions; do
3201 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3202 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3203 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3204 break 2
3205 fi
3206 done
3207 done
3208 IFS=$as_save_IFS
3209
3210 fi
3211 fi
3212 CC=$ac_cv_prog_CC
3213 if test -n "$CC"; then
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3215 $as_echo "$CC" >&6; }
3216 else
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3218 $as_echo "no" >&6; }
3219 fi
3220
3221
3222 test -n "$CC" && break
3223 done
3224 fi
3225 if test -z "$CC"; then
3226 ac_ct_CC=$CC
3227 for ac_prog in cl.exe
3228 do
3229 # Extract the first word of "$ac_prog", so it can be a program name with args.
3230 set dummy $ac_prog; ac_word=$2
3231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3232 $as_echo_n "checking for $ac_word... " >&6; }
3233 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3234 $as_echo_n "(cached) " >&6
3235 else
3236 if test -n "$ac_ct_CC"; then
3237 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3238 else
3239 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3240 for as_dir in $PATH
3241 do
3242 IFS=$as_save_IFS
3243 test -z "$as_dir" && as_dir=.
3244 for ac_exec_ext in '' $ac_executable_extensions; do
3245 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3246 ac_cv_prog_ac_ct_CC="$ac_prog"
3247 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3248 break 2
3249 fi
3250 done
3251 done
3252 IFS=$as_save_IFS
3253
3254 fi
3255 fi
3256 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3257 if test -n "$ac_ct_CC"; then
3258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3259 $as_echo "$ac_ct_CC" >&6; }
3260 else
3261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3262 $as_echo "no" >&6; }
3263 fi
3264
3265
3266 test -n "$ac_ct_CC" && break
3267 done
3268
3269 if test "x$ac_ct_CC" = x; then
3270 CC=""
3271 else
3272 case $cross_compiling:$ac_tool_warned in
3273 yes:)
3274 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3275 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3276 ac_tool_warned=yes ;;
3277 esac
3278 CC=$ac_ct_CC
3279 fi
3280 fi
3281
3282 fi
3283
3284
3285 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3286 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3287 as_fn_error $? "no acceptable C compiler found in \$PATH
3288 See \`config.log' for more details" "$LINENO" 5; }
3289
3290 # Provide some information about the compiler.
3291 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3292 set X $ac_compile
3293 ac_compiler=$2
3294 for ac_option in --version -v -V -qversion; do
3295 { { ac_try="$ac_compiler $ac_option >&5"
3296 case "(($ac_try" in
3297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3298 *) ac_try_echo=$ac_try;;
3299 esac
3300 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3301 $as_echo "$ac_try_echo"; } >&5
3302 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3303 ac_status=$?
3304 if test -s conftest.err; then
3305 sed '10a\
3306 ... rest of stderr output deleted ...
3307 10q' conftest.err >conftest.er1
3308 cat conftest.er1 >&5
3309 fi
3310 rm -f conftest.er1 conftest.err
3311 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3312 test $ac_status = 0; }
3313 done
3314
3315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3316 /* end confdefs.h. */
3317
3318 int
3319 main ()
3320 {
3321
3322 ;
3323 return 0;
3324 }
3325 _ACEOF
3326 ac_clean_files_save=$ac_clean_files
3327 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3328 # Try to create an executable without -o first, disregard a.out.
3329 # It will help us diagnose broken compilers, and finding out an intuition
3330 # of exeext.
3331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3332 $as_echo_n "checking whether the C compiler works... " >&6; }
3333 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3334
3335 # The possible output files:
3336 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3337
3338 ac_rmfiles=
3339 for ac_file in $ac_files
3340 do
3341 case $ac_file in
3342 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3343 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3344 esac
3345 done
3346 rm -f $ac_rmfiles
3347
3348 if { { ac_try="$ac_link_default"
3349 case "(($ac_try" in
3350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3351 *) ac_try_echo=$ac_try;;
3352 esac
3353 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3354 $as_echo "$ac_try_echo"; } >&5
3355 (eval "$ac_link_default") 2>&5
3356 ac_status=$?
3357 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3358 test $ac_status = 0; }; then :
3359 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3360 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3361 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3362 # so that the user can short-circuit this test for compilers unknown to
3363 # Autoconf.
3364 for ac_file in $ac_files ''
3365 do
3366 test -f "$ac_file" || continue
3367 case $ac_file in
3368 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3369 ;;
3370 [ab].out )
3371 # We found the default executable, but exeext='' is most
3372 # certainly right.
3373 break;;
3374 *.* )
3375 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3376 then :; else
3377 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3378 fi
3379 # We set ac_cv_exeext here because the later test for it is not
3380 # safe: cross compilers may not add the suffix if given an `-o'
3381 # argument, so we may need to know it at that point already.
3382 # Even if this section looks crufty: it has the advantage of
3383 # actually working.
3384 break;;
3385 * )
3386 break;;
3387 esac
3388 done
3389 test "$ac_cv_exeext" = no && ac_cv_exeext=
3390
3391 else
3392 ac_file=''
3393 fi
3394 if test -z "$ac_file"; then :
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3396 $as_echo "no" >&6; }
3397 $as_echo "$as_me: failed program was:" >&5
3398 sed 's/^/| /' conftest.$ac_ext >&5
3399
3400 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3401 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3402 as_fn_error 77 "C compiler cannot create executables
3403 See \`config.log' for more details" "$LINENO" 5; }
3404 else
3405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3406 $as_echo "yes" >&6; }
3407 fi
3408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3409 $as_echo_n "checking for C compiler default output file name... " >&6; }
3410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3411 $as_echo "$ac_file" >&6; }
3412 ac_exeext=$ac_cv_exeext
3413
3414 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3415 ac_clean_files=$ac_clean_files_save
3416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3417 $as_echo_n "checking for suffix of executables... " >&6; }
3418 if { { ac_try="$ac_link"
3419 case "(($ac_try" in
3420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3421 *) ac_try_echo=$ac_try;;
3422 esac
3423 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3424 $as_echo "$ac_try_echo"; } >&5
3425 (eval "$ac_link") 2>&5
3426 ac_status=$?
3427 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3428 test $ac_status = 0; }; then :
3429 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3430 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3431 # work properly (i.e., refer to `conftest.exe'), while it won't with
3432 # `rm'.
3433 for ac_file in conftest.exe conftest conftest.*; do
3434 test -f "$ac_file" || continue
3435 case $ac_file in
3436 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3437 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3438 break;;
3439 * ) break;;
3440 esac
3441 done
3442 else
3443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3444 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3445 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3446 See \`config.log' for more details" "$LINENO" 5; }
3447 fi
3448 rm -f conftest conftest$ac_cv_exeext
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3450 $as_echo "$ac_cv_exeext" >&6; }
3451
3452 rm -f conftest.$ac_ext
3453 EXEEXT=$ac_cv_exeext
3454 ac_exeext=$EXEEXT
3455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3456 /* end confdefs.h. */
3457 #include <stdio.h>
3458 int
3459 main ()
3460 {
3461 FILE *f = fopen ("conftest.out", "w");
3462 return ferror (f) || fclose (f) != 0;
3463
3464 ;
3465 return 0;
3466 }
3467 _ACEOF
3468 ac_clean_files="$ac_clean_files conftest.out"
3469 # Check that the compiler produces executables we can run. If not, either
3470 # the compiler is broken, or we cross compile.
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3472 $as_echo_n "checking whether we are cross compiling... " >&6; }
3473 if test "$cross_compiling" != yes; then
3474 { { ac_try="$ac_link"
3475 case "(($ac_try" in
3476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3477 *) ac_try_echo=$ac_try;;
3478 esac
3479 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3480 $as_echo "$ac_try_echo"; } >&5
3481 (eval "$ac_link") 2>&5
3482 ac_status=$?
3483 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3484 test $ac_status = 0; }
3485 if { ac_try='./conftest$ac_cv_exeext'
3486 { { case "(($ac_try" in
3487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3488 *) ac_try_echo=$ac_try;;
3489 esac
3490 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3491 $as_echo "$ac_try_echo"; } >&5
3492 (eval "$ac_try") 2>&5
3493 ac_status=$?
3494 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3495 test $ac_status = 0; }; }; then
3496 cross_compiling=no
3497 else
3498 if test "$cross_compiling" = maybe; then
3499 cross_compiling=yes
3500 else
3501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3502 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3503 as_fn_error $? "cannot run C compiled programs.
3504 If you meant to cross compile, use \`--host'.
3505 See \`config.log' for more details" "$LINENO" 5; }
3506 fi
3507 fi
3508 fi
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3510 $as_echo "$cross_compiling" >&6; }
3511
3512 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3513 ac_clean_files=$ac_clean_files_save
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3515 $as_echo_n "checking for suffix of object files... " >&6; }
3516 if ${ac_cv_objext+:} false; then :
3517 $as_echo_n "(cached) " >&6
3518 else
3519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3520 /* end confdefs.h. */
3521
3522 int
3523 main ()
3524 {
3525
3526 ;
3527 return 0;
3528 }
3529 _ACEOF
3530 rm -f conftest.o conftest.obj
3531 if { { ac_try="$ac_compile"
3532 case "(($ac_try" in
3533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3534 *) ac_try_echo=$ac_try;;
3535 esac
3536 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3537 $as_echo "$ac_try_echo"; } >&5
3538 (eval "$ac_compile") 2>&5
3539 ac_status=$?
3540 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3541 test $ac_status = 0; }; then :
3542 for ac_file in conftest.o conftest.obj conftest.*; do
3543 test -f "$ac_file" || continue;
3544 case $ac_file in
3545 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3546 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3547 break;;
3548 esac
3549 done
3550 else
3551 $as_echo "$as_me: failed program was:" >&5
3552 sed 's/^/| /' conftest.$ac_ext >&5
3553
3554 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3555 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3556 as_fn_error $? "cannot compute suffix of object files: cannot compile
3557 See \`config.log' for more details" "$LINENO" 5; }
3558 fi
3559 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3560 fi
3561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3562 $as_echo "$ac_cv_objext" >&6; }
3563 OBJEXT=$ac_cv_objext
3564 ac_objext=$OBJEXT
3565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3566 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3567 if ${ac_cv_c_compiler_gnu+:} false; then :
3568 $as_echo_n "(cached) " >&6
3569 else
3570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3571 /* end confdefs.h. */
3572
3573 int
3574 main ()
3575 {
3576 #ifndef __GNUC__
3577 choke me
3578 #endif
3579
3580 ;
3581 return 0;
3582 }
3583 _ACEOF
3584 if ac_fn_c_try_compile "$LINENO"; then :
3585 ac_compiler_gnu=yes
3586 else
3587 ac_compiler_gnu=no
3588 fi
3589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3590 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3591
3592 fi
3593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3594 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3595 if test $ac_compiler_gnu = yes; then
3596 GCC=yes
3597 else
3598 GCC=
3599 fi
3600 ac_test_CFLAGS=${CFLAGS+set}
3601 ac_save_CFLAGS=$CFLAGS
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3603 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3604 if ${ac_cv_prog_cc_g+:} false; then :
3605 $as_echo_n "(cached) " >&6
3606 else
3607 ac_save_c_werror_flag=$ac_c_werror_flag
3608 ac_c_werror_flag=yes
3609 ac_cv_prog_cc_g=no
3610 CFLAGS="-g"
3611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3612 /* end confdefs.h. */
3613
3614 int
3615 main ()
3616 {
3617
3618 ;
3619 return 0;
3620 }
3621 _ACEOF
3622 if ac_fn_c_try_compile "$LINENO"; then :
3623 ac_cv_prog_cc_g=yes
3624 else
3625 CFLAGS=""
3626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3627 /* end confdefs.h. */
3628
3629 int
3630 main ()
3631 {
3632
3633 ;
3634 return 0;
3635 }
3636 _ACEOF
3637 if ac_fn_c_try_compile "$LINENO"; then :
3638
3639 else
3640 ac_c_werror_flag=$ac_save_c_werror_flag
3641 CFLAGS="-g"
3642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3643 /* end confdefs.h. */
3644
3645 int
3646 main ()
3647 {
3648
3649 ;
3650 return 0;
3651 }
3652 _ACEOF
3653 if ac_fn_c_try_compile "$LINENO"; then :
3654 ac_cv_prog_cc_g=yes
3655 fi
3656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3657 fi
3658 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3659 fi
3660 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3661 ac_c_werror_flag=$ac_save_c_werror_flag
3662 fi
3663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3664 $as_echo "$ac_cv_prog_cc_g" >&6; }
3665 if test "$ac_test_CFLAGS" = set; then
3666 CFLAGS=$ac_save_CFLAGS
3667 elif test $ac_cv_prog_cc_g = yes; then
3668 if test "$GCC" = yes; then
3669 CFLAGS="-g -O2"
3670 else
3671 CFLAGS="-g"
3672 fi
3673 else
3674 if test "$GCC" = yes; then
3675 CFLAGS="-O2"
3676 else
3677 CFLAGS=
3678 fi
3679 fi
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3681 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3682 if ${ac_cv_prog_cc_c89+:} false; then :
3683 $as_echo_n "(cached) " >&6
3684 else
3685 ac_cv_prog_cc_c89=no
3686 ac_save_CC=$CC
3687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3688 /* end confdefs.h. */
3689 #include <stdarg.h>
3690 #include <stdio.h>
3691 struct stat;
3692 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3693 struct buf { int x; };
3694 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3695 static char *e (p, i)
3696 char **p;
3697 int i;
3698 {
3699 return p[i];
3700 }
3701 static char *f (char * (*g) (char **, int), char **p, ...)
3702 {
3703 char *s;
3704 va_list v;
3705 va_start (v,p);
3706 s = g (p, va_arg (v,int));
3707 va_end (v);
3708 return s;
3709 }
3710
3711 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3712 function prototypes and stuff, but not '\xHH' hex character constants.
3713 These don't provoke an error unfortunately, instead are silently treated
3714 as 'x'. The following induces an error, until -std is added to get
3715 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3716 array size at least. It's necessary to write '\x00'==0 to get something
3717 that's true only with -std. */
3718 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3719
3720 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3721 inside strings and character constants. */
3722 #define FOO(x) 'x'
3723 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3724
3725 int test (int i, double x);
3726 struct s1 {int (*f) (int a);};
3727 struct s2 {int (*f) (double a);};
3728 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3729 int argc;
3730 char **argv;
3731 int
3732 main ()
3733 {
3734 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3735 ;
3736 return 0;
3737 }
3738 _ACEOF
3739 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3740 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3741 do
3742 CC="$ac_save_CC $ac_arg"
3743 if ac_fn_c_try_compile "$LINENO"; then :
3744 ac_cv_prog_cc_c89=$ac_arg
3745 fi
3746 rm -f core conftest.err conftest.$ac_objext
3747 test "x$ac_cv_prog_cc_c89" != "xno" && break
3748 done
3749 rm -f conftest.$ac_ext
3750 CC=$ac_save_CC
3751
3752 fi
3753 # AC_CACHE_VAL
3754 case "x$ac_cv_prog_cc_c89" in
3755 x)
3756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3757 $as_echo "none needed" >&6; } ;;
3758 xno)
3759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3760 $as_echo "unsupported" >&6; } ;;
3761 *)
3762 CC="$CC $ac_cv_prog_cc_c89"
3763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3764 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3765 esac
3766 if test "x$ac_cv_prog_cc_c89" != xno; then :
3767
3768 fi
3769
3770 ac_ext=c
3771 ac_cpp='$CPP $CPPFLAGS'
3772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3775
3776 ac_ext=cpp
3777 ac_cpp='$CXXCPP $CPPFLAGS'
3778 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3779 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3780 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3781 if test -z "$CXX"; then
3782 if test -n "$CCC"; then
3783 CXX=$CCC
3784 else
3785 if test -n "$ac_tool_prefix"; then
3786 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3787 do
3788 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3789 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3791 $as_echo_n "checking for $ac_word... " >&6; }
3792 if ${ac_cv_prog_CXX+:} false; then :
3793 $as_echo_n "(cached) " >&6
3794 else
3795 if test -n "$CXX"; then
3796 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3797 else
3798 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3799 for as_dir in $PATH
3800 do
3801 IFS=$as_save_IFS
3802 test -z "$as_dir" && as_dir=.
3803 for ac_exec_ext in '' $ac_executable_extensions; do
3804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3805 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3807 break 2
3808 fi
3809 done
3810 done
3811 IFS=$as_save_IFS
3812
3813 fi
3814 fi
3815 CXX=$ac_cv_prog_CXX
3816 if test -n "$CXX"; then
3817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3818 $as_echo "$CXX" >&6; }
3819 else
3820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3821 $as_echo "no" >&6; }
3822 fi
3823
3824
3825 test -n "$CXX" && break
3826 done
3827 fi
3828 if test -z "$CXX"; then
3829 ac_ct_CXX=$CXX
3830 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3831 do
3832 # Extract the first word of "$ac_prog", so it can be a program name with args.
3833 set dummy $ac_prog; ac_word=$2
3834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3835 $as_echo_n "checking for $ac_word... " >&6; }
3836 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3837 $as_echo_n "(cached) " >&6
3838 else
3839 if test -n "$ac_ct_CXX"; then
3840 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3841 else
3842 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3843 for as_dir in $PATH
3844 do
3845 IFS=$as_save_IFS
3846 test -z "$as_dir" && as_dir=.
3847 for ac_exec_ext in '' $ac_executable_extensions; do
3848 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3849 ac_cv_prog_ac_ct_CXX="$ac_prog"
3850 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3851 break 2
3852 fi
3853 done
3854 done
3855 IFS=$as_save_IFS
3856
3857 fi
3858 fi
3859 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3860 if test -n "$ac_ct_CXX"; then
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3862 $as_echo "$ac_ct_CXX" >&6; }
3863 else
3864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3865 $as_echo "no" >&6; }
3866 fi
3867
3868
3869 test -n "$ac_ct_CXX" && break
3870 done
3871
3872 if test "x$ac_ct_CXX" = x; then
3873 CXX="g++"
3874 else
3875 case $cross_compiling:$ac_tool_warned in
3876 yes:)
3877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3878 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3879 ac_tool_warned=yes ;;
3880 esac
3881 CXX=$ac_ct_CXX
3882 fi
3883 fi
3884
3885 fi
3886 fi
3887 # Provide some information about the compiler.
3888 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3889 set X $ac_compile
3890 ac_compiler=$2
3891 for ac_option in --version -v -V -qversion; do
3892 { { ac_try="$ac_compiler $ac_option >&5"
3893 case "(($ac_try" in
3894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3895 *) ac_try_echo=$ac_try;;
3896 esac
3897 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3898 $as_echo "$ac_try_echo"; } >&5
3899 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3900 ac_status=$?
3901 if test -s conftest.err; then
3902 sed '10a\
3903 ... rest of stderr output deleted ...
3904 10q' conftest.err >conftest.er1
3905 cat conftest.er1 >&5
3906 fi
3907 rm -f conftest.er1 conftest.err
3908 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3909 test $ac_status = 0; }
3910 done
3911
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3913 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3914 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3915 $as_echo_n "(cached) " >&6
3916 else
3917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3918 /* end confdefs.h. */
3919
3920 int
3921 main ()
3922 {
3923 #ifndef __GNUC__
3924 choke me
3925 #endif
3926
3927 ;
3928 return 0;
3929 }
3930 _ACEOF
3931 if ac_fn_cxx_try_compile "$LINENO"; then :
3932 ac_compiler_gnu=yes
3933 else
3934 ac_compiler_gnu=no
3935 fi
3936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3937 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3938
3939 fi
3940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3941 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3942 if test $ac_compiler_gnu = yes; then
3943 GXX=yes
3944 else
3945 GXX=
3946 fi
3947 ac_test_CXXFLAGS=${CXXFLAGS+set}
3948 ac_save_CXXFLAGS=$CXXFLAGS
3949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3950 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3951 if ${ac_cv_prog_cxx_g+:} false; then :
3952 $as_echo_n "(cached) " >&6
3953 else
3954 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3955 ac_cxx_werror_flag=yes
3956 ac_cv_prog_cxx_g=no
3957 CXXFLAGS="-g"
3958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3959 /* end confdefs.h. */
3960
3961 int
3962 main ()
3963 {
3964
3965 ;
3966 return 0;
3967 }
3968 _ACEOF
3969 if ac_fn_cxx_try_compile "$LINENO"; then :
3970 ac_cv_prog_cxx_g=yes
3971 else
3972 CXXFLAGS=""
3973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3974 /* end confdefs.h. */
3975
3976 int
3977 main ()
3978 {
3979
3980 ;
3981 return 0;
3982 }
3983 _ACEOF
3984 if ac_fn_cxx_try_compile "$LINENO"; then :
3985
3986 else
3987 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3988 CXXFLAGS="-g"
3989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3990 /* end confdefs.h. */
3991
3992 int
3993 main ()
3994 {
3995
3996 ;
3997 return 0;
3998 }
3999 _ACEOF
4000 if ac_fn_cxx_try_compile "$LINENO"; then :
4001 ac_cv_prog_cxx_g=yes
4002 fi
4003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4004 fi
4005 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4006 fi
4007 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4008 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4009 fi
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4011 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4012 if test "$ac_test_CXXFLAGS" = set; then
4013 CXXFLAGS=$ac_save_CXXFLAGS
4014 elif test $ac_cv_prog_cxx_g = yes; then
4015 if test "$GXX" = yes; then
4016 CXXFLAGS="-g -O2"
4017 else
4018 CXXFLAGS="-g"
4019 fi
4020 else
4021 if test "$GXX" = yes; then
4022 CXXFLAGS="-O2"
4023 else
4024 CXXFLAGS=
4025 fi
4026 fi
4027 ac_ext=c
4028 ac_cpp='$CPP $CPPFLAGS'
4029 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4030 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4031 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4032
4033
4034
4035 ac_ext=c
4036 ac_cpp='$CPP $CPPFLAGS'
4037 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4038 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4039 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4041 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4042 # On Suns, sometimes $CPP names a directory.
4043 if test -n "$CPP" && test -d "$CPP"; then
4044 CPP=
4045 fi
4046 if test -z "$CPP"; then
4047 if ${ac_cv_prog_CPP+:} false; then :
4048 $as_echo_n "(cached) " >&6
4049 else
4050 # Double quotes because CPP needs to be expanded
4051 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4052 do
4053 ac_preproc_ok=false
4054 for ac_c_preproc_warn_flag in '' yes
4055 do
4056 # Use a header file that comes with gcc, so configuring glibc
4057 # with a fresh cross-compiler works.
4058 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4059 # <limits.h> exists even on freestanding compilers.
4060 # On the NeXT, cc -E runs the code through the compiler's parser,
4061 # not just through cpp. "Syntax error" is here to catch this case.
4062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4063 /* end confdefs.h. */
4064 #ifdef __STDC__
4065 # include <limits.h>
4066 #else
4067 # include <assert.h>
4068 #endif
4069 Syntax error
4070 _ACEOF
4071 if ac_fn_c_try_cpp "$LINENO"; then :
4072
4073 else
4074 # Broken: fails on valid input.
4075 continue
4076 fi
4077 rm -f conftest.err conftest.i conftest.$ac_ext
4078
4079 # OK, works on sane cases. Now check whether nonexistent headers
4080 # can be detected and how.
4081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4082 /* end confdefs.h. */
4083 #include <ac_nonexistent.h>
4084 _ACEOF
4085 if ac_fn_c_try_cpp "$LINENO"; then :
4086 # Broken: success on invalid input.
4087 continue
4088 else
4089 # Passes both tests.
4090 ac_preproc_ok=:
4091 break
4092 fi
4093 rm -f conftest.err conftest.i conftest.$ac_ext
4094
4095 done
4096 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4097 rm -f conftest.i conftest.err conftest.$ac_ext
4098 if $ac_preproc_ok; then :
4099 break
4100 fi
4101
4102 done
4103 ac_cv_prog_CPP=$CPP
4104
4105 fi
4106 CPP=$ac_cv_prog_CPP
4107 else
4108 ac_cv_prog_CPP=$CPP
4109 fi
4110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4111 $as_echo "$CPP" >&6; }
4112 ac_preproc_ok=false
4113 for ac_c_preproc_warn_flag in '' yes
4114 do
4115 # Use a header file that comes with gcc, so configuring glibc
4116 # with a fresh cross-compiler works.
4117 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4118 # <limits.h> exists even on freestanding compilers.
4119 # On the NeXT, cc -E runs the code through the compiler's parser,
4120 # not just through cpp. "Syntax error" is here to catch this case.
4121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4122 /* end confdefs.h. */
4123 #ifdef __STDC__
4124 # include <limits.h>
4125 #else
4126 # include <assert.h>
4127 #endif
4128 Syntax error
4129 _ACEOF
4130 if ac_fn_c_try_cpp "$LINENO"; then :
4131
4132 else
4133 # Broken: fails on valid input.
4134 continue
4135 fi
4136 rm -f conftest.err conftest.i conftest.$ac_ext
4137
4138 # OK, works on sane cases. Now check whether nonexistent headers
4139 # can be detected and how.
4140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4141 /* end confdefs.h. */
4142 #include <ac_nonexistent.h>
4143 _ACEOF
4144 if ac_fn_c_try_cpp "$LINENO"; then :
4145 # Broken: success on invalid input.
4146 continue
4147 else
4148 # Passes both tests.
4149 ac_preproc_ok=:
4150 break
4151 fi
4152 rm -f conftest.err conftest.i conftest.$ac_ext
4153
4154 done
4155 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4156 rm -f conftest.i conftest.err conftest.$ac_ext
4157 if $ac_preproc_ok; then :
4158
4159 else
4160 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4161 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4162 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4163 See \`config.log' for more details" "$LINENO" 5; }
4164 fi
4165
4166 ac_ext=c
4167 ac_cpp='$CPP $CPPFLAGS'
4168 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4169 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4171
4172
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4174 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4175 if ${ac_cv_path_GREP+:} false; then :
4176 $as_echo_n "(cached) " >&6
4177 else
4178 if test -z "$GREP"; then
4179 ac_path_GREP_found=false
4180 # Loop through the user's path and test for each of PROGNAME-LIST
4181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4182 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4183 do
4184 IFS=$as_save_IFS
4185 test -z "$as_dir" && as_dir=.
4186 for ac_prog in grep ggrep; do
4187 for ac_exec_ext in '' $ac_executable_extensions; do
4188 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4189 as_fn_executable_p "$ac_path_GREP" || continue
4190 # Check for GNU ac_path_GREP and select it if it is found.
4191 # Check for GNU $ac_path_GREP
4192 case `"$ac_path_GREP" --version 2>&1` in
4193 *GNU*)
4194 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4195 *)
4196 ac_count=0
4197 $as_echo_n 0123456789 >"conftest.in"
4198 while :
4199 do
4200 cat "conftest.in" "conftest.in" >"conftest.tmp"
4201 mv "conftest.tmp" "conftest.in"
4202 cp "conftest.in" "conftest.nl"
4203 $as_echo 'GREP' >> "conftest.nl"
4204 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4205 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4206 as_fn_arith $ac_count + 1 && ac_count=$as_val
4207 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4208 # Best one so far, save it but keep looking for a better one
4209 ac_cv_path_GREP="$ac_path_GREP"
4210 ac_path_GREP_max=$ac_count
4211 fi
4212 # 10*(2^10) chars as input seems more than enough
4213 test $ac_count -gt 10 && break
4214 done
4215 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4216 esac
4217
4218 $ac_path_GREP_found && break 3
4219 done
4220 done
4221 done
4222 IFS=$as_save_IFS
4223 if test -z "$ac_cv_path_GREP"; then
4224 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4225 fi
4226 else
4227 ac_cv_path_GREP=$GREP
4228 fi
4229
4230 fi
4231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4232 $as_echo "$ac_cv_path_GREP" >&6; }
4233 GREP="$ac_cv_path_GREP"
4234
4235
4236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4237 $as_echo_n "checking for egrep... " >&6; }
4238 if ${ac_cv_path_EGREP+:} false; then :
4239 $as_echo_n "(cached) " >&6
4240 else
4241 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4242 then ac_cv_path_EGREP="$GREP -E"
4243 else
4244 if test -z "$EGREP"; then
4245 ac_path_EGREP_found=false
4246 # Loop through the user's path and test for each of PROGNAME-LIST
4247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4248 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4249 do
4250 IFS=$as_save_IFS
4251 test -z "$as_dir" && as_dir=.
4252 for ac_prog in egrep; do
4253 for ac_exec_ext in '' $ac_executable_extensions; do
4254 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4255 as_fn_executable_p "$ac_path_EGREP" || continue
4256 # Check for GNU ac_path_EGREP and select it if it is found.
4257 # Check for GNU $ac_path_EGREP
4258 case `"$ac_path_EGREP" --version 2>&1` in
4259 *GNU*)
4260 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4261 *)
4262 ac_count=0
4263 $as_echo_n 0123456789 >"conftest.in"
4264 while :
4265 do
4266 cat "conftest.in" "conftest.in" >"conftest.tmp"
4267 mv "conftest.tmp" "conftest.in"
4268 cp "conftest.in" "conftest.nl"
4269 $as_echo 'EGREP' >> "conftest.nl"
4270 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4271 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4272 as_fn_arith $ac_count + 1 && ac_count=$as_val
4273 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4274 # Best one so far, save it but keep looking for a better one
4275 ac_cv_path_EGREP="$ac_path_EGREP"
4276 ac_path_EGREP_max=$ac_count
4277 fi
4278 # 10*(2^10) chars as input seems more than enough
4279 test $ac_count -gt 10 && break
4280 done
4281 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4282 esac
4283
4284 $ac_path_EGREP_found && break 3
4285 done
4286 done
4287 done
4288 IFS=$as_save_IFS
4289 if test -z "$ac_cv_path_EGREP"; then
4290 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4291 fi
4292 else
4293 ac_cv_path_EGREP=$EGREP
4294 fi
4295
4296 fi
4297 fi
4298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4299 $as_echo "$ac_cv_path_EGREP" >&6; }
4300 EGREP="$ac_cv_path_EGREP"
4301
4302
4303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4304 $as_echo_n "checking for ANSI C header files... " >&6; }
4305 if ${ac_cv_header_stdc+:} false; then :
4306 $as_echo_n "(cached) " >&6
4307 else
4308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4309 /* end confdefs.h. */
4310 #include <stdlib.h>
4311 #include <stdarg.h>
4312 #include <string.h>
4313 #include <float.h>
4314
4315 int
4316 main ()
4317 {
4318
4319 ;
4320 return 0;
4321 }
4322 _ACEOF
4323 if ac_fn_c_try_compile "$LINENO"; then :
4324 ac_cv_header_stdc=yes
4325 else
4326 ac_cv_header_stdc=no
4327 fi
4328 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4329
4330 if test $ac_cv_header_stdc = yes; then
4331 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4333 /* end confdefs.h. */
4334 #include <string.h>
4335
4336 _ACEOF
4337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4338 $EGREP "memchr" >/dev/null 2>&1; then :
4339
4340 else
4341 ac_cv_header_stdc=no
4342 fi
4343 rm -f conftest*
4344
4345 fi
4346
4347 if test $ac_cv_header_stdc = yes; then
4348 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350 /* end confdefs.h. */
4351 #include <stdlib.h>
4352
4353 _ACEOF
4354 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4355 $EGREP "free" >/dev/null 2>&1; then :
4356
4357 else
4358 ac_cv_header_stdc=no
4359 fi
4360 rm -f conftest*
4361
4362 fi
4363
4364 if test $ac_cv_header_stdc = yes; then
4365 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4366 if test "$cross_compiling" = yes; then :
4367 :
4368 else
4369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4370 /* end confdefs.h. */
4371 #include <ctype.h>
4372 #include <stdlib.h>
4373 #if ((' ' & 0x0FF) == 0x020)
4374 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4375 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4376 #else
4377 # define ISLOWER(c) \
4378 (('a' <= (c) && (c) <= 'i') \
4379 || ('j' <= (c) && (c) <= 'r') \
4380 || ('s' <= (c) && (c) <= 'z'))
4381 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4382 #endif
4383
4384 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4385 int
4386 main ()
4387 {
4388 int i;
4389 for (i = 0; i < 256; i++)
4390 if (XOR (islower (i), ISLOWER (i))
4391 || toupper (i) != TOUPPER (i))
4392 return 2;
4393 return 0;
4394 }
4395 _ACEOF
4396 if ac_fn_c_try_run "$LINENO"; then :
4397
4398 else
4399 ac_cv_header_stdc=no
4400 fi
4401 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4402 conftest.$ac_objext conftest.beam conftest.$ac_ext
4403 fi
4404
4405 fi
4406 fi
4407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4408 $as_echo "$ac_cv_header_stdc" >&6; }
4409 if test $ac_cv_header_stdc = yes; then
4410
4411 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4412
4413 fi
4414
4415 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4416 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4417 inttypes.h stdint.h unistd.h
4418 do :
4419 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4420 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4421 "
4422 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4423 cat >>confdefs.h <<_ACEOF
4424 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4425 _ACEOF
4426
4427 fi
4428
4429 done
4430
4431
4432
4433 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4434 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4435 MINIX=yes
4436 else
4437 MINIX=
4438 fi
4439
4440
4441 if test "$MINIX" = yes; then
4442
4443 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4444
4445
4446 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4447
4448
4449 $as_echo "#define _MINIX 1" >>confdefs.h
4450
4451 fi
4452
4453
4454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4455 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4456 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4457 $as_echo_n "(cached) " >&6
4458 else
4459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4460 /* end confdefs.h. */
4461
4462 # define __EXTENSIONS__ 1
4463 $ac_includes_default
4464 int
4465 main ()
4466 {
4467
4468 ;
4469 return 0;
4470 }
4471 _ACEOF
4472 if ac_fn_c_try_compile "$LINENO"; then :
4473 ac_cv_safe_to_define___extensions__=yes
4474 else
4475 ac_cv_safe_to_define___extensions__=no
4476 fi
4477 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4478 fi
4479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4480 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4481 test $ac_cv_safe_to_define___extensions__ = yes &&
4482 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4483
4484 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4485
4486 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4487
4488 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4489
4490 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4491
4492
4493 ac_aux_dir=
4494 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4495 if test -f "$ac_dir/install-sh"; then
4496 ac_aux_dir=$ac_dir
4497 ac_install_sh="$ac_aux_dir/install-sh -c"
4498 break
4499 elif test -f "$ac_dir/install.sh"; then
4500 ac_aux_dir=$ac_dir
4501 ac_install_sh="$ac_aux_dir/install.sh -c"
4502 break
4503 elif test -f "$ac_dir/shtool"; then
4504 ac_aux_dir=$ac_dir
4505 ac_install_sh="$ac_aux_dir/shtool install -c"
4506 break
4507 fi
4508 done
4509 if test -z "$ac_aux_dir"; then
4510 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4511 fi
4512
4513 # These three variables are undocumented and unsupported,
4514 # and are intended to be withdrawn in a future Autoconf release.
4515 # They can cause serious problems if a builder's source tree is in a directory
4516 # whose full name contains unusual characters.
4517 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4518 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4519 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4520
4521
4522 # Make sure we can run config.sub.
4523 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4524 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4525
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4527 $as_echo_n "checking build system type... " >&6; }
4528 if ${ac_cv_build+:} false; then :
4529 $as_echo_n "(cached) " >&6
4530 else
4531 ac_build_alias=$build_alias
4532 test "x$ac_build_alias" = x &&
4533 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4534 test "x$ac_build_alias" = x &&
4535 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4536 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4537 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4538
4539 fi
4540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4541 $as_echo "$ac_cv_build" >&6; }
4542 case $ac_cv_build in
4543 *-*-*) ;;
4544 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4545 esac
4546 build=$ac_cv_build
4547 ac_save_IFS=$IFS; IFS='-'
4548 set x $ac_cv_build
4549 shift
4550 build_cpu=$1
4551 build_vendor=$2
4552 shift; shift
4553 # Remember, the first character of IFS is used to create $*,
4554 # except with old shells:
4555 build_os=$*
4556 IFS=$ac_save_IFS
4557 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4558
4559
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4561 $as_echo_n "checking host system type... " >&6; }
4562 if ${ac_cv_host+:} false; then :
4563 $as_echo_n "(cached) " >&6
4564 else
4565 if test "x$host_alias" = x; then
4566 ac_cv_host=$ac_cv_build
4567 else
4568 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4569 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4570 fi
4571
4572 fi
4573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4574 $as_echo "$ac_cv_host" >&6; }
4575 case $ac_cv_host in
4576 *-*-*) ;;
4577 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4578 esac
4579 host=$ac_cv_host
4580 ac_save_IFS=$IFS; IFS='-'
4581 set x $ac_cv_host
4582 shift
4583 host_cpu=$1
4584 host_vendor=$2
4585 shift; shift
4586 # Remember, the first character of IFS is used to create $*,
4587 # except with old shells:
4588 host_os=$*
4589 IFS=$ac_save_IFS
4590 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4591
4592
4593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4594 $as_echo_n "checking target system type... " >&6; }
4595 if ${ac_cv_target+:} false; then :
4596 $as_echo_n "(cached) " >&6
4597 else
4598 if test "x$target_alias" = x; then
4599 ac_cv_target=$ac_cv_host
4600 else
4601 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4602 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4603 fi
4604
4605 fi
4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4607 $as_echo "$ac_cv_target" >&6; }
4608 case $ac_cv_target in
4609 *-*-*) ;;
4610 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4611 esac
4612 target=$ac_cv_target
4613 ac_save_IFS=$IFS; IFS='-'
4614 set x $ac_cv_target
4615 shift
4616 target_cpu=$1
4617 target_vendor=$2
4618 shift; shift
4619 # Remember, the first character of IFS is used to create $*,
4620 # except with old shells:
4621 target_os=$*
4622 IFS=$ac_save_IFS
4623 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4624
4625
4626 # The aliases save the names the user supplied, while $host etc.
4627 # will get canonicalized.
4628 test -n "$target_alias" &&
4629 test "$program_prefix$program_suffix$program_transform_name" = \
4630 NONENONEs,x,x, &&
4631 program_prefix=${target_alias}-
4632
4633 # The tests for host and target for $enable_largefile require
4634 # canonical names.
4635
4636
4637
4638 # As the $enable_largefile decision depends on --enable-plugins we must set it
4639 # even in directories otherwise not depending on the $plugins option.
4640
4641
4642 maybe_plugins=no
4643 for ac_header in dlfcn.h
4644 do :
4645 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4646 "
4647 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4648 cat >>confdefs.h <<_ACEOF
4649 #define HAVE_DLFCN_H 1
4650 _ACEOF
4651 maybe_plugins=yes
4652 fi
4653
4654 done
4655
4656 for ac_header in windows.h
4657 do :
4658 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4659 "
4660 if test "x$ac_cv_header_windows_h" = xyes; then :
4661 cat >>confdefs.h <<_ACEOF
4662 #define HAVE_WINDOWS_H 1
4663 _ACEOF
4664 maybe_plugins=yes
4665 fi
4666
4667 done
4668
4669
4670 # Check whether --enable-plugins was given.
4671 if test "${enable_plugins+set}" = set; then :
4672 enableval=$enable_plugins; case "${enableval}" in
4673 no) plugins=no ;;
4674 *) plugins=yes
4675 if test "$maybe_plugins" != "yes" ; then
4676 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4677 fi ;;
4678 esac
4679 else
4680 plugins=$maybe_plugins
4681
4682 fi
4683
4684 if test "$plugins" = "yes"; then
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4686 $as_echo_n "checking for library containing dlsym... " >&6; }
4687 if ${ac_cv_search_dlsym+:} false; then :
4688 $as_echo_n "(cached) " >&6
4689 else
4690 ac_func_search_save_LIBS=$LIBS
4691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4692 /* end confdefs.h. */
4693
4694 /* Override any GCC internal prototype to avoid an error.
4695 Use char because int might match the return type of a GCC
4696 builtin and then its argument prototype would still apply. */
4697 #ifdef __cplusplus
4698 extern "C"
4699 #endif
4700 char dlsym ();
4701 int
4702 main ()
4703 {
4704 return dlsym ();
4705 ;
4706 return 0;
4707 }
4708 _ACEOF
4709 for ac_lib in '' dl; do
4710 if test -z "$ac_lib"; then
4711 ac_res="none required"
4712 else
4713 ac_res=-l$ac_lib
4714 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4715 fi
4716 if ac_fn_c_try_link "$LINENO"; then :
4717 ac_cv_search_dlsym=$ac_res
4718 fi
4719 rm -f core conftest.err conftest.$ac_objext \
4720 conftest$ac_exeext
4721 if ${ac_cv_search_dlsym+:} false; then :
4722 break
4723 fi
4724 done
4725 if ${ac_cv_search_dlsym+:} false; then :
4726
4727 else
4728 ac_cv_search_dlsym=no
4729 fi
4730 rm conftest.$ac_ext
4731 LIBS=$ac_func_search_save_LIBS
4732 fi
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4734 $as_echo "$ac_cv_search_dlsym" >&6; }
4735 ac_res=$ac_cv_search_dlsym
4736 if test "$ac_res" != no; then :
4737 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4738
4739 fi
4740
4741 fi
4742
4743
4744 case "${host}" in
4745 sparc-*-solaris*|i[3-7]86-*-solaris*)
4746 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4747 # are mutually exclusive; and without procfs support, the bfd/ elf module
4748 # cannot provide certain routines such as elfcore_write_prpsinfo
4749 # or elfcore_write_prstatus. So unless the user explicitly requested
4750 # large-file support through the --enable-largefile switch, disable
4751 # large-file support in favor of procfs support.
4752 test "${target}" = "${host}" -a "x$plugins" = xno \
4753 && : ${enable_largefile="no"}
4754 ;;
4755 esac
4756
4757 # Check whether --enable-largefile was given.
4758 if test "${enable_largefile+set}" = set; then :
4759 enableval=$enable_largefile;
4760 fi
4761
4762 if test "$enable_largefile" != no; then
4763
4764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4765 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4766 if ${ac_cv_sys_largefile_CC+:} false; then :
4767 $as_echo_n "(cached) " >&6
4768 else
4769 ac_cv_sys_largefile_CC=no
4770 if test "$GCC" != yes; then
4771 ac_save_CC=$CC
4772 while :; do
4773 # IRIX 6.2 and later do not support large files by default,
4774 # so use the C compiler's -n32 option if that helps.
4775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4776 /* end confdefs.h. */
4777 #include <sys/types.h>
4778 /* Check that off_t can represent 2**63 - 1 correctly.
4779 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4780 since some C++ compilers masquerading as C compilers
4781 incorrectly reject 9223372036854775807. */
4782 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4783 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4784 && LARGE_OFF_T % 2147483647 == 1)
4785 ? 1 : -1];
4786 int
4787 main ()
4788 {
4789
4790 ;
4791 return 0;
4792 }
4793 _ACEOF
4794 if ac_fn_c_try_compile "$LINENO"; then :
4795 break
4796 fi
4797 rm -f core conftest.err conftest.$ac_objext
4798 CC="$CC -n32"
4799 if ac_fn_c_try_compile "$LINENO"; then :
4800 ac_cv_sys_largefile_CC=' -n32'; break
4801 fi
4802 rm -f core conftest.err conftest.$ac_objext
4803 break
4804 done
4805 CC=$ac_save_CC
4806 rm -f conftest.$ac_ext
4807 fi
4808 fi
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4810 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4811 if test "$ac_cv_sys_largefile_CC" != no; then
4812 CC=$CC$ac_cv_sys_largefile_CC
4813 fi
4814
4815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4816 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4817 if ${ac_cv_sys_file_offset_bits+:} false; then :
4818 $as_echo_n "(cached) " >&6
4819 else
4820 while :; do
4821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4822 /* end confdefs.h. */
4823 #include <sys/types.h>
4824 /* Check that off_t can represent 2**63 - 1 correctly.
4825 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4826 since some C++ compilers masquerading as C compilers
4827 incorrectly reject 9223372036854775807. */
4828 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4829 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4830 && LARGE_OFF_T % 2147483647 == 1)
4831 ? 1 : -1];
4832 int
4833 main ()
4834 {
4835
4836 ;
4837 return 0;
4838 }
4839 _ACEOF
4840 if ac_fn_c_try_compile "$LINENO"; then :
4841 ac_cv_sys_file_offset_bits=no; break
4842 fi
4843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4845 /* end confdefs.h. */
4846 #define _FILE_OFFSET_BITS 64
4847 #include <sys/types.h>
4848 /* Check that off_t can represent 2**63 - 1 correctly.
4849 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4850 since some C++ compilers masquerading as C compilers
4851 incorrectly reject 9223372036854775807. */
4852 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4853 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4854 && LARGE_OFF_T % 2147483647 == 1)
4855 ? 1 : -1];
4856 int
4857 main ()
4858 {
4859
4860 ;
4861 return 0;
4862 }
4863 _ACEOF
4864 if ac_fn_c_try_compile "$LINENO"; then :
4865 ac_cv_sys_file_offset_bits=64; break
4866 fi
4867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4868 ac_cv_sys_file_offset_bits=unknown
4869 break
4870 done
4871 fi
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4873 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4874 case $ac_cv_sys_file_offset_bits in #(
4875 no | unknown) ;;
4876 *)
4877 cat >>confdefs.h <<_ACEOF
4878 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4879 _ACEOF
4880 ;;
4881 esac
4882 rm -rf conftest*
4883 if test $ac_cv_sys_file_offset_bits = unknown; then
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4885 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4886 if ${ac_cv_sys_large_files+:} 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_large_files=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 _LARGE_FILES 1
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_large_files=1; break
4935 fi
4936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4937 ac_cv_sys_large_files=unknown
4938 break
4939 done
4940 fi
4941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4942 $as_echo "$ac_cv_sys_large_files" >&6; }
4943 case $ac_cv_sys_large_files in #(
4944 no | unknown) ;;
4945 *)
4946 cat >>confdefs.h <<_ACEOF
4947 #define _LARGE_FILES $ac_cv_sys_large_files
4948 _ACEOF
4949 ;;
4950 esac
4951 rm -rf conftest*
4952 fi
4953
4954
4955 fi
4956
4957
4958
4959
4960
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4962 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4963 if ${am_cv_prog_cc_stdc+:} false; then :
4964 $as_echo_n "(cached) " >&6
4965 else
4966 am_cv_prog_cc_stdc=no
4967 ac_save_CC="$CC"
4968 # Don't try gcc -ansi; that turns off useful extensions and
4969 # breaks some systems' header files.
4970 # AIX -qlanglvl=ansi
4971 # Ultrix and OSF/1 -std1
4972 # HP-UX 10.20 and later -Ae
4973 # HP-UX older versions -Aa -D_HPUX_SOURCE
4974 # SVR4 -Xc -D__EXTENSIONS__
4975 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4976 do
4977 CC="$ac_save_CC $ac_arg"
4978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4979 /* end confdefs.h. */
4980 #include <stdarg.h>
4981 #include <stdio.h>
4982 #include <sys/types.h>
4983 #include <sys/stat.h>
4984 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4985 struct buf { int x; };
4986 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4987 static char *e (p, i)
4988 char **p;
4989 int i;
4990 {
4991 return p[i];
4992 }
4993 static char *f (char * (*g) (char **, int), char **p, ...)
4994 {
4995 char *s;
4996 va_list v;
4997 va_start (v,p);
4998 s = g (p, va_arg (v,int));
4999 va_end (v);
5000 return s;
5001 }
5002 int test (int i, double x);
5003 struct s1 {int (*f) (int a);};
5004 struct s2 {int (*f) (double a);};
5005 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5006 int argc;
5007 char **argv;
5008
5009 int
5010 main ()
5011 {
5012
5013 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5014
5015 ;
5016 return 0;
5017 }
5018 _ACEOF
5019 if ac_fn_c_try_compile "$LINENO"; then :
5020 am_cv_prog_cc_stdc="$ac_arg"; break
5021 fi
5022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5023 done
5024 CC="$ac_save_CC"
5025
5026 fi
5027
5028 if test -z "$am_cv_prog_cc_stdc"; then
5029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5030 $as_echo "none needed" >&6; }
5031 else
5032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5033 $as_echo "$am_cv_prog_cc_stdc" >&6; }
5034 fi
5035 case "x$am_cv_prog_cc_stdc" in
5036 x|xno) ;;
5037 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5038 esac
5039
5040 # Expand $ac_aux_dir to an absolute path.
5041 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5042
5043 if test x"${install_sh+set}" != xset; then
5044 case $am_aux_dir in
5045 *\ * | *\ *)
5046 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5047 *)
5048 install_sh="\${SHELL} $am_aux_dir/install-sh"
5049 esac
5050 fi
5051
5052 # Installed binaries are usually stripped using 'strip' when the user
5053 # run "make install-strip". However 'strip' might not be the right
5054 # tool to use in cross-compilation environments, therefore Automake
5055 # will honor the 'STRIP' environment variable to overrule this program.
5056 if test "$cross_compiling" != no; then
5057 if test -n "$ac_tool_prefix"; then
5058 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5059 set dummy ${ac_tool_prefix}strip; ac_word=$2
5060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5061 $as_echo_n "checking for $ac_word... " >&6; }
5062 if ${ac_cv_prog_STRIP+:} false; then :
5063 $as_echo_n "(cached) " >&6
5064 else
5065 if test -n "$STRIP"; then
5066 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5067 else
5068 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5069 for as_dir in $PATH
5070 do
5071 IFS=$as_save_IFS
5072 test -z "$as_dir" && as_dir=.
5073 for ac_exec_ext in '' $ac_executable_extensions; do
5074 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5075 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5076 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5077 break 2
5078 fi
5079 done
5080 done
5081 IFS=$as_save_IFS
5082
5083 fi
5084 fi
5085 STRIP=$ac_cv_prog_STRIP
5086 if test -n "$STRIP"; then
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5088 $as_echo "$STRIP" >&6; }
5089 else
5090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5091 $as_echo "no" >&6; }
5092 fi
5093
5094
5095 fi
5096 if test -z "$ac_cv_prog_STRIP"; then
5097 ac_ct_STRIP=$STRIP
5098 # Extract the first word of "strip", so it can be a program name with args.
5099 set dummy strip; ac_word=$2
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101 $as_echo_n "checking for $ac_word... " >&6; }
5102 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5103 $as_echo_n "(cached) " >&6
5104 else
5105 if test -n "$ac_ct_STRIP"; then
5106 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5107 else
5108 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5109 for as_dir in $PATH
5110 do
5111 IFS=$as_save_IFS
5112 test -z "$as_dir" && as_dir=.
5113 for ac_exec_ext in '' $ac_executable_extensions; do
5114 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5115 ac_cv_prog_ac_ct_STRIP="strip"
5116 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5117 break 2
5118 fi
5119 done
5120 done
5121 IFS=$as_save_IFS
5122
5123 fi
5124 fi
5125 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5126 if test -n "$ac_ct_STRIP"; then
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5128 $as_echo "$ac_ct_STRIP" >&6; }
5129 else
5130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5131 $as_echo "no" >&6; }
5132 fi
5133
5134 if test "x$ac_ct_STRIP" = x; then
5135 STRIP=":"
5136 else
5137 case $cross_compiling:$ac_tool_warned in
5138 yes:)
5139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5140 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5141 ac_tool_warned=yes ;;
5142 esac
5143 STRIP=$ac_ct_STRIP
5144 fi
5145 else
5146 STRIP="$ac_cv_prog_STRIP"
5147 fi
5148
5149 fi
5150 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5151
5152
5153 ac_aux_dir=
5154 for ac_dir in .. "$srcdir"/..; do
5155 if test -f "$ac_dir/install-sh"; then
5156 ac_aux_dir=$ac_dir
5157 ac_install_sh="$ac_aux_dir/install-sh -c"
5158 break
5159 elif test -f "$ac_dir/install.sh"; then
5160 ac_aux_dir=$ac_dir
5161 ac_install_sh="$ac_aux_dir/install.sh -c"
5162 break
5163 elif test -f "$ac_dir/shtool"; then
5164 ac_aux_dir=$ac_dir
5165 ac_install_sh="$ac_aux_dir/shtool install -c"
5166 break
5167 fi
5168 done
5169 if test -z "$ac_aux_dir"; then
5170 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5171 fi
5172
5173 # These three variables are undocumented and unsupported,
5174 # and are intended to be withdrawn in a future Autoconf release.
5175 # They can cause serious problems if a builder's source tree is in a directory
5176 # whose full name contains unusual characters.
5177 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5178 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5179 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5180
5181
5182
5183 test "$program_prefix" != NONE &&
5184 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5185 # Use a double $ so make ignores it.
5186 test "$program_suffix" != NONE &&
5187 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5188 # Double any \ or $.
5189 # By default was `s,x,x', remove it if useless.
5190 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5191 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5192
5193
5194 # We require a C++11 compiler. Check if one is available, and if
5195 # necessary, set CXX_DIALECT to some -std=xxx switch.
5196
5197 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5198 ac_ext=cpp
5199 ac_cpp='$CXXCPP $CPPFLAGS'
5200 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5201 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5202 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5203 CXX_DIALECT=""
5204 ac_success=no
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5206 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5207 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5208 $as_echo_n "(cached) " >&6
5209 else
5210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211 /* end confdefs.h. */
5212
5213
5214 // If the compiler admits that it is not ready for C++11, why torture it?
5215 // Hopefully, this will speed up the test.
5216
5217 #ifndef __cplusplus
5218
5219 #error "This is not a C++ compiler"
5220
5221 #elif __cplusplus < 201103L
5222
5223 #error "This is not a C++11 compiler"
5224
5225 #else
5226
5227 namespace cxx11
5228 {
5229
5230 namespace test_static_assert
5231 {
5232
5233 template <typename T>
5234 struct check
5235 {
5236 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5237 };
5238
5239 }
5240
5241 namespace test_final_override
5242 {
5243
5244 struct Base
5245 {
5246 virtual void f() {}
5247 };
5248
5249 struct Derived : public Base
5250 {
5251 virtual void f() override {}
5252 };
5253
5254 }
5255
5256 namespace test_double_right_angle_brackets
5257 {
5258
5259 template < typename T >
5260 struct check {};
5261
5262 typedef check<void> single_type;
5263 typedef check<check<void>> double_type;
5264 typedef check<check<check<void>>> triple_type;
5265 typedef check<check<check<check<void>>>> quadruple_type;
5266
5267 }
5268
5269 namespace test_decltype
5270 {
5271
5272 int
5273 f()
5274 {
5275 int a = 1;
5276 decltype(a) b = 2;
5277 return a + b;
5278 }
5279
5280 }
5281
5282 namespace test_type_deduction
5283 {
5284
5285 template < typename T1, typename T2 >
5286 struct is_same
5287 {
5288 static const bool value = false;
5289 };
5290
5291 template < typename T >
5292 struct is_same<T, T>
5293 {
5294 static const bool value = true;
5295 };
5296
5297 template < typename T1, typename T2 >
5298 auto
5299 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5300 {
5301 return a1 + a2;
5302 }
5303
5304 int
5305 test(const int c, volatile int v)
5306 {
5307 static_assert(is_same<int, decltype(0)>::value == true, "");
5308 static_assert(is_same<int, decltype(c)>::value == false, "");
5309 static_assert(is_same<int, decltype(v)>::value == false, "");
5310 auto ac = c;
5311 auto av = v;
5312 auto sumi = ac + av + 'x';
5313 auto sumf = ac + av + 1.0;
5314 static_assert(is_same<int, decltype(ac)>::value == true, "");
5315 static_assert(is_same<int, decltype(av)>::value == true, "");
5316 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5317 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5318 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5319 return (sumf > 0.0) ? sumi : add(c, v);
5320 }
5321
5322 }
5323
5324 namespace test_noexcept
5325 {
5326
5327 int f() { return 0; }
5328 int g() noexcept { return 0; }
5329
5330 static_assert(noexcept(f()) == false, "");
5331 static_assert(noexcept(g()) == true, "");
5332
5333 }
5334
5335 namespace test_constexpr
5336 {
5337
5338 template < typename CharT >
5339 unsigned long constexpr
5340 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5341 {
5342 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5343 }
5344
5345 template < typename CharT >
5346 unsigned long constexpr
5347 strlen_c(const CharT *const s) noexcept
5348 {
5349 return strlen_c_r(s, 0UL);
5350 }
5351
5352 static_assert(strlen_c("") == 0UL, "");
5353 static_assert(strlen_c("1") == 1UL, "");
5354 static_assert(strlen_c("example") == 7UL, "");
5355 static_assert(strlen_c("another\0example") == 7UL, "");
5356
5357 }
5358
5359 namespace test_rvalue_references
5360 {
5361
5362 template < int N >
5363 struct answer
5364 {
5365 static constexpr int value = N;
5366 };
5367
5368 answer<1> f(int&) { return answer<1>(); }
5369 answer<2> f(const int&) { return answer<2>(); }
5370 answer<3> f(int&&) { return answer<3>(); }
5371
5372 void
5373 test()
5374 {
5375 int i = 0;
5376 const int c = 0;
5377 static_assert(decltype(f(i))::value == 1, "");
5378 static_assert(decltype(f(c))::value == 2, "");
5379 static_assert(decltype(f(0))::value == 3, "");
5380 }
5381
5382 }
5383
5384 namespace test_uniform_initialization
5385 {
5386
5387 struct test
5388 {
5389 static const int zero {};
5390 static const int one {1};
5391 };
5392
5393 static_assert(test::zero == 0, "");
5394 static_assert(test::one == 1, "");
5395
5396 }
5397
5398 namespace test_lambdas
5399 {
5400
5401 void
5402 test1()
5403 {
5404 auto lambda1 = [](){};
5405 auto lambda2 = lambda1;
5406 lambda1();
5407 lambda2();
5408 }
5409
5410 int
5411 test2()
5412 {
5413 auto a = [](int i, int j){ return i + j; }(1, 2);
5414 auto b = []() -> int { return '0'; }();
5415 auto c = [=](){ return a + b; }();
5416 auto d = [&](){ return c; }();
5417 auto e = [a, &b](int x) mutable {
5418 const auto identity = [](int y){ return y; };
5419 for (auto i = 0; i < a; ++i)
5420 a += b--;
5421 return x + identity(a + b);
5422 }(0);
5423 return a + b + c + d + e;
5424 }
5425
5426 int
5427 test3()
5428 {
5429 const auto nullary = [](){ return 0; };
5430 const auto unary = [](int x){ return x; };
5431 using nullary_t = decltype(nullary);
5432 using unary_t = decltype(unary);
5433 const auto higher1st = [](nullary_t f){ return f(); };
5434 const auto higher2nd = [unary](nullary_t f1){
5435 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5436 };
5437 return higher1st(nullary) + higher2nd(nullary)(unary);
5438 }
5439
5440 }
5441
5442 namespace test_variadic_templates
5443 {
5444
5445 template <int...>
5446 struct sum;
5447
5448 template <int N0, int... N1toN>
5449 struct sum<N0, N1toN...>
5450 {
5451 static constexpr auto value = N0 + sum<N1toN...>::value;
5452 };
5453
5454 template <>
5455 struct sum<>
5456 {
5457 static constexpr auto value = 0;
5458 };
5459
5460 static_assert(sum<>::value == 0, "");
5461 static_assert(sum<1>::value == 1, "");
5462 static_assert(sum<23>::value == 23, "");
5463 static_assert(sum<1, 2>::value == 3, "");
5464 static_assert(sum<5, 5, 11>::value == 21, "");
5465 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5466
5467 }
5468
5469 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5470 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5471 // because of this.
5472 namespace test_template_alias_sfinae
5473 {
5474
5475 struct foo {};
5476
5477 template<typename T>
5478 using member = typename T::member_type;
5479
5480 template<typename T>
5481 void func(...) {}
5482
5483 template<typename T>
5484 void func(member<T>*) {}
5485
5486 void test();
5487
5488 void test() { func<foo>(0); }
5489
5490 }
5491
5492 } // namespace cxx11
5493
5494 #endif // __cplusplus >= 201103L
5495
5496
5497
5498 _ACEOF
5499 if ac_fn_cxx_try_compile "$LINENO"; then :
5500 ax_cv_cxx_compile_cxx11=yes
5501 else
5502 ax_cv_cxx_compile_cxx11=no
5503 fi
5504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5505 fi
5506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5507 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5508 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5509 ac_success=yes
5510 fi
5511
5512 if test x$ac_success = xno; then
5513 for alternative in ${ax_cxx_compile_alternatives}; do
5514 switch="-std=gnu++${alternative}"
5515 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5517 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5518 if eval \${$cachevar+:} false; then :
5519 $as_echo_n "(cached) " >&6
5520 else
5521 ac_save_CXX="$CXX"
5522 CXX="$CXX $switch"
5523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5524 /* end confdefs.h. */
5525
5526
5527 // If the compiler admits that it is not ready for C++11, why torture it?
5528 // Hopefully, this will speed up the test.
5529
5530 #ifndef __cplusplus
5531
5532 #error "This is not a C++ compiler"
5533
5534 #elif __cplusplus < 201103L
5535
5536 #error "This is not a C++11 compiler"
5537
5538 #else
5539
5540 namespace cxx11
5541 {
5542
5543 namespace test_static_assert
5544 {
5545
5546 template <typename T>
5547 struct check
5548 {
5549 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5550 };
5551
5552 }
5553
5554 namespace test_final_override
5555 {
5556
5557 struct Base
5558 {
5559 virtual void f() {}
5560 };
5561
5562 struct Derived : public Base
5563 {
5564 virtual void f() override {}
5565 };
5566
5567 }
5568
5569 namespace test_double_right_angle_brackets
5570 {
5571
5572 template < typename T >
5573 struct check {};
5574
5575 typedef check<void> single_type;
5576 typedef check<check<void>> double_type;
5577 typedef check<check<check<void>>> triple_type;
5578 typedef check<check<check<check<void>>>> quadruple_type;
5579
5580 }
5581
5582 namespace test_decltype
5583 {
5584
5585 int
5586 f()
5587 {
5588 int a = 1;
5589 decltype(a) b = 2;
5590 return a + b;
5591 }
5592
5593 }
5594
5595 namespace test_type_deduction
5596 {
5597
5598 template < typename T1, typename T2 >
5599 struct is_same
5600 {
5601 static const bool value = false;
5602 };
5603
5604 template < typename T >
5605 struct is_same<T, T>
5606 {
5607 static const bool value = true;
5608 };
5609
5610 template < typename T1, typename T2 >
5611 auto
5612 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5613 {
5614 return a1 + a2;
5615 }
5616
5617 int
5618 test(const int c, volatile int v)
5619 {
5620 static_assert(is_same<int, decltype(0)>::value == true, "");
5621 static_assert(is_same<int, decltype(c)>::value == false, "");
5622 static_assert(is_same<int, decltype(v)>::value == false, "");
5623 auto ac = c;
5624 auto av = v;
5625 auto sumi = ac + av + 'x';
5626 auto sumf = ac + av + 1.0;
5627 static_assert(is_same<int, decltype(ac)>::value == true, "");
5628 static_assert(is_same<int, decltype(av)>::value == true, "");
5629 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5630 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5631 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5632 return (sumf > 0.0) ? sumi : add(c, v);
5633 }
5634
5635 }
5636
5637 namespace test_noexcept
5638 {
5639
5640 int f() { return 0; }
5641 int g() noexcept { return 0; }
5642
5643 static_assert(noexcept(f()) == false, "");
5644 static_assert(noexcept(g()) == true, "");
5645
5646 }
5647
5648 namespace test_constexpr
5649 {
5650
5651 template < typename CharT >
5652 unsigned long constexpr
5653 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5654 {
5655 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5656 }
5657
5658 template < typename CharT >
5659 unsigned long constexpr
5660 strlen_c(const CharT *const s) noexcept
5661 {
5662 return strlen_c_r(s, 0UL);
5663 }
5664
5665 static_assert(strlen_c("") == 0UL, "");
5666 static_assert(strlen_c("1") == 1UL, "");
5667 static_assert(strlen_c("example") == 7UL, "");
5668 static_assert(strlen_c("another\0example") == 7UL, "");
5669
5670 }
5671
5672 namespace test_rvalue_references
5673 {
5674
5675 template < int N >
5676 struct answer
5677 {
5678 static constexpr int value = N;
5679 };
5680
5681 answer<1> f(int&) { return answer<1>(); }
5682 answer<2> f(const int&) { return answer<2>(); }
5683 answer<3> f(int&&) { return answer<3>(); }
5684
5685 void
5686 test()
5687 {
5688 int i = 0;
5689 const int c = 0;
5690 static_assert(decltype(f(i))::value == 1, "");
5691 static_assert(decltype(f(c))::value == 2, "");
5692 static_assert(decltype(f(0))::value == 3, "");
5693 }
5694
5695 }
5696
5697 namespace test_uniform_initialization
5698 {
5699
5700 struct test
5701 {
5702 static const int zero {};
5703 static const int one {1};
5704 };
5705
5706 static_assert(test::zero == 0, "");
5707 static_assert(test::one == 1, "");
5708
5709 }
5710
5711 namespace test_lambdas
5712 {
5713
5714 void
5715 test1()
5716 {
5717 auto lambda1 = [](){};
5718 auto lambda2 = lambda1;
5719 lambda1();
5720 lambda2();
5721 }
5722
5723 int
5724 test2()
5725 {
5726 auto a = [](int i, int j){ return i + j; }(1, 2);
5727 auto b = []() -> int { return '0'; }();
5728 auto c = [=](){ return a + b; }();
5729 auto d = [&](){ return c; }();
5730 auto e = [a, &b](int x) mutable {
5731 const auto identity = [](int y){ return y; };
5732 for (auto i = 0; i < a; ++i)
5733 a += b--;
5734 return x + identity(a + b);
5735 }(0);
5736 return a + b + c + d + e;
5737 }
5738
5739 int
5740 test3()
5741 {
5742 const auto nullary = [](){ return 0; };
5743 const auto unary = [](int x){ return x; };
5744 using nullary_t = decltype(nullary);
5745 using unary_t = decltype(unary);
5746 const auto higher1st = [](nullary_t f){ return f(); };
5747 const auto higher2nd = [unary](nullary_t f1){
5748 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5749 };
5750 return higher1st(nullary) + higher2nd(nullary)(unary);
5751 }
5752
5753 }
5754
5755 namespace test_variadic_templates
5756 {
5757
5758 template <int...>
5759 struct sum;
5760
5761 template <int N0, int... N1toN>
5762 struct sum<N0, N1toN...>
5763 {
5764 static constexpr auto value = N0 + sum<N1toN...>::value;
5765 };
5766
5767 template <>
5768 struct sum<>
5769 {
5770 static constexpr auto value = 0;
5771 };
5772
5773 static_assert(sum<>::value == 0, "");
5774 static_assert(sum<1>::value == 1, "");
5775 static_assert(sum<23>::value == 23, "");
5776 static_assert(sum<1, 2>::value == 3, "");
5777 static_assert(sum<5, 5, 11>::value == 21, "");
5778 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5779
5780 }
5781
5782 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5783 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5784 // because of this.
5785 namespace test_template_alias_sfinae
5786 {
5787
5788 struct foo {};
5789
5790 template<typename T>
5791 using member = typename T::member_type;
5792
5793 template<typename T>
5794 void func(...) {}
5795
5796 template<typename T>
5797 void func(member<T>*) {}
5798
5799 void test();
5800
5801 void test() { func<foo>(0); }
5802
5803 }
5804
5805 } // namespace cxx11
5806
5807 #endif // __cplusplus >= 201103L
5808
5809
5810
5811 _ACEOF
5812 if ac_fn_cxx_try_compile "$LINENO"; then :
5813 eval $cachevar=yes
5814 else
5815 eval $cachevar=no
5816 fi
5817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5818 CXX="$ac_save_CXX"
5819 fi
5820 eval ac_res=\$$cachevar
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5822 $as_echo "$ac_res" >&6; }
5823 if eval test x\$$cachevar = xyes; then
5824 CXX_DIALECT="$switch"
5825 ac_success=yes
5826 break
5827 fi
5828 done
5829 fi
5830
5831 if test x$ac_success = xno; then
5832 for alternative in ${ax_cxx_compile_alternatives}; do
5833 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5834 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5836 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5837 if eval \${$cachevar+:} false; then :
5838 $as_echo_n "(cached) " >&6
5839 else
5840 ac_save_CXX="$CXX"
5841 CXX="$CXX $switch"
5842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5843 /* end confdefs.h. */
5844
5845
5846 // If the compiler admits that it is not ready for C++11, why torture it?
5847 // Hopefully, this will speed up the test.
5848
5849 #ifndef __cplusplus
5850
5851 #error "This is not a C++ compiler"
5852
5853 #elif __cplusplus < 201103L
5854
5855 #error "This is not a C++11 compiler"
5856
5857 #else
5858
5859 namespace cxx11
5860 {
5861
5862 namespace test_static_assert
5863 {
5864
5865 template <typename T>
5866 struct check
5867 {
5868 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5869 };
5870
5871 }
5872
5873 namespace test_final_override
5874 {
5875
5876 struct Base
5877 {
5878 virtual void f() {}
5879 };
5880
5881 struct Derived : public Base
5882 {
5883 virtual void f() override {}
5884 };
5885
5886 }
5887
5888 namespace test_double_right_angle_brackets
5889 {
5890
5891 template < typename T >
5892 struct check {};
5893
5894 typedef check<void> single_type;
5895 typedef check<check<void>> double_type;
5896 typedef check<check<check<void>>> triple_type;
5897 typedef check<check<check<check<void>>>> quadruple_type;
5898
5899 }
5900
5901 namespace test_decltype
5902 {
5903
5904 int
5905 f()
5906 {
5907 int a = 1;
5908 decltype(a) b = 2;
5909 return a + b;
5910 }
5911
5912 }
5913
5914 namespace test_type_deduction
5915 {
5916
5917 template < typename T1, typename T2 >
5918 struct is_same
5919 {
5920 static const bool value = false;
5921 };
5922
5923 template < typename T >
5924 struct is_same<T, T>
5925 {
5926 static const bool value = true;
5927 };
5928
5929 template < typename T1, typename T2 >
5930 auto
5931 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5932 {
5933 return a1 + a2;
5934 }
5935
5936 int
5937 test(const int c, volatile int v)
5938 {
5939 static_assert(is_same<int, decltype(0)>::value == true, "");
5940 static_assert(is_same<int, decltype(c)>::value == false, "");
5941 static_assert(is_same<int, decltype(v)>::value == false, "");
5942 auto ac = c;
5943 auto av = v;
5944 auto sumi = ac + av + 'x';
5945 auto sumf = ac + av + 1.0;
5946 static_assert(is_same<int, decltype(ac)>::value == true, "");
5947 static_assert(is_same<int, decltype(av)>::value == true, "");
5948 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5949 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5950 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5951 return (sumf > 0.0) ? sumi : add(c, v);
5952 }
5953
5954 }
5955
5956 namespace test_noexcept
5957 {
5958
5959 int f() { return 0; }
5960 int g() noexcept { return 0; }
5961
5962 static_assert(noexcept(f()) == false, "");
5963 static_assert(noexcept(g()) == true, "");
5964
5965 }
5966
5967 namespace test_constexpr
5968 {
5969
5970 template < typename CharT >
5971 unsigned long constexpr
5972 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5973 {
5974 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5975 }
5976
5977 template < typename CharT >
5978 unsigned long constexpr
5979 strlen_c(const CharT *const s) noexcept
5980 {
5981 return strlen_c_r(s, 0UL);
5982 }
5983
5984 static_assert(strlen_c("") == 0UL, "");
5985 static_assert(strlen_c("1") == 1UL, "");
5986 static_assert(strlen_c("example") == 7UL, "");
5987 static_assert(strlen_c("another\0example") == 7UL, "");
5988
5989 }
5990
5991 namespace test_rvalue_references
5992 {
5993
5994 template < int N >
5995 struct answer
5996 {
5997 static constexpr int value = N;
5998 };
5999
6000 answer<1> f(int&) { return answer<1>(); }
6001 answer<2> f(const int&) { return answer<2>(); }
6002 answer<3> f(int&&) { return answer<3>(); }
6003
6004 void
6005 test()
6006 {
6007 int i = 0;
6008 const int c = 0;
6009 static_assert(decltype(f(i))::value == 1, "");
6010 static_assert(decltype(f(c))::value == 2, "");
6011 static_assert(decltype(f(0))::value == 3, "");
6012 }
6013
6014 }
6015
6016 namespace test_uniform_initialization
6017 {
6018
6019 struct test
6020 {
6021 static const int zero {};
6022 static const int one {1};
6023 };
6024
6025 static_assert(test::zero == 0, "");
6026 static_assert(test::one == 1, "");
6027
6028 }
6029
6030 namespace test_lambdas
6031 {
6032
6033 void
6034 test1()
6035 {
6036 auto lambda1 = [](){};
6037 auto lambda2 = lambda1;
6038 lambda1();
6039 lambda2();
6040 }
6041
6042 int
6043 test2()
6044 {
6045 auto a = [](int i, int j){ return i + j; }(1, 2);
6046 auto b = []() -> int { return '0'; }();
6047 auto c = [=](){ return a + b; }();
6048 auto d = [&](){ return c; }();
6049 auto e = [a, &b](int x) mutable {
6050 const auto identity = [](int y){ return y; };
6051 for (auto i = 0; i < a; ++i)
6052 a += b--;
6053 return x + identity(a + b);
6054 }(0);
6055 return a + b + c + d + e;
6056 }
6057
6058 int
6059 test3()
6060 {
6061 const auto nullary = [](){ return 0; };
6062 const auto unary = [](int x){ return x; };
6063 using nullary_t = decltype(nullary);
6064 using unary_t = decltype(unary);
6065 const auto higher1st = [](nullary_t f){ return f(); };
6066 const auto higher2nd = [unary](nullary_t f1){
6067 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6068 };
6069 return higher1st(nullary) + higher2nd(nullary)(unary);
6070 }
6071
6072 }
6073
6074 namespace test_variadic_templates
6075 {
6076
6077 template <int...>
6078 struct sum;
6079
6080 template <int N0, int... N1toN>
6081 struct sum<N0, N1toN...>
6082 {
6083 static constexpr auto value = N0 + sum<N1toN...>::value;
6084 };
6085
6086 template <>
6087 struct sum<>
6088 {
6089 static constexpr auto value = 0;
6090 };
6091
6092 static_assert(sum<>::value == 0, "");
6093 static_assert(sum<1>::value == 1, "");
6094 static_assert(sum<23>::value == 23, "");
6095 static_assert(sum<1, 2>::value == 3, "");
6096 static_assert(sum<5, 5, 11>::value == 21, "");
6097 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6098
6099 }
6100
6101 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6102 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6103 // because of this.
6104 namespace test_template_alias_sfinae
6105 {
6106
6107 struct foo {};
6108
6109 template<typename T>
6110 using member = typename T::member_type;
6111
6112 template<typename T>
6113 void func(...) {}
6114
6115 template<typename T>
6116 void func(member<T>*) {}
6117
6118 void test();
6119
6120 void test() { func<foo>(0); }
6121
6122 }
6123
6124 } // namespace cxx11
6125
6126 #endif // __cplusplus >= 201103L
6127
6128
6129
6130 _ACEOF
6131 if ac_fn_cxx_try_compile "$LINENO"; then :
6132 eval $cachevar=yes
6133 else
6134 eval $cachevar=no
6135 fi
6136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6137 CXX="$ac_save_CXX"
6138 fi
6139 eval ac_res=\$$cachevar
6140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6141 $as_echo "$ac_res" >&6; }
6142 if eval test x\$$cachevar = xyes; then
6143 CXX_DIALECT="$switch"
6144 ac_success=yes
6145 break
6146 fi
6147 done
6148 if test x$ac_success = xyes; then
6149 break
6150 fi
6151 done
6152 fi
6153 ac_ext=c
6154 ac_cpp='$CPP $CPPFLAGS'
6155 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6156 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6157 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6158
6159 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6160 if test x$ac_success = xno; then
6161 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6162 fi
6163 fi
6164 if test x$ac_success = xno; then
6165 HAVE_CXX11=0
6166 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6167 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6168 else
6169 HAVE_CXX11=1
6170
6171 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6172
6173 fi
6174
6175
6176
6177
6178 # Dependency checking.
6179 rm -rf .tst 2>/dev/null
6180 mkdir .tst 2>/dev/null
6181 if test -d .tst; then
6182 am__leading_dot=.
6183 else
6184 am__leading_dot=_
6185 fi
6186 rmdir .tst 2>/dev/null
6187
6188 DEPDIR="${am__leading_dot}deps"
6189
6190 ac_config_commands="$ac_config_commands depdir"
6191
6192
6193 depcc="$CC" am_compiler_list=
6194
6195 am_depcomp=$ac_aux_dir/depcomp
6196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6197 $as_echo_n "checking dependency style of $depcc... " >&6; }
6198 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6199 $as_echo_n "(cached) " >&6
6200 else
6201 if test -f "$am_depcomp"; then
6202 # We make a subdir and do the tests there. Otherwise we can end up
6203 # making bogus files that we don't know about and never remove. For
6204 # instance it was reported that on HP-UX the gcc test will end up
6205 # making a dummy file named `D' -- because `-MD' means `put the output
6206 # in D'.
6207 mkdir conftest.dir
6208 # Copy depcomp to subdir because otherwise we won't find it if we're
6209 # using a relative directory.
6210 cp "$am_depcomp" conftest.dir
6211 cd conftest.dir
6212 # We will build objects and dependencies in a subdirectory because
6213 # it helps to detect inapplicable dependency modes. For instance
6214 # both Tru64's cc and ICC support -MD to output dependencies as a
6215 # side effect of compilation, but ICC will put the dependencies in
6216 # the current directory while Tru64 will put them in the object
6217 # directory.
6218 mkdir sub
6219
6220 am_cv_CC_dependencies_compiler_type=none
6221 if test "$am_compiler_list" = ""; then
6222 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6223 fi
6224 for depmode in $am_compiler_list; do
6225 if test $depmode = none; then break; fi
6226
6227 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6228 # Setup a source with many dependencies, because some compilers
6229 # like to wrap large dependency lists on column 80 (with \), and
6230 # we should not choose a depcomp mode which is confused by this.
6231 #
6232 # We need to recreate these files for each test, as the compiler may
6233 # overwrite some of them when testing with obscure command lines.
6234 # This happens at least with the AIX C compiler.
6235 : > sub/conftest.c
6236 for i in 1 2 3 4 5 6; do
6237 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6238 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6239 # Solaris 8's {/usr,}/bin/sh.
6240 touch sub/conftst$i.h
6241 done
6242 echo "include sub/conftest.Po" > confmf
6243
6244 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6245 # mode. It turns out that the SunPro C++ compiler does not properly
6246 # handle `-M -o', and we need to detect this.
6247 depcmd="depmode=$depmode \
6248 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6249 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6250 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6251 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6252 if env $depcmd > conftest.err 2>&1 &&
6253 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6254 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6255 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6256 # icc doesn't choke on unknown options, it will just issue warnings
6257 # or remarks (even with -Werror). So we grep stderr for any message
6258 # that says an option was ignored or not supported.
6259 # When given -MP, icc 7.0 and 7.1 complain thusly:
6260 # icc: Command line warning: ignoring option '-M'; no argument required
6261 # The diagnosis changed in icc 8.0:
6262 # icc: Command line remark: option '-MP' not supported
6263 if (grep 'ignoring option' conftest.err ||
6264 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6265 am_cv_CC_dependencies_compiler_type=$depmode
6266 $as_echo "$as_me:$LINENO: success" >&5
6267 break
6268 fi
6269 fi
6270 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6271 sed -e 's/^/| /' < conftest.err >&5
6272 done
6273
6274 cd ..
6275 rm -rf conftest.dir
6276 else
6277 am_cv_CC_dependencies_compiler_type=none
6278 fi
6279
6280 fi
6281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6282 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6283 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6284 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6285 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6286
6287 fi
6288
6289
6290
6291 CONFIG_OBS=
6292 CONFIG_DEPS=
6293 CONFIG_SRCS=
6294 ENABLE_CFLAGS=
6295
6296 CONFIG_ALL=
6297 CONFIG_CLEAN=
6298 CONFIG_INSTALL=
6299 CONFIG_UNINSTALL=
6300
6301 # If we haven't got the data from the intl directory,
6302 # assume NLS is disabled.
6303 USE_NLS=no
6304 LIBINTL=
6305 LIBINTL_DEP=
6306 INCINTL=
6307 XGETTEXT=
6308 GMSGFMT=
6309 POSUB=
6310
6311 if test -f ../intl/config.intl; then
6312 . ../intl/config.intl
6313 fi
6314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6315 $as_echo_n "checking whether NLS is requested... " >&6; }
6316 if test x"$USE_NLS" != xyes; then
6317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6318 $as_echo "no" >&6; }
6319 else
6320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6321 $as_echo "yes" >&6; }
6322
6323 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6324
6325
6326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6327 $as_echo_n "checking for catalogs to be installed... " >&6; }
6328 # Look for .po and .gmo files in the source directory.
6329 CATALOGS=
6330 XLINGUAS=
6331 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6332 # If there aren't any .gmo files the shell will give us the
6333 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6334 # weeded out.
6335 case "$cat" in *\**)
6336 continue;;
6337 esac
6338 # The quadruple backslash is collapsed to a double backslash
6339 # by the backticks, then collapsed again by the double quotes,
6340 # leaving us with one backslash in the sed expression (right
6341 # before the dot that mustn't act as a wildcard).
6342 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6343 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6344 # The user is allowed to set LINGUAS to a list of languages to
6345 # install catalogs for. If it's empty that means "all of them."
6346 if test "x$LINGUAS" = x; then
6347 CATALOGS="$CATALOGS $cat"
6348 XLINGUAS="$XLINGUAS $lang"
6349 else
6350 case "$LINGUAS" in *$lang*)
6351 CATALOGS="$CATALOGS $cat"
6352 XLINGUAS="$XLINGUAS $lang"
6353 ;;
6354 esac
6355 fi
6356 done
6357 LINGUAS="$XLINGUAS"
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6359 $as_echo "$LINGUAS" >&6; }
6360
6361
6362 DATADIRNAME=share
6363
6364 INSTOBJEXT=.mo
6365
6366 GENCAT=gencat
6367
6368 CATOBJEXT=.gmo
6369
6370 fi
6371
6372 localedir='${datadir}/locale'
6373
6374
6375 if test x"$USE_NLS" = xyes; then
6376 CONFIG_ALL="$CONFIG_ALL all-po"
6377 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6378 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6379 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6380 fi
6381
6382 PACKAGE=gdb
6383
6384 cat >>confdefs.h <<_ACEOF
6385 #define PACKAGE "$PACKAGE"
6386 _ACEOF
6387
6388
6389
6390 # We never need to detect it in this sub-configure.
6391 # But preserve it for config.status --recheck.
6392
6393
6394
6395 MAKEINFO_EXTRA_FLAGS=""
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6397 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6398 if ${gdb_cv_have_makeinfo_click+:} false; then :
6399 $as_echo_n "(cached) " >&6
6400 else
6401 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6402 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6403 gdb_cv_have_makeinfo_click=yes
6404 else
6405 gdb_cv_have_makeinfo_click=no
6406 fi
6407 fi
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6409 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6410 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6411 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6412 fi
6413
6414
6415
6416
6417 # Check whether --with-separate-debug-dir was given.
6418 if test "${with_separate_debug_dir+set}" = set; then :
6419 withval=$with_separate_debug_dir;
6420 DEBUGDIR=$withval
6421 else
6422 DEBUGDIR=${libdir}/debug
6423 fi
6424
6425
6426 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6427 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6428 ac_define_dir=`eval echo $DEBUGDIR`
6429 ac_define_dir=`eval echo $ac_define_dir`
6430
6431 cat >>confdefs.h <<_ACEOF
6432 #define DEBUGDIR "$ac_define_dir"
6433 _ACEOF
6434
6435
6436
6437
6438 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6439 if test "x$prefix" = xNONE; then
6440 test_prefix=/usr/local
6441 else
6442 test_prefix=$prefix
6443 fi
6444 else
6445 test_prefix=$exec_prefix
6446 fi
6447 value=0
6448 case ${ac_define_dir} in
6449 "${test_prefix}"|"${test_prefix}/"*|\
6450 '${exec_prefix}'|'${exec_prefix}/'*)
6451 value=1
6452 ;;
6453 esac
6454
6455 cat >>confdefs.h <<_ACEOF
6456 #define DEBUGDIR_RELOCATABLE $value
6457 _ACEOF
6458
6459
6460
6461
6462 # We can't pass paths as command line arguments.
6463 # Mingw32 tries to be clever and will convert the paths for us.
6464 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6465 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6466 # This breaks GDB's relocatable path conversions since paths passed in
6467 # config.h would not get so translated, the path prefixes no longer match.
6468
6469 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6470 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6471 ac_define_dir=`eval echo $bindir`
6472 ac_define_dir=`eval echo $ac_define_dir`
6473
6474 cat >>confdefs.h <<_ACEOF
6475 #define BINDIR "$ac_define_dir"
6476 _ACEOF
6477
6478
6479
6480 # GDB's datadir relocation
6481
6482
6483
6484 # Check whether --with-gdb-datadir was given.
6485 if test "${with_gdb_datadir+set}" = set; then :
6486 withval=$with_gdb_datadir;
6487 GDB_DATADIR=$withval
6488 else
6489 GDB_DATADIR=${datadir}/gdb
6490 fi
6491
6492
6493 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6494 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6495 ac_define_dir=`eval echo $GDB_DATADIR`
6496 ac_define_dir=`eval echo $ac_define_dir`
6497
6498 cat >>confdefs.h <<_ACEOF
6499 #define GDB_DATADIR "$ac_define_dir"
6500 _ACEOF
6501
6502
6503
6504
6505 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6506 if test "x$prefix" = xNONE; then
6507 test_prefix=/usr/local
6508 else
6509 test_prefix=$prefix
6510 fi
6511 else
6512 test_prefix=$exec_prefix
6513 fi
6514 value=0
6515 case ${ac_define_dir} in
6516 "${test_prefix}"|"${test_prefix}/"*|\
6517 '${exec_prefix}'|'${exec_prefix}/'*)
6518 value=1
6519 ;;
6520 esac
6521
6522 cat >>confdefs.h <<_ACEOF
6523 #define GDB_DATADIR_RELOCATABLE $value
6524 _ACEOF
6525
6526
6527
6528
6529
6530 # Check whether --with-relocated-sources was given.
6531 if test "${with_relocated_sources+set}" = set; then :
6532 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6533
6534 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6535 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6536 ac_define_dir=`eval echo $reloc_srcdir`
6537 ac_define_dir=`eval echo $ac_define_dir`
6538
6539 cat >>confdefs.h <<_ACEOF
6540 #define RELOC_SRCDIR "$ac_define_dir"
6541 _ACEOF
6542
6543
6544
6545 fi
6546
6547
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6549 $as_echo_n "checking for default auto-load directory... " >&6; }
6550
6551 # Check whether --with-auto-load-dir was given.
6552 if test "${with_auto_load_dir+set}" = set; then :
6553 withval=$with_auto_load_dir;
6554 else
6555 with_auto_load_dir='$debugdir:$datadir/auto-load'
6556 fi
6557
6558 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6559
6560 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6561 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6562 ac_define_dir=`eval echo $escape_dir`
6563 ac_define_dir=`eval echo $ac_define_dir`
6564
6565 cat >>confdefs.h <<_ACEOF
6566 #define AUTO_LOAD_DIR "$ac_define_dir"
6567 _ACEOF
6568
6569
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6571 $as_echo "$with_auto_load_dir" >&6; }
6572
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6574 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6575
6576 # Check whether --with-auto-load-safe-path was given.
6577 if test "${with_auto_load_safe_path+set}" = set; then :
6578 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6579 with_auto_load_safe_path="/"
6580 fi
6581 else
6582 with_auto_load_safe_path="$with_auto_load_dir"
6583 fi
6584
6585 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6586
6587 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6588 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6589 ac_define_dir=`eval echo $escape_dir`
6590 ac_define_dir=`eval echo $ac_define_dir`
6591
6592 cat >>confdefs.h <<_ACEOF
6593 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6594 _ACEOF
6595
6596
6597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6598 $as_echo "$with_auto_load_safe_path" >&6; }
6599
6600
6601
6602 subdirs="$subdirs testsuite"
6603
6604
6605 # Check whether to support alternative target configurations
6606 # Check whether --enable-targets was given.
6607 if test "${enable_targets+set}" = set; then :
6608 enableval=$enable_targets; case "${enableval}" in
6609 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6610 ;;
6611 no) enable_targets= ;;
6612 *) enable_targets=$enableval ;;
6613 esac
6614 fi
6615
6616
6617 # Check whether to enable 64-bit support on 32-bit hosts
6618 # Check whether --enable-64-bit-bfd was given.
6619 if test "${enable_64_bit_bfd+set}" = set; then :
6620 enableval=$enable_64_bit_bfd; case "${enableval}" in
6621 yes) want64=true ;;
6622 no) want64=false ;;
6623 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6624 esac
6625 else
6626 want64=false
6627 fi
6628
6629 # Provide defaults for some variables set by the per-host and per-target
6630 # configuration.
6631 gdb_host_obs=posix-hdep.o
6632
6633 if test "${target}" = "${host}"; then
6634 gdb_native=yes
6635 else
6636 gdb_native=no
6637 fi
6638
6639 . $srcdir/configure.host
6640
6641 # Accumulate some settings from configure.tgt over all enabled targets
6642
6643 TARGET_OBS=
6644 all_targets=
6645 HAVE_NATIVE_GCORE_TARGET=
6646
6647 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6648 do
6649 if test "$targ_alias" = "all"; then
6650 all_targets=true
6651 else
6652 # Canonicalize the secondary target names.
6653 result=`$ac_config_sub $targ_alias 2>/dev/null`
6654 if test -n "$result"; then
6655 targ=$result
6656 else
6657 targ=$targ_alias
6658 fi
6659
6660 . ${srcdir}/configure.tgt
6661
6662 if test -z "${gdb_target_obs}"; then :
6663 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6664 fi
6665
6666 # Target-specific object files
6667 for i in ${gdb_target_obs}; do
6668 case " $TARGET_OBS " in
6669 *" ${i} "*) ;;
6670 *)
6671 TARGET_OBS="$TARGET_OBS ${i}"
6672 ;;
6673 esac
6674 done
6675
6676 # Check whether this target needs 64-bit CORE_ADDR
6677 if test x${want64} = xfalse; then
6678 . ${srcdir}/../bfd/config.bfd
6679 fi
6680
6681 # Check whether this target is native and supports gcore.
6682 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6683 && $gdb_have_gcore; then
6684 HAVE_NATIVE_GCORE_TARGET=1
6685 fi
6686 fi
6687 done
6688
6689 if test x${all_targets} = xtrue; then
6690
6691 # We want all 64-bit targets if we either:
6692 # - run on a 64-bit host or
6693 # - already require 64-bit support for some other target or
6694 # - the --enable-64-bit-bfd option was supplied
6695 # Otherwise we only support all 32-bit targets.
6696 #
6697 # NOTE: This test must be in sync with the corresponding
6698 # tests in BFD!
6699
6700 if test x${want64} = xfalse; then
6701 # The cast to long int works around a bug in the HP C Compiler
6702 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6703 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6704 # This bug is HP SR number 8606223364.
6705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6706 $as_echo_n "checking size of long... " >&6; }
6707 if ${ac_cv_sizeof_long+:} false; then :
6708 $as_echo_n "(cached) " >&6
6709 else
6710 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6711
6712 else
6713 if test "$ac_cv_type_long" = yes; then
6714 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6715 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6716 as_fn_error 77 "cannot compute sizeof (long)
6717 See \`config.log' for more details" "$LINENO" 5; }
6718 else
6719 ac_cv_sizeof_long=0
6720 fi
6721 fi
6722
6723 fi
6724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6725 $as_echo "$ac_cv_sizeof_long" >&6; }
6726
6727
6728
6729 cat >>confdefs.h <<_ACEOF
6730 #define SIZEOF_LONG $ac_cv_sizeof_long
6731 _ACEOF
6732
6733
6734 if test "x${ac_cv_sizeof_long}" = "x8"; then
6735 want64=true
6736 fi
6737 fi
6738 if test x${want64} = xtrue; then
6739 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6740 else
6741 TARGET_OBS='$(ALL_TARGET_OBS)'
6742 fi
6743 fi
6744
6745
6746
6747
6748 # For other settings, only the main target counts.
6749 gdb_sim=
6750 gdb_osabi=
6751 targ=$target; . ${srcdir}/configure.tgt
6752
6753 # Fetch the default architecture and default target vector from BFD.
6754 targ=$target; . $srcdir/../bfd/config.bfd
6755
6756 # We only want the first architecture, so strip off the others if
6757 # there is more than one.
6758 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6759
6760 if test "x$targ_archs" != x; then
6761
6762 cat >>confdefs.h <<_ACEOF
6763 #define DEFAULT_BFD_ARCH $targ_archs
6764 _ACEOF
6765
6766 fi
6767 if test "x$targ_defvec" != x; then
6768
6769 cat >>confdefs.h <<_ACEOF
6770 #define DEFAULT_BFD_VEC $targ_defvec
6771 _ACEOF
6772
6773 fi
6774
6775 # Enable MI.
6776 # Check whether --enable-gdbmi was given.
6777 if test "${enable_gdbmi+set}" = set; then :
6778 enableval=$enable_gdbmi; case $enableval in
6779 yes | no)
6780 ;;
6781 *)
6782 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6783 esac
6784 else
6785 enable_gdbmi=yes
6786 fi
6787
6788 if test x"$enable_gdbmi" = xyes; then
6789 if test -d "$srcdir/mi"; then
6790 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6791 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6792 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6793 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6794 fi
6795 fi
6796
6797 # Enable TUI.
6798 # Check whether --enable-tui was given.
6799 if test "${enable_tui+set}" = set; then :
6800 enableval=$enable_tui; case $enableval in
6801 yes | no | auto)
6802 ;;
6803 *)
6804 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6805 esac
6806 else
6807 enable_tui=auto
6808 fi
6809
6810
6811 # Enable gdbtk.
6812 # Check whether --enable-gdbtk was given.
6813 if test "${enable_gdbtk+set}" = set; then :
6814 enableval=$enable_gdbtk; case $enableval in
6815 yes | no)
6816 ;;
6817 *)
6818 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6819 esac
6820 else
6821 if test -d "$srcdir/gdbtk"; then
6822 enable_gdbtk=yes
6823 else
6824 enable_gdbtk=no
6825 fi
6826 fi
6827
6828 # We unconditionally disable gdbtk tests on selected platforms.
6829 case $host_os in
6830 go32* | windows*)
6831 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6832 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6833 enable_gdbtk=no ;;
6834 esac
6835
6836 # Libunwind support for ia64.
6837
6838
6839 # Check whether --with-libunwind-ia64 was given.
6840 if test "${with_libunwind_ia64+set}" = set; then :
6841 withval=$with_libunwind_ia64;
6842 else
6843 with_libunwind_ia64=auto
6844 fi
6845
6846
6847 # Backward compatibility option.
6848 if test "${with_libunwind+set}" = set; then
6849 if test x"$with_libunwind_ia64" != xauto; then
6850 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6851 fi
6852 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6853 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6854 with_libunwind_ia64="$with_libunwind"
6855 fi
6856
6857 case "$with_libunwind_ia64" in
6858 yes | no)
6859 ;;
6860 auto)
6861 for ac_header in libunwind-ia64.h
6862 do :
6863 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6864 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6865 cat >>confdefs.h <<_ACEOF
6866 #define HAVE_LIBUNWIND_IA64_H 1
6867 _ACEOF
6868
6869 fi
6870
6871 done
6872
6873 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6874 ;;
6875 *)
6876 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6877 ;;
6878 esac
6879
6880 if test x"$with_libunwind_ia64" = xyes; then
6881 for ac_header in libunwind-ia64.h
6882 do :
6883 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6884 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6885 cat >>confdefs.h <<_ACEOF
6886 #define HAVE_LIBUNWIND_IA64_H 1
6887 _ACEOF
6888
6889 fi
6890
6891 done
6892
6893 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6894 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6895 fi
6896 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6897 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6898 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6899 fi
6900
6901 opt_curses=no
6902
6903 # Check whether --with-curses was given.
6904 if test "${with_curses+set}" = set; then :
6905 withval=$with_curses; opt_curses=$withval
6906 fi
6907
6908
6909 prefer_curses=no
6910 if test "$opt_curses" = "yes"; then
6911 prefer_curses=yes
6912 fi
6913
6914 # Profiling support.
6915 # Check whether --enable-profiling was given.
6916 if test "${enable_profiling+set}" = set; then :
6917 enableval=$enable_profiling; case $enableval in
6918 yes | no)
6919 ;;
6920 *)
6921 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6922 esac
6923 else
6924 enable_profiling=no
6925 fi
6926
6927
6928 for ac_func in monstartup _mcleanup
6929 do :
6930 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6931 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6932 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6933 cat >>confdefs.h <<_ACEOF
6934 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6935 _ACEOF
6936
6937 fi
6938 done
6939
6940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6941 $as_echo_n "checking for _etext... " >&6; }
6942 if ${ac_cv_var__etext+:} false; then :
6943 $as_echo_n "(cached) " >&6
6944 else
6945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6946 /* end confdefs.h. */
6947 #include <stdlib.h>
6948 extern char _etext;
6949
6950 int
6951 main ()
6952 {
6953 free (&_etext);
6954 ;
6955 return 0;
6956 }
6957 _ACEOF
6958 if ac_fn_c_try_link "$LINENO"; then :
6959 ac_cv_var__etext=yes
6960 else
6961 ac_cv_var__etext=no
6962 fi
6963 rm -f core conftest.err conftest.$ac_objext \
6964 conftest$ac_exeext conftest.$ac_ext
6965 fi
6966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6967 $as_echo "$ac_cv_var__etext" >&6; }
6968 if test "$ac_cv_var__etext" = yes; then
6969
6970 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6971
6972 fi
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6974 $as_echo_n "checking for etext... " >&6; }
6975 if ${ac_cv_var_etext+:} false; then :
6976 $as_echo_n "(cached) " >&6
6977 else
6978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6979 /* end confdefs.h. */
6980 #include <stdlib.h>
6981 extern char etext;
6982
6983 int
6984 main ()
6985 {
6986 free (&etext);
6987 ;
6988 return 0;
6989 }
6990 _ACEOF
6991 if ac_fn_c_try_link "$LINENO"; then :
6992 ac_cv_var_etext=yes
6993 else
6994 ac_cv_var_etext=no
6995 fi
6996 rm -f core conftest.err conftest.$ac_objext \
6997 conftest$ac_exeext conftest.$ac_ext
6998 fi
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7000 $as_echo "$ac_cv_var_etext" >&6; }
7001 if test "$ac_cv_var_etext" = yes; then
7002
7003 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7004
7005 fi
7006 if test "$enable_profiling" = yes ; then
7007 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7008 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7009 fi
7010 PROFILE_CFLAGS=-pg
7011 OLD_CFLAGS="$CFLAGS"
7012 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7013
7014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7015 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7016 if ${ac_cv_cc_supports_pg+:} false; then :
7017 $as_echo_n "(cached) " >&6
7018 else
7019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7020 /* end confdefs.h. */
7021
7022 int
7023 main ()
7024 {
7025 int x;
7026 ;
7027 return 0;
7028 }
7029 _ACEOF
7030 if ac_fn_c_try_compile "$LINENO"; then :
7031 ac_cv_cc_supports_pg=yes
7032 else
7033 ac_cv_cc_supports_pg=no
7034 fi
7035 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7036 fi
7037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7038 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7039
7040 if test "$ac_cv_cc_supports_pg" = no; then
7041 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7042 fi
7043
7044 CFLAGS="$OLD_CFLAGS"
7045 fi
7046
7047 CODESIGN_CERT=
7048 # Check whether --enable-codesign was given.
7049 if test "${enable_codesign+set}" = set; then :
7050 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7051 fi
7052
7053
7054
7055
7056
7057 # Check whether --with-pkgversion was given.
7058 if test "${with_pkgversion+set}" = set; then :
7059 withval=$with_pkgversion; case "$withval" in
7060 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7061 no) PKGVERSION= ;;
7062 *) PKGVERSION="($withval) " ;;
7063 esac
7064 else
7065 PKGVERSION="(GDB) "
7066
7067 fi
7068
7069
7070
7071
7072
7073 # Check whether --with-bugurl was given.
7074 if test "${with_bugurl+set}" = set; then :
7075 withval=$with_bugurl; case "$withval" in
7076 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7077 no) BUGURL=
7078 ;;
7079 *) BUGURL="$withval"
7080 ;;
7081 esac
7082 else
7083 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7084
7085 fi
7086
7087 case ${BUGURL} in
7088 "")
7089 REPORT_BUGS_TO=
7090 REPORT_BUGS_TEXI=
7091 ;;
7092 *)
7093 REPORT_BUGS_TO="<$BUGURL>"
7094 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7095 ;;
7096 esac;
7097
7098
7099
7100
7101 cat >>confdefs.h <<_ACEOF
7102 #define PKGVERSION "$PKGVERSION"
7103 _ACEOF
7104
7105
7106 cat >>confdefs.h <<_ACEOF
7107 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7108 _ACEOF
7109
7110
7111 # --------------------- #
7112 # Checks for programs. #
7113 # --------------------- #
7114
7115 for ac_prog in gawk mawk nawk awk
7116 do
7117 # Extract the first word of "$ac_prog", so it can be a program name with args.
7118 set dummy $ac_prog; ac_word=$2
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7120 $as_echo_n "checking for $ac_word... " >&6; }
7121 if ${ac_cv_prog_AWK+:} false; then :
7122 $as_echo_n "(cached) " >&6
7123 else
7124 if test -n "$AWK"; then
7125 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7126 else
7127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7128 for as_dir in $PATH
7129 do
7130 IFS=$as_save_IFS
7131 test -z "$as_dir" && as_dir=.
7132 for ac_exec_ext in '' $ac_executable_extensions; do
7133 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7134 ac_cv_prog_AWK="$ac_prog"
7135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7136 break 2
7137 fi
7138 done
7139 done
7140 IFS=$as_save_IFS
7141
7142 fi
7143 fi
7144 AWK=$ac_cv_prog_AWK
7145 if test -n "$AWK"; then
7146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7147 $as_echo "$AWK" >&6; }
7148 else
7149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7150 $as_echo "no" >&6; }
7151 fi
7152
7153
7154 test -n "$AWK" && break
7155 done
7156
7157 # Find a good install program. We prefer a C program (faster),
7158 # so one script is as good as another. But avoid the broken or
7159 # incompatible versions:
7160 # SysV /etc/install, /usr/sbin/install
7161 # SunOS /usr/etc/install
7162 # IRIX /sbin/install
7163 # AIX /bin/install
7164 # AmigaOS /C/install, which installs bootblocks on floppy discs
7165 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7166 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7167 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7168 # OS/2's system install, which has a completely different semantic
7169 # ./install, which can be erroneously created by make from ./install.sh.
7170 # Reject install programs that cannot install multiple files.
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7172 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7173 if test -z "$INSTALL"; then
7174 if ${ac_cv_path_install+:} false; then :
7175 $as_echo_n "(cached) " >&6
7176 else
7177 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7178 for as_dir in $PATH
7179 do
7180 IFS=$as_save_IFS
7181 test -z "$as_dir" && as_dir=.
7182 # Account for people who put trailing slashes in PATH elements.
7183 case $as_dir/ in #((
7184 ./ | .// | /[cC]/* | \
7185 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7186 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7187 /usr/ucb/* ) ;;
7188 *)
7189 # OSF1 and SCO ODT 3.0 have their own names for install.
7190 # Don't use installbsd from OSF since it installs stuff as root
7191 # by default.
7192 for ac_prog in ginstall scoinst install; do
7193 for ac_exec_ext in '' $ac_executable_extensions; do
7194 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7195 if test $ac_prog = install &&
7196 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7197 # AIX install. It has an incompatible calling convention.
7198 :
7199 elif test $ac_prog = install &&
7200 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7201 # program-specific install script used by HP pwplus--don't use.
7202 :
7203 else
7204 rm -rf conftest.one conftest.two conftest.dir
7205 echo one > conftest.one
7206 echo two > conftest.two
7207 mkdir conftest.dir
7208 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7209 test -s conftest.one && test -s conftest.two &&
7210 test -s conftest.dir/conftest.one &&
7211 test -s conftest.dir/conftest.two
7212 then
7213 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7214 break 3
7215 fi
7216 fi
7217 fi
7218 done
7219 done
7220 ;;
7221 esac
7222
7223 done
7224 IFS=$as_save_IFS
7225
7226 rm -rf conftest.one conftest.two conftest.dir
7227
7228 fi
7229 if test "${ac_cv_path_install+set}" = set; then
7230 INSTALL=$ac_cv_path_install
7231 else
7232 # As a last resort, use the slow shell script. Don't cache a
7233 # value for INSTALL within a source directory, because that will
7234 # break other packages using the cache if that directory is
7235 # removed, or if the value is a relative name.
7236 INSTALL=$ac_install_sh
7237 fi
7238 fi
7239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7240 $as_echo "$INSTALL" >&6; }
7241
7242 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7243 # It thinks the first close brace ends the variable substitution.
7244 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7245
7246 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7247
7248 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7249
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7251 $as_echo_n "checking whether ln -s works... " >&6; }
7252 LN_S=$as_ln_s
7253 if test "$LN_S" = "ln -s"; then
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7255 $as_echo "yes" >&6; }
7256 else
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7258 $as_echo "no, using $LN_S" >&6; }
7259 fi
7260
7261 if test -n "$ac_tool_prefix"; then
7262 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7263 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7265 $as_echo_n "checking for $ac_word... " >&6; }
7266 if ${ac_cv_prog_RANLIB+:} false; then :
7267 $as_echo_n "(cached) " >&6
7268 else
7269 if test -n "$RANLIB"; then
7270 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7271 else
7272 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7273 for as_dir in $PATH
7274 do
7275 IFS=$as_save_IFS
7276 test -z "$as_dir" && as_dir=.
7277 for ac_exec_ext in '' $ac_executable_extensions; do
7278 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7279 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7280 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7281 break 2
7282 fi
7283 done
7284 done
7285 IFS=$as_save_IFS
7286
7287 fi
7288 fi
7289 RANLIB=$ac_cv_prog_RANLIB
7290 if test -n "$RANLIB"; then
7291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7292 $as_echo "$RANLIB" >&6; }
7293 else
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7295 $as_echo "no" >&6; }
7296 fi
7297
7298
7299 fi
7300 if test -z "$ac_cv_prog_RANLIB"; then
7301 ac_ct_RANLIB=$RANLIB
7302 # Extract the first word of "ranlib", so it can be a program name with args.
7303 set dummy ranlib; ac_word=$2
7304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7305 $as_echo_n "checking for $ac_word... " >&6; }
7306 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7307 $as_echo_n "(cached) " >&6
7308 else
7309 if test -n "$ac_ct_RANLIB"; then
7310 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7311 else
7312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7313 for as_dir in $PATH
7314 do
7315 IFS=$as_save_IFS
7316 test -z "$as_dir" && as_dir=.
7317 for ac_exec_ext in '' $ac_executable_extensions; do
7318 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7319 ac_cv_prog_ac_ct_RANLIB="ranlib"
7320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7321 break 2
7322 fi
7323 done
7324 done
7325 IFS=$as_save_IFS
7326
7327 fi
7328 fi
7329 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7330 if test -n "$ac_ct_RANLIB"; then
7331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7332 $as_echo "$ac_ct_RANLIB" >&6; }
7333 else
7334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7335 $as_echo "no" >&6; }
7336 fi
7337
7338 if test "x$ac_ct_RANLIB" = x; then
7339 RANLIB=":"
7340 else
7341 case $cross_compiling:$ac_tool_warned in
7342 yes:)
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7344 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7345 ac_tool_warned=yes ;;
7346 esac
7347 RANLIB=$ac_ct_RANLIB
7348 fi
7349 else
7350 RANLIB="$ac_cv_prog_RANLIB"
7351 fi
7352
7353 for ac_prog in 'bison -y' byacc
7354 do
7355 # Extract the first word of "$ac_prog", so it can be a program name with args.
7356 set dummy $ac_prog; ac_word=$2
7357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7358 $as_echo_n "checking for $ac_word... " >&6; }
7359 if ${ac_cv_prog_YACC+:} false; then :
7360 $as_echo_n "(cached) " >&6
7361 else
7362 if test -n "$YACC"; then
7363 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7364 else
7365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7366 for as_dir in $PATH
7367 do
7368 IFS=$as_save_IFS
7369 test -z "$as_dir" && as_dir=.
7370 for ac_exec_ext in '' $ac_executable_extensions; do
7371 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7372 ac_cv_prog_YACC="$ac_prog"
7373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7374 break 2
7375 fi
7376 done
7377 done
7378 IFS=$as_save_IFS
7379
7380 fi
7381 fi
7382 YACC=$ac_cv_prog_YACC
7383 if test -n "$YACC"; then
7384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7385 $as_echo "$YACC" >&6; }
7386 else
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7388 $as_echo "no" >&6; }
7389 fi
7390
7391
7392 test -n "$YACC" && break
7393 done
7394 test -n "$YACC" || YACC="yacc"
7395
7396
7397 if test -n "$ac_tool_prefix"; then
7398 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7399 set dummy ${ac_tool_prefix}ar; ac_word=$2
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7401 $as_echo_n "checking for $ac_word... " >&6; }
7402 if ${ac_cv_prog_AR+:} false; then :
7403 $as_echo_n "(cached) " >&6
7404 else
7405 if test -n "$AR"; then
7406 ac_cv_prog_AR="$AR" # Let the user override the test.
7407 else
7408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7409 for as_dir in $PATH
7410 do
7411 IFS=$as_save_IFS
7412 test -z "$as_dir" && as_dir=.
7413 for ac_exec_ext in '' $ac_executable_extensions; do
7414 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7415 ac_cv_prog_AR="${ac_tool_prefix}ar"
7416 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7417 break 2
7418 fi
7419 done
7420 done
7421 IFS=$as_save_IFS
7422
7423 fi
7424 fi
7425 AR=$ac_cv_prog_AR
7426 if test -n "$AR"; then
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7428 $as_echo "$AR" >&6; }
7429 else
7430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7431 $as_echo "no" >&6; }
7432 fi
7433
7434
7435 fi
7436 if test -z "$ac_cv_prog_AR"; then
7437 ac_ct_AR=$AR
7438 # Extract the first word of "ar", so it can be a program name with args.
7439 set dummy ar; ac_word=$2
7440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7441 $as_echo_n "checking for $ac_word... " >&6; }
7442 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7443 $as_echo_n "(cached) " >&6
7444 else
7445 if test -n "$ac_ct_AR"; then
7446 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7447 else
7448 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7449 for as_dir in $PATH
7450 do
7451 IFS=$as_save_IFS
7452 test -z "$as_dir" && as_dir=.
7453 for ac_exec_ext in '' $ac_executable_extensions; do
7454 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7455 ac_cv_prog_ac_ct_AR="ar"
7456 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7457 break 2
7458 fi
7459 done
7460 done
7461 IFS=$as_save_IFS
7462
7463 fi
7464 fi
7465 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7466 if test -n "$ac_ct_AR"; then
7467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7468 $as_echo "$ac_ct_AR" >&6; }
7469 else
7470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7471 $as_echo "no" >&6; }
7472 fi
7473
7474 if test "x$ac_ct_AR" = x; then
7475 AR=""
7476 else
7477 case $cross_compiling:$ac_tool_warned in
7478 yes:)
7479 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7480 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7481 ac_tool_warned=yes ;;
7482 esac
7483 AR=$ac_ct_AR
7484 fi
7485 else
7486 AR="$ac_cv_prog_AR"
7487 fi
7488
7489 if test -n "$ac_tool_prefix"; then
7490 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7491 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7493 $as_echo_n "checking for $ac_word... " >&6; }
7494 if ${ac_cv_prog_DLLTOOL+:} false; then :
7495 $as_echo_n "(cached) " >&6
7496 else
7497 if test -n "$DLLTOOL"; then
7498 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7499 else
7500 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7501 for as_dir in $PATH
7502 do
7503 IFS=$as_save_IFS
7504 test -z "$as_dir" && as_dir=.
7505 for ac_exec_ext in '' $ac_executable_extensions; do
7506 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7507 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7509 break 2
7510 fi
7511 done
7512 done
7513 IFS=$as_save_IFS
7514
7515 fi
7516 fi
7517 DLLTOOL=$ac_cv_prog_DLLTOOL
7518 if test -n "$DLLTOOL"; then
7519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7520 $as_echo "$DLLTOOL" >&6; }
7521 else
7522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7523 $as_echo "no" >&6; }
7524 fi
7525
7526
7527 fi
7528 if test -z "$ac_cv_prog_DLLTOOL"; then
7529 ac_ct_DLLTOOL=$DLLTOOL
7530 # Extract the first word of "dlltool", so it can be a program name with args.
7531 set dummy dlltool; ac_word=$2
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7533 $as_echo_n "checking for $ac_word... " >&6; }
7534 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7535 $as_echo_n "(cached) " >&6
7536 else
7537 if test -n "$ac_ct_DLLTOOL"; then
7538 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7539 else
7540 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7541 for as_dir in $PATH
7542 do
7543 IFS=$as_save_IFS
7544 test -z "$as_dir" && as_dir=.
7545 for ac_exec_ext in '' $ac_executable_extensions; do
7546 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7547 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7549 break 2
7550 fi
7551 done
7552 done
7553 IFS=$as_save_IFS
7554
7555 fi
7556 fi
7557 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7558 if test -n "$ac_ct_DLLTOOL"; then
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7560 $as_echo "$ac_ct_DLLTOOL" >&6; }
7561 else
7562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7563 $as_echo "no" >&6; }
7564 fi
7565
7566 if test "x$ac_ct_DLLTOOL" = x; then
7567 DLLTOOL=""
7568 else
7569 case $cross_compiling:$ac_tool_warned in
7570 yes:)
7571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7572 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7573 ac_tool_warned=yes ;;
7574 esac
7575 DLLTOOL=$ac_ct_DLLTOOL
7576 fi
7577 else
7578 DLLTOOL="$ac_cv_prog_DLLTOOL"
7579 fi
7580
7581 if test -n "$ac_tool_prefix"; then
7582 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7583 set dummy ${ac_tool_prefix}windres; ac_word=$2
7584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7585 $as_echo_n "checking for $ac_word... " >&6; }
7586 if ${ac_cv_prog_WINDRES+:} false; then :
7587 $as_echo_n "(cached) " >&6
7588 else
7589 if test -n "$WINDRES"; then
7590 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7591 else
7592 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7593 for as_dir in $PATH
7594 do
7595 IFS=$as_save_IFS
7596 test -z "$as_dir" && as_dir=.
7597 for ac_exec_ext in '' $ac_executable_extensions; do
7598 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7599 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7600 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7601 break 2
7602 fi
7603 done
7604 done
7605 IFS=$as_save_IFS
7606
7607 fi
7608 fi
7609 WINDRES=$ac_cv_prog_WINDRES
7610 if test -n "$WINDRES"; then
7611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7612 $as_echo "$WINDRES" >&6; }
7613 else
7614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7615 $as_echo "no" >&6; }
7616 fi
7617
7618
7619 fi
7620 if test -z "$ac_cv_prog_WINDRES"; then
7621 ac_ct_WINDRES=$WINDRES
7622 # Extract the first word of "windres", so it can be a program name with args.
7623 set dummy windres; ac_word=$2
7624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7625 $as_echo_n "checking for $ac_word... " >&6; }
7626 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7627 $as_echo_n "(cached) " >&6
7628 else
7629 if test -n "$ac_ct_WINDRES"; then
7630 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7631 else
7632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7633 for as_dir in $PATH
7634 do
7635 IFS=$as_save_IFS
7636 test -z "$as_dir" && as_dir=.
7637 for ac_exec_ext in '' $ac_executable_extensions; do
7638 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7639 ac_cv_prog_ac_ct_WINDRES="windres"
7640 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7641 break 2
7642 fi
7643 done
7644 done
7645 IFS=$as_save_IFS
7646
7647 fi
7648 fi
7649 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7650 if test -n "$ac_ct_WINDRES"; then
7651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7652 $as_echo "$ac_ct_WINDRES" >&6; }
7653 else
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7655 $as_echo "no" >&6; }
7656 fi
7657
7658 if test "x$ac_ct_WINDRES" = x; then
7659 WINDRES=""
7660 else
7661 case $cross_compiling:$ac_tool_warned in
7662 yes:)
7663 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7664 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7665 ac_tool_warned=yes ;;
7666 esac
7667 WINDRES=$ac_ct_WINDRES
7668 fi
7669 else
7670 WINDRES="$ac_cv_prog_WINDRES"
7671 fi
7672
7673
7674 case $host_os in
7675 gnu*)
7676 # Needed for GNU Hurd hosts.
7677 if test -n "$ac_tool_prefix"; then
7678 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7679 set dummy ${ac_tool_prefix}mig; ac_word=$2
7680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7681 $as_echo_n "checking for $ac_word... " >&6; }
7682 if ${ac_cv_prog_MIG+:} false; then :
7683 $as_echo_n "(cached) " >&6
7684 else
7685 if test -n "$MIG"; then
7686 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7687 else
7688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7689 for as_dir in $PATH
7690 do
7691 IFS=$as_save_IFS
7692 test -z "$as_dir" && as_dir=.
7693 for ac_exec_ext in '' $ac_executable_extensions; do
7694 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7695 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7697 break 2
7698 fi
7699 done
7700 done
7701 IFS=$as_save_IFS
7702
7703 fi
7704 fi
7705 MIG=$ac_cv_prog_MIG
7706 if test -n "$MIG"; then
7707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7708 $as_echo "$MIG" >&6; }
7709 else
7710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7711 $as_echo "no" >&6; }
7712 fi
7713
7714
7715 fi
7716 if test -z "$ac_cv_prog_MIG"; then
7717 ac_ct_MIG=$MIG
7718 # Extract the first word of "mig", so it can be a program name with args.
7719 set dummy mig; ac_word=$2
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7721 $as_echo_n "checking for $ac_word... " >&6; }
7722 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7723 $as_echo_n "(cached) " >&6
7724 else
7725 if test -n "$ac_ct_MIG"; then
7726 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7727 else
7728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7729 for as_dir in $PATH
7730 do
7731 IFS=$as_save_IFS
7732 test -z "$as_dir" && as_dir=.
7733 for ac_exec_ext in '' $ac_executable_extensions; do
7734 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7735 ac_cv_prog_ac_ct_MIG="mig"
7736 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7737 break 2
7738 fi
7739 done
7740 done
7741 IFS=$as_save_IFS
7742
7743 fi
7744 fi
7745 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7746 if test -n "$ac_ct_MIG"; then
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7748 $as_echo "$ac_ct_MIG" >&6; }
7749 else
7750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7751 $as_echo "no" >&6; }
7752 fi
7753
7754 if test "x$ac_ct_MIG" = x; then
7755 MIG=""
7756 else
7757 case $cross_compiling:$ac_tool_warned in
7758 yes:)
7759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7760 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7761 ac_tool_warned=yes ;;
7762 esac
7763 MIG=$ac_ct_MIG
7764 fi
7765 else
7766 MIG="$ac_cv_prog_MIG"
7767 fi
7768
7769 if test x"$MIG" = x; then
7770 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7771 fi
7772 ;;
7773 esac
7774
7775 # ---------------------- #
7776 # Checks for libraries. #
7777 # ---------------------- #
7778
7779 # We might need to link with -lm; most simulators need it.
7780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7781 $as_echo_n "checking for main in -lm... " >&6; }
7782 if ${ac_cv_lib_m_main+:} false; then :
7783 $as_echo_n "(cached) " >&6
7784 else
7785 ac_check_lib_save_LIBS=$LIBS
7786 LIBS="-lm $LIBS"
7787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7788 /* end confdefs.h. */
7789
7790
7791 int
7792 main ()
7793 {
7794 return main ();
7795 ;
7796 return 0;
7797 }
7798 _ACEOF
7799 if ac_fn_c_try_link "$LINENO"; then :
7800 ac_cv_lib_m_main=yes
7801 else
7802 ac_cv_lib_m_main=no
7803 fi
7804 rm -f core conftest.err conftest.$ac_objext \
7805 conftest$ac_exeext conftest.$ac_ext
7806 LIBS=$ac_check_lib_save_LIBS
7807 fi
7808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7809 $as_echo "$ac_cv_lib_m_main" >&6; }
7810 if test "x$ac_cv_lib_m_main" = xyes; then :
7811 cat >>confdefs.h <<_ACEOF
7812 #define HAVE_LIBM 1
7813 _ACEOF
7814
7815 LIBS="-lm $LIBS"
7816
7817 fi
7818
7819
7820 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7822 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7823 if ${ac_cv_search_gethostbyname+:} false; then :
7824 $as_echo_n "(cached) " >&6
7825 else
7826 ac_func_search_save_LIBS=$LIBS
7827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7828 /* end confdefs.h. */
7829
7830 /* Override any GCC internal prototype to avoid an error.
7831 Use char because int might match the return type of a GCC
7832 builtin and then its argument prototype would still apply. */
7833 #ifdef __cplusplus
7834 extern "C"
7835 #endif
7836 char gethostbyname ();
7837 int
7838 main ()
7839 {
7840 return gethostbyname ();
7841 ;
7842 return 0;
7843 }
7844 _ACEOF
7845 for ac_lib in '' nsl; do
7846 if test -z "$ac_lib"; then
7847 ac_res="none required"
7848 else
7849 ac_res=-l$ac_lib
7850 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7851 fi
7852 if ac_fn_c_try_link "$LINENO"; then :
7853 ac_cv_search_gethostbyname=$ac_res
7854 fi
7855 rm -f core conftest.err conftest.$ac_objext \
7856 conftest$ac_exeext
7857 if ${ac_cv_search_gethostbyname+:} false; then :
7858 break
7859 fi
7860 done
7861 if ${ac_cv_search_gethostbyname+:} false; then :
7862
7863 else
7864 ac_cv_search_gethostbyname=no
7865 fi
7866 rm conftest.$ac_ext
7867 LIBS=$ac_func_search_save_LIBS
7868 fi
7869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7870 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7871 ac_res=$ac_cv_search_gethostbyname
7872 if test "$ac_res" != no; then :
7873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7874
7875 fi
7876
7877
7878 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7880 $as_echo_n "checking for library containing socketpair... " >&6; }
7881 if ${ac_cv_search_socketpair+:} false; then :
7882 $as_echo_n "(cached) " >&6
7883 else
7884 ac_func_search_save_LIBS=$LIBS
7885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7886 /* end confdefs.h. */
7887
7888 /* Override any GCC internal prototype to avoid an error.
7889 Use char because int might match the return type of a GCC
7890 builtin and then its argument prototype would still apply. */
7891 #ifdef __cplusplus
7892 extern "C"
7893 #endif
7894 char socketpair ();
7895 int
7896 main ()
7897 {
7898 return socketpair ();
7899 ;
7900 return 0;
7901 }
7902 _ACEOF
7903 for ac_lib in '' socket; do
7904 if test -z "$ac_lib"; then
7905 ac_res="none required"
7906 else
7907 ac_res=-l$ac_lib
7908 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7909 fi
7910 if ac_fn_c_try_link "$LINENO"; then :
7911 ac_cv_search_socketpair=$ac_res
7912 fi
7913 rm -f core conftest.err conftest.$ac_objext \
7914 conftest$ac_exeext
7915 if ${ac_cv_search_socketpair+:} false; then :
7916 break
7917 fi
7918 done
7919 if ${ac_cv_search_socketpair+:} false; then :
7920
7921 else
7922 ac_cv_search_socketpair=no
7923 fi
7924 rm conftest.$ac_ext
7925 LIBS=$ac_func_search_save_LIBS
7926 fi
7927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7928 $as_echo "$ac_cv_search_socketpair" >&6; }
7929 ac_res=$ac_cv_search_socketpair
7930 if test "$ac_res" != no; then :
7931 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7932
7933 fi
7934
7935
7936 # Link in zlib if we can. This allows us to read compressed debug sections.
7937
7938 # Use the system's zlib library.
7939 zlibdir="-L\$(top_builddir)/../zlib"
7940 zlibinc="-I\$(top_srcdir)/../zlib"
7941
7942 # Check whether --with-system-zlib was given.
7943 if test "${with_system_zlib+set}" = set; then :
7944 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7945 zlibdir=
7946 zlibinc=
7947 fi
7948
7949 fi
7950
7951
7952
7953
7954
7955 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7956 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7958 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7959 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7960 $as_echo_n "(cached) " >&6
7961 else
7962 ac_func_search_save_LIBS=$LIBS
7963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7964 /* end confdefs.h. */
7965
7966 /* Override any GCC internal prototype to avoid an error.
7967 Use char because int might match the return type of a GCC
7968 builtin and then its argument prototype would still apply. */
7969 #ifdef __cplusplus
7970 extern "C"
7971 #endif
7972 char kinfo_getvmmap ();
7973 int
7974 main ()
7975 {
7976 return kinfo_getvmmap ();
7977 ;
7978 return 0;
7979 }
7980 _ACEOF
7981 for ac_lib in '' util util-freebsd; do
7982 if test -z "$ac_lib"; then
7983 ac_res="none required"
7984 else
7985 ac_res=-l$ac_lib
7986 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7987 fi
7988 if ac_fn_c_try_link "$LINENO"; then :
7989 ac_cv_search_kinfo_getvmmap=$ac_res
7990 fi
7991 rm -f core conftest.err conftest.$ac_objext \
7992 conftest$ac_exeext
7993 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7994 break
7995 fi
7996 done
7997 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7998
7999 else
8000 ac_cv_search_kinfo_getvmmap=no
8001 fi
8002 rm conftest.$ac_ext
8003 LIBS=$ac_func_search_save_LIBS
8004 fi
8005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
8006 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
8007 ac_res=$ac_cv_search_kinfo_getvmmap
8008 if test "$ac_res" != no; then :
8009 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8010
8011 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
8012
8013 fi
8014
8015
8016
8017 if test "X$prefix" = "XNONE"; then
8018 acl_final_prefix="$ac_default_prefix"
8019 else
8020 acl_final_prefix="$prefix"
8021 fi
8022 if test "X$exec_prefix" = "XNONE"; then
8023 acl_final_exec_prefix='${prefix}'
8024 else
8025 acl_final_exec_prefix="$exec_prefix"
8026 fi
8027 acl_save_prefix="$prefix"
8028 prefix="$acl_final_prefix"
8029 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8030 prefix="$acl_save_prefix"
8031
8032
8033 # Check whether --with-gnu-ld was given.
8034 if test "${with_gnu_ld+set}" = set; then :
8035 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8036 else
8037 with_gnu_ld=no
8038 fi
8039
8040 # Prepare PATH_SEPARATOR.
8041 # The user is always right.
8042 if test "${PATH_SEPARATOR+set}" != set; then
8043 echo "#! /bin/sh" >conf$$.sh
8044 echo "exit 0" >>conf$$.sh
8045 chmod +x conf$$.sh
8046 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8047 PATH_SEPARATOR=';'
8048 else
8049 PATH_SEPARATOR=:
8050 fi
8051 rm -f conf$$.sh
8052 fi
8053 ac_prog=ld
8054 if test "$GCC" = yes; then
8055 # Check if gcc -print-prog-name=ld gives a path.
8056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8057 $as_echo_n "checking for ld used by GCC... " >&6; }
8058 case $host in
8059 *-*-mingw*)
8060 # gcc leaves a trailing carriage return which upsets mingw
8061 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8062 *)
8063 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8064 esac
8065 case $ac_prog in
8066 # Accept absolute paths.
8067 [\\/]* | [A-Za-z]:[\\/]*)
8068 re_direlt='/[^/][^/]*/\.\./'
8069 # Canonicalize the path of ld
8070 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8071 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8072 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8073 done
8074 test -z "$LD" && LD="$ac_prog"
8075 ;;
8076 "")
8077 # If it fails, then pretend we aren't using GCC.
8078 ac_prog=ld
8079 ;;
8080 *)
8081 # If it is relative, then search for the first ld in PATH.
8082 with_gnu_ld=unknown
8083 ;;
8084 esac
8085 elif test "$with_gnu_ld" = yes; then
8086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8087 $as_echo_n "checking for GNU ld... " >&6; }
8088 else
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8090 $as_echo_n "checking for non-GNU ld... " >&6; }
8091 fi
8092 if ${acl_cv_path_LD+:} false; then :
8093 $as_echo_n "(cached) " >&6
8094 else
8095 if test -z "$LD"; then
8096 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8097 for ac_dir in $PATH; do
8098 test -z "$ac_dir" && ac_dir=.
8099 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8100 acl_cv_path_LD="$ac_dir/$ac_prog"
8101 # Check to see if the program is GNU ld. I'd rather use --version,
8102 # but apparently some GNU ld's only accept -v.
8103 # Break only if it was the GNU/non-GNU ld that we prefer.
8104 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8105 test "$with_gnu_ld" != no && break
8106 else
8107 test "$with_gnu_ld" != yes && break
8108 fi
8109 fi
8110 done
8111 IFS="$ac_save_ifs"
8112 else
8113 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8114 fi
8115 fi
8116
8117 LD="$acl_cv_path_LD"
8118 if test -n "$LD"; then
8119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8120 $as_echo "$LD" >&6; }
8121 else
8122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8123 $as_echo "no" >&6; }
8124 fi
8125 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8127 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8128 if ${acl_cv_prog_gnu_ld+:} false; then :
8129 $as_echo_n "(cached) " >&6
8130 else
8131 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8132 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8133 acl_cv_prog_gnu_ld=yes
8134 else
8135 acl_cv_prog_gnu_ld=no
8136 fi
8137 fi
8138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8139 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8140 with_gnu_ld=$acl_cv_prog_gnu_ld
8141
8142
8143
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8145 $as_echo_n "checking for shared library run path origin... " >&6; }
8146 if ${acl_cv_rpath+:} false; then :
8147 $as_echo_n "(cached) " >&6
8148 else
8149
8150 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8151 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8152 . ./conftest.sh
8153 rm -f ./conftest.sh
8154 acl_cv_rpath=done
8155
8156 fi
8157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8158 $as_echo "$acl_cv_rpath" >&6; }
8159 wl="$acl_cv_wl"
8160 libext="$acl_cv_libext"
8161 shlibext="$acl_cv_shlibext"
8162 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8163 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8164 hardcode_direct="$acl_cv_hardcode_direct"
8165 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8166 # Check whether --enable-rpath was given.
8167 if test "${enable_rpath+set}" = set; then :
8168 enableval=$enable_rpath; :
8169 else
8170 enable_rpath=yes
8171 fi
8172
8173
8174
8175
8176
8177
8178
8179
8180 use_additional=yes
8181
8182 acl_save_prefix="$prefix"
8183 prefix="$acl_final_prefix"
8184 acl_save_exec_prefix="$exec_prefix"
8185 exec_prefix="$acl_final_exec_prefix"
8186
8187 eval additional_includedir=\"$includedir\"
8188 eval additional_libdir=\"$libdir\"
8189
8190 exec_prefix="$acl_save_exec_prefix"
8191 prefix="$acl_save_prefix"
8192
8193
8194 # Check whether --with-libiconv-prefix was given.
8195 if test "${with_libiconv_prefix+set}" = set; then :
8196 withval=$with_libiconv_prefix;
8197 if test "X$withval" = "Xno"; then
8198 use_additional=no
8199 else
8200 if test "X$withval" = "X"; then
8201
8202 acl_save_prefix="$prefix"
8203 prefix="$acl_final_prefix"
8204 acl_save_exec_prefix="$exec_prefix"
8205 exec_prefix="$acl_final_exec_prefix"
8206
8207 eval additional_includedir=\"$includedir\"
8208 eval additional_libdir=\"$libdir\"
8209
8210 exec_prefix="$acl_save_exec_prefix"
8211 prefix="$acl_save_prefix"
8212
8213 else
8214 additional_includedir="$withval/include"
8215 additional_libdir="$withval/lib"
8216 fi
8217 fi
8218
8219 fi
8220
8221
8222 # Check whether --with-libiconv-type was given.
8223 if test "${with_libiconv_type+set}" = set; then :
8224 withval=$with_libiconv_type; with_libiconv_type=$withval
8225 else
8226 with_libiconv_type=auto
8227 fi
8228
8229 lib_type=`eval echo \$with_libiconv_type`
8230
8231 LIBICONV=
8232 LTLIBICONV=
8233 INCICONV=
8234 rpathdirs=
8235 ltrpathdirs=
8236 names_already_handled=
8237 names_next_round='iconv '
8238 while test -n "$names_next_round"; do
8239 names_this_round="$names_next_round"
8240 names_next_round=
8241 for name in $names_this_round; do
8242 already_handled=
8243 for n in $names_already_handled; do
8244 if test "$n" = "$name"; then
8245 already_handled=yes
8246 break
8247 fi
8248 done
8249 if test -z "$already_handled"; then
8250 names_already_handled="$names_already_handled $name"
8251 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8252 eval value=\"\$HAVE_LIB$uppername\"
8253 if test -n "$value"; then
8254 if test "$value" = yes; then
8255 eval value=\"\$LIB$uppername\"
8256 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8257 eval value=\"\$LTLIB$uppername\"
8258 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8259 else
8260 :
8261 fi
8262 else
8263 found_dir=
8264 found_la=
8265 found_so=
8266 found_a=
8267 if test $use_additional = yes; then
8268 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8269 found_dir="$additional_libdir"
8270 found_so="$additional_libdir/lib$name.$shlibext"
8271 if test -f "$additional_libdir/lib$name.la"; then
8272 found_la="$additional_libdir/lib$name.la"
8273 fi
8274 elif test x$lib_type != xshared; then
8275 if test -f "$additional_libdir/lib$name.$libext"; then
8276 found_dir="$additional_libdir"
8277 found_a="$additional_libdir/lib$name.$libext"
8278 if test -f "$additional_libdir/lib$name.la"; then
8279 found_la="$additional_libdir/lib$name.la"
8280 fi
8281 fi
8282 fi
8283 fi
8284 if test "X$found_dir" = "X"; then
8285 for x in $LDFLAGS $LTLIBICONV; do
8286
8287 acl_save_prefix="$prefix"
8288 prefix="$acl_final_prefix"
8289 acl_save_exec_prefix="$exec_prefix"
8290 exec_prefix="$acl_final_exec_prefix"
8291 eval x=\"$x\"
8292 exec_prefix="$acl_save_exec_prefix"
8293 prefix="$acl_save_prefix"
8294
8295 case "$x" in
8296 -L*)
8297 dir=`echo "X$x" | sed -e 's/^X-L//'`
8298 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8299 found_dir="$dir"
8300 found_so="$dir/lib$name.$shlibext"
8301 if test -f "$dir/lib$name.la"; then
8302 found_la="$dir/lib$name.la"
8303 fi
8304 elif test x$lib_type != xshared; then
8305 if test -f "$dir/lib$name.$libext"; then
8306 found_dir="$dir"
8307 found_a="$dir/lib$name.$libext"
8308 if test -f "$dir/lib$name.la"; then
8309 found_la="$dir/lib$name.la"
8310 fi
8311 fi
8312 fi
8313 ;;
8314 esac
8315 if test "X$found_dir" != "X"; then
8316 break
8317 fi
8318 done
8319 fi
8320 if test "X$found_dir" != "X"; then
8321 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8322 if test "X$found_so" != "X"; then
8323 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8324 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8325 else
8326 haveit=
8327 for x in $ltrpathdirs; do
8328 if test "X$x" = "X$found_dir"; then
8329 haveit=yes
8330 break
8331 fi
8332 done
8333 if test -z "$haveit"; then
8334 ltrpathdirs="$ltrpathdirs $found_dir"
8335 fi
8336 if test "$hardcode_direct" = yes; then
8337 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8338 else
8339 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8340 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8341 haveit=
8342 for x in $rpathdirs; do
8343 if test "X$x" = "X$found_dir"; then
8344 haveit=yes
8345 break
8346 fi
8347 done
8348 if test -z "$haveit"; then
8349 rpathdirs="$rpathdirs $found_dir"
8350 fi
8351 else
8352 haveit=
8353 for x in $LDFLAGS $LIBICONV; do
8354
8355 acl_save_prefix="$prefix"
8356 prefix="$acl_final_prefix"
8357 acl_save_exec_prefix="$exec_prefix"
8358 exec_prefix="$acl_final_exec_prefix"
8359 eval x=\"$x\"
8360 exec_prefix="$acl_save_exec_prefix"
8361 prefix="$acl_save_prefix"
8362
8363 if test "X$x" = "X-L$found_dir"; then
8364 haveit=yes
8365 break
8366 fi
8367 done
8368 if test -z "$haveit"; then
8369 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8370 fi
8371 if test "$hardcode_minus_L" != no; then
8372 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8373 else
8374 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8375 fi
8376 fi
8377 fi
8378 fi
8379 else
8380 if test "X$found_a" != "X"; then
8381 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8382 else
8383 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8384 fi
8385 fi
8386 additional_includedir=
8387 case "$found_dir" in
8388 */lib | */lib/)
8389 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8390 additional_includedir="$basedir/include"
8391 ;;
8392 esac
8393 if test "X$additional_includedir" != "X"; then
8394 if test "X$additional_includedir" != "X/usr/include"; then
8395 haveit=
8396 if test "X$additional_includedir" = "X/usr/local/include"; then
8397 if test -n "$GCC"; then
8398 case $host_os in
8399 linux*) haveit=yes;;
8400 esac
8401 fi
8402 fi
8403 if test -z "$haveit"; then
8404 for x in $CPPFLAGS $INCICONV; do
8405
8406 acl_save_prefix="$prefix"
8407 prefix="$acl_final_prefix"
8408 acl_save_exec_prefix="$exec_prefix"
8409 exec_prefix="$acl_final_exec_prefix"
8410 eval x=\"$x\"
8411 exec_prefix="$acl_save_exec_prefix"
8412 prefix="$acl_save_prefix"
8413
8414 if test "X$x" = "X-I$additional_includedir"; then
8415 haveit=yes
8416 break
8417 fi
8418 done
8419 if test -z "$haveit"; then
8420 if test -d "$additional_includedir"; then
8421 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8422 fi
8423 fi
8424 fi
8425 fi
8426 fi
8427 if test -n "$found_la"; then
8428 save_libdir="$libdir"
8429 case "$found_la" in
8430 */* | *\\*) . "$found_la" ;;
8431 *) . "./$found_la" ;;
8432 esac
8433 libdir="$save_libdir"
8434 for dep in $dependency_libs; do
8435 case "$dep" in
8436 -L*)
8437 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8438 if test "X$additional_libdir" != "X/usr/lib"; then
8439 haveit=
8440 if test "X$additional_libdir" = "X/usr/local/lib"; then
8441 if test -n "$GCC"; then
8442 case $host_os in
8443 linux*) haveit=yes;;
8444 esac
8445 fi
8446 fi
8447 if test -z "$haveit"; then
8448 haveit=
8449 for x in $LDFLAGS $LIBICONV; do
8450
8451 acl_save_prefix="$prefix"
8452 prefix="$acl_final_prefix"
8453 acl_save_exec_prefix="$exec_prefix"
8454 exec_prefix="$acl_final_exec_prefix"
8455 eval x=\"$x\"
8456 exec_prefix="$acl_save_exec_prefix"
8457 prefix="$acl_save_prefix"
8458
8459 if test "X$x" = "X-L$additional_libdir"; then
8460 haveit=yes
8461 break
8462 fi
8463 done
8464 if test -z "$haveit"; then
8465 if test -d "$additional_libdir"; then
8466 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8467 fi
8468 fi
8469 haveit=
8470 for x in $LDFLAGS $LTLIBICONV; do
8471
8472 acl_save_prefix="$prefix"
8473 prefix="$acl_final_prefix"
8474 acl_save_exec_prefix="$exec_prefix"
8475 exec_prefix="$acl_final_exec_prefix"
8476 eval x=\"$x\"
8477 exec_prefix="$acl_save_exec_prefix"
8478 prefix="$acl_save_prefix"
8479
8480 if test "X$x" = "X-L$additional_libdir"; then
8481 haveit=yes
8482 break
8483 fi
8484 done
8485 if test -z "$haveit"; then
8486 if test -d "$additional_libdir"; then
8487 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8488 fi
8489 fi
8490 fi
8491 fi
8492 ;;
8493 -R*)
8494 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8495 if test "$enable_rpath" != no; then
8496 haveit=
8497 for x in $rpathdirs; do
8498 if test "X$x" = "X$dir"; then
8499 haveit=yes
8500 break
8501 fi
8502 done
8503 if test -z "$haveit"; then
8504 rpathdirs="$rpathdirs $dir"
8505 fi
8506 haveit=
8507 for x in $ltrpathdirs; do
8508 if test "X$x" = "X$dir"; then
8509 haveit=yes
8510 break
8511 fi
8512 done
8513 if test -z "$haveit"; then
8514 ltrpathdirs="$ltrpathdirs $dir"
8515 fi
8516 fi
8517 ;;
8518 -l*)
8519 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8520 ;;
8521 *.la)
8522 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8523 ;;
8524 *)
8525 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8526 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8527 ;;
8528 esac
8529 done
8530 fi
8531 else
8532 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8533 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8534 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8535 else
8536 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8537 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8538 fi
8539 fi
8540 fi
8541 fi
8542 done
8543 done
8544 if test "X$rpathdirs" != "X"; then
8545 if test -n "$hardcode_libdir_separator"; then
8546 alldirs=
8547 for found_dir in $rpathdirs; do
8548 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8549 done
8550 acl_save_libdir="$libdir"
8551 libdir="$alldirs"
8552 eval flag=\"$hardcode_libdir_flag_spec\"
8553 libdir="$acl_save_libdir"
8554 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8555 else
8556 for found_dir in $rpathdirs; do
8557 acl_save_libdir="$libdir"
8558 libdir="$found_dir"
8559 eval flag=\"$hardcode_libdir_flag_spec\"
8560 libdir="$acl_save_libdir"
8561 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8562 done
8563 fi
8564 fi
8565 if test "X$ltrpathdirs" != "X"; then
8566 for found_dir in $ltrpathdirs; do
8567 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8568 done
8569 fi
8570
8571
8572
8573
8574
8575
8576
8577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8578 $as_echo_n "checking for iconv... " >&6; }
8579 if ${am_cv_func_iconv+:} false; then :
8580 $as_echo_n "(cached) " >&6
8581 else
8582
8583 am_cv_func_iconv="no, consider installing GNU libiconv"
8584 am_cv_lib_iconv=no
8585 am_save_CPPFLAGS="$CPPFLAGS"
8586 CPPFLAGS="$CPPFLAGS $INCICONV"
8587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8588 /* end confdefs.h. */
8589 #include <stdlib.h>
8590 #include <iconv.h>
8591 int
8592 main ()
8593 {
8594 iconv_t cd = iconv_open("","");
8595 iconv(cd,NULL,NULL,NULL,NULL);
8596 iconv_close(cd);
8597 ;
8598 return 0;
8599 }
8600 _ACEOF
8601 if ac_fn_c_try_link "$LINENO"; then :
8602 am_cv_func_iconv=yes
8603 fi
8604 rm -f core conftest.err conftest.$ac_objext \
8605 conftest$ac_exeext conftest.$ac_ext
8606 CPPFLAGS="$am_save_CPPFLAGS"
8607
8608 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8609 for _libs in .libs _libs; do
8610 am_save_CPPFLAGS="$CPPFLAGS"
8611 am_save_LIBS="$LIBS"
8612 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8613 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8615 /* end confdefs.h. */
8616 #include <stdlib.h>
8617 #include <iconv.h>
8618 int
8619 main ()
8620 {
8621 iconv_t cd = iconv_open("","");
8622 iconv(cd,NULL,NULL,NULL,NULL);
8623 iconv_close(cd);
8624 ;
8625 return 0;
8626 }
8627 _ACEOF
8628 if ac_fn_c_try_link "$LINENO"; then :
8629 INCICONV="-I../libiconv/include"
8630 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8631 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8632 am_cv_lib_iconv=yes
8633 am_cv_func_iconv=yes
8634 fi
8635 rm -f core conftest.err conftest.$ac_objext \
8636 conftest$ac_exeext conftest.$ac_ext
8637 CPPFLAGS="$am_save_CPPFLAGS"
8638 LIBS="$am_save_LIBS"
8639 if test "$am_cv_func_iconv" = "yes"; then
8640 break
8641 fi
8642 done
8643 fi
8644
8645 if test "$am_cv_func_iconv" != yes; then
8646 am_save_CPPFLAGS="$CPPFLAGS"
8647 am_save_LIBS="$LIBS"
8648 CPPFLAGS="$CPPFLAGS $INCICONV"
8649 LIBS="$LIBS $LIBICONV"
8650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8651 /* end confdefs.h. */
8652 #include <stdlib.h>
8653 #include <iconv.h>
8654 int
8655 main ()
8656 {
8657 iconv_t cd = iconv_open("","");
8658 iconv(cd,NULL,NULL,NULL,NULL);
8659 iconv_close(cd);
8660 ;
8661 return 0;
8662 }
8663 _ACEOF
8664 if ac_fn_c_try_link "$LINENO"; then :
8665 am_cv_lib_iconv=yes
8666 am_cv_func_iconv=yes
8667 fi
8668 rm -f core conftest.err conftest.$ac_objext \
8669 conftest$ac_exeext conftest.$ac_ext
8670 CPPFLAGS="$am_save_CPPFLAGS"
8671 LIBS="$am_save_LIBS"
8672 fi
8673
8674 fi
8675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8676 $as_echo "$am_cv_func_iconv" >&6; }
8677 if test "$am_cv_func_iconv" = yes; then
8678
8679 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8680
8681 fi
8682 if test "$am_cv_lib_iconv" = yes; then
8683
8684 for element in $INCICONV; do
8685 haveit=
8686 for x in $CPPFLAGS; do
8687
8688 acl_save_prefix="$prefix"
8689 prefix="$acl_final_prefix"
8690 acl_save_exec_prefix="$exec_prefix"
8691 exec_prefix="$acl_final_exec_prefix"
8692 eval x=\"$x\"
8693 exec_prefix="$acl_save_exec_prefix"
8694 prefix="$acl_save_prefix"
8695
8696 if test "X$x" = "X$element"; then
8697 haveit=yes
8698 break
8699 fi
8700 done
8701 if test -z "$haveit"; then
8702 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8703 fi
8704 done
8705
8706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8707 $as_echo_n "checking how to link with libiconv... " >&6; }
8708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8709 $as_echo "$LIBICONV" >&6; }
8710 else
8711 LIBICONV=
8712 LTLIBICONV=
8713 fi
8714
8715
8716
8717 if test "$am_cv_func_iconv" = yes; then
8718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8719 $as_echo_n "checking for iconv declaration... " >&6; }
8720 if ${am_cv_proto_iconv+:} false; then :
8721 $as_echo_n "(cached) " >&6
8722 else
8723
8724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8725 /* end confdefs.h. */
8726
8727 #include <stdlib.h>
8728 #include <iconv.h>
8729 extern
8730 #ifdef __cplusplus
8731 "C"
8732 #endif
8733 #if defined(__STDC__) || defined(__cplusplus)
8734 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8735 #else
8736 size_t iconv();
8737 #endif
8738
8739 int
8740 main ()
8741 {
8742
8743 ;
8744 return 0;
8745 }
8746 _ACEOF
8747 if ac_fn_c_try_compile "$LINENO"; then :
8748 am_cv_proto_iconv_arg1=""
8749 else
8750 am_cv_proto_iconv_arg1="const"
8751 fi
8752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8753 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);"
8754 fi
8755
8756 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8758 }$am_cv_proto_iconv" >&5
8759 $as_echo "${ac_t:-
8760 }$am_cv_proto_iconv" >&6; }
8761
8762 cat >>confdefs.h <<_ACEOF
8763 #define ICONV_CONST $am_cv_proto_iconv_arg1
8764 _ACEOF
8765
8766 fi
8767
8768
8769 # GDB may fork/exec the iconv program to get the list of supported character
8770 # sets. Allow the user to specify where to find it.
8771 # There are several factors affecting the choice of option name:
8772 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8773 # the build-time location of libiconv files.
8774 # - The program we need to find is iconv, which comes with glibc. The user
8775 # doesn't necessarily have libiconv installed. Therefore naming this
8776 # --with-libiconv-foo feels wrong.
8777 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8778 # defined to work on directories not files (though it really doesn't know
8779 # the difference).
8780 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8781 # with --with-libiconv-prefix.
8782 # Putting these together is why the option name is --with-iconv-bin.
8783
8784
8785 # Check whether --with-iconv-bin was given.
8786 if test "${with_iconv_bin+set}" = set; then :
8787 withval=$with_iconv_bin; iconv_bin="${withval}"
8788
8789 cat >>confdefs.h <<_ACEOF
8790 #define ICONV_BIN "${iconv_bin}"
8791 _ACEOF
8792
8793
8794 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8795 if test "x$prefix" = xNONE; then
8796 test_prefix=/usr/local
8797 else
8798 test_prefix=$prefix
8799 fi
8800 else
8801 test_prefix=$exec_prefix
8802 fi
8803 value=0
8804 case ${iconv_bin} in
8805 "${test_prefix}"|"${test_prefix}/"*|\
8806 '${exec_prefix}'|'${exec_prefix}/'*)
8807 value=1
8808 ;;
8809 esac
8810
8811 cat >>confdefs.h <<_ACEOF
8812 #define ICONV_BIN_RELOCATABLE $value
8813 _ACEOF
8814
8815
8816
8817 fi
8818
8819
8820 # For the TUI, we need enhanced curses functionality.
8821 if test x"$enable_tui" != xno; then
8822 prefer_curses=yes
8823 fi
8824
8825 curses_found=no
8826 if test x"$prefer_curses" = xyes; then
8827 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8828 # curses library because the latter might not provide all the
8829 # functionality we need. However, this leads to problems on systems
8830 # where the linker searches /usr/local/lib, but the compiler doesn't
8831 # search /usr/local/include, if ncurses is installed in /usr/local. A
8832 # default installation of ncurses on alpha*-dec-osf* will lead to such
8833 # a situation.
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8835 $as_echo_n "checking for library containing waddstr... " >&6; }
8836 if ${ac_cv_search_waddstr+:} false; then :
8837 $as_echo_n "(cached) " >&6
8838 else
8839 ac_func_search_save_LIBS=$LIBS
8840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8841 /* end confdefs.h. */
8842
8843 /* Override any GCC internal prototype to avoid an error.
8844 Use char because int might match the return type of a GCC
8845 builtin and then its argument prototype would still apply. */
8846 #ifdef __cplusplus
8847 extern "C"
8848 #endif
8849 char waddstr ();
8850 int
8851 main ()
8852 {
8853 return waddstr ();
8854 ;
8855 return 0;
8856 }
8857 _ACEOF
8858 for ac_lib in '' ncursesw ncurses cursesX curses; do
8859 if test -z "$ac_lib"; then
8860 ac_res="none required"
8861 else
8862 ac_res=-l$ac_lib
8863 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8864 fi
8865 if ac_fn_c_try_link "$LINENO"; then :
8866 ac_cv_search_waddstr=$ac_res
8867 fi
8868 rm -f core conftest.err conftest.$ac_objext \
8869 conftest$ac_exeext
8870 if ${ac_cv_search_waddstr+:} false; then :
8871 break
8872 fi
8873 done
8874 if ${ac_cv_search_waddstr+:} false; then :
8875
8876 else
8877 ac_cv_search_waddstr=no
8878 fi
8879 rm conftest.$ac_ext
8880 LIBS=$ac_func_search_save_LIBS
8881 fi
8882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8883 $as_echo "$ac_cv_search_waddstr" >&6; }
8884 ac_res=$ac_cv_search_waddstr
8885 if test "$ac_res" != no; then :
8886 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8887
8888 fi
8889
8890
8891 if test "$ac_cv_search_waddstr" != no; then
8892 curses_found=yes
8893 fi
8894 fi
8895
8896 # Check whether we should enable the TUI, but only do so if we really
8897 # can.
8898 if test x"$enable_tui" != xno; then
8899 if test -d "$srcdir/tui"; then
8900 if test "$curses_found" != no; then
8901 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8902 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8903 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8904 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8905 else
8906 if test x"$enable_tui" = xyes; then
8907 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8908 else
8909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8910 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8911 fi
8912 fi
8913 fi
8914 fi
8915
8916 # Since GDB uses Readline, we need termcap functionality. In many
8917 # cases this will be provided by the curses library, but some systems
8918 # have a separate termcap library, or no curses library at all.
8919
8920 case $host_os in
8921 cygwin*)
8922 if test -d "$srcdir/libtermcap"; then
8923 LIBS="../libtermcap/libtermcap.a $LIBS"
8924 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8925 fi ;;
8926 go32* | *djgpp*)
8927 ac_cv_search_tgetent="none required"
8928 ;;
8929 esac
8930
8931 # These are the libraries checked by Readline.
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8933 $as_echo_n "checking for library containing tgetent... " >&6; }
8934 if ${ac_cv_search_tgetent+:} false; then :
8935 $as_echo_n "(cached) " >&6
8936 else
8937 ac_func_search_save_LIBS=$LIBS
8938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8939 /* end confdefs.h. */
8940
8941 /* Override any GCC internal prototype to avoid an error.
8942 Use char because int might match the return type of a GCC
8943 builtin and then its argument prototype would still apply. */
8944 #ifdef __cplusplus
8945 extern "C"
8946 #endif
8947 char tgetent ();
8948 int
8949 main ()
8950 {
8951 return tgetent ();
8952 ;
8953 return 0;
8954 }
8955 _ACEOF
8956 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
8957 if test -z "$ac_lib"; then
8958 ac_res="none required"
8959 else
8960 ac_res=-l$ac_lib
8961 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8962 fi
8963 if ac_fn_c_try_link "$LINENO"; then :
8964 ac_cv_search_tgetent=$ac_res
8965 fi
8966 rm -f core conftest.err conftest.$ac_objext \
8967 conftest$ac_exeext
8968 if ${ac_cv_search_tgetent+:} false; then :
8969 break
8970 fi
8971 done
8972 if ${ac_cv_search_tgetent+:} false; then :
8973
8974 else
8975 ac_cv_search_tgetent=no
8976 fi
8977 rm conftest.$ac_ext
8978 LIBS=$ac_func_search_save_LIBS
8979 fi
8980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8981 $as_echo "$ac_cv_search_tgetent" >&6; }
8982 ac_res=$ac_cv_search_tgetent
8983 if test "$ac_res" != no; then :
8984 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8985
8986 fi
8987
8988
8989 if test "$ac_cv_search_tgetent" = no; then
8990 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8991 fi
8992
8993
8994 # Check whether --with-system-readline was given.
8995 if test "${with_system_readline+set}" = set; then :
8996 withval=$with_system_readline;
8997 fi
8998
8999
9000 if test "$with_system_readline" = yes; then
9001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9002 $as_echo_n "checking whether system readline is new enough... " >&6; }
9003 if ${gdb_cv_readline_ok+:} false; then :
9004 $as_echo_n "(cached) " >&6
9005 else
9006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9007 /* end confdefs.h. */
9008 #include <stdio.h>
9009 #include <readline/readline.h>
9010 int
9011 main ()
9012 {
9013 #if RL_VERSION_MAJOR < 7
9014 # error "readline version 7 required"
9015 #endif
9016 ;
9017 return 0;
9018 }
9019 _ACEOF
9020 if ac_fn_c_try_compile "$LINENO"; then :
9021 gdb_cv_readline_ok=yes
9022 else
9023 gdb_cv_readline_ok=no
9024 fi
9025 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9026 fi
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9028 $as_echo "$gdb_cv_readline_ok" >&6; }
9029 if test "$gdb_cv_readline_ok" != yes; then
9030 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9031 fi
9032
9033 READLINE=-lreadline
9034 READLINE_DEPS=
9035 READLINE_CFLAGS=
9036 READLINE_TEXI_INCFLAG=
9037 else
9038 READLINE='$(READLINE_DIR)/libreadline.a'
9039 READLINE_DEPS='$(READLINE)'
9040 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9041 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9042 fi
9043
9044
9045
9046
9047
9048 # Generate jit-reader.h
9049
9050 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9051 TARGET_PTR=
9052
9053 # The cast to long int works around a bug in the HP C Compiler
9054 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9055 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9056 # This bug is HP SR number 8606223364.
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9058 $as_echo_n "checking size of unsigned long long... " >&6; }
9059 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9060 $as_echo_n "(cached) " >&6
9061 else
9062 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9063
9064 else
9065 if test "$ac_cv_type_unsigned_long_long" = yes; then
9066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9067 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9068 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9069 See \`config.log' for more details" "$LINENO" 5; }
9070 else
9071 ac_cv_sizeof_unsigned_long_long=0
9072 fi
9073 fi
9074
9075 fi
9076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9077 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9078
9079
9080
9081 cat >>confdefs.h <<_ACEOF
9082 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9083 _ACEOF
9084
9085
9086 # The cast to long int works around a bug in the HP C Compiler
9087 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9088 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9089 # This bug is HP SR number 8606223364.
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9091 $as_echo_n "checking size of unsigned long... " >&6; }
9092 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9093 $as_echo_n "(cached) " >&6
9094 else
9095 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9096
9097 else
9098 if test "$ac_cv_type_unsigned_long" = yes; then
9099 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9100 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9101 as_fn_error 77 "cannot compute sizeof (unsigned long)
9102 See \`config.log' for more details" "$LINENO" 5; }
9103 else
9104 ac_cv_sizeof_unsigned_long=0
9105 fi
9106 fi
9107
9108 fi
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9110 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9111
9112
9113
9114 cat >>confdefs.h <<_ACEOF
9115 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9116 _ACEOF
9117
9118
9119 # The cast to long int works around a bug in the HP C Compiler
9120 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9121 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9122 # This bug is HP SR number 8606223364.
9123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9124 $as_echo_n "checking size of unsigned __int128... " >&6; }
9125 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9126 $as_echo_n "(cached) " >&6
9127 else
9128 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9129
9130 else
9131 if test "$ac_cv_type_unsigned___int128" = yes; then
9132 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9133 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9134 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9135 See \`config.log' for more details" "$LINENO" 5; }
9136 else
9137 ac_cv_sizeof_unsigned___int128=0
9138 fi
9139 fi
9140
9141 fi
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9143 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9144
9145
9146
9147 cat >>confdefs.h <<_ACEOF
9148 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9149 _ACEOF
9150
9151
9152
9153 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9154 TARGET_PTR="unsigned long"
9155 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9156 TARGET_PTR="unsigned long long"
9157 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9158 TARGET_PTR="unsigned __int128"
9159 else
9160 TARGET_PTR="unsigned long"
9161 fi
9162
9163
9164 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9165
9166
9167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9168 $as_echo_n "checking for library containing dlopen... " >&6; }
9169 if ${ac_cv_search_dlopen+:} false; then :
9170 $as_echo_n "(cached) " >&6
9171 else
9172 ac_func_search_save_LIBS=$LIBS
9173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9174 /* end confdefs.h. */
9175
9176 /* Override any GCC internal prototype to avoid an error.
9177 Use char because int might match the return type of a GCC
9178 builtin and then its argument prototype would still apply. */
9179 #ifdef __cplusplus
9180 extern "C"
9181 #endif
9182 char dlopen ();
9183 int
9184 main ()
9185 {
9186 return dlopen ();
9187 ;
9188 return 0;
9189 }
9190 _ACEOF
9191 for ac_lib in '' dl; do
9192 if test -z "$ac_lib"; then
9193 ac_res="none required"
9194 else
9195 ac_res=-l$ac_lib
9196 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9197 fi
9198 if ac_fn_c_try_link "$LINENO"; then :
9199 ac_cv_search_dlopen=$ac_res
9200 fi
9201 rm -f core conftest.err conftest.$ac_objext \
9202 conftest$ac_exeext
9203 if ${ac_cv_search_dlopen+:} false; then :
9204 break
9205 fi
9206 done
9207 if ${ac_cv_search_dlopen+:} false; then :
9208
9209 else
9210 ac_cv_search_dlopen=no
9211 fi
9212 rm conftest.$ac_ext
9213 LIBS=$ac_func_search_save_LIBS
9214 fi
9215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9216 $as_echo "$ac_cv_search_dlopen" >&6; }
9217 ac_res=$ac_cv_search_dlopen
9218 if test "$ac_res" != no; then :
9219 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9220
9221 fi
9222
9223
9224
9225
9226 # Check whether --with-jit-reader-dir was given.
9227 if test "${with_jit_reader_dir+set}" = set; then :
9228 withval=$with_jit_reader_dir;
9229 JIT_READER_DIR=$withval
9230 else
9231 JIT_READER_DIR=${libdir}/gdb
9232 fi
9233
9234
9235 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9236 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9237 ac_define_dir=`eval echo $JIT_READER_DIR`
9238 ac_define_dir=`eval echo $ac_define_dir`
9239
9240 cat >>confdefs.h <<_ACEOF
9241 #define JIT_READER_DIR "$ac_define_dir"
9242 _ACEOF
9243
9244
9245
9246
9247 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9248 if test "x$prefix" = xNONE; then
9249 test_prefix=/usr/local
9250 else
9251 test_prefix=$prefix
9252 fi
9253 else
9254 test_prefix=$exec_prefix
9255 fi
9256 value=0
9257 case ${ac_define_dir} in
9258 "${test_prefix}"|"${test_prefix}/"*|\
9259 '${exec_prefix}'|'${exec_prefix}/'*)
9260 value=1
9261 ;;
9262 esac
9263
9264 cat >>confdefs.h <<_ACEOF
9265 #define JIT_READER_DIR_RELOCATABLE $value
9266 _ACEOF
9267
9268
9269
9270
9271
9272 # Check whether --with-expat was given.
9273 if test "${with_expat+set}" = set; then :
9274 withval=$with_expat;
9275 else
9276 with_expat=auto
9277 fi
9278
9279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9280 $as_echo_n "checking whether to use expat... " >&6; }
9281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9282 $as_echo "$with_expat" >&6; }
9283
9284 if test "${with_expat}" = no; then
9285 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9286 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9287 HAVE_LIBEXPAT=no
9288 else
9289
9290
9291
9292
9293
9294
9295
9296
9297 use_additional=yes
9298
9299 acl_save_prefix="$prefix"
9300 prefix="$acl_final_prefix"
9301 acl_save_exec_prefix="$exec_prefix"
9302 exec_prefix="$acl_final_exec_prefix"
9303
9304 eval additional_includedir=\"$includedir\"
9305 eval additional_libdir=\"$libdir\"
9306
9307 exec_prefix="$acl_save_exec_prefix"
9308 prefix="$acl_save_prefix"
9309
9310
9311 # Check whether --with-libexpat-prefix was given.
9312 if test "${with_libexpat_prefix+set}" = set; then :
9313 withval=$with_libexpat_prefix;
9314 if test "X$withval" = "Xno"; then
9315 use_additional=no
9316 else
9317 if test "X$withval" = "X"; then
9318
9319 acl_save_prefix="$prefix"
9320 prefix="$acl_final_prefix"
9321 acl_save_exec_prefix="$exec_prefix"
9322 exec_prefix="$acl_final_exec_prefix"
9323
9324 eval additional_includedir=\"$includedir\"
9325 eval additional_libdir=\"$libdir\"
9326
9327 exec_prefix="$acl_save_exec_prefix"
9328 prefix="$acl_save_prefix"
9329
9330 else
9331 additional_includedir="$withval/include"
9332 additional_libdir="$withval/lib"
9333 fi
9334 fi
9335
9336 fi
9337
9338
9339 # Check whether --with-libexpat-type was given.
9340 if test "${with_libexpat_type+set}" = set; then :
9341 withval=$with_libexpat_type; with_libexpat_type=$withval
9342 else
9343 with_libexpat_type=auto
9344 fi
9345
9346 lib_type=`eval echo \$with_libexpat_type`
9347
9348 LIBEXPAT=
9349 LTLIBEXPAT=
9350 INCEXPAT=
9351 rpathdirs=
9352 ltrpathdirs=
9353 names_already_handled=
9354 names_next_round='expat '
9355 while test -n "$names_next_round"; do
9356 names_this_round="$names_next_round"
9357 names_next_round=
9358 for name in $names_this_round; do
9359 already_handled=
9360 for n in $names_already_handled; do
9361 if test "$n" = "$name"; then
9362 already_handled=yes
9363 break
9364 fi
9365 done
9366 if test -z "$already_handled"; then
9367 names_already_handled="$names_already_handled $name"
9368 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9369 eval value=\"\$HAVE_LIB$uppername\"
9370 if test -n "$value"; then
9371 if test "$value" = yes; then
9372 eval value=\"\$LIB$uppername\"
9373 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9374 eval value=\"\$LTLIB$uppername\"
9375 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9376 else
9377 :
9378 fi
9379 else
9380 found_dir=
9381 found_la=
9382 found_so=
9383 found_a=
9384 if test $use_additional = yes; then
9385 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9386 found_dir="$additional_libdir"
9387 found_so="$additional_libdir/lib$name.$shlibext"
9388 if test -f "$additional_libdir/lib$name.la"; then
9389 found_la="$additional_libdir/lib$name.la"
9390 fi
9391 elif test x$lib_type != xshared; then
9392 if test -f "$additional_libdir/lib$name.$libext"; then
9393 found_dir="$additional_libdir"
9394 found_a="$additional_libdir/lib$name.$libext"
9395 if test -f "$additional_libdir/lib$name.la"; then
9396 found_la="$additional_libdir/lib$name.la"
9397 fi
9398 fi
9399 fi
9400 fi
9401 if test "X$found_dir" = "X"; then
9402 for x in $LDFLAGS $LTLIBEXPAT; do
9403
9404 acl_save_prefix="$prefix"
9405 prefix="$acl_final_prefix"
9406 acl_save_exec_prefix="$exec_prefix"
9407 exec_prefix="$acl_final_exec_prefix"
9408 eval x=\"$x\"
9409 exec_prefix="$acl_save_exec_prefix"
9410 prefix="$acl_save_prefix"
9411
9412 case "$x" in
9413 -L*)
9414 dir=`echo "X$x" | sed -e 's/^X-L//'`
9415 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9416 found_dir="$dir"
9417 found_so="$dir/lib$name.$shlibext"
9418 if test -f "$dir/lib$name.la"; then
9419 found_la="$dir/lib$name.la"
9420 fi
9421 elif test x$lib_type != xshared; then
9422 if test -f "$dir/lib$name.$libext"; then
9423 found_dir="$dir"
9424 found_a="$dir/lib$name.$libext"
9425 if test -f "$dir/lib$name.la"; then
9426 found_la="$dir/lib$name.la"
9427 fi
9428 fi
9429 fi
9430 ;;
9431 esac
9432 if test "X$found_dir" != "X"; then
9433 break
9434 fi
9435 done
9436 fi
9437 if test "X$found_dir" != "X"; then
9438 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9439 if test "X$found_so" != "X"; then
9440 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9441 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9442 else
9443 haveit=
9444 for x in $ltrpathdirs; do
9445 if test "X$x" = "X$found_dir"; then
9446 haveit=yes
9447 break
9448 fi
9449 done
9450 if test -z "$haveit"; then
9451 ltrpathdirs="$ltrpathdirs $found_dir"
9452 fi
9453 if test "$hardcode_direct" = yes; then
9454 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9455 else
9456 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9457 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9458 haveit=
9459 for x in $rpathdirs; do
9460 if test "X$x" = "X$found_dir"; then
9461 haveit=yes
9462 break
9463 fi
9464 done
9465 if test -z "$haveit"; then
9466 rpathdirs="$rpathdirs $found_dir"
9467 fi
9468 else
9469 haveit=
9470 for x in $LDFLAGS $LIBEXPAT; do
9471
9472 acl_save_prefix="$prefix"
9473 prefix="$acl_final_prefix"
9474 acl_save_exec_prefix="$exec_prefix"
9475 exec_prefix="$acl_final_exec_prefix"
9476 eval x=\"$x\"
9477 exec_prefix="$acl_save_exec_prefix"
9478 prefix="$acl_save_prefix"
9479
9480 if test "X$x" = "X-L$found_dir"; then
9481 haveit=yes
9482 break
9483 fi
9484 done
9485 if test -z "$haveit"; then
9486 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9487 fi
9488 if test "$hardcode_minus_L" != no; then
9489 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9490 else
9491 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9492 fi
9493 fi
9494 fi
9495 fi
9496 else
9497 if test "X$found_a" != "X"; then
9498 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9499 else
9500 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9501 fi
9502 fi
9503 additional_includedir=
9504 case "$found_dir" in
9505 */lib | */lib/)
9506 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9507 additional_includedir="$basedir/include"
9508 ;;
9509 esac
9510 if test "X$additional_includedir" != "X"; then
9511 if test "X$additional_includedir" != "X/usr/include"; then
9512 haveit=
9513 if test "X$additional_includedir" = "X/usr/local/include"; then
9514 if test -n "$GCC"; then
9515 case $host_os in
9516 linux*) haveit=yes;;
9517 esac
9518 fi
9519 fi
9520 if test -z "$haveit"; then
9521 for x in $CPPFLAGS $INCEXPAT; do
9522
9523 acl_save_prefix="$prefix"
9524 prefix="$acl_final_prefix"
9525 acl_save_exec_prefix="$exec_prefix"
9526 exec_prefix="$acl_final_exec_prefix"
9527 eval x=\"$x\"
9528 exec_prefix="$acl_save_exec_prefix"
9529 prefix="$acl_save_prefix"
9530
9531 if test "X$x" = "X-I$additional_includedir"; then
9532 haveit=yes
9533 break
9534 fi
9535 done
9536 if test -z "$haveit"; then
9537 if test -d "$additional_includedir"; then
9538 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9539 fi
9540 fi
9541 fi
9542 fi
9543 fi
9544 if test -n "$found_la"; then
9545 save_libdir="$libdir"
9546 case "$found_la" in
9547 */* | *\\*) . "$found_la" ;;
9548 *) . "./$found_la" ;;
9549 esac
9550 libdir="$save_libdir"
9551 for dep in $dependency_libs; do
9552 case "$dep" in
9553 -L*)
9554 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9555 if test "X$additional_libdir" != "X/usr/lib"; then
9556 haveit=
9557 if test "X$additional_libdir" = "X/usr/local/lib"; then
9558 if test -n "$GCC"; then
9559 case $host_os in
9560 linux*) haveit=yes;;
9561 esac
9562 fi
9563 fi
9564 if test -z "$haveit"; then
9565 haveit=
9566 for x in $LDFLAGS $LIBEXPAT; do
9567
9568 acl_save_prefix="$prefix"
9569 prefix="$acl_final_prefix"
9570 acl_save_exec_prefix="$exec_prefix"
9571 exec_prefix="$acl_final_exec_prefix"
9572 eval x=\"$x\"
9573 exec_prefix="$acl_save_exec_prefix"
9574 prefix="$acl_save_prefix"
9575
9576 if test "X$x" = "X-L$additional_libdir"; then
9577 haveit=yes
9578 break
9579 fi
9580 done
9581 if test -z "$haveit"; then
9582 if test -d "$additional_libdir"; then
9583 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9584 fi
9585 fi
9586 haveit=
9587 for x in $LDFLAGS $LTLIBEXPAT; do
9588
9589 acl_save_prefix="$prefix"
9590 prefix="$acl_final_prefix"
9591 acl_save_exec_prefix="$exec_prefix"
9592 exec_prefix="$acl_final_exec_prefix"
9593 eval x=\"$x\"
9594 exec_prefix="$acl_save_exec_prefix"
9595 prefix="$acl_save_prefix"
9596
9597 if test "X$x" = "X-L$additional_libdir"; then
9598 haveit=yes
9599 break
9600 fi
9601 done
9602 if test -z "$haveit"; then
9603 if test -d "$additional_libdir"; then
9604 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9605 fi
9606 fi
9607 fi
9608 fi
9609 ;;
9610 -R*)
9611 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9612 if test "$enable_rpath" != no; then
9613 haveit=
9614 for x in $rpathdirs; do
9615 if test "X$x" = "X$dir"; then
9616 haveit=yes
9617 break
9618 fi
9619 done
9620 if test -z "$haveit"; then
9621 rpathdirs="$rpathdirs $dir"
9622 fi
9623 haveit=
9624 for x in $ltrpathdirs; do
9625 if test "X$x" = "X$dir"; then
9626 haveit=yes
9627 break
9628 fi
9629 done
9630 if test -z "$haveit"; then
9631 ltrpathdirs="$ltrpathdirs $dir"
9632 fi
9633 fi
9634 ;;
9635 -l*)
9636 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9637 ;;
9638 *.la)
9639 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9640 ;;
9641 *)
9642 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9643 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9644 ;;
9645 esac
9646 done
9647 fi
9648 else
9649 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9650 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9651 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9652 else
9653 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9654 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9655 fi
9656 fi
9657 fi
9658 fi
9659 done
9660 done
9661 if test "X$rpathdirs" != "X"; then
9662 if test -n "$hardcode_libdir_separator"; then
9663 alldirs=
9664 for found_dir in $rpathdirs; do
9665 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9666 done
9667 acl_save_libdir="$libdir"
9668 libdir="$alldirs"
9669 eval flag=\"$hardcode_libdir_flag_spec\"
9670 libdir="$acl_save_libdir"
9671 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9672 else
9673 for found_dir in $rpathdirs; do
9674 acl_save_libdir="$libdir"
9675 libdir="$found_dir"
9676 eval flag=\"$hardcode_libdir_flag_spec\"
9677 libdir="$acl_save_libdir"
9678 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9679 done
9680 fi
9681 fi
9682 if test "X$ltrpathdirs" != "X"; then
9683 for found_dir in $ltrpathdirs; do
9684 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9685 done
9686 fi
9687
9688
9689 ac_save_CPPFLAGS="$CPPFLAGS"
9690
9691 for element in $INCEXPAT; do
9692 haveit=
9693 for x in $CPPFLAGS; do
9694
9695 acl_save_prefix="$prefix"
9696 prefix="$acl_final_prefix"
9697 acl_save_exec_prefix="$exec_prefix"
9698 exec_prefix="$acl_final_exec_prefix"
9699 eval x=\"$x\"
9700 exec_prefix="$acl_save_exec_prefix"
9701 prefix="$acl_save_prefix"
9702
9703 if test "X$x" = "X$element"; then
9704 haveit=yes
9705 break
9706 fi
9707 done
9708 if test -z "$haveit"; then
9709 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9710 fi
9711 done
9712
9713
9714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9715 $as_echo_n "checking for libexpat... " >&6; }
9716 if ${ac_cv_libexpat+:} false; then :
9717 $as_echo_n "(cached) " >&6
9718 else
9719
9720 ac_save_LIBS="$LIBS"
9721 LIBS="$LIBS $LIBEXPAT"
9722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9723 /* end confdefs.h. */
9724 #include "expat.h"
9725 int
9726 main ()
9727 {
9728 XML_Parser p = XML_ParserCreate (0);
9729 ;
9730 return 0;
9731 }
9732 _ACEOF
9733 if ac_fn_c_try_link "$LINENO"; then :
9734 ac_cv_libexpat=yes
9735 else
9736 ac_cv_libexpat=no
9737 fi
9738 rm -f core conftest.err conftest.$ac_objext \
9739 conftest$ac_exeext conftest.$ac_ext
9740 LIBS="$ac_save_LIBS"
9741
9742 fi
9743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9744 $as_echo "$ac_cv_libexpat" >&6; }
9745 if test "$ac_cv_libexpat" = yes; then
9746 HAVE_LIBEXPAT=yes
9747
9748 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9749
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9751 $as_echo_n "checking how to link with libexpat... " >&6; }
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9753 $as_echo "$LIBEXPAT" >&6; }
9754 else
9755 HAVE_LIBEXPAT=no
9756 CPPFLAGS="$ac_save_CPPFLAGS"
9757 LIBEXPAT=
9758 LTLIBEXPAT=
9759 fi
9760
9761
9762
9763
9764
9765
9766 if test "$HAVE_LIBEXPAT" != yes; then
9767 if test "$with_expat" = yes; then
9768 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9769 else
9770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9771 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9772 fi
9773 else
9774 save_LIBS=$LIBS
9775 LIBS="$LIBS $LIBEXPAT"
9776 for ac_func in XML_StopParser
9777 do :
9778 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9779 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9780 cat >>confdefs.h <<_ACEOF
9781 #define HAVE_XML_STOPPARSER 1
9782 _ACEOF
9783
9784 fi
9785 done
9786
9787 LIBS=$save_LIBS
9788 fi
9789 fi
9790
9791
9792 # Check whether --with-mpfr was given.
9793 if test "${with_mpfr+set}" = set; then :
9794 withval=$with_mpfr;
9795 else
9796 with_mpfr=auto
9797 fi
9798
9799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9800 $as_echo_n "checking whether to use MPFR... " >&6; }
9801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9802 $as_echo "$with_mpfr" >&6; }
9803
9804 if test "${with_mpfr}" = no; then
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9806 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9807 HAVE_LIBMPFR=no
9808 else
9809
9810
9811
9812
9813
9814
9815
9816
9817 use_additional=yes
9818
9819 acl_save_prefix="$prefix"
9820 prefix="$acl_final_prefix"
9821 acl_save_exec_prefix="$exec_prefix"
9822 exec_prefix="$acl_final_exec_prefix"
9823
9824 eval additional_includedir=\"$includedir\"
9825 eval additional_libdir=\"$libdir\"
9826
9827 exec_prefix="$acl_save_exec_prefix"
9828 prefix="$acl_save_prefix"
9829
9830
9831 # Check whether --with-libmpfr-prefix was given.
9832 if test "${with_libmpfr_prefix+set}" = set; then :
9833 withval=$with_libmpfr_prefix;
9834 if test "X$withval" = "Xno"; then
9835 use_additional=no
9836 else
9837 if test "X$withval" = "X"; then
9838
9839 acl_save_prefix="$prefix"
9840 prefix="$acl_final_prefix"
9841 acl_save_exec_prefix="$exec_prefix"
9842 exec_prefix="$acl_final_exec_prefix"
9843
9844 eval additional_includedir=\"$includedir\"
9845 eval additional_libdir=\"$libdir\"
9846
9847 exec_prefix="$acl_save_exec_prefix"
9848 prefix="$acl_save_prefix"
9849
9850 else
9851 additional_includedir="$withval/include"
9852 additional_libdir="$withval/lib"
9853 fi
9854 fi
9855
9856 fi
9857
9858
9859 # Check whether --with-libmpfr-type was given.
9860 if test "${with_libmpfr_type+set}" = set; then :
9861 withval=$with_libmpfr_type; with_libmpfr_type=$withval
9862 else
9863 with_libmpfr_type=auto
9864 fi
9865
9866 lib_type=`eval echo \$with_libmpfr_type`
9867
9868 LIBMPFR=
9869 LTLIBMPFR=
9870 INCMPFR=
9871 rpathdirs=
9872 ltrpathdirs=
9873 names_already_handled=
9874 names_next_round='mpfr gmp'
9875 while test -n "$names_next_round"; do
9876 names_this_round="$names_next_round"
9877 names_next_round=
9878 for name in $names_this_round; do
9879 already_handled=
9880 for n in $names_already_handled; do
9881 if test "$n" = "$name"; then
9882 already_handled=yes
9883 break
9884 fi
9885 done
9886 if test -z "$already_handled"; then
9887 names_already_handled="$names_already_handled $name"
9888 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9889 eval value=\"\$HAVE_LIB$uppername\"
9890 if test -n "$value"; then
9891 if test "$value" = yes; then
9892 eval value=\"\$LIB$uppername\"
9893 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9894 eval value=\"\$LTLIB$uppername\"
9895 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9896 else
9897 :
9898 fi
9899 else
9900 found_dir=
9901 found_la=
9902 found_so=
9903 found_a=
9904 if test $use_additional = yes; then
9905 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9906 found_dir="$additional_libdir"
9907 found_so="$additional_libdir/lib$name.$shlibext"
9908 if test -f "$additional_libdir/lib$name.la"; then
9909 found_la="$additional_libdir/lib$name.la"
9910 fi
9911 elif test x$lib_type != xshared; then
9912 if test -f "$additional_libdir/lib$name.$libext"; then
9913 found_dir="$additional_libdir"
9914 found_a="$additional_libdir/lib$name.$libext"
9915 if test -f "$additional_libdir/lib$name.la"; then
9916 found_la="$additional_libdir/lib$name.la"
9917 fi
9918 fi
9919 fi
9920 fi
9921 if test "X$found_dir" = "X"; then
9922 for x in $LDFLAGS $LTLIBMPFR; do
9923
9924 acl_save_prefix="$prefix"
9925 prefix="$acl_final_prefix"
9926 acl_save_exec_prefix="$exec_prefix"
9927 exec_prefix="$acl_final_exec_prefix"
9928 eval x=\"$x\"
9929 exec_prefix="$acl_save_exec_prefix"
9930 prefix="$acl_save_prefix"
9931
9932 case "$x" in
9933 -L*)
9934 dir=`echo "X$x" | sed -e 's/^X-L//'`
9935 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9936 found_dir="$dir"
9937 found_so="$dir/lib$name.$shlibext"
9938 if test -f "$dir/lib$name.la"; then
9939 found_la="$dir/lib$name.la"
9940 fi
9941 elif test x$lib_type != xshared; then
9942 if test -f "$dir/lib$name.$libext"; then
9943 found_dir="$dir"
9944 found_a="$dir/lib$name.$libext"
9945 if test -f "$dir/lib$name.la"; then
9946 found_la="$dir/lib$name.la"
9947 fi
9948 fi
9949 fi
9950 ;;
9951 esac
9952 if test "X$found_dir" != "X"; then
9953 break
9954 fi
9955 done
9956 fi
9957 if test "X$found_dir" != "X"; then
9958 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9959 if test "X$found_so" != "X"; then
9960 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9961 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9962 else
9963 haveit=
9964 for x in $ltrpathdirs; do
9965 if test "X$x" = "X$found_dir"; then
9966 haveit=yes
9967 break
9968 fi
9969 done
9970 if test -z "$haveit"; then
9971 ltrpathdirs="$ltrpathdirs $found_dir"
9972 fi
9973 if test "$hardcode_direct" = yes; then
9974 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9975 else
9976 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9977 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9978 haveit=
9979 for x in $rpathdirs; do
9980 if test "X$x" = "X$found_dir"; then
9981 haveit=yes
9982 break
9983 fi
9984 done
9985 if test -z "$haveit"; then
9986 rpathdirs="$rpathdirs $found_dir"
9987 fi
9988 else
9989 haveit=
9990 for x in $LDFLAGS $LIBMPFR; do
9991
9992 acl_save_prefix="$prefix"
9993 prefix="$acl_final_prefix"
9994 acl_save_exec_prefix="$exec_prefix"
9995 exec_prefix="$acl_final_exec_prefix"
9996 eval x=\"$x\"
9997 exec_prefix="$acl_save_exec_prefix"
9998 prefix="$acl_save_prefix"
9999
10000 if test "X$x" = "X-L$found_dir"; then
10001 haveit=yes
10002 break
10003 fi
10004 done
10005 if test -z "$haveit"; then
10006 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10007 fi
10008 if test "$hardcode_minus_L" != no; then
10009 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10010 else
10011 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10012 fi
10013 fi
10014 fi
10015 fi
10016 else
10017 if test "X$found_a" != "X"; then
10018 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10019 else
10020 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10021 fi
10022 fi
10023 additional_includedir=
10024 case "$found_dir" in
10025 */lib | */lib/)
10026 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10027 additional_includedir="$basedir/include"
10028 ;;
10029 esac
10030 if test "X$additional_includedir" != "X"; then
10031 if test "X$additional_includedir" != "X/usr/include"; then
10032 haveit=
10033 if test "X$additional_includedir" = "X/usr/local/include"; then
10034 if test -n "$GCC"; then
10035 case $host_os in
10036 linux*) haveit=yes;;
10037 esac
10038 fi
10039 fi
10040 if test -z "$haveit"; then
10041 for x in $CPPFLAGS $INCMPFR; do
10042
10043 acl_save_prefix="$prefix"
10044 prefix="$acl_final_prefix"
10045 acl_save_exec_prefix="$exec_prefix"
10046 exec_prefix="$acl_final_exec_prefix"
10047 eval x=\"$x\"
10048 exec_prefix="$acl_save_exec_prefix"
10049 prefix="$acl_save_prefix"
10050
10051 if test "X$x" = "X-I$additional_includedir"; then
10052 haveit=yes
10053 break
10054 fi
10055 done
10056 if test -z "$haveit"; then
10057 if test -d "$additional_includedir"; then
10058 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10059 fi
10060 fi
10061 fi
10062 fi
10063 fi
10064 if test -n "$found_la"; then
10065 save_libdir="$libdir"
10066 case "$found_la" in
10067 */* | *\\*) . "$found_la" ;;
10068 *) . "./$found_la" ;;
10069 esac
10070 libdir="$save_libdir"
10071 for dep in $dependency_libs; do
10072 case "$dep" in
10073 -L*)
10074 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10075 if test "X$additional_libdir" != "X/usr/lib"; then
10076 haveit=
10077 if test "X$additional_libdir" = "X/usr/local/lib"; then
10078 if test -n "$GCC"; then
10079 case $host_os in
10080 linux*) haveit=yes;;
10081 esac
10082 fi
10083 fi
10084 if test -z "$haveit"; then
10085 haveit=
10086 for x in $LDFLAGS $LIBMPFR; do
10087
10088 acl_save_prefix="$prefix"
10089 prefix="$acl_final_prefix"
10090 acl_save_exec_prefix="$exec_prefix"
10091 exec_prefix="$acl_final_exec_prefix"
10092 eval x=\"$x\"
10093 exec_prefix="$acl_save_exec_prefix"
10094 prefix="$acl_save_prefix"
10095
10096 if test "X$x" = "X-L$additional_libdir"; then
10097 haveit=yes
10098 break
10099 fi
10100 done
10101 if test -z "$haveit"; then
10102 if test -d "$additional_libdir"; then
10103 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10104 fi
10105 fi
10106 haveit=
10107 for x in $LDFLAGS $LTLIBMPFR; do
10108
10109 acl_save_prefix="$prefix"
10110 prefix="$acl_final_prefix"
10111 acl_save_exec_prefix="$exec_prefix"
10112 exec_prefix="$acl_final_exec_prefix"
10113 eval x=\"$x\"
10114 exec_prefix="$acl_save_exec_prefix"
10115 prefix="$acl_save_prefix"
10116
10117 if test "X$x" = "X-L$additional_libdir"; then
10118 haveit=yes
10119 break
10120 fi
10121 done
10122 if test -z "$haveit"; then
10123 if test -d "$additional_libdir"; then
10124 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10125 fi
10126 fi
10127 fi
10128 fi
10129 ;;
10130 -R*)
10131 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10132 if test "$enable_rpath" != no; then
10133 haveit=
10134 for x in $rpathdirs; do
10135 if test "X$x" = "X$dir"; then
10136 haveit=yes
10137 break
10138 fi
10139 done
10140 if test -z "$haveit"; then
10141 rpathdirs="$rpathdirs $dir"
10142 fi
10143 haveit=
10144 for x in $ltrpathdirs; do
10145 if test "X$x" = "X$dir"; then
10146 haveit=yes
10147 break
10148 fi
10149 done
10150 if test -z "$haveit"; then
10151 ltrpathdirs="$ltrpathdirs $dir"
10152 fi
10153 fi
10154 ;;
10155 -l*)
10156 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10157 ;;
10158 *.la)
10159 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10160 ;;
10161 *)
10162 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10163 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10164 ;;
10165 esac
10166 done
10167 fi
10168 else
10169 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10170 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10171 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10172 else
10173 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10174 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10175 fi
10176 fi
10177 fi
10178 fi
10179 done
10180 done
10181 if test "X$rpathdirs" != "X"; then
10182 if test -n "$hardcode_libdir_separator"; then
10183 alldirs=
10184 for found_dir in $rpathdirs; do
10185 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10186 done
10187 acl_save_libdir="$libdir"
10188 libdir="$alldirs"
10189 eval flag=\"$hardcode_libdir_flag_spec\"
10190 libdir="$acl_save_libdir"
10191 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10192 else
10193 for found_dir in $rpathdirs; do
10194 acl_save_libdir="$libdir"
10195 libdir="$found_dir"
10196 eval flag=\"$hardcode_libdir_flag_spec\"
10197 libdir="$acl_save_libdir"
10198 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10199 done
10200 fi
10201 fi
10202 if test "X$ltrpathdirs" != "X"; then
10203 for found_dir in $ltrpathdirs; do
10204 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10205 done
10206 fi
10207
10208
10209 ac_save_CPPFLAGS="$CPPFLAGS"
10210
10211 for element in $INCMPFR; do
10212 haveit=
10213 for x in $CPPFLAGS; do
10214
10215 acl_save_prefix="$prefix"
10216 prefix="$acl_final_prefix"
10217 acl_save_exec_prefix="$exec_prefix"
10218 exec_prefix="$acl_final_exec_prefix"
10219 eval x=\"$x\"
10220 exec_prefix="$acl_save_exec_prefix"
10221 prefix="$acl_save_prefix"
10222
10223 if test "X$x" = "X$element"; then
10224 haveit=yes
10225 break
10226 fi
10227 done
10228 if test -z "$haveit"; then
10229 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10230 fi
10231 done
10232
10233
10234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10235 $as_echo_n "checking for libmpfr... " >&6; }
10236 if ${ac_cv_libmpfr+:} false; then :
10237 $as_echo_n "(cached) " >&6
10238 else
10239
10240 ac_save_LIBS="$LIBS"
10241 LIBS="$LIBS $LIBMPFR"
10242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10243 /* end confdefs.h. */
10244 #include <mpfr.h>
10245 int
10246 main ()
10247 {
10248 mpfr_exp_t exp; mpfr_t x;
10249 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10250 ;
10251 return 0;
10252 }
10253 _ACEOF
10254 if ac_fn_c_try_link "$LINENO"; then :
10255 ac_cv_libmpfr=yes
10256 else
10257 ac_cv_libmpfr=no
10258 fi
10259 rm -f core conftest.err conftest.$ac_objext \
10260 conftest$ac_exeext conftest.$ac_ext
10261 LIBS="$ac_save_LIBS"
10262
10263 fi
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10265 $as_echo "$ac_cv_libmpfr" >&6; }
10266 if test "$ac_cv_libmpfr" = yes; then
10267 HAVE_LIBMPFR=yes
10268
10269 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10270
10271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10272 $as_echo_n "checking how to link with libmpfr... " >&6; }
10273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10274 $as_echo "$LIBMPFR" >&6; }
10275 else
10276 HAVE_LIBMPFR=no
10277 CPPFLAGS="$ac_save_CPPFLAGS"
10278 LIBMPFR=
10279 LTLIBMPFR=
10280 fi
10281
10282
10283
10284
10285
10286
10287 if test "$HAVE_LIBMPFR" != yes; then
10288 if test "$with_mpfr" = yes; then
10289 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10290 else
10291 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10292 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10293 fi
10294 fi
10295 fi
10296
10297 # --------------------- #
10298 # Check for libpython. #
10299 # --------------------- #
10300
10301
10302
10303
10304
10305
10306 # Check whether --with-python was given.
10307 if test "${with_python+set}" = set; then :
10308 withval=$with_python;
10309 else
10310 with_python=auto
10311 fi
10312
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10314 $as_echo_n "checking whether to use python... " >&6; }
10315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10316 $as_echo "$with_python" >&6; }
10317
10318 if test "${with_python}" = no; then
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10320 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10321 have_libpython=no
10322 else
10323 case "${with_python}" in
10324 [\\/]* | ?:[\\/]*)
10325 if test -d "${with_python}"; then
10326 # Assume the python binary is ${with_python}/bin/python.
10327 python_prog="${with_python}/bin/python"
10328 python_prefix=
10329 # If python does not exit ${with_python}/bin, then try in
10330 # ${with_python}. On Windows/MinGW, this is where the Python
10331 # executable is.
10332 if test ! -x "${python_prog}"; then
10333 python_prog="${with_python}/python"
10334 python_prefix=
10335 fi
10336 if test ! -x "${python_prog}"; then
10337 # Fall back to gdb 7.0/7.1 behaviour.
10338 python_prog=missing
10339 python_prefix=${with_python}
10340 fi
10341 elif test -x "${with_python}"; then
10342 # While we can't run python compiled for $host (unless host == build),
10343 # the user could write a script that provides the needed information,
10344 # so we support that.
10345 python_prog=${with_python}
10346 python_prefix=
10347 else
10348 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10349 fi
10350 ;;
10351 */*)
10352 # Disallow --with-python=foo/bar.
10353 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10354 ;;
10355 *)
10356 # The user has either specified auto, yes, or the name of the python
10357 # program assumed to be in $PATH.
10358 python_prefix=
10359 case "${with_python}" in
10360 yes | auto)
10361 if test "${build}" = "${host}"; then
10362 # Extract the first word of "python", so it can be a program name with args.
10363 set dummy python; ac_word=$2
10364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10365 $as_echo_n "checking for $ac_word... " >&6; }
10366 if ${ac_cv_path_python_prog_path+:} false; then :
10367 $as_echo_n "(cached) " >&6
10368 else
10369 case $python_prog_path in
10370 [\\/]* | ?:[\\/]*)
10371 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10372 ;;
10373 *)
10374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10375 for as_dir in $PATH
10376 do
10377 IFS=$as_save_IFS
10378 test -z "$as_dir" && as_dir=.
10379 for ac_exec_ext in '' $ac_executable_extensions; do
10380 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10381 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10382 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10383 break 2
10384 fi
10385 done
10386 done
10387 IFS=$as_save_IFS
10388
10389 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10390 ;;
10391 esac
10392 fi
10393 python_prog_path=$ac_cv_path_python_prog_path
10394 if test -n "$python_prog_path"; then
10395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10396 $as_echo "$python_prog_path" >&6; }
10397 else
10398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10399 $as_echo "no" >&6; }
10400 fi
10401
10402
10403 if test "${python_prog_path}" = missing; then
10404 python_prog=missing
10405 else
10406 python_prog=${python_prog_path}
10407 fi
10408 else
10409 # Not much we can do except assume the cross-compiler will find the
10410 # right files.
10411 python_prog=missing
10412 fi
10413 ;;
10414 *)
10415 # While we can't run python compiled for $host (unless host == build),
10416 # the user could write a script that provides the needed information,
10417 # so we support that.
10418 python_prog="${with_python}"
10419 # Extract the first word of "${python_prog}", so it can be a program name with args.
10420 set dummy ${python_prog}; ac_word=$2
10421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10422 $as_echo_n "checking for $ac_word... " >&6; }
10423 if ${ac_cv_path_python_prog_path+:} false; then :
10424 $as_echo_n "(cached) " >&6
10425 else
10426 case $python_prog_path in
10427 [\\/]* | ?:[\\/]*)
10428 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10429 ;;
10430 *)
10431 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10432 for as_dir in $PATH
10433 do
10434 IFS=$as_save_IFS
10435 test -z "$as_dir" && as_dir=.
10436 for ac_exec_ext in '' $ac_executable_extensions; do
10437 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10438 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10439 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10440 break 2
10441 fi
10442 done
10443 done
10444 IFS=$as_save_IFS
10445
10446 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10447 ;;
10448 esac
10449 fi
10450 python_prog_path=$ac_cv_path_python_prog_path
10451 if test -n "$python_prog_path"; then
10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10453 $as_echo "$python_prog_path" >&6; }
10454 else
10455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10456 $as_echo "no" >&6; }
10457 fi
10458
10459
10460 if test "${python_prog_path}" = missing; then
10461 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10462 fi
10463 ;;
10464 esac
10465 esac
10466
10467 if test "${python_prog}" != missing; then
10468 # We have a python program to use, but it may be too old.
10469 # Don't flag an error for --with-python=auto (the default).
10470 have_python_config=yes
10471 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10472 if test $? != 0; then
10473 have_python_config=failed
10474 if test "${with_python}" != auto; then
10475 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10476 fi
10477 fi
10478 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10479 if test $? != 0; then
10480 have_python_config=failed
10481 if test "${with_python}" != auto; then
10482 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10483 fi
10484 fi
10485 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10486 if test $? != 0; then
10487 have_python_config=failed
10488 if test "${with_python}" != auto; then
10489 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10490 fi
10491 fi
10492 else
10493 # We do not have a python executable we can use to determine where
10494 # to find the Python headers and libs. We cannot guess the include
10495 # path from the python_prefix either, because that include path
10496 # depends on the Python version. So, there is nothing much we can
10497 # do except assume that the compiler will be able to find those files.
10498 python_includes=
10499 python_libs=
10500 have_python_config=no
10501 fi
10502
10503 # If we have python-config, only try the configuration it provides.
10504 # Otherwise fallback on the old way of trying different versions of
10505 # python in turn.
10506
10507 have_libpython=no
10508 if test "${have_python_config}" = yes; then
10509
10510
10511 new_CPPFLAGS=${python_includes}
10512 new_LIBS=${python_libs}
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10514 $as_echo_n "checking for python... " >&6; }
10515 save_CPPFLAGS=$CPPFLAGS
10516 save_LIBS=$LIBS
10517 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10518 LIBS="$new_LIBS $LIBS"
10519 found_usable_python=no
10520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10521 /* end confdefs.h. */
10522 #include "Python.h"
10523 int
10524 main ()
10525 {
10526 Py_Initialize ();
10527 ;
10528 return 0;
10529 }
10530 _ACEOF
10531 if ac_fn_c_try_link "$LINENO"; then :
10532 have_libpython=yes
10533 found_usable_python=yes
10534 PYTHON_CPPFLAGS=$new_CPPFLAGS
10535 PYTHON_LIBS=$new_LIBS
10536 fi
10537 rm -f core conftest.err conftest.$ac_objext \
10538 conftest$ac_exeext conftest.$ac_ext
10539 CPPFLAGS=$save_CPPFLAGS
10540 LIBS=$save_LIBS
10541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10542 $as_echo "${found_usable_python}" >&6; }
10543
10544 elif test "${have_python_config}" != failed; then
10545 if test "${have_libpython}" = no; then
10546
10547
10548 new_CPPFLAGS=${python_includes}
10549 new_LIBS="-lpython2.7 ${python_libs}"
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10551 $as_echo_n "checking for python... " >&6; }
10552 save_CPPFLAGS=$CPPFLAGS
10553 save_LIBS=$LIBS
10554 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10555 LIBS="$new_LIBS $LIBS"
10556 found_usable_python=no
10557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10558 /* end confdefs.h. */
10559 #include "Python.h"
10560 int
10561 main ()
10562 {
10563 Py_Initialize ();
10564 ;
10565 return 0;
10566 }
10567 _ACEOF
10568 if ac_fn_c_try_link "$LINENO"; then :
10569 have_libpython=yes
10570 found_usable_python=yes
10571 PYTHON_CPPFLAGS=$new_CPPFLAGS
10572 PYTHON_LIBS=$new_LIBS
10573 fi
10574 rm -f core conftest.err conftest.$ac_objext \
10575 conftest$ac_exeext conftest.$ac_ext
10576 CPPFLAGS=$save_CPPFLAGS
10577 LIBS=$save_LIBS
10578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10579 $as_echo "${found_usable_python}" >&6; }
10580
10581 fi
10582 if test "${have_libpython}" = no; then
10583
10584
10585 new_CPPFLAGS=${python_includes}
10586 new_LIBS="-lpython2.6 ${python_libs}"
10587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10588 $as_echo_n "checking for python... " >&6; }
10589 save_CPPFLAGS=$CPPFLAGS
10590 save_LIBS=$LIBS
10591 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10592 LIBS="$new_LIBS $LIBS"
10593 found_usable_python=no
10594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10595 /* end confdefs.h. */
10596 #include "Python.h"
10597 int
10598 main ()
10599 {
10600 Py_Initialize ();
10601 ;
10602 return 0;
10603 }
10604 _ACEOF
10605 if ac_fn_c_try_link "$LINENO"; then :
10606 have_libpython=yes
10607 found_usable_python=yes
10608 PYTHON_CPPFLAGS=$new_CPPFLAGS
10609 PYTHON_LIBS=$new_LIBS
10610 fi
10611 rm -f core conftest.err conftest.$ac_objext \
10612 conftest$ac_exeext conftest.$ac_ext
10613 CPPFLAGS=$save_CPPFLAGS
10614 LIBS=$save_LIBS
10615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10616 $as_echo "${found_usable_python}" >&6; }
10617
10618 fi
10619 fi
10620
10621 if test "${have_libpython}" = no; then
10622 case "${with_python}" in
10623 yes)
10624 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10625 ;;
10626 auto)
10627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10628 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10629 ;;
10630 *)
10631 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10632 ;;
10633 esac
10634 else
10635 if test -n "${python_prefix}"; then
10636
10637 cat >>confdefs.h <<_ACEOF
10638 #define WITH_PYTHON_PATH "${python_prefix}"
10639 _ACEOF
10640
10641
10642 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10643 if test "x$prefix" = xNONE; then
10644 test_prefix=/usr/local
10645 else
10646 test_prefix=$prefix
10647 fi
10648 else
10649 test_prefix=$exec_prefix
10650 fi
10651 value=0
10652 case ${python_prefix} in
10653 "${test_prefix}"|"${test_prefix}/"*|\
10654 '${exec_prefix}'|'${exec_prefix}/'*)
10655 value=1
10656 ;;
10657 esac
10658
10659 cat >>confdefs.h <<_ACEOF
10660 #define PYTHON_PATH_RELOCATABLE $value
10661 _ACEOF
10662
10663
10664 fi
10665 fi
10666 fi
10667
10668 if test "${have_libpython}" != no; then
10669
10670 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10671
10672 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10673 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10674 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10675 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10676 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10677
10678 # Flags needed to compile Python code (taken from python-config --cflags).
10679 # We cannot call python-config directly because it will output whatever was
10680 # used when compiling the Python interpreter itself, including flags which
10681 # would make the python-related objects be compiled differently from the
10682 # rest of GDB (e.g., -O2 and -fPIC).
10683 if test "${GCC}" = yes; then
10684 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10685 # Python headers recommend -DNDEBUG, but it's unclear if that just
10686 # refers to building Python itself. In release mode, though, it
10687 # doesn't hurt for the Python code in gdb to follow.
10688 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10689 fi
10690
10691 if test "x${tentative_python_cflags}" != x; then
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10693 $as_echo_n "checking compiler flags for python code... " >&6; }
10694 for flag in ${tentative_python_cflags}; do
10695 # Check that the compiler accepts it
10696 saved_CFLAGS="$CFLAGS"
10697 CFLAGS="$CFLAGS $flag"
10698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10699 /* end confdefs.h. */
10700
10701 int
10702 main ()
10703 {
10704
10705 ;
10706 return 0;
10707 }
10708 _ACEOF
10709 if ac_fn_c_try_compile "$LINENO"; then :
10710 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10711 fi
10712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10713 CFLAGS="$saved_CFLAGS"
10714 done
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10716 $as_echo "${PYTHON_CFLAGS}" >&6; }
10717 fi
10718
10719 # On x64 Windows, Python's include headers, and pyconfig.h in
10720 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10721 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10722 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10723 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10724 # The issue was reported to the Python community, but still isn't
10725 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10726
10727 case "$gdb_host" in
10728 mingw64)
10729 if test "${GCC}" = yes; then
10730 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10731 fi
10732 ;;
10733 esac
10734 else
10735 # Even if Python support is not compiled in, we need to have this file
10736 # included so that the "python" command, et.al., still exists.
10737 CONFIG_OBS="$CONFIG_OBS python/python.o"
10738 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10739 fi
10740
10741 # Work around Python http://bugs.python.org/issue10112. See also
10742 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10743 # no effect. Note that the only test after this that uses Python is
10744 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10745 # run without -export-dynamic too.
10746 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10747
10748
10749
10750
10751 if test "${have_libpython}" != no; then
10752 HAVE_PYTHON_TRUE=
10753 HAVE_PYTHON_FALSE='#'
10754 else
10755 HAVE_PYTHON_TRUE='#'
10756 HAVE_PYTHON_FALSE=
10757 fi
10758
10759
10760 # -------------------- #
10761 # Check for libguile. #
10762 # -------------------- #
10763
10764
10765
10766
10767
10768
10769 # Check whether --with-guile was given.
10770 if test "${with_guile+set}" = set; then :
10771 withval=$with_guile;
10772 else
10773 with_guile=auto
10774 fi
10775
10776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10777 $as_echo_n "checking whether to use guile... " >&6; }
10778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10779 $as_echo "$with_guile" >&6; }
10780
10781 # Extract the first word of "pkg-config", so it can be a program name with args.
10782 set dummy pkg-config; ac_word=$2
10783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10784 $as_echo_n "checking for $ac_word... " >&6; }
10785 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10786 $as_echo_n "(cached) " >&6
10787 else
10788 case $pkg_config_prog_path in
10789 [\\/]* | ?:[\\/]*)
10790 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10791 ;;
10792 *)
10793 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10794 for as_dir in $PATH
10795 do
10796 IFS=$as_save_IFS
10797 test -z "$as_dir" && as_dir=.
10798 for ac_exec_ext in '' $ac_executable_extensions; do
10799 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10800 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10802 break 2
10803 fi
10804 done
10805 done
10806 IFS=$as_save_IFS
10807
10808 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10809 ;;
10810 esac
10811 fi
10812 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10813 if test -n "$pkg_config_prog_path"; then
10814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10815 $as_echo "$pkg_config_prog_path" >&6; }
10816 else
10817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818 $as_echo "no" >&6; }
10819 fi
10820
10821
10822
10823 try_guile_versions="guile-2.0"
10824 have_libguile=no
10825 case "${with_guile}" in
10826 no)
10827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10828 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10829 ;;
10830 auto)
10831 if test "${pkg_config_prog_path}" = "missing"; then
10832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10833 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10834 else
10835
10836 pkg_config=${pkg_config_prog_path}
10837 guile_version_list=${try_guile_versions}
10838 flag_errors=no
10839
10840 found_usable_guile=checking
10841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10842 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10843 for guile_version in ${guile_version_list}; do
10844 ${pkg_config} --exists ${guile_version} 2>/dev/null
10845 if test $? != 0; then
10846 continue
10847 fi
10848 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10849 if test $? != 0; then
10850 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10851 fi
10852 new_LIBS=`${pkg_config} --libs ${guile_version}`
10853 if test $? != 0; then
10854 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10855 fi
10856 found_usable_guile=${guile_version}
10857 break
10858 done
10859 if test "${found_usable_guile}" = "checking"; then
10860 if test "${flag_errors}" = "yes"; then
10861 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10862 else
10863 found_usable_guile=no
10864 fi
10865 fi
10866 if test "${found_usable_guile}" != no; then
10867 save_CPPFLAGS=$CPPFLAGS
10868 save_LIBS=$LIBS
10869 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10870 LIBS="$LIBS $new_LIBS"
10871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10872 /* end confdefs.h. */
10873 #include "libguile.h"
10874 int
10875 main ()
10876 {
10877 scm_init_guile ();
10878 ;
10879 return 0;
10880 }
10881 _ACEOF
10882 if ac_fn_c_try_link "$LINENO"; then :
10883 have_libguile=yes
10884 GUILE_CPPFLAGS=$new_CPPFLAGS
10885 GUILE_LIBS=$new_LIBS
10886 else
10887 found_usable_guile=no
10888 fi
10889 rm -f core conftest.err conftest.$ac_objext \
10890 conftest$ac_exeext conftest.$ac_ext
10891 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10892 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10893
10894 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10895
10896
10897 fi
10898
10899 CPPFLAGS=$save_CPPFLAGS
10900 LIBS=$save_LIBS
10901 if test "${found_usable_guile}" = no; then
10902 if test "${flag_errors}" = yes; then
10903 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10904 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10905 as_fn_error $? "linking guile version ${guile_version} test program failed
10906 See \`config.log' for more details" "$LINENO" 5; }
10907 fi
10908 fi
10909 fi
10910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10911 $as_echo "${found_usable_guile}" >&6; }
10912
10913 fi
10914 ;;
10915 yes)
10916 if test "${pkg_config_prog_path}" = "missing"; then
10917 as_fn_error $? "pkg-config not found" "$LINENO" 5
10918 fi
10919
10920 pkg_config=${pkg_config_prog_path}
10921 guile_version_list=${try_guile_versions}
10922 flag_errors=yes
10923
10924 found_usable_guile=checking
10925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10926 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10927 for guile_version in ${guile_version_list}; do
10928 ${pkg_config} --exists ${guile_version} 2>/dev/null
10929 if test $? != 0; then
10930 continue
10931 fi
10932 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10933 if test $? != 0; then
10934 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10935 fi
10936 new_LIBS=`${pkg_config} --libs ${guile_version}`
10937 if test $? != 0; then
10938 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10939 fi
10940 found_usable_guile=${guile_version}
10941 break
10942 done
10943 if test "${found_usable_guile}" = "checking"; then
10944 if test "${flag_errors}" = "yes"; then
10945 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10946 else
10947 found_usable_guile=no
10948 fi
10949 fi
10950 if test "${found_usable_guile}" != no; then
10951 save_CPPFLAGS=$CPPFLAGS
10952 save_LIBS=$LIBS
10953 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10954 LIBS="$LIBS $new_LIBS"
10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956 /* end confdefs.h. */
10957 #include "libguile.h"
10958 int
10959 main ()
10960 {
10961 scm_init_guile ();
10962 ;
10963 return 0;
10964 }
10965 _ACEOF
10966 if ac_fn_c_try_link "$LINENO"; then :
10967 have_libguile=yes
10968 GUILE_CPPFLAGS=$new_CPPFLAGS
10969 GUILE_LIBS=$new_LIBS
10970 else
10971 found_usable_guile=no
10972 fi
10973 rm -f core conftest.err conftest.$ac_objext \
10974 conftest$ac_exeext conftest.$ac_ext
10975 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10976 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10977
10978 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10979
10980
10981 fi
10982
10983 CPPFLAGS=$save_CPPFLAGS
10984 LIBS=$save_LIBS
10985 if test "${found_usable_guile}" = no; then
10986 if test "${flag_errors}" = yes; then
10987 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10988 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10989 as_fn_error $? "linking guile version ${guile_version} test program failed
10990 See \`config.log' for more details" "$LINENO" 5; }
10991 fi
10992 fi
10993 fi
10994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10995 $as_echo "${found_usable_guile}" >&6; }
10996
10997 ;;
10998 [\\/]* | ?:[\\/]*)
10999 if test -x "${with_guile}"; then
11000
11001 pkg_config=${with_guile}
11002 guile_version_list=${try_guile_versions}
11003 flag_errors=yes
11004
11005 found_usable_guile=checking
11006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11007 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11008 for guile_version in ${guile_version_list}; do
11009 ${pkg_config} --exists ${guile_version} 2>/dev/null
11010 if test $? != 0; then
11011 continue
11012 fi
11013 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11014 if test $? != 0; then
11015 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11016 fi
11017 new_LIBS=`${pkg_config} --libs ${guile_version}`
11018 if test $? != 0; then
11019 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11020 fi
11021 found_usable_guile=${guile_version}
11022 break
11023 done
11024 if test "${found_usable_guile}" = "checking"; then
11025 if test "${flag_errors}" = "yes"; then
11026 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11027 else
11028 found_usable_guile=no
11029 fi
11030 fi
11031 if test "${found_usable_guile}" != no; then
11032 save_CPPFLAGS=$CPPFLAGS
11033 save_LIBS=$LIBS
11034 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11035 LIBS="$LIBS $new_LIBS"
11036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11037 /* end confdefs.h. */
11038 #include "libguile.h"
11039 int
11040 main ()
11041 {
11042 scm_init_guile ();
11043 ;
11044 return 0;
11045 }
11046 _ACEOF
11047 if ac_fn_c_try_link "$LINENO"; then :
11048 have_libguile=yes
11049 GUILE_CPPFLAGS=$new_CPPFLAGS
11050 GUILE_LIBS=$new_LIBS
11051 else
11052 found_usable_guile=no
11053 fi
11054 rm -f core conftest.err conftest.$ac_objext \
11055 conftest$ac_exeext conftest.$ac_ext
11056 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11057 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11058
11059 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11060
11061
11062 fi
11063
11064 CPPFLAGS=$save_CPPFLAGS
11065 LIBS=$save_LIBS
11066 if test "${found_usable_guile}" = no; then
11067 if test "${flag_errors}" = yes; then
11068 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11069 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11070 as_fn_error $? "linking guile version ${guile_version} test program failed
11071 See \`config.log' for more details" "$LINENO" 5; }
11072 fi
11073 fi
11074 fi
11075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11076 $as_echo "${found_usable_guile}" >&6; }
11077
11078 else
11079 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11080 fi
11081 ;;
11082 "" | */*)
11083 # Disallow --with=guile="" and --with-guile=foo/bar.
11084 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11085 ;;
11086 *)
11087 # A space separate list of guile versions to try, in order.
11088 if test "${pkg_config_prog_path}" = "missing"; then
11089 as_fn_error $? "pkg-config not found" "$LINENO" 5
11090 fi
11091
11092 pkg_config=${pkg_config_prog_path}
11093 guile_version_list=${with_guile}
11094 flag_errors=yes
11095
11096 found_usable_guile=checking
11097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11098 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11099 for guile_version in ${guile_version_list}; do
11100 ${pkg_config} --exists ${guile_version} 2>/dev/null
11101 if test $? != 0; then
11102 continue
11103 fi
11104 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11105 if test $? != 0; then
11106 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11107 fi
11108 new_LIBS=`${pkg_config} --libs ${guile_version}`
11109 if test $? != 0; then
11110 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11111 fi
11112 found_usable_guile=${guile_version}
11113 break
11114 done
11115 if test "${found_usable_guile}" = "checking"; then
11116 if test "${flag_errors}" = "yes"; then
11117 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11118 else
11119 found_usable_guile=no
11120 fi
11121 fi
11122 if test "${found_usable_guile}" != no; then
11123 save_CPPFLAGS=$CPPFLAGS
11124 save_LIBS=$LIBS
11125 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11126 LIBS="$LIBS $new_LIBS"
11127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11128 /* end confdefs.h. */
11129 #include "libguile.h"
11130 int
11131 main ()
11132 {
11133 scm_init_guile ();
11134 ;
11135 return 0;
11136 }
11137 _ACEOF
11138 if ac_fn_c_try_link "$LINENO"; then :
11139 have_libguile=yes
11140 GUILE_CPPFLAGS=$new_CPPFLAGS
11141 GUILE_LIBS=$new_LIBS
11142 else
11143 found_usable_guile=no
11144 fi
11145 rm -f core conftest.err conftest.$ac_objext \
11146 conftest$ac_exeext conftest.$ac_ext
11147 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11148 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11149
11150 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11151
11152
11153 fi
11154
11155 CPPFLAGS=$save_CPPFLAGS
11156 LIBS=$save_LIBS
11157 if test "${found_usable_guile}" = no; then
11158 if test "${flag_errors}" = yes; then
11159 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11160 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11161 as_fn_error $? "linking guile version ${guile_version} test program failed
11162 See \`config.log' for more details" "$LINENO" 5; }
11163 fi
11164 fi
11165 fi
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11167 $as_echo "${found_usable_guile}" >&6; }
11168
11169 ;;
11170 esac
11171
11172 if test "${have_libguile}" != no; then
11173 case "${with_guile}" in
11174 [\\/]* | ?:[\\/]*)
11175
11176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11177 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11178 if ${ac_cv_guild_program_name+:} false; then :
11179 $as_echo_n "(cached) " >&6
11180 else
11181 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11182
11183 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11184 # the 'guild' and 'bindir' variables. In that case, try to guess
11185 # what the program name is, at the risk of getting it wrong if
11186 # Guile was configured with '--program-suffix' or similar.
11187 if test "x$ac_cv_guild_program_name" = "x"; then
11188 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11189 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11190 fi
11191
11192 fi
11193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11194 $as_echo "$ac_cv_guild_program_name" >&6; }
11195
11196 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11197 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11198 fi
11199
11200 GUILD="$ac_cv_guild_program_name"
11201
11202
11203 ;;
11204 *)
11205
11206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11207 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11208 if ${ac_cv_guild_program_name+:} false; then :
11209 $as_echo_n "(cached) " >&6
11210 else
11211 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11212
11213 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11214 # the 'guild' and 'bindir' variables. In that case, try to guess
11215 # what the program name is, at the risk of getting it wrong if
11216 # Guile was configured with '--program-suffix' or similar.
11217 if test "x$ac_cv_guild_program_name" = "x"; then
11218 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11219 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11220 fi
11221
11222 fi
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11224 $as_echo "$ac_cv_guild_program_name" >&6; }
11225
11226 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11227 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11228 fi
11229
11230 GUILD="$ac_cv_guild_program_name"
11231
11232
11233 ;;
11234 esac
11235
11236
11237 if test "$cross_compiling" = no; then
11238 GUILD_TARGET_FLAG=
11239 else
11240 GUILD_TARGET_FLAG="--target=$host"
11241 fi
11242
11243
11244
11245
11246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11247 $as_echo_n "checking whether guild supports this host... " >&6; }
11248 if ${ac_cv_guild_ok+:} false; then :
11249 $as_echo_n "(cached) " >&6
11250 else
11251 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11252 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11253 ac_cv_guild_ok=yes
11254 else
11255 ac_cv_guild_ok=no
11256 fi
11257 fi
11258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11259 $as_echo "$ac_cv_guild_ok" >&6; }
11260
11261 if test "$ac_cv_guild_ok" = no; then
11262 have_libguile=no
11263 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11264 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11265 fi
11266 fi
11267
11268 if test "${have_libguile}" != no; then
11269
11270 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11271
11272 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11273 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11274 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11275 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11276 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11277
11278 save_LIBS="$LIBS"
11279 save_CPPFLAGS="$CPPFLAGS"
11280 LIBS="$GUILE_LIBS"
11281 CPPFLAGS="$GUILE_CPPFLAGS"
11282 for ac_func in scm_new_smob
11283 do :
11284 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11285 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11286 cat >>confdefs.h <<_ACEOF
11287 #define HAVE_SCM_NEW_SMOB 1
11288 _ACEOF
11289
11290 fi
11291 done
11292
11293 LIBS="$save_LIBS"
11294 CPPFLAGS="$save_CPPFLAGS"
11295 else
11296 # Even if Guile support is not compiled in, we need to have these files
11297 # included.
11298 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11299 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11300 fi
11301
11302
11303 if test "${have_libguile}" != no; then
11304 HAVE_GUILE_TRUE=
11305 HAVE_GUILE_FALSE='#'
11306 else
11307 HAVE_GUILE_TRUE='#'
11308 HAVE_GUILE_FALSE=
11309 fi
11310
11311
11312 # ---------------------------- #
11313 # Check for source highlight. #
11314 # ---------------------------- #
11315
11316 SRCHIGH_LIBS=
11317 SRCHIGH_CFLAGS=
11318
11319 # Check whether --enable-source-highlight was given.
11320 if test "${enable_source_highlight+set}" = set; then :
11321 enableval=$enable_source_highlight; case "${enableval}" in
11322 yes) enable_source_highlight=yes ;;
11323 no) enable_source_highlight=no ;;
11324 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11325 esac
11326 else
11327 enable_source_highlight=auto
11328 fi
11329
11330
11331 if test "${enable_source_highlight}" != "no"; then
11332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11333 $as_echo_n "checking for the source-highlight library... " >&6; }
11334 if test "${pkg_config_prog_path}" = "missing"; then
11335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11336 $as_echo "no - pkg-config not found" >&6; }
11337 if test "${enable_source_highlight}" = "yes"; then
11338 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11339 fi
11340 else
11341 case "$LDFLAGS" in
11342 *static-libstdc*)
11343 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11344 ;;
11345 esac
11346
11347 if ${pkg_config_prog_path} --exists source-highlight; then
11348 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11349 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11350
11351 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11352
11353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11354 $as_echo "yes" >&6; }
11355 else
11356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11357 $as_echo "no" >&6; }
11358 if test "${enable_source_highlight}" = "yes"; then
11359 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11360 fi
11361 fi
11362 fi
11363 fi
11364
11365
11366
11367 # ------------------------- #
11368 # Checks for header files. #
11369 # ------------------------- #
11370
11371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11372 $as_echo_n "checking for ANSI C header files... " >&6; }
11373 if ${ac_cv_header_stdc+:} false; then :
11374 $as_echo_n "(cached) " >&6
11375 else
11376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11377 /* end confdefs.h. */
11378 #include <stdlib.h>
11379 #include <stdarg.h>
11380 #include <string.h>
11381 #include <float.h>
11382
11383 int
11384 main ()
11385 {
11386
11387 ;
11388 return 0;
11389 }
11390 _ACEOF
11391 if ac_fn_c_try_compile "$LINENO"; then :
11392 ac_cv_header_stdc=yes
11393 else
11394 ac_cv_header_stdc=no
11395 fi
11396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11397
11398 if test $ac_cv_header_stdc = yes; then
11399 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11401 /* end confdefs.h. */
11402 #include <string.h>
11403
11404 _ACEOF
11405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11406 $EGREP "memchr" >/dev/null 2>&1; then :
11407
11408 else
11409 ac_cv_header_stdc=no
11410 fi
11411 rm -f conftest*
11412
11413 fi
11414
11415 if test $ac_cv_header_stdc = yes; then
11416 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11418 /* end confdefs.h. */
11419 #include <stdlib.h>
11420
11421 _ACEOF
11422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11423 $EGREP "free" >/dev/null 2>&1; then :
11424
11425 else
11426 ac_cv_header_stdc=no
11427 fi
11428 rm -f conftest*
11429
11430 fi
11431
11432 if test $ac_cv_header_stdc = yes; then
11433 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11434 if test "$cross_compiling" = yes; then :
11435 :
11436 else
11437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11438 /* end confdefs.h. */
11439 #include <ctype.h>
11440 #include <stdlib.h>
11441 #if ((' ' & 0x0FF) == 0x020)
11442 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11443 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11444 #else
11445 # define ISLOWER(c) \
11446 (('a' <= (c) && (c) <= 'i') \
11447 || ('j' <= (c) && (c) <= 'r') \
11448 || ('s' <= (c) && (c) <= 'z'))
11449 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11450 #endif
11451
11452 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11453 int
11454 main ()
11455 {
11456 int i;
11457 for (i = 0; i < 256; i++)
11458 if (XOR (islower (i), ISLOWER (i))
11459 || toupper (i) != TOUPPER (i))
11460 return 2;
11461 return 0;
11462 }
11463 _ACEOF
11464 if ac_fn_c_try_run "$LINENO"; then :
11465
11466 else
11467 ac_cv_header_stdc=no
11468 fi
11469 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11470 conftest.$ac_objext conftest.beam conftest.$ac_ext
11471 fi
11472
11473 fi
11474 fi
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11476 $as_echo "$ac_cv_header_stdc" >&6; }
11477 if test $ac_cv_header_stdc = yes; then
11478
11479 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11480
11481 fi
11482
11483 # elf_hp.h is for HP/UX 64-bit shared library support.
11484 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \
11485 thread_db.h \
11486 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11487 sys/resource.h sys/ptrace.h ptrace.h \
11488 sys/reg.h sys/debugreg.h sys/select.h \
11489 termios.h elf_hp.h
11490 do :
11491 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11492 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11493 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11494 cat >>confdefs.h <<_ACEOF
11495 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11496 _ACEOF
11497
11498 fi
11499
11500 done
11501
11502 for ac_header in sys/user.h
11503 do :
11504 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11505 # include <sys/param.h>
11506 #endif
11507
11508 "
11509 if test "x$ac_cv_header_sys_user_h" = xyes; then :
11510 cat >>confdefs.h <<_ACEOF
11511 #define HAVE_SYS_USER_H 1
11512 _ACEOF
11513
11514 fi
11515
11516 done
11517
11518
11519 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11520 do :
11521 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11522 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11523 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11524 cat >>confdefs.h <<_ACEOF
11525 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11526 _ACEOF
11527
11528 fi
11529
11530 done
11531
11532 for ac_header in term.h
11533 do :
11534 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11535 # include <curses.h>
11536 #endif
11537
11538 "
11539 if test "x$ac_cv_header_term_h" = xyes; then :
11540 cat >>confdefs.h <<_ACEOF
11541 #define HAVE_TERM_H 1
11542 _ACEOF
11543
11544 fi
11545
11546 done
11547
11548
11549 # ------------------------- #
11550 # Checks for declarations. #
11551 # ------------------------- #
11552
11553
11554 # Check for presence and size of long long.
11555 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11556 if test "x$ac_cv_type_long_long" = xyes; then :
11557
11558 cat >>confdefs.h <<_ACEOF
11559 #define HAVE_LONG_LONG 1
11560 _ACEOF
11561
11562 # The cast to long int works around a bug in the HP C Compiler
11563 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11564 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11565 # This bug is HP SR number 8606223364.
11566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11567 $as_echo_n "checking size of long long... " >&6; }
11568 if ${ac_cv_sizeof_long_long+:} false; then :
11569 $as_echo_n "(cached) " >&6
11570 else
11571 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11572
11573 else
11574 if test "$ac_cv_type_long_long" = yes; then
11575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11576 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11577 as_fn_error 77 "cannot compute sizeof (long long)
11578 See \`config.log' for more details" "$LINENO" 5; }
11579 else
11580 ac_cv_sizeof_long_long=0
11581 fi
11582 fi
11583
11584 fi
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11586 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11587
11588
11589
11590 cat >>confdefs.h <<_ACEOF
11591 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11592 _ACEOF
11593
11594
11595 fi
11596
11597
11598 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11599 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11600 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11601 ac_have_decl=1
11602 else
11603 ac_have_decl=0
11604 fi
11605
11606 cat >>confdefs.h <<_ACEOF
11607 #define HAVE_DECL_BASENAME $ac_have_decl
11608 _ACEOF
11609 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11610 if test "x$ac_cv_have_decl_ffs" = xyes; then :
11611 ac_have_decl=1
11612 else
11613 ac_have_decl=0
11614 fi
11615
11616 cat >>confdefs.h <<_ACEOF
11617 #define HAVE_DECL_FFS $ac_have_decl
11618 _ACEOF
11619 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11620 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11621 ac_have_decl=1
11622 else
11623 ac_have_decl=0
11624 fi
11625
11626 cat >>confdefs.h <<_ACEOF
11627 #define HAVE_DECL_ASPRINTF $ac_have_decl
11628 _ACEOF
11629 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11630 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11631 ac_have_decl=1
11632 else
11633 ac_have_decl=0
11634 fi
11635
11636 cat >>confdefs.h <<_ACEOF
11637 #define HAVE_DECL_VASPRINTF $ac_have_decl
11638 _ACEOF
11639 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11640 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11641 ac_have_decl=1
11642 else
11643 ac_have_decl=0
11644 fi
11645
11646 cat >>confdefs.h <<_ACEOF
11647 #define HAVE_DECL_SNPRINTF $ac_have_decl
11648 _ACEOF
11649 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11650 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11651 ac_have_decl=1
11652 else
11653 ac_have_decl=0
11654 fi
11655
11656 cat >>confdefs.h <<_ACEOF
11657 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11658 _ACEOF
11659
11660 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11661 if test "x$ac_cv_have_decl_strtol" = xyes; then :
11662 ac_have_decl=1
11663 else
11664 ac_have_decl=0
11665 fi
11666
11667 cat >>confdefs.h <<_ACEOF
11668 #define HAVE_DECL_STRTOL $ac_have_decl
11669 _ACEOF
11670 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11671 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11672 ac_have_decl=1
11673 else
11674 ac_have_decl=0
11675 fi
11676
11677 cat >>confdefs.h <<_ACEOF
11678 #define HAVE_DECL_STRTOUL $ac_have_decl
11679 _ACEOF
11680 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11681 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11682 ac_have_decl=1
11683 else
11684 ac_have_decl=0
11685 fi
11686
11687 cat >>confdefs.h <<_ACEOF
11688 #define HAVE_DECL_STRTOLL $ac_have_decl
11689 _ACEOF
11690 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11691 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11692 ac_have_decl=1
11693 else
11694 ac_have_decl=0
11695 fi
11696
11697 cat >>confdefs.h <<_ACEOF
11698 #define HAVE_DECL_STRTOULL $ac_have_decl
11699 _ACEOF
11700
11701 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11702 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11703 ac_have_decl=1
11704 else
11705 ac_have_decl=0
11706 fi
11707
11708 cat >>confdefs.h <<_ACEOF
11709 #define HAVE_DECL_STRVERSCMP $ac_have_decl
11710 _ACEOF
11711
11712
11713
11714 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11715 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11716 ac_have_decl=1
11717 else
11718 ac_have_decl=0
11719 fi
11720
11721 cat >>confdefs.h <<_ACEOF
11722 #define HAVE_DECL_SNPRINTF $ac_have_decl
11723 _ACEOF
11724
11725
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11727 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11728 if ${am_cv_val_LC_MESSAGES+:} false; then :
11729 $as_echo_n "(cached) " >&6
11730 else
11731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11732 /* end confdefs.h. */
11733 #include <locale.h>
11734 int
11735 main ()
11736 {
11737 return LC_MESSAGES
11738 ;
11739 return 0;
11740 }
11741 _ACEOF
11742 if ac_fn_c_try_link "$LINENO"; then :
11743 am_cv_val_LC_MESSAGES=yes
11744 else
11745 am_cv_val_LC_MESSAGES=no
11746 fi
11747 rm -f core conftest.err conftest.$ac_objext \
11748 conftest$ac_exeext conftest.$ac_ext
11749 fi
11750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11751 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11752 if test $am_cv_val_LC_MESSAGES = yes; then
11753
11754 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11755
11756 fi
11757
11758
11759 # ------------------ #
11760 # Checks for types. #
11761 # ------------------ #
11762
11763 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11764 #include <sys/socket.h>
11765
11766 "
11767 if test "x$ac_cv_type_socklen_t" = xyes; then :
11768
11769 cat >>confdefs.h <<_ACEOF
11770 #define HAVE_SOCKLEN_T 1
11771 _ACEOF
11772
11773
11774 fi
11775
11776
11777 # ------------------------------------- #
11778 # Checks for compiler characteristics. #
11779 # ------------------------------------- #
11780
11781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11782 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11783 if ${ac_cv_c_const+:} false; then :
11784 $as_echo_n "(cached) " >&6
11785 else
11786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11787 /* end confdefs.h. */
11788
11789 int
11790 main ()
11791 {
11792
11793 #ifndef __cplusplus
11794 /* Ultrix mips cc rejects this sort of thing. */
11795 typedef int charset[2];
11796 const charset cs = { 0, 0 };
11797 /* SunOS 4.1.1 cc rejects this. */
11798 char const *const *pcpcc;
11799 char **ppc;
11800 /* NEC SVR4.0.2 mips cc rejects this. */
11801 struct point {int x, y;};
11802 static struct point const zero = {0,0};
11803 /* AIX XL C 1.02.0.0 rejects this.
11804 It does not let you subtract one const X* pointer from another in
11805 an arm of an if-expression whose if-part is not a constant
11806 expression */
11807 const char *g = "string";
11808 pcpcc = &g + (g ? g-g : 0);
11809 /* HPUX 7.0 cc rejects these. */
11810 ++pcpcc;
11811 ppc = (char**) pcpcc;
11812 pcpcc = (char const *const *) ppc;
11813 { /* SCO 3.2v4 cc rejects this sort of thing. */
11814 char tx;
11815 char *t = &tx;
11816 char const *s = 0 ? (char *) 0 : (char const *) 0;
11817
11818 *t++ = 0;
11819 if (s) return 0;
11820 }
11821 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11822 int x[] = {25, 17};
11823 const int *foo = &x[0];
11824 ++foo;
11825 }
11826 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11827 typedef const int *iptr;
11828 iptr p = 0;
11829 ++p;
11830 }
11831 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11832 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11833 struct s { int j; const int *ap[3]; } bx;
11834 struct s *b = &bx; b->j = 5;
11835 }
11836 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11837 const int foo = 10;
11838 if (!foo) return 0;
11839 }
11840 return !cs[0] && !zero.x;
11841 #endif
11842
11843 ;
11844 return 0;
11845 }
11846 _ACEOF
11847 if ac_fn_c_try_compile "$LINENO"; then :
11848 ac_cv_c_const=yes
11849 else
11850 ac_cv_c_const=no
11851 fi
11852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11853 fi
11854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11855 $as_echo "$ac_cv_c_const" >&6; }
11856 if test $ac_cv_c_const = no; then
11857
11858 $as_echo "#define const /**/" >>confdefs.h
11859
11860 fi
11861
11862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11863 $as_echo_n "checking for inline... " >&6; }
11864 if ${ac_cv_c_inline+:} false; then :
11865 $as_echo_n "(cached) " >&6
11866 else
11867 ac_cv_c_inline=no
11868 for ac_kw in inline __inline__ __inline; do
11869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11870 /* end confdefs.h. */
11871 #ifndef __cplusplus
11872 typedef int foo_t;
11873 static $ac_kw foo_t static_foo () {return 0; }
11874 $ac_kw foo_t foo () {return 0; }
11875 #endif
11876
11877 _ACEOF
11878 if ac_fn_c_try_compile "$LINENO"; then :
11879 ac_cv_c_inline=$ac_kw
11880 fi
11881 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11882 test "$ac_cv_c_inline" != no && break
11883 done
11884
11885 fi
11886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11887 $as_echo "$ac_cv_c_inline" >&6; }
11888
11889 case $ac_cv_c_inline in
11890 inline | yes) ;;
11891 *)
11892 case $ac_cv_c_inline in
11893 no) ac_val=;;
11894 *) ac_val=$ac_cv_c_inline;;
11895 esac
11896 cat >>confdefs.h <<_ACEOF
11897 #ifndef __cplusplus
11898 #define inline $ac_val
11899 #endif
11900 _ACEOF
11901 ;;
11902 esac
11903
11904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11905 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11906 if ${ac_cv_c_bigendian+:} false; then :
11907 $as_echo_n "(cached) " >&6
11908 else
11909 ac_cv_c_bigendian=unknown
11910 # See if we're dealing with a universal compiler.
11911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11912 /* end confdefs.h. */
11913 #ifndef __APPLE_CC__
11914 not a universal capable compiler
11915 #endif
11916 typedef int dummy;
11917
11918 _ACEOF
11919 if ac_fn_c_try_compile "$LINENO"; then :
11920
11921 # Check for potential -arch flags. It is not universal unless
11922 # there are at least two -arch flags with different values.
11923 ac_arch=
11924 ac_prev=
11925 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11926 if test -n "$ac_prev"; then
11927 case $ac_word in
11928 i?86 | x86_64 | ppc | ppc64)
11929 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11930 ac_arch=$ac_word
11931 else
11932 ac_cv_c_bigendian=universal
11933 break
11934 fi
11935 ;;
11936 esac
11937 ac_prev=
11938 elif test "x$ac_word" = "x-arch"; then
11939 ac_prev=arch
11940 fi
11941 done
11942 fi
11943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11944 if test $ac_cv_c_bigendian = unknown; then
11945 # See if sys/param.h defines the BYTE_ORDER macro.
11946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11947 /* end confdefs.h. */
11948 #include <sys/types.h>
11949 #include <sys/param.h>
11950
11951 int
11952 main ()
11953 {
11954 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11955 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11956 && LITTLE_ENDIAN)
11957 bogus endian macros
11958 #endif
11959
11960 ;
11961 return 0;
11962 }
11963 _ACEOF
11964 if ac_fn_c_try_compile "$LINENO"; then :
11965 # It does; now see whether it defined to BIG_ENDIAN or not.
11966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11967 /* end confdefs.h. */
11968 #include <sys/types.h>
11969 #include <sys/param.h>
11970
11971 int
11972 main ()
11973 {
11974 #if BYTE_ORDER != BIG_ENDIAN
11975 not big endian
11976 #endif
11977
11978 ;
11979 return 0;
11980 }
11981 _ACEOF
11982 if ac_fn_c_try_compile "$LINENO"; then :
11983 ac_cv_c_bigendian=yes
11984 else
11985 ac_cv_c_bigendian=no
11986 fi
11987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11988 fi
11989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11990 fi
11991 if test $ac_cv_c_bigendian = unknown; then
11992 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994 /* end confdefs.h. */
11995 #include <limits.h>
11996
11997 int
11998 main ()
11999 {
12000 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12001 bogus endian macros
12002 #endif
12003
12004 ;
12005 return 0;
12006 }
12007 _ACEOF
12008 if ac_fn_c_try_compile "$LINENO"; then :
12009 # It does; now see whether it defined to _BIG_ENDIAN or not.
12010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12011 /* end confdefs.h. */
12012 #include <limits.h>
12013
12014 int
12015 main ()
12016 {
12017 #ifndef _BIG_ENDIAN
12018 not big endian
12019 #endif
12020
12021 ;
12022 return 0;
12023 }
12024 _ACEOF
12025 if ac_fn_c_try_compile "$LINENO"; then :
12026 ac_cv_c_bigendian=yes
12027 else
12028 ac_cv_c_bigendian=no
12029 fi
12030 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12031 fi
12032 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12033 fi
12034 if test $ac_cv_c_bigendian = unknown; then
12035 # Compile a test program.
12036 if test "$cross_compiling" = yes; then :
12037 # Try to guess by grepping values from an object file.
12038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12039 /* end confdefs.h. */
12040 short int ascii_mm[] =
12041 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12042 short int ascii_ii[] =
12043 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12044 int use_ascii (int i) {
12045 return ascii_mm[i] + ascii_ii[i];
12046 }
12047 short int ebcdic_ii[] =
12048 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12049 short int ebcdic_mm[] =
12050 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12051 int use_ebcdic (int i) {
12052 return ebcdic_mm[i] + ebcdic_ii[i];
12053 }
12054 extern int foo;
12055
12056 int
12057 main ()
12058 {
12059 return use_ascii (foo) == use_ebcdic (foo);
12060 ;
12061 return 0;
12062 }
12063 _ACEOF
12064 if ac_fn_c_try_compile "$LINENO"; then :
12065 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12066 ac_cv_c_bigendian=yes
12067 fi
12068 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12069 if test "$ac_cv_c_bigendian" = unknown; then
12070 ac_cv_c_bigendian=no
12071 else
12072 # finding both strings is unlikely to happen, but who knows?
12073 ac_cv_c_bigendian=unknown
12074 fi
12075 fi
12076 fi
12077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12078 else
12079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12080 /* end confdefs.h. */
12081 $ac_includes_default
12082 int
12083 main ()
12084 {
12085
12086 /* Are we little or big endian? From Harbison&Steele. */
12087 union
12088 {
12089 long int l;
12090 char c[sizeof (long int)];
12091 } u;
12092 u.l = 1;
12093 return u.c[sizeof (long int) - 1] == 1;
12094
12095 ;
12096 return 0;
12097 }
12098 _ACEOF
12099 if ac_fn_c_try_run "$LINENO"; then :
12100 ac_cv_c_bigendian=no
12101 else
12102 ac_cv_c_bigendian=yes
12103 fi
12104 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12105 conftest.$ac_objext conftest.beam conftest.$ac_ext
12106 fi
12107
12108 fi
12109 fi
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12111 $as_echo "$ac_cv_c_bigendian" >&6; }
12112 case $ac_cv_c_bigendian in #(
12113 yes)
12114 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12115 ;; #(
12116 no)
12117 ;; #(
12118 universal)
12119
12120 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12121
12122 ;; #(
12123 *)
12124 as_fn_error $? "unknown endianness
12125 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12126 esac
12127
12128
12129 # ------------------------------ #
12130 # Checks for library functions. #
12131 # ------------------------------ #
12132
12133 for ac_func in getuid getgid \
12134 pipe poll pread pread64 pwrite resize_term \
12135 getpgid setsid \
12136 sigaction sigsetmask socketpair \
12137 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12138 setrlimit getrlimit posix_madvise waitpid \
12139 use_default_colors
12140 do :
12141 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12142 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12143 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12144 cat >>confdefs.h <<_ACEOF
12145 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12146 _ACEOF
12147
12148 fi
12149 done
12150
12151
12152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12153 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12154 if ${am_cv_langinfo_codeset+:} false; then :
12155 $as_echo_n "(cached) " >&6
12156 else
12157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12158 /* end confdefs.h. */
12159 #include <langinfo.h>
12160 int
12161 main ()
12162 {
12163 char* cs = nl_langinfo(CODESET);
12164 ;
12165 return 0;
12166 }
12167 _ACEOF
12168 if ac_fn_c_try_link "$LINENO"; then :
12169 am_cv_langinfo_codeset=yes
12170 else
12171 am_cv_langinfo_codeset=no
12172 fi
12173 rm -f core conftest.err conftest.$ac_objext \
12174 conftest$ac_exeext conftest.$ac_ext
12175
12176 fi
12177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12178 $as_echo "$am_cv_langinfo_codeset" >&6; }
12179 if test $am_cv_langinfo_codeset = yes; then
12180
12181 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12182
12183 fi
12184
12185 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12186 if test "x$ac_cv_type_size_t" = xyes; then :
12187
12188 else
12189
12190 cat >>confdefs.h <<_ACEOF
12191 #define size_t unsigned int
12192 _ACEOF
12193
12194 fi
12195
12196
12197
12198
12199 for ac_header in $ac_header_list
12200 do :
12201 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12202 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12203 "
12204 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12205 cat >>confdefs.h <<_ACEOF
12206 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12207 _ACEOF
12208
12209 fi
12210
12211 done
12212
12213
12214
12215
12216
12217
12218
12219 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12220 if test "x$ac_cv_type_pid_t" = xyes; then :
12221
12222 else
12223
12224 cat >>confdefs.h <<_ACEOF
12225 #define pid_t int
12226 _ACEOF
12227
12228 fi
12229
12230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12231 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12232 if ${ac_cv_path_SED+:} false; then :
12233 $as_echo_n "(cached) " >&6
12234 else
12235 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12236 for ac_i in 1 2 3 4 5 6 7; do
12237 ac_script="$ac_script$as_nl$ac_script"
12238 done
12239 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12240 { ac_script=; unset ac_script;}
12241 if test -z "$SED"; then
12242 ac_path_SED_found=false
12243 # Loop through the user's path and test for each of PROGNAME-LIST
12244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12245 for as_dir in $PATH
12246 do
12247 IFS=$as_save_IFS
12248 test -z "$as_dir" && as_dir=.
12249 for ac_prog in sed gsed; do
12250 for ac_exec_ext in '' $ac_executable_extensions; do
12251 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12252 as_fn_executable_p "$ac_path_SED" || continue
12253 # Check for GNU ac_path_SED and select it if it is found.
12254 # Check for GNU $ac_path_SED
12255 case `"$ac_path_SED" --version 2>&1` in
12256 *GNU*)
12257 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12258 *)
12259 ac_count=0
12260 $as_echo_n 0123456789 >"conftest.in"
12261 while :
12262 do
12263 cat "conftest.in" "conftest.in" >"conftest.tmp"
12264 mv "conftest.tmp" "conftest.in"
12265 cp "conftest.in" "conftest.nl"
12266 $as_echo '' >> "conftest.nl"
12267 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12268 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12269 as_fn_arith $ac_count + 1 && ac_count=$as_val
12270 if test $ac_count -gt ${ac_path_SED_max-0}; then
12271 # Best one so far, save it but keep looking for a better one
12272 ac_cv_path_SED="$ac_path_SED"
12273 ac_path_SED_max=$ac_count
12274 fi
12275 # 10*(2^10) chars as input seems more than enough
12276 test $ac_count -gt 10 && break
12277 done
12278 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12279 esac
12280
12281 $ac_path_SED_found && break 3
12282 done
12283 done
12284 done
12285 IFS=$as_save_IFS
12286 if test -z "$ac_cv_path_SED"; then
12287 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12288 fi
12289 else
12290 ac_cv_path_SED=$SED
12291 fi
12292
12293 fi
12294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12295 $as_echo "$ac_cv_path_SED" >&6; }
12296 SED="$ac_cv_path_SED"
12297 rm -f conftest.sed
12298
12299
12300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12301 $as_echo_n "checking for ANSI C header files... " >&6; }
12302 if ${ac_cv_header_stdc+:} false; then :
12303 $as_echo_n "(cached) " >&6
12304 else
12305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12306 /* end confdefs.h. */
12307 #include <stdlib.h>
12308 #include <stdarg.h>
12309 #include <string.h>
12310 #include <float.h>
12311
12312 int
12313 main ()
12314 {
12315
12316 ;
12317 return 0;
12318 }
12319 _ACEOF
12320 if ac_fn_c_try_compile "$LINENO"; then :
12321 ac_cv_header_stdc=yes
12322 else
12323 ac_cv_header_stdc=no
12324 fi
12325 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12326
12327 if test $ac_cv_header_stdc = yes; then
12328 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12330 /* end confdefs.h. */
12331 #include <string.h>
12332
12333 _ACEOF
12334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12335 $EGREP "memchr" >/dev/null 2>&1; then :
12336
12337 else
12338 ac_cv_header_stdc=no
12339 fi
12340 rm -f conftest*
12341
12342 fi
12343
12344 if test $ac_cv_header_stdc = yes; then
12345 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12347 /* end confdefs.h. */
12348 #include <stdlib.h>
12349
12350 _ACEOF
12351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12352 $EGREP "free" >/dev/null 2>&1; then :
12353
12354 else
12355 ac_cv_header_stdc=no
12356 fi
12357 rm -f conftest*
12358
12359 fi
12360
12361 if test $ac_cv_header_stdc = yes; then
12362 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12363 if test "$cross_compiling" = yes; then :
12364 :
12365 else
12366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12367 /* end confdefs.h. */
12368 #include <ctype.h>
12369 #include <stdlib.h>
12370 #if ((' ' & 0x0FF) == 0x020)
12371 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12372 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12373 #else
12374 # define ISLOWER(c) \
12375 (('a' <= (c) && (c) <= 'i') \
12376 || ('j' <= (c) && (c) <= 'r') \
12377 || ('s' <= (c) && (c) <= 'z'))
12378 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12379 #endif
12380
12381 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12382 int
12383 main ()
12384 {
12385 int i;
12386 for (i = 0; i < 256; i++)
12387 if (XOR (islower (i), ISLOWER (i))
12388 || toupper (i) != TOUPPER (i))
12389 return 2;
12390 return 0;
12391 }
12392 _ACEOF
12393 if ac_fn_c_try_run "$LINENO"; then :
12394
12395 else
12396 ac_cv_header_stdc=no
12397 fi
12398 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12399 conftest.$ac_objext conftest.beam conftest.$ac_ext
12400 fi
12401
12402 fi
12403 fi
12404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12405 $as_echo "$ac_cv_header_stdc" >&6; }
12406 if test $ac_cv_header_stdc = yes; then
12407
12408 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12409
12410 fi
12411
12412 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12413 # for constant arguments. Useless!
12414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12415 $as_echo_n "checking for working alloca.h... " >&6; }
12416 if ${ac_cv_working_alloca_h+:} false; then :
12417 $as_echo_n "(cached) " >&6
12418 else
12419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12420 /* end confdefs.h. */
12421 #include <alloca.h>
12422 int
12423 main ()
12424 {
12425 char *p = (char *) alloca (2 * sizeof (int));
12426 if (p) return 0;
12427 ;
12428 return 0;
12429 }
12430 _ACEOF
12431 if ac_fn_c_try_link "$LINENO"; then :
12432 ac_cv_working_alloca_h=yes
12433 else
12434 ac_cv_working_alloca_h=no
12435 fi
12436 rm -f core conftest.err conftest.$ac_objext \
12437 conftest$ac_exeext conftest.$ac_ext
12438 fi
12439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12440 $as_echo "$ac_cv_working_alloca_h" >&6; }
12441 if test $ac_cv_working_alloca_h = yes; then
12442
12443 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12444
12445 fi
12446
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12448 $as_echo_n "checking for alloca... " >&6; }
12449 if ${ac_cv_func_alloca_works+:} false; then :
12450 $as_echo_n "(cached) " >&6
12451 else
12452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12453 /* end confdefs.h. */
12454 #ifdef __GNUC__
12455 # define alloca __builtin_alloca
12456 #else
12457 # ifdef _MSC_VER
12458 # include <malloc.h>
12459 # define alloca _alloca
12460 # else
12461 # ifdef HAVE_ALLOCA_H
12462 # include <alloca.h>
12463 # else
12464 # ifdef _AIX
12465 #pragma alloca
12466 # else
12467 # ifndef alloca /* predefined by HP cc +Olibcalls */
12468 void *alloca (size_t);
12469 # endif
12470 # endif
12471 # endif
12472 # endif
12473 #endif
12474
12475 int
12476 main ()
12477 {
12478 char *p = (char *) alloca (1);
12479 if (p) return 0;
12480 ;
12481 return 0;
12482 }
12483 _ACEOF
12484 if ac_fn_c_try_link "$LINENO"; then :
12485 ac_cv_func_alloca_works=yes
12486 else
12487 ac_cv_func_alloca_works=no
12488 fi
12489 rm -f core conftest.err conftest.$ac_objext \
12490 conftest$ac_exeext conftest.$ac_ext
12491 fi
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12493 $as_echo "$ac_cv_func_alloca_works" >&6; }
12494
12495 if test $ac_cv_func_alloca_works = yes; then
12496
12497 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12498
12499 else
12500 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12501 # that cause trouble. Some versions do not even contain alloca or
12502 # contain a buggy version. If you still want to use their alloca,
12503 # use ar to extract alloca.o from them instead of compiling alloca.c.
12504
12505 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12506
12507 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12508
12509
12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12511 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12512 if ${ac_cv_os_cray+:} false; then :
12513 $as_echo_n "(cached) " >&6
12514 else
12515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12516 /* end confdefs.h. */
12517 #if defined CRAY && ! defined CRAY2
12518 webecray
12519 #else
12520 wenotbecray
12521 #endif
12522
12523 _ACEOF
12524 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12525 $EGREP "webecray" >/dev/null 2>&1; then :
12526 ac_cv_os_cray=yes
12527 else
12528 ac_cv_os_cray=no
12529 fi
12530 rm -f conftest*
12531
12532 fi
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12534 $as_echo "$ac_cv_os_cray" >&6; }
12535 if test $ac_cv_os_cray = yes; then
12536 for ac_func in _getb67 GETB67 getb67; do
12537 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12538 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12539 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12540
12541 cat >>confdefs.h <<_ACEOF
12542 #define CRAY_STACKSEG_END $ac_func
12543 _ACEOF
12544
12545 break
12546 fi
12547
12548 done
12549 fi
12550
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12552 $as_echo_n "checking stack direction for C alloca... " >&6; }
12553 if ${ac_cv_c_stack_direction+:} false; then :
12554 $as_echo_n "(cached) " >&6
12555 else
12556 if test "$cross_compiling" = yes; then :
12557 ac_cv_c_stack_direction=0
12558 else
12559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12560 /* end confdefs.h. */
12561 $ac_includes_default
12562 int
12563 find_stack_direction (int *addr, int depth)
12564 {
12565 int dir, dummy = 0;
12566 if (! addr)
12567 addr = &dummy;
12568 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12569 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12570 return dir + dummy;
12571 }
12572
12573 int
12574 main (int argc, char **argv)
12575 {
12576 return find_stack_direction (0, argc + !argv + 20) < 0;
12577 }
12578 _ACEOF
12579 if ac_fn_c_try_run "$LINENO"; then :
12580 ac_cv_c_stack_direction=1
12581 else
12582 ac_cv_c_stack_direction=-1
12583 fi
12584 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12585 conftest.$ac_objext conftest.beam conftest.$ac_ext
12586 fi
12587
12588 fi
12589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12590 $as_echo "$ac_cv_c_stack_direction" >&6; }
12591 cat >>confdefs.h <<_ACEOF
12592 #define STACK_DIRECTION $ac_cv_c_stack_direction
12593 _ACEOF
12594
12595
12596 fi
12597
12598
12599 WIN32APILIBS=
12600 case ${host} in
12601 *mingw32*)
12602
12603 $as_echo "#define USE_WIN32API 1" >>confdefs.h
12604
12605 WIN32APILIBS="-lws2_32"
12606 ;;
12607 esac
12608
12609
12610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12611 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12612 if ${am_cv_langinfo_codeset+:} false; then :
12613 $as_echo_n "(cached) " >&6
12614 else
12615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12616 /* end confdefs.h. */
12617 #include <langinfo.h>
12618 int
12619 main ()
12620 {
12621 char* cs = nl_langinfo(CODESET);
12622 ;
12623 return 0;
12624 }
12625 _ACEOF
12626 if ac_fn_c_try_link "$LINENO"; then :
12627 am_cv_langinfo_codeset=yes
12628 else
12629 am_cv_langinfo_codeset=no
12630 fi
12631 rm -f core conftest.err conftest.$ac_objext \
12632 conftest$ac_exeext conftest.$ac_ext
12633
12634 fi
12635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12636 $as_echo "$am_cv_langinfo_codeset" >&6; }
12637 if test $am_cv_langinfo_codeset = yes; then
12638
12639 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12640
12641 fi
12642
12643
12644 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h sys/procfs.h proc_service.h
12645 do :
12646 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12647 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12648 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12649 cat >>confdefs.h <<_ACEOF
12650 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12651 _ACEOF
12652
12653 fi
12654
12655 done
12656
12657
12658
12659 for ac_func in getpagesize
12660 do :
12661 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12662 if test "x$ac_cv_func_getpagesize" = xyes; then :
12663 cat >>confdefs.h <<_ACEOF
12664 #define HAVE_GETPAGESIZE 1
12665 _ACEOF
12666
12667 fi
12668 done
12669
12670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12671 $as_echo_n "checking for working mmap... " >&6; }
12672 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12673 $as_echo_n "(cached) " >&6
12674 else
12675 if test "$cross_compiling" = yes; then :
12676 ac_cv_func_mmap_fixed_mapped=no
12677 else
12678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12679 /* end confdefs.h. */
12680 $ac_includes_default
12681 /* malloc might have been renamed as rpl_malloc. */
12682 #undef malloc
12683
12684 /* Thanks to Mike Haertel and Jim Avera for this test.
12685 Here is a matrix of mmap possibilities:
12686 mmap private not fixed
12687 mmap private fixed at somewhere currently unmapped
12688 mmap private fixed at somewhere already mapped
12689 mmap shared not fixed
12690 mmap shared fixed at somewhere currently unmapped
12691 mmap shared fixed at somewhere already mapped
12692 For private mappings, we should verify that changes cannot be read()
12693 back from the file, nor mmap's back from the file at a different
12694 address. (There have been systems where private was not correctly
12695 implemented like the infamous i386 svr4.0, and systems where the
12696 VM page cache was not coherent with the file system buffer cache
12697 like early versions of FreeBSD and possibly contemporary NetBSD.)
12698 For shared mappings, we should conversely verify that changes get
12699 propagated back to all the places they're supposed to be.
12700
12701 Grep wants private fixed already mapped.
12702 The main things grep needs to know about mmap are:
12703 * does it exist and is it safe to write into the mmap'd area
12704 * how to use it (BSD variants) */
12705
12706 #include <fcntl.h>
12707 #include <sys/mman.h>
12708
12709 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12710 char *malloc ();
12711 #endif
12712
12713 /* This mess was copied from the GNU getpagesize.h. */
12714 #ifndef HAVE_GETPAGESIZE
12715 # ifdef _SC_PAGESIZE
12716 # define getpagesize() sysconf(_SC_PAGESIZE)
12717 # else /* no _SC_PAGESIZE */
12718 # ifdef HAVE_SYS_PARAM_H
12719 # include <sys/param.h>
12720 # ifdef EXEC_PAGESIZE
12721 # define getpagesize() EXEC_PAGESIZE
12722 # else /* no EXEC_PAGESIZE */
12723 # ifdef NBPG
12724 # define getpagesize() NBPG * CLSIZE
12725 # ifndef CLSIZE
12726 # define CLSIZE 1
12727 # endif /* no CLSIZE */
12728 # else /* no NBPG */
12729 # ifdef NBPC
12730 # define getpagesize() NBPC
12731 # else /* no NBPC */
12732 # ifdef PAGESIZE
12733 # define getpagesize() PAGESIZE
12734 # endif /* PAGESIZE */
12735 # endif /* no NBPC */
12736 # endif /* no NBPG */
12737 # endif /* no EXEC_PAGESIZE */
12738 # else /* no HAVE_SYS_PARAM_H */
12739 # define getpagesize() 8192 /* punt totally */
12740 # endif /* no HAVE_SYS_PARAM_H */
12741 # endif /* no _SC_PAGESIZE */
12742
12743 #endif /* no HAVE_GETPAGESIZE */
12744
12745 int
12746 main ()
12747 {
12748 char *data, *data2, *data3;
12749 const char *cdata2;
12750 int i, pagesize;
12751 int fd, fd2;
12752
12753 pagesize = getpagesize ();
12754
12755 /* First, make a file with some known garbage in it. */
12756 data = (char *) malloc (pagesize);
12757 if (!data)
12758 return 1;
12759 for (i = 0; i < pagesize; ++i)
12760 *(data + i) = rand ();
12761 umask (0);
12762 fd = creat ("conftest.mmap", 0600);
12763 if (fd < 0)
12764 return 2;
12765 if (write (fd, data, pagesize) != pagesize)
12766 return 3;
12767 close (fd);
12768
12769 /* Next, check that the tail of a page is zero-filled. File must have
12770 non-zero length, otherwise we risk SIGBUS for entire page. */
12771 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12772 if (fd2 < 0)
12773 return 4;
12774 cdata2 = "";
12775 if (write (fd2, cdata2, 1) != 1)
12776 return 5;
12777 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12778 if (data2 == MAP_FAILED)
12779 return 6;
12780 for (i = 0; i < pagesize; ++i)
12781 if (*(data2 + i))
12782 return 7;
12783 close (fd2);
12784 if (munmap (data2, pagesize))
12785 return 8;
12786
12787 /* Next, try to mmap the file at a fixed address which already has
12788 something else allocated at it. If we can, also make sure that
12789 we see the same garbage. */
12790 fd = open ("conftest.mmap", O_RDWR);
12791 if (fd < 0)
12792 return 9;
12793 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12794 MAP_PRIVATE | MAP_FIXED, fd, 0L))
12795 return 10;
12796 for (i = 0; i < pagesize; ++i)
12797 if (*(data + i) != *(data2 + i))
12798 return 11;
12799
12800 /* Finally, make sure that changes to the mapped area do not
12801 percolate back to the file as seen by read(). (This is a bug on
12802 some variants of i386 svr4.0.) */
12803 for (i = 0; i < pagesize; ++i)
12804 *(data2 + i) = *(data2 + i) + 1;
12805 data3 = (char *) malloc (pagesize);
12806 if (!data3)
12807 return 12;
12808 if (read (fd, data3, pagesize) != pagesize)
12809 return 13;
12810 for (i = 0; i < pagesize; ++i)
12811 if (*(data + i) != *(data3 + i))
12812 return 14;
12813 close (fd);
12814 return 0;
12815 }
12816 _ACEOF
12817 if ac_fn_c_try_run "$LINENO"; then :
12818 ac_cv_func_mmap_fixed_mapped=yes
12819 else
12820 ac_cv_func_mmap_fixed_mapped=no
12821 fi
12822 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12823 conftest.$ac_objext conftest.beam conftest.$ac_ext
12824 fi
12825
12826 fi
12827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12828 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12829 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12830
12831 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12832
12833 fi
12834 rm -f conftest.mmap conftest.txt
12835
12836 for ac_header in vfork.h
12837 do :
12838 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12839 if test "x$ac_cv_header_vfork_h" = xyes; then :
12840 cat >>confdefs.h <<_ACEOF
12841 #define HAVE_VFORK_H 1
12842 _ACEOF
12843
12844 fi
12845
12846 done
12847
12848 for ac_func in fork vfork
12849 do :
12850 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12851 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12852 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12853 cat >>confdefs.h <<_ACEOF
12854 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12855 _ACEOF
12856
12857 fi
12858 done
12859
12860 if test "x$ac_cv_func_fork" = xyes; then
12861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12862 $as_echo_n "checking for working fork... " >&6; }
12863 if ${ac_cv_func_fork_works+:} false; then :
12864 $as_echo_n "(cached) " >&6
12865 else
12866 if test "$cross_compiling" = yes; then :
12867 ac_cv_func_fork_works=cross
12868 else
12869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12870 /* end confdefs.h. */
12871 $ac_includes_default
12872 int
12873 main ()
12874 {
12875
12876 /* By Ruediger Kuhlmann. */
12877 return fork () < 0;
12878
12879 ;
12880 return 0;
12881 }
12882 _ACEOF
12883 if ac_fn_c_try_run "$LINENO"; then :
12884 ac_cv_func_fork_works=yes
12885 else
12886 ac_cv_func_fork_works=no
12887 fi
12888 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12889 conftest.$ac_objext conftest.beam conftest.$ac_ext
12890 fi
12891
12892 fi
12893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12894 $as_echo "$ac_cv_func_fork_works" >&6; }
12895
12896 else
12897 ac_cv_func_fork_works=$ac_cv_func_fork
12898 fi
12899 if test "x$ac_cv_func_fork_works" = xcross; then
12900 case $host in
12901 *-*-amigaos* | *-*-msdosdjgpp*)
12902 # Override, as these systems have only a dummy fork() stub
12903 ac_cv_func_fork_works=no
12904 ;;
12905 *)
12906 ac_cv_func_fork_works=yes
12907 ;;
12908 esac
12909 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12910 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
12911 fi
12912 ac_cv_func_vfork_works=$ac_cv_func_vfork
12913 if test "x$ac_cv_func_vfork" = xyes; then
12914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12915 $as_echo_n "checking for working vfork... " >&6; }
12916 if ${ac_cv_func_vfork_works+:} false; then :
12917 $as_echo_n "(cached) " >&6
12918 else
12919 if test "$cross_compiling" = yes; then :
12920 ac_cv_func_vfork_works=cross
12921 else
12922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12923 /* end confdefs.h. */
12924 /* Thanks to Paul Eggert for this test. */
12925 $ac_includes_default
12926 #include <sys/wait.h>
12927 #ifdef HAVE_VFORK_H
12928 # include <vfork.h>
12929 #endif
12930 /* On some sparc systems, changes by the child to local and incoming
12931 argument registers are propagated back to the parent. The compiler
12932 is told about this with #include <vfork.h>, but some compilers
12933 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12934 static variable whose address is put into a register that is
12935 clobbered by the vfork. */
12936 static void
12937 #ifdef __cplusplus
12938 sparc_address_test (int arg)
12939 # else
12940 sparc_address_test (arg) int arg;
12941 #endif
12942 {
12943 static pid_t child;
12944 if (!child) {
12945 child = vfork ();
12946 if (child < 0) {
12947 perror ("vfork");
12948 _exit(2);
12949 }
12950 if (!child) {
12951 arg = getpid();
12952 write(-1, "", 0);
12953 _exit (arg);
12954 }
12955 }
12956 }
12957
12958 int
12959 main ()
12960 {
12961 pid_t parent = getpid ();
12962 pid_t child;
12963
12964 sparc_address_test (0);
12965
12966 child = vfork ();
12967
12968 if (child == 0) {
12969 /* Here is another test for sparc vfork register problems. This
12970 test uses lots of local variables, at least as many local
12971 variables as main has allocated so far including compiler
12972 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12973 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12974 reuse the register of parent for one of the local variables,
12975 since it will think that parent can't possibly be used any more
12976 in this routine. Assigning to the local variable will thus
12977 munge parent in the parent process. */
12978 pid_t
12979 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12980 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12981 /* Convince the compiler that p..p7 are live; otherwise, it might
12982 use the same hardware register for all 8 local variables. */
12983 if (p != p1 || p != p2 || p != p3 || p != p4
12984 || p != p5 || p != p6 || p != p7)
12985 _exit(1);
12986
12987 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12988 from child file descriptors. If the child closes a descriptor
12989 before it execs or exits, this munges the parent's descriptor
12990 as well. Test for this by closing stdout in the child. */
12991 _exit(close(fileno(stdout)) != 0);
12992 } else {
12993 int status;
12994 struct stat st;
12995
12996 while (wait(&status) != child)
12997 ;
12998 return (
12999 /* Was there some problem with vforking? */
13000 child < 0
13001
13002 /* Did the child fail? (This shouldn't happen.) */
13003 || status
13004
13005 /* Did the vfork/compiler bug occur? */
13006 || parent != getpid()
13007
13008 /* Did the file descriptor bug occur? */
13009 || fstat(fileno(stdout), &st) != 0
13010 );
13011 }
13012 }
13013 _ACEOF
13014 if ac_fn_c_try_run "$LINENO"; then :
13015 ac_cv_func_vfork_works=yes
13016 else
13017 ac_cv_func_vfork_works=no
13018 fi
13019 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13020 conftest.$ac_objext conftest.beam conftest.$ac_ext
13021 fi
13022
13023 fi
13024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13025 $as_echo "$ac_cv_func_vfork_works" >&6; }
13026
13027 fi;
13028 if test "x$ac_cv_func_fork_works" = xcross; then
13029 ac_cv_func_vfork_works=$ac_cv_func_vfork
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13031 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13032 fi
13033
13034 if test "x$ac_cv_func_vfork_works" = xyes; then
13035
13036 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13037
13038 else
13039
13040 $as_echo "#define vfork fork" >>confdefs.h
13041
13042 fi
13043 if test "x$ac_cv_func_fork_works" = xyes; then
13044
13045 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13046
13047 fi
13048
13049 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
13050 ptrace64 sbrk setns sigaltstack sigprocmask \
13051 setpgid setpgrp getrusage getauxval
13052 do :
13053 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13054 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13055 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13056 cat >>confdefs.h <<_ACEOF
13057 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13058 _ACEOF
13059
13060 fi
13061 done
13062
13063
13064 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13065 "
13066 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13067 ac_have_decl=1
13068 else
13069 ac_have_decl=0
13070 fi
13071
13072 cat >>confdefs.h <<_ACEOF
13073 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13074 _ACEOF
13075
13076
13077 if test "$cross_compiling" = yes; then :
13078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13079 /* end confdefs.h. */
13080 #include <sys/personality.h>
13081 int
13082 main ()
13083 {
13084
13085 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13086 # define ADDR_NO_RANDOMIZE 0x0040000
13087 # endif
13088 /* Test the flag could be set and stays set. */
13089 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13090 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13091 return 1
13092 ;
13093 return 0;
13094 }
13095 _ACEOF
13096 if ac_fn_c_try_link "$LINENO"; then :
13097 have_personality=true
13098 else
13099 have_personality=false
13100 fi
13101 rm -f core conftest.err conftest.$ac_objext \
13102 conftest$ac_exeext conftest.$ac_ext
13103 else
13104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13105 /* end confdefs.h. */
13106 #include <sys/personality.h>
13107 int
13108 main ()
13109 {
13110
13111 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13112 # define ADDR_NO_RANDOMIZE 0x0040000
13113 # endif
13114 /* Test the flag could be set and stays set. */
13115 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13116 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13117 return 1
13118 ;
13119 return 0;
13120 }
13121 _ACEOF
13122 if ac_fn_c_try_run "$LINENO"; then :
13123 have_personality=true
13124 else
13125 have_personality=false
13126 fi
13127 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13128 conftest.$ac_objext conftest.beam conftest.$ac_ext
13129 fi
13130
13131 if $have_personality
13132 then
13133
13134 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
13135
13136 fi
13137
13138 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13139 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13140 ac_have_decl=1
13141 else
13142 ac_have_decl=0
13143 fi
13144
13145 cat >>confdefs.h <<_ACEOF
13146 #define HAVE_DECL_STRSTR $ac_have_decl
13147 _ACEOF
13148
13149
13150 # ----------------------- #
13151 # Checks for structures. #
13152 # ----------------------- #
13153
13154 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13155 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13156
13157 cat >>confdefs.h <<_ACEOF
13158 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13159 _ACEOF
13160
13161
13162 fi
13163 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13164 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13165
13166 cat >>confdefs.h <<_ACEOF
13167 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13168 _ACEOF
13169
13170
13171 fi
13172
13173
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13175 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13176 if ${ac_cv_search_kinfo_getfile+:} false; then :
13177 $as_echo_n "(cached) " >&6
13178 else
13179 ac_func_search_save_LIBS=$LIBS
13180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13181 /* end confdefs.h. */
13182
13183 /* Override any GCC internal prototype to avoid an error.
13184 Use char because int might match the return type of a GCC
13185 builtin and then its argument prototype would still apply. */
13186 #ifdef __cplusplus
13187 extern "C"
13188 #endif
13189 char kinfo_getfile ();
13190 int
13191 main ()
13192 {
13193 return kinfo_getfile ();
13194 ;
13195 return 0;
13196 }
13197 _ACEOF
13198 for ac_lib in '' util util-freebsd; do
13199 if test -z "$ac_lib"; then
13200 ac_res="none required"
13201 else
13202 ac_res=-l$ac_lib
13203 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13204 fi
13205 if ac_fn_c_try_link "$LINENO"; then :
13206 ac_cv_search_kinfo_getfile=$ac_res
13207 fi
13208 rm -f core conftest.err conftest.$ac_objext \
13209 conftest$ac_exeext
13210 if ${ac_cv_search_kinfo_getfile+:} false; then :
13211 break
13212 fi
13213 done
13214 if ${ac_cv_search_kinfo_getfile+:} false; then :
13215
13216 else
13217 ac_cv_search_kinfo_getfile=no
13218 fi
13219 rm conftest.$ac_ext
13220 LIBS=$ac_func_search_save_LIBS
13221 fi
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13223 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13224 ac_res=$ac_cv_search_kinfo_getfile
13225 if test "$ac_res" != no; then :
13226 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13227
13228 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
13229
13230 fi
13231
13232
13233 # Check for std::thread. This does not work on some platforms, like
13234 # mingw and DJGPP.
13235 ac_ext=cpp
13236 ac_cpp='$CXXCPP $CPPFLAGS'
13237 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13238 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13239 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13240
13241
13242
13243
13244
13245 ac_ext=c
13246 ac_cpp='$CPP $CPPFLAGS'
13247 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13248 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13249 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13250
13251 ax_pthread_ok=no
13252
13253 # We used to check for pthread.h first, but this fails if pthread.h
13254 # requires special compiler flags (e.g. on Tru64 or Sequent).
13255 # It gets checked for in the link test anyway.
13256
13257 # First of all, check if the user has set any of the PTHREAD_LIBS,
13258 # etcetera environment variables, and if threads linking works using
13259 # them:
13260 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13261 ax_pthread_save_CC="$CC"
13262 ax_pthread_save_CFLAGS="$CFLAGS"
13263 ax_pthread_save_LIBS="$LIBS"
13264 if test "x$PTHREAD_CC" != "x"; then :
13265 CC="$PTHREAD_CC"
13266 fi
13267 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13268 LIBS="$PTHREAD_LIBS $LIBS"
13269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13270 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13272 /* end confdefs.h. */
13273
13274 /* Override any GCC internal prototype to avoid an error.
13275 Use char because int might match the return type of a GCC
13276 builtin and then its argument prototype would still apply. */
13277 #ifdef __cplusplus
13278 extern "C"
13279 #endif
13280 char pthread_join ();
13281 int
13282 main ()
13283 {
13284 return pthread_join ();
13285 ;
13286 return 0;
13287 }
13288 _ACEOF
13289 if ac_fn_c_try_link "$LINENO"; then :
13290 ax_pthread_ok=yes
13291 fi
13292 rm -f core conftest.err conftest.$ac_objext \
13293 conftest$ac_exeext conftest.$ac_ext
13294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13295 $as_echo "$ax_pthread_ok" >&6; }
13296 if test "x$ax_pthread_ok" = "xno"; then
13297 PTHREAD_LIBS=""
13298 PTHREAD_CFLAGS=""
13299 fi
13300 CC="$ax_pthread_save_CC"
13301 CFLAGS="$ax_pthread_save_CFLAGS"
13302 LIBS="$ax_pthread_save_LIBS"
13303 fi
13304
13305 # We must check for the threads library under a number of different
13306 # names; the ordering is very important because some systems
13307 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13308 # libraries is broken (non-POSIX).
13309
13310 # Create a list of thread flags to try. Items starting with a "-" are
13311 # C compiler flags, and other items are library names, except for "none"
13312 # which indicates that we try without any flags at all, and "pthread-config"
13313 # which is a program returning the flags for the Pth emulation library.
13314
13315 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13316
13317 # The ordering *is* (sometimes) important. Some notes on the
13318 # individual items follow:
13319
13320 # pthreads: AIX (must check this before -lpthread)
13321 # none: in case threads are in libc; should be tried before -Kthread and
13322 # other compiler flags to prevent continual compiler warnings
13323 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13324 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13325 # (Note: HP C rejects this with "bad form for `-t' option")
13326 # -pthreads: Solaris/gcc (Note: HP C also rejects)
13327 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13328 # doesn't hurt to check since this sometimes defines pthreads and
13329 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
13330 # is present but should not be used directly; and before -mthreads,
13331 # because the compiler interprets this as "-mt" + "-hreads")
13332 # -mthreads: Mingw32/gcc, Lynx/gcc
13333 # pthread: Linux, etcetera
13334 # --thread-safe: KAI C++
13335 # pthread-config: use pthread-config program (for GNU Pth library)
13336
13337 case $host_os in
13338
13339 freebsd*)
13340
13341 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13342 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13343
13344 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13345 ;;
13346
13347 hpux*)
13348
13349 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13350 # multi-threading and also sets -lpthread."
13351
13352 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13353 ;;
13354
13355 openedition*)
13356
13357 # IBM z/OS requires a feature-test macro to be defined in order to
13358 # enable POSIX threads at all, so give the user a hint if this is
13359 # not set. (We don't define these ourselves, as they can affect
13360 # other portions of the system API in unpredictable ways.)
13361
13362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13363 /* end confdefs.h. */
13364
13365 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13366 AX_PTHREAD_ZOS_MISSING
13367 # endif
13368
13369 _ACEOF
13370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13371 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13372 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13373 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13374 fi
13375 rm -f conftest*
13376
13377 ;;
13378
13379 solaris*)
13380
13381 # On Solaris (at least, for some versions), libc contains stubbed
13382 # (non-functional) versions of the pthreads routines, so link-based
13383 # tests will erroneously succeed. (N.B.: The stubs are missing
13384 # pthread_cleanup_push, or rather a function called by this macro,
13385 # so we could check for that, but who knows whether they'll stub
13386 # that too in a future libc.) So we'll check first for the
13387 # standard Solaris way of linking pthreads (-mt -lpthread).
13388
13389 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13390 ;;
13391 esac
13392
13393 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13394
13395 if test "x$GCC" = "xyes"; then :
13396 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13397 fi
13398
13399 # The presence of a feature test macro requesting re-entrant function
13400 # definitions is, on some systems, a strong hint that pthreads support is
13401 # correctly enabled
13402
13403 case $host_os in
13404 darwin* | hpux* | linux* | osf* | solaris*)
13405 ax_pthread_check_macro="_REENTRANT"
13406 ;;
13407
13408 aix*)
13409 ax_pthread_check_macro="_THREAD_SAFE"
13410 ;;
13411
13412 *)
13413 ax_pthread_check_macro="--"
13414 ;;
13415 esac
13416 if test "x$ax_pthread_check_macro" = "x--"; then :
13417 ax_pthread_check_cond=0
13418 else
13419 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13420 fi
13421
13422 # Are we compiling with Clang?
13423
13424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13425 $as_echo_n "checking whether $CC is Clang... " >&6; }
13426 if ${ax_cv_PTHREAD_CLANG+:} false; then :
13427 $as_echo_n "(cached) " >&6
13428 else
13429 ax_cv_PTHREAD_CLANG=no
13430 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13431 if test "x$GCC" = "xyes"; then
13432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13433 /* end confdefs.h. */
13434 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13435 # if defined(__clang__) && defined(__llvm__)
13436 AX_PTHREAD_CC_IS_CLANG
13437 # endif
13438
13439 _ACEOF
13440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13441 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13442 ax_cv_PTHREAD_CLANG=yes
13443 fi
13444 rm -f conftest*
13445
13446 fi
13447
13448 fi
13449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13450 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13451 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13452
13453 ax_pthread_clang_warning=no
13454
13455 # Clang needs special handling, because older versions handle the -pthread
13456 # option in a rather... idiosyncratic way
13457
13458 if test "x$ax_pthread_clang" = "xyes"; then
13459
13460 # Clang takes -pthread; it has never supported any other flag
13461
13462 # (Note 1: This will need to be revisited if a system that Clang
13463 # supports has POSIX threads in a separate library. This tends not
13464 # to be the way of modern systems, but it's conceivable.)
13465
13466 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13467 # to get POSIX threads support; the API is always present and
13468 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13469 # -pthread does define _REENTRANT, and while the Darwin headers
13470 # ignore this macro, third-party headers might not.)
13471
13472 PTHREAD_CFLAGS="-pthread"
13473 PTHREAD_LIBS=
13474
13475 ax_pthread_ok=yes
13476
13477 # However, older versions of Clang make a point of warning the user
13478 # that, in an invocation where only linking and no compilation is
13479 # taking place, the -pthread option has no effect ("argument unused
13480 # during compilation"). They expect -pthread to be passed in only
13481 # when source code is being compiled.
13482 #
13483 # Problem is, this is at odds with the way Automake and most other
13484 # C build frameworks function, which is that the same flags used in
13485 # compilation (CFLAGS) are also used in linking. Many systems
13486 # supported by AX_PTHREAD require exactly this for POSIX threads
13487 # support, and in fact it is often not straightforward to specify a
13488 # flag that is used only in the compilation phase and not in
13489 # linking. Such a scenario is extremely rare in practice.
13490 #
13491 # Even though use of the -pthread flag in linking would only print
13492 # a warning, this can be a nuisance for well-run software projects
13493 # that build with -Werror. So if the active version of Clang has
13494 # this misfeature, we search for an option to squash it.
13495
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13497 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13498 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13499 $as_echo_n "(cached) " >&6
13500 else
13501 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13502 # Create an alternate version of $ac_link that compiles and
13503 # links in two steps (.c -> .o, .o -> exe) instead of one
13504 # (.c -> exe), because the warning occurs only in the second
13505 # step
13506 ax_pthread_save_ac_link="$ac_link"
13507 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13508 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13509 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13510 ax_pthread_save_CFLAGS="$CFLAGS"
13511 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13512 if test "x$ax_pthread_try" = "xunknown"; then :
13513 break
13514 fi
13515 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13516 ac_link="$ax_pthread_save_ac_link"
13517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13518 /* end confdefs.h. */
13519 int main(void){return 0;}
13520 _ACEOF
13521 if ac_fn_c_try_link "$LINENO"; then :
13522 ac_link="$ax_pthread_2step_ac_link"
13523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13524 /* end confdefs.h. */
13525 int main(void){return 0;}
13526 _ACEOF
13527 if ac_fn_c_try_link "$LINENO"; then :
13528 break
13529 fi
13530 rm -f core conftest.err conftest.$ac_objext \
13531 conftest$ac_exeext conftest.$ac_ext
13532
13533 fi
13534 rm -f core conftest.err conftest.$ac_objext \
13535 conftest$ac_exeext conftest.$ac_ext
13536 done
13537 ac_link="$ax_pthread_save_ac_link"
13538 CFLAGS="$ax_pthread_save_CFLAGS"
13539 if test "x$ax_pthread_try" = "x"; then :
13540 ax_pthread_try=no
13541 fi
13542 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13543
13544 fi
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13546 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13547
13548 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13549 no | unknown) ;;
13550 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13551 esac
13552
13553 fi # $ax_pthread_clang = yes
13554
13555 if test "x$ax_pthread_ok" = "xno"; then
13556 for ax_pthread_try_flag in $ax_pthread_flags; do
13557
13558 case $ax_pthread_try_flag in
13559 none)
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13561 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
13562 ;;
13563
13564 -mt,pthread)
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13566 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13567 PTHREAD_CFLAGS="-mt"
13568 PTHREAD_LIBS="-lpthread"
13569 ;;
13570
13571 -*)
13572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13573 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13574 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13575 ;;
13576
13577 pthread-config)
13578 # Extract the first word of "pthread-config", so it can be a program name with args.
13579 set dummy pthread-config; ac_word=$2
13580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13581 $as_echo_n "checking for $ac_word... " >&6; }
13582 if ${ac_cv_prog_ax_pthread_config+:} false; then :
13583 $as_echo_n "(cached) " >&6
13584 else
13585 if test -n "$ax_pthread_config"; then
13586 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13587 else
13588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13589 for as_dir in $PATH
13590 do
13591 IFS=$as_save_IFS
13592 test -z "$as_dir" && as_dir=.
13593 for ac_exec_ext in '' $ac_executable_extensions; do
13594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13595 ac_cv_prog_ax_pthread_config="yes"
13596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13597 break 2
13598 fi
13599 done
13600 done
13601 IFS=$as_save_IFS
13602
13603 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13604 fi
13605 fi
13606 ax_pthread_config=$ac_cv_prog_ax_pthread_config
13607 if test -n "$ax_pthread_config"; then
13608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13609 $as_echo "$ax_pthread_config" >&6; }
13610 else
13611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13612 $as_echo "no" >&6; }
13613 fi
13614
13615
13616 if test "x$ax_pthread_config" = "xno"; then :
13617 continue
13618 fi
13619 PTHREAD_CFLAGS="`pthread-config --cflags`"
13620 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13621 ;;
13622
13623 *)
13624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13625 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13626 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13627 ;;
13628 esac
13629
13630 ax_pthread_save_CFLAGS="$CFLAGS"
13631 ax_pthread_save_LIBS="$LIBS"
13632 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13633 LIBS="$PTHREAD_LIBS $LIBS"
13634
13635 # Check for various functions. We must include pthread.h,
13636 # since some functions may be macros. (On the Sequent, we
13637 # need a special flag -Kthread to make this header compile.)
13638 # We check for pthread_join because it is in -lpthread on IRIX
13639 # while pthread_create is in libc. We check for pthread_attr_init
13640 # due to DEC craziness with -lpthreads. We check for
13641 # pthread_cleanup_push because it is one of the few pthread
13642 # functions on Solaris that doesn't have a non-functional libc stub.
13643 # We try pthread_create on general principles.
13644
13645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13646 /* end confdefs.h. */
13647 #include <pthread.h>
13648 # if $ax_pthread_check_cond
13649 # error "$ax_pthread_check_macro must be defined"
13650 # endif
13651 static void routine(void *a) { a = 0; }
13652 static void *start_routine(void *a) { return a; }
13653 int
13654 main ()
13655 {
13656 pthread_t th; pthread_attr_t attr;
13657 pthread_create(&th, 0, start_routine, 0);
13658 pthread_join(th, 0);
13659 pthread_attr_init(&attr);
13660 pthread_cleanup_push(routine, 0);
13661 pthread_cleanup_pop(0) /* ; */
13662 ;
13663 return 0;
13664 }
13665 _ACEOF
13666 if ac_fn_c_try_link "$LINENO"; then :
13667 ax_pthread_ok=yes
13668 fi
13669 rm -f core conftest.err conftest.$ac_objext \
13670 conftest$ac_exeext conftest.$ac_ext
13671
13672 CFLAGS="$ax_pthread_save_CFLAGS"
13673 LIBS="$ax_pthread_save_LIBS"
13674
13675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13676 $as_echo "$ax_pthread_ok" >&6; }
13677 if test "x$ax_pthread_ok" = "xyes"; then :
13678 break
13679 fi
13680
13681 PTHREAD_LIBS=""
13682 PTHREAD_CFLAGS=""
13683 done
13684 fi
13685
13686 # Various other checks:
13687 if test "x$ax_pthread_ok" = "xyes"; then
13688 ax_pthread_save_CFLAGS="$CFLAGS"
13689 ax_pthread_save_LIBS="$LIBS"
13690 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13691 LIBS="$PTHREAD_LIBS $LIBS"
13692
13693 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13695 $as_echo_n "checking for joinable pthread attribute... " >&6; }
13696 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13697 $as_echo_n "(cached) " >&6
13698 else
13699 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13700 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13702 /* end confdefs.h. */
13703 #include <pthread.h>
13704 int
13705 main ()
13706 {
13707 int attr = $ax_pthread_attr; return attr /* ; */
13708 ;
13709 return 0;
13710 }
13711 _ACEOF
13712 if ac_fn_c_try_link "$LINENO"; then :
13713 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13714 fi
13715 rm -f core conftest.err conftest.$ac_objext \
13716 conftest$ac_exeext conftest.$ac_ext
13717 done
13718
13719 fi
13720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13721 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13722 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13723 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
13724 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
13725
13726 cat >>confdefs.h <<_ACEOF
13727 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
13728 _ACEOF
13729
13730 ax_pthread_joinable_attr_defined=yes
13731
13732 fi
13733
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
13735 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
13736 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
13737 $as_echo_n "(cached) " >&6
13738 else
13739 ax_cv_PTHREAD_SPECIAL_FLAGS=no
13740 case $host_os in
13741 solaris*)
13742 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
13743 ;;
13744 esac
13745
13746 fi
13747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
13748 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
13749 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
13750 test "x$ax_pthread_special_flags_added" != "xyes"; then :
13751 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
13752 ax_pthread_special_flags_added=yes
13753 fi
13754
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
13756 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
13757 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
13758 $as_echo_n "(cached) " >&6
13759 else
13760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13761 /* end confdefs.h. */
13762 #include <pthread.h>
13763 int
13764 main ()
13765 {
13766 int i = PTHREAD_PRIO_INHERIT;
13767 ;
13768 return 0;
13769 }
13770 _ACEOF
13771 if ac_fn_c_try_link "$LINENO"; then :
13772 ax_cv_PTHREAD_PRIO_INHERIT=yes
13773 else
13774 ax_cv_PTHREAD_PRIO_INHERIT=no
13775 fi
13776 rm -f core conftest.err conftest.$ac_objext \
13777 conftest$ac_exeext conftest.$ac_ext
13778
13779 fi
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
13781 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
13782 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
13783 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
13784
13785 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
13786
13787 ax_pthread_prio_inherit_defined=yes
13788
13789 fi
13790
13791 CFLAGS="$ax_pthread_save_CFLAGS"
13792 LIBS="$ax_pthread_save_LIBS"
13793
13794 # More AIX lossage: compile with *_r variant
13795 if test "x$GCC" != "xyes"; then
13796 case $host_os in
13797 aix*)
13798 case "x/$CC" in #(
13799 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
13800 #handle absolute path differently from PATH based program lookup
13801 case "x$CC" in #(
13802 x/*) :
13803 if as_fn_executable_p ${CC}_r; then :
13804 PTHREAD_CC="${CC}_r"
13805 fi ;; #(
13806 *) :
13807 for ac_prog in ${CC}_r
13808 do
13809 # Extract the first word of "$ac_prog", so it can be a program name with args.
13810 set dummy $ac_prog; ac_word=$2
13811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13812 $as_echo_n "checking for $ac_word... " >&6; }
13813 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
13814 $as_echo_n "(cached) " >&6
13815 else
13816 if test -n "$PTHREAD_CC"; then
13817 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13818 else
13819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13820 for as_dir in $PATH
13821 do
13822 IFS=$as_save_IFS
13823 test -z "$as_dir" && as_dir=.
13824 for ac_exec_ext in '' $ac_executable_extensions; do
13825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13826 ac_cv_prog_PTHREAD_CC="$ac_prog"
13827 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13828 break 2
13829 fi
13830 done
13831 done
13832 IFS=$as_save_IFS
13833
13834 fi
13835 fi
13836 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13837 if test -n "$PTHREAD_CC"; then
13838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
13839 $as_echo "$PTHREAD_CC" >&6; }
13840 else
13841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13842 $as_echo "no" >&6; }
13843 fi
13844
13845
13846 test -n "$PTHREAD_CC" && break
13847 done
13848 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13849 ;;
13850 esac ;; #(
13851 *) :
13852 ;;
13853 esac
13854 ;;
13855 esac
13856 fi
13857 fi
13858
13859 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13860
13861
13862
13863
13864
13865 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
13866 if test "x$ax_pthread_ok" = "xyes"; then
13867 threads=yes
13868 :
13869 else
13870 ax_pthread_ok=no
13871 threads=no
13872 fi
13873 ac_ext=cpp
13874 ac_cpp='$CXXCPP $CPPFLAGS'
13875 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13876 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13877 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13878
13879
13880 if test "$threads" = "yes"; then
13881 save_LIBS="$LIBS"
13882 LIBS="$PTHREAD_LIBS $LIBS"
13883 save_CXXFLAGS="$CXXFLAGS"
13884 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
13885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
13886 $as_echo_n "checking for std::thread... " >&6; }
13887 if ${gdb_cv_cxx_std_thread+:} false; then :
13888 $as_echo_n "(cached) " >&6
13889 else
13890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13891 /* end confdefs.h. */
13892 #include <thread>
13893 void callback() { }
13894 int
13895 main ()
13896 {
13897 std::thread t(callback);
13898 ;
13899 return 0;
13900 }
13901 _ACEOF
13902 if ac_fn_cxx_try_compile "$LINENO"; then :
13903 gdb_cv_cxx_std_thread=yes
13904 else
13905 gdb_cv_cxx_std_thread=no
13906 fi
13907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13908 fi
13909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
13910 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
13911
13912 # This check must be here, while LIBS includes any necessary
13913 # threading library.
13914 for ac_func in pthread_sigmask pthread_setname_np
13915 do :
13916 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13917 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
13918 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13919 cat >>confdefs.h <<_ACEOF
13920 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13921 _ACEOF
13922
13923 fi
13924 done
13925
13926
13927 LIBS="$save_LIBS"
13928 CXXFLAGS="$save_CXXFLAGS"
13929 fi
13930 if test "$gdb_cv_cxx_std_thread" = "yes"; then
13931
13932 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
13933
13934 fi
13935 ac_ext=c
13936 ac_cpp='$CPP $CPPFLAGS'
13937 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13938 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13939 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13940
13941
13942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13943 $as_echo_n "checking for sigsetjmp... " >&6; }
13944 if ${gdb_cv_func_sigsetjmp+:} false; then :
13945 $as_echo_n "(cached) " >&6
13946 else
13947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13948 /* end confdefs.h. */
13949
13950 #include <setjmp.h>
13951
13952 int
13953 main ()
13954 {
13955 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13956 ;
13957 return 0;
13958 }
13959 _ACEOF
13960 if ac_fn_c_try_compile "$LINENO"; then :
13961 gdb_cv_func_sigsetjmp=yes
13962 else
13963 gdb_cv_func_sigsetjmp=no
13964 fi
13965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13966 fi
13967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13968 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13969 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
13970
13971 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13972
13973 fi
13974
13975
13976 # Check whether --with-intel_pt was given.
13977 if test "${with_intel_pt+set}" = set; then :
13978 withval=$with_intel_pt;
13979 else
13980 with_intel_pt=auto
13981 fi
13982
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
13984 $as_echo_n "checking whether to use intel pt... " >&6; }
13985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
13986 $as_echo "$with_intel_pt" >&6; }
13987
13988 if test "${with_intel_pt}" = no; then
13989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
13990 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
13991 HAVE_LIBIPT=no
13992 else
13993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13994 /* end confdefs.h. */
13995
13996 #include <linux/perf_event.h>
13997 #ifndef PERF_ATTR_SIZE_VER5
13998 # error
13999 #endif
14000
14001 _ACEOF
14002 if ac_fn_c_try_cpp "$LINENO"; then :
14003 perf_event=yes
14004 else
14005 perf_event=no
14006 fi
14007 rm -f conftest.err conftest.i conftest.$ac_ext
14008 if test "$perf_event" != yes; then
14009 if test "$with_intel_pt" = yes; then
14010 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14011 else
14012 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14013 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14014 fi
14015 fi
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025 use_additional=yes
14026
14027 acl_save_prefix="$prefix"
14028 prefix="$acl_final_prefix"
14029 acl_save_exec_prefix="$exec_prefix"
14030 exec_prefix="$acl_final_exec_prefix"
14031
14032 eval additional_includedir=\"$includedir\"
14033 eval additional_libdir=\"$libdir\"
14034
14035 exec_prefix="$acl_save_exec_prefix"
14036 prefix="$acl_save_prefix"
14037
14038
14039 # Check whether --with-libipt-prefix was given.
14040 if test "${with_libipt_prefix+set}" = set; then :
14041 withval=$with_libipt_prefix;
14042 if test "X$withval" = "Xno"; then
14043 use_additional=no
14044 else
14045 if test "X$withval" = "X"; then
14046
14047 acl_save_prefix="$prefix"
14048 prefix="$acl_final_prefix"
14049 acl_save_exec_prefix="$exec_prefix"
14050 exec_prefix="$acl_final_exec_prefix"
14051
14052 eval additional_includedir=\"$includedir\"
14053 eval additional_libdir=\"$libdir\"
14054
14055 exec_prefix="$acl_save_exec_prefix"
14056 prefix="$acl_save_prefix"
14057
14058 else
14059 additional_includedir="$withval/include"
14060 additional_libdir="$withval/lib"
14061 fi
14062 fi
14063
14064 fi
14065
14066
14067 # Check whether --with-libipt-type was given.
14068 if test "${with_libipt_type+set}" = set; then :
14069 withval=$with_libipt_type; with_libipt_type=$withval
14070 else
14071 with_libipt_type=auto
14072 fi
14073
14074 lib_type=`eval echo \$with_libipt_type`
14075
14076 LIBIPT=
14077 LTLIBIPT=
14078 INCIPT=
14079 rpathdirs=
14080 ltrpathdirs=
14081 names_already_handled=
14082 names_next_round='ipt '
14083 while test -n "$names_next_round"; do
14084 names_this_round="$names_next_round"
14085 names_next_round=
14086 for name in $names_this_round; do
14087 already_handled=
14088 for n in $names_already_handled; do
14089 if test "$n" = "$name"; then
14090 already_handled=yes
14091 break
14092 fi
14093 done
14094 if test -z "$already_handled"; then
14095 names_already_handled="$names_already_handled $name"
14096 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14097 eval value=\"\$HAVE_LIB$uppername\"
14098 if test -n "$value"; then
14099 if test "$value" = yes; then
14100 eval value=\"\$LIB$uppername\"
14101 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14102 eval value=\"\$LTLIB$uppername\"
14103 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14104 else
14105 :
14106 fi
14107 else
14108 found_dir=
14109 found_la=
14110 found_so=
14111 found_a=
14112 if test $use_additional = yes; then
14113 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14114 found_dir="$additional_libdir"
14115 found_so="$additional_libdir/lib$name.$shlibext"
14116 if test -f "$additional_libdir/lib$name.la"; then
14117 found_la="$additional_libdir/lib$name.la"
14118 fi
14119 elif test x$lib_type != xshared; then
14120 if test -f "$additional_libdir/lib$name.$libext"; then
14121 found_dir="$additional_libdir"
14122 found_a="$additional_libdir/lib$name.$libext"
14123 if test -f "$additional_libdir/lib$name.la"; then
14124 found_la="$additional_libdir/lib$name.la"
14125 fi
14126 fi
14127 fi
14128 fi
14129 if test "X$found_dir" = "X"; then
14130 for x in $LDFLAGS $LTLIBIPT; do
14131
14132 acl_save_prefix="$prefix"
14133 prefix="$acl_final_prefix"
14134 acl_save_exec_prefix="$exec_prefix"
14135 exec_prefix="$acl_final_exec_prefix"
14136 eval x=\"$x\"
14137 exec_prefix="$acl_save_exec_prefix"
14138 prefix="$acl_save_prefix"
14139
14140 case "$x" in
14141 -L*)
14142 dir=`echo "X$x" | sed -e 's/^X-L//'`
14143 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14144 found_dir="$dir"
14145 found_so="$dir/lib$name.$shlibext"
14146 if test -f "$dir/lib$name.la"; then
14147 found_la="$dir/lib$name.la"
14148 fi
14149 elif test x$lib_type != xshared; then
14150 if test -f "$dir/lib$name.$libext"; then
14151 found_dir="$dir"
14152 found_a="$dir/lib$name.$libext"
14153 if test -f "$dir/lib$name.la"; then
14154 found_la="$dir/lib$name.la"
14155 fi
14156 fi
14157 fi
14158 ;;
14159 esac
14160 if test "X$found_dir" != "X"; then
14161 break
14162 fi
14163 done
14164 fi
14165 if test "X$found_dir" != "X"; then
14166 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14167 if test "X$found_so" != "X"; then
14168 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14169 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14170 else
14171 haveit=
14172 for x in $ltrpathdirs; do
14173 if test "X$x" = "X$found_dir"; then
14174 haveit=yes
14175 break
14176 fi
14177 done
14178 if test -z "$haveit"; then
14179 ltrpathdirs="$ltrpathdirs $found_dir"
14180 fi
14181 if test "$hardcode_direct" = yes; then
14182 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14183 else
14184 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14185 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14186 haveit=
14187 for x in $rpathdirs; do
14188 if test "X$x" = "X$found_dir"; then
14189 haveit=yes
14190 break
14191 fi
14192 done
14193 if test -z "$haveit"; then
14194 rpathdirs="$rpathdirs $found_dir"
14195 fi
14196 else
14197 haveit=
14198 for x in $LDFLAGS $LIBIPT; do
14199
14200 acl_save_prefix="$prefix"
14201 prefix="$acl_final_prefix"
14202 acl_save_exec_prefix="$exec_prefix"
14203 exec_prefix="$acl_final_exec_prefix"
14204 eval x=\"$x\"
14205 exec_prefix="$acl_save_exec_prefix"
14206 prefix="$acl_save_prefix"
14207
14208 if test "X$x" = "X-L$found_dir"; then
14209 haveit=yes
14210 break
14211 fi
14212 done
14213 if test -z "$haveit"; then
14214 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14215 fi
14216 if test "$hardcode_minus_L" != no; then
14217 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14218 else
14219 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14220 fi
14221 fi
14222 fi
14223 fi
14224 else
14225 if test "X$found_a" != "X"; then
14226 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14227 else
14228 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14229 fi
14230 fi
14231 additional_includedir=
14232 case "$found_dir" in
14233 */lib | */lib/)
14234 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14235 additional_includedir="$basedir/include"
14236 ;;
14237 esac
14238 if test "X$additional_includedir" != "X"; then
14239 if test "X$additional_includedir" != "X/usr/include"; then
14240 haveit=
14241 if test "X$additional_includedir" = "X/usr/local/include"; then
14242 if test -n "$GCC"; then
14243 case $host_os in
14244 linux*) haveit=yes;;
14245 esac
14246 fi
14247 fi
14248 if test -z "$haveit"; then
14249 for x in $CPPFLAGS $INCIPT; do
14250
14251 acl_save_prefix="$prefix"
14252 prefix="$acl_final_prefix"
14253 acl_save_exec_prefix="$exec_prefix"
14254 exec_prefix="$acl_final_exec_prefix"
14255 eval x=\"$x\"
14256 exec_prefix="$acl_save_exec_prefix"
14257 prefix="$acl_save_prefix"
14258
14259 if test "X$x" = "X-I$additional_includedir"; then
14260 haveit=yes
14261 break
14262 fi
14263 done
14264 if test -z "$haveit"; then
14265 if test -d "$additional_includedir"; then
14266 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14267 fi
14268 fi
14269 fi
14270 fi
14271 fi
14272 if test -n "$found_la"; then
14273 save_libdir="$libdir"
14274 case "$found_la" in
14275 */* | *\\*) . "$found_la" ;;
14276 *) . "./$found_la" ;;
14277 esac
14278 libdir="$save_libdir"
14279 for dep in $dependency_libs; do
14280 case "$dep" in
14281 -L*)
14282 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14283 if test "X$additional_libdir" != "X/usr/lib"; then
14284 haveit=
14285 if test "X$additional_libdir" = "X/usr/local/lib"; then
14286 if test -n "$GCC"; then
14287 case $host_os in
14288 linux*) haveit=yes;;
14289 esac
14290 fi
14291 fi
14292 if test -z "$haveit"; then
14293 haveit=
14294 for x in $LDFLAGS $LIBIPT; do
14295
14296 acl_save_prefix="$prefix"
14297 prefix="$acl_final_prefix"
14298 acl_save_exec_prefix="$exec_prefix"
14299 exec_prefix="$acl_final_exec_prefix"
14300 eval x=\"$x\"
14301 exec_prefix="$acl_save_exec_prefix"
14302 prefix="$acl_save_prefix"
14303
14304 if test "X$x" = "X-L$additional_libdir"; then
14305 haveit=yes
14306 break
14307 fi
14308 done
14309 if test -z "$haveit"; then
14310 if test -d "$additional_libdir"; then
14311 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14312 fi
14313 fi
14314 haveit=
14315 for x in $LDFLAGS $LTLIBIPT; do
14316
14317 acl_save_prefix="$prefix"
14318 prefix="$acl_final_prefix"
14319 acl_save_exec_prefix="$exec_prefix"
14320 exec_prefix="$acl_final_exec_prefix"
14321 eval x=\"$x\"
14322 exec_prefix="$acl_save_exec_prefix"
14323 prefix="$acl_save_prefix"
14324
14325 if test "X$x" = "X-L$additional_libdir"; then
14326 haveit=yes
14327 break
14328 fi
14329 done
14330 if test -z "$haveit"; then
14331 if test -d "$additional_libdir"; then
14332 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14333 fi
14334 fi
14335 fi
14336 fi
14337 ;;
14338 -R*)
14339 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14340 if test "$enable_rpath" != no; then
14341 haveit=
14342 for x in $rpathdirs; do
14343 if test "X$x" = "X$dir"; then
14344 haveit=yes
14345 break
14346 fi
14347 done
14348 if test -z "$haveit"; then
14349 rpathdirs="$rpathdirs $dir"
14350 fi
14351 haveit=
14352 for x in $ltrpathdirs; do
14353 if test "X$x" = "X$dir"; then
14354 haveit=yes
14355 break
14356 fi
14357 done
14358 if test -z "$haveit"; then
14359 ltrpathdirs="$ltrpathdirs $dir"
14360 fi
14361 fi
14362 ;;
14363 -l*)
14364 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14365 ;;
14366 *.la)
14367 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14368 ;;
14369 *)
14370 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14371 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14372 ;;
14373 esac
14374 done
14375 fi
14376 else
14377 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
14378 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14379 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14380 else
14381 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
14382 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
14383 fi
14384 fi
14385 fi
14386 fi
14387 done
14388 done
14389 if test "X$rpathdirs" != "X"; then
14390 if test -n "$hardcode_libdir_separator"; then
14391 alldirs=
14392 for found_dir in $rpathdirs; do
14393 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14394 done
14395 acl_save_libdir="$libdir"
14396 libdir="$alldirs"
14397 eval flag=\"$hardcode_libdir_flag_spec\"
14398 libdir="$acl_save_libdir"
14399 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14400 else
14401 for found_dir in $rpathdirs; do
14402 acl_save_libdir="$libdir"
14403 libdir="$found_dir"
14404 eval flag=\"$hardcode_libdir_flag_spec\"
14405 libdir="$acl_save_libdir"
14406 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14407 done
14408 fi
14409 fi
14410 if test "X$ltrpathdirs" != "X"; then
14411 for found_dir in $ltrpathdirs; do
14412 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14413 done
14414 fi
14415
14416
14417 ac_save_CPPFLAGS="$CPPFLAGS"
14418
14419 for element in $INCIPT; do
14420 haveit=
14421 for x in $CPPFLAGS; do
14422
14423 acl_save_prefix="$prefix"
14424 prefix="$acl_final_prefix"
14425 acl_save_exec_prefix="$exec_prefix"
14426 exec_prefix="$acl_final_exec_prefix"
14427 eval x=\"$x\"
14428 exec_prefix="$acl_save_exec_prefix"
14429 prefix="$acl_save_prefix"
14430
14431 if test "X$x" = "X$element"; then
14432 haveit=yes
14433 break
14434 fi
14435 done
14436 if test -z "$haveit"; then
14437 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14438 fi
14439 done
14440
14441
14442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14443 $as_echo_n "checking for libipt... " >&6; }
14444 if ${ac_cv_libipt+:} false; then :
14445 $as_echo_n "(cached) " >&6
14446 else
14447
14448 ac_save_LIBS="$LIBS"
14449 LIBS="$LIBS $LIBIPT"
14450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14451 /* end confdefs.h. */
14452 #include "intel-pt.h"
14453 int
14454 main ()
14455 {
14456 pt_insn_alloc_decoder (0);
14457 ;
14458 return 0;
14459 }
14460 _ACEOF
14461 if ac_fn_c_try_link "$LINENO"; then :
14462 ac_cv_libipt=yes
14463 else
14464 ac_cv_libipt=no
14465 fi
14466 rm -f core conftest.err conftest.$ac_objext \
14467 conftest$ac_exeext conftest.$ac_ext
14468 LIBS="$ac_save_LIBS"
14469
14470 fi
14471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14472 $as_echo "$ac_cv_libipt" >&6; }
14473 if test "$ac_cv_libipt" = yes; then
14474 HAVE_LIBIPT=yes
14475
14476 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14477
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14479 $as_echo_n "checking how to link with libipt... " >&6; }
14480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14481 $as_echo "$LIBIPT" >&6; }
14482 else
14483 HAVE_LIBIPT=no
14484 CPPFLAGS="$ac_save_CPPFLAGS"
14485 LIBIPT=
14486 LTLIBIPT=
14487 fi
14488
14489
14490
14491
14492
14493
14494 if test "$HAVE_LIBIPT" != yes; then
14495 if test "$with_intel_pt" = yes; then
14496 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14497 else
14498 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14499 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14500 fi
14501 else
14502 save_LIBS=$LIBS
14503 LIBS="$LIBS $LIBIPT"
14504 for ac_func in pt_insn_event
14505 do :
14506 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14507 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
14508 cat >>confdefs.h <<_ACEOF
14509 #define HAVE_PT_INSN_EVENT 1
14510 _ACEOF
14511
14512 fi
14513 done
14514
14515 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14516 "
14517 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
14518
14519 cat >>confdefs.h <<_ACEOF
14520 #define HAVE_STRUCT_PT_INSN_ENABLED 1
14521 _ACEOF
14522
14523
14524 fi
14525 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14526 "
14527 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14528
14529 cat >>confdefs.h <<_ACEOF
14530 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
14531 _ACEOF
14532
14533
14534 fi
14535
14536 LIBS=$save_LIBS
14537 fi
14538 fi
14539
14540 if test "$ac_cv_header_sys_procfs_h" = yes; then
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14542 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14543 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14544 $as_echo_n "(cached) " >&6
14545 else
14546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14547 /* end confdefs.h. */
14548
14549 #define _SYSCALL32
14550 /* Needed for new procfs interface on sparc-solaris. */
14551 #define _STRUCTURED_PROC 1
14552 #include <sys/procfs.h>
14553 int
14554 main ()
14555 {
14556 gregset_t avar
14557 ;
14558 return 0;
14559 }
14560 _ACEOF
14561 if ac_fn_c_try_compile "$LINENO"; then :
14562 bfd_cv_have_sys_procfs_type_gregset_t=yes
14563 else
14564 bfd_cv_have_sys_procfs_type_gregset_t=no
14565
14566 fi
14567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14568 fi
14569
14570 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14571
14572 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14573
14574 fi
14575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14576 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14577
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14579 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14580 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14581 $as_echo_n "(cached) " >&6
14582 else
14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14584 /* end confdefs.h. */
14585
14586 #define _SYSCALL32
14587 /* Needed for new procfs interface on sparc-solaris. */
14588 #define _STRUCTURED_PROC 1
14589 #include <sys/procfs.h>
14590 int
14591 main ()
14592 {
14593 fpregset_t avar
14594 ;
14595 return 0;
14596 }
14597 _ACEOF
14598 if ac_fn_c_try_compile "$LINENO"; then :
14599 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14600 else
14601 bfd_cv_have_sys_procfs_type_fpregset_t=no
14602
14603 fi
14604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14605 fi
14606
14607 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14608
14609 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14610
14611 fi
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14613 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14614
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14616 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14617 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14618 $as_echo_n "(cached) " >&6
14619 else
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621 /* end confdefs.h. */
14622
14623 #define _SYSCALL32
14624 /* Needed for new procfs interface on sparc-solaris. */
14625 #define _STRUCTURED_PROC 1
14626 #include <sys/procfs.h>
14627 int
14628 main ()
14629 {
14630 prgregset_t avar
14631 ;
14632 return 0;
14633 }
14634 _ACEOF
14635 if ac_fn_c_try_compile "$LINENO"; then :
14636 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14637 else
14638 bfd_cv_have_sys_procfs_type_prgregset_t=no
14639
14640 fi
14641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14642 fi
14643
14644 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14645
14646 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14647
14648 fi
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14650 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14651
14652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14653 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14654 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14655 $as_echo_n "(cached) " >&6
14656 else
14657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14658 /* end confdefs.h. */
14659
14660 #define _SYSCALL32
14661 /* Needed for new procfs interface on sparc-solaris. */
14662 #define _STRUCTURED_PROC 1
14663 #include <sys/procfs.h>
14664 int
14665 main ()
14666 {
14667 prfpregset_t avar
14668 ;
14669 return 0;
14670 }
14671 _ACEOF
14672 if ac_fn_c_try_compile "$LINENO"; then :
14673 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14674 else
14675 bfd_cv_have_sys_procfs_type_prfpregset_t=no
14676
14677 fi
14678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14679 fi
14680
14681 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14682
14683 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14684
14685 fi
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14687 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14688
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14690 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14691 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14692 $as_echo_n "(cached) " >&6
14693 else
14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14695 /* end confdefs.h. */
14696
14697 #define _SYSCALL32
14698 /* Needed for new procfs interface on sparc-solaris. */
14699 #define _STRUCTURED_PROC 1
14700 #include <sys/procfs.h>
14701 int
14702 main ()
14703 {
14704 prgregset32_t avar
14705 ;
14706 return 0;
14707 }
14708 _ACEOF
14709 if ac_fn_c_try_compile "$LINENO"; then :
14710 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14711 else
14712 bfd_cv_have_sys_procfs_type_prgregset32_t=no
14713
14714 fi
14715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14716 fi
14717
14718 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14719
14720 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14721
14722 fi
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14724 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14725
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14727 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14728 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14729 $as_echo_n "(cached) " >&6
14730 else
14731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14732 /* end confdefs.h. */
14733
14734 #define _SYSCALL32
14735 /* Needed for new procfs interface on sparc-solaris. */
14736 #define _STRUCTURED_PROC 1
14737 #include <sys/procfs.h>
14738 int
14739 main ()
14740 {
14741 lwpid_t avar
14742 ;
14743 return 0;
14744 }
14745 _ACEOF
14746 if ac_fn_c_try_compile "$LINENO"; then :
14747 bfd_cv_have_sys_procfs_type_lwpid_t=yes
14748 else
14749 bfd_cv_have_sys_procfs_type_lwpid_t=no
14750
14751 fi
14752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14753 fi
14754
14755 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14756
14757 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14758
14759 fi
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14761 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14762
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14764 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14765 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14766 $as_echo_n "(cached) " >&6
14767 else
14768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14769 /* end confdefs.h. */
14770
14771 #define _SYSCALL32
14772 /* Needed for new procfs interface on sparc-solaris. */
14773 #define _STRUCTURED_PROC 1
14774 #include <sys/procfs.h>
14775 int
14776 main ()
14777 {
14778 psaddr_t avar
14779 ;
14780 return 0;
14781 }
14782 _ACEOF
14783 if ac_fn_c_try_compile "$LINENO"; then :
14784 bfd_cv_have_sys_procfs_type_psaddr_t=yes
14785 else
14786 bfd_cv_have_sys_procfs_type_psaddr_t=no
14787
14788 fi
14789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14790 fi
14791
14792 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14793
14794 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14795
14796 fi
14797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14798 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14799
14800 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14801 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14802 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14803 $as_echo_n "(cached) " >&6
14804 else
14805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14806 /* end confdefs.h. */
14807
14808 #define _SYSCALL32
14809 /* Needed for new procfs interface on sparc-solaris. */
14810 #define _STRUCTURED_PROC 1
14811 #include <sys/procfs.h>
14812 int
14813 main ()
14814 {
14815 elf_fpregset_t avar
14816 ;
14817 return 0;
14818 }
14819 _ACEOF
14820 if ac_fn_c_try_compile "$LINENO"; then :
14821 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14822 else
14823 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14824
14825 fi
14826 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14827 fi
14828
14829 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14830
14831 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14832
14833 fi
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14835 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14836
14837 fi
14838
14839
14840 # Check the return and argument types of ptrace.
14841
14842
14843 for ac_header in sys/ptrace.h ptrace.h
14844 do :
14845 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14846 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14847 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14848 cat >>confdefs.h <<_ACEOF
14849 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14850 _ACEOF
14851
14852 fi
14853
14854 done
14855
14856
14857 gdb_ptrace_headers='
14858 #include <sys/types.h>
14859 #if HAVE_SYS_PTRACE_H
14860 # include <sys/ptrace.h>
14861 #endif
14862 #if HAVE_UNISTD_H
14863 # include <unistd.h>
14864 #endif
14865 '
14866 # There is no point in checking if we don't have a prototype.
14867 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
14868 "
14869 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
14870 ac_have_decl=1
14871 else
14872 ac_have_decl=0
14873 fi
14874
14875 cat >>confdefs.h <<_ACEOF
14876 #define HAVE_DECL_PTRACE $ac_have_decl
14877 _ACEOF
14878 if test $ac_have_decl = 1; then :
14879
14880 else
14881
14882 : ${gdb_cv_func_ptrace_ret='int'}
14883 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14884
14885 fi
14886
14887 # Check return type. Varargs (used on GNU/Linux) conflict with the
14888 # empty argument list, so check for that explicitly.
14889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14890 $as_echo_n "checking return type of ptrace... " >&6; }
14891 if ${gdb_cv_func_ptrace_ret+:} false; then :
14892 $as_echo_n "(cached) " >&6
14893 else
14894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14895 /* end confdefs.h. */
14896 $gdb_ptrace_headers
14897 int
14898 main ()
14899 {
14900 extern long ptrace (enum __ptrace_request, ...);
14901 ;
14902 return 0;
14903 }
14904 _ACEOF
14905 if ac_fn_c_try_compile "$LINENO"; then :
14906 gdb_cv_func_ptrace_ret='long'
14907 else
14908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14909 /* end confdefs.h. */
14910 $gdb_ptrace_headers
14911 int
14912 main ()
14913 {
14914 extern int ptrace ();
14915 ;
14916 return 0;
14917 }
14918 _ACEOF
14919 if ac_fn_c_try_compile "$LINENO"; then :
14920 gdb_cv_func_ptrace_ret='int'
14921 else
14922 gdb_cv_func_ptrace_ret='long'
14923 fi
14924 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14925 fi
14926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14927 fi
14928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14929 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
14930
14931 cat >>confdefs.h <<_ACEOF
14932 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
14933 _ACEOF
14934
14935 # Check argument types.
14936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14937 $as_echo_n "checking types of arguments for ptrace... " >&6; }
14938 if ${gdb_cv_func_ptrace_args+:} false; then :
14939 $as_echo_n "(cached) " >&6
14940 else
14941
14942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14943 /* end confdefs.h. */
14944 $gdb_ptrace_headers
14945 int
14946 main ()
14947 {
14948 extern long ptrace (enum __ptrace_request, ...);
14949 ;
14950 return 0;
14951 }
14952 _ACEOF
14953 if ac_fn_c_try_compile "$LINENO"; then :
14954 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
14955 else
14956
14957 for gdb_arg1 in 'int' 'long'; do
14958 for gdb_arg2 in 'pid_t' 'int' 'long'; do
14959 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
14960 for gdb_arg4 in 'int' 'long' 'void *'; do
14961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14962 /* end confdefs.h. */
14963 $gdb_ptrace_headers
14964 int
14965 main ()
14966 {
14967
14968 extern $gdb_cv_func_ptrace_ret
14969 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
14970
14971 ;
14972 return 0;
14973 }
14974 _ACEOF
14975 if ac_fn_c_try_compile "$LINENO"; then :
14976 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
14977 break 4;
14978 fi
14979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14980 for gdb_arg5 in 'int *' 'int' 'long'; do
14981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14982 /* end confdefs.h. */
14983 $gdb_ptrace_headers
14984 int
14985 main ()
14986 {
14987
14988 extern $gdb_cv_func_ptrace_ret
14989 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
14990
14991 ;
14992 return 0;
14993 }
14994 _ACEOF
14995 if ac_fn_c_try_compile "$LINENO"; then :
14996
14997 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
14998 break 5;
14999 fi
15000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15001 done
15002 done
15003 done
15004 done
15005 done
15006 # Provide a safe default value.
15007 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15008
15009 fi
15010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15011 fi
15012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15013 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15014 ac_save_IFS=$IFS; IFS=','
15015 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15016 IFS=$ac_save_IFS
15017 shift
15018
15019 cat >>confdefs.h <<_ACEOF
15020 #define PTRACE_TYPE_ARG1 $1
15021 _ACEOF
15022
15023
15024 cat >>confdefs.h <<_ACEOF
15025 #define PTRACE_TYPE_ARG3 $3
15026 _ACEOF
15027
15028
15029 cat >>confdefs.h <<_ACEOF
15030 #define PTRACE_TYPE_ARG4 $4
15031 _ACEOF
15032
15033 if test -n "$5"; then
15034
15035 cat >>confdefs.h <<_ACEOF
15036 #define PTRACE_TYPE_ARG5 $5
15037 _ACEOF
15038
15039 fi
15040
15041
15042 if test "$cross_compiling" = no; then
15043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15044 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15045 if ${ac_cv_func_setpgrp_void+:} false; then :
15046 $as_echo_n "(cached) " >&6
15047 else
15048 if test "$cross_compiling" = yes; then :
15049 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15050 else
15051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15052 /* end confdefs.h. */
15053 $ac_includes_default
15054 int
15055 main ()
15056 {
15057 /* If this system has a BSD-style setpgrp which takes arguments,
15058 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15059 exit successfully. */
15060 return setpgrp (1,1) != -1;
15061 ;
15062 return 0;
15063 }
15064 _ACEOF
15065 if ac_fn_c_try_run "$LINENO"; then :
15066 ac_cv_func_setpgrp_void=no
15067 else
15068 ac_cv_func_setpgrp_void=yes
15069 fi
15070 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15071 conftest.$ac_objext conftest.beam conftest.$ac_ext
15072 fi
15073
15074 fi
15075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15076 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15077 if test $ac_cv_func_setpgrp_void = yes; then
15078
15079 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15080
15081 fi
15082
15083 else
15084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15085 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15086 if ${ac_cv_func_setpgrp_void+:} false; then :
15087 $as_echo_n "(cached) " >&6
15088 else
15089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15090 /* end confdefs.h. */
15091
15092 #include <unistd.h>
15093
15094 int
15095 main ()
15096 {
15097
15098 if (setpgrp(1,1) == -1)
15099 exit (0);
15100 else
15101 exit (1);
15102
15103 ;
15104 return 0;
15105 }
15106 _ACEOF
15107 if ac_fn_c_try_compile "$LINENO"; then :
15108 ac_cv_func_setpgrp_void=no
15109 else
15110 ac_cv_func_setpgrp_void=yes
15111 fi
15112 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15113 fi
15114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15115 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15116 if test "$ac_cv_func_setpgrp_void" = yes; then
15117 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15118
15119 fi
15120 fi
15121
15122 # Assume we'll default to using the included libiberty regex.
15123 gdb_use_included_regex=yes
15124
15125 # However, if the system regex is GNU regex, then default to *not*
15126 # using the included regex.
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15128 $as_echo_n "checking for GNU regex... " >&6; }
15129 if ${gdb_cv_have_gnu_regex+:} false; then :
15130 $as_echo_n "(cached) " >&6
15131 else
15132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133 /* end confdefs.h. */
15134 #include <gnu-versions.h>
15135 int
15136 main ()
15137 {
15138 #define REGEX_INTERFACE_VERSION 1
15139 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15140 # error "Version mismatch"
15141 #endif
15142 ;
15143 return 0;
15144 }
15145 _ACEOF
15146 if ac_fn_c_try_compile "$LINENO"; then :
15147 gdb_cv_have_gnu_regex=yes
15148 else
15149 gdb_cv_have_gnu_regex=no
15150 fi
15151 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15152 fi
15153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15154 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
15155 if test "$gdb_cv_have_gnu_regex" = yes; then
15156 gdb_use_included_regex=no
15157 fi
15158
15159
15160 # Check whether --with-included-regex was given.
15161 if test "${with_included_regex+set}" = set; then :
15162 withval=$with_included_regex; gdb_with_regex=$withval
15163 else
15164 gdb_with_regex=$gdb_use_included_regex
15165 fi
15166
15167 if test "$gdb_with_regex" = yes; then
15168
15169 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
15170
15171 fi
15172
15173 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15174 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15175 #include <sys/proc.h>
15176
15177 "
15178 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15179
15180 cat >>confdefs.h <<_ACEOF
15181 #define HAVE_STRUCT_THREAD_TD_PCB 1
15182 _ACEOF
15183
15184
15185 fi
15186
15187
15188 # See if <sys/lwp.h> defines `struct lwp`.
15189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15190 $as_echo_n "checking for struct lwp... " >&6; }
15191 if ${gdb_cv_struct_lwp+:} false; then :
15192 $as_echo_n "(cached) " >&6
15193 else
15194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15195 /* end confdefs.h. */
15196 #include <sys/param.h>
15197 #define _KMEMUSER
15198 #include <sys/lwp.h>
15199 int
15200 main ()
15201 {
15202 struct lwp l;
15203 ;
15204 return 0;
15205 }
15206 _ACEOF
15207 if ac_fn_c_try_compile "$LINENO"; then :
15208 gdb_cv_struct_lwp=yes
15209 else
15210 gdb_cv_struct_lwp=no
15211 fi
15212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15213 fi
15214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15215 $as_echo "$gdb_cv_struct_lwp" >&6; }
15216 if test "$gdb_cv_struct_lwp" = yes; then
15217
15218 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15219
15220 fi
15221
15222 # See if <machine/reg.h> degines `struct reg'.
15223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15224 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15225 if ${gdb_cv_struct_reg+:} false; then :
15226 $as_echo_n "(cached) " >&6
15227 else
15228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15229 /* end confdefs.h. */
15230 #include <sys/types.h>
15231 #include <machine/reg.h>
15232 int
15233 main ()
15234 {
15235 struct reg r;
15236 ;
15237 return 0;
15238 }
15239 _ACEOF
15240 if ac_fn_c_try_compile "$LINENO"; then :
15241 gdb_cv_struct_reg=yes
15242 else
15243 gdb_cv_struct_reg=no
15244 fi
15245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15246 fi
15247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15248 $as_echo "$gdb_cv_struct_reg" >&6; }
15249 if test "$gdb_cv_struct_reg" = yes; then
15250
15251 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15252
15253 fi
15254
15255 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15256 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15257 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15258 #include <machine/reg.h>
15259 "
15260 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15261
15262 cat >>confdefs.h <<_ACEOF
15263 #define HAVE_STRUCT_REG_R_FS 1
15264 _ACEOF
15265
15266
15267 fi
15268 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15269 #include <machine/reg.h>
15270 "
15271 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15272
15273 cat >>confdefs.h <<_ACEOF
15274 #define HAVE_STRUCT_REG_R_GS 1
15275 _ACEOF
15276
15277
15278 fi
15279
15280
15281 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
15282 # Older amd64 Linux's don't have the fs_base and gs_base members of
15283 # `struct user_regs_struct'.
15284 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h>
15285 #include <sys/user.h>
15286 "
15287 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
15288
15289 cat >>confdefs.h <<_ACEOF
15290 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
15291 _ACEOF
15292
15293
15294 fi
15295 ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h>
15296 #include <sys/user.h>
15297 "
15298 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
15299
15300 cat >>confdefs.h <<_ACEOF
15301 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
15302 _ACEOF
15303
15304
15305 fi
15306
15307
15308 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15310 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15311 if ${gdb_cv_have_ptrace_getregs+:} false; then :
15312 $as_echo_n "(cached) " >&6
15313 else
15314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15315 /* end confdefs.h. */
15316 #include <sys/ptrace.h>
15317 int
15318 main ()
15319 {
15320 PTRACE_GETREGS;
15321 ;
15322 return 0;
15323 }
15324 _ACEOF
15325 if ac_fn_c_try_compile "$LINENO"; then :
15326 gdb_cv_have_ptrace_getregs=yes
15327 else
15328 gdb_cv_have_ptrace_getregs=no
15329 fi
15330 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15331 fi
15332
15333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15334 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15335 if test "$gdb_cv_have_ptrace_getregs" = yes; then
15336
15337 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15338
15339 fi
15340
15341 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15343 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15344 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15345 $as_echo_n "(cached) " >&6
15346 else
15347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15348 /* end confdefs.h. */
15349 #include <sys/ptrace.h>
15350 int
15351 main ()
15352 {
15353 PTRACE_GETFPXREGS;
15354 ;
15355 return 0;
15356 }
15357 _ACEOF
15358 if ac_fn_c_try_compile "$LINENO"; then :
15359 gdb_cv_have_ptrace_getfpxregs=yes
15360 else
15361 gdb_cv_have_ptrace_getfpxregs=no
15362 fi
15363 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15364 fi
15365
15366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15367 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15368 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
15369
15370 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
15371
15372 fi
15373
15374 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15376 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
15377 if ${gdb_cv_have_pt_getdbregs+:} false; then :
15378 $as_echo_n "(cached) " >&6
15379 else
15380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15381 /* end confdefs.h. */
15382 #include <sys/types.h>
15383 #include <sys/ptrace.h>
15384 int
15385 main ()
15386 {
15387 PT_GETDBREGS;
15388 ;
15389 return 0;
15390 }
15391 _ACEOF
15392 if ac_fn_c_try_compile "$LINENO"; then :
15393 gdb_cv_have_pt_getdbregs=yes
15394 else
15395 gdb_cv_have_pt_getdbregs=no
15396 fi
15397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15398 fi
15399
15400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15401 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15402 if test "$gdb_cv_have_pt_getdbregs" = yes; then
15403
15404 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
15405
15406 fi
15407
15408 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15410 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15411 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
15412 $as_echo_n "(cached) " >&6
15413 else
15414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15415 /* end confdefs.h. */
15416 #include <sys/types.h>
15417 #include <sys/ptrace.h>
15418 int
15419 main ()
15420 {
15421 PT_GETXMMREGS;
15422 ;
15423 return 0;
15424 }
15425 _ACEOF
15426 if ac_fn_c_try_compile "$LINENO"; then :
15427 gdb_cv_have_pt_getxmmregs=yes
15428 else
15429 gdb_cv_have_pt_getxmmregs=no
15430 fi
15431 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15432 fi
15433
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15435 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15436 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
15437
15438 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
15439
15440 fi
15441
15442 # See if <sys/ptrace.h> supports LWP names on FreeBSD
15443 # Older FreeBSD versions don't have the pl_tdname member of
15444 # `struct ptrace_lwpinfo'.
15445 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15446 "
15447 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
15448
15449 cat >>confdefs.h <<_ACEOF
15450 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15451 _ACEOF
15452
15453
15454 fi
15455
15456
15457 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15458 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15459 # FreeBSD 10.3.
15460 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>
15461 "
15462 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15463
15464 cat >>confdefs.h <<_ACEOF
15465 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15466 _ACEOF
15467
15468
15469 fi
15470
15471
15472 # Check if the compiler supports the `long long' type.
15473
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15475 $as_echo_n "checking for long long support in compiler... " >&6; }
15476 if ${gdb_cv_c_long_long+:} false; then :
15477 $as_echo_n "(cached) " >&6
15478 else
15479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15480 /* end confdefs.h. */
15481 extern long long foo;
15482 int
15483 main ()
15484 {
15485 switch (foo & 2) { case 0: return 1; }
15486 ;
15487 return 0;
15488 }
15489 _ACEOF
15490 if ac_fn_c_try_compile "$LINENO"; then :
15491 gdb_cv_c_long_long=yes
15492 else
15493 gdb_cv_c_long_long=no
15494 fi
15495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15496 fi
15497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15498 $as_echo "$gdb_cv_c_long_long" >&6; }
15499 if test "$gdb_cv_c_long_long" != yes; then
15500 # libdecnumber requires long long.
15501 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
15502 fi
15503
15504 # Check if the compiler and runtime support printing long longs.
15505
15506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15507 $as_echo_n "checking for long long support in printf... " >&6; }
15508 if ${gdb_cv_printf_has_long_long+:} false; then :
15509 $as_echo_n "(cached) " >&6
15510 else
15511 if test "$cross_compiling" = yes; then :
15512 gdb_cv_printf_has_long_long=no
15513 else
15514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15515 /* end confdefs.h. */
15516 $ac_includes_default
15517 int
15518 main ()
15519 {
15520 char buf[32];
15521 long long l = 0;
15522 l = (l << 16) + 0x0123;
15523 l = (l << 16) + 0x4567;
15524 l = (l << 16) + 0x89ab;
15525 l = (l << 16) + 0xcdef;
15526 sprintf (buf, "0x%016llx", l);
15527 return (strcmp ("0x0123456789abcdef", buf));
15528 ;
15529 return 0;
15530 }
15531 _ACEOF
15532 if ac_fn_c_try_run "$LINENO"; then :
15533 gdb_cv_printf_has_long_long=yes
15534 else
15535 gdb_cv_printf_has_long_long=no
15536 fi
15537 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15538 conftest.$ac_objext conftest.beam conftest.$ac_ext
15539 fi
15540
15541 fi
15542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15543 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15544 if test "$gdb_cv_printf_has_long_long" = yes; then
15545
15546 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15547
15548 fi
15549
15550 # Check if the compiler and runtime support printing decfloats.
15551
15552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15553 $as_echo_n "checking for decfloat support in printf... " >&6; }
15554 if ${gdb_cv_printf_has_decfloat+:} false; then :
15555 $as_echo_n "(cached) " >&6
15556 else
15557 if test "$cross_compiling" = yes; then :
15558 gdb_cv_printf_has_decfloat=no
15559 else
15560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15561 /* end confdefs.h. */
15562 $ac_includes_default
15563 int
15564 main ()
15565 {
15566 char buf[64];
15567 _Decimal32 d32 = 1.2345df;
15568 _Decimal64 d64 = 1.2345dd;
15569 _Decimal128 d128 = 1.2345dl;
15570 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15571 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15572 ;
15573 return 0;
15574 }
15575 _ACEOF
15576 if ac_fn_c_try_run "$LINENO"; then :
15577 gdb_cv_printf_has_decfloat=yes
15578 else
15579 gdb_cv_printf_has_decfloat=no
15580 fi
15581 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15582 conftest.$ac_objext conftest.beam conftest.$ac_ext
15583 fi
15584
15585 fi
15586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15587 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
15588 if test "$gdb_cv_printf_has_decfloat" = yes; then
15589
15590 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
15591
15592 fi
15593
15594 # Check if the compiler supports the `long double' type. We can't use
15595 # AC_C_LONG_DOUBLE because that one does additional checks on the
15596 # constants defined in <float.h> that fail on some systems,
15597 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
15598
15599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15600 $as_echo_n "checking for long double support in compiler... " >&6; }
15601 if ${gdb_cv_c_long_double+:} false; then :
15602 $as_echo_n "(cached) " >&6
15603 else
15604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15605 /* end confdefs.h. */
15606 long double foo;
15607 _ACEOF
15608 if ac_fn_c_try_compile "$LINENO"; then :
15609 gdb_cv_c_long_double=yes
15610 else
15611 gdb_cv_c_long_double=no
15612 fi
15613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15614 fi
15615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15616 $as_echo "$gdb_cv_c_long_double" >&6; }
15617 if test "$gdb_cv_c_long_double" = yes; then
15618
15619 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
15620
15621 fi
15622
15623 # Check if the compiler and runtime support printing long doubles.
15624
15625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15626 $as_echo_n "checking for long double support in printf... " >&6; }
15627 if ${gdb_cv_printf_has_long_double+:} false; then :
15628 $as_echo_n "(cached) " >&6
15629 else
15630 if test "$cross_compiling" = yes; then :
15631 gdb_cv_printf_has_long_double=no
15632 else
15633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15634 /* end confdefs.h. */
15635 $ac_includes_default
15636 int
15637 main ()
15638 {
15639 char buf[16];
15640 long double f = 3.141592653;
15641 sprintf (buf, "%Lg", f);
15642 return (strncmp ("3.14159", buf, 7));
15643 ;
15644 return 0;
15645 }
15646 _ACEOF
15647 if ac_fn_c_try_run "$LINENO"; then :
15648 gdb_cv_printf_has_long_double=yes
15649 else
15650 gdb_cv_printf_has_long_double=no
15651 fi
15652 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15653 conftest.$ac_objext conftest.beam conftest.$ac_ext
15654 fi
15655
15656 fi
15657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15658 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
15659 if test "$gdb_cv_printf_has_long_double" = yes; then
15660
15661 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
15662
15663 fi
15664
15665 # Check if the compiler and runtime support scanning long doubles.
15666
15667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15668 $as_echo_n "checking for long double support in scanf... " >&6; }
15669 if ${gdb_cv_scanf_has_long_double+:} false; then :
15670 $as_echo_n "(cached) " >&6
15671 else
15672 if test "$cross_compiling" = yes; then :
15673 gdb_cv_scanf_has_long_double=no
15674 else
15675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15676 /* end confdefs.h. */
15677 #include <stdio.h>
15678 int
15679 main ()
15680 {
15681 char *buf = "3.141592653";
15682 long double f = 0;
15683 sscanf (buf, "%Lg", &f);
15684 return !(f > 3.14159 && f < 3.14160);
15685 ;
15686 return 0;
15687 }
15688 _ACEOF
15689 if ac_fn_c_try_run "$LINENO"; then :
15690 gdb_cv_scanf_has_long_double=yes
15691 else
15692 gdb_cv_scanf_has_long_double=no
15693 fi
15694 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15695 conftest.$ac_objext conftest.beam conftest.$ac_ext
15696 fi
15697
15698 fi
15699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15700 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
15701 if test "$gdb_cv_scanf_has_long_double" = yes; then
15702
15703 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
15704
15705 fi
15706
15707 case ${host_os} in
15708 aix*)
15709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15710 $as_echo_n "checking for -bbigtoc option... " >&6; }
15711 if ${gdb_cv_bigtoc+:} false; then :
15712 $as_echo_n "(cached) " >&6
15713 else
15714
15715 SAVE_LDFLAGS=$LDFLAGS
15716
15717 case $GCC in
15718 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15719 *) gdb_cv_bigtoc=-bbigtoc ;;
15720 esac
15721
15722 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15724 /* end confdefs.h. */
15725
15726 int
15727 main ()
15728 {
15729 int i;
15730 ;
15731 return 0;
15732 }
15733 _ACEOF
15734 if ac_fn_c_try_link "$LINENO"; then :
15735
15736 else
15737 gdb_cv_bigtoc=
15738 fi
15739 rm -f core conftest.err conftest.$ac_objext \
15740 conftest$ac_exeext conftest.$ac_ext
15741 LDFLAGS="${SAVE_LDFLAGS}"
15742
15743 fi
15744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15745 $as_echo "$gdb_cv_bigtoc" >&6; }
15746 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15747 ;;
15748 esac
15749
15750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15751 $as_echo_n "checking for the dynamic export flag... " >&6; }
15752 dynamic_list=false
15753 if test "${gdb_native}" = yes; then
15754 # The dynamically loaded libthread_db needs access to symbols in the gdb
15755 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15756 # may not be supported there.
15757 old_LDFLAGS="$LDFLAGS"
15758 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15759 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15760 LDFLAGS="$LDFLAGS $RDYNAMIC"
15761 if test "${have_libpython}" = no; then
15762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15763 /* end confdefs.h. */
15764
15765 int
15766 main ()
15767 {
15768
15769 ;
15770 return 0;
15771 }
15772 _ACEOF
15773 if ac_fn_c_try_link "$LINENO"; then :
15774 dynamic_list=true
15775 fi
15776 rm -f core conftest.err conftest.$ac_objext \
15777 conftest$ac_exeext conftest.$ac_ext
15778 else
15779 # Workaround http://bugs.python.org/issue4434 where static
15780 # libpythonX.Y.a would get its symbols required for
15781 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15782 # Problem does not happen for the recommended libpythonX.Y.so linkage.
15783
15784 # Note the workaround for Python
15785 # http://bugs.python.org/issue10112 earlier has removed
15786 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15787 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15788 # always pass.
15789 old_CFLAGS="$CFLAGS"
15790 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15791 old_LIBS="$LIBS"
15792 LIBS="$LIBS $PYTHON_LIBS"
15793 old_CPPFLAGS="$CPPFLAGS"
15794 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15795 if test "$cross_compiling" = yes; then :
15796 true
15797 else
15798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15799 /* end confdefs.h. */
15800 #include "Python.h"
15801 int
15802 main ()
15803 {
15804 int err;
15805 Py_Initialize ();
15806 err = PyRun_SimpleString ("import itertools\n");
15807 Py_Finalize ();
15808 return err == 0 ? 0 : 1;
15809 ;
15810 return 0;
15811 }
15812 _ACEOF
15813 if ac_fn_c_try_run "$LINENO"; then :
15814 dynamic_list=true
15815 fi
15816 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15817 conftest.$ac_objext conftest.beam conftest.$ac_ext
15818 fi
15819
15820 LIBS="$old_LIBS"
15821 CFLAGS="$old_CFLAGS"
15822 CPPFLAGS="$old_CPPFLAGS"
15823 fi
15824 LDFLAGS="$old_LDFLAGS"
15825 fi
15826 if $dynamic_list; then
15827 found="-Wl,--dynamic-list"
15828 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15829 else
15830 found="-rdynamic"
15831 RDYNAMIC="-rdynamic"
15832 fi
15833
15834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15835 $as_echo "$found" >&6; }
15836
15837
15838 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
15839 case ${host_os} in
15840 aix*)
15841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15842 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15843 if ${gdb_cv_have_aix_thread_debug+:} false; then :
15844 $as_echo_n "(cached) " >&6
15845 else
15846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15847 /* end confdefs.h. */
15848 #include <sys/pthdebug.h>
15849 int
15850 main ()
15851 {
15852 #ifndef PTHDB_VERSION_3
15853 #error
15854 #endif
15855 ;
15856 return 0;
15857 }
15858 _ACEOF
15859 if ac_fn_c_try_compile "$LINENO"; then :
15860 gdb_cv_have_aix_thread_debug=yes
15861 else
15862 gdb_cv_have_aix_thread_debug=no
15863 fi
15864 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15865 fi
15866
15867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15868 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15869 if test "$gdb_cv_have_aix_thread_debug" = yes; then
15870 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15871 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15872 LIBS="$LIBS -lpthdebug"
15873
15874 # Older versions of AIX do not provide the declaration for
15875 # the getthrds function (it appears that it was introduced
15876 # with AIX 6.x).
15877 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15878 "
15879 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15880 ac_have_decl=1
15881 else
15882 ac_have_decl=0
15883 fi
15884
15885 cat >>confdefs.h <<_ACEOF
15886 #define HAVE_DECL_GETTHRDS $ac_have_decl
15887 _ACEOF
15888
15889 fi
15890 ;;
15891 esac
15892
15893 fi
15894
15895 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15897 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15898 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15899 $as_echo_n "(cached) " >&6
15900 else
15901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15902 /* end confdefs.h. */
15903 #include <thread_db.h>
15904 int
15905 main ()
15906 {
15907 int i = TD_NOTALLOC;
15908 ;
15909 return 0;
15910 }
15911 _ACEOF
15912 if ac_fn_c_try_compile "$LINENO"; then :
15913 gdb_cv_thread_db_h_has_td_notalloc=yes
15914 else
15915 gdb_cv_thread_db_h_has_td_notalloc=no
15916
15917 fi
15918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15919
15920 fi
15921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15922 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15924 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15925 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
15926 $as_echo_n "(cached) " >&6
15927 else
15928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15929 /* end confdefs.h. */
15930 #include <thread_db.h>
15931 int
15932 main ()
15933 {
15934 int i = TD_VERSION;
15935 ;
15936 return 0;
15937 }
15938 _ACEOF
15939 if ac_fn_c_try_compile "$LINENO"; then :
15940 gdb_cv_thread_db_h_has_td_version=yes
15941 else
15942 gdb_cv_thread_db_h_has_td_version=no
15943
15944 fi
15945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15946
15947 fi
15948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15949 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15951 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15952 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
15953 $as_echo_n "(cached) " >&6
15954 else
15955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15956 /* end confdefs.h. */
15957 #include <thread_db.h>
15958 int
15959 main ()
15960 {
15961 int i = TD_NOTLS;
15962 ;
15963 return 0;
15964 }
15965 _ACEOF
15966 if ac_fn_c_try_compile "$LINENO"; then :
15967 gdb_cv_thread_db_h_has_td_notls=yes
15968 else
15969 gdb_cv_thread_db_h_has_td_notls=no
15970
15971 fi
15972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15973
15974 fi
15975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15976 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
15977 fi
15978 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
15979
15980 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
15981
15982 fi
15983 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15984
15985 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
15986
15987 fi
15988 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15989
15990 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
15991
15992 fi
15993
15994 case $host_os in
15995 go32* | *djgpp*)
15996 gdbinit=gdb.ini
15997 ;;
15998 *)
15999 gdbinit=.gdbinit
16000 ;;
16001 esac
16002
16003 cat >>confdefs.h <<_ACEOF
16004 #define GDBINIT "$gdbinit"
16005 _ACEOF
16006
16007
16008
16009 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16010 # except that the argument to --with-sysroot is optional.
16011 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16012 if test "x$with_sysroot" = xyes; then
16013 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16014 fi
16015
16016 # Check whether --with-sysroot was given.
16017 if test "${with_sysroot+set}" = set; then :
16018 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16019 else
16020 TARGET_SYSTEM_ROOT=
16021 fi
16022
16023
16024 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16025 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16026 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16027 ac_define_dir=`eval echo $ac_define_dir`
16028
16029 cat >>confdefs.h <<_ACEOF
16030 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16031 _ACEOF
16032
16033
16034
16035
16036 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16037 if test "x$prefix" = xNONE; then
16038 test_prefix=/usr/local
16039 else
16040 test_prefix=$prefix
16041 fi
16042 else
16043 test_prefix=$exec_prefix
16044 fi
16045 value=0
16046 case ${ac_define_dir} in
16047 "${test_prefix}"|"${test_prefix}/"*|\
16048 '${exec_prefix}'|'${exec_prefix}/'*)
16049 value=1
16050 ;;
16051 esac
16052
16053 cat >>confdefs.h <<_ACEOF
16054 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16055 _ACEOF
16056
16057
16058
16059
16060
16061 # Check whether --with-system-gdbinit was given.
16062 if test "${with_system_gdbinit+set}" = set; then :
16063 withval=$with_system_gdbinit;
16064 SYSTEM_GDBINIT=$withval
16065 else
16066 SYSTEM_GDBINIT=
16067 fi
16068
16069
16070 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16071 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16072 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16073 ac_define_dir=`eval echo $ac_define_dir`
16074
16075 cat >>confdefs.h <<_ACEOF
16076 #define SYSTEM_GDBINIT "$ac_define_dir"
16077 _ACEOF
16078
16079
16080
16081
16082 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16083 if test "x$prefix" = xNONE; then
16084 test_prefix=/usr/local
16085 else
16086 test_prefix=$prefix
16087 fi
16088 else
16089 test_prefix=$exec_prefix
16090 fi
16091 value=0
16092 case ${ac_define_dir} in
16093 "${test_prefix}"|"${test_prefix}/"*|\
16094 '${exec_prefix}'|'${exec_prefix}/'*)
16095 value=1
16096 ;;
16097 esac
16098
16099 cat >>confdefs.h <<_ACEOF
16100 #define SYSTEM_GDBINIT_RELOCATABLE $value
16101 _ACEOF
16102
16103
16104
16105
16106
16107 # Check whether --with-system-gdbinit-dir was given.
16108 if test "${with_system_gdbinit_dir+set}" = set; then :
16109 withval=$with_system_gdbinit_dir;
16110 SYSTEM_GDBINIT_DIR=$withval
16111 else
16112 SYSTEM_GDBINIT_DIR=
16113 fi
16114
16115
16116 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16117 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16118 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16119 ac_define_dir=`eval echo $ac_define_dir`
16120
16121 cat >>confdefs.h <<_ACEOF
16122 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16123 _ACEOF
16124
16125
16126
16127
16128 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16129 if test "x$prefix" = xNONE; then
16130 test_prefix=/usr/local
16131 else
16132 test_prefix=$prefix
16133 fi
16134 else
16135 test_prefix=$exec_prefix
16136 fi
16137 value=0
16138 case ${ac_define_dir} in
16139 "${test_prefix}"|"${test_prefix}/"*|\
16140 '${exec_prefix}'|'${exec_prefix}/'*)
16141 value=1
16142 ;;
16143 esac
16144
16145 cat >>confdefs.h <<_ACEOF
16146 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16147 _ACEOF
16148
16149
16150
16151
16152
16153 # Check whether --enable-werror was given.
16154 if test "${enable_werror+set}" = set; then :
16155 enableval=$enable_werror; case "${enableval}" in
16156 yes | y) ERROR_ON_WARNING="yes" ;;
16157 no | n) ERROR_ON_WARNING="no" ;;
16158 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16159 esac
16160 fi
16161
16162
16163 # Enable -Werror by default when using gcc. Turn it off for releases.
16164 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16165 ERROR_ON_WARNING=yes
16166 fi
16167
16168 WERROR_CFLAGS=""
16169 if test "${ERROR_ON_WARNING}" = yes ; then
16170 WERROR_CFLAGS="-Werror"
16171 fi
16172
16173 # The options we'll try to enable.
16174 build_warnings="-Wall -Wpointer-arith \
16175 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16176 -Wno-switch -Wno-char-subscripts \
16177 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16178 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16179 -Wno-mismatched-tags \
16180 -Wno-error=deprecated-register \
16181 -Wsuggest-override \
16182 -Wimplicit-fallthrough=3 \
16183 -Wduplicated-cond \
16184 -Wshadow=local \
16185 -Wdeprecated-copy \
16186 -Wdeprecated-copy-dtor \
16187 -Wredundant-move \
16188 -Wmissing-declarations \
16189 -Wstrict-null-sentinel \
16190 "
16191
16192 case "${host}" in
16193 *-*-mingw32*)
16194 # Enable -Wno-format by default when using gcc on mingw since many
16195 # GCC versions complain about %I64.
16196 build_warnings="$build_warnings -Wno-format" ;;
16197 *-*-solaris*)
16198 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16199 # doesn't understand.
16200 build_warnings="$build_warnings -Wno-unknown-pragmas"
16201 # Solaris 11 <unistd.h> marks vfork deprecated.
16202 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16203 *)
16204 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16205 # but there's a special case for this below.
16206 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16207 esac
16208
16209 # Check whether --enable-build-warnings was given.
16210 if test "${enable_build_warnings+set}" = set; then :
16211 enableval=$enable_build_warnings; case "${enableval}" in
16212 yes) ;;
16213 no) build_warnings="-w";;
16214 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16215 build_warnings="${build_warnings} ${t}";;
16216 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16217 build_warnings="${t} ${build_warnings}";;
16218 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16219 esac
16220 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16221 echo "Setting compiler warning flags = $build_warnings" 6>&1
16222 fi
16223 fi
16224 # Check whether --enable-gdb-build-warnings was given.
16225 if test "${enable_gdb_build_warnings+set}" = set; then :
16226 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16227 yes) ;;
16228 no) build_warnings="-w";;
16229 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16230 build_warnings="${build_warnings} ${t}";;
16231 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16232 build_warnings="${t} ${build_warnings}";;
16233 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16234 esac
16235 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16236 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16237 fi
16238 fi
16239
16240 # The set of warnings supported by a C++ compiler is not the same as
16241 # of the C compiler.
16242 ac_ext=cpp
16243 ac_cpp='$CXXCPP $CPPFLAGS'
16244 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16245 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16246 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16247
16248
16249 WARN_CFLAGS=""
16250 if test "x${build_warnings}" != x -a "x$GCC" = xyes
16251 then
16252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16253 $as_echo_n "checking compiler warning flags... " >&6; }
16254 # Separate out the -Werror flag as some files just cannot be
16255 # compiled with it enabled.
16256 for w in ${build_warnings}; do
16257 # GCC does not complain about -Wno-unknown-warning. Invert
16258 # and test -Wunknown-warning instead.
16259 case $w in
16260 -Wno-*)
16261 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16262 -Wformat-nonliteral)
16263 # gcc requires -Wformat before -Wformat-nonliteral
16264 # will work, so stick them together.
16265 w="-Wformat $w"
16266 wtest="$w"
16267 ;;
16268 *)
16269 wtest=$w ;;
16270 esac
16271
16272 case $w in
16273 -Werr*) WERROR_CFLAGS=-Werror ;;
16274 *)
16275 # Check whether GCC accepts it.
16276 saved_CFLAGS="$CFLAGS"
16277 CFLAGS="$CFLAGS -Werror $wtest"
16278 saved_CXXFLAGS="$CXXFLAGS"
16279 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16280 if test "x$w" = "x-Wunused-variable"; then
16281 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16282 # fixed in GCC 4.9. This test is derived from the gdb
16283 # source code that triggered this bug in GCC.
16284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16285 /* end confdefs.h. */
16286 struct scoped_restore_base {};
16287 struct scoped_restore_tmpl : public scoped_restore_base {
16288 ~scoped_restore_tmpl() {}
16289 };
16290 int
16291 main ()
16292 {
16293 const scoped_restore_base &b = scoped_restore_tmpl();
16294 ;
16295 return 0;
16296 }
16297 _ACEOF
16298 if ac_fn_cxx_try_compile "$LINENO"; then :
16299 WARN_CFLAGS="${WARN_CFLAGS} $w"
16300 fi
16301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16302 else
16303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304 /* end confdefs.h. */
16305
16306 int
16307 main ()
16308 {
16309
16310 ;
16311 return 0;
16312 }
16313 _ACEOF
16314 if ac_fn_cxx_try_compile "$LINENO"; then :
16315 WARN_CFLAGS="${WARN_CFLAGS} $w"
16316 fi
16317 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16318 fi
16319 CFLAGS="$saved_CFLAGS"
16320 CXXFLAGS="$saved_CXXFLAGS"
16321 esac
16322 done
16323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16324 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16325 fi
16326
16327
16328
16329 ac_ext=c
16330 ac_cpp='$CPP $CPPFLAGS'
16331 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16332 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16333 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16334
16335
16336
16337 # Check whether --enable-ubsan was given.
16338 if test "${enable_ubsan+set}" = set; then :
16339 enableval=$enable_ubsan;
16340 else
16341 enable_ubsan=no
16342 fi
16343
16344 if test "x$enable_ubsan" = xauto; then
16345 if $development; then
16346 enable_ubsan=yes
16347 fi
16348 fi
16349 ac_ext=cpp
16350 ac_cpp='$CXXCPP $CPPFLAGS'
16351 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16352 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16353 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16354
16355 if test "x$enable_ubsan" = xyes; then
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16357 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16358 saved_CXXFLAGS="$CXXFLAGS"
16359 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16361 /* end confdefs.h. */
16362
16363 int
16364 main ()
16365 {
16366
16367 ;
16368 return 0;
16369 }
16370 _ACEOF
16371 if ac_fn_cxx_try_link "$LINENO"; then :
16372 enable_ubsan=yes
16373 else
16374 enable_ubsan=no
16375 fi
16376 rm -f core conftest.err conftest.$ac_objext \
16377 conftest$ac_exeext conftest.$ac_ext
16378 CXXFLAGS="$saved_CXXFLAGS"
16379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16380 $as_echo "$enable_ubsan" >&6; }
16381 if test "x$enable_ubsan" = xyes; then
16382 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16383 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16384 fi
16385 fi
16386 ac_ext=c
16387 ac_cpp='$CPP $CPPFLAGS'
16388 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16389 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16390 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16391
16392
16393
16394 # In the Cygwin environment, we need some additional flags.
16395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16396 $as_echo_n "checking for cygwin... " >&6; }
16397 if ${gdb_cv_os_cygwin+:} false; then :
16398 $as_echo_n "(cached) " >&6
16399 else
16400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16401 /* end confdefs.h. */
16402
16403 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
16404 lose
16405 #endif
16406 _ACEOF
16407 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16408 $EGREP "^lose$" >/dev/null 2>&1; then :
16409 gdb_cv_os_cygwin=yes
16410 else
16411 gdb_cv_os_cygwin=no
16412 fi
16413 rm -f conftest*
16414
16415 fi
16416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16417 $as_echo "$gdb_cv_os_cygwin" >&6; }
16418
16419
16420 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
16421 case ${host} in
16422 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16423 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
16424 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
16425 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
16426 esac
16427
16428
16429 # libreadline needs libuser32.a in a cygwin environment
16430 WIN32LIBS=
16431 if test x"$gdb_cv_os_cygwin" = xyes; then
16432 WIN32LIBS="-luser32"
16433 case "${target}" in
16434 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16435 ;;
16436 esac
16437 fi
16438
16439 # The ser-tcp.c module requires sockets.
16440 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
16441 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
16442
16443 # Add ELF support to GDB, but only if BFD includes ELF support.
16444
16445 OLD_CFLAGS=$CFLAGS
16446 OLD_LDFLAGS=$LDFLAGS
16447 OLD_LIBS=$LIBS
16448 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16449 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16450 # always want our bfd.
16451 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16452 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16453 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16454 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16455 LIBS="-lbfd -liberty -lz $intl $LIBS"
16456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16457 $as_echo_n "checking for ELF support in BFD... " >&6; }
16458 if ${gdb_cv_var_elf+:} false; then :
16459 $as_echo_n "(cached) " >&6
16460 else
16461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16462 /* end confdefs.h. */
16463 #include <stdlib.h>
16464 #include "bfd.h"
16465 #include "elf-bfd.h"
16466
16467 int
16468 main ()
16469 {
16470 return bfd_get_elf_phdr_upper_bound (NULL);
16471 ;
16472 return 0;
16473 }
16474 _ACEOF
16475 if ac_fn_c_try_link "$LINENO"; then :
16476 gdb_cv_var_elf=yes
16477 else
16478 gdb_cv_var_elf=no
16479 fi
16480 rm -f core conftest.err conftest.$ac_objext \
16481 conftest$ac_exeext conftest.$ac_ext
16482 fi
16483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16484 $as_echo "$gdb_cv_var_elf" >&6; }
16485 CFLAGS=$OLD_CFLAGS
16486 LDFLAGS=$OLD_LDFLAGS
16487 LIBS=$OLD_LIBS
16488 if test "$gdb_cv_var_elf" = yes; then
16489 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
16490
16491 $as_echo "#define HAVE_ELF 1" >>confdefs.h
16492
16493 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16494 if test "$plugins" = "yes"; then
16495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16496 $as_echo_n "checking for library containing dlopen... " >&6; }
16497 if ${ac_cv_search_dlopen+:} false; then :
16498 $as_echo_n "(cached) " >&6
16499 else
16500 ac_func_search_save_LIBS=$LIBS
16501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16502 /* end confdefs.h. */
16503
16504 /* Override any GCC internal prototype to avoid an error.
16505 Use char because int might match the return type of a GCC
16506 builtin and then its argument prototype would still apply. */
16507 #ifdef __cplusplus
16508 extern "C"
16509 #endif
16510 char dlopen ();
16511 int
16512 main ()
16513 {
16514 return dlopen ();
16515 ;
16516 return 0;
16517 }
16518 _ACEOF
16519 for ac_lib in '' dl; do
16520 if test -z "$ac_lib"; then
16521 ac_res="none required"
16522 else
16523 ac_res=-l$ac_lib
16524 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16525 fi
16526 if ac_fn_c_try_link "$LINENO"; then :
16527 ac_cv_search_dlopen=$ac_res
16528 fi
16529 rm -f core conftest.err conftest.$ac_objext \
16530 conftest$ac_exeext
16531 if ${ac_cv_search_dlopen+:} false; then :
16532 break
16533 fi
16534 done
16535 if ${ac_cv_search_dlopen+:} false; then :
16536
16537 else
16538 ac_cv_search_dlopen=no
16539 fi
16540 rm conftest.$ac_ext
16541 LIBS=$ac_func_search_save_LIBS
16542 fi
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16544 $as_echo "$ac_cv_search_dlopen" >&6; }
16545 ac_res=$ac_cv_search_dlopen
16546 if test "$ac_res" != no; then :
16547 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16548
16549 fi
16550
16551 fi
16552 fi
16553
16554 # Add macho support to GDB, but only if BFD includes it.
16555
16556 OLD_CFLAGS=$CFLAGS
16557 OLD_LDFLAGS=$LDFLAGS
16558 OLD_LIBS=$LIBS
16559 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16560 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16561 # always want our bfd.
16562 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16563 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16564 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16565 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16566 LIBS="-lbfd -liberty -lz $intl $LIBS"
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16568 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
16569 if ${gdb_cv_var_macho+:} false; then :
16570 $as_echo_n "(cached) " >&6
16571 else
16572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573 /* end confdefs.h. */
16574 #include <stdlib.h>
16575 #include "bfd.h"
16576 #include "mach-o.h"
16577
16578 int
16579 main ()
16580 {
16581 return bfd_mach_o_lookup_command (NULL, 0, NULL);
16582 ;
16583 return 0;
16584 }
16585 _ACEOF
16586 if ac_fn_c_try_link "$LINENO"; then :
16587 gdb_cv_var_macho=yes
16588 else
16589 gdb_cv_var_macho=no
16590 fi
16591 rm -f core conftest.err conftest.$ac_objext \
16592 conftest$ac_exeext conftest.$ac_ext
16593 fi
16594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16595 $as_echo "$gdb_cv_var_macho" >&6; }
16596 CFLAGS=$OLD_CFLAGS
16597 LDFLAGS=$OLD_LDFLAGS
16598 LIBS=$OLD_LIBS
16599 if test "$gdb_cv_var_macho" = yes; then
16600 CONFIG_OBS="$CONFIG_OBS machoread.o"
16601 fi
16602
16603 # Add any host-specific objects to GDB.
16604 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16605
16606 # If building on ELF, look for lzma support for embedded compressed debug info.
16607 if test "$gdb_cv_var_elf" = yes; then
16608
16609 # Check whether --with-lzma was given.
16610 if test "${with_lzma+set}" = set; then :
16611 withval=$with_lzma;
16612 else
16613 with_lzma=auto
16614 fi
16615
16616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16617 $as_echo_n "checking whether to use lzma... " >&6; }
16618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16619 $as_echo "$with_lzma" >&6; }
16620
16621 if test "${with_lzma}" != no; then
16622
16623
16624
16625
16626
16627
16628
16629
16630 use_additional=yes
16631
16632 acl_save_prefix="$prefix"
16633 prefix="$acl_final_prefix"
16634 acl_save_exec_prefix="$exec_prefix"
16635 exec_prefix="$acl_final_exec_prefix"
16636
16637 eval additional_includedir=\"$includedir\"
16638 eval additional_libdir=\"$libdir\"
16639
16640 exec_prefix="$acl_save_exec_prefix"
16641 prefix="$acl_save_prefix"
16642
16643
16644 # Check whether --with-liblzma-prefix was given.
16645 if test "${with_liblzma_prefix+set}" = set; then :
16646 withval=$with_liblzma_prefix;
16647 if test "X$withval" = "Xno"; then
16648 use_additional=no
16649 else
16650 if test "X$withval" = "X"; then
16651
16652 acl_save_prefix="$prefix"
16653 prefix="$acl_final_prefix"
16654 acl_save_exec_prefix="$exec_prefix"
16655 exec_prefix="$acl_final_exec_prefix"
16656
16657 eval additional_includedir=\"$includedir\"
16658 eval additional_libdir=\"$libdir\"
16659
16660 exec_prefix="$acl_save_exec_prefix"
16661 prefix="$acl_save_prefix"
16662
16663 else
16664 additional_includedir="$withval/include"
16665 additional_libdir="$withval/lib"
16666 fi
16667 fi
16668
16669 fi
16670
16671
16672 # Check whether --with-liblzma-type was given.
16673 if test "${with_liblzma_type+set}" = set; then :
16674 withval=$with_liblzma_type; with_liblzma_type=$withval
16675 else
16676 with_liblzma_type=auto
16677 fi
16678
16679 lib_type=`eval echo \$with_liblzma_type`
16680
16681 LIBLZMA=
16682 LTLIBLZMA=
16683 INCLZMA=
16684 rpathdirs=
16685 ltrpathdirs=
16686 names_already_handled=
16687 names_next_round='lzma '
16688 while test -n "$names_next_round"; do
16689 names_this_round="$names_next_round"
16690 names_next_round=
16691 for name in $names_this_round; do
16692 already_handled=
16693 for n in $names_already_handled; do
16694 if test "$n" = "$name"; then
16695 already_handled=yes
16696 break
16697 fi
16698 done
16699 if test -z "$already_handled"; then
16700 names_already_handled="$names_already_handled $name"
16701 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16702 eval value=\"\$HAVE_LIB$uppername\"
16703 if test -n "$value"; then
16704 if test "$value" = yes; then
16705 eval value=\"\$LIB$uppername\"
16706 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16707 eval value=\"\$LTLIB$uppername\"
16708 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16709 else
16710 :
16711 fi
16712 else
16713 found_dir=
16714 found_la=
16715 found_so=
16716 found_a=
16717 if test $use_additional = yes; then
16718 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
16719 found_dir="$additional_libdir"
16720 found_so="$additional_libdir/lib$name.$shlibext"
16721 if test -f "$additional_libdir/lib$name.la"; then
16722 found_la="$additional_libdir/lib$name.la"
16723 fi
16724 elif test x$lib_type != xshared; then
16725 if test -f "$additional_libdir/lib$name.$libext"; then
16726 found_dir="$additional_libdir"
16727 found_a="$additional_libdir/lib$name.$libext"
16728 if test -f "$additional_libdir/lib$name.la"; then
16729 found_la="$additional_libdir/lib$name.la"
16730 fi
16731 fi
16732 fi
16733 fi
16734 if test "X$found_dir" = "X"; then
16735 for x in $LDFLAGS $LTLIBLZMA; do
16736
16737 acl_save_prefix="$prefix"
16738 prefix="$acl_final_prefix"
16739 acl_save_exec_prefix="$exec_prefix"
16740 exec_prefix="$acl_final_exec_prefix"
16741 eval x=\"$x\"
16742 exec_prefix="$acl_save_exec_prefix"
16743 prefix="$acl_save_prefix"
16744
16745 case "$x" in
16746 -L*)
16747 dir=`echo "X$x" | sed -e 's/^X-L//'`
16748 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
16749 found_dir="$dir"
16750 found_so="$dir/lib$name.$shlibext"
16751 if test -f "$dir/lib$name.la"; then
16752 found_la="$dir/lib$name.la"
16753 fi
16754 elif test x$lib_type != xshared; then
16755 if test -f "$dir/lib$name.$libext"; then
16756 found_dir="$dir"
16757 found_a="$dir/lib$name.$libext"
16758 if test -f "$dir/lib$name.la"; then
16759 found_la="$dir/lib$name.la"
16760 fi
16761 fi
16762 fi
16763 ;;
16764 esac
16765 if test "X$found_dir" != "X"; then
16766 break
16767 fi
16768 done
16769 fi
16770 if test "X$found_dir" != "X"; then
16771 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16772 if test "X$found_so" != "X"; then
16773 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16774 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16775 else
16776 haveit=
16777 for x in $ltrpathdirs; do
16778 if test "X$x" = "X$found_dir"; then
16779 haveit=yes
16780 break
16781 fi
16782 done
16783 if test -z "$haveit"; then
16784 ltrpathdirs="$ltrpathdirs $found_dir"
16785 fi
16786 if test "$hardcode_direct" = yes; then
16787 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16788 else
16789 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16790 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16791 haveit=
16792 for x in $rpathdirs; do
16793 if test "X$x" = "X$found_dir"; then
16794 haveit=yes
16795 break
16796 fi
16797 done
16798 if test -z "$haveit"; then
16799 rpathdirs="$rpathdirs $found_dir"
16800 fi
16801 else
16802 haveit=
16803 for x in $LDFLAGS $LIBLZMA; do
16804
16805 acl_save_prefix="$prefix"
16806 prefix="$acl_final_prefix"
16807 acl_save_exec_prefix="$exec_prefix"
16808 exec_prefix="$acl_final_exec_prefix"
16809 eval x=\"$x\"
16810 exec_prefix="$acl_save_exec_prefix"
16811 prefix="$acl_save_prefix"
16812
16813 if test "X$x" = "X-L$found_dir"; then
16814 haveit=yes
16815 break
16816 fi
16817 done
16818 if test -z "$haveit"; then
16819 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16820 fi
16821 if test "$hardcode_minus_L" != no; then
16822 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16823 else
16824 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16825 fi
16826 fi
16827 fi
16828 fi
16829 else
16830 if test "X$found_a" != "X"; then
16831 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16832 else
16833 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16834 fi
16835 fi
16836 additional_includedir=
16837 case "$found_dir" in
16838 */lib | */lib/)
16839 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16840 additional_includedir="$basedir/include"
16841 ;;
16842 esac
16843 if test "X$additional_includedir" != "X"; then
16844 if test "X$additional_includedir" != "X/usr/include"; then
16845 haveit=
16846 if test "X$additional_includedir" = "X/usr/local/include"; then
16847 if test -n "$GCC"; then
16848 case $host_os in
16849 linux*) haveit=yes;;
16850 esac
16851 fi
16852 fi
16853 if test -z "$haveit"; then
16854 for x in $CPPFLAGS $INCLZMA; do
16855
16856 acl_save_prefix="$prefix"
16857 prefix="$acl_final_prefix"
16858 acl_save_exec_prefix="$exec_prefix"
16859 exec_prefix="$acl_final_exec_prefix"
16860 eval x=\"$x\"
16861 exec_prefix="$acl_save_exec_prefix"
16862 prefix="$acl_save_prefix"
16863
16864 if test "X$x" = "X-I$additional_includedir"; then
16865 haveit=yes
16866 break
16867 fi
16868 done
16869 if test -z "$haveit"; then
16870 if test -d "$additional_includedir"; then
16871 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16872 fi
16873 fi
16874 fi
16875 fi
16876 fi
16877 if test -n "$found_la"; then
16878 save_libdir="$libdir"
16879 case "$found_la" in
16880 */* | *\\*) . "$found_la" ;;
16881 *) . "./$found_la" ;;
16882 esac
16883 libdir="$save_libdir"
16884 for dep in $dependency_libs; do
16885 case "$dep" in
16886 -L*)
16887 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16888 if test "X$additional_libdir" != "X/usr/lib"; then
16889 haveit=
16890 if test "X$additional_libdir" = "X/usr/local/lib"; then
16891 if test -n "$GCC"; then
16892 case $host_os in
16893 linux*) haveit=yes;;
16894 esac
16895 fi
16896 fi
16897 if test -z "$haveit"; then
16898 haveit=
16899 for x in $LDFLAGS $LIBLZMA; do
16900
16901 acl_save_prefix="$prefix"
16902 prefix="$acl_final_prefix"
16903 acl_save_exec_prefix="$exec_prefix"
16904 exec_prefix="$acl_final_exec_prefix"
16905 eval x=\"$x\"
16906 exec_prefix="$acl_save_exec_prefix"
16907 prefix="$acl_save_prefix"
16908
16909 if test "X$x" = "X-L$additional_libdir"; then
16910 haveit=yes
16911 break
16912 fi
16913 done
16914 if test -z "$haveit"; then
16915 if test -d "$additional_libdir"; then
16916 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16917 fi
16918 fi
16919 haveit=
16920 for x in $LDFLAGS $LTLIBLZMA; do
16921
16922 acl_save_prefix="$prefix"
16923 prefix="$acl_final_prefix"
16924 acl_save_exec_prefix="$exec_prefix"
16925 exec_prefix="$acl_final_exec_prefix"
16926 eval x=\"$x\"
16927 exec_prefix="$acl_save_exec_prefix"
16928 prefix="$acl_save_prefix"
16929
16930 if test "X$x" = "X-L$additional_libdir"; then
16931 haveit=yes
16932 break
16933 fi
16934 done
16935 if test -z "$haveit"; then
16936 if test -d "$additional_libdir"; then
16937 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16938 fi
16939 fi
16940 fi
16941 fi
16942 ;;
16943 -R*)
16944 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16945 if test "$enable_rpath" != no; then
16946 haveit=
16947 for x in $rpathdirs; do
16948 if test "X$x" = "X$dir"; then
16949 haveit=yes
16950 break
16951 fi
16952 done
16953 if test -z "$haveit"; then
16954 rpathdirs="$rpathdirs $dir"
16955 fi
16956 haveit=
16957 for x in $ltrpathdirs; do
16958 if test "X$x" = "X$dir"; then
16959 haveit=yes
16960 break
16961 fi
16962 done
16963 if test -z "$haveit"; then
16964 ltrpathdirs="$ltrpathdirs $dir"
16965 fi
16966 fi
16967 ;;
16968 -l*)
16969 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16970 ;;
16971 *.la)
16972 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16973 ;;
16974 *)
16975 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16976 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16977 ;;
16978 esac
16979 done
16980 fi
16981 else
16982 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
16983 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16984 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16985 else
16986 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
16987 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
16988 fi
16989 fi
16990 fi
16991 fi
16992 done
16993 done
16994 if test "X$rpathdirs" != "X"; then
16995 if test -n "$hardcode_libdir_separator"; then
16996 alldirs=
16997 for found_dir in $rpathdirs; do
16998 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16999 done
17000 acl_save_libdir="$libdir"
17001 libdir="$alldirs"
17002 eval flag=\"$hardcode_libdir_flag_spec\"
17003 libdir="$acl_save_libdir"
17004 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17005 else
17006 for found_dir in $rpathdirs; do
17007 acl_save_libdir="$libdir"
17008 libdir="$found_dir"
17009 eval flag=\"$hardcode_libdir_flag_spec\"
17010 libdir="$acl_save_libdir"
17011 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17012 done
17013 fi
17014 fi
17015 if test "X$ltrpathdirs" != "X"; then
17016 for found_dir in $ltrpathdirs; do
17017 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17018 done
17019 fi
17020
17021
17022 ac_save_CPPFLAGS="$CPPFLAGS"
17023
17024 for element in $INCLZMA; do
17025 haveit=
17026 for x in $CPPFLAGS; do
17027
17028 acl_save_prefix="$prefix"
17029 prefix="$acl_final_prefix"
17030 acl_save_exec_prefix="$exec_prefix"
17031 exec_prefix="$acl_final_exec_prefix"
17032 eval x=\"$x\"
17033 exec_prefix="$acl_save_exec_prefix"
17034 prefix="$acl_save_prefix"
17035
17036 if test "X$x" = "X$element"; then
17037 haveit=yes
17038 break
17039 fi
17040 done
17041 if test -z "$haveit"; then
17042 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17043 fi
17044 done
17045
17046
17047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17048 $as_echo_n "checking for liblzma... " >&6; }
17049 if ${ac_cv_liblzma+:} false; then :
17050 $as_echo_n "(cached) " >&6
17051 else
17052
17053 ac_save_LIBS="$LIBS"
17054 LIBS="$LIBS $LIBLZMA"
17055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17056 /* end confdefs.h. */
17057 #include "lzma.h"
17058 int
17059 main ()
17060 {
17061 lzma_index_iter iter;
17062 lzma_index_iter_init (&iter, 0);
17063 lzma_mf_is_supported (LZMA_MF_HC3);
17064 ;
17065 return 0;
17066 }
17067 _ACEOF
17068 if ac_fn_c_try_link "$LINENO"; then :
17069 ac_cv_liblzma=yes
17070 else
17071 ac_cv_liblzma=no
17072 fi
17073 rm -f core conftest.err conftest.$ac_objext \
17074 conftest$ac_exeext conftest.$ac_ext
17075 LIBS="$ac_save_LIBS"
17076
17077 fi
17078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17079 $as_echo "$ac_cv_liblzma" >&6; }
17080 if test "$ac_cv_liblzma" = yes; then
17081 HAVE_LIBLZMA=yes
17082
17083 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17084
17085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17086 $as_echo_n "checking how to link with liblzma... " >&6; }
17087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17088 $as_echo "$LIBLZMA" >&6; }
17089 else
17090 HAVE_LIBLZMA=no
17091 CPPFLAGS="$ac_save_CPPFLAGS"
17092 LIBLZMA=
17093 LTLIBLZMA=
17094 fi
17095
17096
17097
17098
17099
17100
17101 if test "$HAVE_LIBLZMA" != yes; then
17102 if test "$with_lzma" = yes; then
17103 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17104 fi
17105 fi
17106 fi
17107 fi
17108
17109 LIBGUI="../libgui/src/libgui.a"
17110 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17111
17112
17113
17114 WIN32LDAPP=
17115
17116
17117
17118 case "${host}" in
17119 *-*-cygwin* | *-*-mingw* )
17120 configdir="win"
17121 ;;
17122 *)
17123 configdir="unix"
17124 ;;
17125 esac
17126
17127 GDBTKLIBS=
17128 if test "${enable_gdbtk}" = "yes"; then
17129
17130 # Gdbtk must have an absolute path to srcdir in order to run
17131 # properly when not installed.
17132 here=`pwd`
17133 cd ${srcdir}
17134 GDBTK_SRC_DIR=`pwd`
17135 cd $here
17136
17137
17138 #
17139 # Ok, lets find the tcl configuration
17140 # First, look for one uninstalled.
17141 # the alternative search directory is invoked by --with-tcl
17142 #
17143
17144 if test x"${no_tcl}" = x ; then
17145 # we reset no_tcl in case something fails here
17146 no_tcl=true
17147
17148 # Check whether --with-tcl was given.
17149 if test "${with_tcl+set}" = set; then :
17150 withval=$with_tcl; with_tclconfig=${withval}
17151 fi
17152
17153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17154 $as_echo_n "checking for Tcl configuration... " >&6; }
17155 if ${ac_cv_c_tclconfig+:} false; then :
17156 $as_echo_n "(cached) " >&6
17157 else
17158
17159
17160 # First check to see if --with-tcl was specified.
17161 case "${host}" in
17162 *-*-cygwin*) platDir="win" ;;
17163 *) platDir="unix" ;;
17164 esac
17165 if test x"${with_tclconfig}" != x ; then
17166 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17167 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17168 else
17169 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17170 fi
17171 fi
17172
17173 # then check for a private Tcl installation
17174 if test x"${ac_cv_c_tclconfig}" = x ; then
17175 for i in \
17176 ../tcl \
17177 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17178 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17179 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17180 ../../tcl \
17181 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17182 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17183 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17184 ../../../tcl \
17185 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17186 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17187 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17188 if test -f "$i/$platDir/tclConfig.sh" ; then
17189 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17190 break
17191 fi
17192 done
17193 fi
17194
17195 # on Darwin, check in Framework installation locations
17196 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17197 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17198 `ls -d /Library/Frameworks 2>/dev/null` \
17199 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17200 `ls -d /System/Library/Frameworks 2>/dev/null` \
17201 ; do
17202 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17203 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17204 break
17205 fi
17206 done
17207 fi
17208
17209 # check in a few common install locations
17210 if test x"${ac_cv_c_tclconfig}" = x ; then
17211 for i in `ls -d ${libdir} 2>/dev/null` \
17212 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17213 `ls -d ${prefix}/lib 2>/dev/null` \
17214 `ls -d /usr/local/lib 2>/dev/null` \
17215 `ls -d /usr/contrib/lib 2>/dev/null` \
17216 `ls -d /usr/lib 2>/dev/null` \
17217 ; do
17218 if test -f "$i/tclConfig.sh" ; then
17219 ac_cv_c_tclconfig=`(cd $i; pwd)`
17220 break
17221 fi
17222 done
17223 fi
17224
17225 # check in a few other private locations
17226 if test x"${ac_cv_c_tclconfig}" = x ; then
17227 for i in \
17228 ${srcdir}/../tcl \
17229 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17230 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17231 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17232 if test -f "$i/$platDir/tclConfig.sh" ; then
17233 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17234 break
17235 fi
17236 done
17237 fi
17238
17239 fi
17240
17241
17242 if test x"${ac_cv_c_tclconfig}" = x ; then
17243 TCL_BIN_DIR="# no Tcl configs found"
17244 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17245 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17246 else
17247 no_tcl=
17248 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17250 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17251 fi
17252 fi
17253
17254
17255 # If $no_tk is nonempty, then we can't do Tk, and there is no
17256 # point to doing Tcl.
17257
17258 #
17259 # Ok, lets find the tk configuration
17260 # First, look for one uninstalled.
17261 # the alternative search directory is invoked by --with-tk
17262 #
17263
17264 if test x"${no_tk}" = x ; then
17265 # we reset no_tk in case something fails here
17266 no_tk=true
17267
17268 # Check whether --with-tk was given.
17269 if test "${with_tk+set}" = set; then :
17270 withval=$with_tk; with_tkconfig=${withval}
17271 fi
17272
17273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17274 $as_echo_n "checking for Tk configuration... " >&6; }
17275 if ${ac_cv_c_tkconfig+:} false; then :
17276 $as_echo_n "(cached) " >&6
17277 else
17278
17279
17280 # First check to see if --with-tkconfig was specified.
17281 if test x"${with_tkconfig}" != x ; then
17282 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17283 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17284 else
17285 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17286 fi
17287 fi
17288
17289 # then check for a private Tk library
17290 case "${host}" in
17291 *-*-cygwin*) platDir="win" ;;
17292 *) platDir="unix" ;;
17293 esac
17294 if test x"${ac_cv_c_tkconfig}" = x ; then
17295 for i in \
17296 ../tk \
17297 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17298 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17299 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17300 ../../tk \
17301 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17302 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17303 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17304 ../../../tk \
17305 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17306 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17307 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17308 if test -f "$i/$platDir/tkConfig.sh" ; then
17309 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17310 break
17311 fi
17312 done
17313 fi
17314
17315 # on Darwin, check in Framework installation locations
17316 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17317 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17318 `ls -d /Library/Frameworks 2>/dev/null` \
17319 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17320 `ls -d /System/Library/Frameworks 2>/dev/null` \
17321 ; do
17322 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17323 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17324 break
17325 fi
17326 done
17327 fi
17328
17329 # check in a few common install locations
17330 if test x"${ac_cv_c_tkconfig}" = x ; then
17331 for i in `ls -d ${libdir} 2>/dev/null` \
17332 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17333 `ls -d ${prefix}/lib 2>/dev/null` \
17334 `ls -d /usr/local/lib 2>/dev/null` \
17335 `ls -d /usr/contrib/lib 2>/dev/null` \
17336 `ls -d /usr/lib 2>/dev/null` \
17337 ; do
17338 if test -f "$i/tkConfig.sh" ; then
17339 ac_cv_c_tkconfig=`(cd $i; pwd)`
17340 break
17341 fi
17342 done
17343 fi
17344 # check in a few other private locations
17345 if test x"${ac_cv_c_tkconfig}" = x ; then
17346 for i in \
17347 ${srcdir}/../tk \
17348 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17349 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17350 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17351 if test -f "$i/$platDir/tkConfig.sh" ; then
17352 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17353 break
17354 fi
17355 done
17356 fi
17357
17358 fi
17359
17360
17361 if test x"${ac_cv_c_tkconfig}" = x ; then
17362 TK_BIN_DIR="# no Tk configs found"
17363 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17364 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
17365 else
17366 no_tk=
17367 TK_BIN_DIR=${ac_cv_c_tkconfig}
17368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17369 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17370 fi
17371 fi
17372
17373
17374 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17375
17376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17377 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
17378
17379 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
17380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17381 $as_echo "loading" >&6; }
17382 . ${TCL_BIN_DIR}/tclConfig.sh
17383 else
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17385 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17386 fi
17387
17388 # eval is required to do the TCL_DBGX substitution
17389 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17390 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17391
17392 # If the TCL_BIN_DIR is the build directory (not the install directory),
17393 # then set the common variable name to the value of the build variables.
17394 # For example, the variable TCL_LIB_SPEC will be set to the value
17395 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17396 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17397 # installed and uninstalled version of Tcl.
17398 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17399 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17400 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17401 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17402 elif test "`uname -s`" = "Darwin"; then
17403 # If Tcl was built as a framework, attempt to use the libraries
17404 # from the framework at the given location so that linking works
17405 # against Tcl.framework installed in an arbitrary location.
17406 case ${TCL_DEFS} in
17407 *TCL_FRAMEWORK*)
17408 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17409 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17410 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17411 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17412 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17413 break
17414 fi
17415 done
17416 fi
17417 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17418 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17419 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17420 fi
17421 ;;
17422 esac
17423 fi
17424
17425 # eval is required to do the TCL_DBGX substitution
17426 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17427 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17428 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17429 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445 # Check for in-tree tcl
17446 here=`pwd`
17447 cd ${srcdir}/..
17448 topdir=`pwd`
17449 cd ${here}
17450
17451 intree="no"
17452 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17453 intree="yes"
17454 fi
17455
17456 # Find Tcl private headers
17457 if test x"${intree}" = xno; then
17458
17459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17460 $as_echo_n "checking for Tcl private headers... " >&6; }
17461 private_dir=""
17462 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17463 if test -f ${dir}/tclInt.h ; then
17464 private_dir=${dir}
17465 fi
17466
17467 if test x"${private_dir}" = x; then
17468 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
17469 else
17470 TCL_PRIVATE_INCLUDE="-I${private_dir}"
17471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17472 $as_echo "${private_dir}" >&6; }
17473 fi
17474
17475 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17476 TCL_LIBRARY="${TCL_LIB_SPEC}"
17477 TCL_DEPS=""
17478 else
17479 # If building tcl in the same src tree, private headers
17480 # are not needed, but we need to be sure to use the right
17481 # headers library
17482 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17483 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17484 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17485 fi
17486
17487
17488
17489
17490
17491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17492 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
17493
17494 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
17495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17496 $as_echo "loading" >&6; }
17497 . ${TK_BIN_DIR}/tkConfig.sh
17498 else
17499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17500 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17501 fi
17502
17503 # eval is required to do the TK_DBGX substitution
17504 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17505 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17506
17507 # If the TK_BIN_DIR is the build directory (not the install directory),
17508 # then set the common variable name to the value of the build variables.
17509 # For example, the variable TK_LIB_SPEC will be set to the value
17510 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17511 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17512 # installed and uninstalled version of Tcl.
17513 if test -f "${TK_BIN_DIR}/Makefile" ; then
17514 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17515 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17516 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17517 elif test "`uname -s`" = "Darwin"; then
17518 # If Tk was built as a framework, attempt to use the libraries
17519 # from the framework at the given location so that linking works
17520 # against Tk.framework installed in an arbitrary location.
17521 case ${TK_DEFS} in
17522 *TK_FRAMEWORK*)
17523 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
17524 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17525 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17526 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17527 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17528 break
17529 fi
17530 done
17531 fi
17532 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
17533 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17534 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17535 fi
17536 ;;
17537 esac
17538 fi
17539
17540 # eval is required to do the TK_DBGX substitution
17541 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17542 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17543 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17544 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559 # Check for in-tree Tk
17560 intree="no"
17561 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17562 intree="yes"
17563 fi
17564
17565 # Find Tk private headers
17566 if test x"${intree}" = xno; then
17567
17568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17569 $as_echo_n "checking for Tk private headers... " >&6; }
17570 private_dir=""
17571 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17572 if test -f ${dir}/tkInt.h; then
17573 private_dir=${dir}
17574 fi
17575
17576 if test x"${private_dir}" = x; then
17577 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
17578 else
17579 TK_PRIVATE_INCLUDE="-I${private_dir}"
17580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17581 $as_echo "${private_dir}" >&6; }
17582 fi
17583
17584 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17585 TK_LIBRARY=${TK_LIB_SPEC}
17586 TK_DEPS=""
17587 else
17588 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17589 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17590 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17591 fi
17592
17593
17594
17595
17596
17597 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
17598
17599 # Include some libraries that Tcl and Tk want.
17600 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17601 # Yes, the ordering seems wrong here. But it isn't.
17602 # TK_LIBS is the list of libraries that need to be linked
17603 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17604 # were in LIBS then any link tests after this point would
17605 # try to include things like `$(LIBGUI)', which wouldn't work.
17606 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
17607
17608 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17609 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17610 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17611 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17612 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17613 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17614 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
17615
17616 if test x"$gdb_cv_os_cygwin" = xyes; then
17617 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17618 WIN32LDAPP="-Wl,--subsystem,console"
17619 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
17620 fi
17621
17622 subdirs="$subdirs gdbtk"
17623
17624 fi
17625 fi
17626
17627
17628
17629
17630
17631
17632
17633
17634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17635 $as_echo_n "checking for X... " >&6; }
17636
17637
17638 # Check whether --with-x was given.
17639 if test "${with_x+set}" = set; then :
17640 withval=$with_x;
17641 fi
17642
17643 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17644 if test "x$with_x" = xno; then
17645 # The user explicitly disabled X.
17646 have_x=disabled
17647 else
17648 case $x_includes,$x_libraries in #(
17649 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17650 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
17651 $as_echo_n "(cached) " >&6
17652 else
17653 # One or both of the vars are not set, and there is no cached value.
17654 ac_x_includes=no ac_x_libraries=no
17655 rm -f -r conftest.dir
17656 if mkdir conftest.dir; then
17657 cd conftest.dir
17658 cat >Imakefile <<'_ACEOF'
17659 incroot:
17660 @echo incroot='${INCROOT}'
17661 usrlibdir:
17662 @echo usrlibdir='${USRLIBDIR}'
17663 libdir:
17664 @echo libdir='${LIBDIR}'
17665 _ACEOF
17666 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17667 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
17668 for ac_var in incroot usrlibdir libdir; do
17669 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17670 done
17671 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17672 for ac_extension in a so sl dylib la dll; do
17673 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17674 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17675 ac_im_usrlibdir=$ac_im_libdir; break
17676 fi
17677 done
17678 # Screen out bogus values from the imake configuration. They are
17679 # bogus both because they are the default anyway, and because
17680 # using them would break gcc on systems where it needs fixed includes.
17681 case $ac_im_incroot in
17682 /usr/include) ac_x_includes= ;;
17683 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17684 esac
17685 case $ac_im_usrlibdir in
17686 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17687 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17688 esac
17689 fi
17690 cd ..
17691 rm -f -r conftest.dir
17692 fi
17693
17694 # Standard set of common directories for X headers.
17695 # Check X11 before X11Rn because it is often a symlink to the current release.
17696 ac_x_header_dirs='
17697 /usr/X11/include
17698 /usr/X11R7/include
17699 /usr/X11R6/include
17700 /usr/X11R5/include
17701 /usr/X11R4/include
17702
17703 /usr/include/X11
17704 /usr/include/X11R7
17705 /usr/include/X11R6
17706 /usr/include/X11R5
17707 /usr/include/X11R4
17708
17709 /usr/local/X11/include
17710 /usr/local/X11R7/include
17711 /usr/local/X11R6/include
17712 /usr/local/X11R5/include
17713 /usr/local/X11R4/include
17714
17715 /usr/local/include/X11
17716 /usr/local/include/X11R7
17717 /usr/local/include/X11R6
17718 /usr/local/include/X11R5
17719 /usr/local/include/X11R4
17720
17721 /usr/X386/include
17722 /usr/x386/include
17723 /usr/XFree86/include/X11
17724
17725 /usr/include
17726 /usr/local/include
17727 /usr/unsupported/include
17728 /usr/athena/include
17729 /usr/local/x11r5/include
17730 /usr/lpp/Xamples/include
17731
17732 /usr/openwin/include
17733 /usr/openwin/share/include'
17734
17735 if test "$ac_x_includes" = no; then
17736 # Guess where to find include files, by looking for Xlib.h.
17737 # First, try using that file with no special directory specified.
17738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17739 /* end confdefs.h. */
17740 #include <X11/Xlib.h>
17741 _ACEOF
17742 if ac_fn_c_try_cpp "$LINENO"; then :
17743 # We can compile using X headers with no special include directory.
17744 ac_x_includes=
17745 else
17746 for ac_dir in $ac_x_header_dirs; do
17747 if test -r "$ac_dir/X11/Xlib.h"; then
17748 ac_x_includes=$ac_dir
17749 break
17750 fi
17751 done
17752 fi
17753 rm -f conftest.err conftest.i conftest.$ac_ext
17754 fi # $ac_x_includes = no
17755
17756 if test "$ac_x_libraries" = no; then
17757 # Check for the libraries.
17758 # See if we find them without any special options.
17759 # Don't add to $LIBS permanently.
17760 ac_save_LIBS=$LIBS
17761 LIBS="-lX11 $LIBS"
17762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17763 /* end confdefs.h. */
17764 #include <X11/Xlib.h>
17765 int
17766 main ()
17767 {
17768 XrmInitialize ()
17769 ;
17770 return 0;
17771 }
17772 _ACEOF
17773 if ac_fn_c_try_link "$LINENO"; then :
17774 LIBS=$ac_save_LIBS
17775 # We can link X programs with no special library path.
17776 ac_x_libraries=
17777 else
17778 LIBS=$ac_save_LIBS
17779 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17780 do
17781 # Don't even attempt the hair of trying to link an X program!
17782 for ac_extension in a so sl dylib la dll; do
17783 if test -r "$ac_dir/libX11.$ac_extension"; then
17784 ac_x_libraries=$ac_dir
17785 break 2
17786 fi
17787 done
17788 done
17789 fi
17790 rm -f core conftest.err conftest.$ac_objext \
17791 conftest$ac_exeext conftest.$ac_ext
17792 fi # $ac_x_libraries = no
17793
17794 case $ac_x_includes,$ac_x_libraries in #(
17795 no,* | *,no | *\'*)
17796 # Didn't find X, or a directory has "'" in its name.
17797 ac_cv_have_x="have_x=no";; #(
17798 *)
17799 # Record where we found X for the cache.
17800 ac_cv_have_x="have_x=yes\
17801 ac_x_includes='$ac_x_includes'\
17802 ac_x_libraries='$ac_x_libraries'"
17803 esac
17804 fi
17805 ;; #(
17806 *) have_x=yes;;
17807 esac
17808 eval "$ac_cv_have_x"
17809 fi # $with_x != no
17810
17811 if test "$have_x" != yes; then
17812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17813 $as_echo "$have_x" >&6; }
17814 no_x=yes
17815 else
17816 # If each of the values was on the command line, it overrides each guess.
17817 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17818 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17819 # Update the cache value to reflect the command line values.
17820 ac_cv_have_x="have_x=yes\
17821 ac_x_includes='$x_includes'\
17822 ac_x_libraries='$x_libraries'"
17823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17824 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17825 fi
17826
17827
17828 # Unlike the sim directory, whether a simulator is linked is controlled by
17829 # presence of a gdb_sim definition in the target configure.tgt entry.
17830 # This code just checks for a few cases where we'd like to ignore those
17831 # definitions, even when they're present in the '.mt' file. These cases
17832 # are when --disable-sim is specified, or if the simulator directory is
17833 # not part of the source tree.
17834 #
17835 # Check whether --enable-sim was given.
17836 if test "${enable_sim+set}" = set; then :
17837 enableval=$enable_sim; echo "enable_sim = $enable_sim";
17838 echo "enableval = ${enableval}";
17839 case "${enableval}" in
17840 yes) ignore_sim=false ;;
17841 no) ignore_sim=true ;;
17842 *) ignore_sim=false ;;
17843 esac
17844 else
17845 ignore_sim=false
17846 fi
17847
17848
17849 if test ! -d "${srcdir}/../sim"; then
17850 ignore_sim=true
17851 fi
17852
17853 SIM=
17854 SIM_OBS=
17855 if test "${ignore_sim}" = "false"; then
17856 if test x"${gdb_sim}" != x ; then
17857 SIM="${gdb_sim}"
17858 SIM_OBS="remote-sim.o"
17859
17860 $as_echo "#define WITH_SIM 1" >>confdefs.h
17861
17862
17863 # Some tdep code should only be compiled in when the ppc sim is
17864 # built. PR sim/13418.
17865 case $target in
17866 powerpc*-*-*)
17867
17868 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17869
17870 ;;
17871 esac
17872 fi
17873 fi
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888 # List of host floatformats.
17889
17890 cat >>confdefs.h <<_ACEOF
17891 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17892 _ACEOF
17893
17894
17895 cat >>confdefs.h <<_ACEOF
17896 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17897 _ACEOF
17898
17899
17900 cat >>confdefs.h <<_ACEOF
17901 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17902 _ACEOF
17903
17904
17905 # target_subdir is used by the testsuite to find the target libraries.
17906 target_subdir=
17907 if test "${host}" != "${target}"; then
17908 target_subdir="${target_alias}/"
17909 fi
17910
17911
17912 # Import nat definitions.
17913 nat_makefile_frag=/dev/null
17914 if test "${gdb_native}" = "yes"; then
17915 . ${srcdir}/configure.nat
17916 nativefile=$NAT_FILE
17917 fi
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929 if test x"${gdb_osabi}" != x ; then
17930
17931 cat >>confdefs.h <<_ACEOF
17932 #define GDB_OSABI_DEFAULT $gdb_osabi
17933 _ACEOF
17934
17935 fi
17936
17937 # Check for babeltrace and babeltrace-ctf
17938
17939 # Check whether --with-babeltrace was given.
17940 if test "${with_babeltrace+set}" = set; then :
17941 withval=$with_babeltrace;
17942 else
17943 with_babeltrace=auto
17944 fi
17945
17946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17947 $as_echo_n "checking whether to use babeltrace... " >&6; }
17948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17949 $as_echo "$with_babeltrace" >&6; }
17950
17951 if test "x$with_babeltrace" = "xno"; then
17952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17953 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17954 else
17955 # Append -Werror to CFLAGS so that configure can catch the warning
17956 # "assignment from incompatible pointer type", which is related to
17957 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17958 # in GDB, while babeltrace 1.0.3 is broken.
17959 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17960 # safe to save and restore CFLAGS here.
17961 saved_CFLAGS=$CFLAGS
17962 CFLAGS="$CFLAGS -Werror"
17963
17964
17965
17966
17967
17968
17969
17970
17971 use_additional=yes
17972
17973 acl_save_prefix="$prefix"
17974 prefix="$acl_final_prefix"
17975 acl_save_exec_prefix="$exec_prefix"
17976 exec_prefix="$acl_final_exec_prefix"
17977
17978 eval additional_includedir=\"$includedir\"
17979 eval additional_libdir=\"$libdir\"
17980
17981 exec_prefix="$acl_save_exec_prefix"
17982 prefix="$acl_save_prefix"
17983
17984
17985 # Check whether --with-libbabeltrace-prefix was given.
17986 if test "${with_libbabeltrace_prefix+set}" = set; then :
17987 withval=$with_libbabeltrace_prefix;
17988 if test "X$withval" = "Xno"; then
17989 use_additional=no
17990 else
17991 if test "X$withval" = "X"; then
17992
17993 acl_save_prefix="$prefix"
17994 prefix="$acl_final_prefix"
17995 acl_save_exec_prefix="$exec_prefix"
17996 exec_prefix="$acl_final_exec_prefix"
17997
17998 eval additional_includedir=\"$includedir\"
17999 eval additional_libdir=\"$libdir\"
18000
18001 exec_prefix="$acl_save_exec_prefix"
18002 prefix="$acl_save_prefix"
18003
18004 else
18005 additional_includedir="$withval/include"
18006 additional_libdir="$withval/lib"
18007 fi
18008 fi
18009
18010 fi
18011
18012
18013 # Check whether --with-libbabeltrace-type was given.
18014 if test "${with_libbabeltrace_type+set}" = set; then :
18015 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18016 else
18017 with_libbabeltrace_type=auto
18018 fi
18019
18020 lib_type=`eval echo \$with_libbabeltrace_type`
18021
18022 LIBBABELTRACE=
18023 LTLIBBABELTRACE=
18024 INCBABELTRACE=
18025 rpathdirs=
18026 ltrpathdirs=
18027 names_already_handled=
18028 names_next_round='babeltrace babeltrace-ctf'
18029 while test -n "$names_next_round"; do
18030 names_this_round="$names_next_round"
18031 names_next_round=
18032 for name in $names_this_round; do
18033 already_handled=
18034 for n in $names_already_handled; do
18035 if test "$n" = "$name"; then
18036 already_handled=yes
18037 break
18038 fi
18039 done
18040 if test -z "$already_handled"; then
18041 names_already_handled="$names_already_handled $name"
18042 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18043 eval value=\"\$HAVE_LIB$uppername\"
18044 if test -n "$value"; then
18045 if test "$value" = yes; then
18046 eval value=\"\$LIB$uppername\"
18047 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18048 eval value=\"\$LTLIB$uppername\"
18049 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18050 else
18051 :
18052 fi
18053 else
18054 found_dir=
18055 found_la=
18056 found_so=
18057 found_a=
18058 if test $use_additional = yes; then
18059 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18060 found_dir="$additional_libdir"
18061 found_so="$additional_libdir/lib$name.$shlibext"
18062 if test -f "$additional_libdir/lib$name.la"; then
18063 found_la="$additional_libdir/lib$name.la"
18064 fi
18065 elif test x$lib_type != xshared; then
18066 if test -f "$additional_libdir/lib$name.$libext"; then
18067 found_dir="$additional_libdir"
18068 found_a="$additional_libdir/lib$name.$libext"
18069 if test -f "$additional_libdir/lib$name.la"; then
18070 found_la="$additional_libdir/lib$name.la"
18071 fi
18072 fi
18073 fi
18074 fi
18075 if test "X$found_dir" = "X"; then
18076 for x in $LDFLAGS $LTLIBBABELTRACE; do
18077
18078 acl_save_prefix="$prefix"
18079 prefix="$acl_final_prefix"
18080 acl_save_exec_prefix="$exec_prefix"
18081 exec_prefix="$acl_final_exec_prefix"
18082 eval x=\"$x\"
18083 exec_prefix="$acl_save_exec_prefix"
18084 prefix="$acl_save_prefix"
18085
18086 case "$x" in
18087 -L*)
18088 dir=`echo "X$x" | sed -e 's/^X-L//'`
18089 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18090 found_dir="$dir"
18091 found_so="$dir/lib$name.$shlibext"
18092 if test -f "$dir/lib$name.la"; then
18093 found_la="$dir/lib$name.la"
18094 fi
18095 elif test x$lib_type != xshared; then
18096 if test -f "$dir/lib$name.$libext"; then
18097 found_dir="$dir"
18098 found_a="$dir/lib$name.$libext"
18099 if test -f "$dir/lib$name.la"; then
18100 found_la="$dir/lib$name.la"
18101 fi
18102 fi
18103 fi
18104 ;;
18105 esac
18106 if test "X$found_dir" != "X"; then
18107 break
18108 fi
18109 done
18110 fi
18111 if test "X$found_dir" != "X"; then
18112 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18113 if test "X$found_so" != "X"; then
18114 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18115 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18116 else
18117 haveit=
18118 for x in $ltrpathdirs; do
18119 if test "X$x" = "X$found_dir"; then
18120 haveit=yes
18121 break
18122 fi
18123 done
18124 if test -z "$haveit"; then
18125 ltrpathdirs="$ltrpathdirs $found_dir"
18126 fi
18127 if test "$hardcode_direct" = yes; then
18128 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18129 else
18130 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18131 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18132 haveit=
18133 for x in $rpathdirs; do
18134 if test "X$x" = "X$found_dir"; then
18135 haveit=yes
18136 break
18137 fi
18138 done
18139 if test -z "$haveit"; then
18140 rpathdirs="$rpathdirs $found_dir"
18141 fi
18142 else
18143 haveit=
18144 for x in $LDFLAGS $LIBBABELTRACE; do
18145
18146 acl_save_prefix="$prefix"
18147 prefix="$acl_final_prefix"
18148 acl_save_exec_prefix="$exec_prefix"
18149 exec_prefix="$acl_final_exec_prefix"
18150 eval x=\"$x\"
18151 exec_prefix="$acl_save_exec_prefix"
18152 prefix="$acl_save_prefix"
18153
18154 if test "X$x" = "X-L$found_dir"; then
18155 haveit=yes
18156 break
18157 fi
18158 done
18159 if test -z "$haveit"; then
18160 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18161 fi
18162 if test "$hardcode_minus_L" != no; then
18163 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18164 else
18165 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18166 fi
18167 fi
18168 fi
18169 fi
18170 else
18171 if test "X$found_a" != "X"; then
18172 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18173 else
18174 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18175 fi
18176 fi
18177 additional_includedir=
18178 case "$found_dir" in
18179 */lib | */lib/)
18180 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18181 additional_includedir="$basedir/include"
18182 ;;
18183 esac
18184 if test "X$additional_includedir" != "X"; then
18185 if test "X$additional_includedir" != "X/usr/include"; then
18186 haveit=
18187 if test "X$additional_includedir" = "X/usr/local/include"; then
18188 if test -n "$GCC"; then
18189 case $host_os in
18190 linux*) haveit=yes;;
18191 esac
18192 fi
18193 fi
18194 if test -z "$haveit"; then
18195 for x in $CPPFLAGS $INCBABELTRACE; do
18196
18197 acl_save_prefix="$prefix"
18198 prefix="$acl_final_prefix"
18199 acl_save_exec_prefix="$exec_prefix"
18200 exec_prefix="$acl_final_exec_prefix"
18201 eval x=\"$x\"
18202 exec_prefix="$acl_save_exec_prefix"
18203 prefix="$acl_save_prefix"
18204
18205 if test "X$x" = "X-I$additional_includedir"; then
18206 haveit=yes
18207 break
18208 fi
18209 done
18210 if test -z "$haveit"; then
18211 if test -d "$additional_includedir"; then
18212 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18213 fi
18214 fi
18215 fi
18216 fi
18217 fi
18218 if test -n "$found_la"; then
18219 save_libdir="$libdir"
18220 case "$found_la" in
18221 */* | *\\*) . "$found_la" ;;
18222 *) . "./$found_la" ;;
18223 esac
18224 libdir="$save_libdir"
18225 for dep in $dependency_libs; do
18226 case "$dep" in
18227 -L*)
18228 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18229 if test "X$additional_libdir" != "X/usr/lib"; then
18230 haveit=
18231 if test "X$additional_libdir" = "X/usr/local/lib"; then
18232 if test -n "$GCC"; then
18233 case $host_os in
18234 linux*) haveit=yes;;
18235 esac
18236 fi
18237 fi
18238 if test -z "$haveit"; then
18239 haveit=
18240 for x in $LDFLAGS $LIBBABELTRACE; do
18241
18242 acl_save_prefix="$prefix"
18243 prefix="$acl_final_prefix"
18244 acl_save_exec_prefix="$exec_prefix"
18245 exec_prefix="$acl_final_exec_prefix"
18246 eval x=\"$x\"
18247 exec_prefix="$acl_save_exec_prefix"
18248 prefix="$acl_save_prefix"
18249
18250 if test "X$x" = "X-L$additional_libdir"; then
18251 haveit=yes
18252 break
18253 fi
18254 done
18255 if test -z "$haveit"; then
18256 if test -d "$additional_libdir"; then
18257 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18258 fi
18259 fi
18260 haveit=
18261 for x in $LDFLAGS $LTLIBBABELTRACE; do
18262
18263 acl_save_prefix="$prefix"
18264 prefix="$acl_final_prefix"
18265 acl_save_exec_prefix="$exec_prefix"
18266 exec_prefix="$acl_final_exec_prefix"
18267 eval x=\"$x\"
18268 exec_prefix="$acl_save_exec_prefix"
18269 prefix="$acl_save_prefix"
18270
18271 if test "X$x" = "X-L$additional_libdir"; then
18272 haveit=yes
18273 break
18274 fi
18275 done
18276 if test -z "$haveit"; then
18277 if test -d "$additional_libdir"; then
18278 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18279 fi
18280 fi
18281 fi
18282 fi
18283 ;;
18284 -R*)
18285 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18286 if test "$enable_rpath" != no; then
18287 haveit=
18288 for x in $rpathdirs; do
18289 if test "X$x" = "X$dir"; then
18290 haveit=yes
18291 break
18292 fi
18293 done
18294 if test -z "$haveit"; then
18295 rpathdirs="$rpathdirs $dir"
18296 fi
18297 haveit=
18298 for x in $ltrpathdirs; do
18299 if test "X$x" = "X$dir"; then
18300 haveit=yes
18301 break
18302 fi
18303 done
18304 if test -z "$haveit"; then
18305 ltrpathdirs="$ltrpathdirs $dir"
18306 fi
18307 fi
18308 ;;
18309 -l*)
18310 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18311 ;;
18312 *.la)
18313 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18314 ;;
18315 *)
18316 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18317 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18318 ;;
18319 esac
18320 done
18321 fi
18322 else
18323 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18324 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18325 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18326 else
18327 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
18328 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
18329 fi
18330 fi
18331 fi
18332 fi
18333 done
18334 done
18335 if test "X$rpathdirs" != "X"; then
18336 if test -n "$hardcode_libdir_separator"; then
18337 alldirs=
18338 for found_dir in $rpathdirs; do
18339 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18340 done
18341 acl_save_libdir="$libdir"
18342 libdir="$alldirs"
18343 eval flag=\"$hardcode_libdir_flag_spec\"
18344 libdir="$acl_save_libdir"
18345 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18346 else
18347 for found_dir in $rpathdirs; do
18348 acl_save_libdir="$libdir"
18349 libdir="$found_dir"
18350 eval flag=\"$hardcode_libdir_flag_spec\"
18351 libdir="$acl_save_libdir"
18352 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18353 done
18354 fi
18355 fi
18356 if test "X$ltrpathdirs" != "X"; then
18357 for found_dir in $ltrpathdirs; do
18358 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18359 done
18360 fi
18361
18362
18363 ac_save_CPPFLAGS="$CPPFLAGS"
18364
18365 for element in $INCBABELTRACE; do
18366 haveit=
18367 for x in $CPPFLAGS; do
18368
18369 acl_save_prefix="$prefix"
18370 prefix="$acl_final_prefix"
18371 acl_save_exec_prefix="$exec_prefix"
18372 exec_prefix="$acl_final_exec_prefix"
18373 eval x=\"$x\"
18374 exec_prefix="$acl_save_exec_prefix"
18375 prefix="$acl_save_prefix"
18376
18377 if test "X$x" = "X$element"; then
18378 haveit=yes
18379 break
18380 fi
18381 done
18382 if test -z "$haveit"; then
18383 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18384 fi
18385 done
18386
18387
18388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18389 $as_echo_n "checking for libbabeltrace... " >&6; }
18390 if ${ac_cv_libbabeltrace+:} false; then :
18391 $as_echo_n "(cached) " >&6
18392 else
18393
18394 ac_save_LIBS="$LIBS"
18395 LIBS="$LIBS $LIBBABELTRACE"
18396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18397 /* end confdefs.h. */
18398 #include <babeltrace/babeltrace.h>
18399 #include <babeltrace/ctf/events.h>
18400 #include <babeltrace/ctf/iterator.h>
18401 int
18402 main ()
18403 {
18404 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18405 struct bt_ctf_event *event = NULL;
18406 const struct bt_definition *scope;
18407
18408 pos->type = BT_SEEK_BEGIN;
18409 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
18410 scope = bt_ctf_get_top_level_scope (event,
18411 BT_STREAM_EVENT_HEADER);
18412 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18413
18414 ;
18415 return 0;
18416 }
18417 _ACEOF
18418 if ac_fn_c_try_link "$LINENO"; then :
18419 ac_cv_libbabeltrace=yes
18420 else
18421 ac_cv_libbabeltrace=no
18422 fi
18423 rm -f core conftest.err conftest.$ac_objext \
18424 conftest$ac_exeext conftest.$ac_ext
18425 LIBS="$ac_save_LIBS"
18426
18427 fi
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18429 $as_echo "$ac_cv_libbabeltrace" >&6; }
18430 if test "$ac_cv_libbabeltrace" = yes; then
18431 HAVE_LIBBABELTRACE=yes
18432
18433 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18434
18435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18436 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
18437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18438 $as_echo "$LIBBABELTRACE" >&6; }
18439 else
18440 HAVE_LIBBABELTRACE=no
18441 CPPFLAGS="$ac_save_CPPFLAGS"
18442 LIBBABELTRACE=
18443 LTLIBBABELTRACE=
18444 fi
18445
18446
18447
18448
18449
18450
18451 CFLAGS=$saved_CFLAGS
18452
18453 if test "$HAVE_LIBBABELTRACE" != yes; then
18454 if test "$with_babeltrace" = yes; then
18455 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
18456 else
18457 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18458 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18459 fi
18460 fi
18461 fi
18462
18463 # Check for xxhash
18464
18465 # Check whether --with-xxhash was given.
18466 if test "${with_xxhash+set}" = set; then :
18467 withval=$with_xxhash;
18468 else
18469 with_xxhash=auto
18470 fi
18471
18472
18473 if test "x$with_xxhash" != "xno"; then
18474
18475
18476
18477
18478
18479
18480
18481
18482 use_additional=yes
18483
18484 acl_save_prefix="$prefix"
18485 prefix="$acl_final_prefix"
18486 acl_save_exec_prefix="$exec_prefix"
18487 exec_prefix="$acl_final_exec_prefix"
18488
18489 eval additional_includedir=\"$includedir\"
18490 eval additional_libdir=\"$libdir\"
18491
18492 exec_prefix="$acl_save_exec_prefix"
18493 prefix="$acl_save_prefix"
18494
18495
18496 # Check whether --with-libxxhash-prefix was given.
18497 if test "${with_libxxhash_prefix+set}" = set; then :
18498 withval=$with_libxxhash_prefix;
18499 if test "X$withval" = "Xno"; then
18500 use_additional=no
18501 else
18502 if test "X$withval" = "X"; then
18503
18504 acl_save_prefix="$prefix"
18505 prefix="$acl_final_prefix"
18506 acl_save_exec_prefix="$exec_prefix"
18507 exec_prefix="$acl_final_exec_prefix"
18508
18509 eval additional_includedir=\"$includedir\"
18510 eval additional_libdir=\"$libdir\"
18511
18512 exec_prefix="$acl_save_exec_prefix"
18513 prefix="$acl_save_prefix"
18514
18515 else
18516 additional_includedir="$withval/include"
18517 additional_libdir="$withval/lib"
18518 fi
18519 fi
18520
18521 fi
18522
18523
18524 # Check whether --with-libxxhash-type was given.
18525 if test "${with_libxxhash_type+set}" = set; then :
18526 withval=$with_libxxhash_type; with_libxxhash_type=$withval
18527 else
18528 with_libxxhash_type=auto
18529 fi
18530
18531 lib_type=`eval echo \$with_libxxhash_type`
18532
18533 LIBXXHASH=
18534 LTLIBXXHASH=
18535 INCXXHASH=
18536 rpathdirs=
18537 ltrpathdirs=
18538 names_already_handled=
18539 names_next_round='xxhash '
18540 while test -n "$names_next_round"; do
18541 names_this_round="$names_next_round"
18542 names_next_round=
18543 for name in $names_this_round; do
18544 already_handled=
18545 for n in $names_already_handled; do
18546 if test "$n" = "$name"; then
18547 already_handled=yes
18548 break
18549 fi
18550 done
18551 if test -z "$already_handled"; then
18552 names_already_handled="$names_already_handled $name"
18553 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18554 eval value=\"\$HAVE_LIB$uppername\"
18555 if test -n "$value"; then
18556 if test "$value" = yes; then
18557 eval value=\"\$LIB$uppername\"
18558 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18559 eval value=\"\$LTLIB$uppername\"
18560 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18561 else
18562 :
18563 fi
18564 else
18565 found_dir=
18566 found_la=
18567 found_so=
18568 found_a=
18569 if test $use_additional = yes; then
18570 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18571 found_dir="$additional_libdir"
18572 found_so="$additional_libdir/lib$name.$shlibext"
18573 if test -f "$additional_libdir/lib$name.la"; then
18574 found_la="$additional_libdir/lib$name.la"
18575 fi
18576 elif test x$lib_type != xshared; then
18577 if test -f "$additional_libdir/lib$name.$libext"; then
18578 found_dir="$additional_libdir"
18579 found_a="$additional_libdir/lib$name.$libext"
18580 if test -f "$additional_libdir/lib$name.la"; then
18581 found_la="$additional_libdir/lib$name.la"
18582 fi
18583 fi
18584 fi
18585 fi
18586 if test "X$found_dir" = "X"; then
18587 for x in $LDFLAGS $LTLIBXXHASH; do
18588
18589 acl_save_prefix="$prefix"
18590 prefix="$acl_final_prefix"
18591 acl_save_exec_prefix="$exec_prefix"
18592 exec_prefix="$acl_final_exec_prefix"
18593 eval x=\"$x\"
18594 exec_prefix="$acl_save_exec_prefix"
18595 prefix="$acl_save_prefix"
18596
18597 case "$x" in
18598 -L*)
18599 dir=`echo "X$x" | sed -e 's/^X-L//'`
18600 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18601 found_dir="$dir"
18602 found_so="$dir/lib$name.$shlibext"
18603 if test -f "$dir/lib$name.la"; then
18604 found_la="$dir/lib$name.la"
18605 fi
18606 elif test x$lib_type != xshared; then
18607 if test -f "$dir/lib$name.$libext"; then
18608 found_dir="$dir"
18609 found_a="$dir/lib$name.$libext"
18610 if test -f "$dir/lib$name.la"; then
18611 found_la="$dir/lib$name.la"
18612 fi
18613 fi
18614 fi
18615 ;;
18616 esac
18617 if test "X$found_dir" != "X"; then
18618 break
18619 fi
18620 done
18621 fi
18622 if test "X$found_dir" != "X"; then
18623 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18624 if test "X$found_so" != "X"; then
18625 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18626 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18627 else
18628 haveit=
18629 for x in $ltrpathdirs; do
18630 if test "X$x" = "X$found_dir"; then
18631 haveit=yes
18632 break
18633 fi
18634 done
18635 if test -z "$haveit"; then
18636 ltrpathdirs="$ltrpathdirs $found_dir"
18637 fi
18638 if test "$hardcode_direct" = yes; then
18639 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18640 else
18641 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18642 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18643 haveit=
18644 for x in $rpathdirs; do
18645 if test "X$x" = "X$found_dir"; then
18646 haveit=yes
18647 break
18648 fi
18649 done
18650 if test -z "$haveit"; then
18651 rpathdirs="$rpathdirs $found_dir"
18652 fi
18653 else
18654 haveit=
18655 for x in $LDFLAGS $LIBXXHASH; do
18656
18657 acl_save_prefix="$prefix"
18658 prefix="$acl_final_prefix"
18659 acl_save_exec_prefix="$exec_prefix"
18660 exec_prefix="$acl_final_exec_prefix"
18661 eval x=\"$x\"
18662 exec_prefix="$acl_save_exec_prefix"
18663 prefix="$acl_save_prefix"
18664
18665 if test "X$x" = "X-L$found_dir"; then
18666 haveit=yes
18667 break
18668 fi
18669 done
18670 if test -z "$haveit"; then
18671 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18672 fi
18673 if test "$hardcode_minus_L" != no; then
18674 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18675 else
18676 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18677 fi
18678 fi
18679 fi
18680 fi
18681 else
18682 if test "X$found_a" != "X"; then
18683 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18684 else
18685 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18686 fi
18687 fi
18688 additional_includedir=
18689 case "$found_dir" in
18690 */lib | */lib/)
18691 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18692 additional_includedir="$basedir/include"
18693 ;;
18694 esac
18695 if test "X$additional_includedir" != "X"; then
18696 if test "X$additional_includedir" != "X/usr/include"; then
18697 haveit=
18698 if test "X$additional_includedir" = "X/usr/local/include"; then
18699 if test -n "$GCC"; then
18700 case $host_os in
18701 linux*) haveit=yes;;
18702 esac
18703 fi
18704 fi
18705 if test -z "$haveit"; then
18706 for x in $CPPFLAGS $INCXXHASH; do
18707
18708 acl_save_prefix="$prefix"
18709 prefix="$acl_final_prefix"
18710 acl_save_exec_prefix="$exec_prefix"
18711 exec_prefix="$acl_final_exec_prefix"
18712 eval x=\"$x\"
18713 exec_prefix="$acl_save_exec_prefix"
18714 prefix="$acl_save_prefix"
18715
18716 if test "X$x" = "X-I$additional_includedir"; then
18717 haveit=yes
18718 break
18719 fi
18720 done
18721 if test -z "$haveit"; then
18722 if test -d "$additional_includedir"; then
18723 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18724 fi
18725 fi
18726 fi
18727 fi
18728 fi
18729 if test -n "$found_la"; then
18730 save_libdir="$libdir"
18731 case "$found_la" in
18732 */* | *\\*) . "$found_la" ;;
18733 *) . "./$found_la" ;;
18734 esac
18735 libdir="$save_libdir"
18736 for dep in $dependency_libs; do
18737 case "$dep" in
18738 -L*)
18739 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18740 if test "X$additional_libdir" != "X/usr/lib"; then
18741 haveit=
18742 if test "X$additional_libdir" = "X/usr/local/lib"; then
18743 if test -n "$GCC"; then
18744 case $host_os in
18745 linux*) haveit=yes;;
18746 esac
18747 fi
18748 fi
18749 if test -z "$haveit"; then
18750 haveit=
18751 for x in $LDFLAGS $LIBXXHASH; do
18752
18753 acl_save_prefix="$prefix"
18754 prefix="$acl_final_prefix"
18755 acl_save_exec_prefix="$exec_prefix"
18756 exec_prefix="$acl_final_exec_prefix"
18757 eval x=\"$x\"
18758 exec_prefix="$acl_save_exec_prefix"
18759 prefix="$acl_save_prefix"
18760
18761 if test "X$x" = "X-L$additional_libdir"; then
18762 haveit=yes
18763 break
18764 fi
18765 done
18766 if test -z "$haveit"; then
18767 if test -d "$additional_libdir"; then
18768 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18769 fi
18770 fi
18771 haveit=
18772 for x in $LDFLAGS $LTLIBXXHASH; do
18773
18774 acl_save_prefix="$prefix"
18775 prefix="$acl_final_prefix"
18776 acl_save_exec_prefix="$exec_prefix"
18777 exec_prefix="$acl_final_exec_prefix"
18778 eval x=\"$x\"
18779 exec_prefix="$acl_save_exec_prefix"
18780 prefix="$acl_save_prefix"
18781
18782 if test "X$x" = "X-L$additional_libdir"; then
18783 haveit=yes
18784 break
18785 fi
18786 done
18787 if test -z "$haveit"; then
18788 if test -d "$additional_libdir"; then
18789 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18790 fi
18791 fi
18792 fi
18793 fi
18794 ;;
18795 -R*)
18796 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18797 if test "$enable_rpath" != no; then
18798 haveit=
18799 for x in $rpathdirs; do
18800 if test "X$x" = "X$dir"; then
18801 haveit=yes
18802 break
18803 fi
18804 done
18805 if test -z "$haveit"; then
18806 rpathdirs="$rpathdirs $dir"
18807 fi
18808 haveit=
18809 for x in $ltrpathdirs; do
18810 if test "X$x" = "X$dir"; then
18811 haveit=yes
18812 break
18813 fi
18814 done
18815 if test -z "$haveit"; then
18816 ltrpathdirs="$ltrpathdirs $dir"
18817 fi
18818 fi
18819 ;;
18820 -l*)
18821 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18822 ;;
18823 *.la)
18824 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18825 ;;
18826 *)
18827 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18828 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18829 ;;
18830 esac
18831 done
18832 fi
18833 else
18834 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
18835 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18836 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18837 else
18838 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
18839 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
18840 fi
18841 fi
18842 fi
18843 fi
18844 done
18845 done
18846 if test "X$rpathdirs" != "X"; then
18847 if test -n "$hardcode_libdir_separator"; then
18848 alldirs=
18849 for found_dir in $rpathdirs; do
18850 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18851 done
18852 acl_save_libdir="$libdir"
18853 libdir="$alldirs"
18854 eval flag=\"$hardcode_libdir_flag_spec\"
18855 libdir="$acl_save_libdir"
18856 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18857 else
18858 for found_dir in $rpathdirs; do
18859 acl_save_libdir="$libdir"
18860 libdir="$found_dir"
18861 eval flag=\"$hardcode_libdir_flag_spec\"
18862 libdir="$acl_save_libdir"
18863 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18864 done
18865 fi
18866 fi
18867 if test "X$ltrpathdirs" != "X"; then
18868 for found_dir in $ltrpathdirs; do
18869 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
18870 done
18871 fi
18872
18873
18874 ac_save_CPPFLAGS="$CPPFLAGS"
18875
18876 for element in $INCXXHASH; do
18877 haveit=
18878 for x in $CPPFLAGS; do
18879
18880 acl_save_prefix="$prefix"
18881 prefix="$acl_final_prefix"
18882 acl_save_exec_prefix="$exec_prefix"
18883 exec_prefix="$acl_final_exec_prefix"
18884 eval x=\"$x\"
18885 exec_prefix="$acl_save_exec_prefix"
18886 prefix="$acl_save_prefix"
18887
18888 if test "X$x" = "X$element"; then
18889 haveit=yes
18890 break
18891 fi
18892 done
18893 if test -z "$haveit"; then
18894 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18895 fi
18896 done
18897
18898
18899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
18900 $as_echo_n "checking for libxxhash... " >&6; }
18901 if ${ac_cv_libxxhash+:} false; then :
18902 $as_echo_n "(cached) " >&6
18903 else
18904
18905 ac_save_LIBS="$LIBS"
18906 LIBS="$LIBS $LIBXXHASH"
18907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18908 /* end confdefs.h. */
18909 #include <xxhash.h>
18910 int
18911 main ()
18912 {
18913 XXH32("foo", 3, 0);
18914
18915 ;
18916 return 0;
18917 }
18918 _ACEOF
18919 if ac_fn_c_try_link "$LINENO"; then :
18920 ac_cv_libxxhash=yes
18921 else
18922 ac_cv_libxxhash=no
18923 fi
18924 rm -f core conftest.err conftest.$ac_objext \
18925 conftest$ac_exeext conftest.$ac_ext
18926 LIBS="$ac_save_LIBS"
18927
18928 fi
18929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18930 $as_echo "$ac_cv_libxxhash" >&6; }
18931 if test "$ac_cv_libxxhash" = yes; then
18932 HAVE_LIBXXHASH=yes
18933
18934 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18935
18936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18937 $as_echo_n "checking how to link with libxxhash... " >&6; }
18938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18939 $as_echo "$LIBXXHASH" >&6; }
18940 else
18941 HAVE_LIBXXHASH=no
18942 CPPFLAGS="$ac_save_CPPFLAGS"
18943 LIBXXHASH=
18944 LTLIBXXHASH=
18945 fi
18946
18947
18948
18949
18950
18951
18952 if test "$HAVE_LIBXXHASH" != yes; then
18953 if test "$with_xxhash" = yes; then
18954 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18955 fi
18956 fi
18957 if test "x$with_xxhash" = "xauto"; then
18958 with_xxhash="$HAVE_LIBXXHASH"
18959 fi
18960 fi
18961
18962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18963 $as_echo_n "checking whether to use xxhash... " >&6; }
18964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18965 $as_echo "$with_xxhash" >&6; }
18966
18967 NM_H=
18968 rm -f nm.h
18969 if test "${nativefile}" != ""; then
18970 case "${nativefile}" in
18971 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18972 * ) GDB_NM_FILE="${nativefile}"
18973 esac
18974 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18975
18976
18977 cat >>confdefs.h <<_ACEOF
18978 #define GDB_NM_FILE "${GDB_NM_FILE}"
18979 _ACEOF
18980
18981 NM_H=nm.h
18982 fi
18983
18984
18985
18986 for ac_prog in xsltproc
18987 do
18988 # Extract the first word of "$ac_prog", so it can be a program name with args.
18989 set dummy $ac_prog; ac_word=$2
18990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18991 $as_echo_n "checking for $ac_word... " >&6; }
18992 if ${ac_cv_path_XSLTPROC+:} false; then :
18993 $as_echo_n "(cached) " >&6
18994 else
18995 case $XSLTPROC in
18996 [\\/]* | ?:[\\/]*)
18997 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18998 ;;
18999 *)
19000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19001 for as_dir in $PATH
19002 do
19003 IFS=$as_save_IFS
19004 test -z "$as_dir" && as_dir=.
19005 for ac_exec_ext in '' $ac_executable_extensions; do
19006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19007 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19009 break 2
19010 fi
19011 done
19012 done
19013 IFS=$as_save_IFS
19014
19015 ;;
19016 esac
19017 fi
19018 XSLTPROC=$ac_cv_path_XSLTPROC
19019 if test -n "$XSLTPROC"; then
19020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19021 $as_echo "$XSLTPROC" >&6; }
19022 else
19023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19024 $as_echo "no" >&6; }
19025 fi
19026
19027
19028 test -n "$XSLTPROC" && break
19029 done
19030 test -n "$XSLTPROC" || XSLTPROC="missing"
19031
19032 if test "x$USE_MAINTAINER_MODE" = xyes; then
19033 if test "${XSLTPROC}" = missing; then
19034 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19035 fi
19036 fi
19037
19038
19039
19040
19041
19042 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19043
19044
19045
19046 # Check whether we will enable the inclusion of unit tests when
19047 # compiling GDB.
19048 #
19049 # The default value of this option changes depending whether we're on
19050 # development mode (in which case it's "true") or not (in which case
19051 # it's "false").
19052 # Check whether --enable-unit-tests was given.
19053 if test "${enable_unit_tests+set}" = set; then :
19054 enableval=$enable_unit_tests; case "${enableval}" in
19055 yes) enable_unittests=true ;;
19056 no) enable_unittests=false ;;
19057 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19058 esac
19059 else
19060 enable_unittests=$development
19061 fi
19062
19063
19064 if $enable_unittests; then
19065
19066 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19067
19068
19069 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o"
19070 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c"
19071
19072 fi
19073
19074
19075
19076 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19077 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19078 if test "x$GDB_TRANSFORM_NAME" = x; then
19079 GDB_TRANSFORM_NAME=gdb
19080 fi
19081
19082
19083
19084 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19085 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19086 if test "x$GCORE_TRANSFORM_NAME" = x; then
19087 GCORE_TRANSFORM_NAME=gcore
19088 fi
19089
19090
19091 ac_config_files="$ac_config_files gcore"
19092
19093 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19094
19095
19096 cat >confcache <<\_ACEOF
19097 # This file is a shell script that caches the results of configure
19098 # tests run on this system so they can be shared between configure
19099 # scripts and configure runs, see configure's option --config-cache.
19100 # It is not useful on other systems. If it contains results you don't
19101 # want to keep, you may remove or edit it.
19102 #
19103 # config.status only pays attention to the cache file if you give it
19104 # the --recheck option to rerun configure.
19105 #
19106 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19107 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19108 # following values.
19109
19110 _ACEOF
19111
19112 # The following way of writing the cache mishandles newlines in values,
19113 # but we know of no workaround that is simple, portable, and efficient.
19114 # So, we kill variables containing newlines.
19115 # Ultrix sh set writes to stderr and can't be redirected directly,
19116 # and sets the high bit in the cache file unless we assign to the vars.
19117 (
19118 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19119 eval ac_val=\$$ac_var
19120 case $ac_val in #(
19121 *${as_nl}*)
19122 case $ac_var in #(
19123 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19124 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19125 esac
19126 case $ac_var in #(
19127 _ | IFS | as_nl) ;; #(
19128 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19129 *) { eval $ac_var=; unset $ac_var;} ;;
19130 esac ;;
19131 esac
19132 done
19133
19134 (set) 2>&1 |
19135 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19136 *${as_nl}ac_space=\ *)
19137 # `set' does not quote correctly, so add quotes: double-quote
19138 # substitution turns \\\\ into \\, and sed turns \\ into \.
19139 sed -n \
19140 "s/'/'\\\\''/g;
19141 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19142 ;; #(
19143 *)
19144 # `set' quotes correctly as required by POSIX, so do not add quotes.
19145 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19146 ;;
19147 esac |
19148 sort
19149 ) |
19150 sed '
19151 /^ac_cv_env_/b end
19152 t clear
19153 :clear
19154 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19155 t end
19156 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19157 :end' >>confcache
19158 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19159 if test -w "$cache_file"; then
19160 if test "x$cache_file" != "x/dev/null"; then
19161 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19162 $as_echo "$as_me: updating cache $cache_file" >&6;}
19163 if test ! -f "$cache_file" || test -h "$cache_file"; then
19164 cat confcache >"$cache_file"
19165 else
19166 case $cache_file in #(
19167 */* | ?:*)
19168 mv -f confcache "$cache_file"$$ &&
19169 mv -f "$cache_file"$$ "$cache_file" ;; #(
19170 *)
19171 mv -f confcache "$cache_file" ;;
19172 esac
19173 fi
19174 fi
19175 else
19176 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19177 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19178 fi
19179 fi
19180 rm -f confcache
19181
19182 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19183 # Let make expand exec_prefix.
19184 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19185
19186 DEFS=-DHAVE_CONFIG_H
19187
19188 ac_libobjs=
19189 ac_ltlibobjs=
19190 U=
19191 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19192 # 1. Remove the extension, and $U if already installed.
19193 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19194 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19195 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19196 # will be set to the directory where LIBOBJS objects are built.
19197 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19198 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19199 done
19200 LIBOBJS=$ac_libobjs
19201
19202 LTLIBOBJS=$ac_ltlibobjs
19203
19204
19205 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19206 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19207 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19208 fi
19209 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19210 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19211 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19212 fi
19213 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19214 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19215 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19216 fi
19217
19218
19219 : "${CONFIG_STATUS=./config.status}"
19220 ac_write_fail=0
19221 ac_clean_files_save=$ac_clean_files
19222 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19223 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19224 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19225 as_write_fail=0
19226 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19227 #! $SHELL
19228 # Generated by $as_me.
19229 # Run this file to recreate the current configuration.
19230 # Compiler output produced by configure, useful for debugging
19231 # configure, is in config.log if it exists.
19232
19233 debug=false
19234 ac_cs_recheck=false
19235 ac_cs_silent=false
19236
19237 SHELL=\${CONFIG_SHELL-$SHELL}
19238 export SHELL
19239 _ASEOF
19240 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19241 ## -------------------- ##
19242 ## M4sh Initialization. ##
19243 ## -------------------- ##
19244
19245 # Be more Bourne compatible
19246 DUALCASE=1; export DUALCASE # for MKS sh
19247 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19248 emulate sh
19249 NULLCMD=:
19250 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19251 # is contrary to our usage. Disable this feature.
19252 alias -g '${1+"$@"}'='"$@"'
19253 setopt NO_GLOB_SUBST
19254 else
19255 case `(set -o) 2>/dev/null` in #(
19256 *posix*) :
19257 set -o posix ;; #(
19258 *) :
19259 ;;
19260 esac
19261 fi
19262
19263
19264 as_nl='
19265 '
19266 export as_nl
19267 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19268 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19269 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19270 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19271 # Prefer a ksh shell builtin over an external printf program on Solaris,
19272 # but without wasting forks for bash or zsh.
19273 if test -z "$BASH_VERSION$ZSH_VERSION" \
19274 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19275 as_echo='print -r --'
19276 as_echo_n='print -rn --'
19277 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19278 as_echo='printf %s\n'
19279 as_echo_n='printf %s'
19280 else
19281 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19282 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19283 as_echo_n='/usr/ucb/echo -n'
19284 else
19285 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19286 as_echo_n_body='eval
19287 arg=$1;
19288 case $arg in #(
19289 *"$as_nl"*)
19290 expr "X$arg" : "X\\(.*\\)$as_nl";
19291 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19292 esac;
19293 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19294 '
19295 export as_echo_n_body
19296 as_echo_n='sh -c $as_echo_n_body as_echo'
19297 fi
19298 export as_echo_body
19299 as_echo='sh -c $as_echo_body as_echo'
19300 fi
19301
19302 # The user is always right.
19303 if test "${PATH_SEPARATOR+set}" != set; then
19304 PATH_SEPARATOR=:
19305 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19306 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19307 PATH_SEPARATOR=';'
19308 }
19309 fi
19310
19311
19312 # IFS
19313 # We need space, tab and new line, in precisely that order. Quoting is
19314 # there to prevent editors from complaining about space-tab.
19315 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19316 # splitting by setting IFS to empty value.)
19317 IFS=" "" $as_nl"
19318
19319 # Find who we are. Look in the path if we contain no directory separator.
19320 as_myself=
19321 case $0 in #((
19322 *[\\/]* ) as_myself=$0 ;;
19323 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19324 for as_dir in $PATH
19325 do
19326 IFS=$as_save_IFS
19327 test -z "$as_dir" && as_dir=.
19328 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19329 done
19330 IFS=$as_save_IFS
19331
19332 ;;
19333 esac
19334 # We did not find ourselves, most probably we were run as `sh COMMAND'
19335 # in which case we are not to be found in the path.
19336 if test "x$as_myself" = x; then
19337 as_myself=$0
19338 fi
19339 if test ! -f "$as_myself"; then
19340 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19341 exit 1
19342 fi
19343
19344 # Unset variables that we do not need and which cause bugs (e.g. in
19345 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19346 # suppresses any "Segmentation fault" message there. '((' could
19347 # trigger a bug in pdksh 5.2.14.
19348 for as_var in BASH_ENV ENV MAIL MAILPATH
19349 do eval test x\${$as_var+set} = xset \
19350 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19351 done
19352 PS1='$ '
19353 PS2='> '
19354 PS4='+ '
19355
19356 # NLS nuisances.
19357 LC_ALL=C
19358 export LC_ALL
19359 LANGUAGE=C
19360 export LANGUAGE
19361
19362 # CDPATH.
19363 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19364
19365
19366 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19367 # ----------------------------------------
19368 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19369 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19370 # script with STATUS, using 1 if that was 0.
19371 as_fn_error ()
19372 {
19373 as_status=$1; test $as_status -eq 0 && as_status=1
19374 if test "$4"; then
19375 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19376 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19377 fi
19378 $as_echo "$as_me: error: $2" >&2
19379 as_fn_exit $as_status
19380 } # as_fn_error
19381
19382
19383 # as_fn_set_status STATUS
19384 # -----------------------
19385 # Set $? to STATUS, without forking.
19386 as_fn_set_status ()
19387 {
19388 return $1
19389 } # as_fn_set_status
19390
19391 # as_fn_exit STATUS
19392 # -----------------
19393 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19394 as_fn_exit ()
19395 {
19396 set +e
19397 as_fn_set_status $1
19398 exit $1
19399 } # as_fn_exit
19400
19401 # as_fn_unset VAR
19402 # ---------------
19403 # Portably unset VAR.
19404 as_fn_unset ()
19405 {
19406 { eval $1=; unset $1;}
19407 }
19408 as_unset=as_fn_unset
19409 # as_fn_append VAR VALUE
19410 # ----------------------
19411 # Append the text in VALUE to the end of the definition contained in VAR. Take
19412 # advantage of any shell optimizations that allow amortized linear growth over
19413 # repeated appends, instead of the typical quadratic growth present in naive
19414 # implementations.
19415 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19416 eval 'as_fn_append ()
19417 {
19418 eval $1+=\$2
19419 }'
19420 else
19421 as_fn_append ()
19422 {
19423 eval $1=\$$1\$2
19424 }
19425 fi # as_fn_append
19426
19427 # as_fn_arith ARG...
19428 # ------------------
19429 # Perform arithmetic evaluation on the ARGs, and store the result in the
19430 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19431 # must be portable across $(()) and expr.
19432 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19433 eval 'as_fn_arith ()
19434 {
19435 as_val=$(( $* ))
19436 }'
19437 else
19438 as_fn_arith ()
19439 {
19440 as_val=`expr "$@" || test $? -eq 1`
19441 }
19442 fi # as_fn_arith
19443
19444
19445 if expr a : '\(a\)' >/dev/null 2>&1 &&
19446 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19447 as_expr=expr
19448 else
19449 as_expr=false
19450 fi
19451
19452 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19453 as_basename=basename
19454 else
19455 as_basename=false
19456 fi
19457
19458 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19459 as_dirname=dirname
19460 else
19461 as_dirname=false
19462 fi
19463
19464 as_me=`$as_basename -- "$0" ||
19465 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19466 X"$0" : 'X\(//\)$' \| \
19467 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19468 $as_echo X/"$0" |
19469 sed '/^.*\/\([^/][^/]*\)\/*$/{
19470 s//\1/
19471 q
19472 }
19473 /^X\/\(\/\/\)$/{
19474 s//\1/
19475 q
19476 }
19477 /^X\/\(\/\).*/{
19478 s//\1/
19479 q
19480 }
19481 s/.*/./; q'`
19482
19483 # Avoid depending upon Character Ranges.
19484 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19485 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19486 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19487 as_cr_digits='0123456789'
19488 as_cr_alnum=$as_cr_Letters$as_cr_digits
19489
19490 ECHO_C= ECHO_N= ECHO_T=
19491 case `echo -n x` in #(((((
19492 -n*)
19493 case `echo 'xy\c'` in
19494 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19495 xy) ECHO_C='\c';;
19496 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19497 ECHO_T=' ';;
19498 esac;;
19499 *)
19500 ECHO_N='-n';;
19501 esac
19502
19503 rm -f conf$$ conf$$.exe conf$$.file
19504 if test -d conf$$.dir; then
19505 rm -f conf$$.dir/conf$$.file
19506 else
19507 rm -f conf$$.dir
19508 mkdir conf$$.dir 2>/dev/null
19509 fi
19510 if (echo >conf$$.file) 2>/dev/null; then
19511 if ln -s conf$$.file conf$$ 2>/dev/null; then
19512 as_ln_s='ln -s'
19513 # ... but there are two gotchas:
19514 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19515 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19516 # In both cases, we have to default to `cp -pR'.
19517 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19518 as_ln_s='cp -pR'
19519 elif ln conf$$.file conf$$ 2>/dev/null; then
19520 as_ln_s=ln
19521 else
19522 as_ln_s='cp -pR'
19523 fi
19524 else
19525 as_ln_s='cp -pR'
19526 fi
19527 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19528 rmdir conf$$.dir 2>/dev/null
19529
19530
19531 # as_fn_mkdir_p
19532 # -------------
19533 # Create "$as_dir" as a directory, including parents if necessary.
19534 as_fn_mkdir_p ()
19535 {
19536
19537 case $as_dir in #(
19538 -*) as_dir=./$as_dir;;
19539 esac
19540 test -d "$as_dir" || eval $as_mkdir_p || {
19541 as_dirs=
19542 while :; do
19543 case $as_dir in #(
19544 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19545 *) as_qdir=$as_dir;;
19546 esac
19547 as_dirs="'$as_qdir' $as_dirs"
19548 as_dir=`$as_dirname -- "$as_dir" ||
19549 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19550 X"$as_dir" : 'X\(//\)[^/]' \| \
19551 X"$as_dir" : 'X\(//\)$' \| \
19552 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19553 $as_echo X"$as_dir" |
19554 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19555 s//\1/
19556 q
19557 }
19558 /^X\(\/\/\)[^/].*/{
19559 s//\1/
19560 q
19561 }
19562 /^X\(\/\/\)$/{
19563 s//\1/
19564 q
19565 }
19566 /^X\(\/\).*/{
19567 s//\1/
19568 q
19569 }
19570 s/.*/./; q'`
19571 test -d "$as_dir" && break
19572 done
19573 test -z "$as_dirs" || eval "mkdir $as_dirs"
19574 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19575
19576
19577 } # as_fn_mkdir_p
19578 if mkdir -p . 2>/dev/null; then
19579 as_mkdir_p='mkdir -p "$as_dir"'
19580 else
19581 test -d ./-p && rmdir ./-p
19582 as_mkdir_p=false
19583 fi
19584
19585
19586 # as_fn_executable_p FILE
19587 # -----------------------
19588 # Test if FILE is an executable regular file.
19589 as_fn_executable_p ()
19590 {
19591 test -f "$1" && test -x "$1"
19592 } # as_fn_executable_p
19593 as_test_x='test -x'
19594 as_executable_p=as_fn_executable_p
19595
19596 # Sed expression to map a string onto a valid CPP name.
19597 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19598
19599 # Sed expression to map a string onto a valid variable name.
19600 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19601
19602
19603 exec 6>&1
19604 ## ----------------------------------- ##
19605 ## Main body of $CONFIG_STATUS script. ##
19606 ## ----------------------------------- ##
19607 _ASEOF
19608 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19609
19610 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19611 # Save the log message, to keep $0 and so on meaningful, and to
19612 # report actual input values of CONFIG_FILES etc. instead of their
19613 # values after options handling.
19614 ac_log="
19615 This file was extended by $as_me, which was
19616 generated by GNU Autoconf 2.69. Invocation command line was
19617
19618 CONFIG_FILES = $CONFIG_FILES
19619 CONFIG_HEADERS = $CONFIG_HEADERS
19620 CONFIG_LINKS = $CONFIG_LINKS
19621 CONFIG_COMMANDS = $CONFIG_COMMANDS
19622 $ $0 $@
19623
19624 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19625 "
19626
19627 _ACEOF
19628
19629 case $ac_config_files in *"
19630 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19631 esac
19632
19633 case $ac_config_headers in *"
19634 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19635 esac
19636
19637
19638 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19639 # Files that config.status was made for.
19640 config_files="$ac_config_files"
19641 config_headers="$ac_config_headers"
19642 config_links="$ac_config_links"
19643 config_commands="$ac_config_commands"
19644
19645 _ACEOF
19646
19647 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19648 ac_cs_usage="\
19649 \`$as_me' instantiates files and other configuration actions
19650 from templates according to the current configuration. Unless the files
19651 and actions are specified as TAGs, all are instantiated by default.
19652
19653 Usage: $0 [OPTION]... [TAG]...
19654
19655 -h, --help print this help, then exit
19656 -V, --version print version number and configuration settings, then exit
19657 --config print configuration, then exit
19658 -q, --quiet, --silent
19659 do not print progress messages
19660 -d, --debug don't remove temporary files
19661 --recheck update $as_me by reconfiguring in the same conditions
19662 --file=FILE[:TEMPLATE]
19663 instantiate the configuration file FILE
19664 --header=FILE[:TEMPLATE]
19665 instantiate the configuration header FILE
19666
19667 Configuration files:
19668 $config_files
19669
19670 Configuration headers:
19671 $config_headers
19672
19673 Configuration links:
19674 $config_links
19675
19676 Configuration commands:
19677 $config_commands
19678
19679 Report bugs to the package provider."
19680
19681 _ACEOF
19682 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19683 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19684 ac_cs_version="\\
19685 config.status
19686 configured by $0, generated by GNU Autoconf 2.69,
19687 with options \\"\$ac_cs_config\\"
19688
19689 Copyright (C) 2012 Free Software Foundation, Inc.
19690 This config.status script is free software; the Free Software Foundation
19691 gives unlimited permission to copy, distribute and modify it."
19692
19693 ac_pwd='$ac_pwd'
19694 srcdir='$srcdir'
19695 INSTALL='$INSTALL'
19696 AWK='$AWK'
19697 test -n "\$AWK" || AWK=awk
19698 _ACEOF
19699
19700 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19701 # The default lists apply if the user does not specify any file.
19702 ac_need_defaults=:
19703 while test $# != 0
19704 do
19705 case $1 in
19706 --*=?*)
19707 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19708 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19709 ac_shift=:
19710 ;;
19711 --*=)
19712 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19713 ac_optarg=
19714 ac_shift=:
19715 ;;
19716 *)
19717 ac_option=$1
19718 ac_optarg=$2
19719 ac_shift=shift
19720 ;;
19721 esac
19722
19723 case $ac_option in
19724 # Handling of the options.
19725 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19726 ac_cs_recheck=: ;;
19727 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19728 $as_echo "$ac_cs_version"; exit ;;
19729 --config | --confi | --conf | --con | --co | --c )
19730 $as_echo "$ac_cs_config"; exit ;;
19731 --debug | --debu | --deb | --de | --d | -d )
19732 debug=: ;;
19733 --file | --fil | --fi | --f )
19734 $ac_shift
19735 case $ac_optarg in
19736 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19737 '') as_fn_error $? "missing file argument" ;;
19738 esac
19739 as_fn_append CONFIG_FILES " '$ac_optarg'"
19740 ac_need_defaults=false;;
19741 --header | --heade | --head | --hea )
19742 $ac_shift
19743 case $ac_optarg in
19744 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19745 esac
19746 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19747 ac_need_defaults=false;;
19748 --he | --h)
19749 # Conflict between --help and --header
19750 as_fn_error $? "ambiguous option: \`$1'
19751 Try \`$0 --help' for more information.";;
19752 --help | --hel | -h )
19753 $as_echo "$ac_cs_usage"; exit ;;
19754 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19755 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19756 ac_cs_silent=: ;;
19757
19758 # This is an error.
19759 -*) as_fn_error $? "unrecognized option: \`$1'
19760 Try \`$0 --help' for more information." ;;
19761
19762 *) as_fn_append ac_config_targets " $1"
19763 ac_need_defaults=false ;;
19764
19765 esac
19766 shift
19767 done
19768
19769 ac_configure_extra_args=
19770
19771 if $ac_cs_silent; then
19772 exec 6>/dev/null
19773 ac_configure_extra_args="$ac_configure_extra_args --silent"
19774 fi
19775
19776 _ACEOF
19777 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19778 if \$ac_cs_recheck; then
19779 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19780 shift
19781 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19782 CONFIG_SHELL='$SHELL'
19783 export CONFIG_SHELL
19784 exec "\$@"
19785 fi
19786
19787 _ACEOF
19788 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19789 exec 5>>config.log
19790 {
19791 echo
19792 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19793 ## Running $as_me. ##
19794 _ASBOX
19795 $as_echo "$ac_log"
19796 } >&5
19797
19798 _ACEOF
19799 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19800 #
19801 # INIT-COMMANDS
19802 #
19803 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
19804 GDB_NM_FILE=$GDB_NM_FILE
19805
19806 _ACEOF
19807
19808 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19809
19810 # Handling of arguments.
19811 for ac_config_target in $ac_config_targets
19812 do
19813 case $ac_config_target in
19814 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19815 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
19816 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
19817 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
19818 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
19819 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19820 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
19821 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
19822 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
19823 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
19824
19825 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19826 esac
19827 done
19828
19829
19830 # If the user did not use the arguments to specify the items to instantiate,
19831 # then the envvar interface is used. Set only those that are not.
19832 # We use the long form for the default assignment because of an extremely
19833 # bizarre bug on SunOS 4.1.3.
19834 if $ac_need_defaults; then
19835 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19836 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19837 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19838 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19839 fi
19840
19841 # Have a temporary directory for convenience. Make it in the build tree
19842 # simply because there is no reason against having it here, and in addition,
19843 # creating and moving files from /tmp can sometimes cause problems.
19844 # Hook for its removal unless debugging.
19845 # Note that there is a small window in which the directory will not be cleaned:
19846 # after its creation but before its name has been assigned to `$tmp'.
19847 $debug ||
19848 {
19849 tmp= ac_tmp=
19850 trap 'exit_status=$?
19851 : "${ac_tmp:=$tmp}"
19852 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19853 ' 0
19854 trap 'as_fn_exit 1' 1 2 13 15
19855 }
19856 # Create a (secure) tmp directory for tmp files.
19857
19858 {
19859 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19860 test -d "$tmp"
19861 } ||
19862 {
19863 tmp=./conf$$-$RANDOM
19864 (umask 077 && mkdir "$tmp")
19865 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19866 ac_tmp=$tmp
19867
19868 # Set up the scripts for CONFIG_FILES section.
19869 # No need to generate them if there are no CONFIG_FILES.
19870 # This happens for instance with `./config.status config.h'.
19871 if test -n "$CONFIG_FILES"; then
19872
19873 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19874 ac_cs_awk_getline=:
19875 ac_cs_awk_pipe_init=
19876 ac_cs_awk_read_file='
19877 while ((getline aline < (F[key])) > 0)
19878 print(aline)
19879 close(F[key])'
19880 ac_cs_awk_pipe_fini=
19881 else
19882 ac_cs_awk_getline=false
19883 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19884 ac_cs_awk_read_file='
19885 print "|#_!!_#|"
19886 print "cat " F[key] " &&"
19887 '$ac_cs_awk_pipe_init
19888 # The final `:' finishes the AND list.
19889 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19890 fi
19891 ac_cr=`echo X | tr X '\015'`
19892 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19893 # But we know of no other shell where ac_cr would be empty at this
19894 # point, so we can use a bashism as a fallback.
19895 if test "x$ac_cr" = x; then
19896 eval ac_cr=\$\'\\r\'
19897 fi
19898 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19899 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19900 ac_cs_awk_cr='\\r'
19901 else
19902 ac_cs_awk_cr=$ac_cr
19903 fi
19904
19905 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19906 _ACEOF
19907
19908 # Create commands to substitute file output variables.
19909 {
19910 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
19911 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
19912 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19913 echo "_ACAWK" &&
19914 echo "_ACEOF"
19915 } >conf$$files.sh &&
19916 . ./conf$$files.sh ||
19917 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19918 rm -f conf$$files.sh
19919
19920 {
19921 echo "cat >conf$$subs.awk <<_ACEOF" &&
19922 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19923 echo "_ACEOF"
19924 } >conf$$subs.sh ||
19925 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19926 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19927 ac_delim='%!_!# '
19928 for ac_last_try in false false false false false :; do
19929 . ./conf$$subs.sh ||
19930 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19931
19932 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19933 if test $ac_delim_n = $ac_delim_num; then
19934 break
19935 elif $ac_last_try; then
19936 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19937 else
19938 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19939 fi
19940 done
19941 rm -f conf$$subs.sh
19942
19943 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19944 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19945 _ACEOF
19946 sed -n '
19947 h
19948 s/^/S["/; s/!.*/"]=/
19949 p
19950 g
19951 s/^[^!]*!//
19952 :repl
19953 t repl
19954 s/'"$ac_delim"'$//
19955 t delim
19956 :nl
19957 h
19958 s/\(.\{148\}\)..*/\1/
19959 t more1
19960 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19961 p
19962 n
19963 b repl
19964 :more1
19965 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19966 p
19967 g
19968 s/.\{148\}//
19969 t nl
19970 :delim
19971 h
19972 s/\(.\{148\}\)..*/\1/
19973 t more2
19974 s/["\\]/\\&/g; s/^/"/; s/$/"/
19975 p
19976 b
19977 :more2
19978 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19979 p
19980 g
19981 s/.\{148\}//
19982 t delim
19983 ' <conf$$subs.awk | sed '
19984 /^[^""]/{
19985 N
19986 s/\n//
19987 }
19988 ' >>$CONFIG_STATUS || ac_write_fail=1
19989 rm -f conf$$subs.awk
19990 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19991 _ACAWK
19992 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19993 for (key in S) S_is_set[key] = 1
19994 FS = "\a"
19995 \$ac_cs_awk_pipe_init
19996 }
19997 {
19998 line = $ 0
19999 nfields = split(line, field, "@")
20000 substed = 0
20001 len = length(field[1])
20002 for (i = 2; i < nfields; i++) {
20003 key = field[i]
20004 keylen = length(key)
20005 if (S_is_set[key]) {
20006 value = S[key]
20007 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20008 len += length(value) + length(field[++i])
20009 substed = 1
20010 } else
20011 len += 1 + keylen
20012 }
20013 if (nfields == 3 && !substed) {
20014 key = field[2]
20015 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20016 \$ac_cs_awk_read_file
20017 next
20018 }
20019 }
20020 print line
20021 }
20022 \$ac_cs_awk_pipe_fini
20023 _ACAWK
20024 _ACEOF
20025 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20026 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20027 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20028 else
20029 cat
20030 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20031 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20032 _ACEOF
20033
20034 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20035 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20036 # trailing colons and then remove the whole line if VPATH becomes empty
20037 # (actually we leave an empty line to preserve line numbers).
20038 if test "x$srcdir" = x.; then
20039 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20040 h
20041 s///
20042 s/^/:/
20043 s/[ ]*$/:/
20044 s/:\$(srcdir):/:/g
20045 s/:\${srcdir}:/:/g
20046 s/:@srcdir@:/:/g
20047 s/^:*//
20048 s/:*$//
20049 x
20050 s/\(=[ ]*\).*/\1/
20051 G
20052 s/\n//
20053 s/^[^=]*=[ ]*$//
20054 }'
20055 fi
20056
20057 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20058 fi # test -n "$CONFIG_FILES"
20059
20060 # Set up the scripts for CONFIG_HEADERS section.
20061 # No need to generate them if there are no CONFIG_HEADERS.
20062 # This happens for instance with `./config.status Makefile'.
20063 if test -n "$CONFIG_HEADERS"; then
20064 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20065 BEGIN {
20066 _ACEOF
20067
20068 # Transform confdefs.h into an awk script `defines.awk', embedded as
20069 # here-document in config.status, that substitutes the proper values into
20070 # config.h.in to produce config.h.
20071
20072 # Create a delimiter string that does not exist in confdefs.h, to ease
20073 # handling of long lines.
20074 ac_delim='%!_!# '
20075 for ac_last_try in false false :; do
20076 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20077 if test -z "$ac_tt"; then
20078 break
20079 elif $ac_last_try; then
20080 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20081 else
20082 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20083 fi
20084 done
20085
20086 # For the awk script, D is an array of macro values keyed by name,
20087 # likewise P contains macro parameters if any. Preserve backslash
20088 # newline sequences.
20089
20090 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20091 sed -n '
20092 s/.\{148\}/&'"$ac_delim"'/g
20093 t rset
20094 :rset
20095 s/^[ ]*#[ ]*define[ ][ ]*/ /
20096 t def
20097 d
20098 :def
20099 s/\\$//
20100 t bsnl
20101 s/["\\]/\\&/g
20102 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20103 D["\1"]=" \3"/p
20104 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20105 d
20106 :bsnl
20107 s/["\\]/\\&/g
20108 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20109 D["\1"]=" \3\\\\\\n"\\/p
20110 t cont
20111 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20112 t cont
20113 d
20114 :cont
20115 n
20116 s/.\{148\}/&'"$ac_delim"'/g
20117 t clear
20118 :clear
20119 s/\\$//
20120 t bsnlc
20121 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20122 d
20123 :bsnlc
20124 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20125 b cont
20126 ' <confdefs.h | sed '
20127 s/'"$ac_delim"'/"\\\
20128 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20129
20130 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20131 for (key in D) D_is_set[key] = 1
20132 FS = "\a"
20133 }
20134 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20135 line = \$ 0
20136 split(line, arg, " ")
20137 if (arg[1] == "#") {
20138 defundef = arg[2]
20139 mac1 = arg[3]
20140 } else {
20141 defundef = substr(arg[1], 2)
20142 mac1 = arg[2]
20143 }
20144 split(mac1, mac2, "(") #)
20145 macro = mac2[1]
20146 prefix = substr(line, 1, index(line, defundef) - 1)
20147 if (D_is_set[macro]) {
20148 # Preserve the white space surrounding the "#".
20149 print prefix "define", macro P[macro] D[macro]
20150 next
20151 } else {
20152 # Replace #undef with comments. This is necessary, for example,
20153 # in the case of _POSIX_SOURCE, which is predefined and required
20154 # on some systems where configure will not decide to define it.
20155 if (defundef == "undef") {
20156 print "/*", prefix defundef, macro, "*/"
20157 next
20158 }
20159 }
20160 }
20161 { print }
20162 _ACAWK
20163 _ACEOF
20164 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20165 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20166 fi # test -n "$CONFIG_HEADERS"
20167
20168
20169 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20170 shift
20171 for ac_tag
20172 do
20173 case $ac_tag in
20174 :[FHLC]) ac_mode=$ac_tag; continue;;
20175 esac
20176 case $ac_mode$ac_tag in
20177 :[FHL]*:*);;
20178 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20179 :[FH]-) ac_tag=-:-;;
20180 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20181 esac
20182 ac_save_IFS=$IFS
20183 IFS=:
20184 set x $ac_tag
20185 IFS=$ac_save_IFS
20186 shift
20187 ac_file=$1
20188 shift
20189
20190 case $ac_mode in
20191 :L) ac_source=$1;;
20192 :[FH])
20193 ac_file_inputs=
20194 for ac_f
20195 do
20196 case $ac_f in
20197 -) ac_f="$ac_tmp/stdin";;
20198 *) # Look for the file first in the build tree, then in the source tree
20199 # (if the path is not absolute). The absolute path cannot be DOS-style,
20200 # because $ac_f cannot contain `:'.
20201 test -f "$ac_f" ||
20202 case $ac_f in
20203 [\\/$]*) false;;
20204 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20205 esac ||
20206 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20207 esac
20208 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20209 as_fn_append ac_file_inputs " '$ac_f'"
20210 done
20211
20212 # Let's still pretend it is `configure' which instantiates (i.e., don't
20213 # use $as_me), people would be surprised to read:
20214 # /* config.h. Generated by config.status. */
20215 configure_input='Generated from '`
20216 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20217 `' by configure.'
20218 if test x"$ac_file" != x-; then
20219 configure_input="$ac_file. $configure_input"
20220 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20221 $as_echo "$as_me: creating $ac_file" >&6;}
20222 fi
20223 # Neutralize special characters interpreted by sed in replacement strings.
20224 case $configure_input in #(
20225 *\&* | *\|* | *\\* )
20226 ac_sed_conf_input=`$as_echo "$configure_input" |
20227 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20228 *) ac_sed_conf_input=$configure_input;;
20229 esac
20230
20231 case $ac_tag in
20232 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20233 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20234 esac
20235 ;;
20236 esac
20237
20238 ac_dir=`$as_dirname -- "$ac_file" ||
20239 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20240 X"$ac_file" : 'X\(//\)[^/]' \| \
20241 X"$ac_file" : 'X\(//\)$' \| \
20242 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20243 $as_echo X"$ac_file" |
20244 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20245 s//\1/
20246 q
20247 }
20248 /^X\(\/\/\)[^/].*/{
20249 s//\1/
20250 q
20251 }
20252 /^X\(\/\/\)$/{
20253 s//\1/
20254 q
20255 }
20256 /^X\(\/\).*/{
20257 s//\1/
20258 q
20259 }
20260 s/.*/./; q'`
20261 as_dir="$ac_dir"; as_fn_mkdir_p
20262 ac_builddir=.
20263
20264 case "$ac_dir" in
20265 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20266 *)
20267 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20268 # A ".." for each directory in $ac_dir_suffix.
20269 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20270 case $ac_top_builddir_sub in
20271 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20272 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20273 esac ;;
20274 esac
20275 ac_abs_top_builddir=$ac_pwd
20276 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20277 # for backward compatibility:
20278 ac_top_builddir=$ac_top_build_prefix
20279
20280 case $srcdir in
20281 .) # We are building in place.
20282 ac_srcdir=.
20283 ac_top_srcdir=$ac_top_builddir_sub
20284 ac_abs_top_srcdir=$ac_pwd ;;
20285 [\\/]* | ?:[\\/]* ) # Absolute name.
20286 ac_srcdir=$srcdir$ac_dir_suffix;
20287 ac_top_srcdir=$srcdir
20288 ac_abs_top_srcdir=$srcdir ;;
20289 *) # Relative name.
20290 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20291 ac_top_srcdir=$ac_top_build_prefix$srcdir
20292 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20293 esac
20294 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20295
20296
20297 case $ac_mode in
20298 :F)
20299 #
20300 # CONFIG_FILE
20301 #
20302
20303 case $INSTALL in
20304 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20305 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20306 esac
20307 _ACEOF
20308
20309 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20310 # If the template does not know about datarootdir, expand it.
20311 # FIXME: This hack should be removed a few years after 2.60.
20312 ac_datarootdir_hack=; ac_datarootdir_seen=
20313 ac_sed_dataroot='
20314 /datarootdir/ {
20315 p
20316 q
20317 }
20318 /@datadir@/p
20319 /@docdir@/p
20320 /@infodir@/p
20321 /@localedir@/p
20322 /@mandir@/p'
20323 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20324 *datarootdir*) ac_datarootdir_seen=yes;;
20325 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20326 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20327 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20328 _ACEOF
20329 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20330 ac_datarootdir_hack='
20331 s&@datadir@&$datadir&g
20332 s&@docdir@&$docdir&g
20333 s&@infodir@&$infodir&g
20334 s&@localedir@&$localedir&g
20335 s&@mandir@&$mandir&g
20336 s&\\\${datarootdir}&$datarootdir&g' ;;
20337 esac
20338 _ACEOF
20339
20340 # Neutralize VPATH when `$srcdir' = `.'.
20341 # Shell code in configure.ac might set extrasub.
20342 # FIXME: do we really want to maintain this feature?
20343 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20344 ac_sed_extra="$ac_vpsub
20345 $extrasub
20346 _ACEOF
20347 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20348 :t
20349 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20350 s|@configure_input@|$ac_sed_conf_input|;t t
20351 s&@top_builddir@&$ac_top_builddir_sub&;t t
20352 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20353 s&@srcdir@&$ac_srcdir&;t t
20354 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20355 s&@top_srcdir@&$ac_top_srcdir&;t t
20356 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20357 s&@builddir@&$ac_builddir&;t t
20358 s&@abs_builddir@&$ac_abs_builddir&;t t
20359 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20360 s&@INSTALL@&$ac_INSTALL&;t t
20361 $ac_datarootdir_hack
20362 "
20363 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20364 if $ac_cs_awk_getline; then
20365 $AWK -f "$ac_tmp/subs.awk"
20366 else
20367 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20368 fi \
20369 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20370
20371 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20372 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20373 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20374 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20375 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20376 which seems to be undefined. Please make sure it is defined" >&5
20377 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20378 which seems to be undefined. Please make sure it is defined" >&2;}
20379
20380 rm -f "$ac_tmp/stdin"
20381 case $ac_file in
20382 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20383 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20384 esac \
20385 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20386 ;;
20387 :H)
20388 #
20389 # CONFIG_HEADER
20390 #
20391 if test x"$ac_file" != x-; then
20392 {
20393 $as_echo "/* $configure_input */" \
20394 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20395 } >"$ac_tmp/config.h" \
20396 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20397 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20398 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20399 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20400 else
20401 rm -f "$ac_file"
20402 mv "$ac_tmp/config.h" "$ac_file" \
20403 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20404 fi
20405 else
20406 $as_echo "/* $configure_input */" \
20407 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20408 || as_fn_error $? "could not create -" "$LINENO" 5
20409 fi
20410 ;;
20411 :L)
20412 #
20413 # CONFIG_LINK
20414 #
20415
20416 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20417 :
20418 else
20419 # Prefer the file from the source tree if names are identical.
20420 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20421 ac_source=$srcdir/$ac_source
20422 fi
20423
20424 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20425 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20426
20427 if test ! -r "$ac_source"; then
20428 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20429 fi
20430 rm -f "$ac_file"
20431
20432 # Try a relative symlink, then a hard link, then a copy.
20433 case $ac_source in
20434 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20435 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20436 esac
20437 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20438 ln "$ac_source" "$ac_file" 2>/dev/null ||
20439 cp -p "$ac_source" "$ac_file" ||
20440 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20441 fi
20442 ;;
20443 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20444 $as_echo "$as_me: executing $ac_file commands" >&6;}
20445 ;;
20446 esac
20447
20448
20449 case $ac_file$ac_mode in
20450 "config.h":H) echo > stamp-h ;;
20451 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
20452 "nm.h":L) echo > stamp-nmh ;;
20453 "gcore":F) chmod +x gcore ;;
20454
20455 esac
20456 done # for ac_tag
20457
20458
20459 as_fn_exit 0
20460 _ACEOF
20461 ac_clean_files=$ac_clean_files_save
20462
20463 test $ac_write_fail = 0 ||
20464 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20465
20466
20467 # configure is writing to config.log, and then calls config.status.
20468 # config.status does its own redirection, appending to config.log.
20469 # Unfortunately, on DOS this fails, as config.log is still kept open
20470 # by configure, so config.status won't be able to write to it; its
20471 # output is simply discarded. So we exec the FD to /dev/null,
20472 # effectively closing config.log, so it can be properly (re)opened and
20473 # appended to by config.status. When coming back to configure, we
20474 # need to make the FD available again.
20475 if test "$no_create" != yes; then
20476 ac_cs_success=:
20477 ac_config_status_args=
20478 test "$silent" = yes &&
20479 ac_config_status_args="$ac_config_status_args --quiet"
20480 exec 5>/dev/null
20481 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20482 exec 5>>config.log
20483 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20484 # would make configure fail if this is the last instruction.
20485 $ac_cs_success || as_fn_exit 1
20486 fi
20487
20488 #
20489 # CONFIG_SUBDIRS section.
20490 #
20491 if test "$no_recursion" != yes; then
20492
20493 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20494 # so they do not pile up.
20495 ac_sub_configure_args=
20496 ac_prev=
20497 eval "set x $ac_configure_args"
20498 shift
20499 for ac_arg
20500 do
20501 if test -n "$ac_prev"; then
20502 ac_prev=
20503 continue
20504 fi
20505 case $ac_arg in
20506 -cache-file | --cache-file | --cache-fil | --cache-fi \
20507 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20508 ac_prev=cache_file ;;
20509 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20510 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20511 | --c=*)
20512 ;;
20513 --config-cache | -C)
20514 ;;
20515 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20516 ac_prev=srcdir ;;
20517 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20518 ;;
20519 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20520 ac_prev=prefix ;;
20521 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20522 ;;
20523 --disable-option-checking)
20524 ;;
20525 *)
20526 case $ac_arg in
20527 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20528 esac
20529 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
20530 esac
20531 done
20532
20533 # Always prepend --prefix to ensure using the same prefix
20534 # in subdir configurations.
20535 ac_arg="--prefix=$prefix"
20536 case $ac_arg in
20537 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20538 esac
20539 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20540
20541 # Pass --silent
20542 if test "$silent" = yes; then
20543 ac_sub_configure_args="--silent $ac_sub_configure_args"
20544 fi
20545
20546 # Always prepend --disable-option-checking to silence warnings, since
20547 # different subdirs can have different --enable and --with options.
20548 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20549
20550 ac_popdir=`pwd`
20551 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20552
20553 # Do not complain, so a configure script can configure whichever
20554 # parts of a large source tree are present.
20555 test -d "$srcdir/$ac_dir" || continue
20556
20557 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20558 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20559 $as_echo "$ac_msg" >&6
20560 as_dir="$ac_dir"; as_fn_mkdir_p
20561 ac_builddir=.
20562
20563 case "$ac_dir" in
20564 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20565 *)
20566 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20567 # A ".." for each directory in $ac_dir_suffix.
20568 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20569 case $ac_top_builddir_sub in
20570 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20571 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20572 esac ;;
20573 esac
20574 ac_abs_top_builddir=$ac_pwd
20575 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20576 # for backward compatibility:
20577 ac_top_builddir=$ac_top_build_prefix
20578
20579 case $srcdir in
20580 .) # We are building in place.
20581 ac_srcdir=.
20582 ac_top_srcdir=$ac_top_builddir_sub
20583 ac_abs_top_srcdir=$ac_pwd ;;
20584 [\\/]* | ?:[\\/]* ) # Absolute name.
20585 ac_srcdir=$srcdir$ac_dir_suffix;
20586 ac_top_srcdir=$srcdir
20587 ac_abs_top_srcdir=$srcdir ;;
20588 *) # Relative name.
20589 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20590 ac_top_srcdir=$ac_top_build_prefix$srcdir
20591 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20592 esac
20593 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20594
20595
20596 cd "$ac_dir"
20597
20598 # Check for guested configure; otherwise get Cygnus style configure.
20599 if test -f "$ac_srcdir/configure.gnu"; then
20600 ac_sub_configure=$ac_srcdir/configure.gnu
20601 elif test -f "$ac_srcdir/configure"; then
20602 ac_sub_configure=$ac_srcdir/configure
20603 elif test -f "$ac_srcdir/configure.in"; then
20604 # This should be Cygnus configure.
20605 ac_sub_configure=$ac_aux_dir/configure
20606 else
20607 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20608 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20609 ac_sub_configure=
20610 fi
20611
20612 # The recursion is here.
20613 if test -n "$ac_sub_configure"; then
20614 # Make the cache file name correct relative to the subdirectory.
20615 case $cache_file in
20616 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20617 *) # Relative name.
20618 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20619 esac
20620
20621 { $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
20622 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20623 # The eval makes quoting arguments work.
20624 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20625 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20626 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
20627 fi
20628
20629 cd "$ac_popdir"
20630 done
20631 fi
20632 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20634 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20635 fi
20636