Automatic date update in version.in
[binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
4 #
5 #
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7 #
8 #
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
14
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
30 esac
31 fi
32
33
34 as_nl='
35 '
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70 fi
71
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
79 fi
80
81
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
88
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
95 do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
101
102 ;;
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
108 fi
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
112 fi
113
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
125
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
131
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174 esac
175 fi
176 "
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
182
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190 else
191 exitcode=1; echo positional parameters were not saved.
192 fi
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202 else
203 as_have_required=no
204 fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207 else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209 as_found=false
210 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225 fi
226 fi
227 done;;
228 esac
229 as_found=false
230 done
231 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234 fi; }
235 IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
244 BASH_ENV=/dev/null
245 ENV=/dev/null
246 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252 esac
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257 exit 255
258 fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
271 fi
272 exit 1
273 fi
274 fi
275 fi
276 SHELL=${CONFIG_SHELL-/bin/sh}
277 export SHELL
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE= GREP_OPTIONS=
280 unset CLICOLOR_FORCE GREP_OPTIONS
281
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
289 {
290 { eval $1=; unset $1;}
291 }
292 as_unset=as_fn_unset
293
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
298 {
299 return $1
300 } # as_fn_set_status
301
302 # as_fn_exit STATUS
303 # -----------------
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305 as_fn_exit ()
306 {
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
311
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
316 {
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358 } # as_fn_mkdir_p
359
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
364 {
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
372 # implementations.
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378 else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383 fi # as_fn_append
384
385 # as_fn_arith ARG...
386 # ------------------
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395 else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400 fi # as_fn_arith
401
402
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
408 as_fn_error ()
409 {
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
418
419 if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422 else
423 as_expr=false
424 fi
425
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
430 fi
431
432 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434 else
435 as_dirname=false
436 fi
437
438 as_me=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442 $as_echo X/"$0" |
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
457 # Avoid depending upon Character Ranges.
458 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits='0123456789'
462 as_cr_alnum=$as_cr_Letters$as_cr_digits
463
464
465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498 }
499
500 ECHO_C= ECHO_N= ECHO_T=
501 case `echo -n x` in #(((((
502 -n*)
503 case `echo 'xy\c'` in
504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
508 esac;;
509 *)
510 ECHO_N='-n';;
511 esac
512
513 rm -f conf$$ conf$$.exe conf$$.file
514 if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516 else
517 rm -f conf$$.dir
518 mkdir conf$$.dir 2>/dev/null
519 fi
520 if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
534 else
535 as_ln_s='cp -pR'
536 fi
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
539
540 if mkdir -p . 2>/dev/null; then
541 as_mkdir_p='mkdir -p "$as_dir"'
542 else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545 fi
546
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
549
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
559
560 # Name of the host.
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565 #
566 # Initializations.
567 #
568 ac_default_prefix=/usr/local
569 ac_clean_files=
570 ac_config_libobj_dir=.
571 LIBOBJS=
572 cross_compiling=no
573 subdirs=
574 MFLAGS=
575 MAKEFLAGS=
576
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
584
585 ac_unique_file="main.c"
586 # Factoring default headers for most tests.
587 ac_includes_default="\
588 #include <stdio.h>
589 #ifdef HAVE_SYS_TYPES_H
590 # include <sys/types.h>
591 #endif
592 #ifdef HAVE_SYS_STAT_H
593 # include <sys/stat.h>
594 #endif
595 #ifdef STDC_HEADERS
596 # include <stdlib.h>
597 # include <stddef.h>
598 #else
599 # ifdef HAVE_STDLIB_H
600 # include <stdlib.h>
601 # endif
602 #endif
603 #ifdef HAVE_STRING_H
604 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605 # include <memory.h>
606 # endif
607 # include <string.h>
608 #endif
609 #ifdef HAVE_STRINGS_H
610 # include <strings.h>
611 #endif
612 #ifdef HAVE_INTTYPES_H
613 # include <inttypes.h>
614 #endif
615 #ifdef HAVE_STDINT_H
616 # include <stdint.h>
617 #endif
618 #ifdef HAVE_UNISTD_H
619 # include <unistd.h>
620 #endif"
621
622 enable_option_checking=no
623 ac_header_list=
624 ac_subst_vars='LTLIBOBJS
625 LIBOBJS
626 GCORE_TRANSFORM_NAME
627 GDB_TRANSFORM_NAME
628 XSLTPROC
629 NM_H
630 GDB_NM_FILE
631 LTLIBXXHASH
632 LIBXXHASH
633 HAVE_LIBXXHASH
634 CTF_DEPS
635 LIBCTF
636 LTLIBBABELTRACE
637 LIBBABELTRACE
638 HAVE_LIBBABELTRACE
639 LIBBACKTRACE_LIB
640 LIBBACKTRACE_INC
641 HAVE_NATIVE_GCORE_HOST
642 NAT_GENERATED_FILES
643 XM_CLIBS
644 MH_CFLAGS
645 LOADLIBES
646 NAT_CDEPS
647 NATDEPFILES
648 NAT_FILE
649 target_subdir
650 CONFIG_UNINSTALL
651 CONFIG_INSTALL
652 CONFIG_CLEAN
653 CONFIG_ALL
654 CONFIG_SRCS
655 CONFIG_DEPS
656 CONFIG_OBS
657 PROFILE_CFLAGS
658 ENABLE_CFLAGS
659 SIM_OBS
660 SIM
661 XMKMF
662 GDBTK_SRC_DIR
663 GDBTK_CFLAGS
664 GDBTKLIBS
665 X_LIBS
666 X_LDFLAGS
667 X_CFLAGS
668 TK_XINCLUDES
669 TK_DEPS
670 TK_LIBRARY
671 TK_INCLUDE
672 TK_STUB_LIB_SPEC
673 TK_STUB_LIB_FLAG
674 TK_STUB_LIB_FILE
675 TK_LIB_SPEC
676 TK_LIB_FLAG
677 TK_LIB_FILE
678 TK_SRC_DIR
679 TK_BIN_DIR
680 TK_VERSION
681 TCL_DEPS
682 TCL_LIBRARY
683 TCL_INCLUDE
684 TCL_STUB_LIB_SPEC
685 TCL_STUB_LIB_FLAG
686 TCL_STUB_LIB_FILE
687 TCL_LIB_SPEC
688 TCL_LIB_FLAG
689 TCL_LIB_FILE
690 TCL_SRC_DIR
691 TCL_BIN_DIR
692 TCL_PATCH_LEVEL
693 TCL_VERSION
694 WIN32LDAPP
695 WIN32LIBS
696 GUI_CFLAGS_X
697 LIBGUI
698 LTLIBLZMA
699 LIBLZMA
700 HAVE_LIBLZMA
701 SER_HARDWIRE
702 WERROR_CFLAGS
703 WARN_CFLAGS
704 SYSTEM_GDBINIT_DIR
705 SYSTEM_GDBINIT
706 TARGET_SYSTEM_ROOT
707 CONFIG_LDFLAGS
708 RDYNAMIC
709 LTLIBIPT
710 LIBIPT
711 HAVE_LIBIPT
712 PTHREAD_CFLAGS
713 PTHREAD_LIBS
714 PTHREAD_CC
715 ax_pthread_config
716 SED
717 ALLOCA
718 SRCHIGH_CFLAGS
719 SRCHIGH_LIBS
720 HAVE_GUILE_FALSE
721 HAVE_GUILE_TRUE
722 GUILE_LIBS
723 GUILE_CPPFLAGS
724 GUILD_TARGET_FLAG
725 GUILD
726 pkg_config_prog_path
727 HAVE_PYTHON_FALSE
728 HAVE_PYTHON_TRUE
729 PYTHON_LIBS
730 PYTHON_CPPFLAGS
731 PYTHON_CFLAGS
732 python_prog_path
733 LTLIBMPFR
734 LIBMPFR
735 HAVE_LIBMPFR
736 LTLIBGMP
737 LIBGMP
738 HAVE_LIBGMP
739 LTLIBEXPAT
740 LIBEXPAT
741 HAVE_LIBEXPAT
742 JIT_READER_DIR
743 TARGET_PTR
744 READLINE_TEXI_INCFLAG
745 READLINE_CFLAGS
746 READLINE_DEPS
747 READLINE
748 LTLIBICONV
749 LIBICONV
750 zlibinc
751 zlibdir
752 MIG
753 WINDRES
754 DLLTOOL
755 AR
756 YFLAGS
757 YACC
758 RANLIB
759 LN_S
760 INSTALL_DATA
761 INSTALL_SCRIPT
762 INSTALL_PROGRAM
763 AWK
764 REPORT_BUGS_TEXI
765 REPORT_BUGS_TO
766 PKGVERSION
767 CODESIGN_CERT
768 DEBUGINFOD_LIBS
769 DEBUGINFOD_CFLAGS
770 PKG_CONFIG_LIBDIR
771 PKG_CONFIG_PATH
772 PKG_CONFIG
773 HAVE_NATIVE_GCORE_TARGET
774 TARGET_OBS
775 subdirs
776 GDB_DATADIR
777 DEBUGDIR
778 MAKEINFO_EXTRA_FLAGS
779 MAKEINFOFLAGS
780 MAKEINFO
781 PACKAGE
782 CATOBJEXT
783 GENCAT
784 INSTOBJEXT
785 DATADIRNAME
786 CATALOGS
787 POSUB
788 GMSGFMT
789 XGETTEXT
790 INCINTL
791 LIBINTL_DEP
792 LIBINTL
793 USE_NLS
794 CCDEPMODE
795 DEPDIR
796 am__leading_dot
797 CXX_DIALECT
798 HAVE_CXX11
799 target_noncanonical
800 INSTALL_STRIP_PROGRAM
801 STRIP
802 install_sh
803 LARGEFILE_CPPFLAGS
804 target_os
805 target_vendor
806 target_cpu
807 target
808 host_os
809 host_vendor
810 host_cpu
811 host
812 build_os
813 build_vendor
814 build_cpu
815 build
816 EGREP
817 GREP
818 CPP
819 ac_ct_CXX
820 CXXFLAGS
821 CXX
822 OBJEXT
823 EXEEXT
824 ac_ct_CC
825 CPPFLAGS
826 LDFLAGS
827 CFLAGS
828 CC
829 MAINT
830 MAINTAINER_MODE_FALSE
831 MAINTAINER_MODE_TRUE
832 target_alias
833 host_alias
834 build_alias
835 LIBS
836 ECHO_T
837 ECHO_N
838 ECHO_C
839 DEFS
840 mandir
841 localedir
842 libdir
843 psdir
844 pdfdir
845 dvidir
846 htmldir
847 infodir
848 docdir
849 oldincludedir
850 includedir
851 localstatedir
852 sharedstatedir
853 sysconfdir
854 datadir
855 datarootdir
856 libexecdir
857 sbindir
858 bindir
859 program_transform_name
860 prefix
861 exec_prefix
862 PACKAGE_URL
863 PACKAGE_BUGREPORT
864 PACKAGE_STRING
865 PACKAGE_VERSION
866 PACKAGE_TARNAME
867 PACKAGE_NAME
868 PATH_SEPARATOR
869 SHELL'
870 ac_subst_files='nat_makefile_frag'
871 ac_user_opts='
872 enable_option_checking
873 enable_maintainer_mode
874 enable_plugins
875 enable_largefile
876 with_separate_debug_dir
877 with_gdb_datadir
878 with_relocated_sources
879 with_auto_load_dir
880 with_auto_load_safe_path
881 enable_targets
882 enable_64_bit_bfd
883 enable_gdbmi
884 enable_tui
885 enable_gdbtk
886 with_debuginfod
887 with_libunwind_ia64
888 with_curses
889 enable_profiling
890 enable_codesign
891 with_pkgversion
892 with_bugurl
893 with_system_zlib
894 with_gnu_ld
895 enable_rpath
896 with_libiconv_prefix
897 with_libiconv_type
898 with_iconv_bin
899 with_system_readline
900 with_jit_reader_dir
901 with_expat
902 with_libexpat_prefix
903 with_libexpat_type
904 with_libgmp_prefix
905 with_libgmp_type
906 with_mpfr
907 with_libmpfr_prefix
908 with_libmpfr_type
909 with_python
910 with_python_libdir
911 with_guile
912 enable_source_highlight
913 enable_threading
914 with_intel_pt
915 with_libipt_prefix
916 with_libipt_type
917 with_sysroot
918 with_system_gdbinit
919 with_system_gdbinit_dir
920 enable_werror
921 enable_build_warnings
922 enable_gdb_build_warnings
923 enable_ubsan
924 with_lzma
925 with_liblzma_prefix
926 with_liblzma_type
927 with_tcl
928 with_tk
929 with_x
930 enable_sim
931 enable_libbacktrace
932 with_babeltrace
933 with_libbabeltrace_prefix
934 with_libbabeltrace_type
935 with_xxhash
936 enable_libctf
937 with_libxxhash_prefix
938 with_libxxhash_type
939 enable_unit_tests
940 '
941 ac_precious_vars='build_alias
942 host_alias
943 target_alias
944 CC
945 CFLAGS
946 LDFLAGS
947 LIBS
948 CPPFLAGS
949 CXX
950 CXXFLAGS
951 CCC
952 CPP
953 MAKEINFO
954 MAKEINFOFLAGS
955 PKG_CONFIG
956 PKG_CONFIG_PATH
957 PKG_CONFIG_LIBDIR
958 DEBUGINFOD_CFLAGS
959 DEBUGINFOD_LIBS
960 YACC
961 YFLAGS
962 XMKMF'
963 ac_subdirs_all='testsuite
964 gdbtk'
965
966 # Initialize some variables set by options.
967 ac_init_help=
968 ac_init_version=false
969 ac_unrecognized_opts=
970 ac_unrecognized_sep=
971 # The variables have the same names as the options, with
972 # dashes changed to underlines.
973 cache_file=/dev/null
974 exec_prefix=NONE
975 no_create=
976 no_recursion=
977 prefix=NONE
978 program_prefix=NONE
979 program_suffix=NONE
980 program_transform_name=s,x,x,
981 silent=
982 site=
983 srcdir=
984 verbose=
985 x_includes=NONE
986 x_libraries=NONE
987
988 # Installation directory options.
989 # These are left unexpanded so users can "make install exec_prefix=/foo"
990 # and all the variables that are supposed to be based on exec_prefix
991 # by default will actually change.
992 # Use braces instead of parens because sh, perl, etc. also accept them.
993 # (The list follows the same order as the GNU Coding Standards.)
994 bindir='${exec_prefix}/bin'
995 sbindir='${exec_prefix}/sbin'
996 libexecdir='${exec_prefix}/libexec'
997 datarootdir='${prefix}/share'
998 datadir='${datarootdir}'
999 sysconfdir='${prefix}/etc'
1000 sharedstatedir='${prefix}/com'
1001 localstatedir='${prefix}/var'
1002 includedir='${prefix}/include'
1003 oldincludedir='/usr/include'
1004 docdir='${datarootdir}/doc/${PACKAGE}'
1005 infodir='${datarootdir}/info'
1006 htmldir='${docdir}'
1007 dvidir='${docdir}'
1008 pdfdir='${docdir}'
1009 psdir='${docdir}'
1010 libdir='${exec_prefix}/lib'
1011 localedir='${datarootdir}/locale'
1012 mandir='${datarootdir}/man'
1013
1014 ac_prev=
1015 ac_dashdash=
1016 for ac_option
1017 do
1018 # If the previous option needs an argument, assign it.
1019 if test -n "$ac_prev"; then
1020 eval $ac_prev=\$ac_option
1021 ac_prev=
1022 continue
1023 fi
1024
1025 case $ac_option in
1026 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1027 *=) ac_optarg= ;;
1028 *) ac_optarg=yes ;;
1029 esac
1030
1031 # Accept the important Cygnus configure options, so we can diagnose typos.
1032
1033 case $ac_dashdash$ac_option in
1034 --)
1035 ac_dashdash=yes ;;
1036
1037 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1038 ac_prev=bindir ;;
1039 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1040 bindir=$ac_optarg ;;
1041
1042 -build | --build | --buil | --bui | --bu)
1043 ac_prev=build_alias ;;
1044 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1045 build_alias=$ac_optarg ;;
1046
1047 -cache-file | --cache-file | --cache-fil | --cache-fi \
1048 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1049 ac_prev=cache_file ;;
1050 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1051 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1052 cache_file=$ac_optarg ;;
1053
1054 --config-cache | -C)
1055 cache_file=config.cache ;;
1056
1057 -datadir | --datadir | --datadi | --datad)
1058 ac_prev=datadir ;;
1059 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1060 datadir=$ac_optarg ;;
1061
1062 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1063 | --dataroo | --dataro | --datar)
1064 ac_prev=datarootdir ;;
1065 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1066 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1067 datarootdir=$ac_optarg ;;
1068
1069 -disable-* | --disable-*)
1070 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1071 # Reject names that are not valid shell variable names.
1072 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1073 as_fn_error $? "invalid feature name: $ac_useropt"
1074 ac_useropt_orig=$ac_useropt
1075 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1076 case $ac_user_opts in
1077 *"
1078 "enable_$ac_useropt"
1079 "*) ;;
1080 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1081 ac_unrecognized_sep=', ';;
1082 esac
1083 eval enable_$ac_useropt=no ;;
1084
1085 -docdir | --docdir | --docdi | --doc | --do)
1086 ac_prev=docdir ;;
1087 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1088 docdir=$ac_optarg ;;
1089
1090 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1091 ac_prev=dvidir ;;
1092 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1093 dvidir=$ac_optarg ;;
1094
1095 -enable-* | --enable-*)
1096 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1097 # Reject names that are not valid shell variable names.
1098 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1099 as_fn_error $? "invalid feature name: $ac_useropt"
1100 ac_useropt_orig=$ac_useropt
1101 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1102 case $ac_user_opts in
1103 *"
1104 "enable_$ac_useropt"
1105 "*) ;;
1106 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1107 ac_unrecognized_sep=', ';;
1108 esac
1109 eval enable_$ac_useropt=\$ac_optarg ;;
1110
1111 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1112 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1113 | --exec | --exe | --ex)
1114 ac_prev=exec_prefix ;;
1115 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1116 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1117 | --exec=* | --exe=* | --ex=*)
1118 exec_prefix=$ac_optarg ;;
1119
1120 -gas | --gas | --ga | --g)
1121 # Obsolete; use --with-gas.
1122 with_gas=yes ;;
1123
1124 -help | --help | --hel | --he | -h)
1125 ac_init_help=long ;;
1126 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1127 ac_init_help=recursive ;;
1128 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1129 ac_init_help=short ;;
1130
1131 -host | --host | --hos | --ho)
1132 ac_prev=host_alias ;;
1133 -host=* | --host=* | --hos=* | --ho=*)
1134 host_alias=$ac_optarg ;;
1135
1136 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1137 ac_prev=htmldir ;;
1138 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1139 | --ht=*)
1140 htmldir=$ac_optarg ;;
1141
1142 -includedir | --includedir | --includedi | --included | --include \
1143 | --includ | --inclu | --incl | --inc)
1144 ac_prev=includedir ;;
1145 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1146 | --includ=* | --inclu=* | --incl=* | --inc=*)
1147 includedir=$ac_optarg ;;
1148
1149 -infodir | --infodir | --infodi | --infod | --info | --inf)
1150 ac_prev=infodir ;;
1151 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1152 infodir=$ac_optarg ;;
1153
1154 -libdir | --libdir | --libdi | --libd)
1155 ac_prev=libdir ;;
1156 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1157 libdir=$ac_optarg ;;
1158
1159 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1160 | --libexe | --libex | --libe)
1161 ac_prev=libexecdir ;;
1162 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1163 | --libexe=* | --libex=* | --libe=*)
1164 libexecdir=$ac_optarg ;;
1165
1166 -localedir | --localedir | --localedi | --localed | --locale)
1167 ac_prev=localedir ;;
1168 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1169 localedir=$ac_optarg ;;
1170
1171 -localstatedir | --localstatedir | --localstatedi | --localstated \
1172 | --localstate | --localstat | --localsta | --localst | --locals)
1173 ac_prev=localstatedir ;;
1174 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1175 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1176 localstatedir=$ac_optarg ;;
1177
1178 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1179 ac_prev=mandir ;;
1180 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1181 mandir=$ac_optarg ;;
1182
1183 -nfp | --nfp | --nf)
1184 # Obsolete; use --without-fp.
1185 with_fp=no ;;
1186
1187 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1188 | --no-cr | --no-c | -n)
1189 no_create=yes ;;
1190
1191 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1192 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1193 no_recursion=yes ;;
1194
1195 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1196 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1197 | --oldin | --oldi | --old | --ol | --o)
1198 ac_prev=oldincludedir ;;
1199 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1200 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1201 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1202 oldincludedir=$ac_optarg ;;
1203
1204 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1205 ac_prev=prefix ;;
1206 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1207 prefix=$ac_optarg ;;
1208
1209 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1210 | --program-pre | --program-pr | --program-p)
1211 ac_prev=program_prefix ;;
1212 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1213 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1214 program_prefix=$ac_optarg ;;
1215
1216 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1217 | --program-suf | --program-su | --program-s)
1218 ac_prev=program_suffix ;;
1219 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1220 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1221 program_suffix=$ac_optarg ;;
1222
1223 -program-transform-name | --program-transform-name \
1224 | --program-transform-nam | --program-transform-na \
1225 | --program-transform-n | --program-transform- \
1226 | --program-transform | --program-transfor \
1227 | --program-transfo | --program-transf \
1228 | --program-trans | --program-tran \
1229 | --progr-tra | --program-tr | --program-t)
1230 ac_prev=program_transform_name ;;
1231 -program-transform-name=* | --program-transform-name=* \
1232 | --program-transform-nam=* | --program-transform-na=* \
1233 | --program-transform-n=* | --program-transform-=* \
1234 | --program-transform=* | --program-transfor=* \
1235 | --program-transfo=* | --program-transf=* \
1236 | --program-trans=* | --program-tran=* \
1237 | --progr-tra=* | --program-tr=* | --program-t=*)
1238 program_transform_name=$ac_optarg ;;
1239
1240 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1241 ac_prev=pdfdir ;;
1242 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1243 pdfdir=$ac_optarg ;;
1244
1245 -psdir | --psdir | --psdi | --psd | --ps)
1246 ac_prev=psdir ;;
1247 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1248 psdir=$ac_optarg ;;
1249
1250 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1251 | -silent | --silent | --silen | --sile | --sil)
1252 silent=yes ;;
1253
1254 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1255 ac_prev=sbindir ;;
1256 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1257 | --sbi=* | --sb=*)
1258 sbindir=$ac_optarg ;;
1259
1260 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1261 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1262 | --sharedst | --shareds | --shared | --share | --shar \
1263 | --sha | --sh)
1264 ac_prev=sharedstatedir ;;
1265 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1266 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1267 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1268 | --sha=* | --sh=*)
1269 sharedstatedir=$ac_optarg ;;
1270
1271 -site | --site | --sit)
1272 ac_prev=site ;;
1273 -site=* | --site=* | --sit=*)
1274 site=$ac_optarg ;;
1275
1276 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1277 ac_prev=srcdir ;;
1278 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1279 srcdir=$ac_optarg ;;
1280
1281 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1282 | --syscon | --sysco | --sysc | --sys | --sy)
1283 ac_prev=sysconfdir ;;
1284 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1285 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1286 sysconfdir=$ac_optarg ;;
1287
1288 -target | --target | --targe | --targ | --tar | --ta | --t)
1289 ac_prev=target_alias ;;
1290 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1291 target_alias=$ac_optarg ;;
1292
1293 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1294 verbose=yes ;;
1295
1296 -version | --version | --versio | --versi | --vers | -V)
1297 ac_init_version=: ;;
1298
1299 -with-* | --with-*)
1300 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1301 # Reject names that are not valid shell variable names.
1302 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1303 as_fn_error $? "invalid package name: $ac_useropt"
1304 ac_useropt_orig=$ac_useropt
1305 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1306 case $ac_user_opts in
1307 *"
1308 "with_$ac_useropt"
1309 "*) ;;
1310 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1311 ac_unrecognized_sep=', ';;
1312 esac
1313 eval with_$ac_useropt=\$ac_optarg ;;
1314
1315 -without-* | --without-*)
1316 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1317 # Reject names that are not valid shell variable names.
1318 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1319 as_fn_error $? "invalid package name: $ac_useropt"
1320 ac_useropt_orig=$ac_useropt
1321 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1322 case $ac_user_opts in
1323 *"
1324 "with_$ac_useropt"
1325 "*) ;;
1326 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1327 ac_unrecognized_sep=', ';;
1328 esac
1329 eval with_$ac_useropt=no ;;
1330
1331 --x)
1332 # Obsolete; use --with-x.
1333 with_x=yes ;;
1334
1335 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1336 | --x-incl | --x-inc | --x-in | --x-i)
1337 ac_prev=x_includes ;;
1338 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1339 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1340 x_includes=$ac_optarg ;;
1341
1342 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1343 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1344 ac_prev=x_libraries ;;
1345 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1346 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1347 x_libraries=$ac_optarg ;;
1348
1349 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1350 Try \`$0 --help' for more information"
1351 ;;
1352
1353 *=*)
1354 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1355 # Reject names that are not valid shell variable names.
1356 case $ac_envvar in #(
1357 '' | [0-9]* | *[!_$as_cr_alnum]* )
1358 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1359 esac
1360 eval $ac_envvar=\$ac_optarg
1361 export $ac_envvar ;;
1362
1363 *)
1364 # FIXME: should be removed in autoconf 3.0.
1365 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1366 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1367 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1368 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1369 ;;
1370
1371 esac
1372 done
1373
1374 if test -n "$ac_prev"; then
1375 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1376 as_fn_error $? "missing argument to $ac_option"
1377 fi
1378
1379 if test -n "$ac_unrecognized_opts"; then
1380 case $enable_option_checking in
1381 no) ;;
1382 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1383 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1384 esac
1385 fi
1386
1387 # Check all directory arguments for consistency.
1388 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1389 datadir sysconfdir sharedstatedir localstatedir includedir \
1390 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1391 libdir localedir mandir
1392 do
1393 eval ac_val=\$$ac_var
1394 # Remove trailing slashes.
1395 case $ac_val in
1396 */ )
1397 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1398 eval $ac_var=\$ac_val;;
1399 esac
1400 # Be sure to have absolute directory names.
1401 case $ac_val in
1402 [\\/$]* | ?:[\\/]* ) continue;;
1403 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1404 esac
1405 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1406 done
1407
1408 # There might be people who depend on the old broken behavior: `$host'
1409 # used to hold the argument of --host etc.
1410 # FIXME: To remove some day.
1411 build=$build_alias
1412 host=$host_alias
1413 target=$target_alias
1414
1415 # FIXME: To remove some day.
1416 if test "x$host_alias" != x; then
1417 if test "x$build_alias" = x; then
1418 cross_compiling=maybe
1419 elif test "x$build_alias" != "x$host_alias"; then
1420 cross_compiling=yes
1421 fi
1422 fi
1423
1424 ac_tool_prefix=
1425 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1426
1427 test "$silent" = yes && exec 6>/dev/null
1428
1429
1430 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1431 ac_ls_di=`ls -di .` &&
1432 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1433 as_fn_error $? "working directory cannot be determined"
1434 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1435 as_fn_error $? "pwd does not report name of working directory"
1436
1437
1438 # Find the source files, if location was not specified.
1439 if test -z "$srcdir"; then
1440 ac_srcdir_defaulted=yes
1441 # Try the directory containing this script, then the parent directory.
1442 ac_confdir=`$as_dirname -- "$as_myself" ||
1443 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1444 X"$as_myself" : 'X\(//\)[^/]' \| \
1445 X"$as_myself" : 'X\(//\)$' \| \
1446 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1447 $as_echo X"$as_myself" |
1448 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1449 s//\1/
1450 q
1451 }
1452 /^X\(\/\/\)[^/].*/{
1453 s//\1/
1454 q
1455 }
1456 /^X\(\/\/\)$/{
1457 s//\1/
1458 q
1459 }
1460 /^X\(\/\).*/{
1461 s//\1/
1462 q
1463 }
1464 s/.*/./; q'`
1465 srcdir=$ac_confdir
1466 if test ! -r "$srcdir/$ac_unique_file"; then
1467 srcdir=..
1468 fi
1469 else
1470 ac_srcdir_defaulted=no
1471 fi
1472 if test ! -r "$srcdir/$ac_unique_file"; then
1473 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1474 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1475 fi
1476 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1477 ac_abs_confdir=`(
1478 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1479 pwd)`
1480 # When building in place, set srcdir=.
1481 if test "$ac_abs_confdir" = "$ac_pwd"; then
1482 srcdir=.
1483 fi
1484 # Remove unnecessary trailing slashes from srcdir.
1485 # Double slashes in file names in object file debugging info
1486 # mess up M-x gdb in Emacs.
1487 case $srcdir in
1488 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1489 esac
1490 for ac_var in $ac_precious_vars; do
1491 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1492 eval ac_env_${ac_var}_value=\$${ac_var}
1493 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1494 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1495 done
1496
1497 #
1498 # Report the --help message.
1499 #
1500 if test "$ac_init_help" = "long"; then
1501 # Omit some internal or obsolete options to make the list less imposing.
1502 # This message is too long to be a string in the A/UX 3.1 sh.
1503 cat <<_ACEOF
1504 \`configure' configures this package to adapt to many kinds of systems.
1505
1506 Usage: $0 [OPTION]... [VAR=VALUE]...
1507
1508 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1509 VAR=VALUE. See below for descriptions of some of the useful variables.
1510
1511 Defaults for the options are specified in brackets.
1512
1513 Configuration:
1514 -h, --help display this help and exit
1515 --help=short display options specific to this package
1516 --help=recursive display the short help of all the included packages
1517 -V, --version display version information and exit
1518 -q, --quiet, --silent do not print \`checking ...' messages
1519 --cache-file=FILE cache test results in FILE [disabled]
1520 -C, --config-cache alias for \`--cache-file=config.cache'
1521 -n, --no-create do not create output files
1522 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1523
1524 Installation directories:
1525 --prefix=PREFIX install architecture-independent files in PREFIX
1526 [$ac_default_prefix]
1527 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1528 [PREFIX]
1529
1530 By default, \`make install' will install all the files in
1531 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1532 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1533 for instance \`--prefix=\$HOME'.
1534
1535 For better control, use the options below.
1536
1537 Fine tuning of the installation directories:
1538 --bindir=DIR user executables [EPREFIX/bin]
1539 --sbindir=DIR system admin executables [EPREFIX/sbin]
1540 --libexecdir=DIR program executables [EPREFIX/libexec]
1541 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1542 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1543 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1544 --libdir=DIR object code libraries [EPREFIX/lib]
1545 --includedir=DIR C header files [PREFIX/include]
1546 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1547 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1548 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1549 --infodir=DIR info documentation [DATAROOTDIR/info]
1550 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1551 --mandir=DIR man documentation [DATAROOTDIR/man]
1552 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1553 --htmldir=DIR html documentation [DOCDIR]
1554 --dvidir=DIR dvi documentation [DOCDIR]
1555 --pdfdir=DIR pdf documentation [DOCDIR]
1556 --psdir=DIR ps documentation [DOCDIR]
1557 _ACEOF
1558
1559 cat <<\_ACEOF
1560
1561 Program names:
1562 --program-prefix=PREFIX prepend PREFIX to installed program names
1563 --program-suffix=SUFFIX append SUFFIX to installed program names
1564 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1565
1566 X features:
1567 --x-includes=DIR X include files are in DIR
1568 --x-libraries=DIR X library files are in DIR
1569
1570 System types:
1571 --build=BUILD configure for building on BUILD [guessed]
1572 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1573 --target=TARGET configure for building compilers for TARGET [HOST]
1574 _ACEOF
1575 fi
1576
1577 if test -n "$ac_init_help"; then
1578
1579 cat <<\_ACEOF
1580
1581 Optional Features:
1582 --disable-option-checking ignore unrecognized --enable/--with options
1583 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1584 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1585 --enable-maintainer-mode
1586 enable make rules and dependencies not useful (and
1587 sometimes confusing) to the casual installer
1588 --enable-plugins Enable support for plugins
1589 --disable-largefile omit support for large files
1590 --enable-targets=TARGETS
1591 alternative target configurations
1592 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1593 --disable-gdbmi disable machine-interface (MI)
1594 --enable-tui enable full-screen terminal user interface (TUI)
1595 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1596 --enable-profiling enable profiling of GDB
1597 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1598 --disable-rpath do not hardcode runtime library paths
1599 --enable-source-highlight
1600 enable source-highlight for source listings
1601 --enable-threading include support for parallel processing of data
1602 (yes/no)
1603 --enable-werror treat compile warnings as errors
1604 --enable-build-warnings enable build-time compiler warnings if gcc is used
1605 --enable-gdb-build-warnings
1606 enable GDB specific build-time compiler warnings if
1607 gcc is used
1608 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1609 --enable-sim link gdb with simulator
1610 --enable-libbacktrace use libbacktrace to write a backtrace after a fatal
1611 signal.
1612 --enable-libctf Handle .ctf type-info sections [default=yes]
1613 --enable-unit-tests Enable the inclusion of unit tests when compiling
1614 GDB
1615
1616 Optional Packages:
1617 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1618 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1619 --with-separate-debug-dir=PATH
1620 look for global separate debug info in this path
1621 [LIBDIR/debug]
1622 --with-gdb-datadir=PATH look for global separate data files in this path
1623 [DATADIR/gdb]
1624 --with-relocated-sources=PATH
1625 automatically relocate this path for source files
1626 --with-auto-load-dir=PATH
1627 directories from which to load auto-loaded scripts
1628 [$debugdir:$datadir/auto-load]
1629 --with-auto-load-safe-path=PATH
1630 directories safe to hold auto-loaded files
1631 [--with-auto-load-dir]
1632 --without-auto-load-safe-path
1633 do not restrict auto-loaded files locations
1634 --with-debuginfod Enable debuginfo lookups with debuginfod
1635 (auto/yes/no)
1636 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1637 --with-curses use the curses library instead of the termcap
1638 library
1639 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1640 --with-bugurl=URL Direct users to URL to report a bug
1641 --with-system-zlib use installed libz
1642 --with-gnu-ld assume the C compiler uses GNU ld default=no
1643 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1644 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1645 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1646 --with-iconv-bin=PATH specify where to find the iconv program
1647 --with-system-readline use installed readline library
1648 --with-jit-reader-dir=PATH
1649 directory to load the JIT readers from
1650 --with-expat include expat support (auto/yes/no)
1651 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1652 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1653 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1654 --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib
1655 --without-libgmp-prefix don't search for libgmp in includedir and libdir
1656 --with-libgmp-type=TYPE type of library to search for (auto/static/shared)
1657 --with-mpfr include MPFR support (auto/yes/no)
1658 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1659 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1660 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1661 --with-python[=PYTHON] include python support
1662 (auto/yes/no/<python-program>)
1663 --with-python-libdir[=DIR]
1664 search for python's libraries in DIR
1665 --with-guile[=GUILE] include guile support
1666 (auto/yes/no/<guile-version>/<pkg-config-program>)
1667 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1668 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1669 --without-libipt-prefix don't search for libipt in includedir and libdir
1670 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1671 --with-sysroot[=DIR] search for usr/lib et al within DIR
1672 --with-system-gdbinit=PATH
1673 automatically load a system-wide gdbinit file
1674 --with-system-gdbinit-dir=PATH
1675 automatically load system-wide gdbinit files from
1676 this directory
1677 --with-lzma support lzma compression (auto/yes/no)
1678 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1679 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1680 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1681 --with-tcl directory containing tcl configuration (tclConfig.sh)
1682 --with-tk directory containing tk configuration (tkConfig.sh)
1683 --with-x use the X Window System
1684 --with-babeltrace include babeltrace support (auto/yes/no)
1685 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1686 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1687 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1688 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1689 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1690 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1691 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1692
1693 Some influential environment variables:
1694 CC C compiler command
1695 CFLAGS C compiler flags
1696 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1697 nonstandard directory <lib dir>
1698 LIBS libraries to pass to the linker, e.g. -l<library>
1699 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1700 you have headers in a nonstandard directory <include dir>
1701 CXX C++ compiler command
1702 CXXFLAGS C++ compiler flags
1703 CPP C preprocessor
1704 MAKEINFO Parent configure detects if it is of sufficient version.
1705 MAKEINFOFLAGS
1706 Parameters for MAKEINFO.
1707 PKG_CONFIG path to pkg-config utility
1708 PKG_CONFIG_PATH
1709 directories to add to pkg-config's search path
1710 PKG_CONFIG_LIBDIR
1711 path overriding pkg-config's built-in search path
1712 DEBUGINFOD_CFLAGS
1713 C compiler flags for DEBUGINFOD, overriding pkg-config
1714 DEBUGINFOD_LIBS
1715 linker flags for DEBUGINFOD, overriding pkg-config
1716 YACC The `Yet Another Compiler Compiler' implementation to use.
1717 Defaults to the first program found out of: `bison -y', `byacc',
1718 `yacc'.
1719 YFLAGS The list of arguments that will be passed by default to $YACC.
1720 This script will default YFLAGS to the empty string to avoid a
1721 default value of `-d' given by some make applications.
1722 XMKMF Path to xmkmf, Makefile generator for X Window System
1723
1724 Use these variables to override the choices made by `configure' or to help
1725 it to find libraries and programs with nonstandard names/locations.
1726
1727 Report bugs to the package provider.
1728 _ACEOF
1729 ac_status=$?
1730 fi
1731
1732 if test "$ac_init_help" = "recursive"; then
1733 # If there are subdirs, report their specific --help.
1734 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1735 test -d "$ac_dir" ||
1736 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1737 continue
1738 ac_builddir=.
1739
1740 case "$ac_dir" in
1741 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1742 *)
1743 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1744 # A ".." for each directory in $ac_dir_suffix.
1745 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1746 case $ac_top_builddir_sub in
1747 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1748 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1749 esac ;;
1750 esac
1751 ac_abs_top_builddir=$ac_pwd
1752 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1753 # for backward compatibility:
1754 ac_top_builddir=$ac_top_build_prefix
1755
1756 case $srcdir in
1757 .) # We are building in place.
1758 ac_srcdir=.
1759 ac_top_srcdir=$ac_top_builddir_sub
1760 ac_abs_top_srcdir=$ac_pwd ;;
1761 [\\/]* | ?:[\\/]* ) # Absolute name.
1762 ac_srcdir=$srcdir$ac_dir_suffix;
1763 ac_top_srcdir=$srcdir
1764 ac_abs_top_srcdir=$srcdir ;;
1765 *) # Relative name.
1766 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1767 ac_top_srcdir=$ac_top_build_prefix$srcdir
1768 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1769 esac
1770 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1771
1772 cd "$ac_dir" || { ac_status=$?; continue; }
1773 # Check for guested configure.
1774 if test -f "$ac_srcdir/configure.gnu"; then
1775 echo &&
1776 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1777 elif test -f "$ac_srcdir/configure"; then
1778 echo &&
1779 $SHELL "$ac_srcdir/configure" --help=recursive
1780 else
1781 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1782 fi || ac_status=$?
1783 cd "$ac_pwd" || { ac_status=$?; break; }
1784 done
1785 fi
1786
1787 test -n "$ac_init_help" && exit $ac_status
1788 if $ac_init_version; then
1789 cat <<\_ACEOF
1790 configure
1791 generated by GNU Autoconf 2.69
1792
1793 Copyright (C) 2012 Free Software Foundation, Inc.
1794 This configure script is free software; the Free Software Foundation
1795 gives unlimited permission to copy, distribute and modify it.
1796 _ACEOF
1797 exit
1798 fi
1799
1800 ## ------------------------ ##
1801 ## Autoconf initialization. ##
1802 ## ------------------------ ##
1803
1804 # ac_fn_c_try_compile LINENO
1805 # --------------------------
1806 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1807 ac_fn_c_try_compile ()
1808 {
1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1810 rm -f conftest.$ac_objext
1811 if { { ac_try="$ac_compile"
1812 case "(($ac_try" in
1813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1814 *) ac_try_echo=$ac_try;;
1815 esac
1816 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1817 $as_echo "$ac_try_echo"; } >&5
1818 (eval "$ac_compile") 2>conftest.err
1819 ac_status=$?
1820 if test -s conftest.err; then
1821 grep -v '^ *+' conftest.err >conftest.er1
1822 cat conftest.er1 >&5
1823 mv -f conftest.er1 conftest.err
1824 fi
1825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1826 test $ac_status = 0; } && {
1827 test -z "$ac_c_werror_flag" ||
1828 test ! -s conftest.err
1829 } && test -s conftest.$ac_objext; then :
1830 ac_retval=0
1831 else
1832 $as_echo "$as_me: failed program was:" >&5
1833 sed 's/^/| /' conftest.$ac_ext >&5
1834
1835 ac_retval=1
1836 fi
1837 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1838 as_fn_set_status $ac_retval
1839
1840 } # ac_fn_c_try_compile
1841
1842 # ac_fn_cxx_try_compile LINENO
1843 # ----------------------------
1844 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1845 ac_fn_cxx_try_compile ()
1846 {
1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848 rm -f conftest.$ac_objext
1849 if { { ac_try="$ac_compile"
1850 case "(($ac_try" in
1851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1852 *) ac_try_echo=$ac_try;;
1853 esac
1854 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1855 $as_echo "$ac_try_echo"; } >&5
1856 (eval "$ac_compile") 2>conftest.err
1857 ac_status=$?
1858 if test -s conftest.err; then
1859 grep -v '^ *+' conftest.err >conftest.er1
1860 cat conftest.er1 >&5
1861 mv -f conftest.er1 conftest.err
1862 fi
1863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1864 test $ac_status = 0; } && {
1865 test -z "$ac_cxx_werror_flag" ||
1866 test ! -s conftest.err
1867 } && test -s conftest.$ac_objext; then :
1868 ac_retval=0
1869 else
1870 $as_echo "$as_me: failed program was:" >&5
1871 sed 's/^/| /' conftest.$ac_ext >&5
1872
1873 ac_retval=1
1874 fi
1875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1876 as_fn_set_status $ac_retval
1877
1878 } # ac_fn_cxx_try_compile
1879
1880 # ac_fn_c_try_cpp LINENO
1881 # ----------------------
1882 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1883 ac_fn_c_try_cpp ()
1884 {
1885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1886 if { { ac_try="$ac_cpp conftest.$ac_ext"
1887 case "(($ac_try" in
1888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1889 *) ac_try_echo=$ac_try;;
1890 esac
1891 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1892 $as_echo "$ac_try_echo"; } >&5
1893 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1894 ac_status=$?
1895 if test -s conftest.err; then
1896 grep -v '^ *+' conftest.err >conftest.er1
1897 cat conftest.er1 >&5
1898 mv -f conftest.er1 conftest.err
1899 fi
1900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1901 test $ac_status = 0; } > conftest.i && {
1902 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1903 test ! -s conftest.err
1904 }; then :
1905 ac_retval=0
1906 else
1907 $as_echo "$as_me: failed program was:" >&5
1908 sed 's/^/| /' conftest.$ac_ext >&5
1909
1910 ac_retval=1
1911 fi
1912 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1913 as_fn_set_status $ac_retval
1914
1915 } # ac_fn_c_try_cpp
1916
1917 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1918 # -------------------------------------------------------
1919 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1920 # the include files in INCLUDES and setting the cache variable VAR
1921 # accordingly.
1922 ac_fn_c_check_header_mongrel ()
1923 {
1924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925 if eval \${$3+:} false; then :
1926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1927 $as_echo_n "checking for $2... " >&6; }
1928 if eval \${$3+:} false; then :
1929 $as_echo_n "(cached) " >&6
1930 fi
1931 eval ac_res=\$$3
1932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1933 $as_echo "$ac_res" >&6; }
1934 else
1935 # Is the header compilable?
1936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1937 $as_echo_n "checking $2 usability... " >&6; }
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939 /* end confdefs.h. */
1940 $4
1941 #include <$2>
1942 _ACEOF
1943 if ac_fn_c_try_compile "$LINENO"; then :
1944 ac_header_compiler=yes
1945 else
1946 ac_header_compiler=no
1947 fi
1948 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1950 $as_echo "$ac_header_compiler" >&6; }
1951
1952 # Is the header present?
1953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1954 $as_echo_n "checking $2 presence... " >&6; }
1955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1956 /* end confdefs.h. */
1957 #include <$2>
1958 _ACEOF
1959 if ac_fn_c_try_cpp "$LINENO"; then :
1960 ac_header_preproc=yes
1961 else
1962 ac_header_preproc=no
1963 fi
1964 rm -f conftest.err conftest.i conftest.$ac_ext
1965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1966 $as_echo "$ac_header_preproc" >&6; }
1967
1968 # So? What about this header?
1969 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1970 yes:no: )
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1972 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1974 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1975 ;;
1976 no:yes:* )
1977 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1978 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1980 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1982 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1984 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1986 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1987 ;;
1988 esac
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1990 $as_echo_n "checking for $2... " >&6; }
1991 if eval \${$3+:} false; then :
1992 $as_echo_n "(cached) " >&6
1993 else
1994 eval "$3=\$ac_header_compiler"
1995 fi
1996 eval ac_res=\$$3
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1998 $as_echo "$ac_res" >&6; }
1999 fi
2000 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2001
2002 } # ac_fn_c_check_header_mongrel
2003
2004 # ac_fn_c_try_run LINENO
2005 # ----------------------
2006 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2007 # that executables *can* be run.
2008 ac_fn_c_try_run ()
2009 {
2010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2011 if { { ac_try="$ac_link"
2012 case "(($ac_try" in
2013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2014 *) ac_try_echo=$ac_try;;
2015 esac
2016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2017 $as_echo "$ac_try_echo"; } >&5
2018 (eval "$ac_link") 2>&5
2019 ac_status=$?
2020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2021 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2022 { { case "(($ac_try" in
2023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2024 *) ac_try_echo=$ac_try;;
2025 esac
2026 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2027 $as_echo "$ac_try_echo"; } >&5
2028 (eval "$ac_try") 2>&5
2029 ac_status=$?
2030 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2031 test $ac_status = 0; }; }; then :
2032 ac_retval=0
2033 else
2034 $as_echo "$as_me: program exited with status $ac_status" >&5
2035 $as_echo "$as_me: failed program was:" >&5
2036 sed 's/^/| /' conftest.$ac_ext >&5
2037
2038 ac_retval=$ac_status
2039 fi
2040 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2041 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2042 as_fn_set_status $ac_retval
2043
2044 } # ac_fn_c_try_run
2045
2046 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2047 # -------------------------------------------------------
2048 # Tests whether HEADER exists and can be compiled using the include files in
2049 # INCLUDES, setting the cache variable VAR accordingly.
2050 ac_fn_c_check_header_compile ()
2051 {
2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2054 $as_echo_n "checking for $2... " >&6; }
2055 if eval \${$3+:} false; then :
2056 $as_echo_n "(cached) " >&6
2057 else
2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059 /* end confdefs.h. */
2060 $4
2061 #include <$2>
2062 _ACEOF
2063 if ac_fn_c_try_compile "$LINENO"; then :
2064 eval "$3=yes"
2065 else
2066 eval "$3=no"
2067 fi
2068 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2069 fi
2070 eval ac_res=\$$3
2071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2072 $as_echo "$ac_res" >&6; }
2073 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2074
2075 } # ac_fn_c_check_header_compile
2076
2077 # ac_fn_c_try_link LINENO
2078 # -----------------------
2079 # Try to link conftest.$ac_ext, and return whether this succeeded.
2080 ac_fn_c_try_link ()
2081 {
2082 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2083 rm -f conftest.$ac_objext conftest$ac_exeext
2084 if { { ac_try="$ac_link"
2085 case "(($ac_try" in
2086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2087 *) ac_try_echo=$ac_try;;
2088 esac
2089 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2090 $as_echo "$ac_try_echo"; } >&5
2091 (eval "$ac_link") 2>conftest.err
2092 ac_status=$?
2093 if test -s conftest.err; then
2094 grep -v '^ *+' conftest.err >conftest.er1
2095 cat conftest.er1 >&5
2096 mv -f conftest.er1 conftest.err
2097 fi
2098 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2099 test $ac_status = 0; } && {
2100 test -z "$ac_c_werror_flag" ||
2101 test ! -s conftest.err
2102 } && test -s conftest$ac_exeext && {
2103 test "$cross_compiling" = yes ||
2104 test -x conftest$ac_exeext
2105 }; then :
2106 ac_retval=0
2107 else
2108 $as_echo "$as_me: failed program was:" >&5
2109 sed 's/^/| /' conftest.$ac_ext >&5
2110
2111 ac_retval=1
2112 fi
2113 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2114 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2115 # interfere with the next link command; also delete a directory that is
2116 # left behind by Apple's compiler. We do this before executing the actions.
2117 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2118 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2119 as_fn_set_status $ac_retval
2120
2121 } # ac_fn_c_try_link
2122
2123 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2124 # --------------------------------------------
2125 # Tries to find the compile-time value of EXPR in a program that includes
2126 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2127 # computed
2128 ac_fn_c_compute_int ()
2129 {
2130 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2131 if test "$cross_compiling" = yes; then
2132 # Depending upon the size, compute the lo and hi bounds.
2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2134 /* end confdefs.h. */
2135 $4
2136 int
2137 main ()
2138 {
2139 static int test_array [1 - 2 * !(($2) >= 0)];
2140 test_array [0] = 0;
2141 return test_array [0];
2142
2143 ;
2144 return 0;
2145 }
2146 _ACEOF
2147 if ac_fn_c_try_compile "$LINENO"; then :
2148 ac_lo=0 ac_mid=0
2149 while :; do
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151 /* end confdefs.h. */
2152 $4
2153 int
2154 main ()
2155 {
2156 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2157 test_array [0] = 0;
2158 return test_array [0];
2159
2160 ;
2161 return 0;
2162 }
2163 _ACEOF
2164 if ac_fn_c_try_compile "$LINENO"; then :
2165 ac_hi=$ac_mid; break
2166 else
2167 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2168 if test $ac_lo -le $ac_mid; then
2169 ac_lo= ac_hi=
2170 break
2171 fi
2172 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2173 fi
2174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2175 done
2176 else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178 /* end confdefs.h. */
2179 $4
2180 int
2181 main ()
2182 {
2183 static int test_array [1 - 2 * !(($2) < 0)];
2184 test_array [0] = 0;
2185 return test_array [0];
2186
2187 ;
2188 return 0;
2189 }
2190 _ACEOF
2191 if ac_fn_c_try_compile "$LINENO"; then :
2192 ac_hi=-1 ac_mid=-1
2193 while :; do
2194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2195 /* end confdefs.h. */
2196 $4
2197 int
2198 main ()
2199 {
2200 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2201 test_array [0] = 0;
2202 return test_array [0];
2203
2204 ;
2205 return 0;
2206 }
2207 _ACEOF
2208 if ac_fn_c_try_compile "$LINENO"; then :
2209 ac_lo=$ac_mid; break
2210 else
2211 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2212 if test $ac_mid -le $ac_hi; then
2213 ac_lo= ac_hi=
2214 break
2215 fi
2216 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2217 fi
2218 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2219 done
2220 else
2221 ac_lo= ac_hi=
2222 fi
2223 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2224 fi
2225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2226 # Binary search between lo and hi bounds.
2227 while test "x$ac_lo" != "x$ac_hi"; do
2228 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2230 /* end confdefs.h. */
2231 $4
2232 int
2233 main ()
2234 {
2235 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2236 test_array [0] = 0;
2237 return test_array [0];
2238
2239 ;
2240 return 0;
2241 }
2242 _ACEOF
2243 if ac_fn_c_try_compile "$LINENO"; then :
2244 ac_hi=$ac_mid
2245 else
2246 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2247 fi
2248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2249 done
2250 case $ac_lo in #((
2251 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2252 '') ac_retval=1 ;;
2253 esac
2254 else
2255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2256 /* end confdefs.h. */
2257 $4
2258 static long int longval () { return $2; }
2259 static unsigned long int ulongval () { return $2; }
2260 #include <stdio.h>
2261 #include <stdlib.h>
2262 int
2263 main ()
2264 {
2265
2266 FILE *f = fopen ("conftest.val", "w");
2267 if (! f)
2268 return 1;
2269 if (($2) < 0)
2270 {
2271 long int i = longval ();
2272 if (i != ($2))
2273 return 1;
2274 fprintf (f, "%ld", i);
2275 }
2276 else
2277 {
2278 unsigned long int i = ulongval ();
2279 if (i != ($2))
2280 return 1;
2281 fprintf (f, "%lu", i);
2282 }
2283 /* Do not output a trailing newline, as this causes \r\n confusion
2284 on some platforms. */
2285 return ferror (f) || fclose (f) != 0;
2286
2287 ;
2288 return 0;
2289 }
2290 _ACEOF
2291 if ac_fn_c_try_run "$LINENO"; then :
2292 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2293 else
2294 ac_retval=1
2295 fi
2296 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2297 conftest.$ac_objext conftest.beam conftest.$ac_ext
2298 rm -f conftest.val
2299
2300 fi
2301 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2302 as_fn_set_status $ac_retval
2303
2304 } # ac_fn_c_compute_int
2305
2306 # ac_fn_c_check_func LINENO FUNC VAR
2307 # ----------------------------------
2308 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2309 ac_fn_c_check_func ()
2310 {
2311 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2313 $as_echo_n "checking for $2... " >&6; }
2314 if eval \${$3+:} false; then :
2315 $as_echo_n "(cached) " >&6
2316 else
2317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2318 /* end confdefs.h. */
2319 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2320 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2321 #define $2 innocuous_$2
2322
2323 /* System header to define __stub macros and hopefully few prototypes,
2324 which can conflict with char $2 (); below.
2325 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2326 <limits.h> exists even on freestanding compilers. */
2327
2328 #ifdef __STDC__
2329 # include <limits.h>
2330 #else
2331 # include <assert.h>
2332 #endif
2333
2334 #undef $2
2335
2336 /* Override any GCC internal prototype to avoid an error.
2337 Use char because int might match the return type of a GCC
2338 builtin and then its argument prototype would still apply. */
2339 #ifdef __cplusplus
2340 extern "C"
2341 #endif
2342 char $2 ();
2343 /* The GNU C library defines this for functions which it implements
2344 to always fail with ENOSYS. Some functions are actually named
2345 something starting with __ and the normal name is an alias. */
2346 #if defined __stub_$2 || defined __stub___$2
2347 choke me
2348 #endif
2349
2350 int
2351 main ()
2352 {
2353 return $2 ();
2354 ;
2355 return 0;
2356 }
2357 _ACEOF
2358 if ac_fn_c_try_link "$LINENO"; then :
2359 eval "$3=yes"
2360 else
2361 eval "$3=no"
2362 fi
2363 rm -f core conftest.err conftest.$ac_objext \
2364 conftest$ac_exeext conftest.$ac_ext
2365 fi
2366 eval ac_res=\$$3
2367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2368 $as_echo "$ac_res" >&6; }
2369 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2370
2371 } # ac_fn_c_check_func
2372
2373 # ac_fn_cxx_try_link LINENO
2374 # -------------------------
2375 # Try to link conftest.$ac_ext, and return whether this succeeded.
2376 ac_fn_cxx_try_link ()
2377 {
2378 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2379 rm -f conftest.$ac_objext conftest$ac_exeext
2380 if { { ac_try="$ac_link"
2381 case "(($ac_try" in
2382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2383 *) ac_try_echo=$ac_try;;
2384 esac
2385 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2386 $as_echo "$ac_try_echo"; } >&5
2387 (eval "$ac_link") 2>conftest.err
2388 ac_status=$?
2389 if test -s conftest.err; then
2390 grep -v '^ *+' conftest.err >conftest.er1
2391 cat conftest.er1 >&5
2392 mv -f conftest.er1 conftest.err
2393 fi
2394 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2395 test $ac_status = 0; } && {
2396 test -z "$ac_cxx_werror_flag" ||
2397 test ! -s conftest.err
2398 } && test -s conftest$ac_exeext && {
2399 test "$cross_compiling" = yes ||
2400 test -x conftest$ac_exeext
2401 }; then :
2402 ac_retval=0
2403 else
2404 $as_echo "$as_me: failed program was:" >&5
2405 sed 's/^/| /' conftest.$ac_ext >&5
2406
2407 ac_retval=1
2408 fi
2409 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2410 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2411 # interfere with the next link command; also delete a directory that is
2412 # left behind by Apple's compiler. We do this before executing the actions.
2413 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2414 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2415 as_fn_set_status $ac_retval
2416
2417 } # ac_fn_cxx_try_link
2418
2419 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2420 # -------------------------------------------
2421 # Tests whether TYPE exists after having included INCLUDES, setting cache
2422 # variable VAR accordingly.
2423 ac_fn_c_check_type ()
2424 {
2425 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2427 $as_echo_n "checking for $2... " >&6; }
2428 if eval \${$3+:} false; then :
2429 $as_echo_n "(cached) " >&6
2430 else
2431 eval "$3=no"
2432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2433 /* end confdefs.h. */
2434 $4
2435 int
2436 main ()
2437 {
2438 if (sizeof ($2))
2439 return 0;
2440 ;
2441 return 0;
2442 }
2443 _ACEOF
2444 if ac_fn_c_try_compile "$LINENO"; then :
2445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2446 /* end confdefs.h. */
2447 $4
2448 int
2449 main ()
2450 {
2451 if (sizeof (($2)))
2452 return 0;
2453 ;
2454 return 0;
2455 }
2456 _ACEOF
2457 if ac_fn_c_try_compile "$LINENO"; then :
2458
2459 else
2460 eval "$3=yes"
2461 fi
2462 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2463 fi
2464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2465 fi
2466 eval ac_res=\$$3
2467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2468 $as_echo "$ac_res" >&6; }
2469 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2470
2471 } # ac_fn_c_check_type
2472
2473 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2474 # ---------------------------------------------
2475 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2476 # accordingly.
2477 ac_fn_c_check_decl ()
2478 {
2479 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480 as_decl_name=`echo $2|sed 's/ *(.*//'`
2481 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2483 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2484 if eval \${$3+:} false; then :
2485 $as_echo_n "(cached) " >&6
2486 else
2487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2488 /* end confdefs.h. */
2489 $4
2490 int
2491 main ()
2492 {
2493 #ifndef $as_decl_name
2494 #ifdef __cplusplus
2495 (void) $as_decl_use;
2496 #else
2497 (void) $as_decl_name;
2498 #endif
2499 #endif
2500
2501 ;
2502 return 0;
2503 }
2504 _ACEOF
2505 if ac_fn_c_try_compile "$LINENO"; then :
2506 eval "$3=yes"
2507 else
2508 eval "$3=no"
2509 fi
2510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2511 fi
2512 eval ac_res=\$$3
2513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2514 $as_echo "$ac_res" >&6; }
2515 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516
2517 } # ac_fn_c_check_decl
2518
2519 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2520 # ----------------------------------------------------
2521 # Tries to find if the field MEMBER exists in type AGGR, after including
2522 # INCLUDES, setting cache variable VAR accordingly.
2523 ac_fn_c_check_member ()
2524 {
2525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2527 $as_echo_n "checking for $2.$3... " >&6; }
2528 if eval \${$4+:} false; then :
2529 $as_echo_n "(cached) " >&6
2530 else
2531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2532 /* end confdefs.h. */
2533 $5
2534 int
2535 main ()
2536 {
2537 static $2 ac_aggr;
2538 if (ac_aggr.$3)
2539 return 0;
2540 ;
2541 return 0;
2542 }
2543 _ACEOF
2544 if ac_fn_c_try_compile "$LINENO"; then :
2545 eval "$4=yes"
2546 else
2547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2548 /* end confdefs.h. */
2549 $5
2550 int
2551 main ()
2552 {
2553 static $2 ac_aggr;
2554 if (sizeof ac_aggr.$3)
2555 return 0;
2556 ;
2557 return 0;
2558 }
2559 _ACEOF
2560 if ac_fn_c_try_compile "$LINENO"; then :
2561 eval "$4=yes"
2562 else
2563 eval "$4=no"
2564 fi
2565 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2566 fi
2567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2568 fi
2569 eval ac_res=\$$4
2570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2571 $as_echo "$ac_res" >&6; }
2572 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2573
2574 } # ac_fn_c_check_member
2575
2576 # ac_fn_cxx_check_func LINENO FUNC VAR
2577 # ------------------------------------
2578 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2579 ac_fn_cxx_check_func ()
2580 {
2581 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2583 $as_echo_n "checking for $2... " >&6; }
2584 if eval \${$3+:} false; then :
2585 $as_echo_n "(cached) " >&6
2586 else
2587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2588 /* end confdefs.h. */
2589 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2590 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2591 #define $2 innocuous_$2
2592
2593 /* System header to define __stub macros and hopefully few prototypes,
2594 which can conflict with char $2 (); below.
2595 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2596 <limits.h> exists even on freestanding compilers. */
2597
2598 #ifdef __STDC__
2599 # include <limits.h>
2600 #else
2601 # include <assert.h>
2602 #endif
2603
2604 #undef $2
2605
2606 /* Override any GCC internal prototype to avoid an error.
2607 Use char because int might match the return type of a GCC
2608 builtin and then its argument prototype would still apply. */
2609 #ifdef __cplusplus
2610 extern "C"
2611 #endif
2612 char $2 ();
2613 /* The GNU C library defines this for functions which it implements
2614 to always fail with ENOSYS. Some functions are actually named
2615 something starting with __ and the normal name is an alias. */
2616 #if defined __stub_$2 || defined __stub___$2
2617 choke me
2618 #endif
2619
2620 int
2621 main ()
2622 {
2623 return $2 ();
2624 ;
2625 return 0;
2626 }
2627 _ACEOF
2628 if ac_fn_cxx_try_link "$LINENO"; then :
2629 eval "$3=yes"
2630 else
2631 eval "$3=no"
2632 fi
2633 rm -f core conftest.err conftest.$ac_objext \
2634 conftest$ac_exeext conftest.$ac_ext
2635 fi
2636 eval ac_res=\$$3
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2638 $as_echo "$ac_res" >&6; }
2639 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2640
2641 } # ac_fn_cxx_check_func
2642 cat >config.log <<_ACEOF
2643 This file contains any messages produced by compilers while
2644 running configure, to aid debugging if configure makes a mistake.
2645
2646 It was created by $as_me, which was
2647 generated by GNU Autoconf 2.69. Invocation command line was
2648
2649 $ $0 $@
2650
2651 _ACEOF
2652 exec 5>>config.log
2653 {
2654 cat <<_ASUNAME
2655 ## --------- ##
2656 ## Platform. ##
2657 ## --------- ##
2658
2659 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2660 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2661 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2662 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2663 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2664
2665 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2666 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2667
2668 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2669 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2670 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2671 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2672 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2673 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2674 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2675
2676 _ASUNAME
2677
2678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2679 for as_dir in $PATH
2680 do
2681 IFS=$as_save_IFS
2682 test -z "$as_dir" && as_dir=.
2683 $as_echo "PATH: $as_dir"
2684 done
2685 IFS=$as_save_IFS
2686
2687 } >&5
2688
2689 cat >&5 <<_ACEOF
2690
2691
2692 ## ----------- ##
2693 ## Core tests. ##
2694 ## ----------- ##
2695
2696 _ACEOF
2697
2698
2699 # Keep a trace of the command line.
2700 # Strip out --no-create and --no-recursion so they do not pile up.
2701 # Strip out --silent because we don't want to record it for future runs.
2702 # Also quote any args containing shell meta-characters.
2703 # Make two passes to allow for proper duplicate-argument suppression.
2704 ac_configure_args=
2705 ac_configure_args0=
2706 ac_configure_args1=
2707 ac_must_keep_next=false
2708 for ac_pass in 1 2
2709 do
2710 for ac_arg
2711 do
2712 case $ac_arg in
2713 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2714 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2715 | -silent | --silent | --silen | --sile | --sil)
2716 continue ;;
2717 *\'*)
2718 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2719 esac
2720 case $ac_pass in
2721 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2722 2)
2723 as_fn_append ac_configure_args1 " '$ac_arg'"
2724 if test $ac_must_keep_next = true; then
2725 ac_must_keep_next=false # Got value, back to normal.
2726 else
2727 case $ac_arg in
2728 *=* | --config-cache | -C | -disable-* | --disable-* \
2729 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2730 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2731 | -with-* | --with-* | -without-* | --without-* | --x)
2732 case "$ac_configure_args0 " in
2733 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2734 esac
2735 ;;
2736 -* ) ac_must_keep_next=true ;;
2737 esac
2738 fi
2739 as_fn_append ac_configure_args " '$ac_arg'"
2740 ;;
2741 esac
2742 done
2743 done
2744 { ac_configure_args0=; unset ac_configure_args0;}
2745 { ac_configure_args1=; unset ac_configure_args1;}
2746
2747 # When interrupted or exit'd, cleanup temporary files, and complete
2748 # config.log. We remove comments because anyway the quotes in there
2749 # would cause problems or look ugly.
2750 # WARNING: Use '\'' to represent an apostrophe within the trap.
2751 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2752 trap 'exit_status=$?
2753 # Save into config.log some information that might help in debugging.
2754 {
2755 echo
2756
2757 $as_echo "## ---------------- ##
2758 ## Cache variables. ##
2759 ## ---------------- ##"
2760 echo
2761 # The following way of writing the cache mishandles newlines in values,
2762 (
2763 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2764 eval ac_val=\$$ac_var
2765 case $ac_val in #(
2766 *${as_nl}*)
2767 case $ac_var in #(
2768 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2769 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2770 esac
2771 case $ac_var in #(
2772 _ | IFS | as_nl) ;; #(
2773 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2774 *) { eval $ac_var=; unset $ac_var;} ;;
2775 esac ;;
2776 esac
2777 done
2778 (set) 2>&1 |
2779 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2780 *${as_nl}ac_space=\ *)
2781 sed -n \
2782 "s/'\''/'\''\\\\'\'''\''/g;
2783 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2784 ;; #(
2785 *)
2786 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2787 ;;
2788 esac |
2789 sort
2790 )
2791 echo
2792
2793 $as_echo "## ----------------- ##
2794 ## Output variables. ##
2795 ## ----------------- ##"
2796 echo
2797 for ac_var in $ac_subst_vars
2798 do
2799 eval ac_val=\$$ac_var
2800 case $ac_val in
2801 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2802 esac
2803 $as_echo "$ac_var='\''$ac_val'\''"
2804 done | sort
2805 echo
2806
2807 if test -n "$ac_subst_files"; then
2808 $as_echo "## ------------------- ##
2809 ## File substitutions. ##
2810 ## ------------------- ##"
2811 echo
2812 for ac_var in $ac_subst_files
2813 do
2814 eval ac_val=\$$ac_var
2815 case $ac_val in
2816 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2817 esac
2818 $as_echo "$ac_var='\''$ac_val'\''"
2819 done | sort
2820 echo
2821 fi
2822
2823 if test -s confdefs.h; then
2824 $as_echo "## ----------- ##
2825 ## confdefs.h. ##
2826 ## ----------- ##"
2827 echo
2828 cat confdefs.h
2829 echo
2830 fi
2831 test "$ac_signal" != 0 &&
2832 $as_echo "$as_me: caught signal $ac_signal"
2833 $as_echo "$as_me: exit $exit_status"
2834 } >&5
2835 rm -f core *.core core.conftest.* &&
2836 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2837 exit $exit_status
2838 ' 0
2839 for ac_signal in 1 2 13 15; do
2840 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2841 done
2842 ac_signal=0
2843
2844 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2845 rm -f -r conftest* confdefs.h
2846
2847 $as_echo "/* confdefs.h */" > confdefs.h
2848
2849 # Predefined preprocessor variables.
2850
2851 cat >>confdefs.h <<_ACEOF
2852 #define PACKAGE_NAME "$PACKAGE_NAME"
2853 _ACEOF
2854
2855 cat >>confdefs.h <<_ACEOF
2856 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2857 _ACEOF
2858
2859 cat >>confdefs.h <<_ACEOF
2860 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2861 _ACEOF
2862
2863 cat >>confdefs.h <<_ACEOF
2864 #define PACKAGE_STRING "$PACKAGE_STRING"
2865 _ACEOF
2866
2867 cat >>confdefs.h <<_ACEOF
2868 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2869 _ACEOF
2870
2871 cat >>confdefs.h <<_ACEOF
2872 #define PACKAGE_URL "$PACKAGE_URL"
2873 _ACEOF
2874
2875
2876 # Let the site file select an alternate cache file if it wants to.
2877 # Prefer an explicitly selected file to automatically selected ones.
2878 ac_site_file1=NONE
2879 ac_site_file2=NONE
2880 if test -n "$CONFIG_SITE"; then
2881 # We do not want a PATH search for config.site.
2882 case $CONFIG_SITE in #((
2883 -*) ac_site_file1=./$CONFIG_SITE;;
2884 */*) ac_site_file1=$CONFIG_SITE;;
2885 *) ac_site_file1=./$CONFIG_SITE;;
2886 esac
2887 elif test "x$prefix" != xNONE; then
2888 ac_site_file1=$prefix/share/config.site
2889 ac_site_file2=$prefix/etc/config.site
2890 else
2891 ac_site_file1=$ac_default_prefix/share/config.site
2892 ac_site_file2=$ac_default_prefix/etc/config.site
2893 fi
2894 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2895 do
2896 test "x$ac_site_file" = xNONE && continue
2897 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2899 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2900 sed 's/^/| /' "$ac_site_file" >&5
2901 . "$ac_site_file" \
2902 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2903 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2904 as_fn_error $? "failed to load site script $ac_site_file
2905 See \`config.log' for more details" "$LINENO" 5; }
2906 fi
2907 done
2908
2909 if test -r "$cache_file"; then
2910 # Some versions of bash will fail to source /dev/null (special files
2911 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2912 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2913 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2914 $as_echo "$as_me: loading cache $cache_file" >&6;}
2915 case $cache_file in
2916 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2917 *) . "./$cache_file";;
2918 esac
2919 fi
2920 else
2921 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2922 $as_echo "$as_me: creating cache $cache_file" >&6;}
2923 >$cache_file
2924 fi
2925
2926 as_fn_append ac_header_list " stdlib.h"
2927 as_fn_append ac_header_list " unistd.h"
2928 as_fn_append ac_header_list " sys/param.h"
2929 # Check that the precious variables saved in the cache have kept the same
2930 # value.
2931 ac_cache_corrupted=false
2932 for ac_var in $ac_precious_vars; do
2933 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2934 eval ac_new_set=\$ac_env_${ac_var}_set
2935 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2936 eval ac_new_val=\$ac_env_${ac_var}_value
2937 case $ac_old_set,$ac_new_set in
2938 set,)
2939 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2940 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2941 ac_cache_corrupted=: ;;
2942 ,set)
2943 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2944 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2945 ac_cache_corrupted=: ;;
2946 ,);;
2947 *)
2948 if test "x$ac_old_val" != "x$ac_new_val"; then
2949 # differences in whitespace do not lead to failure.
2950 ac_old_val_w=`echo x $ac_old_val`
2951 ac_new_val_w=`echo x $ac_new_val`
2952 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2954 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2955 ac_cache_corrupted=:
2956 else
2957 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2958 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2959 eval $ac_var=\$ac_old_val
2960 fi
2961 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2962 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2964 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2965 fi;;
2966 esac
2967 # Pass precious variables to config.status.
2968 if test "$ac_new_set" = set; then
2969 case $ac_new_val in
2970 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2971 *) ac_arg=$ac_var=$ac_new_val ;;
2972 esac
2973 case " $ac_configure_args " in
2974 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2975 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2976 esac
2977 fi
2978 done
2979 if $ac_cache_corrupted; then
2980 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2981 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2983 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2984 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2985 fi
2986 ## -------------------- ##
2987 ## Main body of script. ##
2988 ## -------------------- ##
2989
2990 ac_ext=c
2991 ac_cpp='$CPP $CPPFLAGS'
2992 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2993 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2994 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2995
2996
2997
2998
2999
3000
3001
3002 ac_config_headers="$ac_config_headers config.h:config.in"
3003
3004
3005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3006 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3007 # Check whether --enable-maintainer-mode was given.
3008 if test "${enable_maintainer_mode+set}" = set; then :
3009 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3010 else
3011 USE_MAINTAINER_MODE=no
3012 fi
3013
3014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3015 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3016 if test $USE_MAINTAINER_MODE = yes; then
3017 MAINTAINER_MODE_TRUE=
3018 MAINTAINER_MODE_FALSE='#'
3019 else
3020 MAINTAINER_MODE_TRUE='#'
3021 MAINTAINER_MODE_FALSE=
3022 fi
3023
3024 MAINT=$MAINTAINER_MODE_TRUE
3025
3026
3027
3028 ac_ext=c
3029 ac_cpp='$CPP $CPPFLAGS'
3030 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3031 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3032 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3033 if test -n "$ac_tool_prefix"; then
3034 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3035 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3037 $as_echo_n "checking for $ac_word... " >&6; }
3038 if ${ac_cv_prog_CC+:} false; then :
3039 $as_echo_n "(cached) " >&6
3040 else
3041 if test -n "$CC"; then
3042 ac_cv_prog_CC="$CC" # Let the user override the test.
3043 else
3044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3045 for as_dir in $PATH
3046 do
3047 IFS=$as_save_IFS
3048 test -z "$as_dir" && as_dir=.
3049 for ac_exec_ext in '' $ac_executable_extensions; do
3050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3051 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3053 break 2
3054 fi
3055 done
3056 done
3057 IFS=$as_save_IFS
3058
3059 fi
3060 fi
3061 CC=$ac_cv_prog_CC
3062 if test -n "$CC"; then
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3064 $as_echo "$CC" >&6; }
3065 else
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3067 $as_echo "no" >&6; }
3068 fi
3069
3070
3071 fi
3072 if test -z "$ac_cv_prog_CC"; then
3073 ac_ct_CC=$CC
3074 # Extract the first word of "gcc", so it can be a program name with args.
3075 set dummy gcc; ac_word=$2
3076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3077 $as_echo_n "checking for $ac_word... " >&6; }
3078 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3079 $as_echo_n "(cached) " >&6
3080 else
3081 if test -n "$ac_ct_CC"; then
3082 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3083 else
3084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3085 for as_dir in $PATH
3086 do
3087 IFS=$as_save_IFS
3088 test -z "$as_dir" && as_dir=.
3089 for ac_exec_ext in '' $ac_executable_extensions; do
3090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3091 ac_cv_prog_ac_ct_CC="gcc"
3092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3093 break 2
3094 fi
3095 done
3096 done
3097 IFS=$as_save_IFS
3098
3099 fi
3100 fi
3101 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3102 if test -n "$ac_ct_CC"; then
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3104 $as_echo "$ac_ct_CC" >&6; }
3105 else
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3107 $as_echo "no" >&6; }
3108 fi
3109
3110 if test "x$ac_ct_CC" = x; then
3111 CC=""
3112 else
3113 case $cross_compiling:$ac_tool_warned in
3114 yes:)
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3116 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3117 ac_tool_warned=yes ;;
3118 esac
3119 CC=$ac_ct_CC
3120 fi
3121 else
3122 CC="$ac_cv_prog_CC"
3123 fi
3124
3125 if test -z "$CC"; then
3126 if test -n "$ac_tool_prefix"; then
3127 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3128 set dummy ${ac_tool_prefix}cc; ac_word=$2
3129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3130 $as_echo_n "checking for $ac_word... " >&6; }
3131 if ${ac_cv_prog_CC+:} false; then :
3132 $as_echo_n "(cached) " >&6
3133 else
3134 if test -n "$CC"; then
3135 ac_cv_prog_CC="$CC" # Let the user override the test.
3136 else
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 ac_cv_prog_CC="${ac_tool_prefix}cc"
3145 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3146 break 2
3147 fi
3148 done
3149 done
3150 IFS=$as_save_IFS
3151
3152 fi
3153 fi
3154 CC=$ac_cv_prog_CC
3155 if test -n "$CC"; then
3156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3157 $as_echo "$CC" >&6; }
3158 else
3159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3160 $as_echo "no" >&6; }
3161 fi
3162
3163
3164 fi
3165 fi
3166 if test -z "$CC"; then
3167 # Extract the first word of "cc", so it can be a program name with args.
3168 set dummy cc; ac_word=$2
3169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3170 $as_echo_n "checking for $ac_word... " >&6; }
3171 if ${ac_cv_prog_CC+:} false; then :
3172 $as_echo_n "(cached) " >&6
3173 else
3174 if test -n "$CC"; then
3175 ac_cv_prog_CC="$CC" # Let the user override the test.
3176 else
3177 ac_prog_rejected=no
3178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3179 for as_dir in $PATH
3180 do
3181 IFS=$as_save_IFS
3182 test -z "$as_dir" && as_dir=.
3183 for ac_exec_ext in '' $ac_executable_extensions; do
3184 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3185 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3186 ac_prog_rejected=yes
3187 continue
3188 fi
3189 ac_cv_prog_CC="cc"
3190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3191 break 2
3192 fi
3193 done
3194 done
3195 IFS=$as_save_IFS
3196
3197 if test $ac_prog_rejected = yes; then
3198 # We found a bogon in the path, so make sure we never use it.
3199 set dummy $ac_cv_prog_CC
3200 shift
3201 if test $# != 0; then
3202 # We chose a different compiler from the bogus one.
3203 # However, it has the same basename, so the bogon will be chosen
3204 # first if we set CC to just the basename; use the full file name.
3205 shift
3206 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3207 fi
3208 fi
3209 fi
3210 fi
3211 CC=$ac_cv_prog_CC
3212 if test -n "$CC"; then
3213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3214 $as_echo "$CC" >&6; }
3215 else
3216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3217 $as_echo "no" >&6; }
3218 fi
3219
3220
3221 fi
3222 if test -z "$CC"; then
3223 if test -n "$ac_tool_prefix"; then
3224 for ac_prog in cl.exe
3225 do
3226 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3227 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3229 $as_echo_n "checking for $ac_word... " >&6; }
3230 if ${ac_cv_prog_CC+:} false; then :
3231 $as_echo_n "(cached) " >&6
3232 else
3233 if test -n "$CC"; then
3234 ac_cv_prog_CC="$CC" # Let the user override the test.
3235 else
3236 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3237 for as_dir in $PATH
3238 do
3239 IFS=$as_save_IFS
3240 test -z "$as_dir" && as_dir=.
3241 for ac_exec_ext in '' $ac_executable_extensions; do
3242 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3243 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3244 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3245 break 2
3246 fi
3247 done
3248 done
3249 IFS=$as_save_IFS
3250
3251 fi
3252 fi
3253 CC=$ac_cv_prog_CC
3254 if test -n "$CC"; then
3255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3256 $as_echo "$CC" >&6; }
3257 else
3258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3259 $as_echo "no" >&6; }
3260 fi
3261
3262
3263 test -n "$CC" && break
3264 done
3265 fi
3266 if test -z "$CC"; then
3267 ac_ct_CC=$CC
3268 for ac_prog in cl.exe
3269 do
3270 # Extract the first word of "$ac_prog", so it can be a program name with args.
3271 set dummy $ac_prog; ac_word=$2
3272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3273 $as_echo_n "checking for $ac_word... " >&6; }
3274 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3275 $as_echo_n "(cached) " >&6
3276 else
3277 if test -n "$ac_ct_CC"; then
3278 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3279 else
3280 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3281 for as_dir in $PATH
3282 do
3283 IFS=$as_save_IFS
3284 test -z "$as_dir" && as_dir=.
3285 for ac_exec_ext in '' $ac_executable_extensions; do
3286 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3287 ac_cv_prog_ac_ct_CC="$ac_prog"
3288 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3289 break 2
3290 fi
3291 done
3292 done
3293 IFS=$as_save_IFS
3294
3295 fi
3296 fi
3297 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3298 if test -n "$ac_ct_CC"; then
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3300 $as_echo "$ac_ct_CC" >&6; }
3301 else
3302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3303 $as_echo "no" >&6; }
3304 fi
3305
3306
3307 test -n "$ac_ct_CC" && break
3308 done
3309
3310 if test "x$ac_ct_CC" = x; then
3311 CC=""
3312 else
3313 case $cross_compiling:$ac_tool_warned in
3314 yes:)
3315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3316 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3317 ac_tool_warned=yes ;;
3318 esac
3319 CC=$ac_ct_CC
3320 fi
3321 fi
3322
3323 fi
3324
3325
3326 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3327 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3328 as_fn_error $? "no acceptable C compiler found in \$PATH
3329 See \`config.log' for more details" "$LINENO" 5; }
3330
3331 # Provide some information about the compiler.
3332 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3333 set X $ac_compile
3334 ac_compiler=$2
3335 for ac_option in --version -v -V -qversion; do
3336 { { ac_try="$ac_compiler $ac_option >&5"
3337 case "(($ac_try" in
3338 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3339 *) ac_try_echo=$ac_try;;
3340 esac
3341 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3342 $as_echo "$ac_try_echo"; } >&5
3343 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3344 ac_status=$?
3345 if test -s conftest.err; then
3346 sed '10a\
3347 ... rest of stderr output deleted ...
3348 10q' conftest.err >conftest.er1
3349 cat conftest.er1 >&5
3350 fi
3351 rm -f conftest.er1 conftest.err
3352 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3353 test $ac_status = 0; }
3354 done
3355
3356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3357 /* end confdefs.h. */
3358
3359 int
3360 main ()
3361 {
3362
3363 ;
3364 return 0;
3365 }
3366 _ACEOF
3367 ac_clean_files_save=$ac_clean_files
3368 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3369 # Try to create an executable without -o first, disregard a.out.
3370 # It will help us diagnose broken compilers, and finding out an intuition
3371 # of exeext.
3372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3373 $as_echo_n "checking whether the C compiler works... " >&6; }
3374 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3375
3376 # The possible output files:
3377 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3378
3379 ac_rmfiles=
3380 for ac_file in $ac_files
3381 do
3382 case $ac_file in
3383 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3384 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3385 esac
3386 done
3387 rm -f $ac_rmfiles
3388
3389 if { { ac_try="$ac_link_default"
3390 case "(($ac_try" in
3391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3392 *) ac_try_echo=$ac_try;;
3393 esac
3394 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3395 $as_echo "$ac_try_echo"; } >&5
3396 (eval "$ac_link_default") 2>&5
3397 ac_status=$?
3398 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3399 test $ac_status = 0; }; then :
3400 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3401 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3402 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3403 # so that the user can short-circuit this test for compilers unknown to
3404 # Autoconf.
3405 for ac_file in $ac_files ''
3406 do
3407 test -f "$ac_file" || continue
3408 case $ac_file in
3409 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3410 ;;
3411 [ab].out )
3412 # We found the default executable, but exeext='' is most
3413 # certainly right.
3414 break;;
3415 *.* )
3416 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3417 then :; else
3418 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3419 fi
3420 # We set ac_cv_exeext here because the later test for it is not
3421 # safe: cross compilers may not add the suffix if given an `-o'
3422 # argument, so we may need to know it at that point already.
3423 # Even if this section looks crufty: it has the advantage of
3424 # actually working.
3425 break;;
3426 * )
3427 break;;
3428 esac
3429 done
3430 test "$ac_cv_exeext" = no && ac_cv_exeext=
3431
3432 else
3433 ac_file=''
3434 fi
3435 if test -z "$ac_file"; then :
3436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3437 $as_echo "no" >&6; }
3438 $as_echo "$as_me: failed program was:" >&5
3439 sed 's/^/| /' conftest.$ac_ext >&5
3440
3441 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3442 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3443 as_fn_error 77 "C compiler cannot create executables
3444 See \`config.log' for more details" "$LINENO" 5; }
3445 else
3446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3447 $as_echo "yes" >&6; }
3448 fi
3449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3450 $as_echo_n "checking for C compiler default output file name... " >&6; }
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3452 $as_echo "$ac_file" >&6; }
3453 ac_exeext=$ac_cv_exeext
3454
3455 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3456 ac_clean_files=$ac_clean_files_save
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3458 $as_echo_n "checking for suffix of executables... " >&6; }
3459 if { { ac_try="$ac_link"
3460 case "(($ac_try" in
3461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3462 *) ac_try_echo=$ac_try;;
3463 esac
3464 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3465 $as_echo "$ac_try_echo"; } >&5
3466 (eval "$ac_link") 2>&5
3467 ac_status=$?
3468 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3469 test $ac_status = 0; }; then :
3470 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3471 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3472 # work properly (i.e., refer to `conftest.exe'), while it won't with
3473 # `rm'.
3474 for ac_file in conftest.exe conftest conftest.*; do
3475 test -f "$ac_file" || continue
3476 case $ac_file in
3477 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3478 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3479 break;;
3480 * ) break;;
3481 esac
3482 done
3483 else
3484 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3485 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3486 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3487 See \`config.log' for more details" "$LINENO" 5; }
3488 fi
3489 rm -f conftest conftest$ac_cv_exeext
3490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3491 $as_echo "$ac_cv_exeext" >&6; }
3492
3493 rm -f conftest.$ac_ext
3494 EXEEXT=$ac_cv_exeext
3495 ac_exeext=$EXEEXT
3496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3497 /* end confdefs.h. */
3498 #include <stdio.h>
3499 int
3500 main ()
3501 {
3502 FILE *f = fopen ("conftest.out", "w");
3503 return ferror (f) || fclose (f) != 0;
3504
3505 ;
3506 return 0;
3507 }
3508 _ACEOF
3509 ac_clean_files="$ac_clean_files conftest.out"
3510 # Check that the compiler produces executables we can run. If not, either
3511 # the compiler is broken, or we cross compile.
3512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3513 $as_echo_n "checking whether we are cross compiling... " >&6; }
3514 if test "$cross_compiling" != yes; then
3515 { { ac_try="$ac_link"
3516 case "(($ac_try" in
3517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3518 *) ac_try_echo=$ac_try;;
3519 esac
3520 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3521 $as_echo "$ac_try_echo"; } >&5
3522 (eval "$ac_link") 2>&5
3523 ac_status=$?
3524 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3525 test $ac_status = 0; }
3526 if { ac_try='./conftest$ac_cv_exeext'
3527 { { case "(($ac_try" in
3528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3529 *) ac_try_echo=$ac_try;;
3530 esac
3531 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3532 $as_echo "$ac_try_echo"; } >&5
3533 (eval "$ac_try") 2>&5
3534 ac_status=$?
3535 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3536 test $ac_status = 0; }; }; then
3537 cross_compiling=no
3538 else
3539 if test "$cross_compiling" = maybe; then
3540 cross_compiling=yes
3541 else
3542 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3543 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3544 as_fn_error $? "cannot run C compiled programs.
3545 If you meant to cross compile, use \`--host'.
3546 See \`config.log' for more details" "$LINENO" 5; }
3547 fi
3548 fi
3549 fi
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3551 $as_echo "$cross_compiling" >&6; }
3552
3553 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3554 ac_clean_files=$ac_clean_files_save
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3556 $as_echo_n "checking for suffix of object files... " >&6; }
3557 if ${ac_cv_objext+:} false; then :
3558 $as_echo_n "(cached) " >&6
3559 else
3560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3561 /* end confdefs.h. */
3562
3563 int
3564 main ()
3565 {
3566
3567 ;
3568 return 0;
3569 }
3570 _ACEOF
3571 rm -f conftest.o conftest.obj
3572 if { { ac_try="$ac_compile"
3573 case "(($ac_try" in
3574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3575 *) ac_try_echo=$ac_try;;
3576 esac
3577 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3578 $as_echo "$ac_try_echo"; } >&5
3579 (eval "$ac_compile") 2>&5
3580 ac_status=$?
3581 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3582 test $ac_status = 0; }; then :
3583 for ac_file in conftest.o conftest.obj conftest.*; do
3584 test -f "$ac_file" || continue;
3585 case $ac_file in
3586 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3587 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3588 break;;
3589 esac
3590 done
3591 else
3592 $as_echo "$as_me: failed program was:" >&5
3593 sed 's/^/| /' conftest.$ac_ext >&5
3594
3595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3596 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3597 as_fn_error $? "cannot compute suffix of object files: cannot compile
3598 See \`config.log' for more details" "$LINENO" 5; }
3599 fi
3600 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3601 fi
3602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3603 $as_echo "$ac_cv_objext" >&6; }
3604 OBJEXT=$ac_cv_objext
3605 ac_objext=$OBJEXT
3606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3607 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3608 if ${ac_cv_c_compiler_gnu+:} false; then :
3609 $as_echo_n "(cached) " >&6
3610 else
3611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3612 /* end confdefs.h. */
3613
3614 int
3615 main ()
3616 {
3617 #ifndef __GNUC__
3618 choke me
3619 #endif
3620
3621 ;
3622 return 0;
3623 }
3624 _ACEOF
3625 if ac_fn_c_try_compile "$LINENO"; then :
3626 ac_compiler_gnu=yes
3627 else
3628 ac_compiler_gnu=no
3629 fi
3630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3631 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3632
3633 fi
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3635 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3636 if test $ac_compiler_gnu = yes; then
3637 GCC=yes
3638 else
3639 GCC=
3640 fi
3641 ac_test_CFLAGS=${CFLAGS+set}
3642 ac_save_CFLAGS=$CFLAGS
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3644 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3645 if ${ac_cv_prog_cc_g+:} false; then :
3646 $as_echo_n "(cached) " >&6
3647 else
3648 ac_save_c_werror_flag=$ac_c_werror_flag
3649 ac_c_werror_flag=yes
3650 ac_cv_prog_cc_g=no
3651 CFLAGS="-g"
3652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3653 /* end confdefs.h. */
3654
3655 int
3656 main ()
3657 {
3658
3659 ;
3660 return 0;
3661 }
3662 _ACEOF
3663 if ac_fn_c_try_compile "$LINENO"; then :
3664 ac_cv_prog_cc_g=yes
3665 else
3666 CFLAGS=""
3667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3668 /* end confdefs.h. */
3669
3670 int
3671 main ()
3672 {
3673
3674 ;
3675 return 0;
3676 }
3677 _ACEOF
3678 if ac_fn_c_try_compile "$LINENO"; then :
3679
3680 else
3681 ac_c_werror_flag=$ac_save_c_werror_flag
3682 CFLAGS="-g"
3683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3684 /* end confdefs.h. */
3685
3686 int
3687 main ()
3688 {
3689
3690 ;
3691 return 0;
3692 }
3693 _ACEOF
3694 if ac_fn_c_try_compile "$LINENO"; then :
3695 ac_cv_prog_cc_g=yes
3696 fi
3697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3698 fi
3699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3700 fi
3701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3702 ac_c_werror_flag=$ac_save_c_werror_flag
3703 fi
3704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3705 $as_echo "$ac_cv_prog_cc_g" >&6; }
3706 if test "$ac_test_CFLAGS" = set; then
3707 CFLAGS=$ac_save_CFLAGS
3708 elif test $ac_cv_prog_cc_g = yes; then
3709 if test "$GCC" = yes; then
3710 CFLAGS="-g -O2"
3711 else
3712 CFLAGS="-g"
3713 fi
3714 else
3715 if test "$GCC" = yes; then
3716 CFLAGS="-O2"
3717 else
3718 CFLAGS=
3719 fi
3720 fi
3721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3722 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3723 if ${ac_cv_prog_cc_c89+:} false; then :
3724 $as_echo_n "(cached) " >&6
3725 else
3726 ac_cv_prog_cc_c89=no
3727 ac_save_CC=$CC
3728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3729 /* end confdefs.h. */
3730 #include <stdarg.h>
3731 #include <stdio.h>
3732 struct stat;
3733 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3734 struct buf { int x; };
3735 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3736 static char *e (p, i)
3737 char **p;
3738 int i;
3739 {
3740 return p[i];
3741 }
3742 static char *f (char * (*g) (char **, int), char **p, ...)
3743 {
3744 char *s;
3745 va_list v;
3746 va_start (v,p);
3747 s = g (p, va_arg (v,int));
3748 va_end (v);
3749 return s;
3750 }
3751
3752 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3753 function prototypes and stuff, but not '\xHH' hex character constants.
3754 These don't provoke an error unfortunately, instead are silently treated
3755 as 'x'. The following induces an error, until -std is added to get
3756 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3757 array size at least. It's necessary to write '\x00'==0 to get something
3758 that's true only with -std. */
3759 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3760
3761 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3762 inside strings and character constants. */
3763 #define FOO(x) 'x'
3764 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3765
3766 int test (int i, double x);
3767 struct s1 {int (*f) (int a);};
3768 struct s2 {int (*f) (double a);};
3769 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3770 int argc;
3771 char **argv;
3772 int
3773 main ()
3774 {
3775 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3776 ;
3777 return 0;
3778 }
3779 _ACEOF
3780 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3781 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3782 do
3783 CC="$ac_save_CC $ac_arg"
3784 if ac_fn_c_try_compile "$LINENO"; then :
3785 ac_cv_prog_cc_c89=$ac_arg
3786 fi
3787 rm -f core conftest.err conftest.$ac_objext
3788 test "x$ac_cv_prog_cc_c89" != "xno" && break
3789 done
3790 rm -f conftest.$ac_ext
3791 CC=$ac_save_CC
3792
3793 fi
3794 # AC_CACHE_VAL
3795 case "x$ac_cv_prog_cc_c89" in
3796 x)
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3798 $as_echo "none needed" >&6; } ;;
3799 xno)
3800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3801 $as_echo "unsupported" >&6; } ;;
3802 *)
3803 CC="$CC $ac_cv_prog_cc_c89"
3804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3805 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3806 esac
3807 if test "x$ac_cv_prog_cc_c89" != xno; then :
3808
3809 fi
3810
3811 ac_ext=c
3812 ac_cpp='$CPP $CPPFLAGS'
3813 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3814 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3815 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3816
3817 ac_ext=cpp
3818 ac_cpp='$CXXCPP $CPPFLAGS'
3819 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3820 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3821 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3822 if test -z "$CXX"; then
3823 if test -n "$CCC"; then
3824 CXX=$CCC
3825 else
3826 if test -n "$ac_tool_prefix"; then
3827 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3828 do
3829 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3830 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3832 $as_echo_n "checking for $ac_word... " >&6; }
3833 if ${ac_cv_prog_CXX+:} false; then :
3834 $as_echo_n "(cached) " >&6
3835 else
3836 if test -n "$CXX"; then
3837 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3838 else
3839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3840 for as_dir in $PATH
3841 do
3842 IFS=$as_save_IFS
3843 test -z "$as_dir" && as_dir=.
3844 for ac_exec_ext in '' $ac_executable_extensions; do
3845 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3846 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3847 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3848 break 2
3849 fi
3850 done
3851 done
3852 IFS=$as_save_IFS
3853
3854 fi
3855 fi
3856 CXX=$ac_cv_prog_CXX
3857 if test -n "$CXX"; then
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3859 $as_echo "$CXX" >&6; }
3860 else
3861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3862 $as_echo "no" >&6; }
3863 fi
3864
3865
3866 test -n "$CXX" && break
3867 done
3868 fi
3869 if test -z "$CXX"; then
3870 ac_ct_CXX=$CXX
3871 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3872 do
3873 # Extract the first word of "$ac_prog", so it can be a program name with args.
3874 set dummy $ac_prog; ac_word=$2
3875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3876 $as_echo_n "checking for $ac_word... " >&6; }
3877 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3878 $as_echo_n "(cached) " >&6
3879 else
3880 if test -n "$ac_ct_CXX"; then
3881 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3882 else
3883 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3884 for as_dir in $PATH
3885 do
3886 IFS=$as_save_IFS
3887 test -z "$as_dir" && as_dir=.
3888 for ac_exec_ext in '' $ac_executable_extensions; do
3889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3890 ac_cv_prog_ac_ct_CXX="$ac_prog"
3891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3892 break 2
3893 fi
3894 done
3895 done
3896 IFS=$as_save_IFS
3897
3898 fi
3899 fi
3900 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3901 if test -n "$ac_ct_CXX"; then
3902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3903 $as_echo "$ac_ct_CXX" >&6; }
3904 else
3905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3906 $as_echo "no" >&6; }
3907 fi
3908
3909
3910 test -n "$ac_ct_CXX" && break
3911 done
3912
3913 if test "x$ac_ct_CXX" = x; then
3914 CXX="g++"
3915 else
3916 case $cross_compiling:$ac_tool_warned in
3917 yes:)
3918 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3919 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3920 ac_tool_warned=yes ;;
3921 esac
3922 CXX=$ac_ct_CXX
3923 fi
3924 fi
3925
3926 fi
3927 fi
3928 # Provide some information about the compiler.
3929 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3930 set X $ac_compile
3931 ac_compiler=$2
3932 for ac_option in --version -v -V -qversion; do
3933 { { ac_try="$ac_compiler $ac_option >&5"
3934 case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937 esac
3938 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939 $as_echo "$ac_try_echo"; } >&5
3940 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3941 ac_status=$?
3942 if test -s conftest.err; then
3943 sed '10a\
3944 ... rest of stderr output deleted ...
3945 10q' conftest.err >conftest.er1
3946 cat conftest.er1 >&5
3947 fi
3948 rm -f conftest.er1 conftest.err
3949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3950 test $ac_status = 0; }
3951 done
3952
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3954 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3955 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3956 $as_echo_n "(cached) " >&6
3957 else
3958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3959 /* end confdefs.h. */
3960
3961 int
3962 main ()
3963 {
3964 #ifndef __GNUC__
3965 choke me
3966 #endif
3967
3968 ;
3969 return 0;
3970 }
3971 _ACEOF
3972 if ac_fn_cxx_try_compile "$LINENO"; then :
3973 ac_compiler_gnu=yes
3974 else
3975 ac_compiler_gnu=no
3976 fi
3977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3978 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3979
3980 fi
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3982 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3983 if test $ac_compiler_gnu = yes; then
3984 GXX=yes
3985 else
3986 GXX=
3987 fi
3988 ac_test_CXXFLAGS=${CXXFLAGS+set}
3989 ac_save_CXXFLAGS=$CXXFLAGS
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3991 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3992 if ${ac_cv_prog_cxx_g+:} false; then :
3993 $as_echo_n "(cached) " >&6
3994 else
3995 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3996 ac_cxx_werror_flag=yes
3997 ac_cv_prog_cxx_g=no
3998 CXXFLAGS="-g"
3999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4000 /* end confdefs.h. */
4001
4002 int
4003 main ()
4004 {
4005
4006 ;
4007 return 0;
4008 }
4009 _ACEOF
4010 if ac_fn_cxx_try_compile "$LINENO"; then :
4011 ac_cv_prog_cxx_g=yes
4012 else
4013 CXXFLAGS=""
4014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4015 /* end confdefs.h. */
4016
4017 int
4018 main ()
4019 {
4020
4021 ;
4022 return 0;
4023 }
4024 _ACEOF
4025 if ac_fn_cxx_try_compile "$LINENO"; then :
4026
4027 else
4028 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4029 CXXFLAGS="-g"
4030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4031 /* end confdefs.h. */
4032
4033 int
4034 main ()
4035 {
4036
4037 ;
4038 return 0;
4039 }
4040 _ACEOF
4041 if ac_fn_cxx_try_compile "$LINENO"; then :
4042 ac_cv_prog_cxx_g=yes
4043 fi
4044 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4045 fi
4046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4047 fi
4048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4049 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4050 fi
4051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4052 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4053 if test "$ac_test_CXXFLAGS" = set; then
4054 CXXFLAGS=$ac_save_CXXFLAGS
4055 elif test $ac_cv_prog_cxx_g = yes; then
4056 if test "$GXX" = yes; then
4057 CXXFLAGS="-g -O2"
4058 else
4059 CXXFLAGS="-g"
4060 fi
4061 else
4062 if test "$GXX" = yes; then
4063 CXXFLAGS="-O2"
4064 else
4065 CXXFLAGS=
4066 fi
4067 fi
4068 ac_ext=c
4069 ac_cpp='$CPP $CPPFLAGS'
4070 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4071 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4072 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4073
4074
4075
4076 ac_ext=c
4077 ac_cpp='$CPP $CPPFLAGS'
4078 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4079 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4080 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4082 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4083 # On Suns, sometimes $CPP names a directory.
4084 if test -n "$CPP" && test -d "$CPP"; then
4085 CPP=
4086 fi
4087 if test -z "$CPP"; then
4088 if ${ac_cv_prog_CPP+:} false; then :
4089 $as_echo_n "(cached) " >&6
4090 else
4091 # Double quotes because CPP needs to be expanded
4092 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4093 do
4094 ac_preproc_ok=false
4095 for ac_c_preproc_warn_flag in '' yes
4096 do
4097 # Use a header file that comes with gcc, so configuring glibc
4098 # with a fresh cross-compiler works.
4099 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4100 # <limits.h> exists even on freestanding compilers.
4101 # On the NeXT, cc -E runs the code through the compiler's parser,
4102 # not just through cpp. "Syntax error" is here to catch this case.
4103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4104 /* end confdefs.h. */
4105 #ifdef __STDC__
4106 # include <limits.h>
4107 #else
4108 # include <assert.h>
4109 #endif
4110 Syntax error
4111 _ACEOF
4112 if ac_fn_c_try_cpp "$LINENO"; then :
4113
4114 else
4115 # Broken: fails on valid input.
4116 continue
4117 fi
4118 rm -f conftest.err conftest.i conftest.$ac_ext
4119
4120 # OK, works on sane cases. Now check whether nonexistent headers
4121 # can be detected and how.
4122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4123 /* end confdefs.h. */
4124 #include <ac_nonexistent.h>
4125 _ACEOF
4126 if ac_fn_c_try_cpp "$LINENO"; then :
4127 # Broken: success on invalid input.
4128 continue
4129 else
4130 # Passes both tests.
4131 ac_preproc_ok=:
4132 break
4133 fi
4134 rm -f conftest.err conftest.i conftest.$ac_ext
4135
4136 done
4137 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4138 rm -f conftest.i conftest.err conftest.$ac_ext
4139 if $ac_preproc_ok; then :
4140 break
4141 fi
4142
4143 done
4144 ac_cv_prog_CPP=$CPP
4145
4146 fi
4147 CPP=$ac_cv_prog_CPP
4148 else
4149 ac_cv_prog_CPP=$CPP
4150 fi
4151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4152 $as_echo "$CPP" >&6; }
4153 ac_preproc_ok=false
4154 for ac_c_preproc_warn_flag in '' yes
4155 do
4156 # Use a header file that comes with gcc, so configuring glibc
4157 # with a fresh cross-compiler works.
4158 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4159 # <limits.h> exists even on freestanding compilers.
4160 # On the NeXT, cc -E runs the code through the compiler's parser,
4161 # not just through cpp. "Syntax error" is here to catch this case.
4162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4163 /* end confdefs.h. */
4164 #ifdef __STDC__
4165 # include <limits.h>
4166 #else
4167 # include <assert.h>
4168 #endif
4169 Syntax error
4170 _ACEOF
4171 if ac_fn_c_try_cpp "$LINENO"; then :
4172
4173 else
4174 # Broken: fails on valid input.
4175 continue
4176 fi
4177 rm -f conftest.err conftest.i conftest.$ac_ext
4178
4179 # OK, works on sane cases. Now check whether nonexistent headers
4180 # can be detected and how.
4181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4182 /* end confdefs.h. */
4183 #include <ac_nonexistent.h>
4184 _ACEOF
4185 if ac_fn_c_try_cpp "$LINENO"; then :
4186 # Broken: success on invalid input.
4187 continue
4188 else
4189 # Passes both tests.
4190 ac_preproc_ok=:
4191 break
4192 fi
4193 rm -f conftest.err conftest.i conftest.$ac_ext
4194
4195 done
4196 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4197 rm -f conftest.i conftest.err conftest.$ac_ext
4198 if $ac_preproc_ok; then :
4199
4200 else
4201 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4202 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4203 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4204 See \`config.log' for more details" "$LINENO" 5; }
4205 fi
4206
4207 ac_ext=c
4208 ac_cpp='$CPP $CPPFLAGS'
4209 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4210 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4211 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4212
4213
4214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4215 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4216 if ${ac_cv_path_GREP+:} false; then :
4217 $as_echo_n "(cached) " >&6
4218 else
4219 if test -z "$GREP"; then
4220 ac_path_GREP_found=false
4221 # Loop through the user's path and test for each of PROGNAME-LIST
4222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4224 do
4225 IFS=$as_save_IFS
4226 test -z "$as_dir" && as_dir=.
4227 for ac_prog in grep ggrep; do
4228 for ac_exec_ext in '' $ac_executable_extensions; do
4229 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4230 as_fn_executable_p "$ac_path_GREP" || continue
4231 # Check for GNU ac_path_GREP and select it if it is found.
4232 # Check for GNU $ac_path_GREP
4233 case `"$ac_path_GREP" --version 2>&1` in
4234 *GNU*)
4235 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4236 *)
4237 ac_count=0
4238 $as_echo_n 0123456789 >"conftest.in"
4239 while :
4240 do
4241 cat "conftest.in" "conftest.in" >"conftest.tmp"
4242 mv "conftest.tmp" "conftest.in"
4243 cp "conftest.in" "conftest.nl"
4244 $as_echo 'GREP' >> "conftest.nl"
4245 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4246 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4247 as_fn_arith $ac_count + 1 && ac_count=$as_val
4248 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4249 # Best one so far, save it but keep looking for a better one
4250 ac_cv_path_GREP="$ac_path_GREP"
4251 ac_path_GREP_max=$ac_count
4252 fi
4253 # 10*(2^10) chars as input seems more than enough
4254 test $ac_count -gt 10 && break
4255 done
4256 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4257 esac
4258
4259 $ac_path_GREP_found && break 3
4260 done
4261 done
4262 done
4263 IFS=$as_save_IFS
4264 if test -z "$ac_cv_path_GREP"; then
4265 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4266 fi
4267 else
4268 ac_cv_path_GREP=$GREP
4269 fi
4270
4271 fi
4272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4273 $as_echo "$ac_cv_path_GREP" >&6; }
4274 GREP="$ac_cv_path_GREP"
4275
4276
4277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4278 $as_echo_n "checking for egrep... " >&6; }
4279 if ${ac_cv_path_EGREP+:} false; then :
4280 $as_echo_n "(cached) " >&6
4281 else
4282 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4283 then ac_cv_path_EGREP="$GREP -E"
4284 else
4285 if test -z "$EGREP"; then
4286 ac_path_EGREP_found=false
4287 # Loop through the user's path and test for each of PROGNAME-LIST
4288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4289 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4290 do
4291 IFS=$as_save_IFS
4292 test -z "$as_dir" && as_dir=.
4293 for ac_prog in egrep; do
4294 for ac_exec_ext in '' $ac_executable_extensions; do
4295 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4296 as_fn_executable_p "$ac_path_EGREP" || continue
4297 # Check for GNU ac_path_EGREP and select it if it is found.
4298 # Check for GNU $ac_path_EGREP
4299 case `"$ac_path_EGREP" --version 2>&1` in
4300 *GNU*)
4301 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4302 *)
4303 ac_count=0
4304 $as_echo_n 0123456789 >"conftest.in"
4305 while :
4306 do
4307 cat "conftest.in" "conftest.in" >"conftest.tmp"
4308 mv "conftest.tmp" "conftest.in"
4309 cp "conftest.in" "conftest.nl"
4310 $as_echo 'EGREP' >> "conftest.nl"
4311 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4312 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4313 as_fn_arith $ac_count + 1 && ac_count=$as_val
4314 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4315 # Best one so far, save it but keep looking for a better one
4316 ac_cv_path_EGREP="$ac_path_EGREP"
4317 ac_path_EGREP_max=$ac_count
4318 fi
4319 # 10*(2^10) chars as input seems more than enough
4320 test $ac_count -gt 10 && break
4321 done
4322 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4323 esac
4324
4325 $ac_path_EGREP_found && break 3
4326 done
4327 done
4328 done
4329 IFS=$as_save_IFS
4330 if test -z "$ac_cv_path_EGREP"; then
4331 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4332 fi
4333 else
4334 ac_cv_path_EGREP=$EGREP
4335 fi
4336
4337 fi
4338 fi
4339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4340 $as_echo "$ac_cv_path_EGREP" >&6; }
4341 EGREP="$ac_cv_path_EGREP"
4342
4343
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4345 $as_echo_n "checking for ANSI C header files... " >&6; }
4346 if ${ac_cv_header_stdc+:} false; then :
4347 $as_echo_n "(cached) " >&6
4348 else
4349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4350 /* end confdefs.h. */
4351 #include <stdlib.h>
4352 #include <stdarg.h>
4353 #include <string.h>
4354 #include <float.h>
4355
4356 int
4357 main ()
4358 {
4359
4360 ;
4361 return 0;
4362 }
4363 _ACEOF
4364 if ac_fn_c_try_compile "$LINENO"; then :
4365 ac_cv_header_stdc=yes
4366 else
4367 ac_cv_header_stdc=no
4368 fi
4369 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4370
4371 if test $ac_cv_header_stdc = yes; then
4372 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4374 /* end confdefs.h. */
4375 #include <string.h>
4376
4377 _ACEOF
4378 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4379 $EGREP "memchr" >/dev/null 2>&1; then :
4380
4381 else
4382 ac_cv_header_stdc=no
4383 fi
4384 rm -f conftest*
4385
4386 fi
4387
4388 if test $ac_cv_header_stdc = yes; then
4389 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4391 /* end confdefs.h. */
4392 #include <stdlib.h>
4393
4394 _ACEOF
4395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4396 $EGREP "free" >/dev/null 2>&1; then :
4397
4398 else
4399 ac_cv_header_stdc=no
4400 fi
4401 rm -f conftest*
4402
4403 fi
4404
4405 if test $ac_cv_header_stdc = yes; then
4406 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4407 if test "$cross_compiling" = yes; then :
4408 :
4409 else
4410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4411 /* end confdefs.h. */
4412 #include <ctype.h>
4413 #include <stdlib.h>
4414 #if ((' ' & 0x0FF) == 0x020)
4415 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4416 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4417 #else
4418 # define ISLOWER(c) \
4419 (('a' <= (c) && (c) <= 'i') \
4420 || ('j' <= (c) && (c) <= 'r') \
4421 || ('s' <= (c) && (c) <= 'z'))
4422 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4423 #endif
4424
4425 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4426 int
4427 main ()
4428 {
4429 int i;
4430 for (i = 0; i < 256; i++)
4431 if (XOR (islower (i), ISLOWER (i))
4432 || toupper (i) != TOUPPER (i))
4433 return 2;
4434 return 0;
4435 }
4436 _ACEOF
4437 if ac_fn_c_try_run "$LINENO"; then :
4438
4439 else
4440 ac_cv_header_stdc=no
4441 fi
4442 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4443 conftest.$ac_objext conftest.beam conftest.$ac_ext
4444 fi
4445
4446 fi
4447 fi
4448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4449 $as_echo "$ac_cv_header_stdc" >&6; }
4450 if test $ac_cv_header_stdc = yes; then
4451
4452 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4453
4454 fi
4455
4456 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4457 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4458 inttypes.h stdint.h unistd.h
4459 do :
4460 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4461 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4462 "
4463 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4464 cat >>confdefs.h <<_ACEOF
4465 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4466 _ACEOF
4467
4468 fi
4469
4470 done
4471
4472
4473
4474 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4475 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4476 MINIX=yes
4477 else
4478 MINIX=
4479 fi
4480
4481
4482 if test "$MINIX" = yes; then
4483
4484 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4485
4486
4487 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4488
4489
4490 $as_echo "#define _MINIX 1" >>confdefs.h
4491
4492 fi
4493
4494
4495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4496 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4497 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4498 $as_echo_n "(cached) " >&6
4499 else
4500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4501 /* end confdefs.h. */
4502
4503 # define __EXTENSIONS__ 1
4504 $ac_includes_default
4505 int
4506 main ()
4507 {
4508
4509 ;
4510 return 0;
4511 }
4512 _ACEOF
4513 if ac_fn_c_try_compile "$LINENO"; then :
4514 ac_cv_safe_to_define___extensions__=yes
4515 else
4516 ac_cv_safe_to_define___extensions__=no
4517 fi
4518 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4519 fi
4520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4521 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4522 test $ac_cv_safe_to_define___extensions__ = yes &&
4523 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4524
4525 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4526
4527 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4528
4529 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4530
4531 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4532
4533
4534 ac_aux_dir=
4535 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4536 if test -f "$ac_dir/install-sh"; then
4537 ac_aux_dir=$ac_dir
4538 ac_install_sh="$ac_aux_dir/install-sh -c"
4539 break
4540 elif test -f "$ac_dir/install.sh"; then
4541 ac_aux_dir=$ac_dir
4542 ac_install_sh="$ac_aux_dir/install.sh -c"
4543 break
4544 elif test -f "$ac_dir/shtool"; then
4545 ac_aux_dir=$ac_dir
4546 ac_install_sh="$ac_aux_dir/shtool install -c"
4547 break
4548 fi
4549 done
4550 if test -z "$ac_aux_dir"; then
4551 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4552 fi
4553
4554 # These three variables are undocumented and unsupported,
4555 # and are intended to be withdrawn in a future Autoconf release.
4556 # They can cause serious problems if a builder's source tree is in a directory
4557 # whose full name contains unusual characters.
4558 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4559 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4560 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4561
4562
4563 # Make sure we can run config.sub.
4564 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4565 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4566
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4568 $as_echo_n "checking build system type... " >&6; }
4569 if ${ac_cv_build+:} false; then :
4570 $as_echo_n "(cached) " >&6
4571 else
4572 ac_build_alias=$build_alias
4573 test "x$ac_build_alias" = x &&
4574 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4575 test "x$ac_build_alias" = x &&
4576 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4577 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4578 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4579
4580 fi
4581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4582 $as_echo "$ac_cv_build" >&6; }
4583 case $ac_cv_build in
4584 *-*-*) ;;
4585 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4586 esac
4587 build=$ac_cv_build
4588 ac_save_IFS=$IFS; IFS='-'
4589 set x $ac_cv_build
4590 shift
4591 build_cpu=$1
4592 build_vendor=$2
4593 shift; shift
4594 # Remember, the first character of IFS is used to create $*,
4595 # except with old shells:
4596 build_os=$*
4597 IFS=$ac_save_IFS
4598 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4599
4600
4601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4602 $as_echo_n "checking host system type... " >&6; }
4603 if ${ac_cv_host+:} false; then :
4604 $as_echo_n "(cached) " >&6
4605 else
4606 if test "x$host_alias" = x; then
4607 ac_cv_host=$ac_cv_build
4608 else
4609 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4610 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4611 fi
4612
4613 fi
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4615 $as_echo "$ac_cv_host" >&6; }
4616 case $ac_cv_host in
4617 *-*-*) ;;
4618 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4619 esac
4620 host=$ac_cv_host
4621 ac_save_IFS=$IFS; IFS='-'
4622 set x $ac_cv_host
4623 shift
4624 host_cpu=$1
4625 host_vendor=$2
4626 shift; shift
4627 # Remember, the first character of IFS is used to create $*,
4628 # except with old shells:
4629 host_os=$*
4630 IFS=$ac_save_IFS
4631 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4632
4633
4634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4635 $as_echo_n "checking target system type... " >&6; }
4636 if ${ac_cv_target+:} false; then :
4637 $as_echo_n "(cached) " >&6
4638 else
4639 if test "x$target_alias" = x; then
4640 ac_cv_target=$ac_cv_host
4641 else
4642 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4643 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4644 fi
4645
4646 fi
4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4648 $as_echo "$ac_cv_target" >&6; }
4649 case $ac_cv_target in
4650 *-*-*) ;;
4651 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4652 esac
4653 target=$ac_cv_target
4654 ac_save_IFS=$IFS; IFS='-'
4655 set x $ac_cv_target
4656 shift
4657 target_cpu=$1
4658 target_vendor=$2
4659 shift; shift
4660 # Remember, the first character of IFS is used to create $*,
4661 # except with old shells:
4662 target_os=$*
4663 IFS=$ac_save_IFS
4664 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4665
4666
4667 # The aliases save the names the user supplied, while $host etc.
4668 # will get canonicalized.
4669 test -n "$target_alias" &&
4670 test "$program_prefix$program_suffix$program_transform_name" = \
4671 NONENONEs,x,x, &&
4672 program_prefix=${target_alias}-
4673
4674 # The tests for host and target for $enable_largefile require
4675 # canonical names.
4676
4677
4678
4679 # As the $enable_largefile decision depends on --enable-plugins we must set it
4680 # even in directories otherwise not depending on the $plugins option.
4681
4682
4683 maybe_plugins=no
4684 for ac_header in dlfcn.h
4685 do :
4686 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4687 "
4688 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4689 cat >>confdefs.h <<_ACEOF
4690 #define HAVE_DLFCN_H 1
4691 _ACEOF
4692 maybe_plugins=yes
4693 fi
4694
4695 done
4696
4697 for ac_header in windows.h
4698 do :
4699 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4700 "
4701 if test "x$ac_cv_header_windows_h" = xyes; then :
4702 cat >>confdefs.h <<_ACEOF
4703 #define HAVE_WINDOWS_H 1
4704 _ACEOF
4705 maybe_plugins=yes
4706 fi
4707
4708 done
4709
4710
4711 # Check whether --enable-plugins was given.
4712 if test "${enable_plugins+set}" = set; then :
4713 enableval=$enable_plugins; case "${enableval}" in
4714 no) plugins=no ;;
4715 *) plugins=yes
4716 if test "$maybe_plugins" != "yes" ; then
4717 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4718 fi ;;
4719 esac
4720 else
4721 plugins=$maybe_plugins
4722
4723 fi
4724
4725 if test "$plugins" = "yes"; then
4726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4727 $as_echo_n "checking for library containing dlsym... " >&6; }
4728 if ${ac_cv_search_dlsym+:} false; then :
4729 $as_echo_n "(cached) " >&6
4730 else
4731 ac_func_search_save_LIBS=$LIBS
4732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4733 /* end confdefs.h. */
4734
4735 /* Override any GCC internal prototype to avoid an error.
4736 Use char because int might match the return type of a GCC
4737 builtin and then its argument prototype would still apply. */
4738 #ifdef __cplusplus
4739 extern "C"
4740 #endif
4741 char dlsym ();
4742 int
4743 main ()
4744 {
4745 return dlsym ();
4746 ;
4747 return 0;
4748 }
4749 _ACEOF
4750 for ac_lib in '' dl; do
4751 if test -z "$ac_lib"; then
4752 ac_res="none required"
4753 else
4754 ac_res=-l$ac_lib
4755 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4756 fi
4757 if ac_fn_c_try_link "$LINENO"; then :
4758 ac_cv_search_dlsym=$ac_res
4759 fi
4760 rm -f core conftest.err conftest.$ac_objext \
4761 conftest$ac_exeext
4762 if ${ac_cv_search_dlsym+:} false; then :
4763 break
4764 fi
4765 done
4766 if ${ac_cv_search_dlsym+:} false; then :
4767
4768 else
4769 ac_cv_search_dlsym=no
4770 fi
4771 rm conftest.$ac_ext
4772 LIBS=$ac_func_search_save_LIBS
4773 fi
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4775 $as_echo "$ac_cv_search_dlsym" >&6; }
4776 ac_res=$ac_cv_search_dlsym
4777 if test "$ac_res" != no; then :
4778 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4779
4780 fi
4781
4782 fi
4783
4784
4785 case "${host}" in
4786 sparc-*-solaris*|i?86-*-solaris*)
4787 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4788 # were mutually exclusive until Solaris 11.3. Without procfs support,
4789 # the bfd/ elf module cannot provide certain routines such as
4790 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4791 # explicitly requested large-file support through the
4792 # --enable-largefile switch, disable large-file support in favor of
4793 # procfs support.
4794 #
4795 # Check if <sys/procfs.h> is incompatible with large-file support.
4796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4797 /* end confdefs.h. */
4798 #define _FILE_OFFSET_BITS 64
4799 #define _STRUCTURED_PROC 1
4800 #include <sys/procfs.h>
4801 int
4802 main ()
4803 {
4804
4805 ;
4806 return 0;
4807 }
4808 _ACEOF
4809 if ac_fn_c_try_compile "$LINENO"; then :
4810 acx_cv_procfs_lfs=yes
4811 else
4812 acx_cv_procfs_lfs=no
4813 fi
4814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4815 #
4816 # Forcefully disable large-file support only if necessary, gdb is in
4817 # tree and enabled.
4818 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4819 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4820 : ${enable_largefile="no"}
4821 if test "$plugins" = yes; then
4822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4823 plugin support disabled; require large-file support which is incompatible with GDB." >&5
4824 $as_echo "$as_me: WARNING:
4825 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4826 plugins=no
4827 fi
4828 fi
4829 #
4830 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4831 # benefit of g++ 9+ which predefines it on Solaris.
4832 if test "$enable_largefile" = no; then
4833 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4834
4835 fi
4836 ;;
4837 esac
4838
4839 # Check whether --enable-largefile was given.
4840 if test "${enable_largefile+set}" = set; then :
4841 enableval=$enable_largefile;
4842 fi
4843
4844 if test "$enable_largefile" != no; then
4845
4846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4847 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4848 if ${ac_cv_sys_largefile_CC+:} false; then :
4849 $as_echo_n "(cached) " >&6
4850 else
4851 ac_cv_sys_largefile_CC=no
4852 if test "$GCC" != yes; then
4853 ac_save_CC=$CC
4854 while :; do
4855 # IRIX 6.2 and later do not support large files by default,
4856 # so use the C compiler's -n32 option if that helps.
4857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4858 /* end confdefs.h. */
4859 #include <sys/types.h>
4860 /* Check that off_t can represent 2**63 - 1 correctly.
4861 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4862 since some C++ compilers masquerading as C compilers
4863 incorrectly reject 9223372036854775807. */
4864 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4865 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4866 && LARGE_OFF_T % 2147483647 == 1)
4867 ? 1 : -1];
4868 int
4869 main ()
4870 {
4871
4872 ;
4873 return 0;
4874 }
4875 _ACEOF
4876 if ac_fn_c_try_compile "$LINENO"; then :
4877 break
4878 fi
4879 rm -f core conftest.err conftest.$ac_objext
4880 CC="$CC -n32"
4881 if ac_fn_c_try_compile "$LINENO"; then :
4882 ac_cv_sys_largefile_CC=' -n32'; break
4883 fi
4884 rm -f core conftest.err conftest.$ac_objext
4885 break
4886 done
4887 CC=$ac_save_CC
4888 rm -f conftest.$ac_ext
4889 fi
4890 fi
4891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4892 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4893 if test "$ac_cv_sys_largefile_CC" != no; then
4894 CC=$CC$ac_cv_sys_largefile_CC
4895 fi
4896
4897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4898 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4899 if ${ac_cv_sys_file_offset_bits+:} false; then :
4900 $as_echo_n "(cached) " >&6
4901 else
4902 while :; do
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h. */
4905 #include <sys/types.h>
4906 /* Check that off_t can represent 2**63 - 1 correctly.
4907 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4908 since some C++ compilers masquerading as C compilers
4909 incorrectly reject 9223372036854775807. */
4910 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4911 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4912 && LARGE_OFF_T % 2147483647 == 1)
4913 ? 1 : -1];
4914 int
4915 main ()
4916 {
4917
4918 ;
4919 return 0;
4920 }
4921 _ACEOF
4922 if ac_fn_c_try_compile "$LINENO"; then :
4923 ac_cv_sys_file_offset_bits=no; break
4924 fi
4925 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4927 /* end confdefs.h. */
4928 #define _FILE_OFFSET_BITS 64
4929 #include <sys/types.h>
4930 /* Check that off_t can represent 2**63 - 1 correctly.
4931 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4932 since some C++ compilers masquerading as C compilers
4933 incorrectly reject 9223372036854775807. */
4934 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4935 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4936 && LARGE_OFF_T % 2147483647 == 1)
4937 ? 1 : -1];
4938 int
4939 main ()
4940 {
4941
4942 ;
4943 return 0;
4944 }
4945 _ACEOF
4946 if ac_fn_c_try_compile "$LINENO"; then :
4947 ac_cv_sys_file_offset_bits=64; break
4948 fi
4949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4950 ac_cv_sys_file_offset_bits=unknown
4951 break
4952 done
4953 fi
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4955 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4956 case $ac_cv_sys_file_offset_bits in #(
4957 no | unknown) ;;
4958 *)
4959 cat >>confdefs.h <<_ACEOF
4960 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4961 _ACEOF
4962 ;;
4963 esac
4964 rm -rf conftest*
4965 if test $ac_cv_sys_file_offset_bits = unknown; then
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4967 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4968 if ${ac_cv_sys_large_files+:} false; then :
4969 $as_echo_n "(cached) " >&6
4970 else
4971 while :; do
4972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4973 /* end confdefs.h. */
4974 #include <sys/types.h>
4975 /* Check that off_t can represent 2**63 - 1 correctly.
4976 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4977 since some C++ compilers masquerading as C compilers
4978 incorrectly reject 9223372036854775807. */
4979 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4980 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4981 && LARGE_OFF_T % 2147483647 == 1)
4982 ? 1 : -1];
4983 int
4984 main ()
4985 {
4986
4987 ;
4988 return 0;
4989 }
4990 _ACEOF
4991 if ac_fn_c_try_compile "$LINENO"; then :
4992 ac_cv_sys_large_files=no; break
4993 fi
4994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4996 /* end confdefs.h. */
4997 #define _LARGE_FILES 1
4998 #include <sys/types.h>
4999 /* Check that off_t can represent 2**63 - 1 correctly.
5000 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5001 since some C++ compilers masquerading as C compilers
5002 incorrectly reject 9223372036854775807. */
5003 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5004 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5005 && LARGE_OFF_T % 2147483647 == 1)
5006 ? 1 : -1];
5007 int
5008 main ()
5009 {
5010
5011 ;
5012 return 0;
5013 }
5014 _ACEOF
5015 if ac_fn_c_try_compile "$LINENO"; then :
5016 ac_cv_sys_large_files=1; break
5017 fi
5018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5019 ac_cv_sys_large_files=unknown
5020 break
5021 done
5022 fi
5023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5024 $as_echo "$ac_cv_sys_large_files" >&6; }
5025 case $ac_cv_sys_large_files in #(
5026 no | unknown) ;;
5027 *)
5028 cat >>confdefs.h <<_ACEOF
5029 #define _LARGE_FILES $ac_cv_sys_large_files
5030 _ACEOF
5031 ;;
5032 esac
5033 rm -rf conftest*
5034 fi
5035
5036
5037 fi
5038
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 # Set build, build_cpu, build_vendor and build_os.
5184
5185
5186 # Set host, host_cpu, host_vendor, and host_os.
5187
5188
5189 # Set target, target_cpu, target_vendor, and target_os.
5190
5191
5192 case ${build_alias} in
5193 "") build_noncanonical=${build} ;;
5194 *) build_noncanonical=${build_alias} ;;
5195 esac
5196
5197 case ${host_alias} in
5198 "") host_noncanonical=${build_noncanonical} ;;
5199 *) host_noncanonical=${host_alias} ;;
5200 esac
5201
5202 case ${target_alias} in
5203 "") target_noncanonical=${host_noncanonical} ;;
5204 *) target_noncanonical=${target_alias} ;;
5205 esac
5206
5207
5208
5209
5210 test "$program_prefix" != NONE &&
5211 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5212 # Use a double $ so make ignores it.
5213 test "$program_suffix" != NONE &&
5214 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5215 # Double any \ or $.
5216 # By default was `s,x,x', remove it if useless.
5217 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5218 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5219
5220
5221 # We require a C++11 compiler. Check if one is available, and if
5222 # necessary, set CXX_DIALECT to some -std=xxx switch.
5223
5224 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5225 ac_ext=cpp
5226 ac_cpp='$CXXCPP $CPPFLAGS'
5227 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5228 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5229 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5230 CXX_DIALECT=""
5231 ac_success=no
5232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5233 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5234 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5235 $as_echo_n "(cached) " >&6
5236 else
5237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5238 /* end confdefs.h. */
5239
5240
5241 // If the compiler admits that it is not ready for C++11, why torture it?
5242 // Hopefully, this will speed up the test.
5243
5244 #ifndef __cplusplus
5245
5246 #error "This is not a C++ compiler"
5247
5248 #elif __cplusplus < 201103L
5249
5250 #error "This is not a C++11 compiler"
5251
5252 #else
5253
5254 namespace cxx11
5255 {
5256
5257 namespace test_static_assert
5258 {
5259
5260 template <typename T>
5261 struct check
5262 {
5263 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5264 };
5265
5266 }
5267
5268 namespace test_final_override
5269 {
5270
5271 struct Base
5272 {
5273 virtual void f() {}
5274 };
5275
5276 struct Derived : public Base
5277 {
5278 virtual void f() override {}
5279 };
5280
5281 }
5282
5283 namespace test_double_right_angle_brackets
5284 {
5285
5286 template < typename T >
5287 struct check {};
5288
5289 typedef check<void> single_type;
5290 typedef check<check<void>> double_type;
5291 typedef check<check<check<void>>> triple_type;
5292 typedef check<check<check<check<void>>>> quadruple_type;
5293
5294 }
5295
5296 namespace test_decltype
5297 {
5298
5299 int
5300 f()
5301 {
5302 int a = 1;
5303 decltype(a) b = 2;
5304 return a + b;
5305 }
5306
5307 }
5308
5309 namespace test_type_deduction
5310 {
5311
5312 template < typename T1, typename T2 >
5313 struct is_same
5314 {
5315 static const bool value = false;
5316 };
5317
5318 template < typename T >
5319 struct is_same<T, T>
5320 {
5321 static const bool value = true;
5322 };
5323
5324 template < typename T1, typename T2 >
5325 auto
5326 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5327 {
5328 return a1 + a2;
5329 }
5330
5331 int
5332 test(const int c, volatile int v)
5333 {
5334 static_assert(is_same<int, decltype(0)>::value == true, "");
5335 static_assert(is_same<int, decltype(c)>::value == false, "");
5336 static_assert(is_same<int, decltype(v)>::value == false, "");
5337 auto ac = c;
5338 auto av = v;
5339 auto sumi = ac + av + 'x';
5340 auto sumf = ac + av + 1.0;
5341 static_assert(is_same<int, decltype(ac)>::value == true, "");
5342 static_assert(is_same<int, decltype(av)>::value == true, "");
5343 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5344 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5345 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5346 return (sumf > 0.0) ? sumi : add(c, v);
5347 }
5348
5349 }
5350
5351 namespace test_noexcept
5352 {
5353
5354 int f() { return 0; }
5355 int g() noexcept { return 0; }
5356
5357 static_assert(noexcept(f()) == false, "");
5358 static_assert(noexcept(g()) == true, "");
5359
5360 }
5361
5362 namespace test_constexpr
5363 {
5364
5365 template < typename CharT >
5366 unsigned long constexpr
5367 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5368 {
5369 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5370 }
5371
5372 template < typename CharT >
5373 unsigned long constexpr
5374 strlen_c(const CharT *const s) noexcept
5375 {
5376 return strlen_c_r(s, 0UL);
5377 }
5378
5379 static_assert(strlen_c("") == 0UL, "");
5380 static_assert(strlen_c("1") == 1UL, "");
5381 static_assert(strlen_c("example") == 7UL, "");
5382 static_assert(strlen_c("another\0example") == 7UL, "");
5383
5384 }
5385
5386 namespace test_rvalue_references
5387 {
5388
5389 template < int N >
5390 struct answer
5391 {
5392 static constexpr int value = N;
5393 };
5394
5395 answer<1> f(int&) { return answer<1>(); }
5396 answer<2> f(const int&) { return answer<2>(); }
5397 answer<3> f(int&&) { return answer<3>(); }
5398
5399 void
5400 test()
5401 {
5402 int i = 0;
5403 const int c = 0;
5404 static_assert(decltype(f(i))::value == 1, "");
5405 static_assert(decltype(f(c))::value == 2, "");
5406 static_assert(decltype(f(0))::value == 3, "");
5407 }
5408
5409 }
5410
5411 namespace test_uniform_initialization
5412 {
5413
5414 struct test
5415 {
5416 static const int zero {};
5417 static const int one {1};
5418 };
5419
5420 static_assert(test::zero == 0, "");
5421 static_assert(test::one == 1, "");
5422
5423 }
5424
5425 namespace test_lambdas
5426 {
5427
5428 void
5429 test1()
5430 {
5431 auto lambda1 = [](){};
5432 auto lambda2 = lambda1;
5433 lambda1();
5434 lambda2();
5435 }
5436
5437 int
5438 test2()
5439 {
5440 auto a = [](int i, int j){ return i + j; }(1, 2);
5441 auto b = []() -> int { return '0'; }();
5442 auto c = [=](){ return a + b; }();
5443 auto d = [&](){ return c; }();
5444 auto e = [a, &b](int x) mutable {
5445 const auto identity = [](int y){ return y; };
5446 for (auto i = 0; i < a; ++i)
5447 a += b--;
5448 return x + identity(a + b);
5449 }(0);
5450 return a + b + c + d + e;
5451 }
5452
5453 int
5454 test3()
5455 {
5456 const auto nullary = [](){ return 0; };
5457 const auto unary = [](int x){ return x; };
5458 using nullary_t = decltype(nullary);
5459 using unary_t = decltype(unary);
5460 const auto higher1st = [](nullary_t f){ return f(); };
5461 const auto higher2nd = [unary](nullary_t f1){
5462 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5463 };
5464 return higher1st(nullary) + higher2nd(nullary)(unary);
5465 }
5466
5467 }
5468
5469 namespace test_variadic_templates
5470 {
5471
5472 template <int...>
5473 struct sum;
5474
5475 template <int N0, int... N1toN>
5476 struct sum<N0, N1toN...>
5477 {
5478 static constexpr auto value = N0 + sum<N1toN...>::value;
5479 };
5480
5481 template <>
5482 struct sum<>
5483 {
5484 static constexpr auto value = 0;
5485 };
5486
5487 static_assert(sum<>::value == 0, "");
5488 static_assert(sum<1>::value == 1, "");
5489 static_assert(sum<23>::value == 23, "");
5490 static_assert(sum<1, 2>::value == 3, "");
5491 static_assert(sum<5, 5, 11>::value == 21, "");
5492 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5493
5494 }
5495
5496 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5497 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5498 // because of this.
5499 namespace test_template_alias_sfinae
5500 {
5501
5502 struct foo {};
5503
5504 template<typename T>
5505 using member = typename T::member_type;
5506
5507 template<typename T>
5508 void func(...) {}
5509
5510 template<typename T>
5511 void func(member<T>*) {}
5512
5513 void test();
5514
5515 void test() { func<foo>(0); }
5516
5517 }
5518
5519 } // namespace cxx11
5520
5521 #endif // __cplusplus >= 201103L
5522
5523
5524
5525 _ACEOF
5526 if ac_fn_cxx_try_compile "$LINENO"; then :
5527 ax_cv_cxx_compile_cxx11=yes
5528 else
5529 ax_cv_cxx_compile_cxx11=no
5530 fi
5531 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5532 fi
5533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5534 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5535 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5536 ac_success=yes
5537 fi
5538
5539 if test x$ac_success = xno; then
5540 for alternative in ${ax_cxx_compile_alternatives}; do
5541 switch="-std=gnu++${alternative}"
5542 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5544 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5545 if eval \${$cachevar+:} false; then :
5546 $as_echo_n "(cached) " >&6
5547 else
5548 ac_save_CXX="$CXX"
5549 CXX="$CXX $switch"
5550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5551 /* end confdefs.h. */
5552
5553
5554 // If the compiler admits that it is not ready for C++11, why torture it?
5555 // Hopefully, this will speed up the test.
5556
5557 #ifndef __cplusplus
5558
5559 #error "This is not a C++ compiler"
5560
5561 #elif __cplusplus < 201103L
5562
5563 #error "This is not a C++11 compiler"
5564
5565 #else
5566
5567 namespace cxx11
5568 {
5569
5570 namespace test_static_assert
5571 {
5572
5573 template <typename T>
5574 struct check
5575 {
5576 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5577 };
5578
5579 }
5580
5581 namespace test_final_override
5582 {
5583
5584 struct Base
5585 {
5586 virtual void f() {}
5587 };
5588
5589 struct Derived : public Base
5590 {
5591 virtual void f() override {}
5592 };
5593
5594 }
5595
5596 namespace test_double_right_angle_brackets
5597 {
5598
5599 template < typename T >
5600 struct check {};
5601
5602 typedef check<void> single_type;
5603 typedef check<check<void>> double_type;
5604 typedef check<check<check<void>>> triple_type;
5605 typedef check<check<check<check<void>>>> quadruple_type;
5606
5607 }
5608
5609 namespace test_decltype
5610 {
5611
5612 int
5613 f()
5614 {
5615 int a = 1;
5616 decltype(a) b = 2;
5617 return a + b;
5618 }
5619
5620 }
5621
5622 namespace test_type_deduction
5623 {
5624
5625 template < typename T1, typename T2 >
5626 struct is_same
5627 {
5628 static const bool value = false;
5629 };
5630
5631 template < typename T >
5632 struct is_same<T, T>
5633 {
5634 static const bool value = true;
5635 };
5636
5637 template < typename T1, typename T2 >
5638 auto
5639 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5640 {
5641 return a1 + a2;
5642 }
5643
5644 int
5645 test(const int c, volatile int v)
5646 {
5647 static_assert(is_same<int, decltype(0)>::value == true, "");
5648 static_assert(is_same<int, decltype(c)>::value == false, "");
5649 static_assert(is_same<int, decltype(v)>::value == false, "");
5650 auto ac = c;
5651 auto av = v;
5652 auto sumi = ac + av + 'x';
5653 auto sumf = ac + av + 1.0;
5654 static_assert(is_same<int, decltype(ac)>::value == true, "");
5655 static_assert(is_same<int, decltype(av)>::value == true, "");
5656 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5657 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5658 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5659 return (sumf > 0.0) ? sumi : add(c, v);
5660 }
5661
5662 }
5663
5664 namespace test_noexcept
5665 {
5666
5667 int f() { return 0; }
5668 int g() noexcept { return 0; }
5669
5670 static_assert(noexcept(f()) == false, "");
5671 static_assert(noexcept(g()) == true, "");
5672
5673 }
5674
5675 namespace test_constexpr
5676 {
5677
5678 template < typename CharT >
5679 unsigned long constexpr
5680 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5681 {
5682 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5683 }
5684
5685 template < typename CharT >
5686 unsigned long constexpr
5687 strlen_c(const CharT *const s) noexcept
5688 {
5689 return strlen_c_r(s, 0UL);
5690 }
5691
5692 static_assert(strlen_c("") == 0UL, "");
5693 static_assert(strlen_c("1") == 1UL, "");
5694 static_assert(strlen_c("example") == 7UL, "");
5695 static_assert(strlen_c("another\0example") == 7UL, "");
5696
5697 }
5698
5699 namespace test_rvalue_references
5700 {
5701
5702 template < int N >
5703 struct answer
5704 {
5705 static constexpr int value = N;
5706 };
5707
5708 answer<1> f(int&) { return answer<1>(); }
5709 answer<2> f(const int&) { return answer<2>(); }
5710 answer<3> f(int&&) { return answer<3>(); }
5711
5712 void
5713 test()
5714 {
5715 int i = 0;
5716 const int c = 0;
5717 static_assert(decltype(f(i))::value == 1, "");
5718 static_assert(decltype(f(c))::value == 2, "");
5719 static_assert(decltype(f(0))::value == 3, "");
5720 }
5721
5722 }
5723
5724 namespace test_uniform_initialization
5725 {
5726
5727 struct test
5728 {
5729 static const int zero {};
5730 static const int one {1};
5731 };
5732
5733 static_assert(test::zero == 0, "");
5734 static_assert(test::one == 1, "");
5735
5736 }
5737
5738 namespace test_lambdas
5739 {
5740
5741 void
5742 test1()
5743 {
5744 auto lambda1 = [](){};
5745 auto lambda2 = lambda1;
5746 lambda1();
5747 lambda2();
5748 }
5749
5750 int
5751 test2()
5752 {
5753 auto a = [](int i, int j){ return i + j; }(1, 2);
5754 auto b = []() -> int { return '0'; }();
5755 auto c = [=](){ return a + b; }();
5756 auto d = [&](){ return c; }();
5757 auto e = [a, &b](int x) mutable {
5758 const auto identity = [](int y){ return y; };
5759 for (auto i = 0; i < a; ++i)
5760 a += b--;
5761 return x + identity(a + b);
5762 }(0);
5763 return a + b + c + d + e;
5764 }
5765
5766 int
5767 test3()
5768 {
5769 const auto nullary = [](){ return 0; };
5770 const auto unary = [](int x){ return x; };
5771 using nullary_t = decltype(nullary);
5772 using unary_t = decltype(unary);
5773 const auto higher1st = [](nullary_t f){ return f(); };
5774 const auto higher2nd = [unary](nullary_t f1){
5775 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5776 };
5777 return higher1st(nullary) + higher2nd(nullary)(unary);
5778 }
5779
5780 }
5781
5782 namespace test_variadic_templates
5783 {
5784
5785 template <int...>
5786 struct sum;
5787
5788 template <int N0, int... N1toN>
5789 struct sum<N0, N1toN...>
5790 {
5791 static constexpr auto value = N0 + sum<N1toN...>::value;
5792 };
5793
5794 template <>
5795 struct sum<>
5796 {
5797 static constexpr auto value = 0;
5798 };
5799
5800 static_assert(sum<>::value == 0, "");
5801 static_assert(sum<1>::value == 1, "");
5802 static_assert(sum<23>::value == 23, "");
5803 static_assert(sum<1, 2>::value == 3, "");
5804 static_assert(sum<5, 5, 11>::value == 21, "");
5805 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5806
5807 }
5808
5809 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5810 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5811 // because of this.
5812 namespace test_template_alias_sfinae
5813 {
5814
5815 struct foo {};
5816
5817 template<typename T>
5818 using member = typename T::member_type;
5819
5820 template<typename T>
5821 void func(...) {}
5822
5823 template<typename T>
5824 void func(member<T>*) {}
5825
5826 void test();
5827
5828 void test() { func<foo>(0); }
5829
5830 }
5831
5832 } // namespace cxx11
5833
5834 #endif // __cplusplus >= 201103L
5835
5836
5837
5838 _ACEOF
5839 if ac_fn_cxx_try_compile "$LINENO"; then :
5840 eval $cachevar=yes
5841 else
5842 eval $cachevar=no
5843 fi
5844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5845 CXX="$ac_save_CXX"
5846 fi
5847 eval ac_res=\$$cachevar
5848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5849 $as_echo "$ac_res" >&6; }
5850 if eval test x\$$cachevar = xyes; then
5851 CXX_DIALECT="$switch"
5852 CXX="$CXX $switch"
5853 if test -n "$CXXCPP" ; then
5854 CXXCPP="$CXXCPP $switch"
5855 fi
5856 ac_success=yes
5857 break
5858 fi
5859 done
5860 fi
5861
5862 if test x$ac_success = xno; then
5863 for alternative in ${ax_cxx_compile_alternatives}; do
5864 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5865 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5867 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5868 if eval \${$cachevar+:} false; then :
5869 $as_echo_n "(cached) " >&6
5870 else
5871 ac_save_CXX="$CXX"
5872 CXX="$CXX $switch"
5873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5874 /* end confdefs.h. */
5875
5876
5877 // If the compiler admits that it is not ready for C++11, why torture it?
5878 // Hopefully, this will speed up the test.
5879
5880 #ifndef __cplusplus
5881
5882 #error "This is not a C++ compiler"
5883
5884 #elif __cplusplus < 201103L
5885
5886 #error "This is not a C++11 compiler"
5887
5888 #else
5889
5890 namespace cxx11
5891 {
5892
5893 namespace test_static_assert
5894 {
5895
5896 template <typename T>
5897 struct check
5898 {
5899 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5900 };
5901
5902 }
5903
5904 namespace test_final_override
5905 {
5906
5907 struct Base
5908 {
5909 virtual void f() {}
5910 };
5911
5912 struct Derived : public Base
5913 {
5914 virtual void f() override {}
5915 };
5916
5917 }
5918
5919 namespace test_double_right_angle_brackets
5920 {
5921
5922 template < typename T >
5923 struct check {};
5924
5925 typedef check<void> single_type;
5926 typedef check<check<void>> double_type;
5927 typedef check<check<check<void>>> triple_type;
5928 typedef check<check<check<check<void>>>> quadruple_type;
5929
5930 }
5931
5932 namespace test_decltype
5933 {
5934
5935 int
5936 f()
5937 {
5938 int a = 1;
5939 decltype(a) b = 2;
5940 return a + b;
5941 }
5942
5943 }
5944
5945 namespace test_type_deduction
5946 {
5947
5948 template < typename T1, typename T2 >
5949 struct is_same
5950 {
5951 static const bool value = false;
5952 };
5953
5954 template < typename T >
5955 struct is_same<T, T>
5956 {
5957 static const bool value = true;
5958 };
5959
5960 template < typename T1, typename T2 >
5961 auto
5962 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5963 {
5964 return a1 + a2;
5965 }
5966
5967 int
5968 test(const int c, volatile int v)
5969 {
5970 static_assert(is_same<int, decltype(0)>::value == true, "");
5971 static_assert(is_same<int, decltype(c)>::value == false, "");
5972 static_assert(is_same<int, decltype(v)>::value == false, "");
5973 auto ac = c;
5974 auto av = v;
5975 auto sumi = ac + av + 'x';
5976 auto sumf = ac + av + 1.0;
5977 static_assert(is_same<int, decltype(ac)>::value == true, "");
5978 static_assert(is_same<int, decltype(av)>::value == true, "");
5979 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5980 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5981 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5982 return (sumf > 0.0) ? sumi : add(c, v);
5983 }
5984
5985 }
5986
5987 namespace test_noexcept
5988 {
5989
5990 int f() { return 0; }
5991 int g() noexcept { return 0; }
5992
5993 static_assert(noexcept(f()) == false, "");
5994 static_assert(noexcept(g()) == true, "");
5995
5996 }
5997
5998 namespace test_constexpr
5999 {
6000
6001 template < typename CharT >
6002 unsigned long constexpr
6003 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6004 {
6005 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6006 }
6007
6008 template < typename CharT >
6009 unsigned long constexpr
6010 strlen_c(const CharT *const s) noexcept
6011 {
6012 return strlen_c_r(s, 0UL);
6013 }
6014
6015 static_assert(strlen_c("") == 0UL, "");
6016 static_assert(strlen_c("1") == 1UL, "");
6017 static_assert(strlen_c("example") == 7UL, "");
6018 static_assert(strlen_c("another\0example") == 7UL, "");
6019
6020 }
6021
6022 namespace test_rvalue_references
6023 {
6024
6025 template < int N >
6026 struct answer
6027 {
6028 static constexpr int value = N;
6029 };
6030
6031 answer<1> f(int&) { return answer<1>(); }
6032 answer<2> f(const int&) { return answer<2>(); }
6033 answer<3> f(int&&) { return answer<3>(); }
6034
6035 void
6036 test()
6037 {
6038 int i = 0;
6039 const int c = 0;
6040 static_assert(decltype(f(i))::value == 1, "");
6041 static_assert(decltype(f(c))::value == 2, "");
6042 static_assert(decltype(f(0))::value == 3, "");
6043 }
6044
6045 }
6046
6047 namespace test_uniform_initialization
6048 {
6049
6050 struct test
6051 {
6052 static const int zero {};
6053 static const int one {1};
6054 };
6055
6056 static_assert(test::zero == 0, "");
6057 static_assert(test::one == 1, "");
6058
6059 }
6060
6061 namespace test_lambdas
6062 {
6063
6064 void
6065 test1()
6066 {
6067 auto lambda1 = [](){};
6068 auto lambda2 = lambda1;
6069 lambda1();
6070 lambda2();
6071 }
6072
6073 int
6074 test2()
6075 {
6076 auto a = [](int i, int j){ return i + j; }(1, 2);
6077 auto b = []() -> int { return '0'; }();
6078 auto c = [=](){ return a + b; }();
6079 auto d = [&](){ return c; }();
6080 auto e = [a, &b](int x) mutable {
6081 const auto identity = [](int y){ return y; };
6082 for (auto i = 0; i < a; ++i)
6083 a += b--;
6084 return x + identity(a + b);
6085 }(0);
6086 return a + b + c + d + e;
6087 }
6088
6089 int
6090 test3()
6091 {
6092 const auto nullary = [](){ return 0; };
6093 const auto unary = [](int x){ return x; };
6094 using nullary_t = decltype(nullary);
6095 using unary_t = decltype(unary);
6096 const auto higher1st = [](nullary_t f){ return f(); };
6097 const auto higher2nd = [unary](nullary_t f1){
6098 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6099 };
6100 return higher1st(nullary) + higher2nd(nullary)(unary);
6101 }
6102
6103 }
6104
6105 namespace test_variadic_templates
6106 {
6107
6108 template <int...>
6109 struct sum;
6110
6111 template <int N0, int... N1toN>
6112 struct sum<N0, N1toN...>
6113 {
6114 static constexpr auto value = N0 + sum<N1toN...>::value;
6115 };
6116
6117 template <>
6118 struct sum<>
6119 {
6120 static constexpr auto value = 0;
6121 };
6122
6123 static_assert(sum<>::value == 0, "");
6124 static_assert(sum<1>::value == 1, "");
6125 static_assert(sum<23>::value == 23, "");
6126 static_assert(sum<1, 2>::value == 3, "");
6127 static_assert(sum<5, 5, 11>::value == 21, "");
6128 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6129
6130 }
6131
6132 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6133 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6134 // because of this.
6135 namespace test_template_alias_sfinae
6136 {
6137
6138 struct foo {};
6139
6140 template<typename T>
6141 using member = typename T::member_type;
6142
6143 template<typename T>
6144 void func(...) {}
6145
6146 template<typename T>
6147 void func(member<T>*) {}
6148
6149 void test();
6150
6151 void test() { func<foo>(0); }
6152
6153 }
6154
6155 } // namespace cxx11
6156
6157 #endif // __cplusplus >= 201103L
6158
6159
6160
6161 _ACEOF
6162 if ac_fn_cxx_try_compile "$LINENO"; then :
6163 eval $cachevar=yes
6164 else
6165 eval $cachevar=no
6166 fi
6167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6168 CXX="$ac_save_CXX"
6169 fi
6170 eval ac_res=\$$cachevar
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6172 $as_echo "$ac_res" >&6; }
6173 if eval test x\$$cachevar = xyes; then
6174 CXX_DIALECT="$switch"
6175 CXX="$CXX $switch"
6176 if test -n "$CXXCPP" ; then
6177 CXXCPP="$CXXCPP $switch"
6178 fi
6179 ac_success=yes
6180 break
6181 fi
6182 done
6183 if test x$ac_success = xyes; then
6184 break
6185 fi
6186 done
6187 fi
6188 ac_ext=c
6189 ac_cpp='$CPP $CPPFLAGS'
6190 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6191 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6192 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6193
6194 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6195 if test x$ac_success = xno; then
6196 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6197 fi
6198 fi
6199 if test x$ac_success = xno; then
6200 HAVE_CXX11=0
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6202 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6203 else
6204 HAVE_CXX11=1
6205
6206 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6207
6208 fi
6209
6210
6211
6212
6213 # Dependency checking.
6214 rm -rf .tst 2>/dev/null
6215 mkdir .tst 2>/dev/null
6216 if test -d .tst; then
6217 am__leading_dot=.
6218 else
6219 am__leading_dot=_
6220 fi
6221 rmdir .tst 2>/dev/null
6222
6223 DEPDIR="${am__leading_dot}deps"
6224
6225 ac_config_commands="$ac_config_commands depdir"
6226
6227
6228 depcc="$CC" am_compiler_list=
6229
6230 am_depcomp=$ac_aux_dir/depcomp
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6232 $as_echo_n "checking dependency style of $depcc... " >&6; }
6233 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6234 $as_echo_n "(cached) " >&6
6235 else
6236 if test -f "$am_depcomp"; then
6237 # We make a subdir and do the tests there. Otherwise we can end up
6238 # making bogus files that we don't know about and never remove. For
6239 # instance it was reported that on HP-UX the gcc test will end up
6240 # making a dummy file named `D' -- because `-MD' means `put the output
6241 # in D'.
6242 mkdir conftest.dir
6243 # Copy depcomp to subdir because otherwise we won't find it if we're
6244 # using a relative directory.
6245 cp "$am_depcomp" conftest.dir
6246 cd conftest.dir
6247 # We will build objects and dependencies in a subdirectory because
6248 # it helps to detect inapplicable dependency modes. For instance
6249 # both Tru64's cc and ICC support -MD to output dependencies as a
6250 # side effect of compilation, but ICC will put the dependencies in
6251 # the current directory while Tru64 will put them in the object
6252 # directory.
6253 mkdir sub
6254
6255 am_cv_CC_dependencies_compiler_type=none
6256 if test "$am_compiler_list" = ""; then
6257 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6258 fi
6259 for depmode in $am_compiler_list; do
6260 if test $depmode = none; then break; fi
6261
6262 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6263 # Setup a source with many dependencies, because some compilers
6264 # like to wrap large dependency lists on column 80 (with \), and
6265 # we should not choose a depcomp mode which is confused by this.
6266 #
6267 # We need to recreate these files for each test, as the compiler may
6268 # overwrite some of them when testing with obscure command lines.
6269 # This happens at least with the AIX C compiler.
6270 : > sub/conftest.c
6271 for i in 1 2 3 4 5 6; do
6272 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6273 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6274 # Solaris 8's {/usr,}/bin/sh.
6275 touch sub/conftst$i.h
6276 done
6277 echo "include sub/conftest.Po" > confmf
6278
6279 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6280 # mode. It turns out that the SunPro C++ compiler does not properly
6281 # handle `-M -o', and we need to detect this.
6282 depcmd="depmode=$depmode \
6283 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6284 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6285 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6286 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6287 if env $depcmd > conftest.err 2>&1 &&
6288 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6289 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6290 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6291 # icc doesn't choke on unknown options, it will just issue warnings
6292 # or remarks (even with -Werror). So we grep stderr for any message
6293 # that says an option was ignored or not supported.
6294 # When given -MP, icc 7.0 and 7.1 complain thusly:
6295 # icc: Command line warning: ignoring option '-M'; no argument required
6296 # The diagnosis changed in icc 8.0:
6297 # icc: Command line remark: option '-MP' not supported
6298 if (grep 'ignoring option' conftest.err ||
6299 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6300 am_cv_CC_dependencies_compiler_type=$depmode
6301 $as_echo "$as_me:$LINENO: success" >&5
6302 break
6303 fi
6304 fi
6305 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6306 sed -e 's/^/| /' < conftest.err >&5
6307 done
6308
6309 cd ..
6310 rm -rf conftest.dir
6311 else
6312 am_cv_CC_dependencies_compiler_type=none
6313 fi
6314
6315 fi
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6317 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6318 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6319 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6320 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6321
6322 fi
6323
6324
6325
6326 CONFIG_OBS=
6327 CONFIG_DEPS=
6328 CONFIG_SRCS=
6329 ENABLE_CFLAGS=
6330
6331 CONFIG_ALL=
6332 CONFIG_CLEAN=
6333 CONFIG_INSTALL=
6334 CONFIG_UNINSTALL=
6335
6336 # If we haven't got the data from the intl directory,
6337 # assume NLS is disabled.
6338 USE_NLS=no
6339 LIBINTL=
6340 LIBINTL_DEP=
6341 INCINTL=
6342 XGETTEXT=
6343 GMSGFMT=
6344 POSUB=
6345
6346 if test -f ../intl/config.intl; then
6347 . ../intl/config.intl
6348 fi
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6350 $as_echo_n "checking whether NLS is requested... " >&6; }
6351 if test x"$USE_NLS" != xyes; then
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353 $as_echo "no" >&6; }
6354 else
6355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6356 $as_echo "yes" >&6; }
6357
6358 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6359
6360
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6362 $as_echo_n "checking for catalogs to be installed... " >&6; }
6363 # Look for .po and .gmo files in the source directory.
6364 CATALOGS=
6365 XLINGUAS=
6366 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6367 # If there aren't any .gmo files the shell will give us the
6368 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6369 # weeded out.
6370 case "$cat" in *\**)
6371 continue;;
6372 esac
6373 # The quadruple backslash is collapsed to a double backslash
6374 # by the backticks, then collapsed again by the double quotes,
6375 # leaving us with one backslash in the sed expression (right
6376 # before the dot that mustn't act as a wildcard).
6377 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6378 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6379 # The user is allowed to set LINGUAS to a list of languages to
6380 # install catalogs for. If it's empty that means "all of them."
6381 if test "x$LINGUAS" = x; then
6382 CATALOGS="$CATALOGS $cat"
6383 XLINGUAS="$XLINGUAS $lang"
6384 else
6385 case "$LINGUAS" in *$lang*)
6386 CATALOGS="$CATALOGS $cat"
6387 XLINGUAS="$XLINGUAS $lang"
6388 ;;
6389 esac
6390 fi
6391 done
6392 LINGUAS="$XLINGUAS"
6393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6394 $as_echo "$LINGUAS" >&6; }
6395
6396
6397 DATADIRNAME=share
6398
6399 INSTOBJEXT=.mo
6400
6401 GENCAT=gencat
6402
6403 CATOBJEXT=.gmo
6404
6405 fi
6406
6407 localedir='${datadir}/locale'
6408
6409
6410 if test x"$USE_NLS" = xyes; then
6411 CONFIG_ALL="$CONFIG_ALL all-po"
6412 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6413 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6414 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6415 fi
6416
6417 PACKAGE=gdb
6418
6419 cat >>confdefs.h <<_ACEOF
6420 #define PACKAGE "$PACKAGE"
6421 _ACEOF
6422
6423
6424
6425 # We never need to detect it in this sub-configure.
6426 # But preserve it for config.status --recheck.
6427
6428
6429
6430 MAKEINFO_EXTRA_FLAGS=""
6431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6432 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6433 if ${gdb_cv_have_makeinfo_click+:} false; then :
6434 $as_echo_n "(cached) " >&6
6435 else
6436 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6437 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6438 gdb_cv_have_makeinfo_click=yes
6439 else
6440 gdb_cv_have_makeinfo_click=no
6441 fi
6442 fi
6443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6444 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6445 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6446 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6447 fi
6448
6449
6450
6451
6452 # Check whether --with-separate-debug-dir was given.
6453 if test "${with_separate_debug_dir+set}" = set; then :
6454 withval=$with_separate_debug_dir;
6455 DEBUGDIR=$withval
6456 else
6457 DEBUGDIR=${libdir}/debug
6458 fi
6459
6460
6461 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6462 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6463 ac_define_dir=`eval echo $DEBUGDIR`
6464 ac_define_dir=`eval echo $ac_define_dir`
6465
6466 cat >>confdefs.h <<_ACEOF
6467 #define DEBUGDIR "$ac_define_dir"
6468 _ACEOF
6469
6470
6471
6472
6473 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6474 if test "x$prefix" = xNONE; then
6475 test_prefix=/usr/local
6476 else
6477 test_prefix=$prefix
6478 fi
6479 else
6480 test_prefix=$exec_prefix
6481 fi
6482 value=0
6483 case ${ac_define_dir} in
6484 "${test_prefix}"|"${test_prefix}/"*|\
6485 '${exec_prefix}'|'${exec_prefix}/'*)
6486 value=1
6487 ;;
6488 esac
6489
6490 cat >>confdefs.h <<_ACEOF
6491 #define DEBUGDIR_RELOCATABLE $value
6492 _ACEOF
6493
6494
6495
6496
6497 # We can't pass paths as command line arguments.
6498 # Mingw32 tries to be clever and will convert the paths for us.
6499 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6500 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6501 # This breaks GDB's relocatable path conversions since paths passed in
6502 # config.h would not get so translated, the path prefixes no longer match.
6503
6504 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6505 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6506 ac_define_dir=`eval echo $bindir`
6507 ac_define_dir=`eval echo $ac_define_dir`
6508
6509 cat >>confdefs.h <<_ACEOF
6510 #define BINDIR "$ac_define_dir"
6511 _ACEOF
6512
6513
6514
6515 # GDB's datadir relocation
6516
6517
6518
6519 # Check whether --with-gdb-datadir was given.
6520 if test "${with_gdb_datadir+set}" = set; then :
6521 withval=$with_gdb_datadir;
6522 GDB_DATADIR=$withval
6523 else
6524 GDB_DATADIR=${datadir}/gdb
6525 fi
6526
6527
6528 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6529 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6530 ac_define_dir=`eval echo $GDB_DATADIR`
6531 ac_define_dir=`eval echo $ac_define_dir`
6532
6533 cat >>confdefs.h <<_ACEOF
6534 #define GDB_DATADIR "$ac_define_dir"
6535 _ACEOF
6536
6537
6538
6539
6540 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6541 if test "x$prefix" = xNONE; then
6542 test_prefix=/usr/local
6543 else
6544 test_prefix=$prefix
6545 fi
6546 else
6547 test_prefix=$exec_prefix
6548 fi
6549 value=0
6550 case ${ac_define_dir} in
6551 "${test_prefix}"|"${test_prefix}/"*|\
6552 '${exec_prefix}'|'${exec_prefix}/'*)
6553 value=1
6554 ;;
6555 esac
6556
6557 cat >>confdefs.h <<_ACEOF
6558 #define GDB_DATADIR_RELOCATABLE $value
6559 _ACEOF
6560
6561
6562
6563
6564
6565 # Check whether --with-relocated-sources was given.
6566 if test "${with_relocated_sources+set}" = set; then :
6567 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6568
6569 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6570 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6571 ac_define_dir=`eval echo $reloc_srcdir`
6572 ac_define_dir=`eval echo $ac_define_dir`
6573
6574 cat >>confdefs.h <<_ACEOF
6575 #define RELOC_SRCDIR "$ac_define_dir"
6576 _ACEOF
6577
6578
6579
6580 fi
6581
6582
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6584 $as_echo_n "checking for default auto-load directory... " >&6; }
6585
6586 # Check whether --with-auto-load-dir was given.
6587 if test "${with_auto_load_dir+set}" = set; then :
6588 withval=$with_auto_load_dir;
6589 else
6590 with_auto_load_dir='$debugdir:$datadir/auto-load'
6591 fi
6592
6593 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6594
6595 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6596 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6597 ac_define_dir=`eval echo $escape_dir`
6598 ac_define_dir=`eval echo $ac_define_dir`
6599
6600 cat >>confdefs.h <<_ACEOF
6601 #define AUTO_LOAD_DIR "$ac_define_dir"
6602 _ACEOF
6603
6604
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6606 $as_echo "$with_auto_load_dir" >&6; }
6607
6608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6609 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6610
6611 # Check whether --with-auto-load-safe-path was given.
6612 if test "${with_auto_load_safe_path+set}" = set; then :
6613 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6614 with_auto_load_safe_path="/"
6615 fi
6616 else
6617 with_auto_load_safe_path="$with_auto_load_dir"
6618 fi
6619
6620 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6621
6622 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6623 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6624 ac_define_dir=`eval echo $escape_dir`
6625 ac_define_dir=`eval echo $ac_define_dir`
6626
6627 cat >>confdefs.h <<_ACEOF
6628 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6629 _ACEOF
6630
6631
6632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6633 $as_echo "$with_auto_load_safe_path" >&6; }
6634
6635
6636
6637 subdirs="$subdirs testsuite"
6638
6639
6640 # Check whether to support alternative target configurations
6641 # Check whether --enable-targets was given.
6642 if test "${enable_targets+set}" = set; then :
6643 enableval=$enable_targets; case "${enableval}" in
6644 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6645 ;;
6646 no) enable_targets= ;;
6647 *) enable_targets=$enableval ;;
6648 esac
6649 fi
6650
6651
6652 # Check whether to enable 64-bit support on 32-bit hosts
6653 # Check whether --enable-64-bit-bfd was given.
6654 if test "${enable_64_bit_bfd+set}" = set; then :
6655 enableval=$enable_64_bit_bfd; case "${enableval}" in
6656 yes) want64=true ;;
6657 no) want64=false ;;
6658 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6659 esac
6660 else
6661 want64=false
6662 fi
6663
6664 # Provide defaults for some variables set by the per-host and per-target
6665 # configuration.
6666 gdb_host_obs=posix-hdep.o
6667
6668 if test "${target}" = "${host}"; then
6669 gdb_native=yes
6670 else
6671 gdb_native=no
6672 fi
6673
6674 . $srcdir/configure.host
6675
6676 # Accumulate some settings from configure.tgt over all enabled targets
6677
6678 TARGET_OBS=
6679 all_targets=
6680 HAVE_NATIVE_GCORE_TARGET=
6681
6682 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6683 do
6684 if test "$targ_alias" = "all"; then
6685 all_targets=true
6686 else
6687 # Canonicalize the secondary target names.
6688 result=`$ac_config_sub $targ_alias 2>/dev/null`
6689 if test -n "$result"; then
6690 targ=$result
6691 else
6692 targ=$targ_alias
6693 fi
6694
6695 . ${srcdir}/configure.tgt
6696
6697 if test -z "${gdb_target_obs}"; then :
6698 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6699 fi
6700
6701 # Target-specific object files
6702 for i in ${gdb_target_obs}; do
6703 case " $TARGET_OBS " in
6704 *" ${i} "*) ;;
6705 *)
6706 TARGET_OBS="$TARGET_OBS ${i}"
6707 ;;
6708 esac
6709 done
6710
6711 # Check whether this target needs 64-bit CORE_ADDR
6712 if test x${want64} = xfalse; then
6713 . ${srcdir}/../bfd/config.bfd
6714 fi
6715
6716 # Check whether this target is native and supports gcore.
6717 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6718 && $gdb_have_gcore; then
6719 HAVE_NATIVE_GCORE_TARGET=1
6720 fi
6721 fi
6722 done
6723
6724 if test x${all_targets} = xtrue; then
6725
6726 # We want all 64-bit targets if we either:
6727 # - run on a 64-bit host or
6728 # - already require 64-bit support for some other target or
6729 # - the --enable-64-bit-bfd option was supplied
6730 # Otherwise we only support all 32-bit targets.
6731 #
6732 # NOTE: This test must be in sync with the corresponding
6733 # tests in BFD!
6734
6735 if test x${want64} = xfalse; then
6736 # The cast to long int works around a bug in the HP C Compiler
6737 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6738 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6739 # This bug is HP SR number 8606223364.
6740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6741 $as_echo_n "checking size of long... " >&6; }
6742 if ${ac_cv_sizeof_long+:} false; then :
6743 $as_echo_n "(cached) " >&6
6744 else
6745 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6746
6747 else
6748 if test "$ac_cv_type_long" = yes; then
6749 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6750 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6751 as_fn_error 77 "cannot compute sizeof (long)
6752 See \`config.log' for more details" "$LINENO" 5; }
6753 else
6754 ac_cv_sizeof_long=0
6755 fi
6756 fi
6757
6758 fi
6759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6760 $as_echo "$ac_cv_sizeof_long" >&6; }
6761
6762
6763
6764 cat >>confdefs.h <<_ACEOF
6765 #define SIZEOF_LONG $ac_cv_sizeof_long
6766 _ACEOF
6767
6768
6769 if test "x${ac_cv_sizeof_long}" = "x8"; then
6770 want64=true
6771 fi
6772 fi
6773 if test x${want64} = xtrue; then
6774 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6775 else
6776 TARGET_OBS='$(ALL_TARGET_OBS)'
6777 fi
6778 fi
6779
6780
6781
6782
6783 # For other settings, only the main target counts.
6784 gdb_sim=
6785 gdb_osabi=
6786 targ=$target; . ${srcdir}/configure.tgt
6787
6788 # Fetch the default architecture and default target vector from BFD.
6789 targ=$target; . $srcdir/../bfd/config.bfd
6790
6791 # We only want the first architecture, so strip off the others if
6792 # there is more than one.
6793 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6794
6795 if test "x$targ_archs" != x; then
6796
6797 cat >>confdefs.h <<_ACEOF
6798 #define DEFAULT_BFD_ARCH $targ_archs
6799 _ACEOF
6800
6801 fi
6802 if test "x$targ_defvec" != x; then
6803
6804 cat >>confdefs.h <<_ACEOF
6805 #define DEFAULT_BFD_VEC $targ_defvec
6806 _ACEOF
6807
6808 fi
6809
6810 # Enable MI.
6811 # Check whether --enable-gdbmi was given.
6812 if test "${enable_gdbmi+set}" = set; then :
6813 enableval=$enable_gdbmi; case $enableval in
6814 yes | no)
6815 ;;
6816 *)
6817 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6818 esac
6819 else
6820 enable_gdbmi=yes
6821 fi
6822
6823 if test x"$enable_gdbmi" = xyes; then
6824 if test -d "$srcdir/mi"; then
6825 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6826 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6827 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6828 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6829 fi
6830 fi
6831
6832 # Enable TUI.
6833 # Check whether --enable-tui was given.
6834 if test "${enable_tui+set}" = set; then :
6835 enableval=$enable_tui; case $enableval in
6836 yes | no | auto)
6837 ;;
6838 *)
6839 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6840 esac
6841 else
6842 enable_tui=auto
6843 fi
6844
6845
6846 # Enable gdbtk.
6847 # Check whether --enable-gdbtk was given.
6848 if test "${enable_gdbtk+set}" = set; then :
6849 enableval=$enable_gdbtk; case $enableval in
6850 yes | no)
6851 ;;
6852 *)
6853 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6854 esac
6855 else
6856 if test -d "$srcdir/gdbtk"; then
6857 enable_gdbtk=yes
6858 else
6859 enable_gdbtk=no
6860 fi
6861 fi
6862
6863 # We unconditionally disable gdbtk tests on selected platforms.
6864 case $host_os in
6865 go32* | windows*)
6866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6867 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6868 enable_gdbtk=no ;;
6869 esac
6870
6871 # Handle optional debuginfod support
6872
6873
6874
6875
6876
6877
6878
6879 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6880 if test -n "$ac_tool_prefix"; then
6881 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6882 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6884 $as_echo_n "checking for $ac_word... " >&6; }
6885 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6886 $as_echo_n "(cached) " >&6
6887 else
6888 case $PKG_CONFIG in
6889 [\\/]* | ?:[\\/]*)
6890 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6891 ;;
6892 *)
6893 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6894 for as_dir in $PATH
6895 do
6896 IFS=$as_save_IFS
6897 test -z "$as_dir" && as_dir=.
6898 for ac_exec_ext in '' $ac_executable_extensions; do
6899 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6900 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6901 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6902 break 2
6903 fi
6904 done
6905 done
6906 IFS=$as_save_IFS
6907
6908 ;;
6909 esac
6910 fi
6911 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6912 if test -n "$PKG_CONFIG"; then
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6914 $as_echo "$PKG_CONFIG" >&6; }
6915 else
6916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6917 $as_echo "no" >&6; }
6918 fi
6919
6920
6921 fi
6922 if test -z "$ac_cv_path_PKG_CONFIG"; then
6923 ac_pt_PKG_CONFIG=$PKG_CONFIG
6924 # Extract the first word of "pkg-config", so it can be a program name with args.
6925 set dummy pkg-config; ac_word=$2
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6927 $as_echo_n "checking for $ac_word... " >&6; }
6928 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6929 $as_echo_n "(cached) " >&6
6930 else
6931 case $ac_pt_PKG_CONFIG in
6932 [\\/]* | ?:[\\/]*)
6933 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6934 ;;
6935 *)
6936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6937 for as_dir in $PATH
6938 do
6939 IFS=$as_save_IFS
6940 test -z "$as_dir" && as_dir=.
6941 for ac_exec_ext in '' $ac_executable_extensions; do
6942 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6943 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6944 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6945 break 2
6946 fi
6947 done
6948 done
6949 IFS=$as_save_IFS
6950
6951 ;;
6952 esac
6953 fi
6954 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6955 if test -n "$ac_pt_PKG_CONFIG"; then
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6957 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
6958 else
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6960 $as_echo "no" >&6; }
6961 fi
6962
6963 if test "x$ac_pt_PKG_CONFIG" = x; then
6964 PKG_CONFIG=""
6965 else
6966 case $cross_compiling:$ac_tool_warned in
6967 yes:)
6968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6969 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6970 ac_tool_warned=yes ;;
6971 esac
6972 PKG_CONFIG=$ac_pt_PKG_CONFIG
6973 fi
6974 else
6975 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6976 fi
6977
6978 fi
6979 if test -n "$PKG_CONFIG"; then
6980 _pkg_min_version=0.9.0
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6982 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6983 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6985 $as_echo "yes" >&6; }
6986 else
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6988 $as_echo "no" >&6; }
6989 PKG_CONFIG=""
6990 fi
6991 fi
6992
6993 # Handle optional debuginfod support
6994
6995 # Check whether --with-debuginfod was given.
6996 if test "${with_debuginfod+set}" = set; then :
6997 withval=$with_debuginfod;
6998 else
6999 with_debuginfod=auto
7000 fi
7001
7002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
7003 $as_echo_n "checking whether to use debuginfod... " >&6; }
7004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
7005 $as_echo "$with_debuginfod" >&6; }
7006
7007 if test "x$with_debuginfod" != xno; then
7008
7009 pkg_failed=no
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7011 $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7012
7013 if test -n "$DEBUGINFOD_CFLAGS"; then
7014 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7015 elif test -n "$PKG_CONFIG"; then
7016 if test -n "$PKG_CONFIG" && \
7017 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7018 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7019 ac_status=$?
7020 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7021 test $ac_status = 0; }; then
7022 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7023 test "x$?" != "x0" && pkg_failed=yes
7024 else
7025 pkg_failed=yes
7026 fi
7027 else
7028 pkg_failed=untried
7029 fi
7030 if test -n "$DEBUGINFOD_LIBS"; then
7031 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7032 elif test -n "$PKG_CONFIG"; then
7033 if test -n "$PKG_CONFIG" && \
7034 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7035 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7036 ac_status=$?
7037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7038 test $ac_status = 0; }; then
7039 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7040 test "x$?" != "x0" && pkg_failed=yes
7041 else
7042 pkg_failed=yes
7043 fi
7044 else
7045 pkg_failed=untried
7046 fi
7047
7048 if test $pkg_failed = no; then
7049 pkg_save_LDFLAGS="$LDFLAGS"
7050 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7052 /* end confdefs.h. */
7053
7054 int
7055 main ()
7056 {
7057
7058 ;
7059 return 0;
7060 }
7061 _ACEOF
7062 if ac_fn_c_try_link "$LINENO"; then :
7063
7064 else
7065 pkg_failed=yes
7066 fi
7067 rm -f core conftest.err conftest.$ac_objext \
7068 conftest$ac_exeext conftest.$ac_ext
7069 LDFLAGS=$pkg_save_LDFLAGS
7070 fi
7071
7072
7073
7074 if test $pkg_failed = yes; then
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7076 $as_echo "no" >&6; }
7077
7078 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7079 _pkg_short_errors_supported=yes
7080 else
7081 _pkg_short_errors_supported=no
7082 fi
7083 if test $_pkg_short_errors_supported = yes; then
7084 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7085 else
7086 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7087 fi
7088 # Put the nasty error message in config.log where it belongs
7089 echo "$DEBUGINFOD_PKG_ERRORS" >&5
7090
7091 if test "x$with_debuginfod" = xyes; then
7092 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7093 else
7094 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7095 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7096 fi
7097 elif test $pkg_failed = untried; then
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7099 $as_echo "no" >&6; }
7100 if test "x$with_debuginfod" = xyes; then
7101 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7102 else
7103 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7104 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7105 fi
7106 else
7107 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7108 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7110 $as_echo "yes" >&6; }
7111
7112 $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7113
7114 fi
7115 else
7116 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7117 $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7118 fi
7119
7120
7121 # Libunwind support for ia64.
7122
7123 # Check whether --with-libunwind-ia64 was given.
7124 if test "${with_libunwind_ia64+set}" = set; then :
7125 withval=$with_libunwind_ia64;
7126 else
7127 with_libunwind_ia64=auto
7128 fi
7129
7130
7131 # Backward compatibility option.
7132 if test "${with_libunwind+set}" = set; then
7133 if test x"$with_libunwind_ia64" != xauto; then
7134 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7135 fi
7136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7137 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7138 with_libunwind_ia64="$with_libunwind"
7139 fi
7140
7141 case "$with_libunwind_ia64" in
7142 yes | no)
7143 ;;
7144 auto)
7145 for ac_header in libunwind-ia64.h
7146 do :
7147 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7148 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7149 cat >>confdefs.h <<_ACEOF
7150 #define HAVE_LIBUNWIND_IA64_H 1
7151 _ACEOF
7152
7153 fi
7154
7155 done
7156
7157 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7158 ;;
7159 *)
7160 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7161 ;;
7162 esac
7163
7164 if test x"$with_libunwind_ia64" = xyes; then
7165 for ac_header in libunwind-ia64.h
7166 do :
7167 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7168 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7169 cat >>confdefs.h <<_ACEOF
7170 #define HAVE_LIBUNWIND_IA64_H 1
7171 _ACEOF
7172
7173 fi
7174
7175 done
7176
7177 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7178 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7179 fi
7180 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7181 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7182 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7183 fi
7184
7185 opt_curses=no
7186
7187 # Check whether --with-curses was given.
7188 if test "${with_curses+set}" = set; then :
7189 withval=$with_curses; opt_curses=$withval
7190 fi
7191
7192
7193 prefer_curses=no
7194 if test "$opt_curses" = "yes"; then
7195 prefer_curses=yes
7196 fi
7197
7198 # Profiling support.
7199 # Check whether --enable-profiling was given.
7200 if test "${enable_profiling+set}" = set; then :
7201 enableval=$enable_profiling; case $enableval in
7202 yes | no)
7203 ;;
7204 *)
7205 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
7206 esac
7207 else
7208 enable_profiling=no
7209 fi
7210
7211
7212 for ac_func in monstartup _mcleanup
7213 do :
7214 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7215 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7216 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7217 cat >>confdefs.h <<_ACEOF
7218 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7219 _ACEOF
7220
7221 fi
7222 done
7223
7224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7225 $as_echo_n "checking for _etext... " >&6; }
7226 if ${ac_cv_var__etext+:} false; then :
7227 $as_echo_n "(cached) " >&6
7228 else
7229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7230 /* end confdefs.h. */
7231 #include <stdlib.h>
7232 extern char _etext;
7233 int
7234 main ()
7235 {
7236 free (&_etext);
7237
7238 ;
7239 return 0;
7240 }
7241 _ACEOF
7242 if ac_fn_c_try_link "$LINENO"; then :
7243 ac_cv_var__etext=yes
7244 else
7245 ac_cv_var__etext=no
7246
7247 fi
7248 rm -f core conftest.err conftest.$ac_objext \
7249 conftest$ac_exeext conftest.$ac_ext
7250
7251 fi
7252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7253 $as_echo "$ac_cv_var__etext" >&6; }
7254 if test "$ac_cv_var__etext" = yes; then
7255
7256 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7257
7258 fi
7259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7260 $as_echo_n "checking for etext... " >&6; }
7261 if ${ac_cv_var_etext+:} false; then :
7262 $as_echo_n "(cached) " >&6
7263 else
7264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7265 /* end confdefs.h. */
7266 #include <stdlib.h>
7267 extern char etext;
7268 int
7269 main ()
7270 {
7271 free (&etext);
7272
7273 ;
7274 return 0;
7275 }
7276 _ACEOF
7277 if ac_fn_c_try_link "$LINENO"; then :
7278 ac_cv_var_etext=yes
7279 else
7280 ac_cv_var_etext=no
7281
7282 fi
7283 rm -f core conftest.err conftest.$ac_objext \
7284 conftest$ac_exeext conftest.$ac_ext
7285
7286 fi
7287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7288 $as_echo "$ac_cv_var_etext" >&6; }
7289 if test "$ac_cv_var_etext" = yes; then
7290
7291 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7292
7293 fi
7294 if test "$enable_profiling" = yes ; then
7295 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7296 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7297 fi
7298 PROFILE_CFLAGS=-pg
7299 OLD_CFLAGS="$CFLAGS"
7300 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7301
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7303 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7304 if ${ac_cv_cc_supports_pg+:} false; then :
7305 $as_echo_n "(cached) " >&6
7306 else
7307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7308 /* end confdefs.h. */
7309
7310 int
7311 main ()
7312 {
7313 int x;
7314 ;
7315 return 0;
7316 }
7317 _ACEOF
7318 if ac_fn_c_try_compile "$LINENO"; then :
7319 ac_cv_cc_supports_pg=yes
7320 else
7321 ac_cv_cc_supports_pg=no
7322
7323 fi
7324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7325
7326 fi
7327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7328 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7329
7330 if test "$ac_cv_cc_supports_pg" = no; then
7331 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7332 fi
7333
7334 CFLAGS="$OLD_CFLAGS"
7335 fi
7336
7337 CODESIGN_CERT=
7338 # Check whether --enable-codesign was given.
7339 if test "${enable_codesign+set}" = set; then :
7340 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7341 fi
7342
7343
7344
7345
7346
7347 # Check whether --with-pkgversion was given.
7348 if test "${with_pkgversion+set}" = set; then :
7349 withval=$with_pkgversion; case "$withval" in
7350 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7351 no) PKGVERSION= ;;
7352 *) PKGVERSION="($withval) " ;;
7353 esac
7354 else
7355 PKGVERSION="(GDB) "
7356
7357 fi
7358
7359
7360
7361
7362
7363 # Check whether --with-bugurl was given.
7364 if test "${with_bugurl+set}" = set; then :
7365 withval=$with_bugurl; case "$withval" in
7366 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7367 no) BUGURL=
7368 ;;
7369 *) BUGURL="$withval"
7370 ;;
7371 esac
7372 else
7373 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7374
7375 fi
7376
7377 case ${BUGURL} in
7378 "")
7379 REPORT_BUGS_TO=
7380 REPORT_BUGS_TEXI=
7381 ;;
7382 *)
7383 REPORT_BUGS_TO="<$BUGURL>"
7384 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7385 ;;
7386 esac;
7387
7388
7389
7390
7391 cat >>confdefs.h <<_ACEOF
7392 #define PKGVERSION "$PKGVERSION"
7393 _ACEOF
7394
7395
7396 cat >>confdefs.h <<_ACEOF
7397 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7398 _ACEOF
7399
7400
7401 # --------------------- #
7402 # Checks for programs. #
7403 # --------------------- #
7404
7405 for ac_prog in gawk mawk nawk awk
7406 do
7407 # Extract the first word of "$ac_prog", so it can be a program name with args.
7408 set dummy $ac_prog; ac_word=$2
7409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7410 $as_echo_n "checking for $ac_word... " >&6; }
7411 if ${ac_cv_prog_AWK+:} false; then :
7412 $as_echo_n "(cached) " >&6
7413 else
7414 if test -n "$AWK"; then
7415 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7416 else
7417 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7418 for as_dir in $PATH
7419 do
7420 IFS=$as_save_IFS
7421 test -z "$as_dir" && as_dir=.
7422 for ac_exec_ext in '' $ac_executable_extensions; do
7423 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7424 ac_cv_prog_AWK="$ac_prog"
7425 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7426 break 2
7427 fi
7428 done
7429 done
7430 IFS=$as_save_IFS
7431
7432 fi
7433 fi
7434 AWK=$ac_cv_prog_AWK
7435 if test -n "$AWK"; then
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7437 $as_echo "$AWK" >&6; }
7438 else
7439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7440 $as_echo "no" >&6; }
7441 fi
7442
7443
7444 test -n "$AWK" && break
7445 done
7446
7447 # Find a good install program. We prefer a C program (faster),
7448 # so one script is as good as another. But avoid the broken or
7449 # incompatible versions:
7450 # SysV /etc/install, /usr/sbin/install
7451 # SunOS /usr/etc/install
7452 # IRIX /sbin/install
7453 # AIX /bin/install
7454 # AmigaOS /C/install, which installs bootblocks on floppy discs
7455 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7456 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7457 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7458 # OS/2's system install, which has a completely different semantic
7459 # ./install, which can be erroneously created by make from ./install.sh.
7460 # Reject install programs that cannot install multiple files.
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7462 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7463 if test -z "$INSTALL"; then
7464 if ${ac_cv_path_install+:} false; then :
7465 $as_echo_n "(cached) " >&6
7466 else
7467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7468 for as_dir in $PATH
7469 do
7470 IFS=$as_save_IFS
7471 test -z "$as_dir" && as_dir=.
7472 # Account for people who put trailing slashes in PATH elements.
7473 case $as_dir/ in #((
7474 ./ | .// | /[cC]/* | \
7475 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7476 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7477 /usr/ucb/* ) ;;
7478 *)
7479 # OSF1 and SCO ODT 3.0 have their own names for install.
7480 # Don't use installbsd from OSF since it installs stuff as root
7481 # by default.
7482 for ac_prog in ginstall scoinst install; do
7483 for ac_exec_ext in '' $ac_executable_extensions; do
7484 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7485 if test $ac_prog = install &&
7486 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7487 # AIX install. It has an incompatible calling convention.
7488 :
7489 elif test $ac_prog = install &&
7490 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7491 # program-specific install script used by HP pwplus--don't use.
7492 :
7493 else
7494 rm -rf conftest.one conftest.two conftest.dir
7495 echo one > conftest.one
7496 echo two > conftest.two
7497 mkdir conftest.dir
7498 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7499 test -s conftest.one && test -s conftest.two &&
7500 test -s conftest.dir/conftest.one &&
7501 test -s conftest.dir/conftest.two
7502 then
7503 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7504 break 3
7505 fi
7506 fi
7507 fi
7508 done
7509 done
7510 ;;
7511 esac
7512
7513 done
7514 IFS=$as_save_IFS
7515
7516 rm -rf conftest.one conftest.two conftest.dir
7517
7518 fi
7519 if test "${ac_cv_path_install+set}" = set; then
7520 INSTALL=$ac_cv_path_install
7521 else
7522 # As a last resort, use the slow shell script. Don't cache a
7523 # value for INSTALL within a source directory, because that will
7524 # break other packages using the cache if that directory is
7525 # removed, or if the value is a relative name.
7526 INSTALL=$ac_install_sh
7527 fi
7528 fi
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7530 $as_echo "$INSTALL" >&6; }
7531
7532 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7533 # It thinks the first close brace ends the variable substitution.
7534 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7535
7536 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7537
7538 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7539
7540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7541 $as_echo_n "checking whether ln -s works... " >&6; }
7542 LN_S=$as_ln_s
7543 if test "$LN_S" = "ln -s"; then
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7545 $as_echo "yes" >&6; }
7546 else
7547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7548 $as_echo "no, using $LN_S" >&6; }
7549 fi
7550
7551 if test -n "$ac_tool_prefix"; then
7552 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7553 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7555 $as_echo_n "checking for $ac_word... " >&6; }
7556 if ${ac_cv_prog_RANLIB+:} false; then :
7557 $as_echo_n "(cached) " >&6
7558 else
7559 if test -n "$RANLIB"; then
7560 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7561 else
7562 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7563 for as_dir in $PATH
7564 do
7565 IFS=$as_save_IFS
7566 test -z "$as_dir" && as_dir=.
7567 for ac_exec_ext in '' $ac_executable_extensions; do
7568 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7569 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7570 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7571 break 2
7572 fi
7573 done
7574 done
7575 IFS=$as_save_IFS
7576
7577 fi
7578 fi
7579 RANLIB=$ac_cv_prog_RANLIB
7580 if test -n "$RANLIB"; then
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7582 $as_echo "$RANLIB" >&6; }
7583 else
7584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7585 $as_echo "no" >&6; }
7586 fi
7587
7588
7589 fi
7590 if test -z "$ac_cv_prog_RANLIB"; then
7591 ac_ct_RANLIB=$RANLIB
7592 # Extract the first word of "ranlib", so it can be a program name with args.
7593 set dummy ranlib; ac_word=$2
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7595 $as_echo_n "checking for $ac_word... " >&6; }
7596 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7597 $as_echo_n "(cached) " >&6
7598 else
7599 if test -n "$ac_ct_RANLIB"; then
7600 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7601 else
7602 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7603 for as_dir in $PATH
7604 do
7605 IFS=$as_save_IFS
7606 test -z "$as_dir" && as_dir=.
7607 for ac_exec_ext in '' $ac_executable_extensions; do
7608 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7609 ac_cv_prog_ac_ct_RANLIB="ranlib"
7610 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7611 break 2
7612 fi
7613 done
7614 done
7615 IFS=$as_save_IFS
7616
7617 fi
7618 fi
7619 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7620 if test -n "$ac_ct_RANLIB"; then
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7622 $as_echo "$ac_ct_RANLIB" >&6; }
7623 else
7624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7625 $as_echo "no" >&6; }
7626 fi
7627
7628 if test "x$ac_ct_RANLIB" = x; then
7629 RANLIB=":"
7630 else
7631 case $cross_compiling:$ac_tool_warned in
7632 yes:)
7633 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7634 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7635 ac_tool_warned=yes ;;
7636 esac
7637 RANLIB=$ac_ct_RANLIB
7638 fi
7639 else
7640 RANLIB="$ac_cv_prog_RANLIB"
7641 fi
7642
7643 for ac_prog in 'bison -y' byacc
7644 do
7645 # Extract the first word of "$ac_prog", so it can be a program name with args.
7646 set dummy $ac_prog; ac_word=$2
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7648 $as_echo_n "checking for $ac_word... " >&6; }
7649 if ${ac_cv_prog_YACC+:} false; then :
7650 $as_echo_n "(cached) " >&6
7651 else
7652 if test -n "$YACC"; then
7653 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7654 else
7655 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7656 for as_dir in $PATH
7657 do
7658 IFS=$as_save_IFS
7659 test -z "$as_dir" && as_dir=.
7660 for ac_exec_ext in '' $ac_executable_extensions; do
7661 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7662 ac_cv_prog_YACC="$ac_prog"
7663 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7664 break 2
7665 fi
7666 done
7667 done
7668 IFS=$as_save_IFS
7669
7670 fi
7671 fi
7672 YACC=$ac_cv_prog_YACC
7673 if test -n "$YACC"; then
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7675 $as_echo "$YACC" >&6; }
7676 else
7677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7678 $as_echo "no" >&6; }
7679 fi
7680
7681
7682 test -n "$YACC" && break
7683 done
7684 test -n "$YACC" || YACC="yacc"
7685
7686
7687 if test -n "$ac_tool_prefix"; then
7688 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7689 set dummy ${ac_tool_prefix}ar; ac_word=$2
7690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7691 $as_echo_n "checking for $ac_word... " >&6; }
7692 if ${ac_cv_prog_AR+:} false; then :
7693 $as_echo_n "(cached) " >&6
7694 else
7695 if test -n "$AR"; then
7696 ac_cv_prog_AR="$AR" # Let the user override the test.
7697 else
7698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7699 for as_dir in $PATH
7700 do
7701 IFS=$as_save_IFS
7702 test -z "$as_dir" && as_dir=.
7703 for ac_exec_ext in '' $ac_executable_extensions; do
7704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7705 ac_cv_prog_AR="${ac_tool_prefix}ar"
7706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7707 break 2
7708 fi
7709 done
7710 done
7711 IFS=$as_save_IFS
7712
7713 fi
7714 fi
7715 AR=$ac_cv_prog_AR
7716 if test -n "$AR"; then
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7718 $as_echo "$AR" >&6; }
7719 else
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7721 $as_echo "no" >&6; }
7722 fi
7723
7724
7725 fi
7726 if test -z "$ac_cv_prog_AR"; then
7727 ac_ct_AR=$AR
7728 # Extract the first word of "ar", so it can be a program name with args.
7729 set dummy ar; ac_word=$2
7730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7731 $as_echo_n "checking for $ac_word... " >&6; }
7732 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7733 $as_echo_n "(cached) " >&6
7734 else
7735 if test -n "$ac_ct_AR"; then
7736 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7737 else
7738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7739 for as_dir in $PATH
7740 do
7741 IFS=$as_save_IFS
7742 test -z "$as_dir" && as_dir=.
7743 for ac_exec_ext in '' $ac_executable_extensions; do
7744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7745 ac_cv_prog_ac_ct_AR="ar"
7746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7747 break 2
7748 fi
7749 done
7750 done
7751 IFS=$as_save_IFS
7752
7753 fi
7754 fi
7755 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7756 if test -n "$ac_ct_AR"; then
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7758 $as_echo "$ac_ct_AR" >&6; }
7759 else
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7761 $as_echo "no" >&6; }
7762 fi
7763
7764 if test "x$ac_ct_AR" = x; then
7765 AR=""
7766 else
7767 case $cross_compiling:$ac_tool_warned in
7768 yes:)
7769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7770 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7771 ac_tool_warned=yes ;;
7772 esac
7773 AR=$ac_ct_AR
7774 fi
7775 else
7776 AR="$ac_cv_prog_AR"
7777 fi
7778
7779 if test -n "$ac_tool_prefix"; then
7780 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7781 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7783 $as_echo_n "checking for $ac_word... " >&6; }
7784 if ${ac_cv_prog_DLLTOOL+:} false; then :
7785 $as_echo_n "(cached) " >&6
7786 else
7787 if test -n "$DLLTOOL"; then
7788 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7789 else
7790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7791 for as_dir in $PATH
7792 do
7793 IFS=$as_save_IFS
7794 test -z "$as_dir" && as_dir=.
7795 for ac_exec_ext in '' $ac_executable_extensions; do
7796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7797 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7799 break 2
7800 fi
7801 done
7802 done
7803 IFS=$as_save_IFS
7804
7805 fi
7806 fi
7807 DLLTOOL=$ac_cv_prog_DLLTOOL
7808 if test -n "$DLLTOOL"; then
7809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7810 $as_echo "$DLLTOOL" >&6; }
7811 else
7812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7813 $as_echo "no" >&6; }
7814 fi
7815
7816
7817 fi
7818 if test -z "$ac_cv_prog_DLLTOOL"; then
7819 ac_ct_DLLTOOL=$DLLTOOL
7820 # Extract the first word of "dlltool", so it can be a program name with args.
7821 set dummy dlltool; ac_word=$2
7822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7823 $as_echo_n "checking for $ac_word... " >&6; }
7824 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7825 $as_echo_n "(cached) " >&6
7826 else
7827 if test -n "$ac_ct_DLLTOOL"; then
7828 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7829 else
7830 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7831 for as_dir in $PATH
7832 do
7833 IFS=$as_save_IFS
7834 test -z "$as_dir" && as_dir=.
7835 for ac_exec_ext in '' $ac_executable_extensions; do
7836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7837 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7839 break 2
7840 fi
7841 done
7842 done
7843 IFS=$as_save_IFS
7844
7845 fi
7846 fi
7847 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7848 if test -n "$ac_ct_DLLTOOL"; then
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7850 $as_echo "$ac_ct_DLLTOOL" >&6; }
7851 else
7852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7853 $as_echo "no" >&6; }
7854 fi
7855
7856 if test "x$ac_ct_DLLTOOL" = x; then
7857 DLLTOOL=""
7858 else
7859 case $cross_compiling:$ac_tool_warned in
7860 yes:)
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7862 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7863 ac_tool_warned=yes ;;
7864 esac
7865 DLLTOOL=$ac_ct_DLLTOOL
7866 fi
7867 else
7868 DLLTOOL="$ac_cv_prog_DLLTOOL"
7869 fi
7870
7871 if test -n "$ac_tool_prefix"; then
7872 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7873 set dummy ${ac_tool_prefix}windres; ac_word=$2
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7875 $as_echo_n "checking for $ac_word... " >&6; }
7876 if ${ac_cv_prog_WINDRES+:} false; then :
7877 $as_echo_n "(cached) " >&6
7878 else
7879 if test -n "$WINDRES"; then
7880 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7881 else
7882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7883 for as_dir in $PATH
7884 do
7885 IFS=$as_save_IFS
7886 test -z "$as_dir" && as_dir=.
7887 for ac_exec_ext in '' $ac_executable_extensions; do
7888 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7889 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7890 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7891 break 2
7892 fi
7893 done
7894 done
7895 IFS=$as_save_IFS
7896
7897 fi
7898 fi
7899 WINDRES=$ac_cv_prog_WINDRES
7900 if test -n "$WINDRES"; then
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7902 $as_echo "$WINDRES" >&6; }
7903 else
7904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7905 $as_echo "no" >&6; }
7906 fi
7907
7908
7909 fi
7910 if test -z "$ac_cv_prog_WINDRES"; then
7911 ac_ct_WINDRES=$WINDRES
7912 # Extract the first word of "windres", so it can be a program name with args.
7913 set dummy windres; ac_word=$2
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7915 $as_echo_n "checking for $ac_word... " >&6; }
7916 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7917 $as_echo_n "(cached) " >&6
7918 else
7919 if test -n "$ac_ct_WINDRES"; then
7920 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7921 else
7922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7923 for as_dir in $PATH
7924 do
7925 IFS=$as_save_IFS
7926 test -z "$as_dir" && as_dir=.
7927 for ac_exec_ext in '' $ac_executable_extensions; do
7928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7929 ac_cv_prog_ac_ct_WINDRES="windres"
7930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7931 break 2
7932 fi
7933 done
7934 done
7935 IFS=$as_save_IFS
7936
7937 fi
7938 fi
7939 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7940 if test -n "$ac_ct_WINDRES"; then
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7942 $as_echo "$ac_ct_WINDRES" >&6; }
7943 else
7944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7945 $as_echo "no" >&6; }
7946 fi
7947
7948 if test "x$ac_ct_WINDRES" = x; then
7949 WINDRES=""
7950 else
7951 case $cross_compiling:$ac_tool_warned in
7952 yes:)
7953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7954 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7955 ac_tool_warned=yes ;;
7956 esac
7957 WINDRES=$ac_ct_WINDRES
7958 fi
7959 else
7960 WINDRES="$ac_cv_prog_WINDRES"
7961 fi
7962
7963
7964 case $host_os in
7965 gnu*)
7966 # Needed for GNU Hurd hosts.
7967 if test -n "$ac_tool_prefix"; then
7968 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7969 set dummy ${ac_tool_prefix}mig; ac_word=$2
7970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7971 $as_echo_n "checking for $ac_word... " >&6; }
7972 if ${ac_cv_prog_MIG+:} false; then :
7973 $as_echo_n "(cached) " >&6
7974 else
7975 if test -n "$MIG"; then
7976 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7977 else
7978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7979 for as_dir in $PATH
7980 do
7981 IFS=$as_save_IFS
7982 test -z "$as_dir" && as_dir=.
7983 for ac_exec_ext in '' $ac_executable_extensions; do
7984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7985 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7987 break 2
7988 fi
7989 done
7990 done
7991 IFS=$as_save_IFS
7992
7993 fi
7994 fi
7995 MIG=$ac_cv_prog_MIG
7996 if test -n "$MIG"; then
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7998 $as_echo "$MIG" >&6; }
7999 else
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8001 $as_echo "no" >&6; }
8002 fi
8003
8004
8005 fi
8006 if test -z "$ac_cv_prog_MIG"; then
8007 ac_ct_MIG=$MIG
8008 # Extract the first word of "mig", so it can be a program name with args.
8009 set dummy mig; ac_word=$2
8010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8011 $as_echo_n "checking for $ac_word... " >&6; }
8012 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
8013 $as_echo_n "(cached) " >&6
8014 else
8015 if test -n "$ac_ct_MIG"; then
8016 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8017 else
8018 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8019 for as_dir in $PATH
8020 do
8021 IFS=$as_save_IFS
8022 test -z "$as_dir" && as_dir=.
8023 for ac_exec_ext in '' $ac_executable_extensions; do
8024 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8025 ac_cv_prog_ac_ct_MIG="mig"
8026 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8027 break 2
8028 fi
8029 done
8030 done
8031 IFS=$as_save_IFS
8032
8033 fi
8034 fi
8035 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8036 if test -n "$ac_ct_MIG"; then
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8038 $as_echo "$ac_ct_MIG" >&6; }
8039 else
8040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8041 $as_echo "no" >&6; }
8042 fi
8043
8044 if test "x$ac_ct_MIG" = x; then
8045 MIG=""
8046 else
8047 case $cross_compiling:$ac_tool_warned in
8048 yes:)
8049 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8050 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8051 ac_tool_warned=yes ;;
8052 esac
8053 MIG=$ac_ct_MIG
8054 fi
8055 else
8056 MIG="$ac_cv_prog_MIG"
8057 fi
8058
8059 if test x"$MIG" = x; then
8060 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8061 fi
8062 ;;
8063 esac
8064
8065 # ---------------------- #
8066 # Checks for libraries. #
8067 # ---------------------- #
8068
8069 # We might need to link with -lm; most simulators need it.
8070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8071 $as_echo_n "checking for main in -lm... " >&6; }
8072 if ${ac_cv_lib_m_main+:} false; then :
8073 $as_echo_n "(cached) " >&6
8074 else
8075 ac_check_lib_save_LIBS=$LIBS
8076 LIBS="-lm $LIBS"
8077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8078 /* end confdefs.h. */
8079
8080
8081 int
8082 main ()
8083 {
8084 return main ();
8085 ;
8086 return 0;
8087 }
8088 _ACEOF
8089 if ac_fn_c_try_link "$LINENO"; then :
8090 ac_cv_lib_m_main=yes
8091 else
8092 ac_cv_lib_m_main=no
8093 fi
8094 rm -f core conftest.err conftest.$ac_objext \
8095 conftest$ac_exeext conftest.$ac_ext
8096 LIBS=$ac_check_lib_save_LIBS
8097 fi
8098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8099 $as_echo "$ac_cv_lib_m_main" >&6; }
8100 if test "x$ac_cv_lib_m_main" = xyes; then :
8101 cat >>confdefs.h <<_ACEOF
8102 #define HAVE_LIBM 1
8103 _ACEOF
8104
8105 LIBS="-lm $LIBS"
8106
8107 fi
8108
8109
8110 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8112 $as_echo_n "checking for library containing gethostbyname... " >&6; }
8113 if ${ac_cv_search_gethostbyname+:} false; then :
8114 $as_echo_n "(cached) " >&6
8115 else
8116 ac_func_search_save_LIBS=$LIBS
8117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8118 /* end confdefs.h. */
8119
8120 /* Override any GCC internal prototype to avoid an error.
8121 Use char because int might match the return type of a GCC
8122 builtin and then its argument prototype would still apply. */
8123 #ifdef __cplusplus
8124 extern "C"
8125 #endif
8126 char gethostbyname ();
8127 int
8128 main ()
8129 {
8130 return gethostbyname ();
8131 ;
8132 return 0;
8133 }
8134 _ACEOF
8135 for ac_lib in '' nsl; do
8136 if test -z "$ac_lib"; then
8137 ac_res="none required"
8138 else
8139 ac_res=-l$ac_lib
8140 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8141 fi
8142 if ac_fn_c_try_link "$LINENO"; then :
8143 ac_cv_search_gethostbyname=$ac_res
8144 fi
8145 rm -f core conftest.err conftest.$ac_objext \
8146 conftest$ac_exeext
8147 if ${ac_cv_search_gethostbyname+:} false; then :
8148 break
8149 fi
8150 done
8151 if ${ac_cv_search_gethostbyname+:} false; then :
8152
8153 else
8154 ac_cv_search_gethostbyname=no
8155 fi
8156 rm conftest.$ac_ext
8157 LIBS=$ac_func_search_save_LIBS
8158 fi
8159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8160 $as_echo "$ac_cv_search_gethostbyname" >&6; }
8161 ac_res=$ac_cv_search_gethostbyname
8162 if test "$ac_res" != no; then :
8163 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8164
8165 fi
8166
8167
8168 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8170 $as_echo_n "checking for library containing socketpair... " >&6; }
8171 if ${ac_cv_search_socketpair+:} false; then :
8172 $as_echo_n "(cached) " >&6
8173 else
8174 ac_func_search_save_LIBS=$LIBS
8175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8176 /* end confdefs.h. */
8177
8178 /* Override any GCC internal prototype to avoid an error.
8179 Use char because int might match the return type of a GCC
8180 builtin and then its argument prototype would still apply. */
8181 #ifdef __cplusplus
8182 extern "C"
8183 #endif
8184 char socketpair ();
8185 int
8186 main ()
8187 {
8188 return socketpair ();
8189 ;
8190 return 0;
8191 }
8192 _ACEOF
8193 for ac_lib in '' socket; do
8194 if test -z "$ac_lib"; then
8195 ac_res="none required"
8196 else
8197 ac_res=-l$ac_lib
8198 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8199 fi
8200 if ac_fn_c_try_link "$LINENO"; then :
8201 ac_cv_search_socketpair=$ac_res
8202 fi
8203 rm -f core conftest.err conftest.$ac_objext \
8204 conftest$ac_exeext
8205 if ${ac_cv_search_socketpair+:} false; then :
8206 break
8207 fi
8208 done
8209 if ${ac_cv_search_socketpair+:} false; then :
8210
8211 else
8212 ac_cv_search_socketpair=no
8213 fi
8214 rm conftest.$ac_ext
8215 LIBS=$ac_func_search_save_LIBS
8216 fi
8217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8218 $as_echo "$ac_cv_search_socketpair" >&6; }
8219 ac_res=$ac_cv_search_socketpair
8220 if test "$ac_res" != no; then :
8221 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8222
8223 fi
8224
8225
8226 # Link in zlib if we can. This allows us to read compressed debug sections.
8227
8228 # Use the system's zlib library.
8229 zlibdir="-L\$(top_builddir)/../zlib"
8230 zlibinc="-I\$(top_srcdir)/../zlib"
8231
8232 # Check whether --with-system-zlib was given.
8233 if test "${with_system_zlib+set}" = set; then :
8234 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8235 zlibdir=
8236 zlibinc=
8237 fi
8238
8239 fi
8240
8241
8242
8243
8244
8245
8246 if test "X$prefix" = "XNONE"; then
8247 acl_final_prefix="$ac_default_prefix"
8248 else
8249 acl_final_prefix="$prefix"
8250 fi
8251 if test "X$exec_prefix" = "XNONE"; then
8252 acl_final_exec_prefix='${prefix}'
8253 else
8254 acl_final_exec_prefix="$exec_prefix"
8255 fi
8256 acl_save_prefix="$prefix"
8257 prefix="$acl_final_prefix"
8258 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8259 prefix="$acl_save_prefix"
8260
8261
8262 # Check whether --with-gnu-ld was given.
8263 if test "${with_gnu_ld+set}" = set; then :
8264 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8265 else
8266 with_gnu_ld=no
8267 fi
8268
8269 # Prepare PATH_SEPARATOR.
8270 # The user is always right.
8271 if test "${PATH_SEPARATOR+set}" != set; then
8272 echo "#! /bin/sh" >conf$$.sh
8273 echo "exit 0" >>conf$$.sh
8274 chmod +x conf$$.sh
8275 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8276 PATH_SEPARATOR=';'
8277 else
8278 PATH_SEPARATOR=:
8279 fi
8280 rm -f conf$$.sh
8281 fi
8282 ac_prog=ld
8283 if test "$GCC" = yes; then
8284 # Check if gcc -print-prog-name=ld gives a path.
8285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8286 $as_echo_n "checking for ld used by GCC... " >&6; }
8287 case $host in
8288 *-*-mingw*)
8289 # gcc leaves a trailing carriage return which upsets mingw
8290 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8291 *)
8292 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8293 esac
8294 case $ac_prog in
8295 # Accept absolute paths.
8296 [\\/]* | [A-Za-z]:[\\/]*)
8297 re_direlt='/[^/][^/]*/\.\./'
8298 # Canonicalize the path of ld
8299 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8300 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8301 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8302 done
8303 test -z "$LD" && LD="$ac_prog"
8304 ;;
8305 "")
8306 # If it fails, then pretend we aren't using GCC.
8307 ac_prog=ld
8308 ;;
8309 *)
8310 # If it is relative, then search for the first ld in PATH.
8311 with_gnu_ld=unknown
8312 ;;
8313 esac
8314 elif test "$with_gnu_ld" = yes; then
8315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8316 $as_echo_n "checking for GNU ld... " >&6; }
8317 else
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8319 $as_echo_n "checking for non-GNU ld... " >&6; }
8320 fi
8321 if ${acl_cv_path_LD+:} false; then :
8322 $as_echo_n "(cached) " >&6
8323 else
8324 if test -z "$LD"; then
8325 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8326 for ac_dir in $PATH; do
8327 test -z "$ac_dir" && ac_dir=.
8328 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8329 acl_cv_path_LD="$ac_dir/$ac_prog"
8330 # Check to see if the program is GNU ld. I'd rather use --version,
8331 # but apparently some GNU ld's only accept -v.
8332 # Break only if it was the GNU/non-GNU ld that we prefer.
8333 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8334 test "$with_gnu_ld" != no && break
8335 else
8336 test "$with_gnu_ld" != yes && break
8337 fi
8338 fi
8339 done
8340 IFS="$ac_save_ifs"
8341 else
8342 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8343 fi
8344 fi
8345
8346 LD="$acl_cv_path_LD"
8347 if test -n "$LD"; then
8348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8349 $as_echo "$LD" >&6; }
8350 else
8351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8352 $as_echo "no" >&6; }
8353 fi
8354 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8356 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8357 if ${acl_cv_prog_gnu_ld+:} false; then :
8358 $as_echo_n "(cached) " >&6
8359 else
8360 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8361 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8362 acl_cv_prog_gnu_ld=yes
8363 else
8364 acl_cv_prog_gnu_ld=no
8365 fi
8366 fi
8367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8368 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8369 with_gnu_ld=$acl_cv_prog_gnu_ld
8370
8371
8372
8373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8374 $as_echo_n "checking for shared library run path origin... " >&6; }
8375 if ${acl_cv_rpath+:} false; then :
8376 $as_echo_n "(cached) " >&6
8377 else
8378
8379 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8380 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8381 . ./conftest.sh
8382 rm -f ./conftest.sh
8383 acl_cv_rpath=done
8384
8385 fi
8386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8387 $as_echo "$acl_cv_rpath" >&6; }
8388 wl="$acl_cv_wl"
8389 libext="$acl_cv_libext"
8390 shlibext="$acl_cv_shlibext"
8391 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8392 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8393 hardcode_direct="$acl_cv_hardcode_direct"
8394 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8395 # Check whether --enable-rpath was given.
8396 if test "${enable_rpath+set}" = set; then :
8397 enableval=$enable_rpath; :
8398 else
8399 enable_rpath=yes
8400 fi
8401
8402
8403
8404
8405
8406
8407
8408
8409 use_additional=yes
8410
8411 acl_save_prefix="$prefix"
8412 prefix="$acl_final_prefix"
8413 acl_save_exec_prefix="$exec_prefix"
8414 exec_prefix="$acl_final_exec_prefix"
8415
8416 eval additional_includedir=\"$includedir\"
8417 eval additional_libdir=\"$libdir\"
8418
8419 exec_prefix="$acl_save_exec_prefix"
8420 prefix="$acl_save_prefix"
8421
8422
8423 # Check whether --with-libiconv-prefix was given.
8424 if test "${with_libiconv_prefix+set}" = set; then :
8425 withval=$with_libiconv_prefix;
8426 if test "X$withval" = "Xno"; then
8427 use_additional=no
8428 else
8429 if test "X$withval" = "X"; then
8430
8431 acl_save_prefix="$prefix"
8432 prefix="$acl_final_prefix"
8433 acl_save_exec_prefix="$exec_prefix"
8434 exec_prefix="$acl_final_exec_prefix"
8435
8436 eval additional_includedir=\"$includedir\"
8437 eval additional_libdir=\"$libdir\"
8438
8439 exec_prefix="$acl_save_exec_prefix"
8440 prefix="$acl_save_prefix"
8441
8442 else
8443 additional_includedir="$withval/include"
8444 additional_libdir="$withval/lib"
8445 fi
8446 fi
8447
8448 fi
8449
8450
8451 # Check whether --with-libiconv-type was given.
8452 if test "${with_libiconv_type+set}" = set; then :
8453 withval=$with_libiconv_type; with_libiconv_type=$withval
8454 else
8455 with_libiconv_type=auto
8456 fi
8457
8458 lib_type=`eval echo \$with_libiconv_type`
8459
8460 LIBICONV=
8461 LTLIBICONV=
8462 INCICONV=
8463 rpathdirs=
8464 ltrpathdirs=
8465 names_already_handled=
8466 names_next_round='iconv '
8467 while test -n "$names_next_round"; do
8468 names_this_round="$names_next_round"
8469 names_next_round=
8470 for name in $names_this_round; do
8471 already_handled=
8472 for n in $names_already_handled; do
8473 if test "$n" = "$name"; then
8474 already_handled=yes
8475 break
8476 fi
8477 done
8478 if test -z "$already_handled"; then
8479 names_already_handled="$names_already_handled $name"
8480 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8481 eval value=\"\$HAVE_LIB$uppername\"
8482 if test -n "$value"; then
8483 if test "$value" = yes; then
8484 eval value=\"\$LIB$uppername\"
8485 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8486 eval value=\"\$LTLIB$uppername\"
8487 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8488 else
8489 :
8490 fi
8491 else
8492 found_dir=
8493 found_la=
8494 found_so=
8495 found_a=
8496 if test $use_additional = yes; then
8497 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8498 found_dir="$additional_libdir"
8499 found_so="$additional_libdir/lib$name.$shlibext"
8500 if test -f "$additional_libdir/lib$name.la"; then
8501 found_la="$additional_libdir/lib$name.la"
8502 fi
8503 elif test x$lib_type != xshared; then
8504 if test -f "$additional_libdir/lib$name.$libext"; then
8505 found_dir="$additional_libdir"
8506 found_a="$additional_libdir/lib$name.$libext"
8507 if test -f "$additional_libdir/lib$name.la"; then
8508 found_la="$additional_libdir/lib$name.la"
8509 fi
8510 fi
8511 fi
8512 fi
8513 if test "X$found_dir" = "X"; then
8514 for x in $LDFLAGS $LTLIBICONV; do
8515
8516 acl_save_prefix="$prefix"
8517 prefix="$acl_final_prefix"
8518 acl_save_exec_prefix="$exec_prefix"
8519 exec_prefix="$acl_final_exec_prefix"
8520 eval x=\"$x\"
8521 exec_prefix="$acl_save_exec_prefix"
8522 prefix="$acl_save_prefix"
8523
8524 case "$x" in
8525 -L*)
8526 dir=`echo "X$x" | sed -e 's/^X-L//'`
8527 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8528 found_dir="$dir"
8529 found_so="$dir/lib$name.$shlibext"
8530 if test -f "$dir/lib$name.la"; then
8531 found_la="$dir/lib$name.la"
8532 fi
8533 elif test x$lib_type != xshared; then
8534 if test -f "$dir/lib$name.$libext"; then
8535 found_dir="$dir"
8536 found_a="$dir/lib$name.$libext"
8537 if test -f "$dir/lib$name.la"; then
8538 found_la="$dir/lib$name.la"
8539 fi
8540 fi
8541 fi
8542 ;;
8543 esac
8544 if test "X$found_dir" != "X"; then
8545 break
8546 fi
8547 done
8548 fi
8549 if test "X$found_dir" != "X"; then
8550 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8551 if test "X$found_so" != "X"; then
8552 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8553 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8554 else
8555 haveit=
8556 for x in $ltrpathdirs; do
8557 if test "X$x" = "X$found_dir"; then
8558 haveit=yes
8559 break
8560 fi
8561 done
8562 if test -z "$haveit"; then
8563 ltrpathdirs="$ltrpathdirs $found_dir"
8564 fi
8565 if test "$hardcode_direct" = yes; then
8566 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8567 else
8568 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8569 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8570 haveit=
8571 for x in $rpathdirs; do
8572 if test "X$x" = "X$found_dir"; then
8573 haveit=yes
8574 break
8575 fi
8576 done
8577 if test -z "$haveit"; then
8578 rpathdirs="$rpathdirs $found_dir"
8579 fi
8580 else
8581 haveit=
8582 for x in $LDFLAGS $LIBICONV; do
8583
8584 acl_save_prefix="$prefix"
8585 prefix="$acl_final_prefix"
8586 acl_save_exec_prefix="$exec_prefix"
8587 exec_prefix="$acl_final_exec_prefix"
8588 eval x=\"$x\"
8589 exec_prefix="$acl_save_exec_prefix"
8590 prefix="$acl_save_prefix"
8591
8592 if test "X$x" = "X-L$found_dir"; then
8593 haveit=yes
8594 break
8595 fi
8596 done
8597 if test -z "$haveit"; then
8598 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8599 fi
8600 if test "$hardcode_minus_L" != no; then
8601 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8602 else
8603 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8604 fi
8605 fi
8606 fi
8607 fi
8608 else
8609 if test "X$found_a" != "X"; then
8610 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8611 else
8612 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8613 fi
8614 fi
8615 additional_includedir=
8616 case "$found_dir" in
8617 */lib | */lib/)
8618 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8619 additional_includedir="$basedir/include"
8620 ;;
8621 esac
8622 if test "X$additional_includedir" != "X"; then
8623 if test "X$additional_includedir" != "X/usr/include"; then
8624 haveit=
8625 if test "X$additional_includedir" = "X/usr/local/include"; then
8626 if test -n "$GCC"; then
8627 case $host_os in
8628 linux*) haveit=yes;;
8629 esac
8630 fi
8631 fi
8632 if test -z "$haveit"; then
8633 for x in $CPPFLAGS $INCICONV; do
8634
8635 acl_save_prefix="$prefix"
8636 prefix="$acl_final_prefix"
8637 acl_save_exec_prefix="$exec_prefix"
8638 exec_prefix="$acl_final_exec_prefix"
8639 eval x=\"$x\"
8640 exec_prefix="$acl_save_exec_prefix"
8641 prefix="$acl_save_prefix"
8642
8643 if test "X$x" = "X-I$additional_includedir"; then
8644 haveit=yes
8645 break
8646 fi
8647 done
8648 if test -z "$haveit"; then
8649 if test -d "$additional_includedir"; then
8650 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8651 fi
8652 fi
8653 fi
8654 fi
8655 fi
8656 if test -n "$found_la"; then
8657 save_libdir="$libdir"
8658 case "$found_la" in
8659 */* | *\\*) . "$found_la" ;;
8660 *) . "./$found_la" ;;
8661 esac
8662 libdir="$save_libdir"
8663 for dep in $dependency_libs; do
8664 case "$dep" in
8665 -L*)
8666 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8667 if test "X$additional_libdir" != "X/usr/lib"; then
8668 haveit=
8669 if test "X$additional_libdir" = "X/usr/local/lib"; then
8670 if test -n "$GCC"; then
8671 case $host_os in
8672 linux*) haveit=yes;;
8673 esac
8674 fi
8675 fi
8676 if test -z "$haveit"; then
8677 haveit=
8678 for x in $LDFLAGS $LIBICONV; do
8679
8680 acl_save_prefix="$prefix"
8681 prefix="$acl_final_prefix"
8682 acl_save_exec_prefix="$exec_prefix"
8683 exec_prefix="$acl_final_exec_prefix"
8684 eval x=\"$x\"
8685 exec_prefix="$acl_save_exec_prefix"
8686 prefix="$acl_save_prefix"
8687
8688 if test "X$x" = "X-L$additional_libdir"; then
8689 haveit=yes
8690 break
8691 fi
8692 done
8693 if test -z "$haveit"; then
8694 if test -d "$additional_libdir"; then
8695 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8696 fi
8697 fi
8698 haveit=
8699 for x in $LDFLAGS $LTLIBICONV; do
8700
8701 acl_save_prefix="$prefix"
8702 prefix="$acl_final_prefix"
8703 acl_save_exec_prefix="$exec_prefix"
8704 exec_prefix="$acl_final_exec_prefix"
8705 eval x=\"$x\"
8706 exec_prefix="$acl_save_exec_prefix"
8707 prefix="$acl_save_prefix"
8708
8709 if test "X$x" = "X-L$additional_libdir"; then
8710 haveit=yes
8711 break
8712 fi
8713 done
8714 if test -z "$haveit"; then
8715 if test -d "$additional_libdir"; then
8716 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8717 fi
8718 fi
8719 fi
8720 fi
8721 ;;
8722 -R*)
8723 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8724 if test "$enable_rpath" != no; then
8725 haveit=
8726 for x in $rpathdirs; do
8727 if test "X$x" = "X$dir"; then
8728 haveit=yes
8729 break
8730 fi
8731 done
8732 if test -z "$haveit"; then
8733 rpathdirs="$rpathdirs $dir"
8734 fi
8735 haveit=
8736 for x in $ltrpathdirs; do
8737 if test "X$x" = "X$dir"; then
8738 haveit=yes
8739 break
8740 fi
8741 done
8742 if test -z "$haveit"; then
8743 ltrpathdirs="$ltrpathdirs $dir"
8744 fi
8745 fi
8746 ;;
8747 -l*)
8748 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8749 ;;
8750 *.la)
8751 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8752 ;;
8753 *)
8754 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8755 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8756 ;;
8757 esac
8758 done
8759 fi
8760 else
8761 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8762 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8763 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8764 else
8765 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8766 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8767 fi
8768 fi
8769 fi
8770 fi
8771 done
8772 done
8773 if test "X$rpathdirs" != "X"; then
8774 if test -n "$hardcode_libdir_separator"; then
8775 alldirs=
8776 for found_dir in $rpathdirs; do
8777 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8778 done
8779 acl_save_libdir="$libdir"
8780 libdir="$alldirs"
8781 eval flag=\"$hardcode_libdir_flag_spec\"
8782 libdir="$acl_save_libdir"
8783 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8784 else
8785 for found_dir in $rpathdirs; do
8786 acl_save_libdir="$libdir"
8787 libdir="$found_dir"
8788 eval flag=\"$hardcode_libdir_flag_spec\"
8789 libdir="$acl_save_libdir"
8790 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8791 done
8792 fi
8793 fi
8794 if test "X$ltrpathdirs" != "X"; then
8795 for found_dir in $ltrpathdirs; do
8796 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8797 done
8798 fi
8799
8800
8801
8802
8803
8804
8805
8806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8807 $as_echo_n "checking for iconv... " >&6; }
8808 if ${am_cv_func_iconv+:} false; then :
8809 $as_echo_n "(cached) " >&6
8810 else
8811
8812 am_cv_func_iconv="no, consider installing GNU libiconv"
8813 am_cv_lib_iconv=no
8814 am_save_CPPFLAGS="$CPPFLAGS"
8815 CPPFLAGS="$CPPFLAGS $INCICONV"
8816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8817 /* end confdefs.h. */
8818 #include <stdlib.h>
8819 #include <iconv.h>
8820 int
8821 main ()
8822 {
8823 iconv_t cd = iconv_open("","");
8824 iconv(cd,NULL,NULL,NULL,NULL);
8825 iconv_close(cd);
8826 ;
8827 return 0;
8828 }
8829 _ACEOF
8830 if ac_fn_c_try_link "$LINENO"; then :
8831 am_cv_func_iconv=yes
8832 fi
8833 rm -f core conftest.err conftest.$ac_objext \
8834 conftest$ac_exeext conftest.$ac_ext
8835 CPPFLAGS="$am_save_CPPFLAGS"
8836
8837 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8838 for _libs in .libs _libs; do
8839 am_save_CPPFLAGS="$CPPFLAGS"
8840 am_save_LIBS="$LIBS"
8841 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8842 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8844 /* end confdefs.h. */
8845 #include <stdlib.h>
8846 #include <iconv.h>
8847 int
8848 main ()
8849 {
8850 iconv_t cd = iconv_open("","");
8851 iconv(cd,NULL,NULL,NULL,NULL);
8852 iconv_close(cd);
8853 ;
8854 return 0;
8855 }
8856 _ACEOF
8857 if ac_fn_c_try_link "$LINENO"; then :
8858 INCICONV="-I../libiconv/include"
8859 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8860 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8861 am_cv_lib_iconv=yes
8862 am_cv_func_iconv=yes
8863 fi
8864 rm -f core conftest.err conftest.$ac_objext \
8865 conftest$ac_exeext conftest.$ac_ext
8866 CPPFLAGS="$am_save_CPPFLAGS"
8867 LIBS="$am_save_LIBS"
8868 if test "$am_cv_func_iconv" = "yes"; then
8869 break
8870 fi
8871 done
8872 fi
8873
8874 if test "$am_cv_func_iconv" != yes; then
8875 am_save_CPPFLAGS="$CPPFLAGS"
8876 am_save_LIBS="$LIBS"
8877 CPPFLAGS="$CPPFLAGS $INCICONV"
8878 LIBS="$LIBS $LIBICONV"
8879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8880 /* end confdefs.h. */
8881 #include <stdlib.h>
8882 #include <iconv.h>
8883 int
8884 main ()
8885 {
8886 iconv_t cd = iconv_open("","");
8887 iconv(cd,NULL,NULL,NULL,NULL);
8888 iconv_close(cd);
8889 ;
8890 return 0;
8891 }
8892 _ACEOF
8893 if ac_fn_c_try_link "$LINENO"; then :
8894 am_cv_lib_iconv=yes
8895 am_cv_func_iconv=yes
8896 fi
8897 rm -f core conftest.err conftest.$ac_objext \
8898 conftest$ac_exeext conftest.$ac_ext
8899 CPPFLAGS="$am_save_CPPFLAGS"
8900 LIBS="$am_save_LIBS"
8901 fi
8902
8903 fi
8904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8905 $as_echo "$am_cv_func_iconv" >&6; }
8906 if test "$am_cv_func_iconv" = yes; then
8907
8908 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8909
8910 fi
8911 if test "$am_cv_lib_iconv" = yes; then
8912
8913 for element in $INCICONV; do
8914 haveit=
8915 for x in $CPPFLAGS; do
8916
8917 acl_save_prefix="$prefix"
8918 prefix="$acl_final_prefix"
8919 acl_save_exec_prefix="$exec_prefix"
8920 exec_prefix="$acl_final_exec_prefix"
8921 eval x=\"$x\"
8922 exec_prefix="$acl_save_exec_prefix"
8923 prefix="$acl_save_prefix"
8924
8925 if test "X$x" = "X$element"; then
8926 haveit=yes
8927 break
8928 fi
8929 done
8930 if test -z "$haveit"; then
8931 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8932 fi
8933 done
8934
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8936 $as_echo_n "checking how to link with libiconv... " >&6; }
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8938 $as_echo "$LIBICONV" >&6; }
8939 else
8940 LIBICONV=
8941 LTLIBICONV=
8942 fi
8943
8944
8945
8946 if test "$am_cv_func_iconv" = yes; then
8947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8948 $as_echo_n "checking for iconv declaration... " >&6; }
8949 if ${am_cv_proto_iconv+:} false; then :
8950 $as_echo_n "(cached) " >&6
8951 else
8952
8953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8954 /* end confdefs.h. */
8955
8956 #include <stdlib.h>
8957 #include <iconv.h>
8958 extern
8959 #ifdef __cplusplus
8960 "C"
8961 #endif
8962 #if defined(__STDC__) || defined(__cplusplus)
8963 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8964 #else
8965 size_t iconv();
8966 #endif
8967
8968 int
8969 main ()
8970 {
8971
8972 ;
8973 return 0;
8974 }
8975 _ACEOF
8976 if ac_fn_c_try_compile "$LINENO"; then :
8977 am_cv_proto_iconv_arg1=""
8978 else
8979 am_cv_proto_iconv_arg1="const"
8980 fi
8981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8982 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);"
8983 fi
8984
8985 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8987 }$am_cv_proto_iconv" >&5
8988 $as_echo "${ac_t:-
8989 }$am_cv_proto_iconv" >&6; }
8990
8991 cat >>confdefs.h <<_ACEOF
8992 #define ICONV_CONST $am_cv_proto_iconv_arg1
8993 _ACEOF
8994
8995 fi
8996
8997
8998 # GDB may fork/exec the iconv program to get the list of supported character
8999 # sets. Allow the user to specify where to find it.
9000 # There are several factors affecting the choice of option name:
9001 # - There is already --with-libiconv-prefix but we can't use it, it specifies
9002 # the build-time location of libiconv files.
9003 # - The program we need to find is iconv, which comes with glibc. The user
9004 # doesn't necessarily have libiconv installed. Therefore naming this
9005 # --with-libiconv-foo feels wrong.
9006 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9007 # defined to work on directories not files (though it really doesn't know
9008 # the difference).
9009 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
9010 # with --with-libiconv-prefix.
9011 # Putting these together is why the option name is --with-iconv-bin.
9012
9013
9014 # Check whether --with-iconv-bin was given.
9015 if test "${with_iconv_bin+set}" = set; then :
9016 withval=$with_iconv_bin; iconv_bin="${withval}"
9017
9018 cat >>confdefs.h <<_ACEOF
9019 #define ICONV_BIN "${iconv_bin}"
9020 _ACEOF
9021
9022
9023 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9024 if test "x$prefix" = xNONE; then
9025 test_prefix=/usr/local
9026 else
9027 test_prefix=$prefix
9028 fi
9029 else
9030 test_prefix=$exec_prefix
9031 fi
9032 value=0
9033 case ${iconv_bin} in
9034 "${test_prefix}"|"${test_prefix}/"*|\
9035 '${exec_prefix}'|'${exec_prefix}/'*)
9036 value=1
9037 ;;
9038 esac
9039
9040 cat >>confdefs.h <<_ACEOF
9041 #define ICONV_BIN_RELOCATABLE $value
9042 _ACEOF
9043
9044
9045
9046 fi
9047
9048
9049 # For the TUI, we need enhanced curses functionality.
9050 if test x"$enable_tui" != xno; then
9051 prefer_curses=yes
9052 fi
9053
9054 curses_found=no
9055 if test x"$prefer_curses" = xyes; then
9056 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9057 # curses library because the latter might not provide all the
9058 # functionality we need. However, this leads to problems on systems
9059 # where the linker searches /usr/local/lib, but the compiler doesn't
9060 # search /usr/local/include, if ncurses is installed in /usr/local. A
9061 # default installation of ncurses on alpha*-dec-osf* will lead to such
9062 # a situation.
9063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9064 $as_echo_n "checking for library containing waddstr... " >&6; }
9065 if ${ac_cv_search_waddstr+:} false; then :
9066 $as_echo_n "(cached) " >&6
9067 else
9068 ac_func_search_save_LIBS=$LIBS
9069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9070 /* end confdefs.h. */
9071
9072 /* Override any GCC internal prototype to avoid an error.
9073 Use char because int might match the return type of a GCC
9074 builtin and then its argument prototype would still apply. */
9075 #ifdef __cplusplus
9076 extern "C"
9077 #endif
9078 char waddstr ();
9079 int
9080 main ()
9081 {
9082 return waddstr ();
9083 ;
9084 return 0;
9085 }
9086 _ACEOF
9087 for ac_lib in '' ncursesw ncurses cursesX curses; do
9088 if test -z "$ac_lib"; then
9089 ac_res="none required"
9090 else
9091 ac_res=-l$ac_lib
9092 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9093 fi
9094 if ac_fn_c_try_link "$LINENO"; then :
9095 ac_cv_search_waddstr=$ac_res
9096 fi
9097 rm -f core conftest.err conftest.$ac_objext \
9098 conftest$ac_exeext
9099 if ${ac_cv_search_waddstr+:} false; then :
9100 break
9101 fi
9102 done
9103 if ${ac_cv_search_waddstr+:} false; then :
9104
9105 else
9106 ac_cv_search_waddstr=no
9107 fi
9108 rm conftest.$ac_ext
9109 LIBS=$ac_func_search_save_LIBS
9110 fi
9111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9112 $as_echo "$ac_cv_search_waddstr" >&6; }
9113 ac_res=$ac_cv_search_waddstr
9114 if test "$ac_res" != no; then :
9115 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9116
9117 fi
9118
9119
9120 if test "$ac_cv_search_waddstr" != no; then
9121 curses_found=yes
9122 fi
9123 fi
9124
9125 # Check whether we should enable the TUI, but only do so if we really
9126 # can.
9127 if test x"$enable_tui" != xno; then
9128 if test -d "$srcdir/tui"; then
9129 if test "$curses_found" != no; then
9130 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9131 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9132 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9133 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9134 else
9135 if test x"$enable_tui" = xyes; then
9136 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9137 else
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9139 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9140 fi
9141 fi
9142 fi
9143 fi
9144
9145 # Since GDB uses Readline, we need termcap functionality. In many
9146 # cases this will be provided by the curses library, but some systems
9147 # have a separate termcap library, or no curses library at all.
9148
9149 case $host_os in
9150 cygwin*)
9151 if test -d "$srcdir/libtermcap"; then
9152 LIBS="../libtermcap/libtermcap.a $LIBS"
9153 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9154 fi ;;
9155 go32* | *djgpp*)
9156 ac_cv_search_tgetent="none required"
9157 ;;
9158 esac
9159
9160 # These are the libraries checked by Readline.
9161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9162 $as_echo_n "checking for library containing tgetent... " >&6; }
9163 if ${ac_cv_search_tgetent+:} false; then :
9164 $as_echo_n "(cached) " >&6
9165 else
9166 ac_func_search_save_LIBS=$LIBS
9167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9168 /* end confdefs.h. */
9169
9170 /* Override any GCC internal prototype to avoid an error.
9171 Use char because int might match the return type of a GCC
9172 builtin and then its argument prototype would still apply. */
9173 #ifdef __cplusplus
9174 extern "C"
9175 #endif
9176 char tgetent ();
9177 int
9178 main ()
9179 {
9180 return tgetent ();
9181 ;
9182 return 0;
9183 }
9184 _ACEOF
9185 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9186 if test -z "$ac_lib"; then
9187 ac_res="none required"
9188 else
9189 ac_res=-l$ac_lib
9190 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9191 fi
9192 if ac_fn_c_try_link "$LINENO"; then :
9193 ac_cv_search_tgetent=$ac_res
9194 fi
9195 rm -f core conftest.err conftest.$ac_objext \
9196 conftest$ac_exeext
9197 if ${ac_cv_search_tgetent+:} false; then :
9198 break
9199 fi
9200 done
9201 if ${ac_cv_search_tgetent+:} false; then :
9202
9203 else
9204 ac_cv_search_tgetent=no
9205 fi
9206 rm conftest.$ac_ext
9207 LIBS=$ac_func_search_save_LIBS
9208 fi
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9210 $as_echo "$ac_cv_search_tgetent" >&6; }
9211 ac_res=$ac_cv_search_tgetent
9212 if test "$ac_res" != no; then :
9213 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9214
9215 fi
9216
9217
9218 if test "$ac_cv_search_tgetent" = no; then
9219 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9220 fi
9221
9222
9223 # Check whether --with-system-readline was given.
9224 if test "${with_system_readline+set}" = set; then :
9225 withval=$with_system_readline;
9226 fi
9227
9228
9229 if test "$with_system_readline" = yes; then
9230 for ac_header in readline/readline.h
9231 do :
9232 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9233 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9234 cat >>confdefs.h <<_ACEOF
9235 #define HAVE_READLINE_READLINE_H 1
9236 _ACEOF
9237 readline_h=yes
9238 else
9239 readline_h=no
9240 fi
9241
9242 done
9243
9244 if test "$readline_h" = "no"; then
9245 as_fn_error $? "readline development packages are probably missing" "$LINENO" 5
9246 fi
9247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9248 $as_echo_n "checking whether system readline is new enough... " >&6; }
9249 if ${gdb_cv_readline_ok+:} false; then :
9250 $as_echo_n "(cached) " >&6
9251 else
9252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9253 /* end confdefs.h. */
9254 #include <stdio.h>
9255 #include <readline/readline.h>
9256 int
9257 main ()
9258 {
9259 #if RL_VERSION_MAJOR < 7
9260 # error "readline version 7 required"
9261 #endif
9262
9263 ;
9264 return 0;
9265 }
9266 _ACEOF
9267 if ac_fn_c_try_compile "$LINENO"; then :
9268 gdb_cv_readline_ok=yes
9269 else
9270 gdb_cv_readline_ok=no
9271
9272 fi
9273 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9274
9275 fi
9276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9277 $as_echo "$gdb_cv_readline_ok" >&6; }
9278 if test "$gdb_cv_readline_ok" != yes; then
9279 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9280 fi
9281
9282 READLINE=-lreadline
9283 READLINE_DEPS=
9284 READLINE_CFLAGS=
9285 READLINE_TEXI_INCFLAG=
9286 else
9287 READLINE='$(READLINE_DIR)/libreadline.a'
9288 READLINE_DEPS='$(READLINE)'
9289 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9290 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9291 fi
9292
9293
9294
9295
9296
9297 # Generate jit-reader.h
9298
9299 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9300 TARGET_PTR=
9301
9302 # The cast to long int works around a bug in the HP C Compiler
9303 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9304 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9305 # This bug is HP SR number 8606223364.
9306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9307 $as_echo_n "checking size of unsigned long long... " >&6; }
9308 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9309 $as_echo_n "(cached) " >&6
9310 else
9311 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9312
9313 else
9314 if test "$ac_cv_type_unsigned_long_long" = yes; then
9315 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9316 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9317 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9318 See \`config.log' for more details" "$LINENO" 5; }
9319 else
9320 ac_cv_sizeof_unsigned_long_long=0
9321 fi
9322 fi
9323
9324 fi
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9326 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9327
9328
9329
9330 cat >>confdefs.h <<_ACEOF
9331 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9332 _ACEOF
9333
9334
9335 # The cast to long int works around a bug in the HP C Compiler
9336 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9337 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9338 # This bug is HP SR number 8606223364.
9339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9340 $as_echo_n "checking size of unsigned long... " >&6; }
9341 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9342 $as_echo_n "(cached) " >&6
9343 else
9344 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9345
9346 else
9347 if test "$ac_cv_type_unsigned_long" = yes; then
9348 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9349 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9350 as_fn_error 77 "cannot compute sizeof (unsigned long)
9351 See \`config.log' for more details" "$LINENO" 5; }
9352 else
9353 ac_cv_sizeof_unsigned_long=0
9354 fi
9355 fi
9356
9357 fi
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9359 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9360
9361
9362
9363 cat >>confdefs.h <<_ACEOF
9364 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9365 _ACEOF
9366
9367
9368 # The cast to long int works around a bug in the HP C Compiler
9369 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9370 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9371 # This bug is HP SR number 8606223364.
9372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9373 $as_echo_n "checking size of unsigned __int128... " >&6; }
9374 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9375 $as_echo_n "(cached) " >&6
9376 else
9377 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9378
9379 else
9380 if test "$ac_cv_type_unsigned___int128" = yes; then
9381 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9382 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9383 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9384 See \`config.log' for more details" "$LINENO" 5; }
9385 else
9386 ac_cv_sizeof_unsigned___int128=0
9387 fi
9388 fi
9389
9390 fi
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9392 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9393
9394
9395
9396 cat >>confdefs.h <<_ACEOF
9397 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9398 _ACEOF
9399
9400
9401
9402 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9403 TARGET_PTR="unsigned long"
9404 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9405 TARGET_PTR="unsigned long long"
9406 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9407 TARGET_PTR="unsigned __int128"
9408 else
9409 TARGET_PTR="unsigned long"
9410 fi
9411
9412
9413 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9414
9415
9416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9417 $as_echo_n "checking for library containing dlopen... " >&6; }
9418 if ${ac_cv_search_dlopen+:} false; then :
9419 $as_echo_n "(cached) " >&6
9420 else
9421 ac_func_search_save_LIBS=$LIBS
9422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9423 /* end confdefs.h. */
9424
9425 /* Override any GCC internal prototype to avoid an error.
9426 Use char because int might match the return type of a GCC
9427 builtin and then its argument prototype would still apply. */
9428 #ifdef __cplusplus
9429 extern "C"
9430 #endif
9431 char dlopen ();
9432 int
9433 main ()
9434 {
9435 return dlopen ();
9436 ;
9437 return 0;
9438 }
9439 _ACEOF
9440 for ac_lib in '' dl; do
9441 if test -z "$ac_lib"; then
9442 ac_res="none required"
9443 else
9444 ac_res=-l$ac_lib
9445 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9446 fi
9447 if ac_fn_c_try_link "$LINENO"; then :
9448 ac_cv_search_dlopen=$ac_res
9449 fi
9450 rm -f core conftest.err conftest.$ac_objext \
9451 conftest$ac_exeext
9452 if ${ac_cv_search_dlopen+:} false; then :
9453 break
9454 fi
9455 done
9456 if ${ac_cv_search_dlopen+:} false; then :
9457
9458 else
9459 ac_cv_search_dlopen=no
9460 fi
9461 rm conftest.$ac_ext
9462 LIBS=$ac_func_search_save_LIBS
9463 fi
9464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9465 $as_echo "$ac_cv_search_dlopen" >&6; }
9466 ac_res=$ac_cv_search_dlopen
9467 if test "$ac_res" != no; then :
9468 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9469
9470 fi
9471
9472
9473
9474
9475 # Check whether --with-jit-reader-dir was given.
9476 if test "${with_jit_reader_dir+set}" = set; then :
9477 withval=$with_jit_reader_dir;
9478 JIT_READER_DIR=$withval
9479 else
9480 JIT_READER_DIR=${libdir}/gdb
9481 fi
9482
9483
9484 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9485 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9486 ac_define_dir=`eval echo $JIT_READER_DIR`
9487 ac_define_dir=`eval echo $ac_define_dir`
9488
9489 cat >>confdefs.h <<_ACEOF
9490 #define JIT_READER_DIR "$ac_define_dir"
9491 _ACEOF
9492
9493
9494
9495
9496 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9497 if test "x$prefix" = xNONE; then
9498 test_prefix=/usr/local
9499 else
9500 test_prefix=$prefix
9501 fi
9502 else
9503 test_prefix=$exec_prefix
9504 fi
9505 value=0
9506 case ${ac_define_dir} in
9507 "${test_prefix}"|"${test_prefix}/"*|\
9508 '${exec_prefix}'|'${exec_prefix}/'*)
9509 value=1
9510 ;;
9511 esac
9512
9513 cat >>confdefs.h <<_ACEOF
9514 #define JIT_READER_DIR_RELOCATABLE $value
9515 _ACEOF
9516
9517
9518
9519
9520
9521 # Check whether --with-expat was given.
9522 if test "${with_expat+set}" = set; then :
9523 withval=$with_expat;
9524 else
9525 with_expat=auto
9526 fi
9527
9528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9529 $as_echo_n "checking whether to use expat... " >&6; }
9530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9531 $as_echo "$with_expat" >&6; }
9532
9533 if test "${with_expat}" = no; then
9534 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9535 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9536 HAVE_LIBEXPAT=no
9537 else
9538
9539
9540
9541
9542
9543
9544
9545
9546 use_additional=yes
9547
9548 acl_save_prefix="$prefix"
9549 prefix="$acl_final_prefix"
9550 acl_save_exec_prefix="$exec_prefix"
9551 exec_prefix="$acl_final_exec_prefix"
9552
9553 eval additional_includedir=\"$includedir\"
9554 eval additional_libdir=\"$libdir\"
9555
9556 exec_prefix="$acl_save_exec_prefix"
9557 prefix="$acl_save_prefix"
9558
9559
9560 # Check whether --with-libexpat-prefix was given.
9561 if test "${with_libexpat_prefix+set}" = set; then :
9562 withval=$with_libexpat_prefix;
9563 if test "X$withval" = "Xno"; then
9564 use_additional=no
9565 else
9566 if test "X$withval" = "X"; then
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
9573 eval additional_includedir=\"$includedir\"
9574 eval additional_libdir=\"$libdir\"
9575
9576 exec_prefix="$acl_save_exec_prefix"
9577 prefix="$acl_save_prefix"
9578
9579 else
9580 additional_includedir="$withval/include"
9581 additional_libdir="$withval/lib"
9582 fi
9583 fi
9584
9585 fi
9586
9587
9588 # Check whether --with-libexpat-type was given.
9589 if test "${with_libexpat_type+set}" = set; then :
9590 withval=$with_libexpat_type; with_libexpat_type=$withval
9591 else
9592 with_libexpat_type=auto
9593 fi
9594
9595 lib_type=`eval echo \$with_libexpat_type`
9596
9597 LIBEXPAT=
9598 LTLIBEXPAT=
9599 INCEXPAT=
9600 rpathdirs=
9601 ltrpathdirs=
9602 names_already_handled=
9603 names_next_round='expat '
9604 while test -n "$names_next_round"; do
9605 names_this_round="$names_next_round"
9606 names_next_round=
9607 for name in $names_this_round; do
9608 already_handled=
9609 for n in $names_already_handled; do
9610 if test "$n" = "$name"; then
9611 already_handled=yes
9612 break
9613 fi
9614 done
9615 if test -z "$already_handled"; then
9616 names_already_handled="$names_already_handled $name"
9617 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9618 eval value=\"\$HAVE_LIB$uppername\"
9619 if test -n "$value"; then
9620 if test "$value" = yes; then
9621 eval value=\"\$LIB$uppername\"
9622 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9623 eval value=\"\$LTLIB$uppername\"
9624 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9625 else
9626 :
9627 fi
9628 else
9629 found_dir=
9630 found_la=
9631 found_so=
9632 found_a=
9633 if test $use_additional = yes; then
9634 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9635 found_dir="$additional_libdir"
9636 found_so="$additional_libdir/lib$name.$shlibext"
9637 if test -f "$additional_libdir/lib$name.la"; then
9638 found_la="$additional_libdir/lib$name.la"
9639 fi
9640 elif test x$lib_type != xshared; then
9641 if test -f "$additional_libdir/lib$name.$libext"; then
9642 found_dir="$additional_libdir"
9643 found_a="$additional_libdir/lib$name.$libext"
9644 if test -f "$additional_libdir/lib$name.la"; then
9645 found_la="$additional_libdir/lib$name.la"
9646 fi
9647 fi
9648 fi
9649 fi
9650 if test "X$found_dir" = "X"; then
9651 for x in $LDFLAGS $LTLIBEXPAT; do
9652
9653 acl_save_prefix="$prefix"
9654 prefix="$acl_final_prefix"
9655 acl_save_exec_prefix="$exec_prefix"
9656 exec_prefix="$acl_final_exec_prefix"
9657 eval x=\"$x\"
9658 exec_prefix="$acl_save_exec_prefix"
9659 prefix="$acl_save_prefix"
9660
9661 case "$x" in
9662 -L*)
9663 dir=`echo "X$x" | sed -e 's/^X-L//'`
9664 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9665 found_dir="$dir"
9666 found_so="$dir/lib$name.$shlibext"
9667 if test -f "$dir/lib$name.la"; then
9668 found_la="$dir/lib$name.la"
9669 fi
9670 elif test x$lib_type != xshared; then
9671 if test -f "$dir/lib$name.$libext"; then
9672 found_dir="$dir"
9673 found_a="$dir/lib$name.$libext"
9674 if test -f "$dir/lib$name.la"; then
9675 found_la="$dir/lib$name.la"
9676 fi
9677 fi
9678 fi
9679 ;;
9680 esac
9681 if test "X$found_dir" != "X"; then
9682 break
9683 fi
9684 done
9685 fi
9686 if test "X$found_dir" != "X"; then
9687 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9688 if test "X$found_so" != "X"; then
9689 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9690 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9691 else
9692 haveit=
9693 for x in $ltrpathdirs; do
9694 if test "X$x" = "X$found_dir"; then
9695 haveit=yes
9696 break
9697 fi
9698 done
9699 if test -z "$haveit"; then
9700 ltrpathdirs="$ltrpathdirs $found_dir"
9701 fi
9702 if test "$hardcode_direct" = yes; then
9703 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9704 else
9705 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9706 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9707 haveit=
9708 for x in $rpathdirs; do
9709 if test "X$x" = "X$found_dir"; then
9710 haveit=yes
9711 break
9712 fi
9713 done
9714 if test -z "$haveit"; then
9715 rpathdirs="$rpathdirs $found_dir"
9716 fi
9717 else
9718 haveit=
9719 for x in $LDFLAGS $LIBEXPAT; do
9720
9721 acl_save_prefix="$prefix"
9722 prefix="$acl_final_prefix"
9723 acl_save_exec_prefix="$exec_prefix"
9724 exec_prefix="$acl_final_exec_prefix"
9725 eval x=\"$x\"
9726 exec_prefix="$acl_save_exec_prefix"
9727 prefix="$acl_save_prefix"
9728
9729 if test "X$x" = "X-L$found_dir"; then
9730 haveit=yes
9731 break
9732 fi
9733 done
9734 if test -z "$haveit"; then
9735 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9736 fi
9737 if test "$hardcode_minus_L" != no; then
9738 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9739 else
9740 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9741 fi
9742 fi
9743 fi
9744 fi
9745 else
9746 if test "X$found_a" != "X"; then
9747 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9748 else
9749 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9750 fi
9751 fi
9752 additional_includedir=
9753 case "$found_dir" in
9754 */lib | */lib/)
9755 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9756 additional_includedir="$basedir/include"
9757 ;;
9758 esac
9759 if test "X$additional_includedir" != "X"; then
9760 if test "X$additional_includedir" != "X/usr/include"; then
9761 haveit=
9762 if test "X$additional_includedir" = "X/usr/local/include"; then
9763 if test -n "$GCC"; then
9764 case $host_os in
9765 linux*) haveit=yes;;
9766 esac
9767 fi
9768 fi
9769 if test -z "$haveit"; then
9770 for x in $CPPFLAGS $INCEXPAT; do
9771
9772 acl_save_prefix="$prefix"
9773 prefix="$acl_final_prefix"
9774 acl_save_exec_prefix="$exec_prefix"
9775 exec_prefix="$acl_final_exec_prefix"
9776 eval x=\"$x\"
9777 exec_prefix="$acl_save_exec_prefix"
9778 prefix="$acl_save_prefix"
9779
9780 if test "X$x" = "X-I$additional_includedir"; then
9781 haveit=yes
9782 break
9783 fi
9784 done
9785 if test -z "$haveit"; then
9786 if test -d "$additional_includedir"; then
9787 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9788 fi
9789 fi
9790 fi
9791 fi
9792 fi
9793 if test -n "$found_la"; then
9794 save_libdir="$libdir"
9795 case "$found_la" in
9796 */* | *\\*) . "$found_la" ;;
9797 *) . "./$found_la" ;;
9798 esac
9799 libdir="$save_libdir"
9800 for dep in $dependency_libs; do
9801 case "$dep" in
9802 -L*)
9803 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9804 if test "X$additional_libdir" != "X/usr/lib"; then
9805 haveit=
9806 if test "X$additional_libdir" = "X/usr/local/lib"; then
9807 if test -n "$GCC"; then
9808 case $host_os in
9809 linux*) haveit=yes;;
9810 esac
9811 fi
9812 fi
9813 if test -z "$haveit"; then
9814 haveit=
9815 for x in $LDFLAGS $LIBEXPAT; do
9816
9817 acl_save_prefix="$prefix"
9818 prefix="$acl_final_prefix"
9819 acl_save_exec_prefix="$exec_prefix"
9820 exec_prefix="$acl_final_exec_prefix"
9821 eval x=\"$x\"
9822 exec_prefix="$acl_save_exec_prefix"
9823 prefix="$acl_save_prefix"
9824
9825 if test "X$x" = "X-L$additional_libdir"; then
9826 haveit=yes
9827 break
9828 fi
9829 done
9830 if test -z "$haveit"; then
9831 if test -d "$additional_libdir"; then
9832 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9833 fi
9834 fi
9835 haveit=
9836 for x in $LDFLAGS $LTLIBEXPAT; do
9837
9838 acl_save_prefix="$prefix"
9839 prefix="$acl_final_prefix"
9840 acl_save_exec_prefix="$exec_prefix"
9841 exec_prefix="$acl_final_exec_prefix"
9842 eval x=\"$x\"
9843 exec_prefix="$acl_save_exec_prefix"
9844 prefix="$acl_save_prefix"
9845
9846 if test "X$x" = "X-L$additional_libdir"; then
9847 haveit=yes
9848 break
9849 fi
9850 done
9851 if test -z "$haveit"; then
9852 if test -d "$additional_libdir"; then
9853 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9854 fi
9855 fi
9856 fi
9857 fi
9858 ;;
9859 -R*)
9860 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9861 if test "$enable_rpath" != no; then
9862 haveit=
9863 for x in $rpathdirs; do
9864 if test "X$x" = "X$dir"; then
9865 haveit=yes
9866 break
9867 fi
9868 done
9869 if test -z "$haveit"; then
9870 rpathdirs="$rpathdirs $dir"
9871 fi
9872 haveit=
9873 for x in $ltrpathdirs; do
9874 if test "X$x" = "X$dir"; then
9875 haveit=yes
9876 break
9877 fi
9878 done
9879 if test -z "$haveit"; then
9880 ltrpathdirs="$ltrpathdirs $dir"
9881 fi
9882 fi
9883 ;;
9884 -l*)
9885 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9886 ;;
9887 *.la)
9888 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9889 ;;
9890 *)
9891 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9892 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9893 ;;
9894 esac
9895 done
9896 fi
9897 else
9898 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9899 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9900 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9901 else
9902 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9903 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9904 fi
9905 fi
9906 fi
9907 fi
9908 done
9909 done
9910 if test "X$rpathdirs" != "X"; then
9911 if test -n "$hardcode_libdir_separator"; then
9912 alldirs=
9913 for found_dir in $rpathdirs; do
9914 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9915 done
9916 acl_save_libdir="$libdir"
9917 libdir="$alldirs"
9918 eval flag=\"$hardcode_libdir_flag_spec\"
9919 libdir="$acl_save_libdir"
9920 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9921 else
9922 for found_dir in $rpathdirs; do
9923 acl_save_libdir="$libdir"
9924 libdir="$found_dir"
9925 eval flag=\"$hardcode_libdir_flag_spec\"
9926 libdir="$acl_save_libdir"
9927 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9928 done
9929 fi
9930 fi
9931 if test "X$ltrpathdirs" != "X"; then
9932 for found_dir in $ltrpathdirs; do
9933 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9934 done
9935 fi
9936
9937
9938 ac_save_CPPFLAGS="$CPPFLAGS"
9939
9940 for element in $INCEXPAT; do
9941 haveit=
9942 for x in $CPPFLAGS; do
9943
9944 acl_save_prefix="$prefix"
9945 prefix="$acl_final_prefix"
9946 acl_save_exec_prefix="$exec_prefix"
9947 exec_prefix="$acl_final_exec_prefix"
9948 eval x=\"$x\"
9949 exec_prefix="$acl_save_exec_prefix"
9950 prefix="$acl_save_prefix"
9951
9952 if test "X$x" = "X$element"; then
9953 haveit=yes
9954 break
9955 fi
9956 done
9957 if test -z "$haveit"; then
9958 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9959 fi
9960 done
9961
9962
9963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9964 $as_echo_n "checking for libexpat... " >&6; }
9965 if ${ac_cv_libexpat+:} false; then :
9966 $as_echo_n "(cached) " >&6
9967 else
9968
9969 ac_save_LIBS="$LIBS"
9970 LIBS="$LIBS $LIBEXPAT"
9971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9972 /* end confdefs.h. */
9973 #include "expat.h"
9974 int
9975 main ()
9976 {
9977 XML_Parser p = XML_ParserCreate (0);
9978 ;
9979 return 0;
9980 }
9981 _ACEOF
9982 if ac_fn_c_try_link "$LINENO"; then :
9983 ac_cv_libexpat=yes
9984 else
9985 ac_cv_libexpat=no
9986 fi
9987 rm -f core conftest.err conftest.$ac_objext \
9988 conftest$ac_exeext conftest.$ac_ext
9989 LIBS="$ac_save_LIBS"
9990
9991 fi
9992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9993 $as_echo "$ac_cv_libexpat" >&6; }
9994 if test "$ac_cv_libexpat" = yes; then
9995 HAVE_LIBEXPAT=yes
9996
9997 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9998
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10000 $as_echo_n "checking how to link with libexpat... " >&6; }
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10002 $as_echo "$LIBEXPAT" >&6; }
10003 else
10004 HAVE_LIBEXPAT=no
10005 CPPFLAGS="$ac_save_CPPFLAGS"
10006 LIBEXPAT=
10007 LTLIBEXPAT=
10008 fi
10009
10010
10011
10012
10013
10014
10015 if test "$HAVE_LIBEXPAT" != yes; then
10016 if test "$with_expat" = yes; then
10017 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
10018 else
10019 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10020 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10021 fi
10022 else
10023 save_LIBS=$LIBS
10024 LIBS="$LIBS $LIBEXPAT"
10025 for ac_func in XML_StopParser
10026 do :
10027 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10028 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
10029 cat >>confdefs.h <<_ACEOF
10030 #define HAVE_XML_STOPPARSER 1
10031 _ACEOF
10032
10033 fi
10034 done
10035
10036 LIBS=$save_LIBS
10037 fi
10038 fi
10039
10040 # Verify that we have a usable GMP library.
10041
10042
10043
10044
10045
10046
10047
10048
10049 use_additional=yes
10050
10051 acl_save_prefix="$prefix"
10052 prefix="$acl_final_prefix"
10053 acl_save_exec_prefix="$exec_prefix"
10054 exec_prefix="$acl_final_exec_prefix"
10055
10056 eval additional_includedir=\"$includedir\"
10057 eval additional_libdir=\"$libdir\"
10058
10059 exec_prefix="$acl_save_exec_prefix"
10060 prefix="$acl_save_prefix"
10061
10062
10063 # Check whether --with-libgmp-prefix was given.
10064 if test "${with_libgmp_prefix+set}" = set; then :
10065 withval=$with_libgmp_prefix;
10066 if test "X$withval" = "Xno"; then
10067 use_additional=no
10068 else
10069 if test "X$withval" = "X"; then
10070
10071 acl_save_prefix="$prefix"
10072 prefix="$acl_final_prefix"
10073 acl_save_exec_prefix="$exec_prefix"
10074 exec_prefix="$acl_final_exec_prefix"
10075
10076 eval additional_includedir=\"$includedir\"
10077 eval additional_libdir=\"$libdir\"
10078
10079 exec_prefix="$acl_save_exec_prefix"
10080 prefix="$acl_save_prefix"
10081
10082 else
10083 additional_includedir="$withval/include"
10084 additional_libdir="$withval/lib"
10085 fi
10086 fi
10087
10088 fi
10089
10090
10091 # Check whether --with-libgmp-type was given.
10092 if test "${with_libgmp_type+set}" = set; then :
10093 withval=$with_libgmp_type; with_libgmp_type=$withval
10094 else
10095 with_libgmp_type=auto
10096 fi
10097
10098 lib_type=`eval echo \$with_libgmp_type`
10099
10100 LIBGMP=
10101 LTLIBGMP=
10102 INCGMP=
10103 rpathdirs=
10104 ltrpathdirs=
10105 names_already_handled=
10106 names_next_round='gmp '
10107 while test -n "$names_next_round"; do
10108 names_this_round="$names_next_round"
10109 names_next_round=
10110 for name in $names_this_round; do
10111 already_handled=
10112 for n in $names_already_handled; do
10113 if test "$n" = "$name"; then
10114 already_handled=yes
10115 break
10116 fi
10117 done
10118 if test -z "$already_handled"; then
10119 names_already_handled="$names_already_handled $name"
10120 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10121 eval value=\"\$HAVE_LIB$uppername\"
10122 if test -n "$value"; then
10123 if test "$value" = yes; then
10124 eval value=\"\$LIB$uppername\"
10125 test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value"
10126 eval value=\"\$LTLIB$uppername\"
10127 test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value"
10128 else
10129 :
10130 fi
10131 else
10132 found_dir=
10133 found_la=
10134 found_so=
10135 found_a=
10136 if test $use_additional = yes; then
10137 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10138 found_dir="$additional_libdir"
10139 found_so="$additional_libdir/lib$name.$shlibext"
10140 if test -f "$additional_libdir/lib$name.la"; then
10141 found_la="$additional_libdir/lib$name.la"
10142 fi
10143 elif test x$lib_type != xshared; then
10144 if test -f "$additional_libdir/lib$name.$libext"; then
10145 found_dir="$additional_libdir"
10146 found_a="$additional_libdir/lib$name.$libext"
10147 if test -f "$additional_libdir/lib$name.la"; then
10148 found_la="$additional_libdir/lib$name.la"
10149 fi
10150 fi
10151 fi
10152 fi
10153 if test "X$found_dir" = "X"; then
10154 for x in $LDFLAGS $LTLIBGMP; do
10155
10156 acl_save_prefix="$prefix"
10157 prefix="$acl_final_prefix"
10158 acl_save_exec_prefix="$exec_prefix"
10159 exec_prefix="$acl_final_exec_prefix"
10160 eval x=\"$x\"
10161 exec_prefix="$acl_save_exec_prefix"
10162 prefix="$acl_save_prefix"
10163
10164 case "$x" in
10165 -L*)
10166 dir=`echo "X$x" | sed -e 's/^X-L//'`
10167 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10168 found_dir="$dir"
10169 found_so="$dir/lib$name.$shlibext"
10170 if test -f "$dir/lib$name.la"; then
10171 found_la="$dir/lib$name.la"
10172 fi
10173 elif test x$lib_type != xshared; then
10174 if test -f "$dir/lib$name.$libext"; then
10175 found_dir="$dir"
10176 found_a="$dir/lib$name.$libext"
10177 if test -f "$dir/lib$name.la"; then
10178 found_la="$dir/lib$name.la"
10179 fi
10180 fi
10181 fi
10182 ;;
10183 esac
10184 if test "X$found_dir" != "X"; then
10185 break
10186 fi
10187 done
10188 fi
10189 if test "X$found_dir" != "X"; then
10190 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name"
10191 if test "X$found_so" != "X"; then
10192 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10193 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10194 else
10195 haveit=
10196 for x in $ltrpathdirs; do
10197 if test "X$x" = "X$found_dir"; then
10198 haveit=yes
10199 break
10200 fi
10201 done
10202 if test -z "$haveit"; then
10203 ltrpathdirs="$ltrpathdirs $found_dir"
10204 fi
10205 if test "$hardcode_direct" = yes; then
10206 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10207 else
10208 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10209 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10210 haveit=
10211 for x in $rpathdirs; do
10212 if test "X$x" = "X$found_dir"; then
10213 haveit=yes
10214 break
10215 fi
10216 done
10217 if test -z "$haveit"; then
10218 rpathdirs="$rpathdirs $found_dir"
10219 fi
10220 else
10221 haveit=
10222 for x in $LDFLAGS $LIBGMP; do
10223
10224 acl_save_prefix="$prefix"
10225 prefix="$acl_final_prefix"
10226 acl_save_exec_prefix="$exec_prefix"
10227 exec_prefix="$acl_final_exec_prefix"
10228 eval x=\"$x\"
10229 exec_prefix="$acl_save_exec_prefix"
10230 prefix="$acl_save_prefix"
10231
10232 if test "X$x" = "X-L$found_dir"; then
10233 haveit=yes
10234 break
10235 fi
10236 done
10237 if test -z "$haveit"; then
10238 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir"
10239 fi
10240 if test "$hardcode_minus_L" != no; then
10241 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10242 else
10243 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10244 fi
10245 fi
10246 fi
10247 fi
10248 else
10249 if test "X$found_a" != "X"; then
10250 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a"
10251 else
10252 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name"
10253 fi
10254 fi
10255 additional_includedir=
10256 case "$found_dir" in
10257 */lib | */lib/)
10258 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10259 additional_includedir="$basedir/include"
10260 ;;
10261 esac
10262 if test "X$additional_includedir" != "X"; then
10263 if test "X$additional_includedir" != "X/usr/include"; then
10264 haveit=
10265 if test "X$additional_includedir" = "X/usr/local/include"; then
10266 if test -n "$GCC"; then
10267 case $host_os in
10268 linux*) haveit=yes;;
10269 esac
10270 fi
10271 fi
10272 if test -z "$haveit"; then
10273 for x in $CPPFLAGS $INCGMP; do
10274
10275 acl_save_prefix="$prefix"
10276 prefix="$acl_final_prefix"
10277 acl_save_exec_prefix="$exec_prefix"
10278 exec_prefix="$acl_final_exec_prefix"
10279 eval x=\"$x\"
10280 exec_prefix="$acl_save_exec_prefix"
10281 prefix="$acl_save_prefix"
10282
10283 if test "X$x" = "X-I$additional_includedir"; then
10284 haveit=yes
10285 break
10286 fi
10287 done
10288 if test -z "$haveit"; then
10289 if test -d "$additional_includedir"; then
10290 INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir"
10291 fi
10292 fi
10293 fi
10294 fi
10295 fi
10296 if test -n "$found_la"; then
10297 save_libdir="$libdir"
10298 case "$found_la" in
10299 */* | *\\*) . "$found_la" ;;
10300 *) . "./$found_la" ;;
10301 esac
10302 libdir="$save_libdir"
10303 for dep in $dependency_libs; do
10304 case "$dep" in
10305 -L*)
10306 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10307 if test "X$additional_libdir" != "X/usr/lib"; then
10308 haveit=
10309 if test "X$additional_libdir" = "X/usr/local/lib"; then
10310 if test -n "$GCC"; then
10311 case $host_os in
10312 linux*) haveit=yes;;
10313 esac
10314 fi
10315 fi
10316 if test -z "$haveit"; then
10317 haveit=
10318 for x in $LDFLAGS $LIBGMP; do
10319
10320 acl_save_prefix="$prefix"
10321 prefix="$acl_final_prefix"
10322 acl_save_exec_prefix="$exec_prefix"
10323 exec_prefix="$acl_final_exec_prefix"
10324 eval x=\"$x\"
10325 exec_prefix="$acl_save_exec_prefix"
10326 prefix="$acl_save_prefix"
10327
10328 if test "X$x" = "X-L$additional_libdir"; then
10329 haveit=yes
10330 break
10331 fi
10332 done
10333 if test -z "$haveit"; then
10334 if test -d "$additional_libdir"; then
10335 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir"
10336 fi
10337 fi
10338 haveit=
10339 for x in $LDFLAGS $LTLIBGMP; do
10340
10341 acl_save_prefix="$prefix"
10342 prefix="$acl_final_prefix"
10343 acl_save_exec_prefix="$exec_prefix"
10344 exec_prefix="$acl_final_exec_prefix"
10345 eval x=\"$x\"
10346 exec_prefix="$acl_save_exec_prefix"
10347 prefix="$acl_save_prefix"
10348
10349 if test "X$x" = "X-L$additional_libdir"; then
10350 haveit=yes
10351 break
10352 fi
10353 done
10354 if test -z "$haveit"; then
10355 if test -d "$additional_libdir"; then
10356 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir"
10357 fi
10358 fi
10359 fi
10360 fi
10361 ;;
10362 -R*)
10363 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10364 if test "$enable_rpath" != no; then
10365 haveit=
10366 for x in $rpathdirs; do
10367 if test "X$x" = "X$dir"; then
10368 haveit=yes
10369 break
10370 fi
10371 done
10372 if test -z "$haveit"; then
10373 rpathdirs="$rpathdirs $dir"
10374 fi
10375 haveit=
10376 for x in $ltrpathdirs; do
10377 if test "X$x" = "X$dir"; then
10378 haveit=yes
10379 break
10380 fi
10381 done
10382 if test -z "$haveit"; then
10383 ltrpathdirs="$ltrpathdirs $dir"
10384 fi
10385 fi
10386 ;;
10387 -l*)
10388 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10389 ;;
10390 *.la)
10391 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10392 ;;
10393 *)
10394 LIBGMP="${LIBGMP}${LIBGMP:+ }$dep"
10395 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep"
10396 ;;
10397 esac
10398 done
10399 fi
10400 else
10401 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10402 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10403 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name"
10404 else
10405 LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext"
10406 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext"
10407 fi
10408 fi
10409 fi
10410 fi
10411 done
10412 done
10413 if test "X$rpathdirs" != "X"; then
10414 if test -n "$hardcode_libdir_separator"; then
10415 alldirs=
10416 for found_dir in $rpathdirs; do
10417 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10418 done
10419 acl_save_libdir="$libdir"
10420 libdir="$alldirs"
10421 eval flag=\"$hardcode_libdir_flag_spec\"
10422 libdir="$acl_save_libdir"
10423 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10424 else
10425 for found_dir in $rpathdirs; do
10426 acl_save_libdir="$libdir"
10427 libdir="$found_dir"
10428 eval flag=\"$hardcode_libdir_flag_spec\"
10429 libdir="$acl_save_libdir"
10430 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10431 done
10432 fi
10433 fi
10434 if test "X$ltrpathdirs" != "X"; then
10435 for found_dir in $ltrpathdirs; do
10436 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir"
10437 done
10438 fi
10439
10440
10441 ac_save_CPPFLAGS="$CPPFLAGS"
10442
10443 for element in $INCGMP; do
10444 haveit=
10445 for x in $CPPFLAGS; do
10446
10447 acl_save_prefix="$prefix"
10448 prefix="$acl_final_prefix"
10449 acl_save_exec_prefix="$exec_prefix"
10450 exec_prefix="$acl_final_exec_prefix"
10451 eval x=\"$x\"
10452 exec_prefix="$acl_save_exec_prefix"
10453 prefix="$acl_save_prefix"
10454
10455 if test "X$x" = "X$element"; then
10456 haveit=yes
10457 break
10458 fi
10459 done
10460 if test -z "$haveit"; then
10461 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10462 fi
10463 done
10464
10465
10466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5
10467 $as_echo_n "checking for libgmp... " >&6; }
10468 if ${ac_cv_libgmp+:} false; then :
10469 $as_echo_n "(cached) " >&6
10470 else
10471
10472 ac_save_LIBS="$LIBS"
10473 LIBS="$LIBS $LIBGMP"
10474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10475 /* end confdefs.h. */
10476 #include <gmp.h>
10477 int
10478 main ()
10479 {
10480 mpz_t n;
10481 mpz_init (n);
10482 ;
10483 return 0;
10484 }
10485 _ACEOF
10486 if ac_fn_c_try_link "$LINENO"; then :
10487 ac_cv_libgmp=yes
10488 else
10489 ac_cv_libgmp=no
10490 fi
10491 rm -f core conftest.err conftest.$ac_objext \
10492 conftest$ac_exeext conftest.$ac_ext
10493 LIBS="$ac_save_LIBS"
10494
10495 fi
10496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5
10497 $as_echo "$ac_cv_libgmp" >&6; }
10498 if test "$ac_cv_libgmp" = yes; then
10499 HAVE_LIBGMP=yes
10500
10501 $as_echo "#define HAVE_LIBGMP 1" >>confdefs.h
10502
10503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5
10504 $as_echo_n "checking how to link with libgmp... " >&6; }
10505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5
10506 $as_echo "$LIBGMP" >&6; }
10507 else
10508 HAVE_LIBGMP=no
10509 CPPFLAGS="$ac_save_CPPFLAGS"
10510 LIBGMP=
10511 LTLIBGMP=
10512 fi
10513
10514
10515
10516
10517
10518
10519 if test "$HAVE_LIBGMP" != yes; then
10520 as_fn_error $? "GMP is missing or unusable" "$LINENO" 5
10521 fi
10522
10523
10524 # Check whether --with-mpfr was given.
10525 if test "${with_mpfr+set}" = set; then :
10526 withval=$with_mpfr;
10527 else
10528 with_mpfr=auto
10529 fi
10530
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10532 $as_echo_n "checking whether to use MPFR... " >&6; }
10533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10534 $as_echo "$with_mpfr" >&6; }
10535
10536 if test "${with_mpfr}" = no; then
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10538 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10539 HAVE_LIBMPFR=no
10540 else
10541
10542
10543
10544
10545
10546
10547
10548
10549 use_additional=yes
10550
10551 acl_save_prefix="$prefix"
10552 prefix="$acl_final_prefix"
10553 acl_save_exec_prefix="$exec_prefix"
10554 exec_prefix="$acl_final_exec_prefix"
10555
10556 eval additional_includedir=\"$includedir\"
10557 eval additional_libdir=\"$libdir\"
10558
10559 exec_prefix="$acl_save_exec_prefix"
10560 prefix="$acl_save_prefix"
10561
10562
10563 # Check whether --with-libmpfr-prefix was given.
10564 if test "${with_libmpfr_prefix+set}" = set; then :
10565 withval=$with_libmpfr_prefix;
10566 if test "X$withval" = "Xno"; then
10567 use_additional=no
10568 else
10569 if test "X$withval" = "X"; then
10570
10571 acl_save_prefix="$prefix"
10572 prefix="$acl_final_prefix"
10573 acl_save_exec_prefix="$exec_prefix"
10574 exec_prefix="$acl_final_exec_prefix"
10575
10576 eval additional_includedir=\"$includedir\"
10577 eval additional_libdir=\"$libdir\"
10578
10579 exec_prefix="$acl_save_exec_prefix"
10580 prefix="$acl_save_prefix"
10581
10582 else
10583 additional_includedir="$withval/include"
10584 additional_libdir="$withval/lib"
10585 fi
10586 fi
10587
10588 fi
10589
10590
10591 # Check whether --with-libmpfr-type was given.
10592 if test "${with_libmpfr_type+set}" = set; then :
10593 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10594 else
10595 with_libmpfr_type=auto
10596 fi
10597
10598 lib_type=`eval echo \$with_libmpfr_type`
10599
10600 LIBMPFR=
10601 LTLIBMPFR=
10602 INCMPFR=
10603 rpathdirs=
10604 ltrpathdirs=
10605 names_already_handled=
10606 names_next_round='mpfr gmp'
10607 while test -n "$names_next_round"; do
10608 names_this_round="$names_next_round"
10609 names_next_round=
10610 for name in $names_this_round; do
10611 already_handled=
10612 for n in $names_already_handled; do
10613 if test "$n" = "$name"; then
10614 already_handled=yes
10615 break
10616 fi
10617 done
10618 if test -z "$already_handled"; then
10619 names_already_handled="$names_already_handled $name"
10620 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10621 eval value=\"\$HAVE_LIB$uppername\"
10622 if test -n "$value"; then
10623 if test "$value" = yes; then
10624 eval value=\"\$LIB$uppername\"
10625 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10626 eval value=\"\$LTLIB$uppername\"
10627 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10628 else
10629 :
10630 fi
10631 else
10632 found_dir=
10633 found_la=
10634 found_so=
10635 found_a=
10636 if test $use_additional = yes; then
10637 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10638 found_dir="$additional_libdir"
10639 found_so="$additional_libdir/lib$name.$shlibext"
10640 if test -f "$additional_libdir/lib$name.la"; then
10641 found_la="$additional_libdir/lib$name.la"
10642 fi
10643 elif test x$lib_type != xshared; then
10644 if test -f "$additional_libdir/lib$name.$libext"; then
10645 found_dir="$additional_libdir"
10646 found_a="$additional_libdir/lib$name.$libext"
10647 if test -f "$additional_libdir/lib$name.la"; then
10648 found_la="$additional_libdir/lib$name.la"
10649 fi
10650 fi
10651 fi
10652 fi
10653 if test "X$found_dir" = "X"; then
10654 for x in $LDFLAGS $LTLIBMPFR; do
10655
10656 acl_save_prefix="$prefix"
10657 prefix="$acl_final_prefix"
10658 acl_save_exec_prefix="$exec_prefix"
10659 exec_prefix="$acl_final_exec_prefix"
10660 eval x=\"$x\"
10661 exec_prefix="$acl_save_exec_prefix"
10662 prefix="$acl_save_prefix"
10663
10664 case "$x" in
10665 -L*)
10666 dir=`echo "X$x" | sed -e 's/^X-L//'`
10667 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10668 found_dir="$dir"
10669 found_so="$dir/lib$name.$shlibext"
10670 if test -f "$dir/lib$name.la"; then
10671 found_la="$dir/lib$name.la"
10672 fi
10673 elif test x$lib_type != xshared; then
10674 if test -f "$dir/lib$name.$libext"; then
10675 found_dir="$dir"
10676 found_a="$dir/lib$name.$libext"
10677 if test -f "$dir/lib$name.la"; then
10678 found_la="$dir/lib$name.la"
10679 fi
10680 fi
10681 fi
10682 ;;
10683 esac
10684 if test "X$found_dir" != "X"; then
10685 break
10686 fi
10687 done
10688 fi
10689 if test "X$found_dir" != "X"; then
10690 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10691 if test "X$found_so" != "X"; then
10692 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10693 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10694 else
10695 haveit=
10696 for x in $ltrpathdirs; do
10697 if test "X$x" = "X$found_dir"; then
10698 haveit=yes
10699 break
10700 fi
10701 done
10702 if test -z "$haveit"; then
10703 ltrpathdirs="$ltrpathdirs $found_dir"
10704 fi
10705 if test "$hardcode_direct" = yes; then
10706 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10707 else
10708 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10709 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10710 haveit=
10711 for x in $rpathdirs; do
10712 if test "X$x" = "X$found_dir"; then
10713 haveit=yes
10714 break
10715 fi
10716 done
10717 if test -z "$haveit"; then
10718 rpathdirs="$rpathdirs $found_dir"
10719 fi
10720 else
10721 haveit=
10722 for x in $LDFLAGS $LIBMPFR; do
10723
10724 acl_save_prefix="$prefix"
10725 prefix="$acl_final_prefix"
10726 acl_save_exec_prefix="$exec_prefix"
10727 exec_prefix="$acl_final_exec_prefix"
10728 eval x=\"$x\"
10729 exec_prefix="$acl_save_exec_prefix"
10730 prefix="$acl_save_prefix"
10731
10732 if test "X$x" = "X-L$found_dir"; then
10733 haveit=yes
10734 break
10735 fi
10736 done
10737 if test -z "$haveit"; then
10738 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10739 fi
10740 if test "$hardcode_minus_L" != no; then
10741 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10742 else
10743 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10744 fi
10745 fi
10746 fi
10747 fi
10748 else
10749 if test "X$found_a" != "X"; then
10750 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10751 else
10752 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10753 fi
10754 fi
10755 additional_includedir=
10756 case "$found_dir" in
10757 */lib | */lib/)
10758 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10759 additional_includedir="$basedir/include"
10760 ;;
10761 esac
10762 if test "X$additional_includedir" != "X"; then
10763 if test "X$additional_includedir" != "X/usr/include"; then
10764 haveit=
10765 if test "X$additional_includedir" = "X/usr/local/include"; then
10766 if test -n "$GCC"; then
10767 case $host_os in
10768 linux*) haveit=yes;;
10769 esac
10770 fi
10771 fi
10772 if test -z "$haveit"; then
10773 for x in $CPPFLAGS $INCMPFR; do
10774
10775 acl_save_prefix="$prefix"
10776 prefix="$acl_final_prefix"
10777 acl_save_exec_prefix="$exec_prefix"
10778 exec_prefix="$acl_final_exec_prefix"
10779 eval x=\"$x\"
10780 exec_prefix="$acl_save_exec_prefix"
10781 prefix="$acl_save_prefix"
10782
10783 if test "X$x" = "X-I$additional_includedir"; then
10784 haveit=yes
10785 break
10786 fi
10787 done
10788 if test -z "$haveit"; then
10789 if test -d "$additional_includedir"; then
10790 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10791 fi
10792 fi
10793 fi
10794 fi
10795 fi
10796 if test -n "$found_la"; then
10797 save_libdir="$libdir"
10798 case "$found_la" in
10799 */* | *\\*) . "$found_la" ;;
10800 *) . "./$found_la" ;;
10801 esac
10802 libdir="$save_libdir"
10803 for dep in $dependency_libs; do
10804 case "$dep" in
10805 -L*)
10806 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10807 if test "X$additional_libdir" != "X/usr/lib"; then
10808 haveit=
10809 if test "X$additional_libdir" = "X/usr/local/lib"; then
10810 if test -n "$GCC"; then
10811 case $host_os in
10812 linux*) haveit=yes;;
10813 esac
10814 fi
10815 fi
10816 if test -z "$haveit"; then
10817 haveit=
10818 for x in $LDFLAGS $LIBMPFR; do
10819
10820 acl_save_prefix="$prefix"
10821 prefix="$acl_final_prefix"
10822 acl_save_exec_prefix="$exec_prefix"
10823 exec_prefix="$acl_final_exec_prefix"
10824 eval x=\"$x\"
10825 exec_prefix="$acl_save_exec_prefix"
10826 prefix="$acl_save_prefix"
10827
10828 if test "X$x" = "X-L$additional_libdir"; then
10829 haveit=yes
10830 break
10831 fi
10832 done
10833 if test -z "$haveit"; then
10834 if test -d "$additional_libdir"; then
10835 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10836 fi
10837 fi
10838 haveit=
10839 for x in $LDFLAGS $LTLIBMPFR; do
10840
10841 acl_save_prefix="$prefix"
10842 prefix="$acl_final_prefix"
10843 acl_save_exec_prefix="$exec_prefix"
10844 exec_prefix="$acl_final_exec_prefix"
10845 eval x=\"$x\"
10846 exec_prefix="$acl_save_exec_prefix"
10847 prefix="$acl_save_prefix"
10848
10849 if test "X$x" = "X-L$additional_libdir"; then
10850 haveit=yes
10851 break
10852 fi
10853 done
10854 if test -z "$haveit"; then
10855 if test -d "$additional_libdir"; then
10856 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10857 fi
10858 fi
10859 fi
10860 fi
10861 ;;
10862 -R*)
10863 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10864 if test "$enable_rpath" != no; then
10865 haveit=
10866 for x in $rpathdirs; do
10867 if test "X$x" = "X$dir"; then
10868 haveit=yes
10869 break
10870 fi
10871 done
10872 if test -z "$haveit"; then
10873 rpathdirs="$rpathdirs $dir"
10874 fi
10875 haveit=
10876 for x in $ltrpathdirs; do
10877 if test "X$x" = "X$dir"; then
10878 haveit=yes
10879 break
10880 fi
10881 done
10882 if test -z "$haveit"; then
10883 ltrpathdirs="$ltrpathdirs $dir"
10884 fi
10885 fi
10886 ;;
10887 -l*)
10888 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10889 ;;
10890 *.la)
10891 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10892 ;;
10893 *)
10894 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10895 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10896 ;;
10897 esac
10898 done
10899 fi
10900 else
10901 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10902 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10903 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10904 else
10905 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10906 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10907 fi
10908 fi
10909 fi
10910 fi
10911 done
10912 done
10913 if test "X$rpathdirs" != "X"; then
10914 if test -n "$hardcode_libdir_separator"; then
10915 alldirs=
10916 for found_dir in $rpathdirs; do
10917 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10918 done
10919 acl_save_libdir="$libdir"
10920 libdir="$alldirs"
10921 eval flag=\"$hardcode_libdir_flag_spec\"
10922 libdir="$acl_save_libdir"
10923 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10924 else
10925 for found_dir in $rpathdirs; do
10926 acl_save_libdir="$libdir"
10927 libdir="$found_dir"
10928 eval flag=\"$hardcode_libdir_flag_spec\"
10929 libdir="$acl_save_libdir"
10930 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10931 done
10932 fi
10933 fi
10934 if test "X$ltrpathdirs" != "X"; then
10935 for found_dir in $ltrpathdirs; do
10936 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10937 done
10938 fi
10939
10940
10941 ac_save_CPPFLAGS="$CPPFLAGS"
10942
10943 for element in $INCMPFR; do
10944 haveit=
10945 for x in $CPPFLAGS; do
10946
10947 acl_save_prefix="$prefix"
10948 prefix="$acl_final_prefix"
10949 acl_save_exec_prefix="$exec_prefix"
10950 exec_prefix="$acl_final_exec_prefix"
10951 eval x=\"$x\"
10952 exec_prefix="$acl_save_exec_prefix"
10953 prefix="$acl_save_prefix"
10954
10955 if test "X$x" = "X$element"; then
10956 haveit=yes
10957 break
10958 fi
10959 done
10960 if test -z "$haveit"; then
10961 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10962 fi
10963 done
10964
10965
10966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10967 $as_echo_n "checking for libmpfr... " >&6; }
10968 if ${ac_cv_libmpfr+:} false; then :
10969 $as_echo_n "(cached) " >&6
10970 else
10971
10972 ac_save_LIBS="$LIBS"
10973 LIBS="$LIBS $LIBMPFR"
10974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10975 /* end confdefs.h. */
10976 #include <mpfr.h>
10977 int
10978 main ()
10979 {
10980 mpfr_exp_t exp; mpfr_t x;
10981 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10982 ;
10983 return 0;
10984 }
10985 _ACEOF
10986 if ac_fn_c_try_link "$LINENO"; then :
10987 ac_cv_libmpfr=yes
10988 else
10989 ac_cv_libmpfr=no
10990 fi
10991 rm -f core conftest.err conftest.$ac_objext \
10992 conftest$ac_exeext conftest.$ac_ext
10993 LIBS="$ac_save_LIBS"
10994
10995 fi
10996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10997 $as_echo "$ac_cv_libmpfr" >&6; }
10998 if test "$ac_cv_libmpfr" = yes; then
10999 HAVE_LIBMPFR=yes
11000
11001 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
11002
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
11004 $as_echo_n "checking how to link with libmpfr... " >&6; }
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
11006 $as_echo "$LIBMPFR" >&6; }
11007 else
11008 HAVE_LIBMPFR=no
11009 CPPFLAGS="$ac_save_CPPFLAGS"
11010 LIBMPFR=
11011 LTLIBMPFR=
11012 fi
11013
11014
11015
11016
11017
11018
11019 if test "$HAVE_LIBMPFR" != yes; then
11020 if test "$with_mpfr" = yes; then
11021 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
11022 else
11023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
11024 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
11025 fi
11026 fi
11027 fi
11028
11029 # --------------------- #
11030 # Check for libpython. #
11031 # --------------------- #
11032
11033
11034
11035
11036
11037
11038 # Check whether --with-python was given.
11039 if test "${with_python+set}" = set; then :
11040 withval=$with_python;
11041 else
11042 with_python=auto
11043 fi
11044
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
11046 $as_echo_n "checking whether to use python... " >&6; }
11047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
11048 $as_echo "$with_python" >&6; }
11049
11050 if test "${with_python}" = no; then
11051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11052 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11053 have_libpython=no
11054 else
11055 case "${with_python}" in
11056 [\\/]* | ?:[\\/]*)
11057 if test -d "${with_python}"; then
11058 # Assume the python binary is ${with_python}/bin/python.
11059 python_prog="${with_python}/bin/python"
11060 python_prefix=
11061 # If python does not exit ${with_python}/bin, then try in
11062 # ${with_python}. On Windows/MinGW, this is where the Python
11063 # executable is.
11064 if test ! -x "${python_prog}"; then
11065 python_prog="${with_python}/python"
11066 python_prefix=
11067 fi
11068 if test ! -x "${python_prog}"; then
11069 # Fall back to gdb 7.0/7.1 behaviour.
11070 python_prog=missing
11071 python_prefix=${with_python}
11072 fi
11073 elif test -x "${with_python}"; then
11074 # While we can't run python compiled for $host (unless host == build),
11075 # the user could write a script that provides the needed information,
11076 # so we support that.
11077 python_prog=${with_python}
11078 python_prefix=
11079 else
11080 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11081 fi
11082 ;;
11083 */*)
11084 # Disallow --with-python=foo/bar.
11085 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11086 ;;
11087 *)
11088 # The user has either specified auto, yes, or the name of the python
11089 # program assumed to be in $PATH.
11090 python_prefix=
11091 case "${with_python}" in
11092 yes | auto)
11093 if test "${build}" = "${host}"; then
11094 # Extract the first word of "python", so it can be a program name with args.
11095 set dummy python; ac_word=$2
11096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11097 $as_echo_n "checking for $ac_word... " >&6; }
11098 if ${ac_cv_path_python_prog_path+:} false; then :
11099 $as_echo_n "(cached) " >&6
11100 else
11101 case $python_prog_path in
11102 [\\/]* | ?:[\\/]*)
11103 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11104 ;;
11105 *)
11106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11107 for as_dir in $PATH
11108 do
11109 IFS=$as_save_IFS
11110 test -z "$as_dir" && as_dir=.
11111 for ac_exec_ext in '' $ac_executable_extensions; do
11112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11113 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11115 break 2
11116 fi
11117 done
11118 done
11119 IFS=$as_save_IFS
11120
11121 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11122 ;;
11123 esac
11124 fi
11125 python_prog_path=$ac_cv_path_python_prog_path
11126 if test -n "$python_prog_path"; then
11127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11128 $as_echo "$python_prog_path" >&6; }
11129 else
11130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11131 $as_echo "no" >&6; }
11132 fi
11133
11134
11135 if test "${python_prog_path}" = missing; then
11136 python_prog=missing
11137 else
11138 python_prog=${python_prog_path}
11139 fi
11140 else
11141 # Not much we can do except assume the cross-compiler will find the
11142 # right files.
11143 python_prog=missing
11144 fi
11145 ;;
11146 *)
11147 # While we can't run python compiled for $host (unless host == build),
11148 # the user could write a script that provides the needed information,
11149 # so we support that.
11150 python_prog="${with_python}"
11151 # Extract the first word of "${python_prog}", so it can be a program name with args.
11152 set dummy ${python_prog}; ac_word=$2
11153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11154 $as_echo_n "checking for $ac_word... " >&6; }
11155 if ${ac_cv_path_python_prog_path+:} false; then :
11156 $as_echo_n "(cached) " >&6
11157 else
11158 case $python_prog_path in
11159 [\\/]* | ?:[\\/]*)
11160 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11161 ;;
11162 *)
11163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11164 for as_dir in $PATH
11165 do
11166 IFS=$as_save_IFS
11167 test -z "$as_dir" && as_dir=.
11168 for ac_exec_ext in '' $ac_executable_extensions; do
11169 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11170 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11171 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11172 break 2
11173 fi
11174 done
11175 done
11176 IFS=$as_save_IFS
11177
11178 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11179 ;;
11180 esac
11181 fi
11182 python_prog_path=$ac_cv_path_python_prog_path
11183 if test -n "$python_prog_path"; then
11184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11185 $as_echo "$python_prog_path" >&6; }
11186 else
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188 $as_echo "no" >&6; }
11189 fi
11190
11191
11192 if test "${python_prog_path}" = missing; then
11193 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
11194 fi
11195 ;;
11196 esac
11197 esac
11198
11199 if test "${python_prog}" != missing; then
11200 # We have a python program to use, but it may be too old.
11201 # Don't flag an error for --with-python=auto (the default).
11202 have_python_config=yes
11203 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11204 if test $? != 0; then
11205 have_python_config=failed
11206 if test "${with_python}" != auto; then
11207 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
11208 fi
11209 fi
11210 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11211 if test $? != 0; then
11212 have_python_config=failed
11213 if test "${with_python}" != auto; then
11214 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
11215 fi
11216 fi
11217 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11218 if test $? != 0; then
11219 have_python_config=failed
11220 if test "${with_python}" != auto; then
11221 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
11222 fi
11223 fi
11224 else
11225 # We do not have a python executable we can use to determine where
11226 # to find the Python headers and libs. We cannot guess the include
11227 # path from the python_prefix either, because that include path
11228 # depends on the Python version. So, there is nothing much we can
11229 # do except assume that the compiler will be able to find those files.
11230 python_includes=
11231 python_libs=
11232 have_python_config=no
11233 fi
11234
11235 # If we have python-config, only try the configuration it provides.
11236 # Otherwise fallback on the old way of trying different versions of
11237 # python in turn.
11238
11239 have_libpython=no
11240 if test "${have_python_config}" = yes; then
11241
11242
11243 new_CPPFLAGS=${python_includes}
11244 new_LIBS=${python_libs}
11245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11246 $as_echo_n "checking for python... " >&6; }
11247 save_CPPFLAGS=$CPPFLAGS
11248 save_LIBS=$LIBS
11249 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11250 LIBS="$new_LIBS $LIBS"
11251 found_usable_python=no
11252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11253 /* end confdefs.h. */
11254 #include "Python.h"
11255 int
11256 main ()
11257 {
11258 Py_Initialize ();
11259 ;
11260 return 0;
11261 }
11262 _ACEOF
11263 if ac_fn_c_try_link "$LINENO"; then :
11264 have_libpython=yes
11265 found_usable_python=yes
11266 PYTHON_CPPFLAGS=$new_CPPFLAGS
11267 PYTHON_LIBS=$new_LIBS
11268 fi
11269 rm -f core conftest.err conftest.$ac_objext \
11270 conftest$ac_exeext conftest.$ac_ext
11271 CPPFLAGS=$save_CPPFLAGS
11272 LIBS=$save_LIBS
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11274 $as_echo "${found_usable_python}" >&6; }
11275
11276 elif test "${have_python_config}" != failed; then
11277 if test "${have_libpython}" = no; then
11278
11279
11280 new_CPPFLAGS=${python_includes}
11281 new_LIBS="-lpython2.7 ${python_libs}"
11282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11283 $as_echo_n "checking for python... " >&6; }
11284 save_CPPFLAGS=$CPPFLAGS
11285 save_LIBS=$LIBS
11286 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11287 LIBS="$new_LIBS $LIBS"
11288 found_usable_python=no
11289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11290 /* end confdefs.h. */
11291 #include "Python.h"
11292 int
11293 main ()
11294 {
11295 Py_Initialize ();
11296 ;
11297 return 0;
11298 }
11299 _ACEOF
11300 if ac_fn_c_try_link "$LINENO"; then :
11301 have_libpython=yes
11302 found_usable_python=yes
11303 PYTHON_CPPFLAGS=$new_CPPFLAGS
11304 PYTHON_LIBS=$new_LIBS
11305 fi
11306 rm -f core conftest.err conftest.$ac_objext \
11307 conftest$ac_exeext conftest.$ac_ext
11308 CPPFLAGS=$save_CPPFLAGS
11309 LIBS=$save_LIBS
11310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11311 $as_echo "${found_usable_python}" >&6; }
11312
11313 fi
11314 if test "${have_libpython}" = no; then
11315
11316
11317 new_CPPFLAGS=${python_includes}
11318 new_LIBS="-lpython2.6 ${python_libs}"
11319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11320 $as_echo_n "checking for python... " >&6; }
11321 save_CPPFLAGS=$CPPFLAGS
11322 save_LIBS=$LIBS
11323 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11324 LIBS="$new_LIBS $LIBS"
11325 found_usable_python=no
11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11327 /* end confdefs.h. */
11328 #include "Python.h"
11329 int
11330 main ()
11331 {
11332 Py_Initialize ();
11333 ;
11334 return 0;
11335 }
11336 _ACEOF
11337 if ac_fn_c_try_link "$LINENO"; then :
11338 have_libpython=yes
11339 found_usable_python=yes
11340 PYTHON_CPPFLAGS=$new_CPPFLAGS
11341 PYTHON_LIBS=$new_LIBS
11342 fi
11343 rm -f core conftest.err conftest.$ac_objext \
11344 conftest$ac_exeext conftest.$ac_ext
11345 CPPFLAGS=$save_CPPFLAGS
11346 LIBS=$save_LIBS
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11348 $as_echo "${found_usable_python}" >&6; }
11349
11350 fi
11351 fi
11352
11353 if test "${have_libpython}" = no; then
11354 case "${with_python}" in
11355 yes)
11356 as_fn_error $? "python is missing or unusable" "$LINENO" 5
11357 ;;
11358 auto)
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11360 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11361 ;;
11362 *)
11363 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
11364 ;;
11365 esac
11366 else
11367 if test -n "${python_prefix}"; then
11368
11369 cat >>confdefs.h <<_ACEOF
11370 #define WITH_PYTHON_PATH "${python_prefix}"
11371 _ACEOF
11372
11373
11374 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11375 if test "x$prefix" = xNONE; then
11376 test_prefix=/usr/local
11377 else
11378 test_prefix=$prefix
11379 fi
11380 else
11381 test_prefix=$exec_prefix
11382 fi
11383 value=0
11384 case ${python_prefix} in
11385 "${test_prefix}"|"${test_prefix}/"*|\
11386 '${exec_prefix}'|'${exec_prefix}/'*)
11387 value=1
11388 ;;
11389 esac
11390
11391 cat >>confdefs.h <<_ACEOF
11392 #define PYTHON_PATH_RELOCATABLE $value
11393 _ACEOF
11394
11395
11396 fi
11397 fi
11398 fi
11399
11400
11401 # Check whether --with-python-libdir was given.
11402 if test "${with_python_libdir+set}" = set; then :
11403 withval=$with_python_libdir;
11404 else
11405
11406 # If no python libdir is specified then select one based on
11407 # python's prefix path.
11408 if test -n "${python_prefix}"; then
11409 with_python_libdir=${python_prefix}/lib
11410 fi
11411
11412 fi
11413
11414
11415 if test "${have_libpython}" != no; then
11416
11417 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
11418
11419 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11420 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11421 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11422 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
11423 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11424
11425 if test -n "${with_python_libdir}"; then
11426
11427 cat >>confdefs.h <<_ACEOF
11428 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
11429 _ACEOF
11430
11431
11432 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11433 if test "x$prefix" = xNONE; then
11434 test_prefix=/usr/local
11435 else
11436 test_prefix=$prefix
11437 fi
11438 else
11439 test_prefix=$exec_prefix
11440 fi
11441 value=0
11442 case ${with_python_libdir} in
11443 "${test_prefix}"|"${test_prefix}/"*|\
11444 '${exec_prefix}'|'${exec_prefix}/'*)
11445 value=1
11446 ;;
11447 esac
11448
11449 cat >>confdefs.h <<_ACEOF
11450 #define PYTHON_LIBDIR_RELOCATABLE $value
11451 _ACEOF
11452
11453
11454 fi
11455
11456 # Flags needed to compile Python code (taken from python-config --cflags).
11457 # We cannot call python-config directly because it will output whatever was
11458 # used when compiling the Python interpreter itself, including flags which
11459 # would make the python-related objects be compiled differently from the
11460 # rest of GDB (e.g., -O2 and -fPIC).
11461 if test "${GCC}" = yes; then
11462 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11463 # Python headers recommend -DNDEBUG, but it's unclear if that just
11464 # refers to building Python itself. In release mode, though, it
11465 # doesn't hurt for the Python code in gdb to follow.
11466 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
11467 fi
11468
11469 if test "x${tentative_python_cflags}" != x; then
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11471 $as_echo_n "checking compiler flags for python code... " >&6; }
11472 for flag in ${tentative_python_cflags}; do
11473 # Check that the compiler accepts it
11474 saved_CFLAGS="$CFLAGS"
11475 CFLAGS="$CFLAGS $flag"
11476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11477 /* end confdefs.h. */
11478
11479 int
11480 main ()
11481 {
11482
11483 ;
11484 return 0;
11485 }
11486 _ACEOF
11487 if ac_fn_c_try_compile "$LINENO"; then :
11488 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11489 fi
11490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11491 CFLAGS="$saved_CFLAGS"
11492 done
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11494 $as_echo "${PYTHON_CFLAGS}" >&6; }
11495 fi
11496
11497 # On x64 Windows, Python's include headers, and pyconfig.h in
11498 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11499 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11500 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11501 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11502 # The issue was reported to the Python community, but still isn't
11503 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11504
11505 case "$gdb_host" in
11506 mingw64)
11507 if test "${GCC}" = yes; then
11508 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11509 fi
11510 ;;
11511 esac
11512 else
11513 # Even if Python support is not compiled in, we need to have this file
11514 # included so that the "python" command, et.al., still exists.
11515 CONFIG_OBS="$CONFIG_OBS python/python.o"
11516 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11517 fi
11518
11519 # Work around Python http://bugs.python.org/issue10112. See also
11520 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11521 # no effect. Note that the only test after this that uses Python is
11522 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11523 # run without -export-dynamic too.
11524 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11525
11526
11527
11528
11529 if test "${have_libpython}" != no; then
11530 HAVE_PYTHON_TRUE=
11531 HAVE_PYTHON_FALSE='#'
11532 else
11533 HAVE_PYTHON_TRUE='#'
11534 HAVE_PYTHON_FALSE=
11535 fi
11536
11537
11538 # -------------------- #
11539 # Check for libguile. #
11540 # -------------------- #
11541
11542
11543
11544
11545
11546
11547 # Check whether --with-guile was given.
11548 if test "${with_guile+set}" = set; then :
11549 withval=$with_guile;
11550 else
11551 with_guile=auto
11552 fi
11553
11554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11555 $as_echo_n "checking whether to use guile... " >&6; }
11556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11557 $as_echo "$with_guile" >&6; }
11558
11559 # Extract the first word of "pkg-config", so it can be a program name with args.
11560 set dummy pkg-config; ac_word=$2
11561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11562 $as_echo_n "checking for $ac_word... " >&6; }
11563 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11564 $as_echo_n "(cached) " >&6
11565 else
11566 case $pkg_config_prog_path in
11567 [\\/]* | ?:[\\/]*)
11568 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11569 ;;
11570 *)
11571 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11572 for as_dir in $PATH
11573 do
11574 IFS=$as_save_IFS
11575 test -z "$as_dir" && as_dir=.
11576 for ac_exec_ext in '' $ac_executable_extensions; do
11577 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11578 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11579 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11580 break 2
11581 fi
11582 done
11583 done
11584 IFS=$as_save_IFS
11585
11586 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11587 ;;
11588 esac
11589 fi
11590 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11591 if test -n "$pkg_config_prog_path"; then
11592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11593 $as_echo "$pkg_config_prog_path" >&6; }
11594 else
11595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11596 $as_echo "no" >&6; }
11597 fi
11598
11599
11600
11601 try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11602 have_libguile=no
11603 case "${with_guile}" in
11604 no)
11605 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11606 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11607 ;;
11608 auto)
11609 if test "${pkg_config_prog_path}" = "missing"; then
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11611 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11612 else
11613
11614 pkg_config=${pkg_config_prog_path}
11615 guile_version_list=${try_guile_versions}
11616 flag_errors=no
11617
11618 found_usable_guile=checking
11619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11620 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11621 for guile_version in ${guile_version_list}; do
11622 ${pkg_config} --exists ${guile_version} 2>/dev/null
11623 if test $? != 0; then
11624 continue
11625 fi
11626 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11627 if test $? != 0; then
11628 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11629 fi
11630 new_LIBS=`${pkg_config} --libs ${guile_version}`
11631 if test $? != 0; then
11632 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11633 fi
11634 found_usable_guile=${guile_version}
11635 break
11636 done
11637 if test "${found_usable_guile}" = "checking"; then
11638 if test "${flag_errors}" = "yes"; then
11639 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11640 else
11641 found_usable_guile=no
11642 fi
11643 fi
11644 if test "${found_usable_guile}" != no; then
11645 save_CPPFLAGS=$CPPFLAGS
11646 save_LIBS=$LIBS
11647 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11648 LIBS="$LIBS $new_LIBS"
11649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11650 /* end confdefs.h. */
11651 #include "libguile.h"
11652 int
11653 main ()
11654 {
11655 scm_init_guile ();
11656 ;
11657 return 0;
11658 }
11659 _ACEOF
11660 if ac_fn_c_try_link "$LINENO"; then :
11661 have_libguile=yes
11662 GUILE_CPPFLAGS=$new_CPPFLAGS
11663 GUILE_LIBS=$new_LIBS
11664 else
11665 found_usable_guile=no
11666 fi
11667 rm -f core conftest.err conftest.$ac_objext \
11668 conftest$ac_exeext conftest.$ac_ext
11669 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11670 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11671
11672 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11673
11674
11675 fi
11676
11677 CPPFLAGS=$save_CPPFLAGS
11678 LIBS=$save_LIBS
11679 if test "${found_usable_guile}" = no; then
11680 if test "${flag_errors}" = yes; then
11681 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11682 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11683 as_fn_error $? "linking guile version ${guile_version} test program failed
11684 See \`config.log' for more details" "$LINENO" 5; }
11685 fi
11686 fi
11687 fi
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11689 $as_echo "${found_usable_guile}" >&6; }
11690
11691 fi
11692 ;;
11693 yes)
11694 if test "${pkg_config_prog_path}" = "missing"; then
11695 as_fn_error $? "pkg-config not found" "$LINENO" 5
11696 fi
11697
11698 pkg_config=${pkg_config_prog_path}
11699 guile_version_list=${try_guile_versions}
11700 flag_errors=yes
11701
11702 found_usable_guile=checking
11703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11704 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11705 for guile_version in ${guile_version_list}; do
11706 ${pkg_config} --exists ${guile_version} 2>/dev/null
11707 if test $? != 0; then
11708 continue
11709 fi
11710 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11711 if test $? != 0; then
11712 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11713 fi
11714 new_LIBS=`${pkg_config} --libs ${guile_version}`
11715 if test $? != 0; then
11716 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11717 fi
11718 found_usable_guile=${guile_version}
11719 break
11720 done
11721 if test "${found_usable_guile}" = "checking"; then
11722 if test "${flag_errors}" = "yes"; then
11723 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11724 else
11725 found_usable_guile=no
11726 fi
11727 fi
11728 if test "${found_usable_guile}" != no; then
11729 save_CPPFLAGS=$CPPFLAGS
11730 save_LIBS=$LIBS
11731 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11732 LIBS="$LIBS $new_LIBS"
11733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11734 /* end confdefs.h. */
11735 #include "libguile.h"
11736 int
11737 main ()
11738 {
11739 scm_init_guile ();
11740 ;
11741 return 0;
11742 }
11743 _ACEOF
11744 if ac_fn_c_try_link "$LINENO"; then :
11745 have_libguile=yes
11746 GUILE_CPPFLAGS=$new_CPPFLAGS
11747 GUILE_LIBS=$new_LIBS
11748 else
11749 found_usable_guile=no
11750 fi
11751 rm -f core conftest.err conftest.$ac_objext \
11752 conftest$ac_exeext conftest.$ac_ext
11753 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11754 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11755
11756 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11757
11758
11759 fi
11760
11761 CPPFLAGS=$save_CPPFLAGS
11762 LIBS=$save_LIBS
11763 if test "${found_usable_guile}" = no; then
11764 if test "${flag_errors}" = yes; then
11765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11766 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11767 as_fn_error $? "linking guile version ${guile_version} test program failed
11768 See \`config.log' for more details" "$LINENO" 5; }
11769 fi
11770 fi
11771 fi
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11773 $as_echo "${found_usable_guile}" >&6; }
11774
11775 ;;
11776 [\\/]* | ?:[\\/]*)
11777 if test -x "${with_guile}"; then
11778
11779 pkg_config=${with_guile}
11780 guile_version_list=${try_guile_versions}
11781 flag_errors=yes
11782
11783 found_usable_guile=checking
11784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11785 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11786 for guile_version in ${guile_version_list}; do
11787 ${pkg_config} --exists ${guile_version} 2>/dev/null
11788 if test $? != 0; then
11789 continue
11790 fi
11791 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11792 if test $? != 0; then
11793 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11794 fi
11795 new_LIBS=`${pkg_config} --libs ${guile_version}`
11796 if test $? != 0; then
11797 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11798 fi
11799 found_usable_guile=${guile_version}
11800 break
11801 done
11802 if test "${found_usable_guile}" = "checking"; then
11803 if test "${flag_errors}" = "yes"; then
11804 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11805 else
11806 found_usable_guile=no
11807 fi
11808 fi
11809 if test "${found_usable_guile}" != no; then
11810 save_CPPFLAGS=$CPPFLAGS
11811 save_LIBS=$LIBS
11812 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11813 LIBS="$LIBS $new_LIBS"
11814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11815 /* end confdefs.h. */
11816 #include "libguile.h"
11817 int
11818 main ()
11819 {
11820 scm_init_guile ();
11821 ;
11822 return 0;
11823 }
11824 _ACEOF
11825 if ac_fn_c_try_link "$LINENO"; then :
11826 have_libguile=yes
11827 GUILE_CPPFLAGS=$new_CPPFLAGS
11828 GUILE_LIBS=$new_LIBS
11829 else
11830 found_usable_guile=no
11831 fi
11832 rm -f core conftest.err conftest.$ac_objext \
11833 conftest$ac_exeext conftest.$ac_ext
11834 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11835 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11836
11837 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11838
11839
11840 fi
11841
11842 CPPFLAGS=$save_CPPFLAGS
11843 LIBS=$save_LIBS
11844 if test "${found_usable_guile}" = no; then
11845 if test "${flag_errors}" = yes; then
11846 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11847 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11848 as_fn_error $? "linking guile version ${guile_version} test program failed
11849 See \`config.log' for more details" "$LINENO" 5; }
11850 fi
11851 fi
11852 fi
11853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11854 $as_echo "${found_usable_guile}" >&6; }
11855
11856 else
11857 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11858 fi
11859 ;;
11860 "" | */*)
11861 # Disallow --with=guile="" and --with-guile=foo/bar.
11862 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11863 ;;
11864 *)
11865 # A space separate list of guile versions to try, in order.
11866 if test "${pkg_config_prog_path}" = "missing"; then
11867 as_fn_error $? "pkg-config not found" "$LINENO" 5
11868 fi
11869
11870 pkg_config=${pkg_config_prog_path}
11871 guile_version_list=${with_guile}
11872 flag_errors=yes
11873
11874 found_usable_guile=checking
11875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11876 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11877 for guile_version in ${guile_version_list}; do
11878 ${pkg_config} --exists ${guile_version} 2>/dev/null
11879 if test $? != 0; then
11880 continue
11881 fi
11882 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11883 if test $? != 0; then
11884 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11885 fi
11886 new_LIBS=`${pkg_config} --libs ${guile_version}`
11887 if test $? != 0; then
11888 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11889 fi
11890 found_usable_guile=${guile_version}
11891 break
11892 done
11893 if test "${found_usable_guile}" = "checking"; then
11894 if test "${flag_errors}" = "yes"; then
11895 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11896 else
11897 found_usable_guile=no
11898 fi
11899 fi
11900 if test "${found_usable_guile}" != no; then
11901 save_CPPFLAGS=$CPPFLAGS
11902 save_LIBS=$LIBS
11903 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11904 LIBS="$LIBS $new_LIBS"
11905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11906 /* end confdefs.h. */
11907 #include "libguile.h"
11908 int
11909 main ()
11910 {
11911 scm_init_guile ();
11912 ;
11913 return 0;
11914 }
11915 _ACEOF
11916 if ac_fn_c_try_link "$LINENO"; then :
11917 have_libguile=yes
11918 GUILE_CPPFLAGS=$new_CPPFLAGS
11919 GUILE_LIBS=$new_LIBS
11920 else
11921 found_usable_guile=no
11922 fi
11923 rm -f core conftest.err conftest.$ac_objext \
11924 conftest$ac_exeext conftest.$ac_ext
11925 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11926 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11927
11928 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11929
11930
11931 fi
11932
11933 CPPFLAGS=$save_CPPFLAGS
11934 LIBS=$save_LIBS
11935 if test "${found_usable_guile}" = no; then
11936 if test "${flag_errors}" = yes; then
11937 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11938 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11939 as_fn_error $? "linking guile version ${guile_version} test program failed
11940 See \`config.log' for more details" "$LINENO" 5; }
11941 fi
11942 fi
11943 fi
11944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11945 $as_echo "${found_usable_guile}" >&6; }
11946
11947 ;;
11948 esac
11949
11950 if test "${have_libguile}" != no; then
11951 case "${with_guile}" in
11952 [\\/]* | ?:[\\/]*)
11953
11954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11955 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11956 if ${ac_cv_guild_program_name+:} false; then :
11957 $as_echo_n "(cached) " >&6
11958 else
11959 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11960
11961 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11962 # the 'guild' and 'bindir' variables. In that case, try to guess
11963 # what the program name is, at the risk of getting it wrong if
11964 # Guile was configured with '--program-suffix' or similar.
11965 if test "x$ac_cv_guild_program_name" = "x"; then
11966 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11967 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11968 fi
11969
11970 fi
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11972 $as_echo "$ac_cv_guild_program_name" >&6; }
11973
11974 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11975 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11976 fi
11977
11978 GUILD="$ac_cv_guild_program_name"
11979
11980
11981 ;;
11982 *)
11983
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11985 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11986 if ${ac_cv_guild_program_name+:} false; then :
11987 $as_echo_n "(cached) " >&6
11988 else
11989 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11990
11991 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11992 # the 'guild' and 'bindir' variables. In that case, try to guess
11993 # what the program name is, at the risk of getting it wrong if
11994 # Guile was configured with '--program-suffix' or similar.
11995 if test "x$ac_cv_guild_program_name" = "x"; then
11996 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11997 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11998 fi
11999
12000 fi
12001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
12002 $as_echo "$ac_cv_guild_program_name" >&6; }
12003
12004 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
12005 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
12006 fi
12007
12008 GUILD="$ac_cv_guild_program_name"
12009
12010
12011 ;;
12012 esac
12013
12014
12015 if test "$cross_compiling" = no; then
12016 GUILD_TARGET_FLAG=
12017 else
12018 GUILD_TARGET_FLAG="--target=$host"
12019 fi
12020
12021
12022
12023
12024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
12025 $as_echo_n "checking whether guild supports this host... " >&6; }
12026 if ${ac_cv_guild_ok+:} false; then :
12027 $as_echo_n "(cached) " >&6
12028 else
12029 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
12030 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
12031 ac_cv_guild_ok=yes
12032 else
12033 ac_cv_guild_ok=no
12034 fi
12035 fi
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
12037 $as_echo "$ac_cv_guild_ok" >&6; }
12038
12039 if test "$ac_cv_guild_ok" = no; then
12040 have_libguile=no
12041 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
12042 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
12043 fi
12044 fi
12045
12046 if test "${have_libguile}" != no; then
12047
12048 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
12049
12050 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
12051 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
12052 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
12053 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
12054 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
12055
12056 save_LIBS="$LIBS"
12057 save_CPPFLAGS="$CPPFLAGS"
12058 LIBS="$GUILE_LIBS"
12059 CPPFLAGS="$GUILE_CPPFLAGS"
12060 for ac_func in scm_new_smob
12061 do :
12062 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
12063 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
12064 cat >>confdefs.h <<_ACEOF
12065 #define HAVE_SCM_NEW_SMOB 1
12066 _ACEOF
12067
12068 fi
12069 done
12070
12071 LIBS="$save_LIBS"
12072 CPPFLAGS="$save_CPPFLAGS"
12073 else
12074 # Even if Guile support is not compiled in, we need to have these files
12075 # included.
12076 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
12077 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
12078 fi
12079
12080
12081 if test "${have_libguile}" != no; then
12082 HAVE_GUILE_TRUE=
12083 HAVE_GUILE_FALSE='#'
12084 else
12085 HAVE_GUILE_TRUE='#'
12086 HAVE_GUILE_FALSE=
12087 fi
12088
12089
12090 # ---------------------------- #
12091 # Check for source highlight. #
12092 # ---------------------------- #
12093
12094 SRCHIGH_LIBS=
12095 SRCHIGH_CFLAGS=
12096
12097 # Check whether --enable-source-highlight was given.
12098 if test "${enable_source_highlight+set}" = set; then :
12099 enableval=$enable_source_highlight; case "${enableval}" in
12100 yes) enable_source_highlight=yes ;;
12101 no) enable_source_highlight=no ;;
12102 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
12103 esac
12104 else
12105 enable_source_highlight=auto
12106 fi
12107
12108
12109 if test "${enable_source_highlight}" != "no"; then
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
12111 $as_echo_n "checking for the source-highlight library... " >&6; }
12112 if test "${pkg_config_prog_path}" = "missing"; then
12113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
12114 $as_echo "no - pkg-config not found" >&6; }
12115 if test "${enable_source_highlight}" = "yes"; then
12116 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
12117 fi
12118 else
12119 if ${pkg_config_prog_path} --exists source-highlight; then
12120 case "$LDFLAGS" in
12121 *static-libstdc*)
12122 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
12123 ;;
12124 esac
12125
12126 srchigh_pkg_cflags=`${pkg_config_prog_path} --cflags source-highlight`
12127 srchigh_pkg_libs=`${pkg_config_prog_path} --libs source-highlight`
12128
12129 # Now that we have found a source-highlight library, check if we can use
12130 # it. In particular, we're trying to detect the situation that the
12131 # library is using the new libstdc++ library abi ( see
12132 # https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html )
12133 # while the compiler being used to compile gdb is using the old abi.
12134 # Such a situation will result in an undefined reference to
12135 # srchilite::SourceHighlight::SourceHighlight(std::string const&).
12136 # This situation can occur for instance when using a source highlight
12137 # library compiled with g++ 7.5.0 while building gdb with g++ 4.8.5.
12138 ac_ext=cpp
12139 ac_cpp='$CXXCPP $CPPFLAGS'
12140 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12141 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12142 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12143
12144 save_CFLAGS="$CFLAGS"
12145 save_LDFLAGS="$LDFLAGS"
12146 CFLAGS="$CFLAGS $srchigh_pkg_cflags"
12147 LDFLAGS="$LDFLAGS $srchigh_pkg_libs"
12148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12149 /* end confdefs.h. */
12150 #include <srchilite/sourcehighlight.h>
12151 int
12152 main ()
12153 {
12154 std::string outlang = "esc.outlang";
12155 new srchilite::SourceHighlight (outlang);
12156
12157 ;
12158 return 0;
12159 }
12160 _ACEOF
12161 if ac_fn_cxx_try_link "$LINENO"; then :
12162 have_usable_source_highlight=yes
12163 else
12164 have_usable_source_highlight=no
12165
12166 fi
12167 rm -f core conftest.err conftest.$ac_objext \
12168 conftest$ac_exeext conftest.$ac_ext
12169 CFLAGS="$save_CFLAGS"
12170 LDFLAGS="$save_LDFLAGS"
12171 ac_ext=c
12172 ac_cpp='$CPP $CPPFLAGS'
12173 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12174 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12175 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12176
12177
12178 if test "${have_usable_source_highlight}" = "yes"; then
12179
12180 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
12181
12182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12183 $as_echo "yes" >&6; }
12184 SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
12185 SRCHIGH_LIBS="$srchigh_pkg_libs"
12186 else
12187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12188 $as_echo "no" >&6; }
12189 if test "${enable_source_highlight}" = "yes"; then
12190 as_fn_error $? "source-highlight in your system could not be used" "$LINENO" 5
12191 fi
12192 fi
12193 else
12194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12195 $as_echo "no" >&6; }
12196 if test "${enable_source_highlight}" = "yes"; then
12197 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
12198 fi
12199 fi
12200 fi
12201 fi
12202
12203
12204
12205 # ------------------------- #
12206 # Checks for header files. #
12207 # ------------------------- #
12208
12209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12210 $as_echo_n "checking for ANSI C header files... " >&6; }
12211 if ${ac_cv_header_stdc+:} false; then :
12212 $as_echo_n "(cached) " >&6
12213 else
12214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12215 /* end confdefs.h. */
12216 #include <stdlib.h>
12217 #include <stdarg.h>
12218 #include <string.h>
12219 #include <float.h>
12220
12221 int
12222 main ()
12223 {
12224
12225 ;
12226 return 0;
12227 }
12228 _ACEOF
12229 if ac_fn_c_try_compile "$LINENO"; then :
12230 ac_cv_header_stdc=yes
12231 else
12232 ac_cv_header_stdc=no
12233 fi
12234 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12235
12236 if test $ac_cv_header_stdc = yes; then
12237 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12239 /* end confdefs.h. */
12240 #include <string.h>
12241
12242 _ACEOF
12243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12244 $EGREP "memchr" >/dev/null 2>&1; then :
12245
12246 else
12247 ac_cv_header_stdc=no
12248 fi
12249 rm -f conftest*
12250
12251 fi
12252
12253 if test $ac_cv_header_stdc = yes; then
12254 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12256 /* end confdefs.h. */
12257 #include <stdlib.h>
12258
12259 _ACEOF
12260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12261 $EGREP "free" >/dev/null 2>&1; then :
12262
12263 else
12264 ac_cv_header_stdc=no
12265 fi
12266 rm -f conftest*
12267
12268 fi
12269
12270 if test $ac_cv_header_stdc = yes; then
12271 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12272 if test "$cross_compiling" = yes; then :
12273 :
12274 else
12275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12276 /* end confdefs.h. */
12277 #include <ctype.h>
12278 #include <stdlib.h>
12279 #if ((' ' & 0x0FF) == 0x020)
12280 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12281 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12282 #else
12283 # define ISLOWER(c) \
12284 (('a' <= (c) && (c) <= 'i') \
12285 || ('j' <= (c) && (c) <= 'r') \
12286 || ('s' <= (c) && (c) <= 'z'))
12287 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12288 #endif
12289
12290 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12291 int
12292 main ()
12293 {
12294 int i;
12295 for (i = 0; i < 256; i++)
12296 if (XOR (islower (i), ISLOWER (i))
12297 || toupper (i) != TOUPPER (i))
12298 return 2;
12299 return 0;
12300 }
12301 _ACEOF
12302 if ac_fn_c_try_run "$LINENO"; then :
12303
12304 else
12305 ac_cv_header_stdc=no
12306 fi
12307 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12308 conftest.$ac_objext conftest.beam conftest.$ac_ext
12309 fi
12310
12311 fi
12312 fi
12313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12314 $as_echo "$ac_cv_header_stdc" >&6; }
12315 if test $ac_cv_header_stdc = yes; then
12316
12317 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12318
12319 fi
12320
12321 # elf_hp.h is for HP/UX 64-bit shared library support.
12322 for ac_header in nlist.h machine/reg.h \
12323 thread_db.h \
12324 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12325 sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \
12326 sys/reg.h sys/debugreg.h \
12327 termios.h elf_hp.h
12328 do :
12329 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12330 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12331 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12332 cat >>confdefs.h <<_ACEOF
12333 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12334 _ACEOF
12335
12336 fi
12337
12338 done
12339
12340 for ac_header in sys/user.h
12341 do :
12342 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12343 # include <sys/param.h>
12344 #endif
12345
12346 "
12347 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12348 cat >>confdefs.h <<_ACEOF
12349 #define HAVE_SYS_USER_H 1
12350 _ACEOF
12351
12352 fi
12353
12354 done
12355
12356
12357 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12358 do :
12359 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12360 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12361 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12362 cat >>confdefs.h <<_ACEOF
12363 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12364 _ACEOF
12365
12366 fi
12367
12368 done
12369
12370 for ac_header in term.h
12371 do :
12372 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12373 # include <curses.h>
12374 #endif
12375
12376 "
12377 if test "x$ac_cv_header_term_h" = xyes; then :
12378 cat >>confdefs.h <<_ACEOF
12379 #define HAVE_TERM_H 1
12380 _ACEOF
12381
12382 fi
12383
12384 done
12385
12386
12387 for ac_header in sys/socket.h
12388 do :
12389 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12390 if test "x$ac_cv_header_sys_socket_h" = xyes; then :
12391 cat >>confdefs.h <<_ACEOF
12392 #define HAVE_SYS_SOCKET_H 1
12393 _ACEOF
12394
12395 fi
12396
12397 done
12398
12399 for ac_header in ws2tcpip.h
12400 do :
12401 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
12402 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
12403 cat >>confdefs.h <<_ACEOF
12404 #define HAVE_WS2TCPIP_H 1
12405 _ACEOF
12406
12407 fi
12408
12409 done
12410
12411 for ac_header in execinfo.h
12412 do :
12413 ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
12414 if test "x$ac_cv_header_execinfo_h" = xyes; then :
12415 cat >>confdefs.h <<_ACEOF
12416 #define HAVE_EXECINFO_H 1
12417 _ACEOF
12418
12419 fi
12420
12421 done
12422
12423
12424 # ------------------------- #
12425 # Checks for declarations. #
12426 # ------------------------- #
12427
12428
12429 # Check for presence and size of long long.
12430 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12431 if test "x$ac_cv_type_long_long" = xyes; then :
12432
12433 cat >>confdefs.h <<_ACEOF
12434 #define HAVE_LONG_LONG 1
12435 _ACEOF
12436
12437 # The cast to long int works around a bug in the HP C Compiler
12438 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12439 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12440 # This bug is HP SR number 8606223364.
12441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12442 $as_echo_n "checking size of long long... " >&6; }
12443 if ${ac_cv_sizeof_long_long+:} false; then :
12444 $as_echo_n "(cached) " >&6
12445 else
12446 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12447
12448 else
12449 if test "$ac_cv_type_long_long" = yes; then
12450 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12451 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12452 as_fn_error 77 "cannot compute sizeof (long long)
12453 See \`config.log' for more details" "$LINENO" 5; }
12454 else
12455 ac_cv_sizeof_long_long=0
12456 fi
12457 fi
12458
12459 fi
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12461 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12462
12463
12464
12465 cat >>confdefs.h <<_ACEOF
12466 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12467 _ACEOF
12468
12469
12470 fi
12471
12472
12473 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12474 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12475 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12476 ac_have_decl=1
12477 else
12478 ac_have_decl=0
12479 fi
12480
12481 cat >>confdefs.h <<_ACEOF
12482 #define HAVE_DECL_BASENAME $ac_have_decl
12483 _ACEOF
12484 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12485 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12486 ac_have_decl=1
12487 else
12488 ac_have_decl=0
12489 fi
12490
12491 cat >>confdefs.h <<_ACEOF
12492 #define HAVE_DECL_FFS $ac_have_decl
12493 _ACEOF
12494 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12495 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12496 ac_have_decl=1
12497 else
12498 ac_have_decl=0
12499 fi
12500
12501 cat >>confdefs.h <<_ACEOF
12502 #define HAVE_DECL_ASPRINTF $ac_have_decl
12503 _ACEOF
12504 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12505 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12506 ac_have_decl=1
12507 else
12508 ac_have_decl=0
12509 fi
12510
12511 cat >>confdefs.h <<_ACEOF
12512 #define HAVE_DECL_VASPRINTF $ac_have_decl
12513 _ACEOF
12514 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12515 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12516 ac_have_decl=1
12517 else
12518 ac_have_decl=0
12519 fi
12520
12521 cat >>confdefs.h <<_ACEOF
12522 #define HAVE_DECL_SNPRINTF $ac_have_decl
12523 _ACEOF
12524 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12525 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12526 ac_have_decl=1
12527 else
12528 ac_have_decl=0
12529 fi
12530
12531 cat >>confdefs.h <<_ACEOF
12532 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12533 _ACEOF
12534
12535 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12536 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12537 ac_have_decl=1
12538 else
12539 ac_have_decl=0
12540 fi
12541
12542 cat >>confdefs.h <<_ACEOF
12543 #define HAVE_DECL_STRTOL $ac_have_decl
12544 _ACEOF
12545 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12546 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12547 ac_have_decl=1
12548 else
12549 ac_have_decl=0
12550 fi
12551
12552 cat >>confdefs.h <<_ACEOF
12553 #define HAVE_DECL_STRTOUL $ac_have_decl
12554 _ACEOF
12555 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12556 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12557 ac_have_decl=1
12558 else
12559 ac_have_decl=0
12560 fi
12561
12562 cat >>confdefs.h <<_ACEOF
12563 #define HAVE_DECL_STRTOLL $ac_have_decl
12564 _ACEOF
12565 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12566 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12567 ac_have_decl=1
12568 else
12569 ac_have_decl=0
12570 fi
12571
12572 cat >>confdefs.h <<_ACEOF
12573 #define HAVE_DECL_STRTOULL $ac_have_decl
12574 _ACEOF
12575
12576 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12577 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12578 ac_have_decl=1
12579 else
12580 ac_have_decl=0
12581 fi
12582
12583 cat >>confdefs.h <<_ACEOF
12584 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12585 _ACEOF
12586
12587
12588
12589 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12590 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12591 ac_have_decl=1
12592 else
12593 ac_have_decl=0
12594 fi
12595
12596 cat >>confdefs.h <<_ACEOF
12597 #define HAVE_DECL_SNPRINTF $ac_have_decl
12598 _ACEOF
12599
12600
12601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12602 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12603 if ${am_cv_val_LC_MESSAGES+:} false; then :
12604 $as_echo_n "(cached) " >&6
12605 else
12606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12607 /* end confdefs.h. */
12608 #include <locale.h>
12609 int
12610 main ()
12611 {
12612 return LC_MESSAGES
12613 ;
12614 return 0;
12615 }
12616 _ACEOF
12617 if ac_fn_c_try_link "$LINENO"; then :
12618 am_cv_val_LC_MESSAGES=yes
12619 else
12620 am_cv_val_LC_MESSAGES=no
12621 fi
12622 rm -f core conftest.err conftest.$ac_objext \
12623 conftest$ac_exeext conftest.$ac_ext
12624 fi
12625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12626 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12627 if test $am_cv_val_LC_MESSAGES = yes; then
12628
12629 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12630
12631 fi
12632
12633
12634 # ------------------ #
12635 # Checks for types. #
12636 # ------------------ #
12637
12638 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12639 #if HAVE_SYS_SOCKET_H
12640 # include <sys/socket.h>
12641 #elif HAVE_WS2TCPIP_H
12642 # include <ws2tcpip.h>
12643 #endif
12644
12645 "
12646 if test "x$ac_cv_type_socklen_t" = xyes; then :
12647
12648 cat >>confdefs.h <<_ACEOF
12649 #define HAVE_SOCKLEN_T 1
12650 _ACEOF
12651
12652
12653 fi
12654
12655
12656 # ------------------------------------- #
12657 # Checks for compiler characteristics. #
12658 # ------------------------------------- #
12659
12660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12661 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12662 if ${ac_cv_c_const+:} false; then :
12663 $as_echo_n "(cached) " >&6
12664 else
12665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12666 /* end confdefs.h. */
12667
12668 int
12669 main ()
12670 {
12671
12672 #ifndef __cplusplus
12673 /* Ultrix mips cc rejects this sort of thing. */
12674 typedef int charset[2];
12675 const charset cs = { 0, 0 };
12676 /* SunOS 4.1.1 cc rejects this. */
12677 char const *const *pcpcc;
12678 char **ppc;
12679 /* NEC SVR4.0.2 mips cc rejects this. */
12680 struct point {int x, y;};
12681 static struct point const zero = {0,0};
12682 /* AIX XL C 1.02.0.0 rejects this.
12683 It does not let you subtract one const X* pointer from another in
12684 an arm of an if-expression whose if-part is not a constant
12685 expression */
12686 const char *g = "string";
12687 pcpcc = &g + (g ? g-g : 0);
12688 /* HPUX 7.0 cc rejects these. */
12689 ++pcpcc;
12690 ppc = (char**) pcpcc;
12691 pcpcc = (char const *const *) ppc;
12692 { /* SCO 3.2v4 cc rejects this sort of thing. */
12693 char tx;
12694 char *t = &tx;
12695 char const *s = 0 ? (char *) 0 : (char const *) 0;
12696
12697 *t++ = 0;
12698 if (s) return 0;
12699 }
12700 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12701 int x[] = {25, 17};
12702 const int *foo = &x[0];
12703 ++foo;
12704 }
12705 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12706 typedef const int *iptr;
12707 iptr p = 0;
12708 ++p;
12709 }
12710 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12711 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12712 struct s { int j; const int *ap[3]; } bx;
12713 struct s *b = &bx; b->j = 5;
12714 }
12715 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12716 const int foo = 10;
12717 if (!foo) return 0;
12718 }
12719 return !cs[0] && !zero.x;
12720 #endif
12721
12722 ;
12723 return 0;
12724 }
12725 _ACEOF
12726 if ac_fn_c_try_compile "$LINENO"; then :
12727 ac_cv_c_const=yes
12728 else
12729 ac_cv_c_const=no
12730 fi
12731 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12732 fi
12733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12734 $as_echo "$ac_cv_c_const" >&6; }
12735 if test $ac_cv_c_const = no; then
12736
12737 $as_echo "#define const /**/" >>confdefs.h
12738
12739 fi
12740
12741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12742 $as_echo_n "checking for inline... " >&6; }
12743 if ${ac_cv_c_inline+:} false; then :
12744 $as_echo_n "(cached) " >&6
12745 else
12746 ac_cv_c_inline=no
12747 for ac_kw in inline __inline__ __inline; do
12748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12749 /* end confdefs.h. */
12750 #ifndef __cplusplus
12751 typedef int foo_t;
12752 static $ac_kw foo_t static_foo () {return 0; }
12753 $ac_kw foo_t foo () {return 0; }
12754 #endif
12755
12756 _ACEOF
12757 if ac_fn_c_try_compile "$LINENO"; then :
12758 ac_cv_c_inline=$ac_kw
12759 fi
12760 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12761 test "$ac_cv_c_inline" != no && break
12762 done
12763
12764 fi
12765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12766 $as_echo "$ac_cv_c_inline" >&6; }
12767
12768 case $ac_cv_c_inline in
12769 inline | yes) ;;
12770 *)
12771 case $ac_cv_c_inline in
12772 no) ac_val=;;
12773 *) ac_val=$ac_cv_c_inline;;
12774 esac
12775 cat >>confdefs.h <<_ACEOF
12776 #ifndef __cplusplus
12777 #define inline $ac_val
12778 #endif
12779 _ACEOF
12780 ;;
12781 esac
12782
12783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12784 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12785 if ${ac_cv_c_bigendian+:} false; then :
12786 $as_echo_n "(cached) " >&6
12787 else
12788 ac_cv_c_bigendian=unknown
12789 # See if we're dealing with a universal compiler.
12790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12791 /* end confdefs.h. */
12792 #ifndef __APPLE_CC__
12793 not a universal capable compiler
12794 #endif
12795 typedef int dummy;
12796
12797 _ACEOF
12798 if ac_fn_c_try_compile "$LINENO"; then :
12799
12800 # Check for potential -arch flags. It is not universal unless
12801 # there are at least two -arch flags with different values.
12802 ac_arch=
12803 ac_prev=
12804 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12805 if test -n "$ac_prev"; then
12806 case $ac_word in
12807 i?86 | x86_64 | ppc | ppc64)
12808 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12809 ac_arch=$ac_word
12810 else
12811 ac_cv_c_bigendian=universal
12812 break
12813 fi
12814 ;;
12815 esac
12816 ac_prev=
12817 elif test "x$ac_word" = "x-arch"; then
12818 ac_prev=arch
12819 fi
12820 done
12821 fi
12822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12823 if test $ac_cv_c_bigendian = unknown; then
12824 # See if sys/param.h defines the BYTE_ORDER macro.
12825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12826 /* end confdefs.h. */
12827 #include <sys/types.h>
12828 #include <sys/param.h>
12829
12830 int
12831 main ()
12832 {
12833 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12834 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12835 && LITTLE_ENDIAN)
12836 bogus endian macros
12837 #endif
12838
12839 ;
12840 return 0;
12841 }
12842 _ACEOF
12843 if ac_fn_c_try_compile "$LINENO"; then :
12844 # It does; now see whether it defined to BIG_ENDIAN or not.
12845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846 /* end confdefs.h. */
12847 #include <sys/types.h>
12848 #include <sys/param.h>
12849
12850 int
12851 main ()
12852 {
12853 #if BYTE_ORDER != BIG_ENDIAN
12854 not big endian
12855 #endif
12856
12857 ;
12858 return 0;
12859 }
12860 _ACEOF
12861 if ac_fn_c_try_compile "$LINENO"; then :
12862 ac_cv_c_bigendian=yes
12863 else
12864 ac_cv_c_bigendian=no
12865 fi
12866 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12867 fi
12868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12869 fi
12870 if test $ac_cv_c_bigendian = unknown; then
12871 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12873 /* end confdefs.h. */
12874 #include <limits.h>
12875
12876 int
12877 main ()
12878 {
12879 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12880 bogus endian macros
12881 #endif
12882
12883 ;
12884 return 0;
12885 }
12886 _ACEOF
12887 if ac_fn_c_try_compile "$LINENO"; then :
12888 # It does; now see whether it defined to _BIG_ENDIAN or not.
12889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12890 /* end confdefs.h. */
12891 #include <limits.h>
12892
12893 int
12894 main ()
12895 {
12896 #ifndef _BIG_ENDIAN
12897 not big endian
12898 #endif
12899
12900 ;
12901 return 0;
12902 }
12903 _ACEOF
12904 if ac_fn_c_try_compile "$LINENO"; then :
12905 ac_cv_c_bigendian=yes
12906 else
12907 ac_cv_c_bigendian=no
12908 fi
12909 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12910 fi
12911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12912 fi
12913 if test $ac_cv_c_bigendian = unknown; then
12914 # Compile a test program.
12915 if test "$cross_compiling" = yes; then :
12916 # Try to guess by grepping values from an object file.
12917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12918 /* end confdefs.h. */
12919 short int ascii_mm[] =
12920 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12921 short int ascii_ii[] =
12922 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12923 int use_ascii (int i) {
12924 return ascii_mm[i] + ascii_ii[i];
12925 }
12926 short int ebcdic_ii[] =
12927 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12928 short int ebcdic_mm[] =
12929 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12930 int use_ebcdic (int i) {
12931 return ebcdic_mm[i] + ebcdic_ii[i];
12932 }
12933 extern int foo;
12934
12935 int
12936 main ()
12937 {
12938 return use_ascii (foo) == use_ebcdic (foo);
12939 ;
12940 return 0;
12941 }
12942 _ACEOF
12943 if ac_fn_c_try_compile "$LINENO"; then :
12944 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12945 ac_cv_c_bigendian=yes
12946 fi
12947 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12948 if test "$ac_cv_c_bigendian" = unknown; then
12949 ac_cv_c_bigendian=no
12950 else
12951 # finding both strings is unlikely to happen, but who knows?
12952 ac_cv_c_bigendian=unknown
12953 fi
12954 fi
12955 fi
12956 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12957 else
12958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12959 /* end confdefs.h. */
12960 $ac_includes_default
12961 int
12962 main ()
12963 {
12964
12965 /* Are we little or big endian? From Harbison&Steele. */
12966 union
12967 {
12968 long int l;
12969 char c[sizeof (long int)];
12970 } u;
12971 u.l = 1;
12972 return u.c[sizeof (long int) - 1] == 1;
12973
12974 ;
12975 return 0;
12976 }
12977 _ACEOF
12978 if ac_fn_c_try_run "$LINENO"; then :
12979 ac_cv_c_bigendian=no
12980 else
12981 ac_cv_c_bigendian=yes
12982 fi
12983 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12984 conftest.$ac_objext conftest.beam conftest.$ac_ext
12985 fi
12986
12987 fi
12988 fi
12989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12990 $as_echo "$ac_cv_c_bigendian" >&6; }
12991 case $ac_cv_c_bigendian in #(
12992 yes)
12993 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12994 ;; #(
12995 no)
12996 ;; #(
12997 universal)
12998
12999 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13000
13001 ;; #(
13002 *)
13003 as_fn_error $? "unknown endianness
13004 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13005 esac
13006
13007
13008 # ------------------------------ #
13009 # Checks for library functions. #
13010 # ------------------------------ #
13011
13012 for ac_func in getuid getgid \
13013 pipe pread pread64 pwrite resize_term \
13014 getpgid setsid \
13015 sigaction sigsetmask socketpair \
13016 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
13017 setrlimit getrlimit posix_madvise waitpid \
13018 use_default_colors
13019 do :
13020 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13021 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13022 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13023 cat >>confdefs.h <<_ACEOF
13024 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13025 _ACEOF
13026
13027 fi
13028 done
13029
13030
13031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13032 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13033 if ${am_cv_langinfo_codeset+:} false; then :
13034 $as_echo_n "(cached) " >&6
13035 else
13036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13037 /* end confdefs.h. */
13038 #include <langinfo.h>
13039 int
13040 main ()
13041 {
13042 char* cs = nl_langinfo(CODESET);
13043 ;
13044 return 0;
13045 }
13046 _ACEOF
13047 if ac_fn_c_try_link "$LINENO"; then :
13048 am_cv_langinfo_codeset=yes
13049 else
13050 am_cv_langinfo_codeset=no
13051 fi
13052 rm -f core conftest.err conftest.$ac_objext \
13053 conftest$ac_exeext conftest.$ac_ext
13054
13055 fi
13056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13057 $as_echo "$am_cv_langinfo_codeset" >&6; }
13058 if test $am_cv_langinfo_codeset = yes; then
13059
13060 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13061
13062 fi
13063
13064 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13065 if test "x$ac_cv_type_size_t" = xyes; then :
13066
13067 else
13068
13069 cat >>confdefs.h <<_ACEOF
13070 #define size_t unsigned int
13071 _ACEOF
13072
13073 fi
13074
13075
13076
13077
13078 for ac_header in $ac_header_list
13079 do :
13080 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13081 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13082 "
13083 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13084 cat >>confdefs.h <<_ACEOF
13085 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13086 _ACEOF
13087
13088 fi
13089
13090 done
13091
13092
13093
13094
13095
13096
13097
13098 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13099 if test "x$ac_cv_type_pid_t" = xyes; then :
13100
13101 else
13102
13103 cat >>confdefs.h <<_ACEOF
13104 #define pid_t int
13105 _ACEOF
13106
13107 fi
13108
13109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13110 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13111 if ${ac_cv_path_SED+:} false; then :
13112 $as_echo_n "(cached) " >&6
13113 else
13114 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13115 for ac_i in 1 2 3 4 5 6 7; do
13116 ac_script="$ac_script$as_nl$ac_script"
13117 done
13118 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13119 { ac_script=; unset ac_script;}
13120 if test -z "$SED"; then
13121 ac_path_SED_found=false
13122 # Loop through the user's path and test for each of PROGNAME-LIST
13123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13124 for as_dir in $PATH
13125 do
13126 IFS=$as_save_IFS
13127 test -z "$as_dir" && as_dir=.
13128 for ac_prog in sed gsed; do
13129 for ac_exec_ext in '' $ac_executable_extensions; do
13130 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13131 as_fn_executable_p "$ac_path_SED" || continue
13132 # Check for GNU ac_path_SED and select it if it is found.
13133 # Check for GNU $ac_path_SED
13134 case `"$ac_path_SED" --version 2>&1` in
13135 *GNU*)
13136 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13137 *)
13138 ac_count=0
13139 $as_echo_n 0123456789 >"conftest.in"
13140 while :
13141 do
13142 cat "conftest.in" "conftest.in" >"conftest.tmp"
13143 mv "conftest.tmp" "conftest.in"
13144 cp "conftest.in" "conftest.nl"
13145 $as_echo '' >> "conftest.nl"
13146 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13147 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13148 as_fn_arith $ac_count + 1 && ac_count=$as_val
13149 if test $ac_count -gt ${ac_path_SED_max-0}; then
13150 # Best one so far, save it but keep looking for a better one
13151 ac_cv_path_SED="$ac_path_SED"
13152 ac_path_SED_max=$ac_count
13153 fi
13154 # 10*(2^10) chars as input seems more than enough
13155 test $ac_count -gt 10 && break
13156 done
13157 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13158 esac
13159
13160 $ac_path_SED_found && break 3
13161 done
13162 done
13163 done
13164 IFS=$as_save_IFS
13165 if test -z "$ac_cv_path_SED"; then
13166 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13167 fi
13168 else
13169 ac_cv_path_SED=$SED
13170 fi
13171
13172 fi
13173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13174 $as_echo "$ac_cv_path_SED" >&6; }
13175 SED="$ac_cv_path_SED"
13176 rm -f conftest.sed
13177
13178
13179 # Set the 'development' global.
13180 . $srcdir/../bfd/development.sh
13181
13182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13183 $as_echo_n "checking for ANSI C header files... " >&6; }
13184 if ${ac_cv_header_stdc+:} false; then :
13185 $as_echo_n "(cached) " >&6
13186 else
13187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188 /* end confdefs.h. */
13189 #include <stdlib.h>
13190 #include <stdarg.h>
13191 #include <string.h>
13192 #include <float.h>
13193
13194 int
13195 main ()
13196 {
13197
13198 ;
13199 return 0;
13200 }
13201 _ACEOF
13202 if ac_fn_c_try_compile "$LINENO"; then :
13203 ac_cv_header_stdc=yes
13204 else
13205 ac_cv_header_stdc=no
13206 fi
13207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13208
13209 if test $ac_cv_header_stdc = yes; then
13210 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13212 /* end confdefs.h. */
13213 #include <string.h>
13214
13215 _ACEOF
13216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13217 $EGREP "memchr" >/dev/null 2>&1; then :
13218
13219 else
13220 ac_cv_header_stdc=no
13221 fi
13222 rm -f conftest*
13223
13224 fi
13225
13226 if test $ac_cv_header_stdc = yes; then
13227 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13229 /* end confdefs.h. */
13230 #include <stdlib.h>
13231
13232 _ACEOF
13233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13234 $EGREP "free" >/dev/null 2>&1; then :
13235
13236 else
13237 ac_cv_header_stdc=no
13238 fi
13239 rm -f conftest*
13240
13241 fi
13242
13243 if test $ac_cv_header_stdc = yes; then
13244 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13245 if test "$cross_compiling" = yes; then :
13246 :
13247 else
13248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13249 /* end confdefs.h. */
13250 #include <ctype.h>
13251 #include <stdlib.h>
13252 #if ((' ' & 0x0FF) == 0x020)
13253 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13254 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13255 #else
13256 # define ISLOWER(c) \
13257 (('a' <= (c) && (c) <= 'i') \
13258 || ('j' <= (c) && (c) <= 'r') \
13259 || ('s' <= (c) && (c) <= 'z'))
13260 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13261 #endif
13262
13263 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13264 int
13265 main ()
13266 {
13267 int i;
13268 for (i = 0; i < 256; i++)
13269 if (XOR (islower (i), ISLOWER (i))
13270 || toupper (i) != TOUPPER (i))
13271 return 2;
13272 return 0;
13273 }
13274 _ACEOF
13275 if ac_fn_c_try_run "$LINENO"; then :
13276
13277 else
13278 ac_cv_header_stdc=no
13279 fi
13280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13281 conftest.$ac_objext conftest.beam conftest.$ac_ext
13282 fi
13283
13284 fi
13285 fi
13286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13287 $as_echo "$ac_cv_header_stdc" >&6; }
13288 if test $ac_cv_header_stdc = yes; then
13289
13290 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13291
13292 fi
13293
13294 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13295 # for constant arguments. Useless!
13296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13297 $as_echo_n "checking for working alloca.h... " >&6; }
13298 if ${ac_cv_working_alloca_h+:} false; then :
13299 $as_echo_n "(cached) " >&6
13300 else
13301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13302 /* end confdefs.h. */
13303 #include <alloca.h>
13304 int
13305 main ()
13306 {
13307 char *p = (char *) alloca (2 * sizeof (int));
13308 if (p) return 0;
13309 ;
13310 return 0;
13311 }
13312 _ACEOF
13313 if ac_fn_c_try_link "$LINENO"; then :
13314 ac_cv_working_alloca_h=yes
13315 else
13316 ac_cv_working_alloca_h=no
13317 fi
13318 rm -f core conftest.err conftest.$ac_objext \
13319 conftest$ac_exeext conftest.$ac_ext
13320 fi
13321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13322 $as_echo "$ac_cv_working_alloca_h" >&6; }
13323 if test $ac_cv_working_alloca_h = yes; then
13324
13325 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13326
13327 fi
13328
13329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13330 $as_echo_n "checking for alloca... " >&6; }
13331 if ${ac_cv_func_alloca_works+:} false; then :
13332 $as_echo_n "(cached) " >&6
13333 else
13334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13335 /* end confdefs.h. */
13336 #ifdef __GNUC__
13337 # define alloca __builtin_alloca
13338 #else
13339 # ifdef _MSC_VER
13340 # include <malloc.h>
13341 # define alloca _alloca
13342 # else
13343 # ifdef HAVE_ALLOCA_H
13344 # include <alloca.h>
13345 # else
13346 # ifdef _AIX
13347 #pragma alloca
13348 # else
13349 # ifndef alloca /* predefined by HP cc +Olibcalls */
13350 void *alloca (size_t);
13351 # endif
13352 # endif
13353 # endif
13354 # endif
13355 #endif
13356
13357 int
13358 main ()
13359 {
13360 char *p = (char *) alloca (1);
13361 if (p) return 0;
13362 ;
13363 return 0;
13364 }
13365 _ACEOF
13366 if ac_fn_c_try_link "$LINENO"; then :
13367 ac_cv_func_alloca_works=yes
13368 else
13369 ac_cv_func_alloca_works=no
13370 fi
13371 rm -f core conftest.err conftest.$ac_objext \
13372 conftest$ac_exeext conftest.$ac_ext
13373 fi
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13375 $as_echo "$ac_cv_func_alloca_works" >&6; }
13376
13377 if test $ac_cv_func_alloca_works = yes; then
13378
13379 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13380
13381 else
13382 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13383 # that cause trouble. Some versions do not even contain alloca or
13384 # contain a buggy version. If you still want to use their alloca,
13385 # use ar to extract alloca.o from them instead of compiling alloca.c.
13386
13387 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13388
13389 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13390
13391
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13393 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13394 if ${ac_cv_os_cray+:} false; then :
13395 $as_echo_n "(cached) " >&6
13396 else
13397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13398 /* end confdefs.h. */
13399 #if defined CRAY && ! defined CRAY2
13400 webecray
13401 #else
13402 wenotbecray
13403 #endif
13404
13405 _ACEOF
13406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13407 $EGREP "webecray" >/dev/null 2>&1; then :
13408 ac_cv_os_cray=yes
13409 else
13410 ac_cv_os_cray=no
13411 fi
13412 rm -f conftest*
13413
13414 fi
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13416 $as_echo "$ac_cv_os_cray" >&6; }
13417 if test $ac_cv_os_cray = yes; then
13418 for ac_func in _getb67 GETB67 getb67; do
13419 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13420 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13421 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13422
13423 cat >>confdefs.h <<_ACEOF
13424 #define CRAY_STACKSEG_END $ac_func
13425 _ACEOF
13426
13427 break
13428 fi
13429
13430 done
13431 fi
13432
13433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13434 $as_echo_n "checking stack direction for C alloca... " >&6; }
13435 if ${ac_cv_c_stack_direction+:} false; then :
13436 $as_echo_n "(cached) " >&6
13437 else
13438 if test "$cross_compiling" = yes; then :
13439 ac_cv_c_stack_direction=0
13440 else
13441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13442 /* end confdefs.h. */
13443 $ac_includes_default
13444 int
13445 find_stack_direction (int *addr, int depth)
13446 {
13447 int dir, dummy = 0;
13448 if (! addr)
13449 addr = &dummy;
13450 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13451 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13452 return dir + dummy;
13453 }
13454
13455 int
13456 main (int argc, char **argv)
13457 {
13458 return find_stack_direction (0, argc + !argv + 20) < 0;
13459 }
13460 _ACEOF
13461 if ac_fn_c_try_run "$LINENO"; then :
13462 ac_cv_c_stack_direction=1
13463 else
13464 ac_cv_c_stack_direction=-1
13465 fi
13466 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13467 conftest.$ac_objext conftest.beam conftest.$ac_ext
13468 fi
13469
13470 fi
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13472 $as_echo "$ac_cv_c_stack_direction" >&6; }
13473 cat >>confdefs.h <<_ACEOF
13474 #define STACK_DIRECTION $ac_cv_c_stack_direction
13475 _ACEOF
13476
13477
13478 fi
13479
13480
13481 WIN32APILIBS=
13482 case ${host} in
13483 *mingw32*)
13484
13485 $as_echo "#define USE_WIN32API 1" >>confdefs.h
13486
13487 WIN32APILIBS="-lws2_32"
13488 ;;
13489 esac
13490
13491
13492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13493 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13494 if ${am_cv_langinfo_codeset+:} false; then :
13495 $as_echo_n "(cached) " >&6
13496 else
13497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13498 /* end confdefs.h. */
13499 #include <langinfo.h>
13500 int
13501 main ()
13502 {
13503 char* cs = nl_langinfo(CODESET);
13504 ;
13505 return 0;
13506 }
13507 _ACEOF
13508 if ac_fn_c_try_link "$LINENO"; then :
13509 am_cv_langinfo_codeset=yes
13510 else
13511 am_cv_langinfo_codeset=no
13512 fi
13513 rm -f core conftest.err conftest.$ac_objext \
13514 conftest$ac_exeext conftest.$ac_ext
13515
13516 fi
13517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13518 $as_echo "$am_cv_langinfo_codeset" >&6; }
13519 if test $am_cv_langinfo_codeset = yes; then
13520
13521 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13522
13523 fi
13524
13525
13526 for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h proc_service.h poll.h sys/poll.h sys/select.h
13527 do :
13528 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13529 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13530 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13531 cat >>confdefs.h <<_ACEOF
13532 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13533 _ACEOF
13534
13535 fi
13536
13537 done
13538
13539
13540
13541 for ac_func in getpagesize
13542 do :
13543 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13544 if test "x$ac_cv_func_getpagesize" = xyes; then :
13545 cat >>confdefs.h <<_ACEOF
13546 #define HAVE_GETPAGESIZE 1
13547 _ACEOF
13548
13549 fi
13550 done
13551
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13553 $as_echo_n "checking for working mmap... " >&6; }
13554 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
13555 $as_echo_n "(cached) " >&6
13556 else
13557 if test "$cross_compiling" = yes; then :
13558 ac_cv_func_mmap_fixed_mapped=no
13559 else
13560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13561 /* end confdefs.h. */
13562 $ac_includes_default
13563 /* malloc might have been renamed as rpl_malloc. */
13564 #undef malloc
13565
13566 /* Thanks to Mike Haertel and Jim Avera for this test.
13567 Here is a matrix of mmap possibilities:
13568 mmap private not fixed
13569 mmap private fixed at somewhere currently unmapped
13570 mmap private fixed at somewhere already mapped
13571 mmap shared not fixed
13572 mmap shared fixed at somewhere currently unmapped
13573 mmap shared fixed at somewhere already mapped
13574 For private mappings, we should verify that changes cannot be read()
13575 back from the file, nor mmap's back from the file at a different
13576 address. (There have been systems where private was not correctly
13577 implemented like the infamous i386 svr4.0, and systems where the
13578 VM page cache was not coherent with the file system buffer cache
13579 like early versions of FreeBSD and possibly contemporary NetBSD.)
13580 For shared mappings, we should conversely verify that changes get
13581 propagated back to all the places they're supposed to be.
13582
13583 Grep wants private fixed already mapped.
13584 The main things grep needs to know about mmap are:
13585 * does it exist and is it safe to write into the mmap'd area
13586 * how to use it (BSD variants) */
13587
13588 #include <fcntl.h>
13589 #include <sys/mman.h>
13590
13591 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13592 char *malloc ();
13593 #endif
13594
13595 /* This mess was copied from the GNU getpagesize.h. */
13596 #ifndef HAVE_GETPAGESIZE
13597 # ifdef _SC_PAGESIZE
13598 # define getpagesize() sysconf(_SC_PAGESIZE)
13599 # else /* no _SC_PAGESIZE */
13600 # ifdef HAVE_SYS_PARAM_H
13601 # include <sys/param.h>
13602 # ifdef EXEC_PAGESIZE
13603 # define getpagesize() EXEC_PAGESIZE
13604 # else /* no EXEC_PAGESIZE */
13605 # ifdef NBPG
13606 # define getpagesize() NBPG * CLSIZE
13607 # ifndef CLSIZE
13608 # define CLSIZE 1
13609 # endif /* no CLSIZE */
13610 # else /* no NBPG */
13611 # ifdef NBPC
13612 # define getpagesize() NBPC
13613 # else /* no NBPC */
13614 # ifdef PAGESIZE
13615 # define getpagesize() PAGESIZE
13616 # endif /* PAGESIZE */
13617 # endif /* no NBPC */
13618 # endif /* no NBPG */
13619 # endif /* no EXEC_PAGESIZE */
13620 # else /* no HAVE_SYS_PARAM_H */
13621 # define getpagesize() 8192 /* punt totally */
13622 # endif /* no HAVE_SYS_PARAM_H */
13623 # endif /* no _SC_PAGESIZE */
13624
13625 #endif /* no HAVE_GETPAGESIZE */
13626
13627 int
13628 main ()
13629 {
13630 char *data, *data2, *data3;
13631 const char *cdata2;
13632 int i, pagesize;
13633 int fd, fd2;
13634
13635 pagesize = getpagesize ();
13636
13637 /* First, make a file with some known garbage in it. */
13638 data = (char *) malloc (pagesize);
13639 if (!data)
13640 return 1;
13641 for (i = 0; i < pagesize; ++i)
13642 *(data + i) = rand ();
13643 umask (0);
13644 fd = creat ("conftest.mmap", 0600);
13645 if (fd < 0)
13646 return 2;
13647 if (write (fd, data, pagesize) != pagesize)
13648 return 3;
13649 close (fd);
13650
13651 /* Next, check that the tail of a page is zero-filled. File must have
13652 non-zero length, otherwise we risk SIGBUS for entire page. */
13653 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13654 if (fd2 < 0)
13655 return 4;
13656 cdata2 = "";
13657 if (write (fd2, cdata2, 1) != 1)
13658 return 5;
13659 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13660 if (data2 == MAP_FAILED)
13661 return 6;
13662 for (i = 0; i < pagesize; ++i)
13663 if (*(data2 + i))
13664 return 7;
13665 close (fd2);
13666 if (munmap (data2, pagesize))
13667 return 8;
13668
13669 /* Next, try to mmap the file at a fixed address which already has
13670 something else allocated at it. If we can, also make sure that
13671 we see the same garbage. */
13672 fd = open ("conftest.mmap", O_RDWR);
13673 if (fd < 0)
13674 return 9;
13675 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13676 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13677 return 10;
13678 for (i = 0; i < pagesize; ++i)
13679 if (*(data + i) != *(data2 + i))
13680 return 11;
13681
13682 /* Finally, make sure that changes to the mapped area do not
13683 percolate back to the file as seen by read(). (This is a bug on
13684 some variants of i386 svr4.0.) */
13685 for (i = 0; i < pagesize; ++i)
13686 *(data2 + i) = *(data2 + i) + 1;
13687 data3 = (char *) malloc (pagesize);
13688 if (!data3)
13689 return 12;
13690 if (read (fd, data3, pagesize) != pagesize)
13691 return 13;
13692 for (i = 0; i < pagesize; ++i)
13693 if (*(data + i) != *(data3 + i))
13694 return 14;
13695 close (fd);
13696 return 0;
13697 }
13698 _ACEOF
13699 if ac_fn_c_try_run "$LINENO"; then :
13700 ac_cv_func_mmap_fixed_mapped=yes
13701 else
13702 ac_cv_func_mmap_fixed_mapped=no
13703 fi
13704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13705 conftest.$ac_objext conftest.beam conftest.$ac_ext
13706 fi
13707
13708 fi
13709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13710 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13711 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13712
13713 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13714
13715 fi
13716 rm -f conftest.mmap conftest.txt
13717
13718 for ac_header in vfork.h
13719 do :
13720 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13721 if test "x$ac_cv_header_vfork_h" = xyes; then :
13722 cat >>confdefs.h <<_ACEOF
13723 #define HAVE_VFORK_H 1
13724 _ACEOF
13725
13726 fi
13727
13728 done
13729
13730 for ac_func in fork vfork
13731 do :
13732 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13733 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13734 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13735 cat >>confdefs.h <<_ACEOF
13736 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13737 _ACEOF
13738
13739 fi
13740 done
13741
13742 if test "x$ac_cv_func_fork" = xyes; then
13743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13744 $as_echo_n "checking for working fork... " >&6; }
13745 if ${ac_cv_func_fork_works+:} false; then :
13746 $as_echo_n "(cached) " >&6
13747 else
13748 if test "$cross_compiling" = yes; then :
13749 ac_cv_func_fork_works=cross
13750 else
13751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13752 /* end confdefs.h. */
13753 $ac_includes_default
13754 int
13755 main ()
13756 {
13757
13758 /* By Ruediger Kuhlmann. */
13759 return fork () < 0;
13760
13761 ;
13762 return 0;
13763 }
13764 _ACEOF
13765 if ac_fn_c_try_run "$LINENO"; then :
13766 ac_cv_func_fork_works=yes
13767 else
13768 ac_cv_func_fork_works=no
13769 fi
13770 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13771 conftest.$ac_objext conftest.beam conftest.$ac_ext
13772 fi
13773
13774 fi
13775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13776 $as_echo "$ac_cv_func_fork_works" >&6; }
13777
13778 else
13779 ac_cv_func_fork_works=$ac_cv_func_fork
13780 fi
13781 if test "x$ac_cv_func_fork_works" = xcross; then
13782 case $host in
13783 *-*-amigaos* | *-*-msdosdjgpp*)
13784 # Override, as these systems have only a dummy fork() stub
13785 ac_cv_func_fork_works=no
13786 ;;
13787 *)
13788 ac_cv_func_fork_works=yes
13789 ;;
13790 esac
13791 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13792 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13793 fi
13794 ac_cv_func_vfork_works=$ac_cv_func_vfork
13795 if test "x$ac_cv_func_vfork" = xyes; then
13796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13797 $as_echo_n "checking for working vfork... " >&6; }
13798 if ${ac_cv_func_vfork_works+:} false; then :
13799 $as_echo_n "(cached) " >&6
13800 else
13801 if test "$cross_compiling" = yes; then :
13802 ac_cv_func_vfork_works=cross
13803 else
13804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13805 /* end confdefs.h. */
13806 /* Thanks to Paul Eggert for this test. */
13807 $ac_includes_default
13808 #include <sys/wait.h>
13809 #ifdef HAVE_VFORK_H
13810 # include <vfork.h>
13811 #endif
13812 /* On some sparc systems, changes by the child to local and incoming
13813 argument registers are propagated back to the parent. The compiler
13814 is told about this with #include <vfork.h>, but some compilers
13815 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13816 static variable whose address is put into a register that is
13817 clobbered by the vfork. */
13818 static void
13819 #ifdef __cplusplus
13820 sparc_address_test (int arg)
13821 # else
13822 sparc_address_test (arg) int arg;
13823 #endif
13824 {
13825 static pid_t child;
13826 if (!child) {
13827 child = vfork ();
13828 if (child < 0) {
13829 perror ("vfork");
13830 _exit(2);
13831 }
13832 if (!child) {
13833 arg = getpid();
13834 write(-1, "", 0);
13835 _exit (arg);
13836 }
13837 }
13838 }
13839
13840 int
13841 main ()
13842 {
13843 pid_t parent = getpid ();
13844 pid_t child;
13845
13846 sparc_address_test (0);
13847
13848 child = vfork ();
13849
13850 if (child == 0) {
13851 /* Here is another test for sparc vfork register problems. This
13852 test uses lots of local variables, at least as many local
13853 variables as main has allocated so far including compiler
13854 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13855 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13856 reuse the register of parent for one of the local variables,
13857 since it will think that parent can't possibly be used any more
13858 in this routine. Assigning to the local variable will thus
13859 munge parent in the parent process. */
13860 pid_t
13861 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13862 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13863 /* Convince the compiler that p..p7 are live; otherwise, it might
13864 use the same hardware register for all 8 local variables. */
13865 if (p != p1 || p != p2 || p != p3 || p != p4
13866 || p != p5 || p != p6 || p != p7)
13867 _exit(1);
13868
13869 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13870 from child file descriptors. If the child closes a descriptor
13871 before it execs or exits, this munges the parent's descriptor
13872 as well. Test for this by closing stdout in the child. */
13873 _exit(close(fileno(stdout)) != 0);
13874 } else {
13875 int status;
13876 struct stat st;
13877
13878 while (wait(&status) != child)
13879 ;
13880 return (
13881 /* Was there some problem with vforking? */
13882 child < 0
13883
13884 /* Did the child fail? (This shouldn't happen.) */
13885 || status
13886
13887 /* Did the vfork/compiler bug occur? */
13888 || parent != getpid()
13889
13890 /* Did the file descriptor bug occur? */
13891 || fstat(fileno(stdout), &st) != 0
13892 );
13893 }
13894 }
13895 _ACEOF
13896 if ac_fn_c_try_run "$LINENO"; then :
13897 ac_cv_func_vfork_works=yes
13898 else
13899 ac_cv_func_vfork_works=no
13900 fi
13901 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13902 conftest.$ac_objext conftest.beam conftest.$ac_ext
13903 fi
13904
13905 fi
13906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13907 $as_echo "$ac_cv_func_vfork_works" >&6; }
13908
13909 fi;
13910 if test "x$ac_cv_func_fork_works" = xcross; then
13911 ac_cv_func_vfork_works=$ac_cv_func_vfork
13912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13913 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13914 fi
13915
13916 if test "x$ac_cv_func_vfork_works" = xyes; then
13917
13918 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13919
13920 else
13921
13922 $as_echo "#define vfork fork" >>confdefs.h
13923
13924 fi
13925 if test "x$ac_cv_func_fork_works" = xyes; then
13926
13927 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13928
13929 fi
13930
13931 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13932 ptrace64 sbrk setns sigaltstack sigprocmask \
13933 setpgid setpgrp getrusage getauxval sigtimedwait
13934 do :
13935 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13936 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13937 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13938 cat >>confdefs.h <<_ACEOF
13939 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13940 _ACEOF
13941
13942 fi
13943 done
13944
13945
13946 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
13947 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
13948 # only in linux/personality.h.
13949 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13950 "
13951 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13952 ac_have_decl=1
13953 else
13954 ac_have_decl=0
13955 fi
13956
13957 cat >>confdefs.h <<_ACEOF
13958 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13959 _ACEOF
13960
13961
13962 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13963 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13964 ac_have_decl=1
13965 else
13966 ac_have_decl=0
13967 fi
13968
13969 cat >>confdefs.h <<_ACEOF
13970 #define HAVE_DECL_STRSTR $ac_have_decl
13971 _ACEOF
13972
13973
13974 # ----------------------- #
13975 # Checks for structures. #
13976 # ----------------------- #
13977
13978 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13979 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13980
13981 cat >>confdefs.h <<_ACEOF
13982 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13983 _ACEOF
13984
13985
13986 fi
13987 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13988 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13989
13990 cat >>confdefs.h <<_ACEOF
13991 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13992 _ACEOF
13993
13994
13995 fi
13996
13997
13998 # On FreeBSD we need libutil for the kinfo_get* functions. On
13999 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
14000 # Figure out which one to use.
14001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
14002 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
14003 if ${ac_cv_search_kinfo_getfile+:} false; then :
14004 $as_echo_n "(cached) " >&6
14005 else
14006 ac_func_search_save_LIBS=$LIBS
14007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14008 /* end confdefs.h. */
14009
14010 /* Override any GCC internal prototype to avoid an error.
14011 Use char because int might match the return type of a GCC
14012 builtin and then its argument prototype would still apply. */
14013 #ifdef __cplusplus
14014 extern "C"
14015 #endif
14016 char kinfo_getfile ();
14017 int
14018 main ()
14019 {
14020 return kinfo_getfile ();
14021 ;
14022 return 0;
14023 }
14024 _ACEOF
14025 for ac_lib in '' util util-freebsd; do
14026 if test -z "$ac_lib"; then
14027 ac_res="none required"
14028 else
14029 ac_res=-l$ac_lib
14030 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14031 fi
14032 if ac_fn_c_try_link "$LINENO"; then :
14033 ac_cv_search_kinfo_getfile=$ac_res
14034 fi
14035 rm -f core conftest.err conftest.$ac_objext \
14036 conftest$ac_exeext
14037 if ${ac_cv_search_kinfo_getfile+:} false; then :
14038 break
14039 fi
14040 done
14041 if ${ac_cv_search_kinfo_getfile+:} false; then :
14042
14043 else
14044 ac_cv_search_kinfo_getfile=no
14045 fi
14046 rm conftest.$ac_ext
14047 LIBS=$ac_func_search_save_LIBS
14048 fi
14049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
14050 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
14051 ac_res=$ac_cv_search_kinfo_getfile
14052 if test "$ac_res" != no; then :
14053 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14054
14055 fi
14056
14057
14058 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
14059 for ac_func in kinfo_getfile
14060 do :
14061 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
14062 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
14063 cat >>confdefs.h <<_ACEOF
14064 #define HAVE_KINFO_GETFILE 1
14065 _ACEOF
14066
14067 fi
14068 done
14069
14070
14071 # ----------------------- #
14072 # Check for threading. #
14073 # ----------------------- #
14074
14075 # Check whether --enable-threading was given.
14076 if test "${enable_threading+set}" = set; then :
14077 enableval=$enable_threading; case "$enableval" in
14078 yes) want_threading=yes ;;
14079 no) want_threading=no ;;
14080 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
14081 esac
14082 else
14083 want_threading=yes
14084 fi
14085
14086
14087 # Check for std::thread. This does not work on some platforms, like
14088 # mingw and DJGPP.
14089 ac_ext=cpp
14090 ac_cpp='$CXXCPP $CPPFLAGS'
14091 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14092 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14093 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14094
14095
14096
14097
14098
14099 ac_ext=c
14100 ac_cpp='$CPP $CPPFLAGS'
14101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14104
14105 ax_pthread_ok=no
14106
14107 # We used to check for pthread.h first, but this fails if pthread.h
14108 # requires special compiler flags (e.g. on Tru64 or Sequent).
14109 # It gets checked for in the link test anyway.
14110
14111 # First of all, check if the user has set any of the PTHREAD_LIBS,
14112 # etcetera environment variables, and if threads linking works using
14113 # them:
14114 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
14115 ax_pthread_save_CC="$CC"
14116 ax_pthread_save_CFLAGS="$CFLAGS"
14117 ax_pthread_save_LIBS="$LIBS"
14118 if test "x$PTHREAD_CC" != "x"; then :
14119 CC="$PTHREAD_CC"
14120 fi
14121 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14122 LIBS="$PTHREAD_LIBS $LIBS"
14123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
14124 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
14125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14126 /* end confdefs.h. */
14127
14128 /* Override any GCC internal prototype to avoid an error.
14129 Use char because int might match the return type of a GCC
14130 builtin and then its argument prototype would still apply. */
14131 #ifdef __cplusplus
14132 extern "C"
14133 #endif
14134 char pthread_join ();
14135 int
14136 main ()
14137 {
14138 return pthread_join ();
14139 ;
14140 return 0;
14141 }
14142 _ACEOF
14143 if ac_fn_c_try_link "$LINENO"; then :
14144 ax_pthread_ok=yes
14145 fi
14146 rm -f core conftest.err conftest.$ac_objext \
14147 conftest$ac_exeext conftest.$ac_ext
14148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14149 $as_echo "$ax_pthread_ok" >&6; }
14150 if test "x$ax_pthread_ok" = "xno"; then
14151 PTHREAD_LIBS=""
14152 PTHREAD_CFLAGS=""
14153 fi
14154 CC="$ax_pthread_save_CC"
14155 CFLAGS="$ax_pthread_save_CFLAGS"
14156 LIBS="$ax_pthread_save_LIBS"
14157 fi
14158
14159 # We must check for the threads library under a number of different
14160 # names; the ordering is very important because some systems
14161 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14162 # libraries is broken (non-POSIX).
14163
14164 # Create a list of thread flags to try. Items starting with a "-" are
14165 # C compiler flags, and other items are library names, except for "none"
14166 # which indicates that we try without any flags at all, and "pthread-config"
14167 # which is a program returning the flags for the Pth emulation library.
14168
14169 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
14170
14171 # The ordering *is* (sometimes) important. Some notes on the
14172 # individual items follow:
14173
14174 # pthreads: AIX (must check this before -lpthread)
14175 # none: in case threads are in libc; should be tried before -Kthread and
14176 # other compiler flags to prevent continual compiler warnings
14177 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14178 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14179 # (Note: HP C rejects this with "bad form for `-t' option")
14180 # -pthreads: Solaris/gcc (Note: HP C also rejects)
14181 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14182 # doesn't hurt to check since this sometimes defines pthreads and
14183 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
14184 # is present but should not be used directly; and before -mthreads,
14185 # because the compiler interprets this as "-mt" + "-hreads")
14186 # -mthreads: Mingw32/gcc, Lynx/gcc
14187 # pthread: Linux, etcetera
14188 # --thread-safe: KAI C++
14189 # pthread-config: use pthread-config program (for GNU Pth library)
14190
14191 case $host_os in
14192
14193 freebsd*)
14194
14195 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14196 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
14197
14198 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14199 ;;
14200
14201 hpux*)
14202
14203 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14204 # multi-threading and also sets -lpthread."
14205
14206 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14207 ;;
14208
14209 openedition*)
14210
14211 # IBM z/OS requires a feature-test macro to be defined in order to
14212 # enable POSIX threads at all, so give the user a hint if this is
14213 # not set. (We don't define these ourselves, as they can affect
14214 # other portions of the system API in unpredictable ways.)
14215
14216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14217 /* end confdefs.h. */
14218
14219 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14220 AX_PTHREAD_ZOS_MISSING
14221 # endif
14222
14223 _ACEOF
14224 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14225 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14226 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14227 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
14228 fi
14229 rm -f conftest*
14230
14231 ;;
14232
14233 solaris*)
14234
14235 # On Solaris (at least, for some versions), libc contains stubbed
14236 # (non-functional) versions of the pthreads routines, so link-based
14237 # tests will erroneously succeed. (N.B.: The stubs are missing
14238 # pthread_cleanup_push, or rather a function called by this macro,
14239 # so we could check for that, but who knows whether they'll stub
14240 # that too in a future libc.) So we'll check first for the
14241 # standard Solaris way of linking pthreads (-mt -lpthread).
14242
14243 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
14244 ;;
14245 esac
14246
14247 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14248
14249 if test "x$GCC" = "xyes"; then :
14250 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
14251 fi
14252
14253 # The presence of a feature test macro requesting re-entrant function
14254 # definitions is, on some systems, a strong hint that pthreads support is
14255 # correctly enabled
14256
14257 case $host_os in
14258 darwin* | hpux* | linux* | osf* | solaris*)
14259 ax_pthread_check_macro="_REENTRANT"
14260 ;;
14261
14262 aix*)
14263 ax_pthread_check_macro="_THREAD_SAFE"
14264 ;;
14265
14266 *)
14267 ax_pthread_check_macro="--"
14268 ;;
14269 esac
14270 if test "x$ax_pthread_check_macro" = "x--"; then :
14271 ax_pthread_check_cond=0
14272 else
14273 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
14274 fi
14275
14276 # Are we compiling with Clang?
14277
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14279 $as_echo_n "checking whether $CC is Clang... " >&6; }
14280 if ${ax_cv_PTHREAD_CLANG+:} false; then :
14281 $as_echo_n "(cached) " >&6
14282 else
14283 ax_cv_PTHREAD_CLANG=no
14284 # Note that Autoconf sets GCC=yes for Clang as well as GCC
14285 if test "x$GCC" = "xyes"; then
14286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14287 /* end confdefs.h. */
14288 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14289 # if defined(__clang__) && defined(__llvm__)
14290 AX_PTHREAD_CC_IS_CLANG
14291 # endif
14292
14293 _ACEOF
14294 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14295 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14296 ax_cv_PTHREAD_CLANG=yes
14297 fi
14298 rm -f conftest*
14299
14300 fi
14301
14302 fi
14303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14304 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14305 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
14306
14307 ax_pthread_clang_warning=no
14308
14309 # Clang needs special handling, because older versions handle the -pthread
14310 # option in a rather... idiosyncratic way
14311
14312 if test "x$ax_pthread_clang" = "xyes"; then
14313
14314 # Clang takes -pthread; it has never supported any other flag
14315
14316 # (Note 1: This will need to be revisited if a system that Clang
14317 # supports has POSIX threads in a separate library. This tends not
14318 # to be the way of modern systems, but it's conceivable.)
14319
14320 # (Note 2: On some systems, notably Darwin, -pthread is not needed
14321 # to get POSIX threads support; the API is always present and
14322 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
14323 # -pthread does define _REENTRANT, and while the Darwin headers
14324 # ignore this macro, third-party headers might not.)
14325
14326 PTHREAD_CFLAGS="-pthread"
14327 PTHREAD_LIBS=
14328
14329 ax_pthread_ok=yes
14330
14331 # However, older versions of Clang make a point of warning the user
14332 # that, in an invocation where only linking and no compilation is
14333 # taking place, the -pthread option has no effect ("argument unused
14334 # during compilation"). They expect -pthread to be passed in only
14335 # when source code is being compiled.
14336 #
14337 # Problem is, this is at odds with the way Automake and most other
14338 # C build frameworks function, which is that the same flags used in
14339 # compilation (CFLAGS) are also used in linking. Many systems
14340 # supported by AX_PTHREAD require exactly this for POSIX threads
14341 # support, and in fact it is often not straightforward to specify a
14342 # flag that is used only in the compilation phase and not in
14343 # linking. Such a scenario is extremely rare in practice.
14344 #
14345 # Even though use of the -pthread flag in linking would only print
14346 # a warning, this can be a nuisance for well-run software projects
14347 # that build with -Werror. So if the active version of Clang has
14348 # this misfeature, we search for an option to squash it.
14349
14350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14351 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14352 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14353 $as_echo_n "(cached) " >&6
14354 else
14355 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14356 # Create an alternate version of $ac_link that compiles and
14357 # links in two steps (.c -> .o, .o -> exe) instead of one
14358 # (.c -> exe), because the warning occurs only in the second
14359 # step
14360 ax_pthread_save_ac_link="$ac_link"
14361 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14362 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14363 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14364 ax_pthread_save_CFLAGS="$CFLAGS"
14365 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14366 if test "x$ax_pthread_try" = "xunknown"; then :
14367 break
14368 fi
14369 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14370 ac_link="$ax_pthread_save_ac_link"
14371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14372 /* end confdefs.h. */
14373 int main(void){return 0;}
14374 _ACEOF
14375 if ac_fn_c_try_link "$LINENO"; then :
14376 ac_link="$ax_pthread_2step_ac_link"
14377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14378 /* end confdefs.h. */
14379 int main(void){return 0;}
14380 _ACEOF
14381 if ac_fn_c_try_link "$LINENO"; then :
14382 break
14383 fi
14384 rm -f core conftest.err conftest.$ac_objext \
14385 conftest$ac_exeext conftest.$ac_ext
14386
14387 fi
14388 rm -f core conftest.err conftest.$ac_objext \
14389 conftest$ac_exeext conftest.$ac_ext
14390 done
14391 ac_link="$ax_pthread_save_ac_link"
14392 CFLAGS="$ax_pthread_save_CFLAGS"
14393 if test "x$ax_pthread_try" = "x"; then :
14394 ax_pthread_try=no
14395 fi
14396 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
14397
14398 fi
14399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14400 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
14401
14402 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14403 no | unknown) ;;
14404 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14405 esac
14406
14407 fi # $ax_pthread_clang = yes
14408
14409 if test "x$ax_pthread_ok" = "xno"; then
14410 for ax_pthread_try_flag in $ax_pthread_flags; do
14411
14412 case $ax_pthread_try_flag in
14413 none)
14414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14415 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
14416 ;;
14417
14418 -mt,pthread)
14419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14420 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14421 PTHREAD_CFLAGS="-mt"
14422 PTHREAD_LIBS="-lpthread"
14423 ;;
14424
14425 -*)
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14427 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14428 PTHREAD_CFLAGS="$ax_pthread_try_flag"
14429 ;;
14430
14431 pthread-config)
14432 # Extract the first word of "pthread-config", so it can be a program name with args.
14433 set dummy pthread-config; ac_word=$2
14434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14435 $as_echo_n "checking for $ac_word... " >&6; }
14436 if ${ac_cv_prog_ax_pthread_config+:} false; then :
14437 $as_echo_n "(cached) " >&6
14438 else
14439 if test -n "$ax_pthread_config"; then
14440 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14441 else
14442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14443 for as_dir in $PATH
14444 do
14445 IFS=$as_save_IFS
14446 test -z "$as_dir" && as_dir=.
14447 for ac_exec_ext in '' $ac_executable_extensions; do
14448 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14449 ac_cv_prog_ax_pthread_config="yes"
14450 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14451 break 2
14452 fi
14453 done
14454 done
14455 IFS=$as_save_IFS
14456
14457 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14458 fi
14459 fi
14460 ax_pthread_config=$ac_cv_prog_ax_pthread_config
14461 if test -n "$ax_pthread_config"; then
14462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14463 $as_echo "$ax_pthread_config" >&6; }
14464 else
14465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14466 $as_echo "no" >&6; }
14467 fi
14468
14469
14470 if test "x$ax_pthread_config" = "xno"; then :
14471 continue
14472 fi
14473 PTHREAD_CFLAGS="`pthread-config --cflags`"
14474 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14475 ;;
14476
14477 *)
14478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14479 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14480 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14481 ;;
14482 esac
14483
14484 ax_pthread_save_CFLAGS="$CFLAGS"
14485 ax_pthread_save_LIBS="$LIBS"
14486 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14487 LIBS="$PTHREAD_LIBS $LIBS"
14488
14489 # Check for various functions. We must include pthread.h,
14490 # since some functions may be macros. (On the Sequent, we
14491 # need a special flag -Kthread to make this header compile.)
14492 # We check for pthread_join because it is in -lpthread on IRIX
14493 # while pthread_create is in libc. We check for pthread_attr_init
14494 # due to DEC craziness with -lpthreads. We check for
14495 # pthread_cleanup_push because it is one of the few pthread
14496 # functions on Solaris that doesn't have a non-functional libc stub.
14497 # We try pthread_create on general principles.
14498
14499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14500 /* end confdefs.h. */
14501 #include <pthread.h>
14502 # if $ax_pthread_check_cond
14503 # error "$ax_pthread_check_macro must be defined"
14504 # endif
14505 static void routine(void *a) { a = 0; }
14506 static void *start_routine(void *a) { return a; }
14507 int
14508 main ()
14509 {
14510 pthread_t th; pthread_attr_t attr;
14511 pthread_create(&th, 0, start_routine, 0);
14512 pthread_join(th, 0);
14513 pthread_attr_init(&attr);
14514 pthread_cleanup_push(routine, 0);
14515 pthread_cleanup_pop(0) /* ; */
14516 ;
14517 return 0;
14518 }
14519 _ACEOF
14520 if ac_fn_c_try_link "$LINENO"; then :
14521 ax_pthread_ok=yes
14522 fi
14523 rm -f core conftest.err conftest.$ac_objext \
14524 conftest$ac_exeext conftest.$ac_ext
14525
14526 CFLAGS="$ax_pthread_save_CFLAGS"
14527 LIBS="$ax_pthread_save_LIBS"
14528
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14530 $as_echo "$ax_pthread_ok" >&6; }
14531 if test "x$ax_pthread_ok" = "xyes"; then :
14532 break
14533 fi
14534
14535 PTHREAD_LIBS=""
14536 PTHREAD_CFLAGS=""
14537 done
14538 fi
14539
14540 # Various other checks:
14541 if test "x$ax_pthread_ok" = "xyes"; then
14542 ax_pthread_save_CFLAGS="$CFLAGS"
14543 ax_pthread_save_LIBS="$LIBS"
14544 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14545 LIBS="$PTHREAD_LIBS $LIBS"
14546
14547 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14549 $as_echo_n "checking for joinable pthread attribute... " >&6; }
14550 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14551 $as_echo_n "(cached) " >&6
14552 else
14553 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14554 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14556 /* end confdefs.h. */
14557 #include <pthread.h>
14558 int
14559 main ()
14560 {
14561 int attr = $ax_pthread_attr; return attr /* ; */
14562 ;
14563 return 0;
14564 }
14565 _ACEOF
14566 if ac_fn_c_try_link "$LINENO"; then :
14567 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14568 fi
14569 rm -f core conftest.err conftest.$ac_objext \
14570 conftest$ac_exeext conftest.$ac_ext
14571 done
14572
14573 fi
14574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14575 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14576 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14577 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14578 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14579
14580 cat >>confdefs.h <<_ACEOF
14581 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14582 _ACEOF
14583
14584 ax_pthread_joinable_attr_defined=yes
14585
14586 fi
14587
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14589 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14590 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14591 $as_echo_n "(cached) " >&6
14592 else
14593 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14594 case $host_os in
14595 solaris*)
14596 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14597 ;;
14598 esac
14599
14600 fi
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14602 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14603 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14604 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14605 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14606 ax_pthread_special_flags_added=yes
14607 fi
14608
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14610 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14611 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14612 $as_echo_n "(cached) " >&6
14613 else
14614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14615 /* end confdefs.h. */
14616 #include <pthread.h>
14617 int
14618 main ()
14619 {
14620 int i = PTHREAD_PRIO_INHERIT;
14621 ;
14622 return 0;
14623 }
14624 _ACEOF
14625 if ac_fn_c_try_link "$LINENO"; then :
14626 ax_cv_PTHREAD_PRIO_INHERIT=yes
14627 else
14628 ax_cv_PTHREAD_PRIO_INHERIT=no
14629 fi
14630 rm -f core conftest.err conftest.$ac_objext \
14631 conftest$ac_exeext conftest.$ac_ext
14632
14633 fi
14634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14635 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14636 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14637 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14638
14639 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14640
14641 ax_pthread_prio_inherit_defined=yes
14642
14643 fi
14644
14645 CFLAGS="$ax_pthread_save_CFLAGS"
14646 LIBS="$ax_pthread_save_LIBS"
14647
14648 # More AIX lossage: compile with *_r variant
14649 if test "x$GCC" != "xyes"; then
14650 case $host_os in
14651 aix*)
14652 case "x/$CC" in #(
14653 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14654 #handle absolute path differently from PATH based program lookup
14655 case "x$CC" in #(
14656 x/*) :
14657 if as_fn_executable_p ${CC}_r; then :
14658 PTHREAD_CC="${CC}_r"
14659 fi ;; #(
14660 *) :
14661 for ac_prog in ${CC}_r
14662 do
14663 # Extract the first word of "$ac_prog", so it can be a program name with args.
14664 set dummy $ac_prog; ac_word=$2
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14666 $as_echo_n "checking for $ac_word... " >&6; }
14667 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14668 $as_echo_n "(cached) " >&6
14669 else
14670 if test -n "$PTHREAD_CC"; then
14671 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14672 else
14673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14674 for as_dir in $PATH
14675 do
14676 IFS=$as_save_IFS
14677 test -z "$as_dir" && as_dir=.
14678 for ac_exec_ext in '' $ac_executable_extensions; do
14679 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14680 ac_cv_prog_PTHREAD_CC="$ac_prog"
14681 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14682 break 2
14683 fi
14684 done
14685 done
14686 IFS=$as_save_IFS
14687
14688 fi
14689 fi
14690 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14691 if test -n "$PTHREAD_CC"; then
14692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14693 $as_echo "$PTHREAD_CC" >&6; }
14694 else
14695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14696 $as_echo "no" >&6; }
14697 fi
14698
14699
14700 test -n "$PTHREAD_CC" && break
14701 done
14702 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14703 ;;
14704 esac ;; #(
14705 *) :
14706 ;;
14707 esac
14708 ;;
14709 esac
14710 fi
14711 fi
14712
14713 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14714
14715
14716
14717
14718
14719 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14720 if test "x$ax_pthread_ok" = "xyes"; then
14721 threads=yes
14722 :
14723 else
14724 ax_pthread_ok=no
14725 threads=no
14726 fi
14727 ac_ext=cpp
14728 ac_cpp='$CXXCPP $CPPFLAGS'
14729 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14730 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14731 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14732
14733
14734 if test "$threads" = "yes"; then
14735 save_LIBS="$LIBS"
14736 LIBS="$PTHREAD_LIBS $LIBS"
14737 save_CXXFLAGS="$CXXFLAGS"
14738 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14740 $as_echo_n "checking for std::thread... " >&6; }
14741 if ${gdb_cv_cxx_std_thread+:} false; then :
14742 $as_echo_n "(cached) " >&6
14743 else
14744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14745 /* end confdefs.h. */
14746 #include <thread>
14747 void callback() { }
14748 int
14749 main ()
14750 {
14751 std::thread t(callback);
14752 ;
14753 return 0;
14754 }
14755 _ACEOF
14756 if ac_fn_cxx_try_compile "$LINENO"; then :
14757 gdb_cv_cxx_std_thread=yes
14758 else
14759 gdb_cv_cxx_std_thread=no
14760 fi
14761 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14762 fi
14763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14764 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
14765
14766 # This check must be here, while LIBS includes any necessary
14767 # threading library.
14768 for ac_func in pthread_sigmask pthread_setname_np
14769 do :
14770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14771 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14772 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14773 cat >>confdefs.h <<_ACEOF
14774 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14775 _ACEOF
14776
14777 fi
14778 done
14779
14780
14781 LIBS="$save_LIBS"
14782 CXXFLAGS="$save_CXXFLAGS"
14783 fi
14784
14785 if test "$want_threading" = "yes"; then
14786 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14787
14788 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14789
14790 fi
14791 fi
14792 ac_ext=c
14793 ac_cpp='$CPP $CPPFLAGS'
14794 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14795 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14796 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14797
14798
14799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14800 $as_echo_n "checking for sigsetjmp... " >&6; }
14801 if ${gdb_cv_func_sigsetjmp+:} false; then :
14802 $as_echo_n "(cached) " >&6
14803 else
14804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14805 /* end confdefs.h. */
14806 #include <setjmp.h>
14807 int
14808 main ()
14809 {
14810 sigjmp_buf env;
14811 while (! sigsetjmp (env, 1))
14812 siglongjmp (env, 1);
14813
14814 ;
14815 return 0;
14816 }
14817 _ACEOF
14818 if ac_fn_c_try_compile "$LINENO"; then :
14819 gdb_cv_func_sigsetjmp=yes
14820 else
14821 gdb_cv_func_sigsetjmp=no
14822
14823 fi
14824 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14825
14826 fi
14827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14828 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14829 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14830
14831 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14832
14833 fi
14834
14835
14836 # Check whether --with-intel_pt was given.
14837 if test "${with_intel_pt+set}" = set; then :
14838 withval=$with_intel_pt;
14839 else
14840 with_intel_pt=auto
14841 fi
14842
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14844 $as_echo_n "checking whether to use intel pt... " >&6; }
14845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14846 $as_echo "$with_intel_pt" >&6; }
14847
14848 if test "${with_intel_pt}" = no; then
14849 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14850 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14851 HAVE_LIBIPT=no
14852 else
14853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14854 /* end confdefs.h. */
14855
14856 #include <linux/perf_event.h>
14857 #ifndef PERF_ATTR_SIZE_VER5
14858 # error
14859 #endif
14860
14861 _ACEOF
14862 if ac_fn_c_try_cpp "$LINENO"; then :
14863 perf_event=yes
14864 else
14865 perf_event=no
14866 fi
14867 rm -f conftest.err conftest.i conftest.$ac_ext
14868 if test "$perf_event" != yes; then
14869 if test "$with_intel_pt" = yes; then
14870 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14871 else
14872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14873 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14874 fi
14875 fi
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885 use_additional=yes
14886
14887 acl_save_prefix="$prefix"
14888 prefix="$acl_final_prefix"
14889 acl_save_exec_prefix="$exec_prefix"
14890 exec_prefix="$acl_final_exec_prefix"
14891
14892 eval additional_includedir=\"$includedir\"
14893 eval additional_libdir=\"$libdir\"
14894
14895 exec_prefix="$acl_save_exec_prefix"
14896 prefix="$acl_save_prefix"
14897
14898
14899 # Check whether --with-libipt-prefix was given.
14900 if test "${with_libipt_prefix+set}" = set; then :
14901 withval=$with_libipt_prefix;
14902 if test "X$withval" = "Xno"; then
14903 use_additional=no
14904 else
14905 if test "X$withval" = "X"; then
14906
14907 acl_save_prefix="$prefix"
14908 prefix="$acl_final_prefix"
14909 acl_save_exec_prefix="$exec_prefix"
14910 exec_prefix="$acl_final_exec_prefix"
14911
14912 eval additional_includedir=\"$includedir\"
14913 eval additional_libdir=\"$libdir\"
14914
14915 exec_prefix="$acl_save_exec_prefix"
14916 prefix="$acl_save_prefix"
14917
14918 else
14919 additional_includedir="$withval/include"
14920 additional_libdir="$withval/lib"
14921 fi
14922 fi
14923
14924 fi
14925
14926
14927 # Check whether --with-libipt-type was given.
14928 if test "${with_libipt_type+set}" = set; then :
14929 withval=$with_libipt_type; with_libipt_type=$withval
14930 else
14931 with_libipt_type=auto
14932 fi
14933
14934 lib_type=`eval echo \$with_libipt_type`
14935
14936 LIBIPT=
14937 LTLIBIPT=
14938 INCIPT=
14939 rpathdirs=
14940 ltrpathdirs=
14941 names_already_handled=
14942 names_next_round='ipt '
14943 while test -n "$names_next_round"; do
14944 names_this_round="$names_next_round"
14945 names_next_round=
14946 for name in $names_this_round; do
14947 already_handled=
14948 for n in $names_already_handled; do
14949 if test "$n" = "$name"; then
14950 already_handled=yes
14951 break
14952 fi
14953 done
14954 if test -z "$already_handled"; then
14955 names_already_handled="$names_already_handled $name"
14956 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14957 eval value=\"\$HAVE_LIB$uppername\"
14958 if test -n "$value"; then
14959 if test "$value" = yes; then
14960 eval value=\"\$LIB$uppername\"
14961 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14962 eval value=\"\$LTLIB$uppername\"
14963 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14964 else
14965 :
14966 fi
14967 else
14968 found_dir=
14969 found_la=
14970 found_so=
14971 found_a=
14972 if test $use_additional = yes; then
14973 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14974 found_dir="$additional_libdir"
14975 found_so="$additional_libdir/lib$name.$shlibext"
14976 if test -f "$additional_libdir/lib$name.la"; then
14977 found_la="$additional_libdir/lib$name.la"
14978 fi
14979 elif test x$lib_type != xshared; then
14980 if test -f "$additional_libdir/lib$name.$libext"; then
14981 found_dir="$additional_libdir"
14982 found_a="$additional_libdir/lib$name.$libext"
14983 if test -f "$additional_libdir/lib$name.la"; then
14984 found_la="$additional_libdir/lib$name.la"
14985 fi
14986 fi
14987 fi
14988 fi
14989 if test "X$found_dir" = "X"; then
14990 for x in $LDFLAGS $LTLIBIPT; do
14991
14992 acl_save_prefix="$prefix"
14993 prefix="$acl_final_prefix"
14994 acl_save_exec_prefix="$exec_prefix"
14995 exec_prefix="$acl_final_exec_prefix"
14996 eval x=\"$x\"
14997 exec_prefix="$acl_save_exec_prefix"
14998 prefix="$acl_save_prefix"
14999
15000 case "$x" in
15001 -L*)
15002 dir=`echo "X$x" | sed -e 's/^X-L//'`
15003 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
15004 found_dir="$dir"
15005 found_so="$dir/lib$name.$shlibext"
15006 if test -f "$dir/lib$name.la"; then
15007 found_la="$dir/lib$name.la"
15008 fi
15009 elif test x$lib_type != xshared; then
15010 if test -f "$dir/lib$name.$libext"; then
15011 found_dir="$dir"
15012 found_a="$dir/lib$name.$libext"
15013 if test -f "$dir/lib$name.la"; then
15014 found_la="$dir/lib$name.la"
15015 fi
15016 fi
15017 fi
15018 ;;
15019 esac
15020 if test "X$found_dir" != "X"; then
15021 break
15022 fi
15023 done
15024 fi
15025 if test "X$found_dir" != "X"; then
15026 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
15027 if test "X$found_so" != "X"; then
15028 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
15029 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15030 else
15031 haveit=
15032 for x in $ltrpathdirs; do
15033 if test "X$x" = "X$found_dir"; then
15034 haveit=yes
15035 break
15036 fi
15037 done
15038 if test -z "$haveit"; then
15039 ltrpathdirs="$ltrpathdirs $found_dir"
15040 fi
15041 if test "$hardcode_direct" = yes; then
15042 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15043 else
15044 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15045 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15046 haveit=
15047 for x in $rpathdirs; do
15048 if test "X$x" = "X$found_dir"; then
15049 haveit=yes
15050 break
15051 fi
15052 done
15053 if test -z "$haveit"; then
15054 rpathdirs="$rpathdirs $found_dir"
15055 fi
15056 else
15057 haveit=
15058 for x in $LDFLAGS $LIBIPT; do
15059
15060 acl_save_prefix="$prefix"
15061 prefix="$acl_final_prefix"
15062 acl_save_exec_prefix="$exec_prefix"
15063 exec_prefix="$acl_final_exec_prefix"
15064 eval x=\"$x\"
15065 exec_prefix="$acl_save_exec_prefix"
15066 prefix="$acl_save_prefix"
15067
15068 if test "X$x" = "X-L$found_dir"; then
15069 haveit=yes
15070 break
15071 fi
15072 done
15073 if test -z "$haveit"; then
15074 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
15075 fi
15076 if test "$hardcode_minus_L" != no; then
15077 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15078 else
15079 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15080 fi
15081 fi
15082 fi
15083 fi
15084 else
15085 if test "X$found_a" != "X"; then
15086 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
15087 else
15088 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
15089 fi
15090 fi
15091 additional_includedir=
15092 case "$found_dir" in
15093 */lib | */lib/)
15094 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15095 additional_includedir="$basedir/include"
15096 ;;
15097 esac
15098 if test "X$additional_includedir" != "X"; then
15099 if test "X$additional_includedir" != "X/usr/include"; then
15100 haveit=
15101 if test "X$additional_includedir" = "X/usr/local/include"; then
15102 if test -n "$GCC"; then
15103 case $host_os in
15104 linux*) haveit=yes;;
15105 esac
15106 fi
15107 fi
15108 if test -z "$haveit"; then
15109 for x in $CPPFLAGS $INCIPT; do
15110
15111 acl_save_prefix="$prefix"
15112 prefix="$acl_final_prefix"
15113 acl_save_exec_prefix="$exec_prefix"
15114 exec_prefix="$acl_final_exec_prefix"
15115 eval x=\"$x\"
15116 exec_prefix="$acl_save_exec_prefix"
15117 prefix="$acl_save_prefix"
15118
15119 if test "X$x" = "X-I$additional_includedir"; then
15120 haveit=yes
15121 break
15122 fi
15123 done
15124 if test -z "$haveit"; then
15125 if test -d "$additional_includedir"; then
15126 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
15127 fi
15128 fi
15129 fi
15130 fi
15131 fi
15132 if test -n "$found_la"; then
15133 save_libdir="$libdir"
15134 case "$found_la" in
15135 */* | *\\*) . "$found_la" ;;
15136 *) . "./$found_la" ;;
15137 esac
15138 libdir="$save_libdir"
15139 for dep in $dependency_libs; do
15140 case "$dep" in
15141 -L*)
15142 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15143 if test "X$additional_libdir" != "X/usr/lib"; then
15144 haveit=
15145 if test "X$additional_libdir" = "X/usr/local/lib"; then
15146 if test -n "$GCC"; then
15147 case $host_os in
15148 linux*) haveit=yes;;
15149 esac
15150 fi
15151 fi
15152 if test -z "$haveit"; then
15153 haveit=
15154 for x in $LDFLAGS $LIBIPT; do
15155
15156 acl_save_prefix="$prefix"
15157 prefix="$acl_final_prefix"
15158 acl_save_exec_prefix="$exec_prefix"
15159 exec_prefix="$acl_final_exec_prefix"
15160 eval x=\"$x\"
15161 exec_prefix="$acl_save_exec_prefix"
15162 prefix="$acl_save_prefix"
15163
15164 if test "X$x" = "X-L$additional_libdir"; then
15165 haveit=yes
15166 break
15167 fi
15168 done
15169 if test -z "$haveit"; then
15170 if test -d "$additional_libdir"; then
15171 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
15172 fi
15173 fi
15174 haveit=
15175 for x in $LDFLAGS $LTLIBIPT; do
15176
15177 acl_save_prefix="$prefix"
15178 prefix="$acl_final_prefix"
15179 acl_save_exec_prefix="$exec_prefix"
15180 exec_prefix="$acl_final_exec_prefix"
15181 eval x=\"$x\"
15182 exec_prefix="$acl_save_exec_prefix"
15183 prefix="$acl_save_prefix"
15184
15185 if test "X$x" = "X-L$additional_libdir"; then
15186 haveit=yes
15187 break
15188 fi
15189 done
15190 if test -z "$haveit"; then
15191 if test -d "$additional_libdir"; then
15192 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
15193 fi
15194 fi
15195 fi
15196 fi
15197 ;;
15198 -R*)
15199 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15200 if test "$enable_rpath" != no; then
15201 haveit=
15202 for x in $rpathdirs; do
15203 if test "X$x" = "X$dir"; then
15204 haveit=yes
15205 break
15206 fi
15207 done
15208 if test -z "$haveit"; then
15209 rpathdirs="$rpathdirs $dir"
15210 fi
15211 haveit=
15212 for x in $ltrpathdirs; do
15213 if test "X$x" = "X$dir"; then
15214 haveit=yes
15215 break
15216 fi
15217 done
15218 if test -z "$haveit"; then
15219 ltrpathdirs="$ltrpathdirs $dir"
15220 fi
15221 fi
15222 ;;
15223 -l*)
15224 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15225 ;;
15226 *.la)
15227 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15228 ;;
15229 *)
15230 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
15231 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
15232 ;;
15233 esac
15234 done
15235 fi
15236 else
15237 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
15238 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15239 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
15240 else
15241 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
15242 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
15243 fi
15244 fi
15245 fi
15246 fi
15247 done
15248 done
15249 if test "X$rpathdirs" != "X"; then
15250 if test -n "$hardcode_libdir_separator"; then
15251 alldirs=
15252 for found_dir in $rpathdirs; do
15253 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15254 done
15255 acl_save_libdir="$libdir"
15256 libdir="$alldirs"
15257 eval flag=\"$hardcode_libdir_flag_spec\"
15258 libdir="$acl_save_libdir"
15259 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15260 else
15261 for found_dir in $rpathdirs; do
15262 acl_save_libdir="$libdir"
15263 libdir="$found_dir"
15264 eval flag=\"$hardcode_libdir_flag_spec\"
15265 libdir="$acl_save_libdir"
15266 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15267 done
15268 fi
15269 fi
15270 if test "X$ltrpathdirs" != "X"; then
15271 for found_dir in $ltrpathdirs; do
15272 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
15273 done
15274 fi
15275
15276
15277 ac_save_CPPFLAGS="$CPPFLAGS"
15278
15279 for element in $INCIPT; do
15280 haveit=
15281 for x in $CPPFLAGS; do
15282
15283 acl_save_prefix="$prefix"
15284 prefix="$acl_final_prefix"
15285 acl_save_exec_prefix="$exec_prefix"
15286 exec_prefix="$acl_final_exec_prefix"
15287 eval x=\"$x\"
15288 exec_prefix="$acl_save_exec_prefix"
15289 prefix="$acl_save_prefix"
15290
15291 if test "X$x" = "X$element"; then
15292 haveit=yes
15293 break
15294 fi
15295 done
15296 if test -z "$haveit"; then
15297 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15298 fi
15299 done
15300
15301
15302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
15303 $as_echo_n "checking for libipt... " >&6; }
15304 if ${ac_cv_libipt+:} false; then :
15305 $as_echo_n "(cached) " >&6
15306 else
15307
15308 ac_save_LIBS="$LIBS"
15309 LIBS="$LIBS $LIBIPT"
15310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15311 /* end confdefs.h. */
15312 #include "intel-pt.h"
15313 int
15314 main ()
15315 {
15316 pt_insn_alloc_decoder (0);
15317 ;
15318 return 0;
15319 }
15320 _ACEOF
15321 if ac_fn_c_try_link "$LINENO"; then :
15322 ac_cv_libipt=yes
15323 else
15324 ac_cv_libipt=no
15325 fi
15326 rm -f core conftest.err conftest.$ac_objext \
15327 conftest$ac_exeext conftest.$ac_ext
15328 LIBS="$ac_save_LIBS"
15329
15330 fi
15331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
15332 $as_echo "$ac_cv_libipt" >&6; }
15333 if test "$ac_cv_libipt" = yes; then
15334 HAVE_LIBIPT=yes
15335
15336 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
15337
15338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
15339 $as_echo_n "checking how to link with libipt... " >&6; }
15340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
15341 $as_echo "$LIBIPT" >&6; }
15342 else
15343 HAVE_LIBIPT=no
15344 CPPFLAGS="$ac_save_CPPFLAGS"
15345 LIBIPT=
15346 LTLIBIPT=
15347 fi
15348
15349
15350
15351
15352
15353
15354 if test "$HAVE_LIBIPT" != yes; then
15355 if test "$with_intel_pt" = yes; then
15356 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
15357 else
15358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
15359 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
15360 fi
15361 else
15362 save_LIBS=$LIBS
15363 LIBS="$LIBS $LIBIPT"
15364 for ac_func in pt_insn_event
15365 do :
15366 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
15367 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
15368 cat >>confdefs.h <<_ACEOF
15369 #define HAVE_PT_INSN_EVENT 1
15370 _ACEOF
15371
15372 fi
15373 done
15374
15375 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
15376 "
15377 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
15378
15379 cat >>confdefs.h <<_ACEOF
15380 #define HAVE_STRUCT_PT_INSN_ENABLED 1
15381 _ACEOF
15382
15383
15384 fi
15385 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
15386 "
15387 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
15388
15389 cat >>confdefs.h <<_ACEOF
15390 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
15391 _ACEOF
15392
15393
15394 fi
15395
15396 LIBS=$save_LIBS
15397 fi
15398 fi
15399
15400 # Check if the compiler and runtime support printing long longs.
15401
15402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15403 $as_echo_n "checking for long long support in printf... " >&6; }
15404 if ${gdb_cv_printf_has_long_long+:} false; then :
15405 $as_echo_n "(cached) " >&6
15406 else
15407 if test "$cross_compiling" = yes; then :
15408 gdb_cv_printf_has_long_long=no
15409 else
15410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15411 /* end confdefs.h. */
15412 $ac_includes_default
15413 int
15414 main ()
15415 {
15416 char buf[32];
15417 long long l = 0;
15418 l = (l << 16) + 0x0123;
15419 l = (l << 16) + 0x4567;
15420 l = (l << 16) + 0x89ab;
15421 l = (l << 16) + 0xcdef;
15422 sprintf (buf, "0x%016llx", l);
15423 return (strcmp ("0x0123456789abcdef", buf));
15424 ;
15425 return 0;
15426 }
15427 _ACEOF
15428 if ac_fn_c_try_run "$LINENO"; then :
15429 gdb_cv_printf_has_long_long=yes
15430 else
15431 gdb_cv_printf_has_long_long=no
15432 fi
15433 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15434 conftest.$ac_objext conftest.beam conftest.$ac_ext
15435 fi
15436
15437 fi
15438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15439 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15440 if test "$gdb_cv_printf_has_long_long" = yes; then
15441
15442 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15443
15444 fi
15445
15446
15447 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15448
15449 for ac_header in sys/procfs.h
15450 do :
15451 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
15452 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
15453 cat >>confdefs.h <<_ACEOF
15454 #define HAVE_SYS_PROCFS_H 1
15455 _ACEOF
15456
15457 fi
15458
15459 done
15460
15461 if test "$ac_cv_header_sys_procfs_h" = yes; then
15462
15463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15464 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15465 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
15466 $as_echo_n "(cached) " >&6
15467 else
15468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15469 /* end confdefs.h. */
15470
15471 #define _SYSCALL32
15472 #include <sys/procfs.h>
15473 int
15474 main ()
15475 {
15476 gregset_t avar
15477 ;
15478 return 0;
15479 }
15480 _ACEOF
15481 if ac_fn_c_try_compile "$LINENO"; then :
15482 bfd_cv_have_sys_procfs_type_gregset_t=yes
15483 else
15484 bfd_cv_have_sys_procfs_type_gregset_t=no
15485
15486 fi
15487 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15488 fi
15489
15490 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
15491
15492 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
15493
15494 fi
15495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15496 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
15497
15498
15499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15500 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15501 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
15502 $as_echo_n "(cached) " >&6
15503 else
15504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15505 /* end confdefs.h. */
15506
15507 #define _SYSCALL32
15508 #include <sys/procfs.h>
15509 int
15510 main ()
15511 {
15512 fpregset_t avar
15513 ;
15514 return 0;
15515 }
15516 _ACEOF
15517 if ac_fn_c_try_compile "$LINENO"; then :
15518 bfd_cv_have_sys_procfs_type_fpregset_t=yes
15519 else
15520 bfd_cv_have_sys_procfs_type_fpregset_t=no
15521
15522 fi
15523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15524 fi
15525
15526 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
15527
15528 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
15529
15530 fi
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15532 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
15533
15534
15535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15536 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15537 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
15538 $as_echo_n "(cached) " >&6
15539 else
15540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15541 /* end confdefs.h. */
15542
15543 #define _SYSCALL32
15544 #include <sys/procfs.h>
15545 int
15546 main ()
15547 {
15548 prgregset_t avar
15549 ;
15550 return 0;
15551 }
15552 _ACEOF
15553 if ac_fn_c_try_compile "$LINENO"; then :
15554 bfd_cv_have_sys_procfs_type_prgregset_t=yes
15555 else
15556 bfd_cv_have_sys_procfs_type_prgregset_t=no
15557
15558 fi
15559 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15560 fi
15561
15562 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
15563
15564 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15565
15566 fi
15567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15568 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15569
15570
15571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15572 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15573 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
15574 $as_echo_n "(cached) " >&6
15575 else
15576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15577 /* end confdefs.h. */
15578
15579 #define _SYSCALL32
15580 #include <sys/procfs.h>
15581 int
15582 main ()
15583 {
15584 prfpregset_t avar
15585 ;
15586 return 0;
15587 }
15588 _ACEOF
15589 if ac_fn_c_try_compile "$LINENO"; then :
15590 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
15591 else
15592 bfd_cv_have_sys_procfs_type_prfpregset_t=no
15593
15594 fi
15595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15596 fi
15597
15598 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15599
15600 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15601
15602 fi
15603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15604 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15605
15606
15607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15608 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15609 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15610 $as_echo_n "(cached) " >&6
15611 else
15612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15613 /* end confdefs.h. */
15614
15615 #define _SYSCALL32
15616 #include <sys/procfs.h>
15617 int
15618 main ()
15619 {
15620 prgregset32_t avar
15621 ;
15622 return 0;
15623 }
15624 _ACEOF
15625 if ac_fn_c_try_compile "$LINENO"; then :
15626 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15627 else
15628 bfd_cv_have_sys_procfs_type_prgregset32_t=no
15629
15630 fi
15631 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15632 fi
15633
15634 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15635
15636 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15637
15638 fi
15639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15640 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15641
15642
15643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15644 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15645 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15646 $as_echo_n "(cached) " >&6
15647 else
15648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15649 /* end confdefs.h. */
15650
15651 #define _SYSCALL32
15652 #include <sys/procfs.h>
15653 int
15654 main ()
15655 {
15656 lwpid_t avar
15657 ;
15658 return 0;
15659 }
15660 _ACEOF
15661 if ac_fn_c_try_compile "$LINENO"; then :
15662 bfd_cv_have_sys_procfs_type_lwpid_t=yes
15663 else
15664 bfd_cv_have_sys_procfs_type_lwpid_t=no
15665
15666 fi
15667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15668 fi
15669
15670 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15671
15672 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15673
15674 fi
15675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15676 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15677
15678
15679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15680 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15681 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15682 $as_echo_n "(cached) " >&6
15683 else
15684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15685 /* end confdefs.h. */
15686
15687 #define _SYSCALL32
15688 #include <sys/procfs.h>
15689 int
15690 main ()
15691 {
15692 psaddr_t avar
15693 ;
15694 return 0;
15695 }
15696 _ACEOF
15697 if ac_fn_c_try_compile "$LINENO"; then :
15698 bfd_cv_have_sys_procfs_type_psaddr_t=yes
15699 else
15700 bfd_cv_have_sys_procfs_type_psaddr_t=no
15701
15702 fi
15703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15704 fi
15705
15706 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15707
15708 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15709
15710 fi
15711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15712 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15713
15714
15715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15716 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15717 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15718 $as_echo_n "(cached) " >&6
15719 else
15720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15721 /* end confdefs.h. */
15722
15723 #define _SYSCALL32
15724 #include <sys/procfs.h>
15725 int
15726 main ()
15727 {
15728 elf_fpregset_t avar
15729 ;
15730 return 0;
15731 }
15732 _ACEOF
15733 if ac_fn_c_try_compile "$LINENO"; then :
15734 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15735 else
15736 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15737
15738 fi
15739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15740 fi
15741
15742 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15743
15744 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15745
15746 fi
15747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15748 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15749
15750 fi
15751
15752
15753 # Check the return and argument types of ptrace.
15754
15755
15756 for ac_header in sys/ptrace.h ptrace.h
15757 do :
15758 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15759 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15760 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15761 cat >>confdefs.h <<_ACEOF
15762 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15763 _ACEOF
15764
15765 fi
15766
15767 done
15768
15769
15770 gdb_ptrace_headers='
15771 #include <sys/types.h>
15772 #if HAVE_SYS_PTRACE_H
15773 # include <sys/ptrace.h>
15774 #endif
15775 #if HAVE_UNISTD_H
15776 # include <unistd.h>
15777 #endif
15778 '
15779
15780 # Check return type. Varargs (used on GNU/Linux) conflict with the
15781 # empty argument list, so check for that explicitly.
15782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15783 $as_echo_n "checking return type of ptrace... " >&6; }
15784 if ${gdb_cv_func_ptrace_ret+:} false; then :
15785 $as_echo_n "(cached) " >&6
15786 else
15787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15788 /* end confdefs.h. */
15789  $gdb_ptrace_headers
15790 int
15791 main ()
15792 {
15793 extern long ptrace (enum __ptrace_request, ...);
15794
15795 ;
15796 return 0;
15797 }
15798 _ACEOF
15799 if ac_fn_c_try_compile "$LINENO"; then :
15800 gdb_cv_func_ptrace_ret='long'
15801 else
15802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15803 /* end confdefs.h. */
15804 $gdb_ptrace_headers
15805 int
15806 main ()
15807 {
15808 extern int ptrace ();
15809
15810 ;
15811 return 0;
15812 }
15813 _ACEOF
15814 if ac_fn_c_try_compile "$LINENO"; then :
15815 gdb_cv_func_ptrace_ret='int'
15816 else
15817 gdb_cv_func_ptrace_ret='long'
15818
15819 fi
15820 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15821
15822 fi
15823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15824
15825 fi
15826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15827 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15828
15829
15830 cat >>confdefs.h <<_ACEOF
15831 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15832 _ACEOF
15833
15834
15835 # Check argument types.
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15837 $as_echo_n "checking types of arguments for ptrace... " >&6; }
15838 if ${gdb_cv_func_ptrace_args+:} false; then :
15839 $as_echo_n "(cached) " >&6
15840 else
15841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15842 /* end confdefs.h. */
15843 $gdb_ptrace_headers
15844 int
15845 main ()
15846 {
15847 extern long ptrace (enum __ptrace_request, ...);
15848
15849 ;
15850 return 0;
15851 }
15852 _ACEOF
15853 if ac_fn_c_try_compile "$LINENO"; then :
15854 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15855 else
15856 for gdb_arg1 in 'int' 'long'; do
15857 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15858 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15859 for gdb_arg4 in 'int' 'long' 'void *'; do
15860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15861 /* end confdefs.h. */
15862 $gdb_ptrace_headers
15863 int
15864 main ()
15865 {
15866 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15867
15868 ;
15869 return 0;
15870 }
15871 _ACEOF
15872 if ac_fn_c_try_compile "$LINENO"; then :
15873 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15874 break 4;
15875
15876 fi
15877 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15878
15879 for gdb_arg5 in 'int *' 'int' 'long'; do
15880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15881 /* end confdefs.h. */
15882 $gdb_ptrace_headers
15883 int
15884 main ()
15885 {
15886 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15887
15888 ;
15889 return 0;
15890 }
15891 _ACEOF
15892 if ac_fn_c_try_compile "$LINENO"; then :
15893 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15894 break 5;
15895
15896 fi
15897 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15898 done
15899 done
15900 done
15901 done
15902 done
15903 # Provide a safe default value.
15904 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15905
15906 fi
15907 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15908
15909 fi
15910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15911 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15912
15913 ac_save_IFS=$IFS; IFS=','
15914 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15915 IFS=$ac_save_IFS
15916 shift
15917
15918 cat >>confdefs.h <<_ACEOF
15919 #define PTRACE_TYPE_ARG1 $1
15920 _ACEOF
15921
15922
15923 cat >>confdefs.h <<_ACEOF
15924 #define PTRACE_TYPE_ARG3 $3
15925 _ACEOF
15926
15927
15928 cat >>confdefs.h <<_ACEOF
15929 #define PTRACE_TYPE_ARG4 $4
15930 _ACEOF
15931
15932 if test -n "$5"; then
15933
15934 cat >>confdefs.h <<_ACEOF
15935 #define PTRACE_TYPE_ARG5 $5
15936 _ACEOF
15937
15938 fi
15939
15940
15941 if test "$cross_compiling" = no; then
15942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15943 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15944 if ${ac_cv_func_setpgrp_void+:} false; then :
15945 $as_echo_n "(cached) " >&6
15946 else
15947 if test "$cross_compiling" = yes; then :
15948 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15949 else
15950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15951 /* end confdefs.h. */
15952 $ac_includes_default
15953 int
15954 main ()
15955 {
15956 /* If this system has a BSD-style setpgrp which takes arguments,
15957 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15958 exit successfully. */
15959 return setpgrp (1,1) != -1;
15960 ;
15961 return 0;
15962 }
15963 _ACEOF
15964 if ac_fn_c_try_run "$LINENO"; then :
15965 ac_cv_func_setpgrp_void=no
15966 else
15967 ac_cv_func_setpgrp_void=yes
15968 fi
15969 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15970 conftest.$ac_objext conftest.beam conftest.$ac_ext
15971 fi
15972
15973 fi
15974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15975 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15976 if test $ac_cv_func_setpgrp_void = yes; then
15977
15978 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15979
15980 fi
15981
15982 else
15983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15984 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15985 if ${ac_cv_func_setpgrp_void+:} false; then :
15986 $as_echo_n "(cached) " >&6
15987 else
15988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15989 /* end confdefs.h. */
15990 #include <unistd.h>
15991 int
15992 main ()
15993 {
15994 if (setpgrp(1,1) == -1)
15995 exit (0);
15996 else
15997 exit (1);
15998
15999 ;
16000 return 0;
16001 }
16002 _ACEOF
16003 if ac_fn_c_try_compile "$LINENO"; then :
16004 ac_cv_func_setpgrp_void=no
16005 else
16006 ac_cv_func_setpgrp_void=yes
16007
16008 fi
16009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16010
16011 fi
16012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
16013 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
16014 if test "$ac_cv_func_setpgrp_void" = yes; then
16015 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
16016
16017 fi
16018 fi
16019
16020 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
16021 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
16022 #include <sys/proc.h>
16023
16024 "
16025 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
16026
16027 cat >>confdefs.h <<_ACEOF
16028 #define HAVE_STRUCT_THREAD_TD_PCB 1
16029 _ACEOF
16030
16031
16032 fi
16033
16034
16035 # See if <sys/lwp.h> defines `struct lwp`.
16036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
16037 $as_echo_n "checking for struct lwp... " >&6; }
16038 if ${gdb_cv_struct_lwp+:} false; then :
16039 $as_echo_n "(cached) " >&6
16040 else
16041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16042 /* end confdefs.h. */
16043 #include <sys/param.h>
16044 #define _KMEMUSER
16045 #include <sys/lwp.h>
16046 int
16047 main ()
16048 {
16049 struct lwp l;
16050
16051 ;
16052 return 0;
16053 }
16054 _ACEOF
16055 if ac_fn_c_try_compile "$LINENO"; then :
16056 gdb_cv_struct_lwp=yes
16057 else
16058 gdb_cv_struct_lwp=no
16059
16060 fi
16061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16062
16063 fi
16064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
16065 $as_echo "$gdb_cv_struct_lwp" >&6; }
16066 if test "$gdb_cv_struct_lwp" = yes; then
16067
16068 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
16069
16070 fi
16071
16072 # See if <machine/reg.h> degines `struct reg'.
16073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
16074 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
16075 if ${gdb_cv_struct_reg+:} false; then :
16076 $as_echo_n "(cached) " >&6
16077 else
16078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16079 /* end confdefs.h. */
16080 #include <sys/types.h>
16081 #include <machine/reg.h>
16082 int
16083 main ()
16084 {
16085 struct reg r;
16086
16087 ;
16088 return 0;
16089 }
16090 _ACEOF
16091 if ac_fn_c_try_compile "$LINENO"; then :
16092 gdb_cv_struct_reg=yes
16093 else
16094 gdb_cv_struct_reg=no
16095
16096 fi
16097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16098
16099 fi
16100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
16101 $as_echo "$gdb_cv_struct_reg" >&6; }
16102 if test "$gdb_cv_struct_reg" = yes; then
16103
16104 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
16105
16106 fi
16107
16108 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16109 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
16110 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
16111 #include <machine/reg.h>
16112 "
16113 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
16114
16115 cat >>confdefs.h <<_ACEOF
16116 #define HAVE_STRUCT_REG_R_FS 1
16117 _ACEOF
16118
16119
16120 fi
16121 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
16122 #include <machine/reg.h>
16123 "
16124 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
16125
16126 cat >>confdefs.h <<_ACEOF
16127 #define HAVE_STRUCT_REG_R_GS 1
16128 _ACEOF
16129
16130
16131 fi
16132
16133
16134 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
16135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
16136 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
16137 if ${gdb_cv_have_ptrace_getregs+:} false; then :
16138 $as_echo_n "(cached) " >&6
16139 else
16140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16141 /* end confdefs.h. */
16142 #include <sys/ptrace.h>
16143 int
16144 main ()
16145 {
16146 PTRACE_GETREGS;
16147 ;
16148 return 0;
16149 }
16150 _ACEOF
16151 if ac_fn_c_try_compile "$LINENO"; then :
16152 gdb_cv_have_ptrace_getregs=yes
16153 else
16154 gdb_cv_have_ptrace_getregs=no
16155
16156 fi
16157 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16158
16159 fi
16160
16161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
16162 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
16163 if test "$gdb_cv_have_ptrace_getregs" = yes; then
16164
16165 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
16166
16167 fi
16168
16169 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
16171 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
16172 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
16173 $as_echo_n "(cached) " >&6
16174 else
16175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176 /* end confdefs.h. */
16177 #include <sys/ptrace.h>
16178 int
16179 main ()
16180 {
16181 PTRACE_GETFPXREGS;
16182 ;
16183 return 0;
16184 }
16185 _ACEOF
16186 if ac_fn_c_try_compile "$LINENO"; then :
16187 gdb_cv_have_ptrace_getfpxregs=yes
16188 else
16189 gdb_cv_have_ptrace_getfpxregs=no
16190
16191 fi
16192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16193
16194 fi
16195
16196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16197 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
16198 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
16199
16200 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
16201
16202 fi
16203
16204 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
16205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
16206 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
16207 if ${gdb_cv_have_pt_getdbregs+:} false; then :
16208 $as_echo_n "(cached) " >&6
16209 else
16210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16211 /* end confdefs.h. */
16212 #include <sys/types.h>
16213 #include <sys/ptrace.h>
16214 int
16215 main ()
16216 {
16217 PT_GETDBREGS;
16218
16219 ;
16220 return 0;
16221 }
16222 _ACEOF
16223 if ac_fn_c_try_compile "$LINENO"; then :
16224 gdb_cv_have_pt_getdbregs=yes
16225 else
16226 gdb_cv_have_pt_getdbregs=no
16227
16228 fi
16229 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16230
16231 fi
16232
16233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
16234 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
16235 if test "$gdb_cv_have_pt_getdbregs" = yes; then
16236
16237 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
16238
16239 fi
16240
16241 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
16242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
16243 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
16244 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
16245 $as_echo_n "(cached) " >&6
16246 else
16247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16248 /* end confdefs.h. */
16249 #include <sys/types.h>
16250 #include <sys/ptrace.h>
16251 int
16252 main ()
16253 {
16254 PT_GETXMMREGS;
16255
16256 ;
16257 return 0;
16258 }
16259 _ACEOF
16260 if ac_fn_c_try_compile "$LINENO"; then :
16261 gdb_cv_have_pt_getxmmregs=yes
16262 else
16263 gdb_cv_have_pt_getxmmregs=no
16264
16265 fi
16266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16267
16268 fi
16269
16270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
16271 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
16272 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
16273
16274 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
16275
16276 fi
16277
16278 # See if <sys/ptrace.h> supports LWP names on FreeBSD
16279 # Older FreeBSD versions don't have the pl_tdname member of
16280 # `struct ptrace_lwpinfo'.
16281 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
16282 "
16283 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
16284
16285 cat >>confdefs.h <<_ACEOF
16286 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
16287 _ACEOF
16288
16289
16290 fi
16291
16292
16293 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
16294 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
16295 # FreeBSD 10.3.
16296 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>
16297 "
16298 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
16299
16300 cat >>confdefs.h <<_ACEOF
16301 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
16302 _ACEOF
16303
16304
16305 fi
16306
16307
16308 # Check if the compiler supports the `long long' type.
16309
16310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
16311 $as_echo_n "checking for long long support in compiler... " >&6; }
16312 if ${gdb_cv_c_long_long+:} false; then :
16313 $as_echo_n "(cached) " >&6
16314 else
16315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16316 /* end confdefs.h. */
16317 extern long long foo;
16318 int
16319 main ()
16320 {
16321 switch (foo & 2) { case 0: return 1; }
16322 ;
16323 return 0;
16324 }
16325 _ACEOF
16326 if ac_fn_c_try_compile "$LINENO"; then :
16327 gdb_cv_c_long_long=yes
16328 else
16329 gdb_cv_c_long_long=no
16330 fi
16331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16332 fi
16333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
16334 $as_echo "$gdb_cv_c_long_long" >&6; }
16335 if test "$gdb_cv_c_long_long" != yes; then
16336 # libdecnumber requires long long.
16337 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
16338 fi
16339
16340 # Check if the compiler and runtime support printing decfloats.
16341
16342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
16343 $as_echo_n "checking for decfloat support in printf... " >&6; }
16344 if ${gdb_cv_printf_has_decfloat+:} false; then :
16345 $as_echo_n "(cached) " >&6
16346 else
16347 if test "$cross_compiling" = yes; then :
16348 gdb_cv_printf_has_decfloat=no
16349 else
16350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351 /* end confdefs.h. */
16352 $ac_includes_default
16353 int
16354 main ()
16355 {
16356 char buf[64];
16357 _Decimal32 d32 = 1.2345df;
16358 _Decimal64 d64 = 1.2345dd;
16359 _Decimal128 d128 = 1.2345dl;
16360 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
16361 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
16362 ;
16363 return 0;
16364 }
16365 _ACEOF
16366 if ac_fn_c_try_run "$LINENO"; then :
16367 gdb_cv_printf_has_decfloat=yes
16368 else
16369 gdb_cv_printf_has_decfloat=no
16370 fi
16371 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16372 conftest.$ac_objext conftest.beam conftest.$ac_ext
16373 fi
16374
16375 fi
16376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
16377 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
16378 if test "$gdb_cv_printf_has_decfloat" = yes; then
16379
16380 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
16381
16382 fi
16383
16384 # Check if the compiler supports the `long double' type. We can't use
16385 # AC_C_LONG_DOUBLE because that one does additional checks on the
16386 # constants defined in <float.h> that fail on some systems,
16387 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
16388
16389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
16390 $as_echo_n "checking for long double support in compiler... " >&6; }
16391 if ${gdb_cv_c_long_double+:} false; then :
16392 $as_echo_n "(cached) " >&6
16393 else
16394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16395 /* end confdefs.h. */
16396 long double foo;
16397 _ACEOF
16398 if ac_fn_c_try_compile "$LINENO"; then :
16399 gdb_cv_c_long_double=yes
16400 else
16401 gdb_cv_c_long_double=no
16402 fi
16403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16404 fi
16405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
16406 $as_echo "$gdb_cv_c_long_double" >&6; }
16407 if test "$gdb_cv_c_long_double" = yes; then
16408
16409 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16410
16411 fi
16412
16413 # Check if the compiler and runtime support printing long doubles.
16414
16415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
16416 $as_echo_n "checking for long double support in printf... " >&6; }
16417 if ${gdb_cv_printf_has_long_double+:} false; then :
16418 $as_echo_n "(cached) " >&6
16419 else
16420 if test "$cross_compiling" = yes; then :
16421 gdb_cv_printf_has_long_double=no
16422 else
16423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16424 /* end confdefs.h. */
16425 $ac_includes_default
16426 int
16427 main ()
16428 {
16429 char buf[16];
16430 long double f = 3.141592653;
16431 sprintf (buf, "%Lg", f);
16432 return (strncmp ("3.14159", buf, 7));
16433 ;
16434 return 0;
16435 }
16436 _ACEOF
16437 if ac_fn_c_try_run "$LINENO"; then :
16438 gdb_cv_printf_has_long_double=yes
16439 else
16440 gdb_cv_printf_has_long_double=no
16441 fi
16442 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16443 conftest.$ac_objext conftest.beam conftest.$ac_ext
16444 fi
16445
16446 fi
16447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
16448 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
16449 if test "$gdb_cv_printf_has_long_double" = yes; then
16450
16451 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
16452
16453 fi
16454
16455 # Check if the compiler and runtime support scanning long doubles.
16456
16457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
16458 $as_echo_n "checking for long double support in scanf... " >&6; }
16459 if ${gdb_cv_scanf_has_long_double+:} false; then :
16460 $as_echo_n "(cached) " >&6
16461 else
16462 if test "$cross_compiling" = yes; then :
16463 gdb_cv_scanf_has_long_double=no
16464 else
16465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16466 /* end confdefs.h. */
16467 #include <stdio.h>
16468 int
16469 main ()
16470 {
16471 char *buf = "3.141592653";
16472 long double f = 0;
16473 sscanf (buf, "%Lg", &f);
16474 return !(f > 3.14159 && f < 3.14160);
16475 ;
16476 return 0;
16477 }
16478 _ACEOF
16479 if ac_fn_c_try_run "$LINENO"; then :
16480 gdb_cv_scanf_has_long_double=yes
16481 else
16482 gdb_cv_scanf_has_long_double=no
16483 fi
16484 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16485 conftest.$ac_objext conftest.beam conftest.$ac_ext
16486 fi
16487
16488 fi
16489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16490 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
16491 if test "$gdb_cv_scanf_has_long_double" = yes; then
16492
16493 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
16494
16495 fi
16496
16497 case ${host_os} in
16498 aix*)
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16500 $as_echo_n "checking for -bbigtoc option... " >&6; }
16501 if ${gdb_cv_bigtoc+:} false; then :
16502 $as_echo_n "(cached) " >&6
16503 else
16504 SAVE_LDFLAGS=$LDFLAGS
16505
16506 case $GCC in
16507 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16508 *) gdb_cv_bigtoc=-bbigtoc ;;
16509 esac
16510
16511 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16513 /* end confdefs.h. */
16514
16515 int
16516 main ()
16517 {
16518 int i;
16519 ;
16520 return 0;
16521 }
16522 _ACEOF
16523 if ac_fn_c_try_link "$LINENO"; then :
16524
16525 else
16526 gdb_cv_bigtoc=
16527
16528 fi
16529 rm -f core conftest.err conftest.$ac_objext \
16530 conftest$ac_exeext conftest.$ac_ext
16531 LDFLAGS="${SAVE_LDFLAGS}"
16532
16533 fi
16534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16535 $as_echo "$gdb_cv_bigtoc" >&6; }
16536 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16537 ;;
16538 esac
16539
16540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16541 $as_echo_n "checking for the dynamic export flag... " >&6; }
16542 dynamic_list=false
16543 if test "${gdb_native}" = yes; then
16544 # The dynamically loaded libthread_db needs access to symbols in the gdb
16545 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16546 # may not be supported there.
16547 old_LDFLAGS="$LDFLAGS"
16548 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16549 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16550 LDFLAGS="$LDFLAGS $RDYNAMIC"
16551 if test "${have_libpython}" = no; then
16552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16553 /* end confdefs.h. */
16554
16555 int
16556 main ()
16557 {
16558
16559 ;
16560 return 0;
16561 }
16562 _ACEOF
16563 if ac_fn_c_try_link "$LINENO"; then :
16564 dynamic_list=true
16565 fi
16566 rm -f core conftest.err conftest.$ac_objext \
16567 conftest$ac_exeext conftest.$ac_ext
16568 else
16569 # Workaround http://bugs.python.org/issue4434 where static
16570 # libpythonX.Y.a would get its symbols required for
16571 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16572 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16573
16574 # Note the workaround for Python
16575 # http://bugs.python.org/issue10112 earlier has removed
16576 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16577 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16578 # always pass.
16579 old_CFLAGS="$CFLAGS"
16580 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16581 old_LIBS="$LIBS"
16582 LIBS="$LIBS $PYTHON_LIBS"
16583 old_CPPFLAGS="$CPPFLAGS"
16584 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16585 if test "$cross_compiling" = yes; then :
16586 true
16587 else
16588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16589 /* end confdefs.h. */
16590 #include "Python.h"
16591 int
16592 main ()
16593 {
16594 int err;
16595 Py_Initialize ();
16596 err = PyRun_SimpleString ("import ctypes\n");
16597 Py_Finalize ();
16598 return err == 0 ? 0 : 1;
16599 ;
16600 return 0;
16601 }
16602 _ACEOF
16603 if ac_fn_c_try_run "$LINENO"; then :
16604 dynamic_list=true
16605 fi
16606 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16607 conftest.$ac_objext conftest.beam conftest.$ac_ext
16608 fi
16609
16610 LIBS="$old_LIBS"
16611 CFLAGS="$old_CFLAGS"
16612 CPPFLAGS="$old_CPPFLAGS"
16613 fi
16614 LDFLAGS="$old_LDFLAGS"
16615 fi
16616 if $dynamic_list; then
16617 found="-Wl,--dynamic-list"
16618 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16619 else
16620 found="-rdynamic"
16621 RDYNAMIC="-rdynamic"
16622 fi
16623
16624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16625 $as_echo "$found" >&6; }
16626
16627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether execinfo.h backtrace is available" >&5
16628 $as_echo_n "checking whether execinfo.h backtrace is available... " >&6; }
16629 if ${gdb_cv_execinfo_backtrace+:} false; then :
16630 $as_echo_n "(cached) " >&6
16631 else
16632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16633 /* end confdefs.h. */
16634
16635 #include <execinfo.h>
16636
16637 int
16638 main ()
16639 {
16640
16641 int f;
16642 void *b[2];
16643 f = backtrace (b, 2);
16644 backtrace_symbols_fd (b, f, 2);
16645
16646 ;
16647 return 0;
16648 }
16649 _ACEOF
16650 if ac_fn_c_try_link "$LINENO"; then :
16651 gdb_cv_execinfo_backtrace=yes
16652 else
16653 gdb_cv_execinfo_backtrace=no
16654 fi
16655 rm -f core conftest.err conftest.$ac_objext \
16656 conftest$ac_exeext conftest.$ac_ext
16657 fi
16658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_execinfo_backtrace" >&5
16659 $as_echo "$gdb_cv_execinfo_backtrace" >&6; }
16660 if test "$gdb_cv_execinfo_backtrace" = yes; then
16661
16662 $as_echo "#define HAVE_EXECINFO_BACKTRACE 1" >>confdefs.h
16663
16664 fi
16665
16666
16667 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16668 case ${host_os} in
16669 aix*)
16670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16671 $as_echo_n "checking for AiX thread debugging library... " >&6; }
16672 if ${gdb_cv_have_aix_thread_debug+:} false; then :
16673 $as_echo_n "(cached) " >&6
16674 else
16675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16676 /* end confdefs.h. */
16677 #include <sys/pthdebug.h>
16678 int
16679 main ()
16680 {
16681 #ifndef PTHDB_VERSION_3
16682 #error
16683 #endif
16684
16685 ;
16686 return 0;
16687 }
16688 _ACEOF
16689 if ac_fn_c_try_compile "$LINENO"; then :
16690 gdb_cv_have_aix_thread_debug=yes
16691 else
16692 gdb_cv_have_aix_thread_debug=no
16693
16694 fi
16695 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16696
16697 fi
16698
16699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16700 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16701 if test "$gdb_cv_have_aix_thread_debug" = yes; then
16702 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16703 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16704 LIBS="$LIBS -lpthdebug"
16705
16706 # Older versions of AIX do not provide the declaration for
16707 # the getthrds function (it appears that it was introduced
16708 # with AIX 6.x).
16709 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16710 "
16711 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16712 ac_have_decl=1
16713 else
16714 ac_have_decl=0
16715 fi
16716
16717 cat >>confdefs.h <<_ACEOF
16718 #define HAVE_DECL_GETTHRDS $ac_have_decl
16719 _ACEOF
16720
16721 fi
16722 ;;
16723 esac
16724
16725 fi
16726
16727 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16729 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16730 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16731 $as_echo_n "(cached) " >&6
16732 else
16733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16734 /* end confdefs.h. */
16735 #include <thread_db.h>
16736 int
16737 main ()
16738 {
16739 int i = TD_NOTALLOC;
16740
16741 ;
16742 return 0;
16743 }
16744 _ACEOF
16745 if ac_fn_c_try_compile "$LINENO"; then :
16746 gdb_cv_thread_db_h_has_td_notalloc=yes
16747 else
16748 gdb_cv_thread_db_h_has_td_notalloc=no
16749
16750 fi
16751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16752
16753 fi
16754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16755 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16756
16757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16758 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16759 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16760 $as_echo_n "(cached) " >&6
16761 else
16762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16763 /* end confdefs.h. */
16764 #include <thread_db.h>
16765 int
16766 main ()
16767 {
16768 int i = TD_VERSION;
16769
16770 ;
16771 return 0;
16772 }
16773 _ACEOF
16774 if ac_fn_c_try_compile "$LINENO"; then :
16775 gdb_cv_thread_db_h_has_td_version=yes
16776 else
16777 gdb_cv_thread_db_h_has_td_version=no
16778
16779 fi
16780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16781
16782 fi
16783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16784 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16785
16786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16787 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16788 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16789 $as_echo_n "(cached) " >&6
16790 else
16791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16792 /* end confdefs.h. */
16793 #include <thread_db.h>
16794 int
16795 main ()
16796 {
16797 int i = TD_NOTLS;
16798
16799 ;
16800 return 0;
16801 }
16802 _ACEOF
16803 if ac_fn_c_try_compile "$LINENO"; then :
16804 gdb_cv_thread_db_h_has_td_notls=yes
16805 else
16806 gdb_cv_thread_db_h_has_td_notls=no
16807
16808 fi
16809 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16810
16811 fi
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16813 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16814 fi
16815 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16816
16817 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16818
16819 fi
16820 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16821
16822 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16823
16824 fi
16825 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16826
16827 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16828
16829 fi
16830
16831 case $host_os in
16832 go32* | *djgpp*)
16833 gdbinit=gdb.ini
16834 ;;
16835 *)
16836 gdbinit=.gdbinit
16837 ;;
16838 esac
16839
16840 cat >>confdefs.h <<_ACEOF
16841 #define GDBINIT "$gdbinit"
16842 _ACEOF
16843
16844
16845
16846 cat >>confdefs.h <<_ACEOF
16847 #define GDBEARLYINIT ".gdbearlyinit"
16848 _ACEOF
16849
16850
16851
16852 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16853 # except that the argument to --with-sysroot is optional.
16854 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16855 if test "x$with_sysroot" = xyes; then
16856 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16857 fi
16858
16859 # Check whether --with-sysroot was given.
16860 if test "${with_sysroot+set}" = set; then :
16861 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16862 else
16863 TARGET_SYSTEM_ROOT=
16864 fi
16865
16866
16867 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16868 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16869 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16870 ac_define_dir=`eval echo $ac_define_dir`
16871
16872 cat >>confdefs.h <<_ACEOF
16873 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16874 _ACEOF
16875
16876
16877
16878
16879 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16880 if test "x$prefix" = xNONE; then
16881 test_prefix=/usr/local
16882 else
16883 test_prefix=$prefix
16884 fi
16885 else
16886 test_prefix=$exec_prefix
16887 fi
16888 value=0
16889 case ${ac_define_dir} in
16890 "${test_prefix}"|"${test_prefix}/"*|\
16891 '${exec_prefix}'|'${exec_prefix}/'*)
16892 value=1
16893 ;;
16894 esac
16895
16896 cat >>confdefs.h <<_ACEOF
16897 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16898 _ACEOF
16899
16900
16901
16902
16903
16904 # Check whether --with-system-gdbinit was given.
16905 if test "${with_system_gdbinit+set}" = set; then :
16906 withval=$with_system_gdbinit;
16907 SYSTEM_GDBINIT=$withval
16908 else
16909 SYSTEM_GDBINIT=
16910 fi
16911
16912
16913 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16914 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16915 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16916 ac_define_dir=`eval echo $ac_define_dir`
16917
16918 cat >>confdefs.h <<_ACEOF
16919 #define SYSTEM_GDBINIT "$ac_define_dir"
16920 _ACEOF
16921
16922
16923
16924
16925 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16926 if test "x$prefix" = xNONE; then
16927 test_prefix=/usr/local
16928 else
16929 test_prefix=$prefix
16930 fi
16931 else
16932 test_prefix=$exec_prefix
16933 fi
16934 value=0
16935 case ${ac_define_dir} in
16936 "${test_prefix}"|"${test_prefix}/"*|\
16937 '${exec_prefix}'|'${exec_prefix}/'*)
16938 value=1
16939 ;;
16940 esac
16941
16942 cat >>confdefs.h <<_ACEOF
16943 #define SYSTEM_GDBINIT_RELOCATABLE $value
16944 _ACEOF
16945
16946
16947
16948
16949
16950 # Check whether --with-system-gdbinit-dir was given.
16951 if test "${with_system_gdbinit_dir+set}" = set; then :
16952 withval=$with_system_gdbinit_dir;
16953 SYSTEM_GDBINIT_DIR=$withval
16954 else
16955 SYSTEM_GDBINIT_DIR=
16956 fi
16957
16958
16959 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16960 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16961 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16962 ac_define_dir=`eval echo $ac_define_dir`
16963
16964 cat >>confdefs.h <<_ACEOF
16965 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16966 _ACEOF
16967
16968
16969
16970
16971 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16972 if test "x$prefix" = xNONE; then
16973 test_prefix=/usr/local
16974 else
16975 test_prefix=$prefix
16976 fi
16977 else
16978 test_prefix=$exec_prefix
16979 fi
16980 value=0
16981 case ${ac_define_dir} in
16982 "${test_prefix}"|"${test_prefix}/"*|\
16983 '${exec_prefix}'|'${exec_prefix}/'*)
16984 value=1
16985 ;;
16986 esac
16987
16988 cat >>confdefs.h <<_ACEOF
16989 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16990 _ACEOF
16991
16992
16993
16994
16995
16996 # Check whether --enable-werror was given.
16997 if test "${enable_werror+set}" = set; then :
16998 enableval=$enable_werror; case "${enableval}" in
16999 yes | y) ERROR_ON_WARNING="yes" ;;
17000 no | n) ERROR_ON_WARNING="no" ;;
17001 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
17002 esac
17003 fi
17004
17005
17006 # Enable -Werror by default when using gcc. Turn it off for releases.
17007 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
17008 ERROR_ON_WARNING=yes
17009 fi
17010
17011 WERROR_CFLAGS=""
17012 if test "${ERROR_ON_WARNING}" = yes ; then
17013 WERROR_CFLAGS="-Werror"
17014 fi
17015
17016 # The options we'll try to enable.
17017 build_warnings="-Wall -Wpointer-arith \
17018 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
17019 -Wno-switch -Wno-char-subscripts \
17020 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
17021 -Wno-sign-compare -Wno-error=maybe-uninitialized \
17022 -Wno-mismatched-tags \
17023 -Wno-error=deprecated-register \
17024 -Wsuggest-override \
17025 -Wimplicit-fallthrough=3 \
17026 -Wduplicated-cond \
17027 -Wshadow=local \
17028 -Wdeprecated-copy \
17029 -Wdeprecated-copy-dtor \
17030 -Wredundant-move \
17031 -Wmissing-declarations \
17032 -Wmissing-prototypes \
17033 -Wstrict-null-sentinel \
17034 "
17035
17036 case "${host}" in
17037 *-*-mingw32*)
17038 # Enable -Wno-format by default when using gcc on mingw since many
17039 # GCC versions complain about %I64.
17040 build_warnings="$build_warnings -Wno-format" ;;
17041 *-*-solaris*)
17042 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
17043 # doesn't understand.
17044 build_warnings="$build_warnings -Wno-unknown-pragmas"
17045 # Solaris 11 <unistd.h> marks vfork deprecated.
17046 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
17047 *)
17048 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
17049 # but there's a special case for this below.
17050 build_warnings="$build_warnings -Wformat-nonliteral" ;;
17051 esac
17052
17053 # Check whether --enable-build-warnings was given.
17054 if test "${enable_build_warnings+set}" = set; then :
17055 enableval=$enable_build_warnings; case "${enableval}" in
17056 yes) ;;
17057 no) build_warnings="-w";;
17058 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17059 build_warnings="${build_warnings} ${t}";;
17060 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17061 build_warnings="${t} ${build_warnings}";;
17062 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17063 esac
17064 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17065 echo "Setting compiler warning flags = $build_warnings" 6>&1
17066 fi
17067 fi
17068 # Check whether --enable-gdb-build-warnings was given.
17069 if test "${enable_gdb_build_warnings+set}" = set; then :
17070 enableval=$enable_gdb_build_warnings; case "${enableval}" in
17071 yes) ;;
17072 no) build_warnings="-w";;
17073 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17074 build_warnings="${build_warnings} ${t}";;
17075 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17076 build_warnings="${t} ${build_warnings}";;
17077 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17078 esac
17079 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17080 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
17081 fi
17082 fi
17083
17084 # The set of warnings supported by a C++ compiler is not the same as
17085 # of the C compiler.
17086 ac_ext=cpp
17087 ac_cpp='$CXXCPP $CPPFLAGS'
17088 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17089 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17090 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17091
17092
17093 WARN_CFLAGS=""
17094 if test "x${build_warnings}" != x -a "x$GCC" = xyes
17095 then
17096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
17097 $as_echo_n "checking compiler warning flags... " >&6; }
17098 # Separate out the -Werror flag as some files just cannot be
17099 # compiled with it enabled.
17100 for w in ${build_warnings}; do
17101 # GCC does not complain about -Wno-unknown-warning. Invert
17102 # and test -Wunknown-warning instead.
17103 case $w in
17104 -Wno-*)
17105 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
17106 -Wformat-nonliteral)
17107 # gcc requires -Wformat before -Wformat-nonliteral
17108 # will work, so stick them together.
17109 w="-Wformat $w"
17110 wtest="$w"
17111 ;;
17112 *)
17113 wtest=$w ;;
17114 esac
17115
17116 case $w in
17117 -Werr*) WERROR_CFLAGS=-Werror ;;
17118 *)
17119 # Check whether GCC accepts it.
17120 saved_CFLAGS="$CFLAGS"
17121 CFLAGS="$CFLAGS -Werror $wtest"
17122 saved_CXXFLAGS="$CXXFLAGS"
17123 CXXFLAGS="$CXXFLAGS -Werror $wtest"
17124 if test "x$w" = "x-Wunused-variable"; then
17125 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
17126 # fixed in GCC 4.9. This test is derived from the gdb
17127 # source code that triggered this bug in GCC.
17128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17129 /* end confdefs.h. */
17130 struct scoped_restore_base {};
17131 struct scoped_restore_tmpl : public scoped_restore_base {
17132 ~scoped_restore_tmpl() {}
17133 };
17134 int
17135 main ()
17136 {
17137 const scoped_restore_base &b = scoped_restore_tmpl();
17138
17139 ;
17140 return 0;
17141 }
17142 _ACEOF
17143 if ac_fn_cxx_try_compile "$LINENO"; then :
17144 WARN_CFLAGS="${WARN_CFLAGS} $w"
17145 fi
17146 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17147 else
17148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17149 /* end confdefs.h. */
17150
17151 int
17152 main ()
17153 {
17154
17155 ;
17156 return 0;
17157 }
17158 _ACEOF
17159 if ac_fn_cxx_try_compile "$LINENO"; then :
17160 WARN_CFLAGS="${WARN_CFLAGS} $w"
17161 fi
17162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17163 fi
17164 CFLAGS="$saved_CFLAGS"
17165 CXXFLAGS="$saved_CXXFLAGS"
17166 esac
17167 done
17168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
17169 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
17170 fi
17171
17172
17173
17174 ac_ext=c
17175 ac_cpp='$CPP $CPPFLAGS'
17176 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17177 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17178 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17179
17180
17181
17182 # Check whether --enable-ubsan was given.
17183 if test "${enable_ubsan+set}" = set; then :
17184 enableval=$enable_ubsan;
17185 else
17186 enable_ubsan=no
17187 fi
17188
17189 if test "x$enable_ubsan" = xauto; then
17190 if $development; then
17191 enable_ubsan=yes
17192 fi
17193 fi
17194 ac_ext=cpp
17195 ac_cpp='$CXXCPP $CPPFLAGS'
17196 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17197 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17198 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17199
17200 if test "x$enable_ubsan" = xyes; then
17201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
17202 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
17203 saved_CXXFLAGS="$CXXFLAGS"
17204 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17206 /* end confdefs.h. */
17207
17208 int
17209 main ()
17210 {
17211
17212 ;
17213 return 0;
17214 }
17215 _ACEOF
17216 if ac_fn_cxx_try_link "$LINENO"; then :
17217 enable_ubsan=yes
17218 else
17219 enable_ubsan=no
17220
17221 fi
17222 rm -f core conftest.err conftest.$ac_objext \
17223 conftest$ac_exeext conftest.$ac_ext
17224 CXXFLAGS="$saved_CXXFLAGS"
17225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
17226 $as_echo "$enable_ubsan" >&6; }
17227 if test "x$enable_ubsan" = xyes; then
17228 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17229 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
17230 fi
17231 fi
17232 ac_ext=c
17233 ac_cpp='$CPP $CPPFLAGS'
17234 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17235 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17236 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17237
17238
17239
17240 # In the Cygwin environment, we need some additional flags.
17241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
17242 $as_echo_n "checking for cygwin... " >&6; }
17243 if ${gdb_cv_os_cygwin+:} false; then :
17244 $as_echo_n "(cached) " >&6
17245 else
17246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17247 /* end confdefs.h. */
17248
17249 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
17250 lose
17251 #endif
17252 _ACEOF
17253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17254 $EGREP "^lose$" >/dev/null 2>&1; then :
17255 gdb_cv_os_cygwin=yes
17256 else
17257 gdb_cv_os_cygwin=no
17258 fi
17259 rm -f conftest*
17260
17261 fi
17262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
17263 $as_echo "$gdb_cv_os_cygwin" >&6; }
17264
17265
17266 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
17267 case ${host} in
17268 *go32* ) SER_HARDWIRE=ser-go32.o ;;
17269 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
17270 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
17271 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
17272 esac
17273
17274
17275 # libreadline needs libuser32.a in a cygwin environment
17276 WIN32LIBS=
17277 if test x"$gdb_cv_os_cygwin" = xyes; then
17278 WIN32LIBS="-luser32"
17279 case "${target}" in
17280 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
17281 ;;
17282 esac
17283 fi
17284
17285 # The ser-tcp.c module requires sockets.
17286 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
17287 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
17288
17289 # Add ELF support to GDB, but only if BFD includes ELF support.
17290
17291 OLD_CFLAGS=$CFLAGS
17292 OLD_LDFLAGS=$LDFLAGS
17293 OLD_LIBS=$LIBS
17294 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17295 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17296 # always want our bfd.
17297 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17298 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17299 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17300 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17301 LIBS="-lbfd -liberty -lz $intl $LIBS"
17302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
17303 $as_echo_n "checking for ELF support in BFD... " >&6; }
17304 if ${gdb_cv_var_elf+:} false; then :
17305 $as_echo_n "(cached) " >&6
17306 else
17307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17308 /* end confdefs.h. */
17309 #include <stdlib.h>
17310 #include <string.h>
17311 #include "bfd.h"
17312 #include "elf-bfd.h"
17313 int
17314 main ()
17315 {
17316 return bfd_get_elf_phdr_upper_bound (NULL);
17317
17318 ;
17319 return 0;
17320 }
17321 _ACEOF
17322 if ac_fn_c_try_link "$LINENO"; then :
17323 gdb_cv_var_elf=yes
17324 else
17325 gdb_cv_var_elf=no
17326
17327 fi
17328 rm -f core conftest.err conftest.$ac_objext \
17329 conftest$ac_exeext conftest.$ac_ext
17330
17331 fi
17332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
17333 $as_echo "$gdb_cv_var_elf" >&6; }
17334 CFLAGS=$OLD_CFLAGS
17335 LDFLAGS=$OLD_LDFLAGS
17336 LIBS=$OLD_LIBS
17337 if test "$gdb_cv_var_elf" = yes; then
17338 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
17339 gcore-elf.o elf-none-tdep.o"
17340
17341 $as_echo "#define HAVE_ELF 1" >>confdefs.h
17342
17343 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
17344 if test "$plugins" = "yes"; then
17345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17346 $as_echo_n "checking for library containing dlopen... " >&6; }
17347 if ${ac_cv_search_dlopen+:} false; then :
17348 $as_echo_n "(cached) " >&6
17349 else
17350 ac_func_search_save_LIBS=$LIBS
17351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17352 /* end confdefs.h. */
17353
17354 /* Override any GCC internal prototype to avoid an error.
17355 Use char because int might match the return type of a GCC
17356 builtin and then its argument prototype would still apply. */
17357 #ifdef __cplusplus
17358 extern "C"
17359 #endif
17360 char dlopen ();
17361 int
17362 main ()
17363 {
17364 return dlopen ();
17365 ;
17366 return 0;
17367 }
17368 _ACEOF
17369 for ac_lib in '' dl; do
17370 if test -z "$ac_lib"; then
17371 ac_res="none required"
17372 else
17373 ac_res=-l$ac_lib
17374 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17375 fi
17376 if ac_fn_c_try_link "$LINENO"; then :
17377 ac_cv_search_dlopen=$ac_res
17378 fi
17379 rm -f core conftest.err conftest.$ac_objext \
17380 conftest$ac_exeext
17381 if ${ac_cv_search_dlopen+:} false; then :
17382 break
17383 fi
17384 done
17385 if ${ac_cv_search_dlopen+:} false; then :
17386
17387 else
17388 ac_cv_search_dlopen=no
17389 fi
17390 rm conftest.$ac_ext
17391 LIBS=$ac_func_search_save_LIBS
17392 fi
17393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17394 $as_echo "$ac_cv_search_dlopen" >&6; }
17395 ac_res=$ac_cv_search_dlopen
17396 if test "$ac_res" != no; then :
17397 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17398
17399 fi
17400
17401 fi
17402 fi
17403
17404 # Add macho support to GDB, but only if BFD includes it.
17405
17406 OLD_CFLAGS=$CFLAGS
17407 OLD_LDFLAGS=$LDFLAGS
17408 OLD_LIBS=$LIBS
17409 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17410 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17411 # always want our bfd.
17412 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17413 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17414 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17415 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17416 LIBS="-lbfd -liberty -lz $intl $LIBS"
17417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
17418 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
17419 if ${gdb_cv_var_macho+:} false; then :
17420 $as_echo_n "(cached) " >&6
17421 else
17422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17423 /* end confdefs.h. */
17424 #include <stdlib.h>
17425 #include <string.h>
17426 #include "bfd.h"
17427 #include "mach-o.h"
17428 int
17429 main ()
17430 {
17431 return bfd_mach_o_lookup_command (NULL, 0, NULL);
17432
17433 ;
17434 return 0;
17435 }
17436 _ACEOF
17437 if ac_fn_c_try_link "$LINENO"; then :
17438 gdb_cv_var_macho=yes
17439 else
17440 gdb_cv_var_macho=no
17441
17442 fi
17443 rm -f core conftest.err conftest.$ac_objext \
17444 conftest$ac_exeext conftest.$ac_ext
17445
17446 fi
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
17448 $as_echo "$gdb_cv_var_macho" >&6; }
17449 CFLAGS=$OLD_CFLAGS
17450 LDFLAGS=$OLD_LDFLAGS
17451 LIBS=$OLD_LIBS
17452 if test "$gdb_cv_var_macho" = yes; then
17453 CONFIG_OBS="$CONFIG_OBS machoread.o"
17454 fi
17455
17456 # Add any host-specific objects to GDB.
17457 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
17458
17459 # If building on ELF, look for lzma support for embedded compressed debug info.
17460 if test "$gdb_cv_var_elf" = yes; then
17461
17462 # Check whether --with-lzma was given.
17463 if test "${with_lzma+set}" = set; then :
17464 withval=$with_lzma;
17465 else
17466 with_lzma=auto
17467 fi
17468
17469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
17470 $as_echo_n "checking whether to use lzma... " >&6; }
17471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
17472 $as_echo "$with_lzma" >&6; }
17473
17474 if test "${with_lzma}" != no; then
17475
17476
17477
17478
17479
17480
17481
17482
17483 use_additional=yes
17484
17485 acl_save_prefix="$prefix"
17486 prefix="$acl_final_prefix"
17487 acl_save_exec_prefix="$exec_prefix"
17488 exec_prefix="$acl_final_exec_prefix"
17489
17490 eval additional_includedir=\"$includedir\"
17491 eval additional_libdir=\"$libdir\"
17492
17493 exec_prefix="$acl_save_exec_prefix"
17494 prefix="$acl_save_prefix"
17495
17496
17497 # Check whether --with-liblzma-prefix was given.
17498 if test "${with_liblzma_prefix+set}" = set; then :
17499 withval=$with_liblzma_prefix;
17500 if test "X$withval" = "Xno"; then
17501 use_additional=no
17502 else
17503 if test "X$withval" = "X"; then
17504
17505 acl_save_prefix="$prefix"
17506 prefix="$acl_final_prefix"
17507 acl_save_exec_prefix="$exec_prefix"
17508 exec_prefix="$acl_final_exec_prefix"
17509
17510 eval additional_includedir=\"$includedir\"
17511 eval additional_libdir=\"$libdir\"
17512
17513 exec_prefix="$acl_save_exec_prefix"
17514 prefix="$acl_save_prefix"
17515
17516 else
17517 additional_includedir="$withval/include"
17518 additional_libdir="$withval/lib"
17519 fi
17520 fi
17521
17522 fi
17523
17524
17525 # Check whether --with-liblzma-type was given.
17526 if test "${with_liblzma_type+set}" = set; then :
17527 withval=$with_liblzma_type; with_liblzma_type=$withval
17528 else
17529 with_liblzma_type=auto
17530 fi
17531
17532 lib_type=`eval echo \$with_liblzma_type`
17533
17534 LIBLZMA=
17535 LTLIBLZMA=
17536 INCLZMA=
17537 rpathdirs=
17538 ltrpathdirs=
17539 names_already_handled=
17540 names_next_round='lzma '
17541 while test -n "$names_next_round"; do
17542 names_this_round="$names_next_round"
17543 names_next_round=
17544 for name in $names_this_round; do
17545 already_handled=
17546 for n in $names_already_handled; do
17547 if test "$n" = "$name"; then
17548 already_handled=yes
17549 break
17550 fi
17551 done
17552 if test -z "$already_handled"; then
17553 names_already_handled="$names_already_handled $name"
17554 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17555 eval value=\"\$HAVE_LIB$uppername\"
17556 if test -n "$value"; then
17557 if test "$value" = yes; then
17558 eval value=\"\$LIB$uppername\"
17559 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17560 eval value=\"\$LTLIB$uppername\"
17561 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17562 else
17563 :
17564 fi
17565 else
17566 found_dir=
17567 found_la=
17568 found_so=
17569 found_a=
17570 if test $use_additional = yes; then
17571 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17572 found_dir="$additional_libdir"
17573 found_so="$additional_libdir/lib$name.$shlibext"
17574 if test -f "$additional_libdir/lib$name.la"; then
17575 found_la="$additional_libdir/lib$name.la"
17576 fi
17577 elif test x$lib_type != xshared; then
17578 if test -f "$additional_libdir/lib$name.$libext"; then
17579 found_dir="$additional_libdir"
17580 found_a="$additional_libdir/lib$name.$libext"
17581 if test -f "$additional_libdir/lib$name.la"; then
17582 found_la="$additional_libdir/lib$name.la"
17583 fi
17584 fi
17585 fi
17586 fi
17587 if test "X$found_dir" = "X"; then
17588 for x in $LDFLAGS $LTLIBLZMA; do
17589
17590 acl_save_prefix="$prefix"
17591 prefix="$acl_final_prefix"
17592 acl_save_exec_prefix="$exec_prefix"
17593 exec_prefix="$acl_final_exec_prefix"
17594 eval x=\"$x\"
17595 exec_prefix="$acl_save_exec_prefix"
17596 prefix="$acl_save_prefix"
17597
17598 case "$x" in
17599 -L*)
17600 dir=`echo "X$x" | sed -e 's/^X-L//'`
17601 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17602 found_dir="$dir"
17603 found_so="$dir/lib$name.$shlibext"
17604 if test -f "$dir/lib$name.la"; then
17605 found_la="$dir/lib$name.la"
17606 fi
17607 elif test x$lib_type != xshared; then
17608 if test -f "$dir/lib$name.$libext"; then
17609 found_dir="$dir"
17610 found_a="$dir/lib$name.$libext"
17611 if test -f "$dir/lib$name.la"; then
17612 found_la="$dir/lib$name.la"
17613 fi
17614 fi
17615 fi
17616 ;;
17617 esac
17618 if test "X$found_dir" != "X"; then
17619 break
17620 fi
17621 done
17622 fi
17623 if test "X$found_dir" != "X"; then
17624 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17625 if test "X$found_so" != "X"; then
17626 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17627 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17628 else
17629 haveit=
17630 for x in $ltrpathdirs; do
17631 if test "X$x" = "X$found_dir"; then
17632 haveit=yes
17633 break
17634 fi
17635 done
17636 if test -z "$haveit"; then
17637 ltrpathdirs="$ltrpathdirs $found_dir"
17638 fi
17639 if test "$hardcode_direct" = yes; then
17640 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17641 else
17642 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17643 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17644 haveit=
17645 for x in $rpathdirs; do
17646 if test "X$x" = "X$found_dir"; then
17647 haveit=yes
17648 break
17649 fi
17650 done
17651 if test -z "$haveit"; then
17652 rpathdirs="$rpathdirs $found_dir"
17653 fi
17654 else
17655 haveit=
17656 for x in $LDFLAGS $LIBLZMA; do
17657
17658 acl_save_prefix="$prefix"
17659 prefix="$acl_final_prefix"
17660 acl_save_exec_prefix="$exec_prefix"
17661 exec_prefix="$acl_final_exec_prefix"
17662 eval x=\"$x\"
17663 exec_prefix="$acl_save_exec_prefix"
17664 prefix="$acl_save_prefix"
17665
17666 if test "X$x" = "X-L$found_dir"; then
17667 haveit=yes
17668 break
17669 fi
17670 done
17671 if test -z "$haveit"; then
17672 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17673 fi
17674 if test "$hardcode_minus_L" != no; then
17675 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17676 else
17677 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17678 fi
17679 fi
17680 fi
17681 fi
17682 else
17683 if test "X$found_a" != "X"; then
17684 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17685 else
17686 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17687 fi
17688 fi
17689 additional_includedir=
17690 case "$found_dir" in
17691 */lib | */lib/)
17692 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17693 additional_includedir="$basedir/include"
17694 ;;
17695 esac
17696 if test "X$additional_includedir" != "X"; then
17697 if test "X$additional_includedir" != "X/usr/include"; then
17698 haveit=
17699 if test "X$additional_includedir" = "X/usr/local/include"; then
17700 if test -n "$GCC"; then
17701 case $host_os in
17702 linux*) haveit=yes;;
17703 esac
17704 fi
17705 fi
17706 if test -z "$haveit"; then
17707 for x in $CPPFLAGS $INCLZMA; do
17708
17709 acl_save_prefix="$prefix"
17710 prefix="$acl_final_prefix"
17711 acl_save_exec_prefix="$exec_prefix"
17712 exec_prefix="$acl_final_exec_prefix"
17713 eval x=\"$x\"
17714 exec_prefix="$acl_save_exec_prefix"
17715 prefix="$acl_save_prefix"
17716
17717 if test "X$x" = "X-I$additional_includedir"; then
17718 haveit=yes
17719 break
17720 fi
17721 done
17722 if test -z "$haveit"; then
17723 if test -d "$additional_includedir"; then
17724 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17725 fi
17726 fi
17727 fi
17728 fi
17729 fi
17730 if test -n "$found_la"; then
17731 save_libdir="$libdir"
17732 case "$found_la" in
17733 */* | *\\*) . "$found_la" ;;
17734 *) . "./$found_la" ;;
17735 esac
17736 libdir="$save_libdir"
17737 for dep in $dependency_libs; do
17738 case "$dep" in
17739 -L*)
17740 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17741 if test "X$additional_libdir" != "X/usr/lib"; then
17742 haveit=
17743 if test "X$additional_libdir" = "X/usr/local/lib"; then
17744 if test -n "$GCC"; then
17745 case $host_os in
17746 linux*) haveit=yes;;
17747 esac
17748 fi
17749 fi
17750 if test -z "$haveit"; then
17751 haveit=
17752 for x in $LDFLAGS $LIBLZMA; do
17753
17754 acl_save_prefix="$prefix"
17755 prefix="$acl_final_prefix"
17756 acl_save_exec_prefix="$exec_prefix"
17757 exec_prefix="$acl_final_exec_prefix"
17758 eval x=\"$x\"
17759 exec_prefix="$acl_save_exec_prefix"
17760 prefix="$acl_save_prefix"
17761
17762 if test "X$x" = "X-L$additional_libdir"; then
17763 haveit=yes
17764 break
17765 fi
17766 done
17767 if test -z "$haveit"; then
17768 if test -d "$additional_libdir"; then
17769 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17770 fi
17771 fi
17772 haveit=
17773 for x in $LDFLAGS $LTLIBLZMA; do
17774
17775 acl_save_prefix="$prefix"
17776 prefix="$acl_final_prefix"
17777 acl_save_exec_prefix="$exec_prefix"
17778 exec_prefix="$acl_final_exec_prefix"
17779 eval x=\"$x\"
17780 exec_prefix="$acl_save_exec_prefix"
17781 prefix="$acl_save_prefix"
17782
17783 if test "X$x" = "X-L$additional_libdir"; then
17784 haveit=yes
17785 break
17786 fi
17787 done
17788 if test -z "$haveit"; then
17789 if test -d "$additional_libdir"; then
17790 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17791 fi
17792 fi
17793 fi
17794 fi
17795 ;;
17796 -R*)
17797 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17798 if test "$enable_rpath" != no; then
17799 haveit=
17800 for x in $rpathdirs; do
17801 if test "X$x" = "X$dir"; then
17802 haveit=yes
17803 break
17804 fi
17805 done
17806 if test -z "$haveit"; then
17807 rpathdirs="$rpathdirs $dir"
17808 fi
17809 haveit=
17810 for x in $ltrpathdirs; do
17811 if test "X$x" = "X$dir"; then
17812 haveit=yes
17813 break
17814 fi
17815 done
17816 if test -z "$haveit"; then
17817 ltrpathdirs="$ltrpathdirs $dir"
17818 fi
17819 fi
17820 ;;
17821 -l*)
17822 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17823 ;;
17824 *.la)
17825 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17826 ;;
17827 *)
17828 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17829 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17830 ;;
17831 esac
17832 done
17833 fi
17834 else
17835 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17836 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17837 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17838 else
17839 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17840 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17841 fi
17842 fi
17843 fi
17844 fi
17845 done
17846 done
17847 if test "X$rpathdirs" != "X"; then
17848 if test -n "$hardcode_libdir_separator"; then
17849 alldirs=
17850 for found_dir in $rpathdirs; do
17851 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17852 done
17853 acl_save_libdir="$libdir"
17854 libdir="$alldirs"
17855 eval flag=\"$hardcode_libdir_flag_spec\"
17856 libdir="$acl_save_libdir"
17857 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17858 else
17859 for found_dir in $rpathdirs; do
17860 acl_save_libdir="$libdir"
17861 libdir="$found_dir"
17862 eval flag=\"$hardcode_libdir_flag_spec\"
17863 libdir="$acl_save_libdir"
17864 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17865 done
17866 fi
17867 fi
17868 if test "X$ltrpathdirs" != "X"; then
17869 for found_dir in $ltrpathdirs; do
17870 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17871 done
17872 fi
17873
17874
17875 ac_save_CPPFLAGS="$CPPFLAGS"
17876
17877 for element in $INCLZMA; do
17878 haveit=
17879 for x in $CPPFLAGS; do
17880
17881 acl_save_prefix="$prefix"
17882 prefix="$acl_final_prefix"
17883 acl_save_exec_prefix="$exec_prefix"
17884 exec_prefix="$acl_final_exec_prefix"
17885 eval x=\"$x\"
17886 exec_prefix="$acl_save_exec_prefix"
17887 prefix="$acl_save_prefix"
17888
17889 if test "X$x" = "X$element"; then
17890 haveit=yes
17891 break
17892 fi
17893 done
17894 if test -z "$haveit"; then
17895 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17896 fi
17897 done
17898
17899
17900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17901 $as_echo_n "checking for liblzma... " >&6; }
17902 if ${ac_cv_liblzma+:} false; then :
17903 $as_echo_n "(cached) " >&6
17904 else
17905
17906 ac_save_LIBS="$LIBS"
17907 LIBS="$LIBS $LIBLZMA"
17908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17909 /* end confdefs.h. */
17910 #include "lzma.h"
17911 int
17912 main ()
17913 {
17914 lzma_index_iter iter;
17915 lzma_index_iter_init (&iter, 0);
17916 lzma_mf_is_supported (LZMA_MF_HC3);
17917 ;
17918 return 0;
17919 }
17920 _ACEOF
17921 if ac_fn_c_try_link "$LINENO"; then :
17922 ac_cv_liblzma=yes
17923 else
17924 ac_cv_liblzma=no
17925 fi
17926 rm -f core conftest.err conftest.$ac_objext \
17927 conftest$ac_exeext conftest.$ac_ext
17928 LIBS="$ac_save_LIBS"
17929
17930 fi
17931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17932 $as_echo "$ac_cv_liblzma" >&6; }
17933 if test "$ac_cv_liblzma" = yes; then
17934 HAVE_LIBLZMA=yes
17935
17936 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17937
17938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17939 $as_echo_n "checking how to link with liblzma... " >&6; }
17940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17941 $as_echo "$LIBLZMA" >&6; }
17942 else
17943 HAVE_LIBLZMA=no
17944 CPPFLAGS="$ac_save_CPPFLAGS"
17945 LIBLZMA=
17946 LTLIBLZMA=
17947 fi
17948
17949
17950
17951
17952
17953
17954 if test "$HAVE_LIBLZMA" != yes; then
17955 if test "$with_lzma" = yes; then
17956 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17957 fi
17958 fi
17959 fi
17960 fi
17961
17962 LIBGUI="../libgui/src/libgui.a"
17963 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17964
17965
17966
17967 WIN32LDAPP=
17968
17969
17970
17971 case "${host}" in
17972 *-*-cygwin* | *-*-mingw* )
17973 configdir="win"
17974 ;;
17975 *)
17976 configdir="unix"
17977 ;;
17978 esac
17979
17980 GDBTKLIBS=
17981 if test "${enable_gdbtk}" = "yes"; then
17982
17983 # Gdbtk must have an absolute path to srcdir in order to run
17984 # properly when not installed.
17985 here=`pwd`
17986 cd ${srcdir}
17987 GDBTK_SRC_DIR=`pwd`
17988 cd $here
17989
17990
17991 #
17992 # Ok, lets find the tcl configuration
17993 # First, look for one uninstalled.
17994 # the alternative search directory is invoked by --with-tcl
17995 #
17996
17997 if test x"${no_tcl}" = x ; then
17998 # we reset no_tcl in case something fails here
17999 no_tcl=true
18000
18001 # Check whether --with-tcl was given.
18002 if test "${with_tcl+set}" = set; then :
18003 withval=$with_tcl; with_tclconfig=${withval}
18004 fi
18005
18006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
18007 $as_echo_n "checking for Tcl configuration... " >&6; }
18008 if ${ac_cv_c_tclconfig+:} false; then :
18009 $as_echo_n "(cached) " >&6
18010 else
18011
18012
18013 # First check to see if --with-tcl was specified.
18014 case "${host}" in
18015 *-*-cygwin*) platDir="win" ;;
18016 *) platDir="unix" ;;
18017 esac
18018 if test x"${with_tclconfig}" != x ; then
18019 if test -f "${with_tclconfig}/tclConfig.sh" ; then
18020 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
18021 else
18022 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
18023 fi
18024 fi
18025
18026 # then check for a private Tcl installation
18027 if test x"${ac_cv_c_tclconfig}" = x ; then
18028 for i in \
18029 ../tcl \
18030 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18031 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
18032 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
18033 ../../tcl \
18034 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18035 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
18036 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
18037 ../../../tcl \
18038 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18039 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
18040 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
18041 if test -f "$i/$platDir/tclConfig.sh" ; then
18042 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18043 break
18044 fi
18045 done
18046 fi
18047
18048 # on Darwin, check in Framework installation locations
18049 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
18050 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18051 `ls -d /Library/Frameworks 2>/dev/null` \
18052 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18053 `ls -d /System/Library/Frameworks 2>/dev/null` \
18054 ; do
18055 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
18056 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
18057 break
18058 fi
18059 done
18060 fi
18061
18062 # check in a few common install locations
18063 if test x"${ac_cv_c_tclconfig}" = x ; then
18064 for i in `ls -d ${libdir} 2>/dev/null` \
18065 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18066 `ls -d ${prefix}/lib 2>/dev/null` \
18067 `ls -d /usr/local/lib 2>/dev/null` \
18068 `ls -d /usr/contrib/lib 2>/dev/null` \
18069 `ls -d /usr/lib 2>/dev/null` \
18070 ; do
18071 if test -f "$i/tclConfig.sh" ; then
18072 ac_cv_c_tclconfig=`(cd $i; pwd)`
18073 break
18074 fi
18075 done
18076 fi
18077
18078 # check in a few other private locations
18079 if test x"${ac_cv_c_tclconfig}" = x ; then
18080 for i in \
18081 ${srcdir}/../tcl \
18082 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18083 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
18084 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
18085 if test -f "$i/$platDir/tclConfig.sh" ; then
18086 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18087 break
18088 fi
18089 done
18090 fi
18091
18092 fi
18093
18094
18095 if test x"${ac_cv_c_tclconfig}" = x ; then
18096 TCL_BIN_DIR="# no Tcl configs found"
18097 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
18098 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
18099 else
18100 no_tcl=
18101 TCL_BIN_DIR=${ac_cv_c_tclconfig}
18102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
18103 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18104 fi
18105 fi
18106
18107
18108 # If $no_tk is nonempty, then we can't do Tk, and there is no
18109 # point to doing Tcl.
18110
18111 #
18112 # Ok, lets find the tk configuration
18113 # First, look for one uninstalled.
18114 # the alternative search directory is invoked by --with-tk
18115 #
18116
18117 if test x"${no_tk}" = x ; then
18118 # we reset no_tk in case something fails here
18119 no_tk=true
18120
18121 # Check whether --with-tk was given.
18122 if test "${with_tk+set}" = set; then :
18123 withval=$with_tk; with_tkconfig=${withval}
18124 fi
18125
18126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
18127 $as_echo_n "checking for Tk configuration... " >&6; }
18128 if ${ac_cv_c_tkconfig+:} false; then :
18129 $as_echo_n "(cached) " >&6
18130 else
18131
18132
18133 # First check to see if --with-tkconfig was specified.
18134 if test x"${with_tkconfig}" != x ; then
18135 if test -f "${with_tkconfig}/tkConfig.sh" ; then
18136 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
18137 else
18138 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
18139 fi
18140 fi
18141
18142 # then check for a private Tk library
18143 case "${host}" in
18144 *-*-cygwin*) platDir="win" ;;
18145 *) platDir="unix" ;;
18146 esac
18147 if test x"${ac_cv_c_tkconfig}" = x ; then
18148 for i in \
18149 ../tk \
18150 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18151 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
18152 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
18153 ../../tk \
18154 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18155 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
18156 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
18157 ../../../tk \
18158 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18159 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
18160 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
18161 if test -f "$i/$platDir/tkConfig.sh" ; then
18162 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18163 break
18164 fi
18165 done
18166 fi
18167
18168 # on Darwin, check in Framework installation locations
18169 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
18170 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18171 `ls -d /Library/Frameworks 2>/dev/null` \
18172 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18173 `ls -d /System/Library/Frameworks 2>/dev/null` \
18174 ; do
18175 if test -f "$i/Tk.framework/tkConfig.sh" ; then
18176 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
18177 break
18178 fi
18179 done
18180 fi
18181
18182 # check in a few common install locations
18183 if test x"${ac_cv_c_tkconfig}" = x ; then
18184 for i in `ls -d ${libdir} 2>/dev/null` \
18185 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18186 `ls -d ${prefix}/lib 2>/dev/null` \
18187 `ls -d /usr/local/lib 2>/dev/null` \
18188 `ls -d /usr/contrib/lib 2>/dev/null` \
18189 `ls -d /usr/lib 2>/dev/null` \
18190 ; do
18191 if test -f "$i/tkConfig.sh" ; then
18192 ac_cv_c_tkconfig=`(cd $i; pwd)`
18193 break
18194 fi
18195 done
18196 fi
18197 # check in a few other private locations
18198 if test x"${ac_cv_c_tkconfig}" = x ; then
18199 for i in \
18200 ${srcdir}/../tk \
18201 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18202 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
18203 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
18204 if test -f "$i/$platDir/tkConfig.sh" ; then
18205 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18206 break
18207 fi
18208 done
18209 fi
18210
18211 fi
18212
18213
18214 if test x"${ac_cv_c_tkconfig}" = x ; then
18215 TK_BIN_DIR="# no Tk configs found"
18216 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
18217 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
18218 else
18219 no_tk=
18220 TK_BIN_DIR=${ac_cv_c_tkconfig}
18221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
18222 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18223 fi
18224 fi
18225
18226
18227 if test -z "${no_tcl}" -a -z "${no_tk}"; then
18228
18229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
18230 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
18231
18232 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
18233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18234 $as_echo "loading" >&6; }
18235 . ${TCL_BIN_DIR}/tclConfig.sh
18236 else
18237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
18238 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18239 fi
18240
18241 # eval is required to do the TCL_DBGX substitution
18242 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
18243 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18244
18245 # If the TCL_BIN_DIR is the build directory (not the install directory),
18246 # then set the common variable name to the value of the build variables.
18247 # For example, the variable TCL_LIB_SPEC will be set to the value
18248 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
18249 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
18250 # installed and uninstalled version of Tcl.
18251 if test -f "${TCL_BIN_DIR}/Makefile" ; then
18252 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
18253 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
18254 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
18255 elif test "`uname -s`" = "Darwin"; then
18256 # If Tcl was built as a framework, attempt to use the libraries
18257 # from the framework at the given location so that linking works
18258 # against Tcl.framework installed in an arbitrary location.
18259 case ${TCL_DEFS} in
18260 *TCL_FRAMEWORK*)
18261 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
18262 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
18263 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
18264 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
18265 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
18266 break
18267 fi
18268 done
18269 fi
18270 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
18271 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
18272 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
18273 fi
18274 ;;
18275 esac
18276 fi
18277
18278 # eval is required to do the TCL_DBGX substitution
18279 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
18280 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
18281 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
18282 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298 # Check for in-tree tcl
18299 here=`pwd`
18300 cd ${srcdir}/..
18301 topdir=`pwd`
18302 cd ${here}
18303
18304 intree="no"
18305 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
18306 intree="yes"
18307 fi
18308
18309 # Find Tcl private headers
18310 if test x"${intree}" = xno; then
18311
18312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
18313 $as_echo_n "checking for Tcl private headers... " >&6; }
18314 private_dir=""
18315 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
18316 if test -f ${dir}/tclInt.h ; then
18317 private_dir=${dir}
18318 fi
18319
18320 if test x"${private_dir}" = x; then
18321 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
18322 else
18323 TCL_PRIVATE_INCLUDE="-I${private_dir}"
18324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18325 $as_echo "${private_dir}" >&6; }
18326 fi
18327
18328 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
18329 TCL_LIBRARY="${TCL_LIB_SPEC}"
18330 TCL_DEPS=""
18331 else
18332 # If building tcl in the same src tree, private headers
18333 # are not needed, but we need to be sure to use the right
18334 # headers library
18335 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
18336 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
18337 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
18338 fi
18339
18340
18341
18342
18343
18344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
18345 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
18346
18347 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
18348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18349 $as_echo "loading" >&6; }
18350 . ${TK_BIN_DIR}/tkConfig.sh
18351 else
18352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
18353 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18354 fi
18355
18356 # eval is required to do the TK_DBGX substitution
18357 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
18358 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
18359
18360 # If the TK_BIN_DIR is the build directory (not the install directory),
18361 # then set the common variable name to the value of the build variables.
18362 # For example, the variable TK_LIB_SPEC will be set to the value
18363 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
18364 # instead of TK_BUILD_LIB_SPEC since it will work with both an
18365 # installed and uninstalled version of Tcl.
18366 if test -f "${TK_BIN_DIR}/Makefile" ; then
18367 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
18368 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
18369 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
18370 elif test "`uname -s`" = "Darwin"; then
18371 # If Tk was built as a framework, attempt to use the libraries
18372 # from the framework at the given location so that linking works
18373 # against Tk.framework installed in an arbitrary location.
18374 case ${TK_DEFS} in
18375 *TK_FRAMEWORK*)
18376 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
18377 for i in "`cd ${TK_BIN_DIR}; pwd`" \
18378 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
18379 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
18380 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
18381 break
18382 fi
18383 done
18384 fi
18385 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
18386 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
18387 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
18388 fi
18389 ;;
18390 esac
18391 fi
18392
18393 # eval is required to do the TK_DBGX substitution
18394 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
18395 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
18396 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
18397 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412 # Check for in-tree Tk
18413 intree="no"
18414 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
18415 intree="yes"
18416 fi
18417
18418 # Find Tk private headers
18419 if test x"${intree}" = xno; then
18420
18421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
18422 $as_echo_n "checking for Tk private headers... " >&6; }
18423 private_dir=""
18424 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
18425 if test -f ${dir}/tkInt.h; then
18426 private_dir=${dir}
18427 fi
18428
18429 if test x"${private_dir}" = x; then
18430 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
18431 else
18432 TK_PRIVATE_INCLUDE="-I${private_dir}"
18433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18434 $as_echo "${private_dir}" >&6; }
18435 fi
18436
18437 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
18438 TK_LIBRARY=${TK_LIB_SPEC}
18439 TK_DEPS=""
18440 else
18441 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
18442 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
18443 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
18444 fi
18445
18446
18447
18448
18449
18450 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
18451
18452 # Include some libraries that Tcl and Tk want.
18453 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
18454 # Yes, the ordering seems wrong here. But it isn't.
18455 # TK_LIBS is the list of libraries that need to be linked
18456 # after Tcl/Tk. Note that this isn't put into LIBS. If it
18457 # were in LIBS then any link tests after this point would
18458 # try to include things like `$(LIBGUI)', which wouldn't work.
18459 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
18460
18461 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
18462 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
18463 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
18464 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
18465 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
18466 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
18467 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
18468
18469 if test x"$gdb_cv_os_cygwin" = xyes; then
18470 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
18471 WIN32LDAPP="-Wl,--subsystem,console"
18472 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
18473 fi
18474
18475 subdirs="$subdirs gdbtk"
18476
18477 fi
18478 fi
18479
18480
18481
18482
18483
18484
18485
18486
18487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
18488 $as_echo_n "checking for X... " >&6; }
18489
18490
18491 # Check whether --with-x was given.
18492 if test "${with_x+set}" = set; then :
18493 withval=$with_x;
18494 fi
18495
18496 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
18497 if test "x$with_x" = xno; then
18498 # The user explicitly disabled X.
18499 have_x=disabled
18500 else
18501 case $x_includes,$x_libraries in #(
18502 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
18503 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
18504 $as_echo_n "(cached) " >&6
18505 else
18506 # One or both of the vars are not set, and there is no cached value.
18507 ac_x_includes=no ac_x_libraries=no
18508 rm -f -r conftest.dir
18509 if mkdir conftest.dir; then
18510 cd conftest.dir
18511 cat >Imakefile <<'_ACEOF'
18512 incroot:
18513 @echo incroot='${INCROOT}'
18514 usrlibdir:
18515 @echo usrlibdir='${USRLIBDIR}'
18516 libdir:
18517 @echo libdir='${LIBDIR}'
18518 _ACEOF
18519 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
18520 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
18521 for ac_var in incroot usrlibdir libdir; do
18522 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
18523 done
18524 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
18525 for ac_extension in a so sl dylib la dll; do
18526 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
18527 test -f "$ac_im_libdir/libX11.$ac_extension"; then
18528 ac_im_usrlibdir=$ac_im_libdir; break
18529 fi
18530 done
18531 # Screen out bogus values from the imake configuration. They are
18532 # bogus both because they are the default anyway, and because
18533 # using them would break gcc on systems where it needs fixed includes.
18534 case $ac_im_incroot in
18535 /usr/include) ac_x_includes= ;;
18536 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
18537 esac
18538 case $ac_im_usrlibdir in
18539 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
18540 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
18541 esac
18542 fi
18543 cd ..
18544 rm -f -r conftest.dir
18545 fi
18546
18547 # Standard set of common directories for X headers.
18548 # Check X11 before X11Rn because it is often a symlink to the current release.
18549 ac_x_header_dirs='
18550 /usr/X11/include
18551 /usr/X11R7/include
18552 /usr/X11R6/include
18553 /usr/X11R5/include
18554 /usr/X11R4/include
18555
18556 /usr/include/X11
18557 /usr/include/X11R7
18558 /usr/include/X11R6
18559 /usr/include/X11R5
18560 /usr/include/X11R4
18561
18562 /usr/local/X11/include
18563 /usr/local/X11R7/include
18564 /usr/local/X11R6/include
18565 /usr/local/X11R5/include
18566 /usr/local/X11R4/include
18567
18568 /usr/local/include/X11
18569 /usr/local/include/X11R7
18570 /usr/local/include/X11R6
18571 /usr/local/include/X11R5
18572 /usr/local/include/X11R4
18573
18574 /usr/X386/include
18575 /usr/x386/include
18576 /usr/XFree86/include/X11
18577
18578 /usr/include
18579 /usr/local/include
18580 /usr/unsupported/include
18581 /usr/athena/include
18582 /usr/local/x11r5/include
18583 /usr/lpp/Xamples/include
18584
18585 /usr/openwin/include
18586 /usr/openwin/share/include'
18587
18588 if test "$ac_x_includes" = no; then
18589 # Guess where to find include files, by looking for Xlib.h.
18590 # First, try using that file with no special directory specified.
18591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18592 /* end confdefs.h. */
18593 #include <X11/Xlib.h>
18594 _ACEOF
18595 if ac_fn_c_try_cpp "$LINENO"; then :
18596 # We can compile using X headers with no special include directory.
18597 ac_x_includes=
18598 else
18599 for ac_dir in $ac_x_header_dirs; do
18600 if test -r "$ac_dir/X11/Xlib.h"; then
18601 ac_x_includes=$ac_dir
18602 break
18603 fi
18604 done
18605 fi
18606 rm -f conftest.err conftest.i conftest.$ac_ext
18607 fi # $ac_x_includes = no
18608
18609 if test "$ac_x_libraries" = no; then
18610 # Check for the libraries.
18611 # See if we find them without any special options.
18612 # Don't add to $LIBS permanently.
18613 ac_save_LIBS=$LIBS
18614 LIBS="-lX11 $LIBS"
18615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18616 /* end confdefs.h. */
18617 #include <X11/Xlib.h>
18618 int
18619 main ()
18620 {
18621 XrmInitialize ()
18622 ;
18623 return 0;
18624 }
18625 _ACEOF
18626 if ac_fn_c_try_link "$LINENO"; then :
18627 LIBS=$ac_save_LIBS
18628 # We can link X programs with no special library path.
18629 ac_x_libraries=
18630 else
18631 LIBS=$ac_save_LIBS
18632 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18633 do
18634 # Don't even attempt the hair of trying to link an X program!
18635 for ac_extension in a so sl dylib la dll; do
18636 if test -r "$ac_dir/libX11.$ac_extension"; then
18637 ac_x_libraries=$ac_dir
18638 break 2
18639 fi
18640 done
18641 done
18642 fi
18643 rm -f core conftest.err conftest.$ac_objext \
18644 conftest$ac_exeext conftest.$ac_ext
18645 fi # $ac_x_libraries = no
18646
18647 case $ac_x_includes,$ac_x_libraries in #(
18648 no,* | *,no | *\'*)
18649 # Didn't find X, or a directory has "'" in its name.
18650 ac_cv_have_x="have_x=no";; #(
18651 *)
18652 # Record where we found X for the cache.
18653 ac_cv_have_x="have_x=yes\
18654 ac_x_includes='$ac_x_includes'\
18655 ac_x_libraries='$ac_x_libraries'"
18656 esac
18657 fi
18658 ;; #(
18659 *) have_x=yes;;
18660 esac
18661 eval "$ac_cv_have_x"
18662 fi # $with_x != no
18663
18664 if test "$have_x" != yes; then
18665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18666 $as_echo "$have_x" >&6; }
18667 no_x=yes
18668 else
18669 # If each of the values was on the command line, it overrides each guess.
18670 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18671 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18672 # Update the cache value to reflect the command line values.
18673 ac_cv_have_x="have_x=yes\
18674 ac_x_includes='$x_includes'\
18675 ac_x_libraries='$x_libraries'"
18676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18677 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18678 fi
18679
18680
18681 # Unlike the sim directory, whether a simulator is linked is controlled by
18682 # presence of a gdb_sim definition in the target configure.tgt entry.
18683 # This code just checks for a few cases where we'd like to ignore those
18684 # definitions, even when they're present in the '.mt' file. These cases
18685 # are when --disable-sim is specified, or if the simulator directory is
18686 # not part of the source tree.
18687 #
18688 # Check whether --enable-sim was given.
18689 if test "${enable_sim+set}" = set; then :
18690 enableval=$enable_sim; echo "enable_sim = $enable_sim";
18691 echo "enableval = ${enableval}";
18692 case "${enableval}" in
18693 yes) ignore_sim=false ;;
18694 no) ignore_sim=true ;;
18695 *) ignore_sim=false ;;
18696 esac
18697 else
18698 ignore_sim=false
18699 fi
18700
18701
18702 if test ! -d "${srcdir}/../sim"; then
18703 ignore_sim=true
18704 fi
18705
18706 SIM=
18707 SIM_OBS=
18708 if test "${ignore_sim}" = "false"; then
18709 if test x"${gdb_sim}" != x ; then
18710 SIM="${gdb_sim}"
18711 SIM_OBS="remote-sim.o"
18712
18713 $as_echo "#define WITH_SIM 1" >>confdefs.h
18714
18715
18716 # Some tdep code should only be compiled in when the ppc sim is
18717 # built. PR sim/13418.
18718 case $target in
18719 powerpc*-*-*)
18720
18721 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18722
18723 ;;
18724 esac
18725 fi
18726 fi
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741 # List of host floatformats.
18742
18743 cat >>confdefs.h <<_ACEOF
18744 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18745 _ACEOF
18746
18747
18748 cat >>confdefs.h <<_ACEOF
18749 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18750 _ACEOF
18751
18752
18753 cat >>confdefs.h <<_ACEOF
18754 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18755 _ACEOF
18756
18757
18758 # target_subdir is used by the testsuite to find the target libraries.
18759 target_subdir=
18760 if test "${host}" != "${target}"; then
18761 target_subdir="${target_alias}/"
18762 fi
18763
18764
18765 # Import nat definitions.
18766 nat_makefile_frag=/dev/null
18767 if test "${gdb_native}" = "yes"; then
18768 . ${srcdir}/configure.nat
18769 nativefile=$NAT_FILE
18770 fi
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782 if test x"${gdb_osabi}" != x ; then
18783
18784 cat >>confdefs.h <<_ACEOF
18785 #define GDB_OSABI_DEFAULT $gdb_osabi
18786 _ACEOF
18787
18788 fi
18789
18790 # Setup possible use of libbacktrace.
18791 # Check whether --enable-libbacktrace was given.
18792 if test "${enable_libbacktrace+set}" = set; then :
18793 enableval=$enable_libbacktrace; case "${enableval}" in
18794 yes) enable_libbacktrace=yes ;;
18795 no) enable_libbacktrace=no ;;
18796 *) as_fn_error $? "bad value ${enableval} for --enable-libbacktrace option" "$LINENO" 5 ;;
18797 esac
18798 else
18799 enable_libbacktrace=yes
18800 fi
18801
18802
18803 if test "${enable_libbacktrace}" == "yes"; then
18804 LIBBACKTRACE_INC="-I$srcdir/../libbacktrace/ -I../libbacktrace/"
18805 LIBBACKTRACE_LIB=../libbacktrace/.libs/libbacktrace.a
18806
18807 $as_echo "#define HAVE_LIBBACKTRACE 1" >>confdefs.h
18808
18809 else
18810 LIBBACKTRACE_INC=
18811 LIBBACKTRACE_LIB=
18812 fi
18813
18814
18815
18816
18817 # Check for babeltrace and babeltrace-ctf
18818
18819 # Check whether --with-babeltrace was given.
18820 if test "${with_babeltrace+set}" = set; then :
18821 withval=$with_babeltrace;
18822 else
18823 with_babeltrace=auto
18824 fi
18825
18826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18827 $as_echo_n "checking whether to use babeltrace... " >&6; }
18828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18829 $as_echo "$with_babeltrace" >&6; }
18830
18831 if test "x$with_babeltrace" = "xno"; then
18832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18833 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18834 else
18835 # Append -Werror to CFLAGS so that configure can catch the warning
18836 # "assignment from incompatible pointer type", which is related to
18837 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18838 # in GDB, while babeltrace 1.0.3 is broken.
18839 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18840 # safe to save and restore CFLAGS here.
18841 saved_CFLAGS=$CFLAGS
18842 CFLAGS="$CFLAGS -Werror"
18843
18844
18845
18846
18847
18848
18849
18850
18851 use_additional=yes
18852
18853 acl_save_prefix="$prefix"
18854 prefix="$acl_final_prefix"
18855 acl_save_exec_prefix="$exec_prefix"
18856 exec_prefix="$acl_final_exec_prefix"
18857
18858 eval additional_includedir=\"$includedir\"
18859 eval additional_libdir=\"$libdir\"
18860
18861 exec_prefix="$acl_save_exec_prefix"
18862 prefix="$acl_save_prefix"
18863
18864
18865 # Check whether --with-libbabeltrace-prefix was given.
18866 if test "${with_libbabeltrace_prefix+set}" = set; then :
18867 withval=$with_libbabeltrace_prefix;
18868 if test "X$withval" = "Xno"; then
18869 use_additional=no
18870 else
18871 if test "X$withval" = "X"; then
18872
18873 acl_save_prefix="$prefix"
18874 prefix="$acl_final_prefix"
18875 acl_save_exec_prefix="$exec_prefix"
18876 exec_prefix="$acl_final_exec_prefix"
18877
18878 eval additional_includedir=\"$includedir\"
18879 eval additional_libdir=\"$libdir\"
18880
18881 exec_prefix="$acl_save_exec_prefix"
18882 prefix="$acl_save_prefix"
18883
18884 else
18885 additional_includedir="$withval/include"
18886 additional_libdir="$withval/lib"
18887 fi
18888 fi
18889
18890 fi
18891
18892
18893 # Check whether --with-libbabeltrace-type was given.
18894 if test "${with_libbabeltrace_type+set}" = set; then :
18895 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18896 else
18897 with_libbabeltrace_type=auto
18898 fi
18899
18900 lib_type=`eval echo \$with_libbabeltrace_type`
18901
18902 LIBBABELTRACE=
18903 LTLIBBABELTRACE=
18904 INCBABELTRACE=
18905 rpathdirs=
18906 ltrpathdirs=
18907 names_already_handled=
18908 names_next_round='babeltrace babeltrace-ctf'
18909 while test -n "$names_next_round"; do
18910 names_this_round="$names_next_round"
18911 names_next_round=
18912 for name in $names_this_round; do
18913 already_handled=
18914 for n in $names_already_handled; do
18915 if test "$n" = "$name"; then
18916 already_handled=yes
18917 break
18918 fi
18919 done
18920 if test -z "$already_handled"; then
18921 names_already_handled="$names_already_handled $name"
18922 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18923 eval value=\"\$HAVE_LIB$uppername\"
18924 if test -n "$value"; then
18925 if test "$value" = yes; then
18926 eval value=\"\$LIB$uppername\"
18927 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18928 eval value=\"\$LTLIB$uppername\"
18929 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18930 else
18931 :
18932 fi
18933 else
18934 found_dir=
18935 found_la=
18936 found_so=
18937 found_a=
18938 if test $use_additional = yes; then
18939 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18940 found_dir="$additional_libdir"
18941 found_so="$additional_libdir/lib$name.$shlibext"
18942 if test -f "$additional_libdir/lib$name.la"; then
18943 found_la="$additional_libdir/lib$name.la"
18944 fi
18945 elif test x$lib_type != xshared; then
18946 if test -f "$additional_libdir/lib$name.$libext"; then
18947 found_dir="$additional_libdir"
18948 found_a="$additional_libdir/lib$name.$libext"
18949 if test -f "$additional_libdir/lib$name.la"; then
18950 found_la="$additional_libdir/lib$name.la"
18951 fi
18952 fi
18953 fi
18954 fi
18955 if test "X$found_dir" = "X"; then
18956 for x in $LDFLAGS $LTLIBBABELTRACE; do
18957
18958 acl_save_prefix="$prefix"
18959 prefix="$acl_final_prefix"
18960 acl_save_exec_prefix="$exec_prefix"
18961 exec_prefix="$acl_final_exec_prefix"
18962 eval x=\"$x\"
18963 exec_prefix="$acl_save_exec_prefix"
18964 prefix="$acl_save_prefix"
18965
18966 case "$x" in
18967 -L*)
18968 dir=`echo "X$x" | sed -e 's/^X-L//'`
18969 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18970 found_dir="$dir"
18971 found_so="$dir/lib$name.$shlibext"
18972 if test -f "$dir/lib$name.la"; then
18973 found_la="$dir/lib$name.la"
18974 fi
18975 elif test x$lib_type != xshared; then
18976 if test -f "$dir/lib$name.$libext"; then
18977 found_dir="$dir"
18978 found_a="$dir/lib$name.$libext"
18979 if test -f "$dir/lib$name.la"; then
18980 found_la="$dir/lib$name.la"
18981 fi
18982 fi
18983 fi
18984 ;;
18985 esac
18986 if test "X$found_dir" != "X"; then
18987 break
18988 fi
18989 done
18990 fi
18991 if test "X$found_dir" != "X"; then
18992 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18993 if test "X$found_so" != "X"; then
18994 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18995 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18996 else
18997 haveit=
18998 for x in $ltrpathdirs; do
18999 if test "X$x" = "X$found_dir"; then
19000 haveit=yes
19001 break
19002 fi
19003 done
19004 if test -z "$haveit"; then
19005 ltrpathdirs="$ltrpathdirs $found_dir"
19006 fi
19007 if test "$hardcode_direct" = yes; then
19008 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19009 else
19010 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19011 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19012 haveit=
19013 for x in $rpathdirs; do
19014 if test "X$x" = "X$found_dir"; then
19015 haveit=yes
19016 break
19017 fi
19018 done
19019 if test -z "$haveit"; then
19020 rpathdirs="$rpathdirs $found_dir"
19021 fi
19022 else
19023 haveit=
19024 for x in $LDFLAGS $LIBBABELTRACE; do
19025
19026 acl_save_prefix="$prefix"
19027 prefix="$acl_final_prefix"
19028 acl_save_exec_prefix="$exec_prefix"
19029 exec_prefix="$acl_final_exec_prefix"
19030 eval x=\"$x\"
19031 exec_prefix="$acl_save_exec_prefix"
19032 prefix="$acl_save_prefix"
19033
19034 if test "X$x" = "X-L$found_dir"; then
19035 haveit=yes
19036 break
19037 fi
19038 done
19039 if test -z "$haveit"; then
19040 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
19041 fi
19042 if test "$hardcode_minus_L" != no; then
19043 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19044 else
19045 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19046 fi
19047 fi
19048 fi
19049 fi
19050 else
19051 if test "X$found_a" != "X"; then
19052 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
19053 else
19054 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
19055 fi
19056 fi
19057 additional_includedir=
19058 case "$found_dir" in
19059 */lib | */lib/)
19060 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19061 additional_includedir="$basedir/include"
19062 ;;
19063 esac
19064 if test "X$additional_includedir" != "X"; then
19065 if test "X$additional_includedir" != "X/usr/include"; then
19066 haveit=
19067 if test "X$additional_includedir" = "X/usr/local/include"; then
19068 if test -n "$GCC"; then
19069 case $host_os in
19070 linux*) haveit=yes;;
19071 esac
19072 fi
19073 fi
19074 if test -z "$haveit"; then
19075 for x in $CPPFLAGS $INCBABELTRACE; do
19076
19077 acl_save_prefix="$prefix"
19078 prefix="$acl_final_prefix"
19079 acl_save_exec_prefix="$exec_prefix"
19080 exec_prefix="$acl_final_exec_prefix"
19081 eval x=\"$x\"
19082 exec_prefix="$acl_save_exec_prefix"
19083 prefix="$acl_save_prefix"
19084
19085 if test "X$x" = "X-I$additional_includedir"; then
19086 haveit=yes
19087 break
19088 fi
19089 done
19090 if test -z "$haveit"; then
19091 if test -d "$additional_includedir"; then
19092 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
19093 fi
19094 fi
19095 fi
19096 fi
19097 fi
19098 if test -n "$found_la"; then
19099 save_libdir="$libdir"
19100 case "$found_la" in
19101 */* | *\\*) . "$found_la" ;;
19102 *) . "./$found_la" ;;
19103 esac
19104 libdir="$save_libdir"
19105 for dep in $dependency_libs; do
19106 case "$dep" in
19107 -L*)
19108 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19109 if test "X$additional_libdir" != "X/usr/lib"; then
19110 haveit=
19111 if test "X$additional_libdir" = "X/usr/local/lib"; then
19112 if test -n "$GCC"; then
19113 case $host_os in
19114 linux*) haveit=yes;;
19115 esac
19116 fi
19117 fi
19118 if test -z "$haveit"; then
19119 haveit=
19120 for x in $LDFLAGS $LIBBABELTRACE; do
19121
19122 acl_save_prefix="$prefix"
19123 prefix="$acl_final_prefix"
19124 acl_save_exec_prefix="$exec_prefix"
19125 exec_prefix="$acl_final_exec_prefix"
19126 eval x=\"$x\"
19127 exec_prefix="$acl_save_exec_prefix"
19128 prefix="$acl_save_prefix"
19129
19130 if test "X$x" = "X-L$additional_libdir"; then
19131 haveit=yes
19132 break
19133 fi
19134 done
19135 if test -z "$haveit"; then
19136 if test -d "$additional_libdir"; then
19137 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
19138 fi
19139 fi
19140 haveit=
19141 for x in $LDFLAGS $LTLIBBABELTRACE; do
19142
19143 acl_save_prefix="$prefix"
19144 prefix="$acl_final_prefix"
19145 acl_save_exec_prefix="$exec_prefix"
19146 exec_prefix="$acl_final_exec_prefix"
19147 eval x=\"$x\"
19148 exec_prefix="$acl_save_exec_prefix"
19149 prefix="$acl_save_prefix"
19150
19151 if test "X$x" = "X-L$additional_libdir"; then
19152 haveit=yes
19153 break
19154 fi
19155 done
19156 if test -z "$haveit"; then
19157 if test -d "$additional_libdir"; then
19158 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
19159 fi
19160 fi
19161 fi
19162 fi
19163 ;;
19164 -R*)
19165 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19166 if test "$enable_rpath" != no; then
19167 haveit=
19168 for x in $rpathdirs; do
19169 if test "X$x" = "X$dir"; then
19170 haveit=yes
19171 break
19172 fi
19173 done
19174 if test -z "$haveit"; then
19175 rpathdirs="$rpathdirs $dir"
19176 fi
19177 haveit=
19178 for x in $ltrpathdirs; do
19179 if test "X$x" = "X$dir"; then
19180 haveit=yes
19181 break
19182 fi
19183 done
19184 if test -z "$haveit"; then
19185 ltrpathdirs="$ltrpathdirs $dir"
19186 fi
19187 fi
19188 ;;
19189 -l*)
19190 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19191 ;;
19192 *.la)
19193 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19194 ;;
19195 *)
19196 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
19197 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
19198 ;;
19199 esac
19200 done
19201 fi
19202 else
19203 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19204 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19205 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
19206 else
19207 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
19208 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
19209 fi
19210 fi
19211 fi
19212 fi
19213 done
19214 done
19215 if test "X$rpathdirs" != "X"; then
19216 if test -n "$hardcode_libdir_separator"; then
19217 alldirs=
19218 for found_dir in $rpathdirs; do
19219 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19220 done
19221 acl_save_libdir="$libdir"
19222 libdir="$alldirs"
19223 eval flag=\"$hardcode_libdir_flag_spec\"
19224 libdir="$acl_save_libdir"
19225 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19226 else
19227 for found_dir in $rpathdirs; do
19228 acl_save_libdir="$libdir"
19229 libdir="$found_dir"
19230 eval flag=\"$hardcode_libdir_flag_spec\"
19231 libdir="$acl_save_libdir"
19232 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19233 done
19234 fi
19235 fi
19236 if test "X$ltrpathdirs" != "X"; then
19237 for found_dir in $ltrpathdirs; do
19238 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
19239 done
19240 fi
19241
19242
19243 ac_save_CPPFLAGS="$CPPFLAGS"
19244
19245 for element in $INCBABELTRACE; do
19246 haveit=
19247 for x in $CPPFLAGS; do
19248
19249 acl_save_prefix="$prefix"
19250 prefix="$acl_final_prefix"
19251 acl_save_exec_prefix="$exec_prefix"
19252 exec_prefix="$acl_final_exec_prefix"
19253 eval x=\"$x\"
19254 exec_prefix="$acl_save_exec_prefix"
19255 prefix="$acl_save_prefix"
19256
19257 if test "X$x" = "X$element"; then
19258 haveit=yes
19259 break
19260 fi
19261 done
19262 if test -z "$haveit"; then
19263 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19264 fi
19265 done
19266
19267
19268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
19269 $as_echo_n "checking for libbabeltrace... " >&6; }
19270 if ${ac_cv_libbabeltrace+:} false; then :
19271 $as_echo_n "(cached) " >&6
19272 else
19273
19274 ac_save_LIBS="$LIBS"
19275 LIBS="$LIBS $LIBBABELTRACE"
19276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19277 /* end confdefs.h. */
19278 #include <babeltrace/babeltrace.h>
19279 #include <babeltrace/ctf/events.h>
19280 #include <babeltrace/ctf/iterator.h>
19281 int
19282 main ()
19283 {
19284 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
19285 struct bt_ctf_event *event = NULL;
19286 const struct bt_definition *scope;
19287
19288 pos->type = BT_SEEK_BEGIN;
19289 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
19290 scope = bt_ctf_get_top_level_scope (event,
19291 BT_STREAM_EVENT_HEADER);
19292 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
19293
19294 ;
19295 return 0;
19296 }
19297 _ACEOF
19298 if ac_fn_c_try_link "$LINENO"; then :
19299 ac_cv_libbabeltrace=yes
19300 else
19301 ac_cv_libbabeltrace=no
19302 fi
19303 rm -f core conftest.err conftest.$ac_objext \
19304 conftest$ac_exeext conftest.$ac_ext
19305 LIBS="$ac_save_LIBS"
19306
19307 fi
19308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
19309 $as_echo "$ac_cv_libbabeltrace" >&6; }
19310 if test "$ac_cv_libbabeltrace" = yes; then
19311 HAVE_LIBBABELTRACE=yes
19312
19313 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
19314
19315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
19316 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
19317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
19318 $as_echo "$LIBBABELTRACE" >&6; }
19319 else
19320 HAVE_LIBBABELTRACE=no
19321 CPPFLAGS="$ac_save_CPPFLAGS"
19322 LIBBABELTRACE=
19323 LTLIBBABELTRACE=
19324 fi
19325
19326
19327
19328
19329
19330
19331 CFLAGS=$saved_CFLAGS
19332
19333 if test "$HAVE_LIBBABELTRACE" != yes; then
19334 if test "$with_babeltrace" = yes; then
19335 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
19336 else
19337 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
19338 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
19339 fi
19340 fi
19341 fi
19342
19343 # Check for xxhash
19344
19345 # Check whether --with-xxhash was given.
19346 if test "${with_xxhash+set}" = set; then :
19347 withval=$with_xxhash;
19348 else
19349 with_xxhash=auto
19350 fi
19351
19352
19353 # Check whether --enable-libctf was given.
19354 if test "${enable_libctf+set}" = set; then :
19355 enableval=$enable_libctf;
19356 case "$enableval" in
19357 yes|no) ;;
19358 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
19359 esac
19360
19361 else
19362 enable_libctf=yes
19363 fi
19364
19365
19366 if test x${enable_static} = xno; then
19367 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
19368 CTF_DEPS="../libctf/.libs/libctf.so"
19369 else
19370 LIBCTF="../libctf/.libs/libctf.a"
19371 CTF_DEPS="$LIBCTF"
19372 fi
19373 if test "${enable_libctf}" = yes; then
19374
19375 $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
19376
19377 else
19378 LIBCTF=
19379 CTF_DEPS=
19380 fi
19381
19382
19383
19384 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
19385 # empty version.
19386
19387 if test "x$with_xxhash" != "xno"; then
19388
19389
19390
19391
19392
19393
19394
19395
19396 use_additional=yes
19397
19398 acl_save_prefix="$prefix"
19399 prefix="$acl_final_prefix"
19400 acl_save_exec_prefix="$exec_prefix"
19401 exec_prefix="$acl_final_exec_prefix"
19402
19403 eval additional_includedir=\"$includedir\"
19404 eval additional_libdir=\"$libdir\"
19405
19406 exec_prefix="$acl_save_exec_prefix"
19407 prefix="$acl_save_prefix"
19408
19409
19410 # Check whether --with-libxxhash-prefix was given.
19411 if test "${with_libxxhash_prefix+set}" = set; then :
19412 withval=$with_libxxhash_prefix;
19413 if test "X$withval" = "Xno"; then
19414 use_additional=no
19415 else
19416 if test "X$withval" = "X"; then
19417
19418 acl_save_prefix="$prefix"
19419 prefix="$acl_final_prefix"
19420 acl_save_exec_prefix="$exec_prefix"
19421 exec_prefix="$acl_final_exec_prefix"
19422
19423 eval additional_includedir=\"$includedir\"
19424 eval additional_libdir=\"$libdir\"
19425
19426 exec_prefix="$acl_save_exec_prefix"
19427 prefix="$acl_save_prefix"
19428
19429 else
19430 additional_includedir="$withval/include"
19431 additional_libdir="$withval/lib"
19432 fi
19433 fi
19434
19435 fi
19436
19437
19438 # Check whether --with-libxxhash-type was given.
19439 if test "${with_libxxhash_type+set}" = set; then :
19440 withval=$with_libxxhash_type; with_libxxhash_type=$withval
19441 else
19442 with_libxxhash_type=auto
19443 fi
19444
19445 lib_type=`eval echo \$with_libxxhash_type`
19446
19447 LIBXXHASH=
19448 LTLIBXXHASH=
19449 INCXXHASH=
19450 rpathdirs=
19451 ltrpathdirs=
19452 names_already_handled=
19453 names_next_round='xxhash '
19454 while test -n "$names_next_round"; do
19455 names_this_round="$names_next_round"
19456 names_next_round=
19457 for name in $names_this_round; do
19458 already_handled=
19459 for n in $names_already_handled; do
19460 if test "$n" = "$name"; then
19461 already_handled=yes
19462 break
19463 fi
19464 done
19465 if test -z "$already_handled"; then
19466 names_already_handled="$names_already_handled $name"
19467 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19468 eval value=\"\$HAVE_LIB$uppername\"
19469 if test -n "$value"; then
19470 if test "$value" = yes; then
19471 eval value=\"\$LIB$uppername\"
19472 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
19473 eval value=\"\$LTLIB$uppername\"
19474 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
19475 else
19476 :
19477 fi
19478 else
19479 found_dir=
19480 found_la=
19481 found_so=
19482 found_a=
19483 if test $use_additional = yes; then
19484 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19485 found_dir="$additional_libdir"
19486 found_so="$additional_libdir/lib$name.$shlibext"
19487 if test -f "$additional_libdir/lib$name.la"; then
19488 found_la="$additional_libdir/lib$name.la"
19489 fi
19490 elif test x$lib_type != xshared; then
19491 if test -f "$additional_libdir/lib$name.$libext"; then
19492 found_dir="$additional_libdir"
19493 found_a="$additional_libdir/lib$name.$libext"
19494 if test -f "$additional_libdir/lib$name.la"; then
19495 found_la="$additional_libdir/lib$name.la"
19496 fi
19497 fi
19498 fi
19499 fi
19500 if test "X$found_dir" = "X"; then
19501 for x in $LDFLAGS $LTLIBXXHASH; do
19502
19503 acl_save_prefix="$prefix"
19504 prefix="$acl_final_prefix"
19505 acl_save_exec_prefix="$exec_prefix"
19506 exec_prefix="$acl_final_exec_prefix"
19507 eval x=\"$x\"
19508 exec_prefix="$acl_save_exec_prefix"
19509 prefix="$acl_save_prefix"
19510
19511 case "$x" in
19512 -L*)
19513 dir=`echo "X$x" | sed -e 's/^X-L//'`
19514 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19515 found_dir="$dir"
19516 found_so="$dir/lib$name.$shlibext"
19517 if test -f "$dir/lib$name.la"; then
19518 found_la="$dir/lib$name.la"
19519 fi
19520 elif test x$lib_type != xshared; then
19521 if test -f "$dir/lib$name.$libext"; then
19522 found_dir="$dir"
19523 found_a="$dir/lib$name.$libext"
19524 if test -f "$dir/lib$name.la"; then
19525 found_la="$dir/lib$name.la"
19526 fi
19527 fi
19528 fi
19529 ;;
19530 esac
19531 if test "X$found_dir" != "X"; then
19532 break
19533 fi
19534 done
19535 fi
19536 if test "X$found_dir" != "X"; then
19537 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
19538 if test "X$found_so" != "X"; then
19539 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19540 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19541 else
19542 haveit=
19543 for x in $ltrpathdirs; do
19544 if test "X$x" = "X$found_dir"; then
19545 haveit=yes
19546 break
19547 fi
19548 done
19549 if test -z "$haveit"; then
19550 ltrpathdirs="$ltrpathdirs $found_dir"
19551 fi
19552 if test "$hardcode_direct" = yes; then
19553 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19554 else
19555 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19556 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19557 haveit=
19558 for x in $rpathdirs; do
19559 if test "X$x" = "X$found_dir"; then
19560 haveit=yes
19561 break
19562 fi
19563 done
19564 if test -z "$haveit"; then
19565 rpathdirs="$rpathdirs $found_dir"
19566 fi
19567 else
19568 haveit=
19569 for x in $LDFLAGS $LIBXXHASH; do
19570
19571 acl_save_prefix="$prefix"
19572 prefix="$acl_final_prefix"
19573 acl_save_exec_prefix="$exec_prefix"
19574 exec_prefix="$acl_final_exec_prefix"
19575 eval x=\"$x\"
19576 exec_prefix="$acl_save_exec_prefix"
19577 prefix="$acl_save_prefix"
19578
19579 if test "X$x" = "X-L$found_dir"; then
19580 haveit=yes
19581 break
19582 fi
19583 done
19584 if test -z "$haveit"; then
19585 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19586 fi
19587 if test "$hardcode_minus_L" != no; then
19588 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19589 else
19590 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19591 fi
19592 fi
19593 fi
19594 fi
19595 else
19596 if test "X$found_a" != "X"; then
19597 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19598 else
19599 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19600 fi
19601 fi
19602 additional_includedir=
19603 case "$found_dir" in
19604 */lib | */lib/)
19605 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19606 additional_includedir="$basedir/include"
19607 ;;
19608 esac
19609 if test "X$additional_includedir" != "X"; then
19610 if test "X$additional_includedir" != "X/usr/include"; then
19611 haveit=
19612 if test "X$additional_includedir" = "X/usr/local/include"; then
19613 if test -n "$GCC"; then
19614 case $host_os in
19615 linux*) haveit=yes;;
19616 esac
19617 fi
19618 fi
19619 if test -z "$haveit"; then
19620 for x in $CPPFLAGS $INCXXHASH; do
19621
19622 acl_save_prefix="$prefix"
19623 prefix="$acl_final_prefix"
19624 acl_save_exec_prefix="$exec_prefix"
19625 exec_prefix="$acl_final_exec_prefix"
19626 eval x=\"$x\"
19627 exec_prefix="$acl_save_exec_prefix"
19628 prefix="$acl_save_prefix"
19629
19630 if test "X$x" = "X-I$additional_includedir"; then
19631 haveit=yes
19632 break
19633 fi
19634 done
19635 if test -z "$haveit"; then
19636 if test -d "$additional_includedir"; then
19637 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19638 fi
19639 fi
19640 fi
19641 fi
19642 fi
19643 if test -n "$found_la"; then
19644 save_libdir="$libdir"
19645 case "$found_la" in
19646 */* | *\\*) . "$found_la" ;;
19647 *) . "./$found_la" ;;
19648 esac
19649 libdir="$save_libdir"
19650 for dep in $dependency_libs; do
19651 case "$dep" in
19652 -L*)
19653 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19654 if test "X$additional_libdir" != "X/usr/lib"; then
19655 haveit=
19656 if test "X$additional_libdir" = "X/usr/local/lib"; then
19657 if test -n "$GCC"; then
19658 case $host_os in
19659 linux*) haveit=yes;;
19660 esac
19661 fi
19662 fi
19663 if test -z "$haveit"; then
19664 haveit=
19665 for x in $LDFLAGS $LIBXXHASH; do
19666
19667 acl_save_prefix="$prefix"
19668 prefix="$acl_final_prefix"
19669 acl_save_exec_prefix="$exec_prefix"
19670 exec_prefix="$acl_final_exec_prefix"
19671 eval x=\"$x\"
19672 exec_prefix="$acl_save_exec_prefix"
19673 prefix="$acl_save_prefix"
19674
19675 if test "X$x" = "X-L$additional_libdir"; then
19676 haveit=yes
19677 break
19678 fi
19679 done
19680 if test -z "$haveit"; then
19681 if test -d "$additional_libdir"; then
19682 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19683 fi
19684 fi
19685 haveit=
19686 for x in $LDFLAGS $LTLIBXXHASH; do
19687
19688 acl_save_prefix="$prefix"
19689 prefix="$acl_final_prefix"
19690 acl_save_exec_prefix="$exec_prefix"
19691 exec_prefix="$acl_final_exec_prefix"
19692 eval x=\"$x\"
19693 exec_prefix="$acl_save_exec_prefix"
19694 prefix="$acl_save_prefix"
19695
19696 if test "X$x" = "X-L$additional_libdir"; then
19697 haveit=yes
19698 break
19699 fi
19700 done
19701 if test -z "$haveit"; then
19702 if test -d "$additional_libdir"; then
19703 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19704 fi
19705 fi
19706 fi
19707 fi
19708 ;;
19709 -R*)
19710 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19711 if test "$enable_rpath" != no; then
19712 haveit=
19713 for x in $rpathdirs; do
19714 if test "X$x" = "X$dir"; then
19715 haveit=yes
19716 break
19717 fi
19718 done
19719 if test -z "$haveit"; then
19720 rpathdirs="$rpathdirs $dir"
19721 fi
19722 haveit=
19723 for x in $ltrpathdirs; do
19724 if test "X$x" = "X$dir"; then
19725 haveit=yes
19726 break
19727 fi
19728 done
19729 if test -z "$haveit"; then
19730 ltrpathdirs="$ltrpathdirs $dir"
19731 fi
19732 fi
19733 ;;
19734 -l*)
19735 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19736 ;;
19737 *.la)
19738 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19739 ;;
19740 *)
19741 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19742 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19743 ;;
19744 esac
19745 done
19746 fi
19747 else
19748 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19749 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19750 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19751 else
19752 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19753 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19754 fi
19755 fi
19756 fi
19757 fi
19758 done
19759 done
19760 if test "X$rpathdirs" != "X"; then
19761 if test -n "$hardcode_libdir_separator"; then
19762 alldirs=
19763 for found_dir in $rpathdirs; do
19764 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19765 done
19766 acl_save_libdir="$libdir"
19767 libdir="$alldirs"
19768 eval flag=\"$hardcode_libdir_flag_spec\"
19769 libdir="$acl_save_libdir"
19770 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19771 else
19772 for found_dir in $rpathdirs; do
19773 acl_save_libdir="$libdir"
19774 libdir="$found_dir"
19775 eval flag=\"$hardcode_libdir_flag_spec\"
19776 libdir="$acl_save_libdir"
19777 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19778 done
19779 fi
19780 fi
19781 if test "X$ltrpathdirs" != "X"; then
19782 for found_dir in $ltrpathdirs; do
19783 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19784 done
19785 fi
19786
19787
19788 ac_save_CPPFLAGS="$CPPFLAGS"
19789
19790 for element in $INCXXHASH; do
19791 haveit=
19792 for x in $CPPFLAGS; do
19793
19794 acl_save_prefix="$prefix"
19795 prefix="$acl_final_prefix"
19796 acl_save_exec_prefix="$exec_prefix"
19797 exec_prefix="$acl_final_exec_prefix"
19798 eval x=\"$x\"
19799 exec_prefix="$acl_save_exec_prefix"
19800 prefix="$acl_save_prefix"
19801
19802 if test "X$x" = "X$element"; then
19803 haveit=yes
19804 break
19805 fi
19806 done
19807 if test -z "$haveit"; then
19808 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19809 fi
19810 done
19811
19812
19813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19814 $as_echo_n "checking for libxxhash... " >&6; }
19815 if ${ac_cv_libxxhash+:} false; then :
19816 $as_echo_n "(cached) " >&6
19817 else
19818
19819 ac_save_LIBS="$LIBS"
19820 LIBS="$LIBS $LIBXXHASH"
19821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19822 /* end confdefs.h. */
19823 #include <xxhash.h>
19824 int
19825 main ()
19826 {
19827 XXH32("foo", 3, 0);
19828
19829 ;
19830 return 0;
19831 }
19832 _ACEOF
19833 if ac_fn_c_try_link "$LINENO"; then :
19834 ac_cv_libxxhash=yes
19835 else
19836 ac_cv_libxxhash=no
19837 fi
19838 rm -f core conftest.err conftest.$ac_objext \
19839 conftest$ac_exeext conftest.$ac_ext
19840 LIBS="$ac_save_LIBS"
19841
19842 fi
19843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19844 $as_echo "$ac_cv_libxxhash" >&6; }
19845 if test "$ac_cv_libxxhash" = yes; then
19846 HAVE_LIBXXHASH=yes
19847
19848 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19849
19850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19851 $as_echo_n "checking how to link with libxxhash... " >&6; }
19852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19853 $as_echo "$LIBXXHASH" >&6; }
19854 else
19855 HAVE_LIBXXHASH=no
19856 CPPFLAGS="$ac_save_CPPFLAGS"
19857 LIBXXHASH=
19858 LTLIBXXHASH=
19859 fi
19860
19861
19862
19863
19864
19865
19866 if test "$HAVE_LIBXXHASH" != yes; then
19867 if test "$with_xxhash" = yes; then
19868 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19869 fi
19870 fi
19871 if test "x$with_xxhash" = "xauto"; then
19872 with_xxhash="$HAVE_LIBXXHASH"
19873 fi
19874 fi
19875
19876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19877 $as_echo_n "checking whether to use xxhash... " >&6; }
19878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19879 $as_echo "$with_xxhash" >&6; }
19880
19881 NM_H=
19882 rm -f nm.h
19883 if test "${nativefile}" != ""; then
19884 case "${nativefile}" in
19885 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19886 * ) GDB_NM_FILE="${nativefile}"
19887 esac
19888 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19889
19890
19891 cat >>confdefs.h <<_ACEOF
19892 #define GDB_NM_FILE "${GDB_NM_FILE}"
19893 _ACEOF
19894
19895 NM_H=nm.h
19896 fi
19897
19898
19899
19900 for ac_prog in xsltproc
19901 do
19902 # Extract the first word of "$ac_prog", so it can be a program name with args.
19903 set dummy $ac_prog; ac_word=$2
19904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19905 $as_echo_n "checking for $ac_word... " >&6; }
19906 if ${ac_cv_path_XSLTPROC+:} false; then :
19907 $as_echo_n "(cached) " >&6
19908 else
19909 case $XSLTPROC in
19910 [\\/]* | ?:[\\/]*)
19911 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19912 ;;
19913 *)
19914 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19915 for as_dir in $PATH
19916 do
19917 IFS=$as_save_IFS
19918 test -z "$as_dir" && as_dir=.
19919 for ac_exec_ext in '' $ac_executable_extensions; do
19920 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19921 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19922 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19923 break 2
19924 fi
19925 done
19926 done
19927 IFS=$as_save_IFS
19928
19929 ;;
19930 esac
19931 fi
19932 XSLTPROC=$ac_cv_path_XSLTPROC
19933 if test -n "$XSLTPROC"; then
19934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19935 $as_echo "$XSLTPROC" >&6; }
19936 else
19937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19938 $as_echo "no" >&6; }
19939 fi
19940
19941
19942 test -n "$XSLTPROC" && break
19943 done
19944 test -n "$XSLTPROC" || XSLTPROC="missing"
19945
19946 if test "x$USE_MAINTAINER_MODE" = xyes; then
19947 if test "${XSLTPROC}" = missing; then
19948 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19949 fi
19950 fi
19951
19952
19953
19954
19955
19956 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19957
19958
19959
19960 # Check whether we will enable the inclusion of unit tests when
19961 # compiling GDB.
19962 #
19963 # The default value of this option changes depending whether we're on
19964 # development mode (in which case it's "true") or not (in which case
19965 # it's "false"). The $development variable is set by the GDB_AC_COMMON
19966 # macro, which must therefore be used before GDB_AC_SELFTEST.
19967
19968 if test "x$development" != xtrue && test "x$development" != xfalse; then :
19969 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19970 fi
19971
19972 # Check whether --enable-unit-tests was given.
19973 if test "${enable_unit_tests+set}" = set; then :
19974 enableval=$enable_unit_tests; case "${enableval}" in
19975 yes) enable_unittests=true ;;
19976 no) enable_unittests=false ;;
19977 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19978 esac
19979 else
19980 enable_unittests=$development
19981 fi
19982
19983
19984 if $enable_unittests; then
19985
19986 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19987
19988
19989 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19990 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19991
19992 fi
19993
19994
19995
19996 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19997 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19998 if test "x$GDB_TRANSFORM_NAME" = x; then
19999 GDB_TRANSFORM_NAME=gdb
20000 fi
20001
20002
20003
20004 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
20005 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
20006 if test "x$GCORE_TRANSFORM_NAME" = x; then
20007 GCORE_TRANSFORM_NAME=gcore
20008 fi
20009
20010
20011 ac_config_files="$ac_config_files gcore"
20012
20013 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
20014
20015
20016 cat >confcache <<\_ACEOF
20017 # This file is a shell script that caches the results of configure
20018 # tests run on this system so they can be shared between configure
20019 # scripts and configure runs, see configure's option --config-cache.
20020 # It is not useful on other systems. If it contains results you don't
20021 # want to keep, you may remove or edit it.
20022 #
20023 # config.status only pays attention to the cache file if you give it
20024 # the --recheck option to rerun configure.
20025 #
20026 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20027 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20028 # following values.
20029
20030 _ACEOF
20031
20032 # The following way of writing the cache mishandles newlines in values,
20033 # but we know of no workaround that is simple, portable, and efficient.
20034 # So, we kill variables containing newlines.
20035 # Ultrix sh set writes to stderr and can't be redirected directly,
20036 # and sets the high bit in the cache file unless we assign to the vars.
20037 (
20038 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20039 eval ac_val=\$$ac_var
20040 case $ac_val in #(
20041 *${as_nl}*)
20042 case $ac_var in #(
20043 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20044 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20045 esac
20046 case $ac_var in #(
20047 _ | IFS | as_nl) ;; #(
20048 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20049 *) { eval $ac_var=; unset $ac_var;} ;;
20050 esac ;;
20051 esac
20052 done
20053
20054 (set) 2>&1 |
20055 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20056 *${as_nl}ac_space=\ *)
20057 # `set' does not quote correctly, so add quotes: double-quote
20058 # substitution turns \\\\ into \\, and sed turns \\ into \.
20059 sed -n \
20060 "s/'/'\\\\''/g;
20061 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20062 ;; #(
20063 *)
20064 # `set' quotes correctly as required by POSIX, so do not add quotes.
20065 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20066 ;;
20067 esac |
20068 sort
20069 ) |
20070 sed '
20071 /^ac_cv_env_/b end
20072 t clear
20073 :clear
20074 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20075 t end
20076 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20077 :end' >>confcache
20078 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20079 if test -w "$cache_file"; then
20080 if test "x$cache_file" != "x/dev/null"; then
20081 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20082 $as_echo "$as_me: updating cache $cache_file" >&6;}
20083 if test ! -f "$cache_file" || test -h "$cache_file"; then
20084 cat confcache >"$cache_file"
20085 else
20086 case $cache_file in #(
20087 */* | ?:*)
20088 mv -f confcache "$cache_file"$$ &&
20089 mv -f "$cache_file"$$ "$cache_file" ;; #(
20090 *)
20091 mv -f confcache "$cache_file" ;;
20092 esac
20093 fi
20094 fi
20095 else
20096 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20097 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20098 fi
20099 fi
20100 rm -f confcache
20101
20102 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20103 # Let make expand exec_prefix.
20104 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20105
20106 DEFS=-DHAVE_CONFIG_H
20107
20108 ac_libobjs=
20109 ac_ltlibobjs=
20110 U=
20111 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20112 # 1. Remove the extension, and $U if already installed.
20113 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20114 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20115 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20116 # will be set to the directory where LIBOBJS objects are built.
20117 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20118 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20119 done
20120 LIBOBJS=$ac_libobjs
20121
20122 LTLIBOBJS=$ac_ltlibobjs
20123
20124
20125 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
20126 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
20127 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20128 fi
20129 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
20130 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
20131 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20132 fi
20133 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
20134 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
20135 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20136 fi
20137
20138
20139 : "${CONFIG_STATUS=./config.status}"
20140 ac_write_fail=0
20141 ac_clean_files_save=$ac_clean_files
20142 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20143 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20144 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20145 as_write_fail=0
20146 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20147 #! $SHELL
20148 # Generated by $as_me.
20149 # Run this file to recreate the current configuration.
20150 # Compiler output produced by configure, useful for debugging
20151 # configure, is in config.log if it exists.
20152
20153 debug=false
20154 ac_cs_recheck=false
20155 ac_cs_silent=false
20156
20157 SHELL=\${CONFIG_SHELL-$SHELL}
20158 export SHELL
20159 _ASEOF
20160 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20161 ## -------------------- ##
20162 ## M4sh Initialization. ##
20163 ## -------------------- ##
20164
20165 # Be more Bourne compatible
20166 DUALCASE=1; export DUALCASE # for MKS sh
20167 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20168 emulate sh
20169 NULLCMD=:
20170 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20171 # is contrary to our usage. Disable this feature.
20172 alias -g '${1+"$@"}'='"$@"'
20173 setopt NO_GLOB_SUBST
20174 else
20175 case `(set -o) 2>/dev/null` in #(
20176 *posix*) :
20177 set -o posix ;; #(
20178 *) :
20179 ;;
20180 esac
20181 fi
20182
20183
20184 as_nl='
20185 '
20186 export as_nl
20187 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20188 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20189 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20190 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20191 # Prefer a ksh shell builtin over an external printf program on Solaris,
20192 # but without wasting forks for bash or zsh.
20193 if test -z "$BASH_VERSION$ZSH_VERSION" \
20194 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20195 as_echo='print -r --'
20196 as_echo_n='print -rn --'
20197 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20198 as_echo='printf %s\n'
20199 as_echo_n='printf %s'
20200 else
20201 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20202 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20203 as_echo_n='/usr/ucb/echo -n'
20204 else
20205 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20206 as_echo_n_body='eval
20207 arg=$1;
20208 case $arg in #(
20209 *"$as_nl"*)
20210 expr "X$arg" : "X\\(.*\\)$as_nl";
20211 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20212 esac;
20213 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20214 '
20215 export as_echo_n_body
20216 as_echo_n='sh -c $as_echo_n_body as_echo'
20217 fi
20218 export as_echo_body
20219 as_echo='sh -c $as_echo_body as_echo'
20220 fi
20221
20222 # The user is always right.
20223 if test "${PATH_SEPARATOR+set}" != set; then
20224 PATH_SEPARATOR=:
20225 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20226 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20227 PATH_SEPARATOR=';'
20228 }
20229 fi
20230
20231
20232 # IFS
20233 # We need space, tab and new line, in precisely that order. Quoting is
20234 # there to prevent editors from complaining about space-tab.
20235 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20236 # splitting by setting IFS to empty value.)
20237 IFS=" "" $as_nl"
20238
20239 # Find who we are. Look in the path if we contain no directory separator.
20240 as_myself=
20241 case $0 in #((
20242 *[\\/]* ) as_myself=$0 ;;
20243 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20244 for as_dir in $PATH
20245 do
20246 IFS=$as_save_IFS
20247 test -z "$as_dir" && as_dir=.
20248 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20249 done
20250 IFS=$as_save_IFS
20251
20252 ;;
20253 esac
20254 # We did not find ourselves, most probably we were run as `sh COMMAND'
20255 # in which case we are not to be found in the path.
20256 if test "x$as_myself" = x; then
20257 as_myself=$0
20258 fi
20259 if test ! -f "$as_myself"; then
20260 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20261 exit 1
20262 fi
20263
20264 # Unset variables that we do not need and which cause bugs (e.g. in
20265 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20266 # suppresses any "Segmentation fault" message there. '((' could
20267 # trigger a bug in pdksh 5.2.14.
20268 for as_var in BASH_ENV ENV MAIL MAILPATH
20269 do eval test x\${$as_var+set} = xset \
20270 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20271 done
20272 PS1='$ '
20273 PS2='> '
20274 PS4='+ '
20275
20276 # NLS nuisances.
20277 LC_ALL=C
20278 export LC_ALL
20279 LANGUAGE=C
20280 export LANGUAGE
20281
20282 # CDPATH.
20283 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20284
20285
20286 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20287 # ----------------------------------------
20288 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20289 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20290 # script with STATUS, using 1 if that was 0.
20291 as_fn_error ()
20292 {
20293 as_status=$1; test $as_status -eq 0 && as_status=1
20294 if test "$4"; then
20295 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20296 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20297 fi
20298 $as_echo "$as_me: error: $2" >&2
20299 as_fn_exit $as_status
20300 } # as_fn_error
20301
20302
20303 # as_fn_set_status STATUS
20304 # -----------------------
20305 # Set $? to STATUS, without forking.
20306 as_fn_set_status ()
20307 {
20308 return $1
20309 } # as_fn_set_status
20310
20311 # as_fn_exit STATUS
20312 # -----------------
20313 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20314 as_fn_exit ()
20315 {
20316 set +e
20317 as_fn_set_status $1
20318 exit $1
20319 } # as_fn_exit
20320
20321 # as_fn_unset VAR
20322 # ---------------
20323 # Portably unset VAR.
20324 as_fn_unset ()
20325 {
20326 { eval $1=; unset $1;}
20327 }
20328 as_unset=as_fn_unset
20329 # as_fn_append VAR VALUE
20330 # ----------------------
20331 # Append the text in VALUE to the end of the definition contained in VAR. Take
20332 # advantage of any shell optimizations that allow amortized linear growth over
20333 # repeated appends, instead of the typical quadratic growth present in naive
20334 # implementations.
20335 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20336 eval 'as_fn_append ()
20337 {
20338 eval $1+=\$2
20339 }'
20340 else
20341 as_fn_append ()
20342 {
20343 eval $1=\$$1\$2
20344 }
20345 fi # as_fn_append
20346
20347 # as_fn_arith ARG...
20348 # ------------------
20349 # Perform arithmetic evaluation on the ARGs, and store the result in the
20350 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20351 # must be portable across $(()) and expr.
20352 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20353 eval 'as_fn_arith ()
20354 {
20355 as_val=$(( $* ))
20356 }'
20357 else
20358 as_fn_arith ()
20359 {
20360 as_val=`expr "$@" || test $? -eq 1`
20361 }
20362 fi # as_fn_arith
20363
20364
20365 if expr a : '\(a\)' >/dev/null 2>&1 &&
20366 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20367 as_expr=expr
20368 else
20369 as_expr=false
20370 fi
20371
20372 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20373 as_basename=basename
20374 else
20375 as_basename=false
20376 fi
20377
20378 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20379 as_dirname=dirname
20380 else
20381 as_dirname=false
20382 fi
20383
20384 as_me=`$as_basename -- "$0" ||
20385 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20386 X"$0" : 'X\(//\)$' \| \
20387 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20388 $as_echo X/"$0" |
20389 sed '/^.*\/\([^/][^/]*\)\/*$/{
20390 s//\1/
20391 q
20392 }
20393 /^X\/\(\/\/\)$/{
20394 s//\1/
20395 q
20396 }
20397 /^X\/\(\/\).*/{
20398 s//\1/
20399 q
20400 }
20401 s/.*/./; q'`
20402
20403 # Avoid depending upon Character Ranges.
20404 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20405 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20406 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20407 as_cr_digits='0123456789'
20408 as_cr_alnum=$as_cr_Letters$as_cr_digits
20409
20410 ECHO_C= ECHO_N= ECHO_T=
20411 case `echo -n x` in #(((((
20412 -n*)
20413 case `echo 'xy\c'` in
20414 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20415 xy) ECHO_C='\c';;
20416 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20417 ECHO_T=' ';;
20418 esac;;
20419 *)
20420 ECHO_N='-n';;
20421 esac
20422
20423 rm -f conf$$ conf$$.exe conf$$.file
20424 if test -d conf$$.dir; then
20425 rm -f conf$$.dir/conf$$.file
20426 else
20427 rm -f conf$$.dir
20428 mkdir conf$$.dir 2>/dev/null
20429 fi
20430 if (echo >conf$$.file) 2>/dev/null; then
20431 if ln -s conf$$.file conf$$ 2>/dev/null; then
20432 as_ln_s='ln -s'
20433 # ... but there are two gotchas:
20434 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20435 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20436 # In both cases, we have to default to `cp -pR'.
20437 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20438 as_ln_s='cp -pR'
20439 elif ln conf$$.file conf$$ 2>/dev/null; then
20440 as_ln_s=ln
20441 else
20442 as_ln_s='cp -pR'
20443 fi
20444 else
20445 as_ln_s='cp -pR'
20446 fi
20447 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20448 rmdir conf$$.dir 2>/dev/null
20449
20450
20451 # as_fn_mkdir_p
20452 # -------------
20453 # Create "$as_dir" as a directory, including parents if necessary.
20454 as_fn_mkdir_p ()
20455 {
20456
20457 case $as_dir in #(
20458 -*) as_dir=./$as_dir;;
20459 esac
20460 test -d "$as_dir" || eval $as_mkdir_p || {
20461 as_dirs=
20462 while :; do
20463 case $as_dir in #(
20464 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20465 *) as_qdir=$as_dir;;
20466 esac
20467 as_dirs="'$as_qdir' $as_dirs"
20468 as_dir=`$as_dirname -- "$as_dir" ||
20469 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20470 X"$as_dir" : 'X\(//\)[^/]' \| \
20471 X"$as_dir" : 'X\(//\)$' \| \
20472 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20473 $as_echo X"$as_dir" |
20474 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20475 s//\1/
20476 q
20477 }
20478 /^X\(\/\/\)[^/].*/{
20479 s//\1/
20480 q
20481 }
20482 /^X\(\/\/\)$/{
20483 s//\1/
20484 q
20485 }
20486 /^X\(\/\).*/{
20487 s//\1/
20488 q
20489 }
20490 s/.*/./; q'`
20491 test -d "$as_dir" && break
20492 done
20493 test -z "$as_dirs" || eval "mkdir $as_dirs"
20494 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20495
20496
20497 } # as_fn_mkdir_p
20498 if mkdir -p . 2>/dev/null; then
20499 as_mkdir_p='mkdir -p "$as_dir"'
20500 else
20501 test -d ./-p && rmdir ./-p
20502 as_mkdir_p=false
20503 fi
20504
20505
20506 # as_fn_executable_p FILE
20507 # -----------------------
20508 # Test if FILE is an executable regular file.
20509 as_fn_executable_p ()
20510 {
20511 test -f "$1" && test -x "$1"
20512 } # as_fn_executable_p
20513 as_test_x='test -x'
20514 as_executable_p=as_fn_executable_p
20515
20516 # Sed expression to map a string onto a valid CPP name.
20517 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20518
20519 # Sed expression to map a string onto a valid variable name.
20520 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20521
20522
20523 exec 6>&1
20524 ## ----------------------------------- ##
20525 ## Main body of $CONFIG_STATUS script. ##
20526 ## ----------------------------------- ##
20527 _ASEOF
20528 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20529
20530 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20531 # Save the log message, to keep $0 and so on meaningful, and to
20532 # report actual input values of CONFIG_FILES etc. instead of their
20533 # values after options handling.
20534 ac_log="
20535 This file was extended by $as_me, which was
20536 generated by GNU Autoconf 2.69. Invocation command line was
20537
20538 CONFIG_FILES = $CONFIG_FILES
20539 CONFIG_HEADERS = $CONFIG_HEADERS
20540 CONFIG_LINKS = $CONFIG_LINKS
20541 CONFIG_COMMANDS = $CONFIG_COMMANDS
20542 $ $0 $@
20543
20544 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20545 "
20546
20547 _ACEOF
20548
20549 case $ac_config_files in *"
20550 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20551 esac
20552
20553 case $ac_config_headers in *"
20554 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20555 esac
20556
20557
20558 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20559 # Files that config.status was made for.
20560 config_files="$ac_config_files"
20561 config_headers="$ac_config_headers"
20562 config_links="$ac_config_links"
20563 config_commands="$ac_config_commands"
20564
20565 _ACEOF
20566
20567 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20568 ac_cs_usage="\
20569 \`$as_me' instantiates files and other configuration actions
20570 from templates according to the current configuration. Unless the files
20571 and actions are specified as TAGs, all are instantiated by default.
20572
20573 Usage: $0 [OPTION]... [TAG]...
20574
20575 -h, --help print this help, then exit
20576 -V, --version print version number and configuration settings, then exit
20577 --config print configuration, then exit
20578 -q, --quiet, --silent
20579 do not print progress messages
20580 -d, --debug don't remove temporary files
20581 --recheck update $as_me by reconfiguring in the same conditions
20582 --file=FILE[:TEMPLATE]
20583 instantiate the configuration file FILE
20584 --header=FILE[:TEMPLATE]
20585 instantiate the configuration header FILE
20586
20587 Configuration files:
20588 $config_files
20589
20590 Configuration headers:
20591 $config_headers
20592
20593 Configuration links:
20594 $config_links
20595
20596 Configuration commands:
20597 $config_commands
20598
20599 Report bugs to the package provider."
20600
20601 _ACEOF
20602 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20603 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20604 ac_cs_version="\\
20605 config.status
20606 configured by $0, generated by GNU Autoconf 2.69,
20607 with options \\"\$ac_cs_config\\"
20608
20609 Copyright (C) 2012 Free Software Foundation, Inc.
20610 This config.status script is free software; the Free Software Foundation
20611 gives unlimited permission to copy, distribute and modify it."
20612
20613 ac_pwd='$ac_pwd'
20614 srcdir='$srcdir'
20615 INSTALL='$INSTALL'
20616 AWK='$AWK'
20617 test -n "\$AWK" || AWK=awk
20618 _ACEOF
20619
20620 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20621 # The default lists apply if the user does not specify any file.
20622 ac_need_defaults=:
20623 while test $# != 0
20624 do
20625 case $1 in
20626 --*=?*)
20627 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20628 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20629 ac_shift=:
20630 ;;
20631 --*=)
20632 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20633 ac_optarg=
20634 ac_shift=:
20635 ;;
20636 *)
20637 ac_option=$1
20638 ac_optarg=$2
20639 ac_shift=shift
20640 ;;
20641 esac
20642
20643 case $ac_option in
20644 # Handling of the options.
20645 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20646 ac_cs_recheck=: ;;
20647 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20648 $as_echo "$ac_cs_version"; exit ;;
20649 --config | --confi | --conf | --con | --co | --c )
20650 $as_echo "$ac_cs_config"; exit ;;
20651 --debug | --debu | --deb | --de | --d | -d )
20652 debug=: ;;
20653 --file | --fil | --fi | --f )
20654 $ac_shift
20655 case $ac_optarg in
20656 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20657 '') as_fn_error $? "missing file argument" ;;
20658 esac
20659 as_fn_append CONFIG_FILES " '$ac_optarg'"
20660 ac_need_defaults=false;;
20661 --header | --heade | --head | --hea )
20662 $ac_shift
20663 case $ac_optarg in
20664 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20665 esac
20666 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20667 ac_need_defaults=false;;
20668 --he | --h)
20669 # Conflict between --help and --header
20670 as_fn_error $? "ambiguous option: \`$1'
20671 Try \`$0 --help' for more information.";;
20672 --help | --hel | -h )
20673 $as_echo "$ac_cs_usage"; exit ;;
20674 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20675 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20676 ac_cs_silent=: ;;
20677
20678 # This is an error.
20679 -*) as_fn_error $? "unrecognized option: \`$1'
20680 Try \`$0 --help' for more information." ;;
20681
20682 *) as_fn_append ac_config_targets " $1"
20683 ac_need_defaults=false ;;
20684
20685 esac
20686 shift
20687 done
20688
20689 ac_configure_extra_args=
20690
20691 if $ac_cs_silent; then
20692 exec 6>/dev/null
20693 ac_configure_extra_args="$ac_configure_extra_args --silent"
20694 fi
20695
20696 _ACEOF
20697 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20698 if \$ac_cs_recheck; then
20699 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20700 shift
20701 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20702 CONFIG_SHELL='$SHELL'
20703 export CONFIG_SHELL
20704 exec "\$@"
20705 fi
20706
20707 _ACEOF
20708 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20709 exec 5>>config.log
20710 {
20711 echo
20712 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20713 ## Running $as_me. ##
20714 _ASBOX
20715 $as_echo "$ac_log"
20716 } >&5
20717
20718 _ACEOF
20719 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20720 #
20721 # INIT-COMMANDS
20722 #
20723 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20724 GDB_NM_FILE=$GDB_NM_FILE
20725
20726 _ACEOF
20727
20728 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20729
20730 # Handling of arguments.
20731 for ac_config_target in $ac_config_targets
20732 do
20733 case $ac_config_target in
20734 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20735 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20736 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20737 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20738 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20739 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20740 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20741 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20742 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20743 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20744
20745 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20746 esac
20747 done
20748
20749
20750 # If the user did not use the arguments to specify the items to instantiate,
20751 # then the envvar interface is used. Set only those that are not.
20752 # We use the long form for the default assignment because of an extremely
20753 # bizarre bug on SunOS 4.1.3.
20754 if $ac_need_defaults; then
20755 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20756 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20757 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20758 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20759 fi
20760
20761 # Have a temporary directory for convenience. Make it in the build tree
20762 # simply because there is no reason against having it here, and in addition,
20763 # creating and moving files from /tmp can sometimes cause problems.
20764 # Hook for its removal unless debugging.
20765 # Note that there is a small window in which the directory will not be cleaned:
20766 # after its creation but before its name has been assigned to `$tmp'.
20767 $debug ||
20768 {
20769 tmp= ac_tmp=
20770 trap 'exit_status=$?
20771 : "${ac_tmp:=$tmp}"
20772 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20773 ' 0
20774 trap 'as_fn_exit 1' 1 2 13 15
20775 }
20776 # Create a (secure) tmp directory for tmp files.
20777
20778 {
20779 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20780 test -d "$tmp"
20781 } ||
20782 {
20783 tmp=./conf$$-$RANDOM
20784 (umask 077 && mkdir "$tmp")
20785 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20786 ac_tmp=$tmp
20787
20788 # Set up the scripts for CONFIG_FILES section.
20789 # No need to generate them if there are no CONFIG_FILES.
20790 # This happens for instance with `./config.status config.h'.
20791 if test -n "$CONFIG_FILES"; then
20792
20793 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20794 ac_cs_awk_getline=:
20795 ac_cs_awk_pipe_init=
20796 ac_cs_awk_read_file='
20797 while ((getline aline < (F[key])) > 0)
20798 print(aline)
20799 close(F[key])'
20800 ac_cs_awk_pipe_fini=
20801 else
20802 ac_cs_awk_getline=false
20803 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20804 ac_cs_awk_read_file='
20805 print "|#_!!_#|"
20806 print "cat " F[key] " &&"
20807 '$ac_cs_awk_pipe_init
20808 # The final `:' finishes the AND list.
20809 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20810 fi
20811 ac_cr=`echo X | tr X '\015'`
20812 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20813 # But we know of no other shell where ac_cr would be empty at this
20814 # point, so we can use a bashism as a fallback.
20815 if test "x$ac_cr" = x; then
20816 eval ac_cr=\$\'\\r\'
20817 fi
20818 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20819 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20820 ac_cs_awk_cr='\\r'
20821 else
20822 ac_cs_awk_cr=$ac_cr
20823 fi
20824
20825 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20826 _ACEOF
20827
20828 # Create commands to substitute file output variables.
20829 {
20830 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20831 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20832 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20833 echo "_ACAWK" &&
20834 echo "_ACEOF"
20835 } >conf$$files.sh &&
20836 . ./conf$$files.sh ||
20837 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20838 rm -f conf$$files.sh
20839
20840 {
20841 echo "cat >conf$$subs.awk <<_ACEOF" &&
20842 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20843 echo "_ACEOF"
20844 } >conf$$subs.sh ||
20845 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20846 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20847 ac_delim='%!_!# '
20848 for ac_last_try in false false false false false :; do
20849 . ./conf$$subs.sh ||
20850 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20851
20852 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20853 if test $ac_delim_n = $ac_delim_num; then
20854 break
20855 elif $ac_last_try; then
20856 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20857 else
20858 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20859 fi
20860 done
20861 rm -f conf$$subs.sh
20862
20863 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20864 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20865 _ACEOF
20866 sed -n '
20867 h
20868 s/^/S["/; s/!.*/"]=/
20869 p
20870 g
20871 s/^[^!]*!//
20872 :repl
20873 t repl
20874 s/'"$ac_delim"'$//
20875 t delim
20876 :nl
20877 h
20878 s/\(.\{148\}\)..*/\1/
20879 t more1
20880 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20881 p
20882 n
20883 b repl
20884 :more1
20885 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20886 p
20887 g
20888 s/.\{148\}//
20889 t nl
20890 :delim
20891 h
20892 s/\(.\{148\}\)..*/\1/
20893 t more2
20894 s/["\\]/\\&/g; s/^/"/; s/$/"/
20895 p
20896 b
20897 :more2
20898 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20899 p
20900 g
20901 s/.\{148\}//
20902 t delim
20903 ' <conf$$subs.awk | sed '
20904 /^[^""]/{
20905 N
20906 s/\n//
20907 }
20908 ' >>$CONFIG_STATUS || ac_write_fail=1
20909 rm -f conf$$subs.awk
20910 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20911 _ACAWK
20912 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20913 for (key in S) S_is_set[key] = 1
20914 FS = "\a"
20915 \$ac_cs_awk_pipe_init
20916 }
20917 {
20918 line = $ 0
20919 nfields = split(line, field, "@")
20920 substed = 0
20921 len = length(field[1])
20922 for (i = 2; i < nfields; i++) {
20923 key = field[i]
20924 keylen = length(key)
20925 if (S_is_set[key]) {
20926 value = S[key]
20927 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20928 len += length(value) + length(field[++i])
20929 substed = 1
20930 } else
20931 len += 1 + keylen
20932 }
20933 if (nfields == 3 && !substed) {
20934 key = field[2]
20935 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20936 \$ac_cs_awk_read_file
20937 next
20938 }
20939 }
20940 print line
20941 }
20942 \$ac_cs_awk_pipe_fini
20943 _ACAWK
20944 _ACEOF
20945 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20946 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20947 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20948 else
20949 cat
20950 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20951 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20952 _ACEOF
20953
20954 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20955 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20956 # trailing colons and then remove the whole line if VPATH becomes empty
20957 # (actually we leave an empty line to preserve line numbers).
20958 if test "x$srcdir" = x.; then
20959 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20960 h
20961 s///
20962 s/^/:/
20963 s/[ ]*$/:/
20964 s/:\$(srcdir):/:/g
20965 s/:\${srcdir}:/:/g
20966 s/:@srcdir@:/:/g
20967 s/^:*//
20968 s/:*$//
20969 x
20970 s/\(=[ ]*\).*/\1/
20971 G
20972 s/\n//
20973 s/^[^=]*=[ ]*$//
20974 }'
20975 fi
20976
20977 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20978 fi # test -n "$CONFIG_FILES"
20979
20980 # Set up the scripts for CONFIG_HEADERS section.
20981 # No need to generate them if there are no CONFIG_HEADERS.
20982 # This happens for instance with `./config.status Makefile'.
20983 if test -n "$CONFIG_HEADERS"; then
20984 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20985 BEGIN {
20986 _ACEOF
20987
20988 # Transform confdefs.h into an awk script `defines.awk', embedded as
20989 # here-document in config.status, that substitutes the proper values into
20990 # config.h.in to produce config.h.
20991
20992 # Create a delimiter string that does not exist in confdefs.h, to ease
20993 # handling of long lines.
20994 ac_delim='%!_!# '
20995 for ac_last_try in false false :; do
20996 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20997 if test -z "$ac_tt"; then
20998 break
20999 elif $ac_last_try; then
21000 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
21001 else
21002 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
21003 fi
21004 done
21005
21006 # For the awk script, D is an array of macro values keyed by name,
21007 # likewise P contains macro parameters if any. Preserve backslash
21008 # newline sequences.
21009
21010 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21011 sed -n '
21012 s/.\{148\}/&'"$ac_delim"'/g
21013 t rset
21014 :rset
21015 s/^[ ]*#[ ]*define[ ][ ]*/ /
21016 t def
21017 d
21018 :def
21019 s/\\$//
21020 t bsnl
21021 s/["\\]/\\&/g
21022 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21023 D["\1"]=" \3"/p
21024 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21025 d
21026 :bsnl
21027 s/["\\]/\\&/g
21028 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21029 D["\1"]=" \3\\\\\\n"\\/p
21030 t cont
21031 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21032 t cont
21033 d
21034 :cont
21035 n
21036 s/.\{148\}/&'"$ac_delim"'/g
21037 t clear
21038 :clear
21039 s/\\$//
21040 t bsnlc
21041 s/["\\]/\\&/g; s/^/"/; s/$/"/p
21042 d
21043 :bsnlc
21044 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21045 b cont
21046 ' <confdefs.h | sed '
21047 s/'"$ac_delim"'/"\\\
21048 "/g' >>$CONFIG_STATUS || ac_write_fail=1
21049
21050 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21051 for (key in D) D_is_set[key] = 1
21052 FS = "\a"
21053 }
21054 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21055 line = \$ 0
21056 split(line, arg, " ")
21057 if (arg[1] == "#") {
21058 defundef = arg[2]
21059 mac1 = arg[3]
21060 } else {
21061 defundef = substr(arg[1], 2)
21062 mac1 = arg[2]
21063 }
21064 split(mac1, mac2, "(") #)
21065 macro = mac2[1]
21066 prefix = substr(line, 1, index(line, defundef) - 1)
21067 if (D_is_set[macro]) {
21068 # Preserve the white space surrounding the "#".
21069 print prefix "define", macro P[macro] D[macro]
21070 next
21071 } else {
21072 # Replace #undef with comments. This is necessary, for example,
21073 # in the case of _POSIX_SOURCE, which is predefined and required
21074 # on some systems where configure will not decide to define it.
21075 if (defundef == "undef") {
21076 print "/*", prefix defundef, macro, "*/"
21077 next
21078 }
21079 }
21080 }
21081 { print }
21082 _ACAWK
21083 _ACEOF
21084 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21085 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21086 fi # test -n "$CONFIG_HEADERS"
21087
21088
21089 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
21090 shift
21091 for ac_tag
21092 do
21093 case $ac_tag in
21094 :[FHLC]) ac_mode=$ac_tag; continue;;
21095 esac
21096 case $ac_mode$ac_tag in
21097 :[FHL]*:*);;
21098 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21099 :[FH]-) ac_tag=-:-;;
21100 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21101 esac
21102 ac_save_IFS=$IFS
21103 IFS=:
21104 set x $ac_tag
21105 IFS=$ac_save_IFS
21106 shift
21107 ac_file=$1
21108 shift
21109
21110 case $ac_mode in
21111 :L) ac_source=$1;;
21112 :[FH])
21113 ac_file_inputs=
21114 for ac_f
21115 do
21116 case $ac_f in
21117 -) ac_f="$ac_tmp/stdin";;
21118 *) # Look for the file first in the build tree, then in the source tree
21119 # (if the path is not absolute). The absolute path cannot be DOS-style,
21120 # because $ac_f cannot contain `:'.
21121 test -f "$ac_f" ||
21122 case $ac_f in
21123 [\\/$]*) false;;
21124 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21125 esac ||
21126 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21127 esac
21128 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21129 as_fn_append ac_file_inputs " '$ac_f'"
21130 done
21131
21132 # Let's still pretend it is `configure' which instantiates (i.e., don't
21133 # use $as_me), people would be surprised to read:
21134 # /* config.h. Generated by config.status. */
21135 configure_input='Generated from '`
21136 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21137 `' by configure.'
21138 if test x"$ac_file" != x-; then
21139 configure_input="$ac_file. $configure_input"
21140 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21141 $as_echo "$as_me: creating $ac_file" >&6;}
21142 fi
21143 # Neutralize special characters interpreted by sed in replacement strings.
21144 case $configure_input in #(
21145 *\&* | *\|* | *\\* )
21146 ac_sed_conf_input=`$as_echo "$configure_input" |
21147 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21148 *) ac_sed_conf_input=$configure_input;;
21149 esac
21150
21151 case $ac_tag in
21152 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21153 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21154 esac
21155 ;;
21156 esac
21157
21158 ac_dir=`$as_dirname -- "$ac_file" ||
21159 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21160 X"$ac_file" : 'X\(//\)[^/]' \| \
21161 X"$ac_file" : 'X\(//\)$' \| \
21162 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21163 $as_echo X"$ac_file" |
21164 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21165 s//\1/
21166 q
21167 }
21168 /^X\(\/\/\)[^/].*/{
21169 s//\1/
21170 q
21171 }
21172 /^X\(\/\/\)$/{
21173 s//\1/
21174 q
21175 }
21176 /^X\(\/\).*/{
21177 s//\1/
21178 q
21179 }
21180 s/.*/./; q'`
21181 as_dir="$ac_dir"; as_fn_mkdir_p
21182 ac_builddir=.
21183
21184 case "$ac_dir" in
21185 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21186 *)
21187 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21188 # A ".." for each directory in $ac_dir_suffix.
21189 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21190 case $ac_top_builddir_sub in
21191 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21192 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21193 esac ;;
21194 esac
21195 ac_abs_top_builddir=$ac_pwd
21196 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21197 # for backward compatibility:
21198 ac_top_builddir=$ac_top_build_prefix
21199
21200 case $srcdir in
21201 .) # We are building in place.
21202 ac_srcdir=.
21203 ac_top_srcdir=$ac_top_builddir_sub
21204 ac_abs_top_srcdir=$ac_pwd ;;
21205 [\\/]* | ?:[\\/]* ) # Absolute name.
21206 ac_srcdir=$srcdir$ac_dir_suffix;
21207 ac_top_srcdir=$srcdir
21208 ac_abs_top_srcdir=$srcdir ;;
21209 *) # Relative name.
21210 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21211 ac_top_srcdir=$ac_top_build_prefix$srcdir
21212 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21213 esac
21214 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21215
21216
21217 case $ac_mode in
21218 :F)
21219 #
21220 # CONFIG_FILE
21221 #
21222
21223 case $INSTALL in
21224 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21225 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21226 esac
21227 _ACEOF
21228
21229 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21230 # If the template does not know about datarootdir, expand it.
21231 # FIXME: This hack should be removed a few years after 2.60.
21232 ac_datarootdir_hack=; ac_datarootdir_seen=
21233 ac_sed_dataroot='
21234 /datarootdir/ {
21235 p
21236 q
21237 }
21238 /@datadir@/p
21239 /@docdir@/p
21240 /@infodir@/p
21241 /@localedir@/p
21242 /@mandir@/p'
21243 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21244 *datarootdir*) ac_datarootdir_seen=yes;;
21245 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21246 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21247 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21248 _ACEOF
21249 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21250 ac_datarootdir_hack='
21251 s&@datadir@&$datadir&g
21252 s&@docdir@&$docdir&g
21253 s&@infodir@&$infodir&g
21254 s&@localedir@&$localedir&g
21255 s&@mandir@&$mandir&g
21256 s&\\\${datarootdir}&$datarootdir&g' ;;
21257 esac
21258 _ACEOF
21259
21260 # Neutralize VPATH when `$srcdir' = `.'.
21261 # Shell code in configure.ac might set extrasub.
21262 # FIXME: do we really want to maintain this feature?
21263 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21264 ac_sed_extra="$ac_vpsub
21265 $extrasub
21266 _ACEOF
21267 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21268 :t
21269 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21270 s|@configure_input@|$ac_sed_conf_input|;t t
21271 s&@top_builddir@&$ac_top_builddir_sub&;t t
21272 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21273 s&@srcdir@&$ac_srcdir&;t t
21274 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21275 s&@top_srcdir@&$ac_top_srcdir&;t t
21276 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21277 s&@builddir@&$ac_builddir&;t t
21278 s&@abs_builddir@&$ac_abs_builddir&;t t
21279 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21280 s&@INSTALL@&$ac_INSTALL&;t t
21281 $ac_datarootdir_hack
21282 "
21283 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
21284 if $ac_cs_awk_getline; then
21285 $AWK -f "$ac_tmp/subs.awk"
21286 else
21287 $AWK -f "$ac_tmp/subs.awk" | $SHELL
21288 fi \
21289 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21290
21291 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21292 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21293 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21294 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21295 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21296 which seems to be undefined. Please make sure it is defined" >&5
21297 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21298 which seems to be undefined. Please make sure it is defined" >&2;}
21299
21300 rm -f "$ac_tmp/stdin"
21301 case $ac_file in
21302 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21303 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21304 esac \
21305 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21306 ;;
21307 :H)
21308 #
21309 # CONFIG_HEADER
21310 #
21311 if test x"$ac_file" != x-; then
21312 {
21313 $as_echo "/* $configure_input */" \
21314 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21315 } >"$ac_tmp/config.h" \
21316 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21317 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21318 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21319 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21320 else
21321 rm -f "$ac_file"
21322 mv "$ac_tmp/config.h" "$ac_file" \
21323 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21324 fi
21325 else
21326 $as_echo "/* $configure_input */" \
21327 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21328 || as_fn_error $? "could not create -" "$LINENO" 5
21329 fi
21330 ;;
21331 :L)
21332 #
21333 # CONFIG_LINK
21334 #
21335
21336 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21337 :
21338 else
21339 # Prefer the file from the source tree if names are identical.
21340 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21341 ac_source=$srcdir/$ac_source
21342 fi
21343
21344 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21345 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21346
21347 if test ! -r "$ac_source"; then
21348 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21349 fi
21350 rm -f "$ac_file"
21351
21352 # Try a relative symlink, then a hard link, then a copy.
21353 case $ac_source in
21354 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21355 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21356 esac
21357 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21358 ln "$ac_source" "$ac_file" 2>/dev/null ||
21359 cp -p "$ac_source" "$ac_file" ||
21360 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21361 fi
21362 ;;
21363 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21364 $as_echo "$as_me: executing $ac_file commands" >&6;}
21365 ;;
21366 esac
21367
21368
21369 case $ac_file$ac_mode in
21370 "config.h":H) echo > stamp-h ;;
21371 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
21372 "nm.h":L) echo > stamp-nmh ;;
21373 "gcore":F) chmod +x gcore ;;
21374
21375 esac
21376 done # for ac_tag
21377
21378
21379 as_fn_exit 0
21380 _ACEOF
21381 ac_clean_files=$ac_clean_files_save
21382
21383 test $ac_write_fail = 0 ||
21384 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21385
21386
21387 # configure is writing to config.log, and then calls config.status.
21388 # config.status does its own redirection, appending to config.log.
21389 # Unfortunately, on DOS this fails, as config.log is still kept open
21390 # by configure, so config.status won't be able to write to it; its
21391 # output is simply discarded. So we exec the FD to /dev/null,
21392 # effectively closing config.log, so it can be properly (re)opened and
21393 # appended to by config.status. When coming back to configure, we
21394 # need to make the FD available again.
21395 if test "$no_create" != yes; then
21396 ac_cs_success=:
21397 ac_config_status_args=
21398 test "$silent" = yes &&
21399 ac_config_status_args="$ac_config_status_args --quiet"
21400 exec 5>/dev/null
21401 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21402 exec 5>>config.log
21403 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21404 # would make configure fail if this is the last instruction.
21405 $ac_cs_success || as_fn_exit 1
21406 fi
21407
21408 #
21409 # CONFIG_SUBDIRS section.
21410 #
21411 if test "$no_recursion" != yes; then
21412
21413 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
21414 # so they do not pile up.
21415 ac_sub_configure_args=
21416 ac_prev=
21417 eval "set x $ac_configure_args"
21418 shift
21419 for ac_arg
21420 do
21421 if test -n "$ac_prev"; then
21422 ac_prev=
21423 continue
21424 fi
21425 case $ac_arg in
21426 -cache-file | --cache-file | --cache-fil | --cache-fi \
21427 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
21428 ac_prev=cache_file ;;
21429 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
21430 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
21431 | --c=*)
21432 ;;
21433 --config-cache | -C)
21434 ;;
21435 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
21436 ac_prev=srcdir ;;
21437 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
21438 ;;
21439 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
21440 ac_prev=prefix ;;
21441 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
21442 ;;
21443 --disable-option-checking)
21444 ;;
21445 *)
21446 case $ac_arg in
21447 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21448 esac
21449 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
21450 esac
21451 done
21452
21453 # Always prepend --prefix to ensure using the same prefix
21454 # in subdir configurations.
21455 ac_arg="--prefix=$prefix"
21456 case $ac_arg in
21457 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21458 esac
21459 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
21460
21461 # Pass --silent
21462 if test "$silent" = yes; then
21463 ac_sub_configure_args="--silent $ac_sub_configure_args"
21464 fi
21465
21466 # Always prepend --disable-option-checking to silence warnings, since
21467 # different subdirs can have different --enable and --with options.
21468 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
21469
21470 ac_popdir=`pwd`
21471 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
21472
21473 # Do not complain, so a configure script can configure whichever
21474 # parts of a large source tree are present.
21475 test -d "$srcdir/$ac_dir" || continue
21476
21477 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
21478 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
21479 $as_echo "$ac_msg" >&6
21480 as_dir="$ac_dir"; as_fn_mkdir_p
21481 ac_builddir=.
21482
21483 case "$ac_dir" in
21484 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21485 *)
21486 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21487 # A ".." for each directory in $ac_dir_suffix.
21488 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21489 case $ac_top_builddir_sub in
21490 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21491 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21492 esac ;;
21493 esac
21494 ac_abs_top_builddir=$ac_pwd
21495 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21496 # for backward compatibility:
21497 ac_top_builddir=$ac_top_build_prefix
21498
21499 case $srcdir in
21500 .) # We are building in place.
21501 ac_srcdir=.
21502 ac_top_srcdir=$ac_top_builddir_sub
21503 ac_abs_top_srcdir=$ac_pwd ;;
21504 [\\/]* | ?:[\\/]* ) # Absolute name.
21505 ac_srcdir=$srcdir$ac_dir_suffix;
21506 ac_top_srcdir=$srcdir
21507 ac_abs_top_srcdir=$srcdir ;;
21508 *) # Relative name.
21509 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21510 ac_top_srcdir=$ac_top_build_prefix$srcdir
21511 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21512 esac
21513 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21514
21515
21516 cd "$ac_dir"
21517
21518 # Check for guested configure; otherwise get Cygnus style configure.
21519 if test -f "$ac_srcdir/configure.gnu"; then
21520 ac_sub_configure=$ac_srcdir/configure.gnu
21521 elif test -f "$ac_srcdir/configure"; then
21522 ac_sub_configure=$ac_srcdir/configure
21523 elif test -f "$ac_srcdir/configure.in"; then
21524 # This should be Cygnus configure.
21525 ac_sub_configure=$ac_aux_dir/configure
21526 else
21527 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
21528 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
21529 ac_sub_configure=
21530 fi
21531
21532 # The recursion is here.
21533 if test -n "$ac_sub_configure"; then
21534 # Make the cache file name correct relative to the subdirectory.
21535 case $cache_file in
21536 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
21537 *) # Relative name.
21538 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
21539 esac
21540
21541 { $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
21542 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
21543 # The eval makes quoting arguments work.
21544 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
21545 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
21546 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
21547 fi
21548
21549 cd "$ac_popdir"
21550 done
21551 fi
21552 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21554 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21555 fi
21556