fe685f2d3d5f856b810b6b689a8162e7605ab7a2
[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 with_intel_pt
914 with_libipt_prefix
915 with_libipt_type
916 with_sysroot
917 with_system_gdbinit
918 with_system_gdbinit_dir
919 enable_werror
920 enable_build_warnings
921 enable_gdb_build_warnings
922 enable_ubsan
923 with_lzma
924 with_liblzma_prefix
925 with_liblzma_type
926 with_tcl
927 with_tk
928 with_x
929 enable_sim
930 enable_libbacktrace
931 with_babeltrace
932 with_libbabeltrace_prefix
933 with_libbabeltrace_type
934 with_xxhash
935 enable_libctf
936 with_libxxhash_prefix
937 with_libxxhash_type
938 enable_unit_tests
939 '
940 ac_precious_vars='build_alias
941 host_alias
942 target_alias
943 CC
944 CFLAGS
945 LDFLAGS
946 LIBS
947 CPPFLAGS
948 CXX
949 CXXFLAGS
950 CCC
951 CPP
952 MAKEINFO
953 MAKEINFOFLAGS
954 PKG_CONFIG
955 PKG_CONFIG_PATH
956 PKG_CONFIG_LIBDIR
957 DEBUGINFOD_CFLAGS
958 DEBUGINFOD_LIBS
959 YACC
960 YFLAGS
961 XMKMF'
962 ac_subdirs_all='testsuite
963 gdbtk'
964
965 # Initialize some variables set by options.
966 ac_init_help=
967 ac_init_version=false
968 ac_unrecognized_opts=
969 ac_unrecognized_sep=
970 # The variables have the same names as the options, with
971 # dashes changed to underlines.
972 cache_file=/dev/null
973 exec_prefix=NONE
974 no_create=
975 no_recursion=
976 prefix=NONE
977 program_prefix=NONE
978 program_suffix=NONE
979 program_transform_name=s,x,x,
980 silent=
981 site=
982 srcdir=
983 verbose=
984 x_includes=NONE
985 x_libraries=NONE
986
987 # Installation directory options.
988 # These are left unexpanded so users can "make install exec_prefix=/foo"
989 # and all the variables that are supposed to be based on exec_prefix
990 # by default will actually change.
991 # Use braces instead of parens because sh, perl, etc. also accept them.
992 # (The list follows the same order as the GNU Coding Standards.)
993 bindir='${exec_prefix}/bin'
994 sbindir='${exec_prefix}/sbin'
995 libexecdir='${exec_prefix}/libexec'
996 datarootdir='${prefix}/share'
997 datadir='${datarootdir}'
998 sysconfdir='${prefix}/etc'
999 sharedstatedir='${prefix}/com'
1000 localstatedir='${prefix}/var'
1001 includedir='${prefix}/include'
1002 oldincludedir='/usr/include'
1003 docdir='${datarootdir}/doc/${PACKAGE}'
1004 infodir='${datarootdir}/info'
1005 htmldir='${docdir}'
1006 dvidir='${docdir}'
1007 pdfdir='${docdir}'
1008 psdir='${docdir}'
1009 libdir='${exec_prefix}/lib'
1010 localedir='${datarootdir}/locale'
1011 mandir='${datarootdir}/man'
1012
1013 ac_prev=
1014 ac_dashdash=
1015 for ac_option
1016 do
1017 # If the previous option needs an argument, assign it.
1018 if test -n "$ac_prev"; then
1019 eval $ac_prev=\$ac_option
1020 ac_prev=
1021 continue
1022 fi
1023
1024 case $ac_option in
1025 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1026 *=) ac_optarg= ;;
1027 *) ac_optarg=yes ;;
1028 esac
1029
1030 # Accept the important Cygnus configure options, so we can diagnose typos.
1031
1032 case $ac_dashdash$ac_option in
1033 --)
1034 ac_dashdash=yes ;;
1035
1036 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1037 ac_prev=bindir ;;
1038 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1039 bindir=$ac_optarg ;;
1040
1041 -build | --build | --buil | --bui | --bu)
1042 ac_prev=build_alias ;;
1043 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1044 build_alias=$ac_optarg ;;
1045
1046 -cache-file | --cache-file | --cache-fil | --cache-fi \
1047 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1048 ac_prev=cache_file ;;
1049 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1050 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1051 cache_file=$ac_optarg ;;
1052
1053 --config-cache | -C)
1054 cache_file=config.cache ;;
1055
1056 -datadir | --datadir | --datadi | --datad)
1057 ac_prev=datadir ;;
1058 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1059 datadir=$ac_optarg ;;
1060
1061 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1062 | --dataroo | --dataro | --datar)
1063 ac_prev=datarootdir ;;
1064 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1065 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1066 datarootdir=$ac_optarg ;;
1067
1068 -disable-* | --disable-*)
1069 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1070 # Reject names that are not valid shell variable names.
1071 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1072 as_fn_error $? "invalid feature name: $ac_useropt"
1073 ac_useropt_orig=$ac_useropt
1074 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1075 case $ac_user_opts in
1076 *"
1077 "enable_$ac_useropt"
1078 "*) ;;
1079 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1080 ac_unrecognized_sep=', ';;
1081 esac
1082 eval enable_$ac_useropt=no ;;
1083
1084 -docdir | --docdir | --docdi | --doc | --do)
1085 ac_prev=docdir ;;
1086 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1087 docdir=$ac_optarg ;;
1088
1089 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1090 ac_prev=dvidir ;;
1091 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1092 dvidir=$ac_optarg ;;
1093
1094 -enable-* | --enable-*)
1095 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1096 # Reject names that are not valid shell variable names.
1097 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1098 as_fn_error $? "invalid feature name: $ac_useropt"
1099 ac_useropt_orig=$ac_useropt
1100 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1101 case $ac_user_opts in
1102 *"
1103 "enable_$ac_useropt"
1104 "*) ;;
1105 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1106 ac_unrecognized_sep=', ';;
1107 esac
1108 eval enable_$ac_useropt=\$ac_optarg ;;
1109
1110 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1111 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1112 | --exec | --exe | --ex)
1113 ac_prev=exec_prefix ;;
1114 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1115 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1116 | --exec=* | --exe=* | --ex=*)
1117 exec_prefix=$ac_optarg ;;
1118
1119 -gas | --gas | --ga | --g)
1120 # Obsolete; use --with-gas.
1121 with_gas=yes ;;
1122
1123 -help | --help | --hel | --he | -h)
1124 ac_init_help=long ;;
1125 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1126 ac_init_help=recursive ;;
1127 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1128 ac_init_help=short ;;
1129
1130 -host | --host | --hos | --ho)
1131 ac_prev=host_alias ;;
1132 -host=* | --host=* | --hos=* | --ho=*)
1133 host_alias=$ac_optarg ;;
1134
1135 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1136 ac_prev=htmldir ;;
1137 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1138 | --ht=*)
1139 htmldir=$ac_optarg ;;
1140
1141 -includedir | --includedir | --includedi | --included | --include \
1142 | --includ | --inclu | --incl | --inc)
1143 ac_prev=includedir ;;
1144 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1145 | --includ=* | --inclu=* | --incl=* | --inc=*)
1146 includedir=$ac_optarg ;;
1147
1148 -infodir | --infodir | --infodi | --infod | --info | --inf)
1149 ac_prev=infodir ;;
1150 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1151 infodir=$ac_optarg ;;
1152
1153 -libdir | --libdir | --libdi | --libd)
1154 ac_prev=libdir ;;
1155 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1156 libdir=$ac_optarg ;;
1157
1158 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1159 | --libexe | --libex | --libe)
1160 ac_prev=libexecdir ;;
1161 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1162 | --libexe=* | --libex=* | --libe=*)
1163 libexecdir=$ac_optarg ;;
1164
1165 -localedir | --localedir | --localedi | --localed | --locale)
1166 ac_prev=localedir ;;
1167 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1168 localedir=$ac_optarg ;;
1169
1170 -localstatedir | --localstatedir | --localstatedi | --localstated \
1171 | --localstate | --localstat | --localsta | --localst | --locals)
1172 ac_prev=localstatedir ;;
1173 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1174 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1175 localstatedir=$ac_optarg ;;
1176
1177 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1178 ac_prev=mandir ;;
1179 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1180 mandir=$ac_optarg ;;
1181
1182 -nfp | --nfp | --nf)
1183 # Obsolete; use --without-fp.
1184 with_fp=no ;;
1185
1186 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1187 | --no-cr | --no-c | -n)
1188 no_create=yes ;;
1189
1190 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1191 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1192 no_recursion=yes ;;
1193
1194 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1195 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1196 | --oldin | --oldi | --old | --ol | --o)
1197 ac_prev=oldincludedir ;;
1198 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1199 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1200 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1201 oldincludedir=$ac_optarg ;;
1202
1203 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1204 ac_prev=prefix ;;
1205 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1206 prefix=$ac_optarg ;;
1207
1208 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1209 | --program-pre | --program-pr | --program-p)
1210 ac_prev=program_prefix ;;
1211 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1212 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1213 program_prefix=$ac_optarg ;;
1214
1215 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1216 | --program-suf | --program-su | --program-s)
1217 ac_prev=program_suffix ;;
1218 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1219 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1220 program_suffix=$ac_optarg ;;
1221
1222 -program-transform-name | --program-transform-name \
1223 | --program-transform-nam | --program-transform-na \
1224 | --program-transform-n | --program-transform- \
1225 | --program-transform | --program-transfor \
1226 | --program-transfo | --program-transf \
1227 | --program-trans | --program-tran \
1228 | --progr-tra | --program-tr | --program-t)
1229 ac_prev=program_transform_name ;;
1230 -program-transform-name=* | --program-transform-name=* \
1231 | --program-transform-nam=* | --program-transform-na=* \
1232 | --program-transform-n=* | --program-transform-=* \
1233 | --program-transform=* | --program-transfor=* \
1234 | --program-transfo=* | --program-transf=* \
1235 | --program-trans=* | --program-tran=* \
1236 | --progr-tra=* | --program-tr=* | --program-t=*)
1237 program_transform_name=$ac_optarg ;;
1238
1239 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1240 ac_prev=pdfdir ;;
1241 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1242 pdfdir=$ac_optarg ;;
1243
1244 -psdir | --psdir | --psdi | --psd | --ps)
1245 ac_prev=psdir ;;
1246 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1247 psdir=$ac_optarg ;;
1248
1249 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1250 | -silent | --silent | --silen | --sile | --sil)
1251 silent=yes ;;
1252
1253 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1254 ac_prev=sbindir ;;
1255 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1256 | --sbi=* | --sb=*)
1257 sbindir=$ac_optarg ;;
1258
1259 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1260 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1261 | --sharedst | --shareds | --shared | --share | --shar \
1262 | --sha | --sh)
1263 ac_prev=sharedstatedir ;;
1264 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1265 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1266 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1267 | --sha=* | --sh=*)
1268 sharedstatedir=$ac_optarg ;;
1269
1270 -site | --site | --sit)
1271 ac_prev=site ;;
1272 -site=* | --site=* | --sit=*)
1273 site=$ac_optarg ;;
1274
1275 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1276 ac_prev=srcdir ;;
1277 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1278 srcdir=$ac_optarg ;;
1279
1280 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1281 | --syscon | --sysco | --sysc | --sys | --sy)
1282 ac_prev=sysconfdir ;;
1283 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1284 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1285 sysconfdir=$ac_optarg ;;
1286
1287 -target | --target | --targe | --targ | --tar | --ta | --t)
1288 ac_prev=target_alias ;;
1289 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1290 target_alias=$ac_optarg ;;
1291
1292 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1293 verbose=yes ;;
1294
1295 -version | --version | --versio | --versi | --vers | -V)
1296 ac_init_version=: ;;
1297
1298 -with-* | --with-*)
1299 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1300 # Reject names that are not valid shell variable names.
1301 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1302 as_fn_error $? "invalid package name: $ac_useropt"
1303 ac_useropt_orig=$ac_useropt
1304 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1305 case $ac_user_opts in
1306 *"
1307 "with_$ac_useropt"
1308 "*) ;;
1309 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1310 ac_unrecognized_sep=', ';;
1311 esac
1312 eval with_$ac_useropt=\$ac_optarg ;;
1313
1314 -without-* | --without-*)
1315 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1316 # Reject names that are not valid shell variable names.
1317 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1318 as_fn_error $? "invalid package name: $ac_useropt"
1319 ac_useropt_orig=$ac_useropt
1320 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1321 case $ac_user_opts in
1322 *"
1323 "with_$ac_useropt"
1324 "*) ;;
1325 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1326 ac_unrecognized_sep=', ';;
1327 esac
1328 eval with_$ac_useropt=no ;;
1329
1330 --x)
1331 # Obsolete; use --with-x.
1332 with_x=yes ;;
1333
1334 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1335 | --x-incl | --x-inc | --x-in | --x-i)
1336 ac_prev=x_includes ;;
1337 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1338 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1339 x_includes=$ac_optarg ;;
1340
1341 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1342 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1343 ac_prev=x_libraries ;;
1344 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1345 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1346 x_libraries=$ac_optarg ;;
1347
1348 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1349 Try \`$0 --help' for more information"
1350 ;;
1351
1352 *=*)
1353 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1354 # Reject names that are not valid shell variable names.
1355 case $ac_envvar in #(
1356 '' | [0-9]* | *[!_$as_cr_alnum]* )
1357 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1358 esac
1359 eval $ac_envvar=\$ac_optarg
1360 export $ac_envvar ;;
1361
1362 *)
1363 # FIXME: should be removed in autoconf 3.0.
1364 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1365 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1366 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1367 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1368 ;;
1369
1370 esac
1371 done
1372
1373 if test -n "$ac_prev"; then
1374 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1375 as_fn_error $? "missing argument to $ac_option"
1376 fi
1377
1378 if test -n "$ac_unrecognized_opts"; then
1379 case $enable_option_checking in
1380 no) ;;
1381 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1382 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1383 esac
1384 fi
1385
1386 # Check all directory arguments for consistency.
1387 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1388 datadir sysconfdir sharedstatedir localstatedir includedir \
1389 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1390 libdir localedir mandir
1391 do
1392 eval ac_val=\$$ac_var
1393 # Remove trailing slashes.
1394 case $ac_val in
1395 */ )
1396 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1397 eval $ac_var=\$ac_val;;
1398 esac
1399 # Be sure to have absolute directory names.
1400 case $ac_val in
1401 [\\/$]* | ?:[\\/]* ) continue;;
1402 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1403 esac
1404 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1405 done
1406
1407 # There might be people who depend on the old broken behavior: `$host'
1408 # used to hold the argument of --host etc.
1409 # FIXME: To remove some day.
1410 build=$build_alias
1411 host=$host_alias
1412 target=$target_alias
1413
1414 # FIXME: To remove some day.
1415 if test "x$host_alias" != x; then
1416 if test "x$build_alias" = x; then
1417 cross_compiling=maybe
1418 elif test "x$build_alias" != "x$host_alias"; then
1419 cross_compiling=yes
1420 fi
1421 fi
1422
1423 ac_tool_prefix=
1424 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1425
1426 test "$silent" = yes && exec 6>/dev/null
1427
1428
1429 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1430 ac_ls_di=`ls -di .` &&
1431 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1432 as_fn_error $? "working directory cannot be determined"
1433 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1434 as_fn_error $? "pwd does not report name of working directory"
1435
1436
1437 # Find the source files, if location was not specified.
1438 if test -z "$srcdir"; then
1439 ac_srcdir_defaulted=yes
1440 # Try the directory containing this script, then the parent directory.
1441 ac_confdir=`$as_dirname -- "$as_myself" ||
1442 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1443 X"$as_myself" : 'X\(//\)[^/]' \| \
1444 X"$as_myself" : 'X\(//\)$' \| \
1445 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1446 $as_echo X"$as_myself" |
1447 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1448 s//\1/
1449 q
1450 }
1451 /^X\(\/\/\)[^/].*/{
1452 s//\1/
1453 q
1454 }
1455 /^X\(\/\/\)$/{
1456 s//\1/
1457 q
1458 }
1459 /^X\(\/\).*/{
1460 s//\1/
1461 q
1462 }
1463 s/.*/./; q'`
1464 srcdir=$ac_confdir
1465 if test ! -r "$srcdir/$ac_unique_file"; then
1466 srcdir=..
1467 fi
1468 else
1469 ac_srcdir_defaulted=no
1470 fi
1471 if test ! -r "$srcdir/$ac_unique_file"; then
1472 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1473 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1474 fi
1475 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1476 ac_abs_confdir=`(
1477 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1478 pwd)`
1479 # When building in place, set srcdir=.
1480 if test "$ac_abs_confdir" = "$ac_pwd"; then
1481 srcdir=.
1482 fi
1483 # Remove unnecessary trailing slashes from srcdir.
1484 # Double slashes in file names in object file debugging info
1485 # mess up M-x gdb in Emacs.
1486 case $srcdir in
1487 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1488 esac
1489 for ac_var in $ac_precious_vars; do
1490 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1491 eval ac_env_${ac_var}_value=\$${ac_var}
1492 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1493 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1494 done
1495
1496 #
1497 # Report the --help message.
1498 #
1499 if test "$ac_init_help" = "long"; then
1500 # Omit some internal or obsolete options to make the list less imposing.
1501 # This message is too long to be a string in the A/UX 3.1 sh.
1502 cat <<_ACEOF
1503 \`configure' configures this package to adapt to many kinds of systems.
1504
1505 Usage: $0 [OPTION]... [VAR=VALUE]...
1506
1507 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1508 VAR=VALUE. See below for descriptions of some of the useful variables.
1509
1510 Defaults for the options are specified in brackets.
1511
1512 Configuration:
1513 -h, --help display this help and exit
1514 --help=short display options specific to this package
1515 --help=recursive display the short help of all the included packages
1516 -V, --version display version information and exit
1517 -q, --quiet, --silent do not print \`checking ...' messages
1518 --cache-file=FILE cache test results in FILE [disabled]
1519 -C, --config-cache alias for \`--cache-file=config.cache'
1520 -n, --no-create do not create output files
1521 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1522
1523 Installation directories:
1524 --prefix=PREFIX install architecture-independent files in PREFIX
1525 [$ac_default_prefix]
1526 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1527 [PREFIX]
1528
1529 By default, \`make install' will install all the files in
1530 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1531 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1532 for instance \`--prefix=\$HOME'.
1533
1534 For better control, use the options below.
1535
1536 Fine tuning of the installation directories:
1537 --bindir=DIR user executables [EPREFIX/bin]
1538 --sbindir=DIR system admin executables [EPREFIX/sbin]
1539 --libexecdir=DIR program executables [EPREFIX/libexec]
1540 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1541 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1542 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1543 --libdir=DIR object code libraries [EPREFIX/lib]
1544 --includedir=DIR C header files [PREFIX/include]
1545 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1546 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1547 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1548 --infodir=DIR info documentation [DATAROOTDIR/info]
1549 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1550 --mandir=DIR man documentation [DATAROOTDIR/man]
1551 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1552 --htmldir=DIR html documentation [DOCDIR]
1553 --dvidir=DIR dvi documentation [DOCDIR]
1554 --pdfdir=DIR pdf documentation [DOCDIR]
1555 --psdir=DIR ps documentation [DOCDIR]
1556 _ACEOF
1557
1558 cat <<\_ACEOF
1559
1560 Program names:
1561 --program-prefix=PREFIX prepend PREFIX to installed program names
1562 --program-suffix=SUFFIX append SUFFIX to installed program names
1563 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1564
1565 X features:
1566 --x-includes=DIR X include files are in DIR
1567 --x-libraries=DIR X library files are in DIR
1568
1569 System types:
1570 --build=BUILD configure for building on BUILD [guessed]
1571 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1572 --target=TARGET configure for building compilers for TARGET [HOST]
1573 _ACEOF
1574 fi
1575
1576 if test -n "$ac_init_help"; then
1577
1578 cat <<\_ACEOF
1579
1580 Optional Features:
1581 --disable-option-checking ignore unrecognized --enable/--with options
1582 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1583 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1584 --enable-maintainer-mode
1585 enable make rules and dependencies not useful (and
1586 sometimes confusing) to the casual installer
1587 --enable-plugins Enable support for plugins
1588 --disable-largefile omit support for large files
1589 --enable-targets=TARGETS
1590 alternative target configurations
1591 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1592 --disable-gdbmi disable machine-interface (MI)
1593 --enable-tui enable full-screen terminal user interface (TUI)
1594 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1595 --enable-profiling enable profiling of GDB
1596 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1597 --disable-rpath do not hardcode runtime library paths
1598 --enable-source-highlight
1599 enable source-highlight for source listings
1600 --enable-werror treat compile warnings as errors
1601 --enable-build-warnings enable build-time compiler warnings if gcc is used
1602 --enable-gdb-build-warnings
1603 enable GDB specific build-time compiler warnings if
1604 gcc is used
1605 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1606 --enable-sim link gdb with simulator
1607 --enable-libbacktrace use libbacktrace to write a backtrace after a fatal
1608 signal.
1609 --enable-libctf Handle .ctf type-info sections [default=yes]
1610 --enable-unit-tests Enable the inclusion of unit tests when compiling
1611 GDB
1612
1613 Optional Packages:
1614 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1615 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1616 --with-separate-debug-dir=PATH
1617 look for global separate debug info in this path
1618 [LIBDIR/debug]
1619 --with-gdb-datadir=PATH look for global separate data files in this path
1620 [DATADIR/gdb]
1621 --with-relocated-sources=PATH
1622 automatically relocate this path for source files
1623 --with-auto-load-dir=PATH
1624 directories from which to load auto-loaded scripts
1625 [$debugdir:$datadir/auto-load]
1626 --with-auto-load-safe-path=PATH
1627 directories safe to hold auto-loaded files
1628 [--with-auto-load-dir]
1629 --without-auto-load-safe-path
1630 do not restrict auto-loaded files locations
1631 --with-debuginfod Enable debuginfo lookups with debuginfod
1632 (auto/yes/no)
1633 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1634 --with-curses use the curses library instead of the termcap
1635 library
1636 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1637 --with-bugurl=URL Direct users to URL to report a bug
1638 --with-system-zlib use installed libz
1639 --with-gnu-ld assume the C compiler uses GNU ld default=no
1640 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1641 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1642 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1643 --with-iconv-bin=PATH specify where to find the iconv program
1644 --with-system-readline use installed readline library
1645 --with-jit-reader-dir=PATH
1646 directory to load the JIT readers from
1647 --with-expat include expat support (auto/yes/no)
1648 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1649 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1650 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1651 --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib
1652 --without-libgmp-prefix don't search for libgmp in includedir and libdir
1653 --with-libgmp-type=TYPE type of library to search for (auto/static/shared)
1654 --with-mpfr include MPFR support (auto/yes/no)
1655 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1656 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1657 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1658 --with-python[=PYTHON] include python support
1659 (auto/yes/no/<python-program>)
1660 --with-python-libdir[=DIR]
1661 search for python's libraries in DIR
1662 --with-guile[=GUILE] include guile support
1663 (auto/yes/no/<guile-version>/<pkg-config-program>)
1664 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1665 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1666 --without-libipt-prefix don't search for libipt in includedir and libdir
1667 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1668 --with-sysroot[=DIR] search for usr/lib et al within DIR
1669 --with-system-gdbinit=PATH
1670 automatically load a system-wide gdbinit file
1671 --with-system-gdbinit-dir=PATH
1672 automatically load system-wide gdbinit files from
1673 this directory
1674 --with-lzma support lzma compression (auto/yes/no)
1675 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1676 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1677 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1678 --with-tcl directory containing tcl configuration (tclConfig.sh)
1679 --with-tk directory containing tk configuration (tkConfig.sh)
1680 --with-x use the X Window System
1681 --with-babeltrace include babeltrace support (auto/yes/no)
1682 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1683 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1684 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1685 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1686 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1687 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1688 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1689
1690 Some influential environment variables:
1691 CC C compiler command
1692 CFLAGS C compiler flags
1693 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1694 nonstandard directory <lib dir>
1695 LIBS libraries to pass to the linker, e.g. -l<library>
1696 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1697 you have headers in a nonstandard directory <include dir>
1698 CXX C++ compiler command
1699 CXXFLAGS C++ compiler flags
1700 CPP C preprocessor
1701 MAKEINFO Parent configure detects if it is of sufficient version.
1702 MAKEINFOFLAGS
1703 Parameters for MAKEINFO.
1704 PKG_CONFIG path to pkg-config utility
1705 PKG_CONFIG_PATH
1706 directories to add to pkg-config's search path
1707 PKG_CONFIG_LIBDIR
1708 path overriding pkg-config's built-in search path
1709 DEBUGINFOD_CFLAGS
1710 C compiler flags for DEBUGINFOD, overriding pkg-config
1711 DEBUGINFOD_LIBS
1712 linker flags for DEBUGINFOD, overriding pkg-config
1713 YACC The `Yet Another Compiler Compiler' implementation to use.
1714 Defaults to the first program found out of: `bison -y', `byacc',
1715 `yacc'.
1716 YFLAGS The list of arguments that will be passed by default to $YACC.
1717 This script will default YFLAGS to the empty string to avoid a
1718 default value of `-d' given by some make applications.
1719 XMKMF Path to xmkmf, Makefile generator for X Window System
1720
1721 Use these variables to override the choices made by `configure' or to help
1722 it to find libraries and programs with nonstandard names/locations.
1723
1724 Report bugs to the package provider.
1725 _ACEOF
1726 ac_status=$?
1727 fi
1728
1729 if test "$ac_init_help" = "recursive"; then
1730 # If there are subdirs, report their specific --help.
1731 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1732 test -d "$ac_dir" ||
1733 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1734 continue
1735 ac_builddir=.
1736
1737 case "$ac_dir" in
1738 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1739 *)
1740 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1741 # A ".." for each directory in $ac_dir_suffix.
1742 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1743 case $ac_top_builddir_sub in
1744 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1745 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1746 esac ;;
1747 esac
1748 ac_abs_top_builddir=$ac_pwd
1749 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1750 # for backward compatibility:
1751 ac_top_builddir=$ac_top_build_prefix
1752
1753 case $srcdir in
1754 .) # We are building in place.
1755 ac_srcdir=.
1756 ac_top_srcdir=$ac_top_builddir_sub
1757 ac_abs_top_srcdir=$ac_pwd ;;
1758 [\\/]* | ?:[\\/]* ) # Absolute name.
1759 ac_srcdir=$srcdir$ac_dir_suffix;
1760 ac_top_srcdir=$srcdir
1761 ac_abs_top_srcdir=$srcdir ;;
1762 *) # Relative name.
1763 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1764 ac_top_srcdir=$ac_top_build_prefix$srcdir
1765 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1766 esac
1767 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1768
1769 cd "$ac_dir" || { ac_status=$?; continue; }
1770 # Check for guested configure.
1771 if test -f "$ac_srcdir/configure.gnu"; then
1772 echo &&
1773 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1774 elif test -f "$ac_srcdir/configure"; then
1775 echo &&
1776 $SHELL "$ac_srcdir/configure" --help=recursive
1777 else
1778 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1779 fi || ac_status=$?
1780 cd "$ac_pwd" || { ac_status=$?; break; }
1781 done
1782 fi
1783
1784 test -n "$ac_init_help" && exit $ac_status
1785 if $ac_init_version; then
1786 cat <<\_ACEOF
1787 configure
1788 generated by GNU Autoconf 2.69
1789
1790 Copyright (C) 2012 Free Software Foundation, Inc.
1791 This configure script is free software; the Free Software Foundation
1792 gives unlimited permission to copy, distribute and modify it.
1793 _ACEOF
1794 exit
1795 fi
1796
1797 ## ------------------------ ##
1798 ## Autoconf initialization. ##
1799 ## ------------------------ ##
1800
1801 # ac_fn_c_try_compile LINENO
1802 # --------------------------
1803 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1804 ac_fn_c_try_compile ()
1805 {
1806 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1807 rm -f conftest.$ac_objext
1808 if { { ac_try="$ac_compile"
1809 case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812 esac
1813 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814 $as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_compile") 2>conftest.err
1816 ac_status=$?
1817 if test -s conftest.err; then
1818 grep -v '^ *+' conftest.err >conftest.er1
1819 cat conftest.er1 >&5
1820 mv -f conftest.er1 conftest.err
1821 fi
1822 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1823 test $ac_status = 0; } && {
1824 test -z "$ac_c_werror_flag" ||
1825 test ! -s conftest.err
1826 } && test -s conftest.$ac_objext; then :
1827 ac_retval=0
1828 else
1829 $as_echo "$as_me: failed program was:" >&5
1830 sed 's/^/| /' conftest.$ac_ext >&5
1831
1832 ac_retval=1
1833 fi
1834 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1835 as_fn_set_status $ac_retval
1836
1837 } # ac_fn_c_try_compile
1838
1839 # ac_fn_cxx_try_compile LINENO
1840 # ----------------------------
1841 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1842 ac_fn_cxx_try_compile ()
1843 {
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 rm -f conftest.$ac_objext
1846 if { { ac_try="$ac_compile"
1847 case "(($ac_try" in
1848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849 *) ac_try_echo=$ac_try;;
1850 esac
1851 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852 $as_echo "$ac_try_echo"; } >&5
1853 (eval "$ac_compile") 2>conftest.err
1854 ac_status=$?
1855 if test -s conftest.err; then
1856 grep -v '^ *+' conftest.err >conftest.er1
1857 cat conftest.er1 >&5
1858 mv -f conftest.er1 conftest.err
1859 fi
1860 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1861 test $ac_status = 0; } && {
1862 test -z "$ac_cxx_werror_flag" ||
1863 test ! -s conftest.err
1864 } && test -s conftest.$ac_objext; then :
1865 ac_retval=0
1866 else
1867 $as_echo "$as_me: failed program was:" >&5
1868 sed 's/^/| /' conftest.$ac_ext >&5
1869
1870 ac_retval=1
1871 fi
1872 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1873 as_fn_set_status $ac_retval
1874
1875 } # ac_fn_cxx_try_compile
1876
1877 # ac_fn_c_try_cpp LINENO
1878 # ----------------------
1879 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1880 ac_fn_c_try_cpp ()
1881 {
1882 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1883 if { { ac_try="$ac_cpp conftest.$ac_ext"
1884 case "(($ac_try" in
1885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1886 *) ac_try_echo=$ac_try;;
1887 esac
1888 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1889 $as_echo "$ac_try_echo"; } >&5
1890 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1891 ac_status=$?
1892 if test -s conftest.err; then
1893 grep -v '^ *+' conftest.err >conftest.er1
1894 cat conftest.er1 >&5
1895 mv -f conftest.er1 conftest.err
1896 fi
1897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1898 test $ac_status = 0; } > conftest.i && {
1899 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1900 test ! -s conftest.err
1901 }; then :
1902 ac_retval=0
1903 else
1904 $as_echo "$as_me: failed program was:" >&5
1905 sed 's/^/| /' conftest.$ac_ext >&5
1906
1907 ac_retval=1
1908 fi
1909 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1910 as_fn_set_status $ac_retval
1911
1912 } # ac_fn_c_try_cpp
1913
1914 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1915 # -------------------------------------------------------
1916 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1917 # the include files in INCLUDES and setting the cache variable VAR
1918 # accordingly.
1919 ac_fn_c_check_header_mongrel ()
1920 {
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922 if eval \${$3+:} false; then :
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1924 $as_echo_n "checking for $2... " >&6; }
1925 if eval \${$3+:} false; then :
1926 $as_echo_n "(cached) " >&6
1927 fi
1928 eval ac_res=\$$3
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1930 $as_echo "$ac_res" >&6; }
1931 else
1932 # Is the header compilable?
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1934 $as_echo_n "checking $2 usability... " >&6; }
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936 /* end confdefs.h. */
1937 $4
1938 #include <$2>
1939 _ACEOF
1940 if ac_fn_c_try_compile "$LINENO"; then :
1941 ac_header_compiler=yes
1942 else
1943 ac_header_compiler=no
1944 fi
1945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1947 $as_echo "$ac_header_compiler" >&6; }
1948
1949 # Is the header present?
1950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1951 $as_echo_n "checking $2 presence... " >&6; }
1952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1953 /* end confdefs.h. */
1954 #include <$2>
1955 _ACEOF
1956 if ac_fn_c_try_cpp "$LINENO"; then :
1957 ac_header_preproc=yes
1958 else
1959 ac_header_preproc=no
1960 fi
1961 rm -f conftest.err conftest.i conftest.$ac_ext
1962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1963 $as_echo "$ac_header_preproc" >&6; }
1964
1965 # So? What about this header?
1966 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1967 yes:no: )
1968 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1969 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1970 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1971 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1972 ;;
1973 no:yes:* )
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1975 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1977 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1978 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1979 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1981 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1983 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1984 ;;
1985 esac
1986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1987 $as_echo_n "checking for $2... " >&6; }
1988 if eval \${$3+:} false; then :
1989 $as_echo_n "(cached) " >&6
1990 else
1991 eval "$3=\$ac_header_compiler"
1992 fi
1993 eval ac_res=\$$3
1994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1995 $as_echo "$ac_res" >&6; }
1996 fi
1997 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1998
1999 } # ac_fn_c_check_header_mongrel
2000
2001 # ac_fn_c_try_run LINENO
2002 # ----------------------
2003 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2004 # that executables *can* be run.
2005 ac_fn_c_try_run ()
2006 {
2007 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2008 if { { ac_try="$ac_link"
2009 case "(($ac_try" in
2010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2011 *) ac_try_echo=$ac_try;;
2012 esac
2013 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2014 $as_echo "$ac_try_echo"; } >&5
2015 (eval "$ac_link") 2>&5
2016 ac_status=$?
2017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2018 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2019 { { case "(($ac_try" in
2020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2021 *) ac_try_echo=$ac_try;;
2022 esac
2023 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2024 $as_echo "$ac_try_echo"; } >&5
2025 (eval "$ac_try") 2>&5
2026 ac_status=$?
2027 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2028 test $ac_status = 0; }; }; then :
2029 ac_retval=0
2030 else
2031 $as_echo "$as_me: program exited with status $ac_status" >&5
2032 $as_echo "$as_me: failed program was:" >&5
2033 sed 's/^/| /' conftest.$ac_ext >&5
2034
2035 ac_retval=$ac_status
2036 fi
2037 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2038 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2039 as_fn_set_status $ac_retval
2040
2041 } # ac_fn_c_try_run
2042
2043 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2044 # -------------------------------------------------------
2045 # Tests whether HEADER exists and can be compiled using the include files in
2046 # INCLUDES, setting the cache variable VAR accordingly.
2047 ac_fn_c_check_header_compile ()
2048 {
2049 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2051 $as_echo_n "checking for $2... " >&6; }
2052 if eval \${$3+:} false; then :
2053 $as_echo_n "(cached) " >&6
2054 else
2055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056 /* end confdefs.h. */
2057 $4
2058 #include <$2>
2059 _ACEOF
2060 if ac_fn_c_try_compile "$LINENO"; then :
2061 eval "$3=yes"
2062 else
2063 eval "$3=no"
2064 fi
2065 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066 fi
2067 eval ac_res=\$$3
2068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2069 $as_echo "$ac_res" >&6; }
2070 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2071
2072 } # ac_fn_c_check_header_compile
2073
2074 # ac_fn_c_try_link LINENO
2075 # -----------------------
2076 # Try to link conftest.$ac_ext, and return whether this succeeded.
2077 ac_fn_c_try_link ()
2078 {
2079 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2080 rm -f conftest.$ac_objext conftest$ac_exeext
2081 if { { ac_try="$ac_link"
2082 case "(($ac_try" in
2083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2084 *) ac_try_echo=$ac_try;;
2085 esac
2086 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2087 $as_echo "$ac_try_echo"; } >&5
2088 (eval "$ac_link") 2>conftest.err
2089 ac_status=$?
2090 if test -s conftest.err; then
2091 grep -v '^ *+' conftest.err >conftest.er1
2092 cat conftest.er1 >&5
2093 mv -f conftest.er1 conftest.err
2094 fi
2095 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2096 test $ac_status = 0; } && {
2097 test -z "$ac_c_werror_flag" ||
2098 test ! -s conftest.err
2099 } && test -s conftest$ac_exeext && {
2100 test "$cross_compiling" = yes ||
2101 test -x conftest$ac_exeext
2102 }; then :
2103 ac_retval=0
2104 else
2105 $as_echo "$as_me: failed program was:" >&5
2106 sed 's/^/| /' conftest.$ac_ext >&5
2107
2108 ac_retval=1
2109 fi
2110 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2111 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2112 # interfere with the next link command; also delete a directory that is
2113 # left behind by Apple's compiler. We do this before executing the actions.
2114 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2115 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2116 as_fn_set_status $ac_retval
2117
2118 } # ac_fn_c_try_link
2119
2120 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2121 # --------------------------------------------
2122 # Tries to find the compile-time value of EXPR in a program that includes
2123 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2124 # computed
2125 ac_fn_c_compute_int ()
2126 {
2127 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2128 if test "$cross_compiling" = yes; then
2129 # Depending upon the size, compute the lo and hi bounds.
2130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2131 /* end confdefs.h. */
2132 $4
2133 int
2134 main ()
2135 {
2136 static int test_array [1 - 2 * !(($2) >= 0)];
2137 test_array [0] = 0;
2138 return test_array [0];
2139
2140 ;
2141 return 0;
2142 }
2143 _ACEOF
2144 if ac_fn_c_try_compile "$LINENO"; then :
2145 ac_lo=0 ac_mid=0
2146 while :; do
2147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2148 /* end confdefs.h. */
2149 $4
2150 int
2151 main ()
2152 {
2153 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2154 test_array [0] = 0;
2155 return test_array [0];
2156
2157 ;
2158 return 0;
2159 }
2160 _ACEOF
2161 if ac_fn_c_try_compile "$LINENO"; then :
2162 ac_hi=$ac_mid; break
2163 else
2164 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2165 if test $ac_lo -le $ac_mid; then
2166 ac_lo= ac_hi=
2167 break
2168 fi
2169 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2170 fi
2171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2172 done
2173 else
2174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2175 /* end confdefs.h. */
2176 $4
2177 int
2178 main ()
2179 {
2180 static int test_array [1 - 2 * !(($2) < 0)];
2181 test_array [0] = 0;
2182 return test_array [0];
2183
2184 ;
2185 return 0;
2186 }
2187 _ACEOF
2188 if ac_fn_c_try_compile "$LINENO"; then :
2189 ac_hi=-1 ac_mid=-1
2190 while :; do
2191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2192 /* end confdefs.h. */
2193 $4
2194 int
2195 main ()
2196 {
2197 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2198 test_array [0] = 0;
2199 return test_array [0];
2200
2201 ;
2202 return 0;
2203 }
2204 _ACEOF
2205 if ac_fn_c_try_compile "$LINENO"; then :
2206 ac_lo=$ac_mid; break
2207 else
2208 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2209 if test $ac_mid -le $ac_hi; then
2210 ac_lo= ac_hi=
2211 break
2212 fi
2213 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2214 fi
2215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2216 done
2217 else
2218 ac_lo= ac_hi=
2219 fi
2220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221 fi
2222 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2223 # Binary search between lo and hi bounds.
2224 while test "x$ac_lo" != "x$ac_hi"; do
2225 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2227 /* end confdefs.h. */
2228 $4
2229 int
2230 main ()
2231 {
2232 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2233 test_array [0] = 0;
2234 return test_array [0];
2235
2236 ;
2237 return 0;
2238 }
2239 _ACEOF
2240 if ac_fn_c_try_compile "$LINENO"; then :
2241 ac_hi=$ac_mid
2242 else
2243 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2244 fi
2245 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2246 done
2247 case $ac_lo in #((
2248 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2249 '') ac_retval=1 ;;
2250 esac
2251 else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253 /* end confdefs.h. */
2254 $4
2255 static long int longval () { return $2; }
2256 static unsigned long int ulongval () { return $2; }
2257 #include <stdio.h>
2258 #include <stdlib.h>
2259 int
2260 main ()
2261 {
2262
2263 FILE *f = fopen ("conftest.val", "w");
2264 if (! f)
2265 return 1;
2266 if (($2) < 0)
2267 {
2268 long int i = longval ();
2269 if (i != ($2))
2270 return 1;
2271 fprintf (f, "%ld", i);
2272 }
2273 else
2274 {
2275 unsigned long int i = ulongval ();
2276 if (i != ($2))
2277 return 1;
2278 fprintf (f, "%lu", i);
2279 }
2280 /* Do not output a trailing newline, as this causes \r\n confusion
2281 on some platforms. */
2282 return ferror (f) || fclose (f) != 0;
2283
2284 ;
2285 return 0;
2286 }
2287 _ACEOF
2288 if ac_fn_c_try_run "$LINENO"; then :
2289 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2290 else
2291 ac_retval=1
2292 fi
2293 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2294 conftest.$ac_objext conftest.beam conftest.$ac_ext
2295 rm -f conftest.val
2296
2297 fi
2298 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299 as_fn_set_status $ac_retval
2300
2301 } # ac_fn_c_compute_int
2302
2303 # ac_fn_c_check_func LINENO FUNC VAR
2304 # ----------------------------------
2305 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2306 ac_fn_c_check_func ()
2307 {
2308 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2310 $as_echo_n "checking for $2... " >&6; }
2311 if eval \${$3+:} false; then :
2312 $as_echo_n "(cached) " >&6
2313 else
2314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2315 /* end confdefs.h. */
2316 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2317 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2318 #define $2 innocuous_$2
2319
2320 /* System header to define __stub macros and hopefully few prototypes,
2321 which can conflict with char $2 (); below.
2322 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2323 <limits.h> exists even on freestanding compilers. */
2324
2325 #ifdef __STDC__
2326 # include <limits.h>
2327 #else
2328 # include <assert.h>
2329 #endif
2330
2331 #undef $2
2332
2333 /* Override any GCC internal prototype to avoid an error.
2334 Use char because int might match the return type of a GCC
2335 builtin and then its argument prototype would still apply. */
2336 #ifdef __cplusplus
2337 extern "C"
2338 #endif
2339 char $2 ();
2340 /* The GNU C library defines this for functions which it implements
2341 to always fail with ENOSYS. Some functions are actually named
2342 something starting with __ and the normal name is an alias. */
2343 #if defined __stub_$2 || defined __stub___$2
2344 choke me
2345 #endif
2346
2347 int
2348 main ()
2349 {
2350 return $2 ();
2351 ;
2352 return 0;
2353 }
2354 _ACEOF
2355 if ac_fn_c_try_link "$LINENO"; then :
2356 eval "$3=yes"
2357 else
2358 eval "$3=no"
2359 fi
2360 rm -f core conftest.err conftest.$ac_objext \
2361 conftest$ac_exeext conftest.$ac_ext
2362 fi
2363 eval ac_res=\$$3
2364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2365 $as_echo "$ac_res" >&6; }
2366 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2367
2368 } # ac_fn_c_check_func
2369
2370 # ac_fn_cxx_try_link LINENO
2371 # -------------------------
2372 # Try to link conftest.$ac_ext, and return whether this succeeded.
2373 ac_fn_cxx_try_link ()
2374 {
2375 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2376 rm -f conftest.$ac_objext conftest$ac_exeext
2377 if { { ac_try="$ac_link"
2378 case "(($ac_try" in
2379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2380 *) ac_try_echo=$ac_try;;
2381 esac
2382 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2383 $as_echo "$ac_try_echo"; } >&5
2384 (eval "$ac_link") 2>conftest.err
2385 ac_status=$?
2386 if test -s conftest.err; then
2387 grep -v '^ *+' conftest.err >conftest.er1
2388 cat conftest.er1 >&5
2389 mv -f conftest.er1 conftest.err
2390 fi
2391 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2392 test $ac_status = 0; } && {
2393 test -z "$ac_cxx_werror_flag" ||
2394 test ! -s conftest.err
2395 } && test -s conftest$ac_exeext && {
2396 test "$cross_compiling" = yes ||
2397 test -x conftest$ac_exeext
2398 }; then :
2399 ac_retval=0
2400 else
2401 $as_echo "$as_me: failed program was:" >&5
2402 sed 's/^/| /' conftest.$ac_ext >&5
2403
2404 ac_retval=1
2405 fi
2406 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2407 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2408 # interfere with the next link command; also delete a directory that is
2409 # left behind by Apple's compiler. We do this before executing the actions.
2410 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2411 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2412 as_fn_set_status $ac_retval
2413
2414 } # ac_fn_cxx_try_link
2415
2416 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2417 # -------------------------------------------
2418 # Tests whether TYPE exists after having included INCLUDES, setting cache
2419 # variable VAR accordingly.
2420 ac_fn_c_check_type ()
2421 {
2422 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2424 $as_echo_n "checking for $2... " >&6; }
2425 if eval \${$3+:} false; then :
2426 $as_echo_n "(cached) " >&6
2427 else
2428 eval "$3=no"
2429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430 /* end confdefs.h. */
2431 $4
2432 int
2433 main ()
2434 {
2435 if (sizeof ($2))
2436 return 0;
2437 ;
2438 return 0;
2439 }
2440 _ACEOF
2441 if ac_fn_c_try_compile "$LINENO"; then :
2442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2443 /* end confdefs.h. */
2444 $4
2445 int
2446 main ()
2447 {
2448 if (sizeof (($2)))
2449 return 0;
2450 ;
2451 return 0;
2452 }
2453 _ACEOF
2454 if ac_fn_c_try_compile "$LINENO"; then :
2455
2456 else
2457 eval "$3=yes"
2458 fi
2459 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2460 fi
2461 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2462 fi
2463 eval ac_res=\$$3
2464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2465 $as_echo "$ac_res" >&6; }
2466 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2467
2468 } # ac_fn_c_check_type
2469
2470 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2471 # ---------------------------------------------
2472 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2473 # accordingly.
2474 ac_fn_c_check_decl ()
2475 {
2476 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2477 as_decl_name=`echo $2|sed 's/ *(.*//'`
2478 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2480 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2481 if eval \${$3+:} false; then :
2482 $as_echo_n "(cached) " >&6
2483 else
2484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2485 /* end confdefs.h. */
2486 $4
2487 int
2488 main ()
2489 {
2490 #ifndef $as_decl_name
2491 #ifdef __cplusplus
2492 (void) $as_decl_use;
2493 #else
2494 (void) $as_decl_name;
2495 #endif
2496 #endif
2497
2498 ;
2499 return 0;
2500 }
2501 _ACEOF
2502 if ac_fn_c_try_compile "$LINENO"; then :
2503 eval "$3=yes"
2504 else
2505 eval "$3=no"
2506 fi
2507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2508 fi
2509 eval ac_res=\$$3
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2511 $as_echo "$ac_res" >&6; }
2512 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2513
2514 } # ac_fn_c_check_decl
2515
2516 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2517 # ----------------------------------------------------
2518 # Tries to find if the field MEMBER exists in type AGGR, after including
2519 # INCLUDES, setting cache variable VAR accordingly.
2520 ac_fn_c_check_member ()
2521 {
2522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2524 $as_echo_n "checking for $2.$3... " >&6; }
2525 if eval \${$4+:} false; then :
2526 $as_echo_n "(cached) " >&6
2527 else
2528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2529 /* end confdefs.h. */
2530 $5
2531 int
2532 main ()
2533 {
2534 static $2 ac_aggr;
2535 if (ac_aggr.$3)
2536 return 0;
2537 ;
2538 return 0;
2539 }
2540 _ACEOF
2541 if ac_fn_c_try_compile "$LINENO"; then :
2542 eval "$4=yes"
2543 else
2544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2545 /* end confdefs.h. */
2546 $5
2547 int
2548 main ()
2549 {
2550 static $2 ac_aggr;
2551 if (sizeof ac_aggr.$3)
2552 return 0;
2553 ;
2554 return 0;
2555 }
2556 _ACEOF
2557 if ac_fn_c_try_compile "$LINENO"; then :
2558 eval "$4=yes"
2559 else
2560 eval "$4=no"
2561 fi
2562 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2563 fi
2564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2565 fi
2566 eval ac_res=\$$4
2567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2568 $as_echo "$ac_res" >&6; }
2569 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2570
2571 } # ac_fn_c_check_member
2572
2573 # ac_fn_cxx_check_func LINENO FUNC VAR
2574 # ------------------------------------
2575 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2576 ac_fn_cxx_check_func ()
2577 {
2578 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2580 $as_echo_n "checking for $2... " >&6; }
2581 if eval \${$3+:} false; then :
2582 $as_echo_n "(cached) " >&6
2583 else
2584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2585 /* end confdefs.h. */
2586 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2587 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2588 #define $2 innocuous_$2
2589
2590 /* System header to define __stub macros and hopefully few prototypes,
2591 which can conflict with char $2 (); below.
2592 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2593 <limits.h> exists even on freestanding compilers. */
2594
2595 #ifdef __STDC__
2596 # include <limits.h>
2597 #else
2598 # include <assert.h>
2599 #endif
2600
2601 #undef $2
2602
2603 /* Override any GCC internal prototype to avoid an error.
2604 Use char because int might match the return type of a GCC
2605 builtin and then its argument prototype would still apply. */
2606 #ifdef __cplusplus
2607 extern "C"
2608 #endif
2609 char $2 ();
2610 /* The GNU C library defines this for functions which it implements
2611 to always fail with ENOSYS. Some functions are actually named
2612 something starting with __ and the normal name is an alias. */
2613 #if defined __stub_$2 || defined __stub___$2
2614 choke me
2615 #endif
2616
2617 int
2618 main ()
2619 {
2620 return $2 ();
2621 ;
2622 return 0;
2623 }
2624 _ACEOF
2625 if ac_fn_cxx_try_link "$LINENO"; then :
2626 eval "$3=yes"
2627 else
2628 eval "$3=no"
2629 fi
2630 rm -f core conftest.err conftest.$ac_objext \
2631 conftest$ac_exeext conftest.$ac_ext
2632 fi
2633 eval ac_res=\$$3
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2635 $as_echo "$ac_res" >&6; }
2636 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2637
2638 } # ac_fn_cxx_check_func
2639 cat >config.log <<_ACEOF
2640 This file contains any messages produced by compilers while
2641 running configure, to aid debugging if configure makes a mistake.
2642
2643 It was created by $as_me, which was
2644 generated by GNU Autoconf 2.69. Invocation command line was
2645
2646 $ $0 $@
2647
2648 _ACEOF
2649 exec 5>>config.log
2650 {
2651 cat <<_ASUNAME
2652 ## --------- ##
2653 ## Platform. ##
2654 ## --------- ##
2655
2656 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2657 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2658 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2659 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2660 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2661
2662 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2663 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2664
2665 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2666 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2667 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2668 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2669 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2670 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2671 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2672
2673 _ASUNAME
2674
2675 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2676 for as_dir in $PATH
2677 do
2678 IFS=$as_save_IFS
2679 test -z "$as_dir" && as_dir=.
2680 $as_echo "PATH: $as_dir"
2681 done
2682 IFS=$as_save_IFS
2683
2684 } >&5
2685
2686 cat >&5 <<_ACEOF
2687
2688
2689 ## ----------- ##
2690 ## Core tests. ##
2691 ## ----------- ##
2692
2693 _ACEOF
2694
2695
2696 # Keep a trace of the command line.
2697 # Strip out --no-create and --no-recursion so they do not pile up.
2698 # Strip out --silent because we don't want to record it for future runs.
2699 # Also quote any args containing shell meta-characters.
2700 # Make two passes to allow for proper duplicate-argument suppression.
2701 ac_configure_args=
2702 ac_configure_args0=
2703 ac_configure_args1=
2704 ac_must_keep_next=false
2705 for ac_pass in 1 2
2706 do
2707 for ac_arg
2708 do
2709 case $ac_arg in
2710 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2711 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2712 | -silent | --silent | --silen | --sile | --sil)
2713 continue ;;
2714 *\'*)
2715 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2716 esac
2717 case $ac_pass in
2718 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2719 2)
2720 as_fn_append ac_configure_args1 " '$ac_arg'"
2721 if test $ac_must_keep_next = true; then
2722 ac_must_keep_next=false # Got value, back to normal.
2723 else
2724 case $ac_arg in
2725 *=* | --config-cache | -C | -disable-* | --disable-* \
2726 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2727 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2728 | -with-* | --with-* | -without-* | --without-* | --x)
2729 case "$ac_configure_args0 " in
2730 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2731 esac
2732 ;;
2733 -* ) ac_must_keep_next=true ;;
2734 esac
2735 fi
2736 as_fn_append ac_configure_args " '$ac_arg'"
2737 ;;
2738 esac
2739 done
2740 done
2741 { ac_configure_args0=; unset ac_configure_args0;}
2742 { ac_configure_args1=; unset ac_configure_args1;}
2743
2744 # When interrupted or exit'd, cleanup temporary files, and complete
2745 # config.log. We remove comments because anyway the quotes in there
2746 # would cause problems or look ugly.
2747 # WARNING: Use '\'' to represent an apostrophe within the trap.
2748 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2749 trap 'exit_status=$?
2750 # Save into config.log some information that might help in debugging.
2751 {
2752 echo
2753
2754 $as_echo "## ---------------- ##
2755 ## Cache variables. ##
2756 ## ---------------- ##"
2757 echo
2758 # The following way of writing the cache mishandles newlines in values,
2759 (
2760 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2761 eval ac_val=\$$ac_var
2762 case $ac_val in #(
2763 *${as_nl}*)
2764 case $ac_var in #(
2765 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2766 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2767 esac
2768 case $ac_var in #(
2769 _ | IFS | as_nl) ;; #(
2770 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2771 *) { eval $ac_var=; unset $ac_var;} ;;
2772 esac ;;
2773 esac
2774 done
2775 (set) 2>&1 |
2776 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2777 *${as_nl}ac_space=\ *)
2778 sed -n \
2779 "s/'\''/'\''\\\\'\'''\''/g;
2780 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2781 ;; #(
2782 *)
2783 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2784 ;;
2785 esac |
2786 sort
2787 )
2788 echo
2789
2790 $as_echo "## ----------------- ##
2791 ## Output variables. ##
2792 ## ----------------- ##"
2793 echo
2794 for ac_var in $ac_subst_vars
2795 do
2796 eval ac_val=\$$ac_var
2797 case $ac_val in
2798 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2799 esac
2800 $as_echo "$ac_var='\''$ac_val'\''"
2801 done | sort
2802 echo
2803
2804 if test -n "$ac_subst_files"; then
2805 $as_echo "## ------------------- ##
2806 ## File substitutions. ##
2807 ## ------------------- ##"
2808 echo
2809 for ac_var in $ac_subst_files
2810 do
2811 eval ac_val=\$$ac_var
2812 case $ac_val in
2813 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2814 esac
2815 $as_echo "$ac_var='\''$ac_val'\''"
2816 done | sort
2817 echo
2818 fi
2819
2820 if test -s confdefs.h; then
2821 $as_echo "## ----------- ##
2822 ## confdefs.h. ##
2823 ## ----------- ##"
2824 echo
2825 cat confdefs.h
2826 echo
2827 fi
2828 test "$ac_signal" != 0 &&
2829 $as_echo "$as_me: caught signal $ac_signal"
2830 $as_echo "$as_me: exit $exit_status"
2831 } >&5
2832 rm -f core *.core core.conftest.* &&
2833 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2834 exit $exit_status
2835 ' 0
2836 for ac_signal in 1 2 13 15; do
2837 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2838 done
2839 ac_signal=0
2840
2841 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2842 rm -f -r conftest* confdefs.h
2843
2844 $as_echo "/* confdefs.h */" > confdefs.h
2845
2846 # Predefined preprocessor variables.
2847
2848 cat >>confdefs.h <<_ACEOF
2849 #define PACKAGE_NAME "$PACKAGE_NAME"
2850 _ACEOF
2851
2852 cat >>confdefs.h <<_ACEOF
2853 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2854 _ACEOF
2855
2856 cat >>confdefs.h <<_ACEOF
2857 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2858 _ACEOF
2859
2860 cat >>confdefs.h <<_ACEOF
2861 #define PACKAGE_STRING "$PACKAGE_STRING"
2862 _ACEOF
2863
2864 cat >>confdefs.h <<_ACEOF
2865 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2866 _ACEOF
2867
2868 cat >>confdefs.h <<_ACEOF
2869 #define PACKAGE_URL "$PACKAGE_URL"
2870 _ACEOF
2871
2872
2873 # Let the site file select an alternate cache file if it wants to.
2874 # Prefer an explicitly selected file to automatically selected ones.
2875 ac_site_file1=NONE
2876 ac_site_file2=NONE
2877 if test -n "$CONFIG_SITE"; then
2878 # We do not want a PATH search for config.site.
2879 case $CONFIG_SITE in #((
2880 -*) ac_site_file1=./$CONFIG_SITE;;
2881 */*) ac_site_file1=$CONFIG_SITE;;
2882 *) ac_site_file1=./$CONFIG_SITE;;
2883 esac
2884 elif test "x$prefix" != xNONE; then
2885 ac_site_file1=$prefix/share/config.site
2886 ac_site_file2=$prefix/etc/config.site
2887 else
2888 ac_site_file1=$ac_default_prefix/share/config.site
2889 ac_site_file2=$ac_default_prefix/etc/config.site
2890 fi
2891 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2892 do
2893 test "x$ac_site_file" = xNONE && continue
2894 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2895 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2896 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2897 sed 's/^/| /' "$ac_site_file" >&5
2898 . "$ac_site_file" \
2899 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2900 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2901 as_fn_error $? "failed to load site script $ac_site_file
2902 See \`config.log' for more details" "$LINENO" 5; }
2903 fi
2904 done
2905
2906 if test -r "$cache_file"; then
2907 # Some versions of bash will fail to source /dev/null (special files
2908 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2909 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2911 $as_echo "$as_me: loading cache $cache_file" >&6;}
2912 case $cache_file in
2913 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2914 *) . "./$cache_file";;
2915 esac
2916 fi
2917 else
2918 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2919 $as_echo "$as_me: creating cache $cache_file" >&6;}
2920 >$cache_file
2921 fi
2922
2923 as_fn_append ac_header_list " stdlib.h"
2924 as_fn_append ac_header_list " unistd.h"
2925 as_fn_append ac_header_list " sys/param.h"
2926 # Check that the precious variables saved in the cache have kept the same
2927 # value.
2928 ac_cache_corrupted=false
2929 for ac_var in $ac_precious_vars; do
2930 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2931 eval ac_new_set=\$ac_env_${ac_var}_set
2932 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2933 eval ac_new_val=\$ac_env_${ac_var}_value
2934 case $ac_old_set,$ac_new_set in
2935 set,)
2936 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2937 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2938 ac_cache_corrupted=: ;;
2939 ,set)
2940 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2941 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2942 ac_cache_corrupted=: ;;
2943 ,);;
2944 *)
2945 if test "x$ac_old_val" != "x$ac_new_val"; then
2946 # differences in whitespace do not lead to failure.
2947 ac_old_val_w=`echo x $ac_old_val`
2948 ac_new_val_w=`echo x $ac_new_val`
2949 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2950 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2951 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2952 ac_cache_corrupted=:
2953 else
2954 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2955 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2956 eval $ac_var=\$ac_old_val
2957 fi
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2959 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2960 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2961 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2962 fi;;
2963 esac
2964 # Pass precious variables to config.status.
2965 if test "$ac_new_set" = set; then
2966 case $ac_new_val in
2967 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2968 *) ac_arg=$ac_var=$ac_new_val ;;
2969 esac
2970 case " $ac_configure_args " in
2971 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2972 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2973 esac
2974 fi
2975 done
2976 if $ac_cache_corrupted; then
2977 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2978 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2979 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2980 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2981 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2982 fi
2983 ## -------------------- ##
2984 ## Main body of script. ##
2985 ## -------------------- ##
2986
2987 ac_ext=c
2988 ac_cpp='$CPP $CPPFLAGS'
2989 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2990 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2991 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2992
2993
2994
2995
2996
2997
2998
2999 ac_config_headers="$ac_config_headers config.h:config.in"
3000
3001
3002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3003 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3004 # Check whether --enable-maintainer-mode was given.
3005 if test "${enable_maintainer_mode+set}" = set; then :
3006 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3007 else
3008 USE_MAINTAINER_MODE=no
3009 fi
3010
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3012 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3013 if test $USE_MAINTAINER_MODE = yes; then
3014 MAINTAINER_MODE_TRUE=
3015 MAINTAINER_MODE_FALSE='#'
3016 else
3017 MAINTAINER_MODE_TRUE='#'
3018 MAINTAINER_MODE_FALSE=
3019 fi
3020
3021 MAINT=$MAINTAINER_MODE_TRUE
3022
3023
3024
3025 ac_ext=c
3026 ac_cpp='$CPP $CPPFLAGS'
3027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3030 if test -n "$ac_tool_prefix"; then
3031 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3032 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3034 $as_echo_n "checking for $ac_word... " >&6; }
3035 if ${ac_cv_prog_CC+:} false; then :
3036 $as_echo_n "(cached) " >&6
3037 else
3038 if test -n "$CC"; then
3039 ac_cv_prog_CC="$CC" # Let the user override the test.
3040 else
3041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3042 for as_dir in $PATH
3043 do
3044 IFS=$as_save_IFS
3045 test -z "$as_dir" && as_dir=.
3046 for ac_exec_ext in '' $ac_executable_extensions; do
3047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3048 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3050 break 2
3051 fi
3052 done
3053 done
3054 IFS=$as_save_IFS
3055
3056 fi
3057 fi
3058 CC=$ac_cv_prog_CC
3059 if test -n "$CC"; then
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3061 $as_echo "$CC" >&6; }
3062 else
3063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3064 $as_echo "no" >&6; }
3065 fi
3066
3067
3068 fi
3069 if test -z "$ac_cv_prog_CC"; then
3070 ac_ct_CC=$CC
3071 # Extract the first word of "gcc", so it can be a program name with args.
3072 set dummy gcc; ac_word=$2
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3074 $as_echo_n "checking for $ac_word... " >&6; }
3075 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3076 $as_echo_n "(cached) " >&6
3077 else
3078 if test -n "$ac_ct_CC"; then
3079 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3080 else
3081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3082 for as_dir in $PATH
3083 do
3084 IFS=$as_save_IFS
3085 test -z "$as_dir" && as_dir=.
3086 for ac_exec_ext in '' $ac_executable_extensions; do
3087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3088 ac_cv_prog_ac_ct_CC="gcc"
3089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3090 break 2
3091 fi
3092 done
3093 done
3094 IFS=$as_save_IFS
3095
3096 fi
3097 fi
3098 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3099 if test -n "$ac_ct_CC"; then
3100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3101 $as_echo "$ac_ct_CC" >&6; }
3102 else
3103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3104 $as_echo "no" >&6; }
3105 fi
3106
3107 if test "x$ac_ct_CC" = x; then
3108 CC=""
3109 else
3110 case $cross_compiling:$ac_tool_warned in
3111 yes:)
3112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3113 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3114 ac_tool_warned=yes ;;
3115 esac
3116 CC=$ac_ct_CC
3117 fi
3118 else
3119 CC="$ac_cv_prog_CC"
3120 fi
3121
3122 if test -z "$CC"; then
3123 if test -n "$ac_tool_prefix"; then
3124 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3125 set dummy ${ac_tool_prefix}cc; ac_word=$2
3126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3127 $as_echo_n "checking for $ac_word... " >&6; }
3128 if ${ac_cv_prog_CC+:} false; then :
3129 $as_echo_n "(cached) " >&6
3130 else
3131 if test -n "$CC"; then
3132 ac_cv_prog_CC="$CC" # Let the user override the test.
3133 else
3134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3135 for as_dir in $PATH
3136 do
3137 IFS=$as_save_IFS
3138 test -z "$as_dir" && as_dir=.
3139 for ac_exec_ext in '' $ac_executable_extensions; do
3140 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3141 ac_cv_prog_CC="${ac_tool_prefix}cc"
3142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3143 break 2
3144 fi
3145 done
3146 done
3147 IFS=$as_save_IFS
3148
3149 fi
3150 fi
3151 CC=$ac_cv_prog_CC
3152 if test -n "$CC"; then
3153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3154 $as_echo "$CC" >&6; }
3155 else
3156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3157 $as_echo "no" >&6; }
3158 fi
3159
3160
3161 fi
3162 fi
3163 if test -z "$CC"; then
3164 # Extract the first word of "cc", so it can be a program name with args.
3165 set dummy cc; ac_word=$2
3166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3167 $as_echo_n "checking for $ac_word... " >&6; }
3168 if ${ac_cv_prog_CC+:} false; then :
3169 $as_echo_n "(cached) " >&6
3170 else
3171 if test -n "$CC"; then
3172 ac_cv_prog_CC="$CC" # Let the user override the test.
3173 else
3174 ac_prog_rejected=no
3175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3176 for as_dir in $PATH
3177 do
3178 IFS=$as_save_IFS
3179 test -z "$as_dir" && as_dir=.
3180 for ac_exec_ext in '' $ac_executable_extensions; do
3181 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3182 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3183 ac_prog_rejected=yes
3184 continue
3185 fi
3186 ac_cv_prog_CC="cc"
3187 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3188 break 2
3189 fi
3190 done
3191 done
3192 IFS=$as_save_IFS
3193
3194 if test $ac_prog_rejected = yes; then
3195 # We found a bogon in the path, so make sure we never use it.
3196 set dummy $ac_cv_prog_CC
3197 shift
3198 if test $# != 0; then
3199 # We chose a different compiler from the bogus one.
3200 # However, it has the same basename, so the bogon will be chosen
3201 # first if we set CC to just the basename; use the full file name.
3202 shift
3203 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3204 fi
3205 fi
3206 fi
3207 fi
3208 CC=$ac_cv_prog_CC
3209 if test -n "$CC"; then
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3211 $as_echo "$CC" >&6; }
3212 else
3213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3214 $as_echo "no" >&6; }
3215 fi
3216
3217
3218 fi
3219 if test -z "$CC"; then
3220 if test -n "$ac_tool_prefix"; then
3221 for ac_prog in cl.exe
3222 do
3223 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3224 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3226 $as_echo_n "checking for $ac_word... " >&6; }
3227 if ${ac_cv_prog_CC+:} false; then :
3228 $as_echo_n "(cached) " >&6
3229 else
3230 if test -n "$CC"; then
3231 ac_cv_prog_CC="$CC" # Let the user override the test.
3232 else
3233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3234 for as_dir in $PATH
3235 do
3236 IFS=$as_save_IFS
3237 test -z "$as_dir" && as_dir=.
3238 for ac_exec_ext in '' $ac_executable_extensions; do
3239 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3240 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3241 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3242 break 2
3243 fi
3244 done
3245 done
3246 IFS=$as_save_IFS
3247
3248 fi
3249 fi
3250 CC=$ac_cv_prog_CC
3251 if test -n "$CC"; then
3252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3253 $as_echo "$CC" >&6; }
3254 else
3255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3256 $as_echo "no" >&6; }
3257 fi
3258
3259
3260 test -n "$CC" && break
3261 done
3262 fi
3263 if test -z "$CC"; then
3264 ac_ct_CC=$CC
3265 for ac_prog in cl.exe
3266 do
3267 # Extract the first word of "$ac_prog", so it can be a program name with args.
3268 set dummy $ac_prog; ac_word=$2
3269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3270 $as_echo_n "checking for $ac_word... " >&6; }
3271 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3272 $as_echo_n "(cached) " >&6
3273 else
3274 if test -n "$ac_ct_CC"; then
3275 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3276 else
3277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3278 for as_dir in $PATH
3279 do
3280 IFS=$as_save_IFS
3281 test -z "$as_dir" && as_dir=.
3282 for ac_exec_ext in '' $ac_executable_extensions; do
3283 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3284 ac_cv_prog_ac_ct_CC="$ac_prog"
3285 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3286 break 2
3287 fi
3288 done
3289 done
3290 IFS=$as_save_IFS
3291
3292 fi
3293 fi
3294 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3295 if test -n "$ac_ct_CC"; then
3296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3297 $as_echo "$ac_ct_CC" >&6; }
3298 else
3299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3300 $as_echo "no" >&6; }
3301 fi
3302
3303
3304 test -n "$ac_ct_CC" && break
3305 done
3306
3307 if test "x$ac_ct_CC" = x; then
3308 CC=""
3309 else
3310 case $cross_compiling:$ac_tool_warned in
3311 yes:)
3312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3313 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3314 ac_tool_warned=yes ;;
3315 esac
3316 CC=$ac_ct_CC
3317 fi
3318 fi
3319
3320 fi
3321
3322
3323 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3324 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3325 as_fn_error $? "no acceptable C compiler found in \$PATH
3326 See \`config.log' for more details" "$LINENO" 5; }
3327
3328 # Provide some information about the compiler.
3329 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3330 set X $ac_compile
3331 ac_compiler=$2
3332 for ac_option in --version -v -V -qversion; do
3333 { { ac_try="$ac_compiler $ac_option >&5"
3334 case "(($ac_try" in
3335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3336 *) ac_try_echo=$ac_try;;
3337 esac
3338 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3339 $as_echo "$ac_try_echo"; } >&5
3340 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3341 ac_status=$?
3342 if test -s conftest.err; then
3343 sed '10a\
3344 ... rest of stderr output deleted ...
3345 10q' conftest.err >conftest.er1
3346 cat conftest.er1 >&5
3347 fi
3348 rm -f conftest.er1 conftest.err
3349 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3350 test $ac_status = 0; }
3351 done
3352
3353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3354 /* end confdefs.h. */
3355
3356 int
3357 main ()
3358 {
3359
3360 ;
3361 return 0;
3362 }
3363 _ACEOF
3364 ac_clean_files_save=$ac_clean_files
3365 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3366 # Try to create an executable without -o first, disregard a.out.
3367 # It will help us diagnose broken compilers, and finding out an intuition
3368 # of exeext.
3369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3370 $as_echo_n "checking whether the C compiler works... " >&6; }
3371 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3372
3373 # The possible output files:
3374 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3375
3376 ac_rmfiles=
3377 for ac_file in $ac_files
3378 do
3379 case $ac_file in
3380 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3381 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3382 esac
3383 done
3384 rm -f $ac_rmfiles
3385
3386 if { { ac_try="$ac_link_default"
3387 case "(($ac_try" in
3388 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3389 *) ac_try_echo=$ac_try;;
3390 esac
3391 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3392 $as_echo "$ac_try_echo"; } >&5
3393 (eval "$ac_link_default") 2>&5
3394 ac_status=$?
3395 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3396 test $ac_status = 0; }; then :
3397 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3398 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3399 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3400 # so that the user can short-circuit this test for compilers unknown to
3401 # Autoconf.
3402 for ac_file in $ac_files ''
3403 do
3404 test -f "$ac_file" || continue
3405 case $ac_file in
3406 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3407 ;;
3408 [ab].out )
3409 # We found the default executable, but exeext='' is most
3410 # certainly right.
3411 break;;
3412 *.* )
3413 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3414 then :; else
3415 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3416 fi
3417 # We set ac_cv_exeext here because the later test for it is not
3418 # safe: cross compilers may not add the suffix if given an `-o'
3419 # argument, so we may need to know it at that point already.
3420 # Even if this section looks crufty: it has the advantage of
3421 # actually working.
3422 break;;
3423 * )
3424 break;;
3425 esac
3426 done
3427 test "$ac_cv_exeext" = no && ac_cv_exeext=
3428
3429 else
3430 ac_file=''
3431 fi
3432 if test -z "$ac_file"; then :
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3434 $as_echo "no" >&6; }
3435 $as_echo "$as_me: failed program was:" >&5
3436 sed 's/^/| /' conftest.$ac_ext >&5
3437
3438 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3439 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3440 as_fn_error 77 "C compiler cannot create executables
3441 See \`config.log' for more details" "$LINENO" 5; }
3442 else
3443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3444 $as_echo "yes" >&6; }
3445 fi
3446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3447 $as_echo_n "checking for C compiler default output file name... " >&6; }
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3449 $as_echo "$ac_file" >&6; }
3450 ac_exeext=$ac_cv_exeext
3451
3452 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3453 ac_clean_files=$ac_clean_files_save
3454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3455 $as_echo_n "checking for suffix of executables... " >&6; }
3456 if { { ac_try="$ac_link"
3457 case "(($ac_try" in
3458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3459 *) ac_try_echo=$ac_try;;
3460 esac
3461 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3462 $as_echo "$ac_try_echo"; } >&5
3463 (eval "$ac_link") 2>&5
3464 ac_status=$?
3465 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3466 test $ac_status = 0; }; then :
3467 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3468 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3469 # work properly (i.e., refer to `conftest.exe'), while it won't with
3470 # `rm'.
3471 for ac_file in conftest.exe conftest conftest.*; do
3472 test -f "$ac_file" || continue
3473 case $ac_file in
3474 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3475 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3476 break;;
3477 * ) break;;
3478 esac
3479 done
3480 else
3481 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3482 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3483 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3484 See \`config.log' for more details" "$LINENO" 5; }
3485 fi
3486 rm -f conftest conftest$ac_cv_exeext
3487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3488 $as_echo "$ac_cv_exeext" >&6; }
3489
3490 rm -f conftest.$ac_ext
3491 EXEEXT=$ac_cv_exeext
3492 ac_exeext=$EXEEXT
3493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3494 /* end confdefs.h. */
3495 #include <stdio.h>
3496 int
3497 main ()
3498 {
3499 FILE *f = fopen ("conftest.out", "w");
3500 return ferror (f) || fclose (f) != 0;
3501
3502 ;
3503 return 0;
3504 }
3505 _ACEOF
3506 ac_clean_files="$ac_clean_files conftest.out"
3507 # Check that the compiler produces executables we can run. If not, either
3508 # the compiler is broken, or we cross compile.
3509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3510 $as_echo_n "checking whether we are cross compiling... " >&6; }
3511 if test "$cross_compiling" != yes; then
3512 { { ac_try="$ac_link"
3513 case "(($ac_try" in
3514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3515 *) ac_try_echo=$ac_try;;
3516 esac
3517 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3518 $as_echo "$ac_try_echo"; } >&5
3519 (eval "$ac_link") 2>&5
3520 ac_status=$?
3521 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3522 test $ac_status = 0; }
3523 if { ac_try='./conftest$ac_cv_exeext'
3524 { { case "(($ac_try" in
3525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526 *) ac_try_echo=$ac_try;;
3527 esac
3528 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3529 $as_echo "$ac_try_echo"; } >&5
3530 (eval "$ac_try") 2>&5
3531 ac_status=$?
3532 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3533 test $ac_status = 0; }; }; then
3534 cross_compiling=no
3535 else
3536 if test "$cross_compiling" = maybe; then
3537 cross_compiling=yes
3538 else
3539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3540 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3541 as_fn_error $? "cannot run C compiled programs.
3542 If you meant to cross compile, use \`--host'.
3543 See \`config.log' for more details" "$LINENO" 5; }
3544 fi
3545 fi
3546 fi
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3548 $as_echo "$cross_compiling" >&6; }
3549
3550 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3551 ac_clean_files=$ac_clean_files_save
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3553 $as_echo_n "checking for suffix of object files... " >&6; }
3554 if ${ac_cv_objext+:} false; then :
3555 $as_echo_n "(cached) " >&6
3556 else
3557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3558 /* end confdefs.h. */
3559
3560 int
3561 main ()
3562 {
3563
3564 ;
3565 return 0;
3566 }
3567 _ACEOF
3568 rm -f conftest.o conftest.obj
3569 if { { ac_try="$ac_compile"
3570 case "(($ac_try" in
3571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3572 *) ac_try_echo=$ac_try;;
3573 esac
3574 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3575 $as_echo "$ac_try_echo"; } >&5
3576 (eval "$ac_compile") 2>&5
3577 ac_status=$?
3578 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3579 test $ac_status = 0; }; then :
3580 for ac_file in conftest.o conftest.obj conftest.*; do
3581 test -f "$ac_file" || continue;
3582 case $ac_file in
3583 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3584 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3585 break;;
3586 esac
3587 done
3588 else
3589 $as_echo "$as_me: failed program was:" >&5
3590 sed 's/^/| /' conftest.$ac_ext >&5
3591
3592 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3593 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3594 as_fn_error $? "cannot compute suffix of object files: cannot compile
3595 See \`config.log' for more details" "$LINENO" 5; }
3596 fi
3597 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3598 fi
3599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3600 $as_echo "$ac_cv_objext" >&6; }
3601 OBJEXT=$ac_cv_objext
3602 ac_objext=$OBJEXT
3603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3604 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3605 if ${ac_cv_c_compiler_gnu+:} false; then :
3606 $as_echo_n "(cached) " >&6
3607 else
3608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3609 /* end confdefs.h. */
3610
3611 int
3612 main ()
3613 {
3614 #ifndef __GNUC__
3615 choke me
3616 #endif
3617
3618 ;
3619 return 0;
3620 }
3621 _ACEOF
3622 if ac_fn_c_try_compile "$LINENO"; then :
3623 ac_compiler_gnu=yes
3624 else
3625 ac_compiler_gnu=no
3626 fi
3627 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3628 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3629
3630 fi
3631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3632 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3633 if test $ac_compiler_gnu = yes; then
3634 GCC=yes
3635 else
3636 GCC=
3637 fi
3638 ac_test_CFLAGS=${CFLAGS+set}
3639 ac_save_CFLAGS=$CFLAGS
3640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3641 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3642 if ${ac_cv_prog_cc_g+:} false; then :
3643 $as_echo_n "(cached) " >&6
3644 else
3645 ac_save_c_werror_flag=$ac_c_werror_flag
3646 ac_c_werror_flag=yes
3647 ac_cv_prog_cc_g=no
3648 CFLAGS="-g"
3649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3650 /* end confdefs.h. */
3651
3652 int
3653 main ()
3654 {
3655
3656 ;
3657 return 0;
3658 }
3659 _ACEOF
3660 if ac_fn_c_try_compile "$LINENO"; then :
3661 ac_cv_prog_cc_g=yes
3662 else
3663 CFLAGS=""
3664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3665 /* end confdefs.h. */
3666
3667 int
3668 main ()
3669 {
3670
3671 ;
3672 return 0;
3673 }
3674 _ACEOF
3675 if ac_fn_c_try_compile "$LINENO"; then :
3676
3677 else
3678 ac_c_werror_flag=$ac_save_c_werror_flag
3679 CFLAGS="-g"
3680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3681 /* end confdefs.h. */
3682
3683 int
3684 main ()
3685 {
3686
3687 ;
3688 return 0;
3689 }
3690 _ACEOF
3691 if ac_fn_c_try_compile "$LINENO"; then :
3692 ac_cv_prog_cc_g=yes
3693 fi
3694 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3695 fi
3696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3697 fi
3698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3699 ac_c_werror_flag=$ac_save_c_werror_flag
3700 fi
3701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3702 $as_echo "$ac_cv_prog_cc_g" >&6; }
3703 if test "$ac_test_CFLAGS" = set; then
3704 CFLAGS=$ac_save_CFLAGS
3705 elif test $ac_cv_prog_cc_g = yes; then
3706 if test "$GCC" = yes; then
3707 CFLAGS="-g -O2"
3708 else
3709 CFLAGS="-g"
3710 fi
3711 else
3712 if test "$GCC" = yes; then
3713 CFLAGS="-O2"
3714 else
3715 CFLAGS=
3716 fi
3717 fi
3718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3719 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3720 if ${ac_cv_prog_cc_c89+:} false; then :
3721 $as_echo_n "(cached) " >&6
3722 else
3723 ac_cv_prog_cc_c89=no
3724 ac_save_CC=$CC
3725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3726 /* end confdefs.h. */
3727 #include <stdarg.h>
3728 #include <stdio.h>
3729 struct stat;
3730 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3731 struct buf { int x; };
3732 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3733 static char *e (p, i)
3734 char **p;
3735 int i;
3736 {
3737 return p[i];
3738 }
3739 static char *f (char * (*g) (char **, int), char **p, ...)
3740 {
3741 char *s;
3742 va_list v;
3743 va_start (v,p);
3744 s = g (p, va_arg (v,int));
3745 va_end (v);
3746 return s;
3747 }
3748
3749 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3750 function prototypes and stuff, but not '\xHH' hex character constants.
3751 These don't provoke an error unfortunately, instead are silently treated
3752 as 'x'. The following induces an error, until -std is added to get
3753 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3754 array size at least. It's necessary to write '\x00'==0 to get something
3755 that's true only with -std. */
3756 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3757
3758 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3759 inside strings and character constants. */
3760 #define FOO(x) 'x'
3761 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3762
3763 int test (int i, double x);
3764 struct s1 {int (*f) (int a);};
3765 struct s2 {int (*f) (double a);};
3766 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3767 int argc;
3768 char **argv;
3769 int
3770 main ()
3771 {
3772 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3773 ;
3774 return 0;
3775 }
3776 _ACEOF
3777 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3778 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3779 do
3780 CC="$ac_save_CC $ac_arg"
3781 if ac_fn_c_try_compile "$LINENO"; then :
3782 ac_cv_prog_cc_c89=$ac_arg
3783 fi
3784 rm -f core conftest.err conftest.$ac_objext
3785 test "x$ac_cv_prog_cc_c89" != "xno" && break
3786 done
3787 rm -f conftest.$ac_ext
3788 CC=$ac_save_CC
3789
3790 fi
3791 # AC_CACHE_VAL
3792 case "x$ac_cv_prog_cc_c89" in
3793 x)
3794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3795 $as_echo "none needed" >&6; } ;;
3796 xno)
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3798 $as_echo "unsupported" >&6; } ;;
3799 *)
3800 CC="$CC $ac_cv_prog_cc_c89"
3801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3802 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3803 esac
3804 if test "x$ac_cv_prog_cc_c89" != xno; then :
3805
3806 fi
3807
3808 ac_ext=c
3809 ac_cpp='$CPP $CPPFLAGS'
3810 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3811 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3812 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3813
3814 ac_ext=cpp
3815 ac_cpp='$CXXCPP $CPPFLAGS'
3816 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3817 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3818 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3819 if test -z "$CXX"; then
3820 if test -n "$CCC"; then
3821 CXX=$CCC
3822 else
3823 if test -n "$ac_tool_prefix"; then
3824 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3825 do
3826 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3827 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3829 $as_echo_n "checking for $ac_word... " >&6; }
3830 if ${ac_cv_prog_CXX+:} false; then :
3831 $as_echo_n "(cached) " >&6
3832 else
3833 if test -n "$CXX"; then
3834 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3835 else
3836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3837 for as_dir in $PATH
3838 do
3839 IFS=$as_save_IFS
3840 test -z "$as_dir" && as_dir=.
3841 for ac_exec_ext in '' $ac_executable_extensions; do
3842 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3843 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3844 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3845 break 2
3846 fi
3847 done
3848 done
3849 IFS=$as_save_IFS
3850
3851 fi
3852 fi
3853 CXX=$ac_cv_prog_CXX
3854 if test -n "$CXX"; then
3855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3856 $as_echo "$CXX" >&6; }
3857 else
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3859 $as_echo "no" >&6; }
3860 fi
3861
3862
3863 test -n "$CXX" && break
3864 done
3865 fi
3866 if test -z "$CXX"; then
3867 ac_ct_CXX=$CXX
3868 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3869 do
3870 # Extract the first word of "$ac_prog", so it can be a program name with args.
3871 set dummy $ac_prog; ac_word=$2
3872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3873 $as_echo_n "checking for $ac_word... " >&6; }
3874 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3875 $as_echo_n "(cached) " >&6
3876 else
3877 if test -n "$ac_ct_CXX"; then
3878 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3879 else
3880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3881 for as_dir in $PATH
3882 do
3883 IFS=$as_save_IFS
3884 test -z "$as_dir" && as_dir=.
3885 for ac_exec_ext in '' $ac_executable_extensions; do
3886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3887 ac_cv_prog_ac_ct_CXX="$ac_prog"
3888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3889 break 2
3890 fi
3891 done
3892 done
3893 IFS=$as_save_IFS
3894
3895 fi
3896 fi
3897 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3898 if test -n "$ac_ct_CXX"; then
3899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3900 $as_echo "$ac_ct_CXX" >&6; }
3901 else
3902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3903 $as_echo "no" >&6; }
3904 fi
3905
3906
3907 test -n "$ac_ct_CXX" && break
3908 done
3909
3910 if test "x$ac_ct_CXX" = x; then
3911 CXX="g++"
3912 else
3913 case $cross_compiling:$ac_tool_warned in
3914 yes:)
3915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3916 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3917 ac_tool_warned=yes ;;
3918 esac
3919 CXX=$ac_ct_CXX
3920 fi
3921 fi
3922
3923 fi
3924 fi
3925 # Provide some information about the compiler.
3926 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3927 set X $ac_compile
3928 ac_compiler=$2
3929 for ac_option in --version -v -V -qversion; do
3930 { { ac_try="$ac_compiler $ac_option >&5"
3931 case "(($ac_try" in
3932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3933 *) ac_try_echo=$ac_try;;
3934 esac
3935 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3936 $as_echo "$ac_try_echo"; } >&5
3937 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3938 ac_status=$?
3939 if test -s conftest.err; then
3940 sed '10a\
3941 ... rest of stderr output deleted ...
3942 10q' conftest.err >conftest.er1
3943 cat conftest.er1 >&5
3944 fi
3945 rm -f conftest.er1 conftest.err
3946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3947 test $ac_status = 0; }
3948 done
3949
3950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3951 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3952 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3953 $as_echo_n "(cached) " >&6
3954 else
3955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3956 /* end confdefs.h. */
3957
3958 int
3959 main ()
3960 {
3961 #ifndef __GNUC__
3962 choke me
3963 #endif
3964
3965 ;
3966 return 0;
3967 }
3968 _ACEOF
3969 if ac_fn_cxx_try_compile "$LINENO"; then :
3970 ac_compiler_gnu=yes
3971 else
3972 ac_compiler_gnu=no
3973 fi
3974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3975 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3976
3977 fi
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3979 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3980 if test $ac_compiler_gnu = yes; then
3981 GXX=yes
3982 else
3983 GXX=
3984 fi
3985 ac_test_CXXFLAGS=${CXXFLAGS+set}
3986 ac_save_CXXFLAGS=$CXXFLAGS
3987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3988 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3989 if ${ac_cv_prog_cxx_g+:} false; then :
3990 $as_echo_n "(cached) " >&6
3991 else
3992 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3993 ac_cxx_werror_flag=yes
3994 ac_cv_prog_cxx_g=no
3995 CXXFLAGS="-g"
3996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3997 /* end confdefs.h. */
3998
3999 int
4000 main ()
4001 {
4002
4003 ;
4004 return 0;
4005 }
4006 _ACEOF
4007 if ac_fn_cxx_try_compile "$LINENO"; then :
4008 ac_cv_prog_cxx_g=yes
4009 else
4010 CXXFLAGS=""
4011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4012 /* end confdefs.h. */
4013
4014 int
4015 main ()
4016 {
4017
4018 ;
4019 return 0;
4020 }
4021 _ACEOF
4022 if ac_fn_cxx_try_compile "$LINENO"; then :
4023
4024 else
4025 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4026 CXXFLAGS="-g"
4027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4028 /* end confdefs.h. */
4029
4030 int
4031 main ()
4032 {
4033
4034 ;
4035 return 0;
4036 }
4037 _ACEOF
4038 if ac_fn_cxx_try_compile "$LINENO"; then :
4039 ac_cv_prog_cxx_g=yes
4040 fi
4041 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4042 fi
4043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4044 fi
4045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4046 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4047 fi
4048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4049 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4050 if test "$ac_test_CXXFLAGS" = set; then
4051 CXXFLAGS=$ac_save_CXXFLAGS
4052 elif test $ac_cv_prog_cxx_g = yes; then
4053 if test "$GXX" = yes; then
4054 CXXFLAGS="-g -O2"
4055 else
4056 CXXFLAGS="-g"
4057 fi
4058 else
4059 if test "$GXX" = yes; then
4060 CXXFLAGS="-O2"
4061 else
4062 CXXFLAGS=
4063 fi
4064 fi
4065 ac_ext=c
4066 ac_cpp='$CPP $CPPFLAGS'
4067 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4068 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4069 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4070
4071
4072
4073 ac_ext=c
4074 ac_cpp='$CPP $CPPFLAGS'
4075 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4076 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4077 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4079 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4080 # On Suns, sometimes $CPP names a directory.
4081 if test -n "$CPP" && test -d "$CPP"; then
4082 CPP=
4083 fi
4084 if test -z "$CPP"; then
4085 if ${ac_cv_prog_CPP+:} false; then :
4086 $as_echo_n "(cached) " >&6
4087 else
4088 # Double quotes because CPP needs to be expanded
4089 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4090 do
4091 ac_preproc_ok=false
4092 for ac_c_preproc_warn_flag in '' yes
4093 do
4094 # Use a header file that comes with gcc, so configuring glibc
4095 # with a fresh cross-compiler works.
4096 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4097 # <limits.h> exists even on freestanding compilers.
4098 # On the NeXT, cc -E runs the code through the compiler's parser,
4099 # not just through cpp. "Syntax error" is here to catch this case.
4100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4101 /* end confdefs.h. */
4102 #ifdef __STDC__
4103 # include <limits.h>
4104 #else
4105 # include <assert.h>
4106 #endif
4107 Syntax error
4108 _ACEOF
4109 if ac_fn_c_try_cpp "$LINENO"; then :
4110
4111 else
4112 # Broken: fails on valid input.
4113 continue
4114 fi
4115 rm -f conftest.err conftest.i conftest.$ac_ext
4116
4117 # OK, works on sane cases. Now check whether nonexistent headers
4118 # can be detected and how.
4119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4120 /* end confdefs.h. */
4121 #include <ac_nonexistent.h>
4122 _ACEOF
4123 if ac_fn_c_try_cpp "$LINENO"; then :
4124 # Broken: success on invalid input.
4125 continue
4126 else
4127 # Passes both tests.
4128 ac_preproc_ok=:
4129 break
4130 fi
4131 rm -f conftest.err conftest.i conftest.$ac_ext
4132
4133 done
4134 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4135 rm -f conftest.i conftest.err conftest.$ac_ext
4136 if $ac_preproc_ok; then :
4137 break
4138 fi
4139
4140 done
4141 ac_cv_prog_CPP=$CPP
4142
4143 fi
4144 CPP=$ac_cv_prog_CPP
4145 else
4146 ac_cv_prog_CPP=$CPP
4147 fi
4148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4149 $as_echo "$CPP" >&6; }
4150 ac_preproc_ok=false
4151 for ac_c_preproc_warn_flag in '' yes
4152 do
4153 # Use a header file that comes with gcc, so configuring glibc
4154 # with a fresh cross-compiler works.
4155 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4156 # <limits.h> exists even on freestanding compilers.
4157 # On the NeXT, cc -E runs the code through the compiler's parser,
4158 # not just through cpp. "Syntax error" is here to catch this case.
4159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4160 /* end confdefs.h. */
4161 #ifdef __STDC__
4162 # include <limits.h>
4163 #else
4164 # include <assert.h>
4165 #endif
4166 Syntax error
4167 _ACEOF
4168 if ac_fn_c_try_cpp "$LINENO"; then :
4169
4170 else
4171 # Broken: fails on valid input.
4172 continue
4173 fi
4174 rm -f conftest.err conftest.i conftest.$ac_ext
4175
4176 # OK, works on sane cases. Now check whether nonexistent headers
4177 # can be detected and how.
4178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4179 /* end confdefs.h. */
4180 #include <ac_nonexistent.h>
4181 _ACEOF
4182 if ac_fn_c_try_cpp "$LINENO"; then :
4183 # Broken: success on invalid input.
4184 continue
4185 else
4186 # Passes both tests.
4187 ac_preproc_ok=:
4188 break
4189 fi
4190 rm -f conftest.err conftest.i conftest.$ac_ext
4191
4192 done
4193 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4194 rm -f conftest.i conftest.err conftest.$ac_ext
4195 if $ac_preproc_ok; then :
4196
4197 else
4198 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4199 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4200 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4201 See \`config.log' for more details" "$LINENO" 5; }
4202 fi
4203
4204 ac_ext=c
4205 ac_cpp='$CPP $CPPFLAGS'
4206 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4207 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4208 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4209
4210
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4212 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4213 if ${ac_cv_path_GREP+:} false; then :
4214 $as_echo_n "(cached) " >&6
4215 else
4216 if test -z "$GREP"; then
4217 ac_path_GREP_found=false
4218 # Loop through the user's path and test for each of PROGNAME-LIST
4219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4220 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4221 do
4222 IFS=$as_save_IFS
4223 test -z "$as_dir" && as_dir=.
4224 for ac_prog in grep ggrep; do
4225 for ac_exec_ext in '' $ac_executable_extensions; do
4226 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4227 as_fn_executable_p "$ac_path_GREP" || continue
4228 # Check for GNU ac_path_GREP and select it if it is found.
4229 # Check for GNU $ac_path_GREP
4230 case `"$ac_path_GREP" --version 2>&1` in
4231 *GNU*)
4232 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4233 *)
4234 ac_count=0
4235 $as_echo_n 0123456789 >"conftest.in"
4236 while :
4237 do
4238 cat "conftest.in" "conftest.in" >"conftest.tmp"
4239 mv "conftest.tmp" "conftest.in"
4240 cp "conftest.in" "conftest.nl"
4241 $as_echo 'GREP' >> "conftest.nl"
4242 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4243 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4244 as_fn_arith $ac_count + 1 && ac_count=$as_val
4245 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4246 # Best one so far, save it but keep looking for a better one
4247 ac_cv_path_GREP="$ac_path_GREP"
4248 ac_path_GREP_max=$ac_count
4249 fi
4250 # 10*(2^10) chars as input seems more than enough
4251 test $ac_count -gt 10 && break
4252 done
4253 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4254 esac
4255
4256 $ac_path_GREP_found && break 3
4257 done
4258 done
4259 done
4260 IFS=$as_save_IFS
4261 if test -z "$ac_cv_path_GREP"; then
4262 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4263 fi
4264 else
4265 ac_cv_path_GREP=$GREP
4266 fi
4267
4268 fi
4269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4270 $as_echo "$ac_cv_path_GREP" >&6; }
4271 GREP="$ac_cv_path_GREP"
4272
4273
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4275 $as_echo_n "checking for egrep... " >&6; }
4276 if ${ac_cv_path_EGREP+:} false; then :
4277 $as_echo_n "(cached) " >&6
4278 else
4279 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4280 then ac_cv_path_EGREP="$GREP -E"
4281 else
4282 if test -z "$EGREP"; then
4283 ac_path_EGREP_found=false
4284 # Loop through the user's path and test for each of PROGNAME-LIST
4285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4286 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4287 do
4288 IFS=$as_save_IFS
4289 test -z "$as_dir" && as_dir=.
4290 for ac_prog in egrep; do
4291 for ac_exec_ext in '' $ac_executable_extensions; do
4292 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4293 as_fn_executable_p "$ac_path_EGREP" || continue
4294 # Check for GNU ac_path_EGREP and select it if it is found.
4295 # Check for GNU $ac_path_EGREP
4296 case `"$ac_path_EGREP" --version 2>&1` in
4297 *GNU*)
4298 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4299 *)
4300 ac_count=0
4301 $as_echo_n 0123456789 >"conftest.in"
4302 while :
4303 do
4304 cat "conftest.in" "conftest.in" >"conftest.tmp"
4305 mv "conftest.tmp" "conftest.in"
4306 cp "conftest.in" "conftest.nl"
4307 $as_echo 'EGREP' >> "conftest.nl"
4308 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4309 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4310 as_fn_arith $ac_count + 1 && ac_count=$as_val
4311 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4312 # Best one so far, save it but keep looking for a better one
4313 ac_cv_path_EGREP="$ac_path_EGREP"
4314 ac_path_EGREP_max=$ac_count
4315 fi
4316 # 10*(2^10) chars as input seems more than enough
4317 test $ac_count -gt 10 && break
4318 done
4319 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4320 esac
4321
4322 $ac_path_EGREP_found && break 3
4323 done
4324 done
4325 done
4326 IFS=$as_save_IFS
4327 if test -z "$ac_cv_path_EGREP"; then
4328 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4329 fi
4330 else
4331 ac_cv_path_EGREP=$EGREP
4332 fi
4333
4334 fi
4335 fi
4336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4337 $as_echo "$ac_cv_path_EGREP" >&6; }
4338 EGREP="$ac_cv_path_EGREP"
4339
4340
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4342 $as_echo_n "checking for ANSI C header files... " >&6; }
4343 if ${ac_cv_header_stdc+:} false; then :
4344 $as_echo_n "(cached) " >&6
4345 else
4346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4347 /* end confdefs.h. */
4348 #include <stdlib.h>
4349 #include <stdarg.h>
4350 #include <string.h>
4351 #include <float.h>
4352
4353 int
4354 main ()
4355 {
4356
4357 ;
4358 return 0;
4359 }
4360 _ACEOF
4361 if ac_fn_c_try_compile "$LINENO"; then :
4362 ac_cv_header_stdc=yes
4363 else
4364 ac_cv_header_stdc=no
4365 fi
4366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4367
4368 if test $ac_cv_header_stdc = yes; then
4369 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4371 /* end confdefs.h. */
4372 #include <string.h>
4373
4374 _ACEOF
4375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4376 $EGREP "memchr" >/dev/null 2>&1; then :
4377
4378 else
4379 ac_cv_header_stdc=no
4380 fi
4381 rm -f conftest*
4382
4383 fi
4384
4385 if test $ac_cv_header_stdc = yes; then
4386 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4388 /* end confdefs.h. */
4389 #include <stdlib.h>
4390
4391 _ACEOF
4392 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4393 $EGREP "free" >/dev/null 2>&1; then :
4394
4395 else
4396 ac_cv_header_stdc=no
4397 fi
4398 rm -f conftest*
4399
4400 fi
4401
4402 if test $ac_cv_header_stdc = yes; then
4403 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4404 if test "$cross_compiling" = yes; then :
4405 :
4406 else
4407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4408 /* end confdefs.h. */
4409 #include <ctype.h>
4410 #include <stdlib.h>
4411 #if ((' ' & 0x0FF) == 0x020)
4412 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4413 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4414 #else
4415 # define ISLOWER(c) \
4416 (('a' <= (c) && (c) <= 'i') \
4417 || ('j' <= (c) && (c) <= 'r') \
4418 || ('s' <= (c) && (c) <= 'z'))
4419 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4420 #endif
4421
4422 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4423 int
4424 main ()
4425 {
4426 int i;
4427 for (i = 0; i < 256; i++)
4428 if (XOR (islower (i), ISLOWER (i))
4429 || toupper (i) != TOUPPER (i))
4430 return 2;
4431 return 0;
4432 }
4433 _ACEOF
4434 if ac_fn_c_try_run "$LINENO"; then :
4435
4436 else
4437 ac_cv_header_stdc=no
4438 fi
4439 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4440 conftest.$ac_objext conftest.beam conftest.$ac_ext
4441 fi
4442
4443 fi
4444 fi
4445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4446 $as_echo "$ac_cv_header_stdc" >&6; }
4447 if test $ac_cv_header_stdc = yes; then
4448
4449 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4450
4451 fi
4452
4453 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4454 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4455 inttypes.h stdint.h unistd.h
4456 do :
4457 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4458 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4459 "
4460 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4461 cat >>confdefs.h <<_ACEOF
4462 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4463 _ACEOF
4464
4465 fi
4466
4467 done
4468
4469
4470
4471 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4472 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4473 MINIX=yes
4474 else
4475 MINIX=
4476 fi
4477
4478
4479 if test "$MINIX" = yes; then
4480
4481 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4482
4483
4484 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4485
4486
4487 $as_echo "#define _MINIX 1" >>confdefs.h
4488
4489 fi
4490
4491
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4493 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4494 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4495 $as_echo_n "(cached) " >&6
4496 else
4497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4498 /* end confdefs.h. */
4499
4500 # define __EXTENSIONS__ 1
4501 $ac_includes_default
4502 int
4503 main ()
4504 {
4505
4506 ;
4507 return 0;
4508 }
4509 _ACEOF
4510 if ac_fn_c_try_compile "$LINENO"; then :
4511 ac_cv_safe_to_define___extensions__=yes
4512 else
4513 ac_cv_safe_to_define___extensions__=no
4514 fi
4515 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4516 fi
4517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4518 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4519 test $ac_cv_safe_to_define___extensions__ = yes &&
4520 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4521
4522 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4523
4524 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4525
4526 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4527
4528 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4529
4530
4531 ac_aux_dir=
4532 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4533 if test -f "$ac_dir/install-sh"; then
4534 ac_aux_dir=$ac_dir
4535 ac_install_sh="$ac_aux_dir/install-sh -c"
4536 break
4537 elif test -f "$ac_dir/install.sh"; then
4538 ac_aux_dir=$ac_dir
4539 ac_install_sh="$ac_aux_dir/install.sh -c"
4540 break
4541 elif test -f "$ac_dir/shtool"; then
4542 ac_aux_dir=$ac_dir
4543 ac_install_sh="$ac_aux_dir/shtool install -c"
4544 break
4545 fi
4546 done
4547 if test -z "$ac_aux_dir"; then
4548 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4549 fi
4550
4551 # These three variables are undocumented and unsupported,
4552 # and are intended to be withdrawn in a future Autoconf release.
4553 # They can cause serious problems if a builder's source tree is in a directory
4554 # whose full name contains unusual characters.
4555 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4556 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4557 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4558
4559
4560 # Make sure we can run config.sub.
4561 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4562 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4563
4564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4565 $as_echo_n "checking build system type... " >&6; }
4566 if ${ac_cv_build+:} false; then :
4567 $as_echo_n "(cached) " >&6
4568 else
4569 ac_build_alias=$build_alias
4570 test "x$ac_build_alias" = x &&
4571 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4572 test "x$ac_build_alias" = x &&
4573 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4574 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4575 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4576
4577 fi
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4579 $as_echo "$ac_cv_build" >&6; }
4580 case $ac_cv_build in
4581 *-*-*) ;;
4582 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4583 esac
4584 build=$ac_cv_build
4585 ac_save_IFS=$IFS; IFS='-'
4586 set x $ac_cv_build
4587 shift
4588 build_cpu=$1
4589 build_vendor=$2
4590 shift; shift
4591 # Remember, the first character of IFS is used to create $*,
4592 # except with old shells:
4593 build_os=$*
4594 IFS=$ac_save_IFS
4595 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4596
4597
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4599 $as_echo_n "checking host system type... " >&6; }
4600 if ${ac_cv_host+:} false; then :
4601 $as_echo_n "(cached) " >&6
4602 else
4603 if test "x$host_alias" = x; then
4604 ac_cv_host=$ac_cv_build
4605 else
4606 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4607 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4608 fi
4609
4610 fi
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4612 $as_echo "$ac_cv_host" >&6; }
4613 case $ac_cv_host in
4614 *-*-*) ;;
4615 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4616 esac
4617 host=$ac_cv_host
4618 ac_save_IFS=$IFS; IFS='-'
4619 set x $ac_cv_host
4620 shift
4621 host_cpu=$1
4622 host_vendor=$2
4623 shift; shift
4624 # Remember, the first character of IFS is used to create $*,
4625 # except with old shells:
4626 host_os=$*
4627 IFS=$ac_save_IFS
4628 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4629
4630
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4632 $as_echo_n "checking target system type... " >&6; }
4633 if ${ac_cv_target+:} false; then :
4634 $as_echo_n "(cached) " >&6
4635 else
4636 if test "x$target_alias" = x; then
4637 ac_cv_target=$ac_cv_host
4638 else
4639 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4640 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4641 fi
4642
4643 fi
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4645 $as_echo "$ac_cv_target" >&6; }
4646 case $ac_cv_target in
4647 *-*-*) ;;
4648 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4649 esac
4650 target=$ac_cv_target
4651 ac_save_IFS=$IFS; IFS='-'
4652 set x $ac_cv_target
4653 shift
4654 target_cpu=$1
4655 target_vendor=$2
4656 shift; shift
4657 # Remember, the first character of IFS is used to create $*,
4658 # except with old shells:
4659 target_os=$*
4660 IFS=$ac_save_IFS
4661 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4662
4663
4664 # The aliases save the names the user supplied, while $host etc.
4665 # will get canonicalized.
4666 test -n "$target_alias" &&
4667 test "$program_prefix$program_suffix$program_transform_name" = \
4668 NONENONEs,x,x, &&
4669 program_prefix=${target_alias}-
4670
4671 # The tests for host and target for $enable_largefile require
4672 # canonical names.
4673
4674
4675
4676 # As the $enable_largefile decision depends on --enable-plugins we must set it
4677 # even in directories otherwise not depending on the $plugins option.
4678
4679
4680 maybe_plugins=no
4681 for ac_header in dlfcn.h
4682 do :
4683 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4684 "
4685 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4686 cat >>confdefs.h <<_ACEOF
4687 #define HAVE_DLFCN_H 1
4688 _ACEOF
4689 maybe_plugins=yes
4690 fi
4691
4692 done
4693
4694 for ac_header in windows.h
4695 do :
4696 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4697 "
4698 if test "x$ac_cv_header_windows_h" = xyes; then :
4699 cat >>confdefs.h <<_ACEOF
4700 #define HAVE_WINDOWS_H 1
4701 _ACEOF
4702 maybe_plugins=yes
4703 fi
4704
4705 done
4706
4707
4708 # Check whether --enable-plugins was given.
4709 if test "${enable_plugins+set}" = set; then :
4710 enableval=$enable_plugins; case "${enableval}" in
4711 no) plugins=no ;;
4712 *) plugins=yes
4713 if test "$maybe_plugins" != "yes" ; then
4714 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4715 fi ;;
4716 esac
4717 else
4718 plugins=$maybe_plugins
4719
4720 fi
4721
4722 if test "$plugins" = "yes"; then
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4724 $as_echo_n "checking for library containing dlsym... " >&6; }
4725 if ${ac_cv_search_dlsym+:} false; then :
4726 $as_echo_n "(cached) " >&6
4727 else
4728 ac_func_search_save_LIBS=$LIBS
4729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4730 /* end confdefs.h. */
4731
4732 /* Override any GCC internal prototype to avoid an error.
4733 Use char because int might match the return type of a GCC
4734 builtin and then its argument prototype would still apply. */
4735 #ifdef __cplusplus
4736 extern "C"
4737 #endif
4738 char dlsym ();
4739 int
4740 main ()
4741 {
4742 return dlsym ();
4743 ;
4744 return 0;
4745 }
4746 _ACEOF
4747 for ac_lib in '' dl; do
4748 if test -z "$ac_lib"; then
4749 ac_res="none required"
4750 else
4751 ac_res=-l$ac_lib
4752 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4753 fi
4754 if ac_fn_c_try_link "$LINENO"; then :
4755 ac_cv_search_dlsym=$ac_res
4756 fi
4757 rm -f core conftest.err conftest.$ac_objext \
4758 conftest$ac_exeext
4759 if ${ac_cv_search_dlsym+:} false; then :
4760 break
4761 fi
4762 done
4763 if ${ac_cv_search_dlsym+:} false; then :
4764
4765 else
4766 ac_cv_search_dlsym=no
4767 fi
4768 rm conftest.$ac_ext
4769 LIBS=$ac_func_search_save_LIBS
4770 fi
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4772 $as_echo "$ac_cv_search_dlsym" >&6; }
4773 ac_res=$ac_cv_search_dlsym
4774 if test "$ac_res" != no; then :
4775 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4776
4777 fi
4778
4779 fi
4780
4781
4782 case "${host}" in
4783 sparc-*-solaris*|i?86-*-solaris*)
4784 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4785 # were mutually exclusive until Solaris 11.3. Without procfs support,
4786 # the bfd/ elf module cannot provide certain routines such as
4787 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4788 # explicitly requested large-file support through the
4789 # --enable-largefile switch, disable large-file support in favor of
4790 # procfs support.
4791 #
4792 # Check if <sys/procfs.h> is incompatible with large-file support.
4793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4794 /* end confdefs.h. */
4795 #define _FILE_OFFSET_BITS 64
4796 #define _STRUCTURED_PROC 1
4797 #include <sys/procfs.h>
4798 int
4799 main ()
4800 {
4801
4802 ;
4803 return 0;
4804 }
4805 _ACEOF
4806 if ac_fn_c_try_compile "$LINENO"; then :
4807 acx_cv_procfs_lfs=yes
4808 else
4809 acx_cv_procfs_lfs=no
4810 fi
4811 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4812 #
4813 # Forcefully disable large-file support only if necessary, gdb is in
4814 # tree and enabled.
4815 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4816 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4817 : ${enable_largefile="no"}
4818 if test "$plugins" = yes; then
4819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4820 plugin support disabled; require large-file support which is incompatible with GDB." >&5
4821 $as_echo "$as_me: WARNING:
4822 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4823 plugins=no
4824 fi
4825 fi
4826 #
4827 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4828 # benefit of g++ 9+ which predefines it on Solaris.
4829 if test "$enable_largefile" = no; then
4830 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4831
4832 fi
4833 ;;
4834 esac
4835
4836 # Check whether --enable-largefile was given.
4837 if test "${enable_largefile+set}" = set; then :
4838 enableval=$enable_largefile;
4839 fi
4840
4841 if test "$enable_largefile" != no; then
4842
4843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4844 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4845 if ${ac_cv_sys_largefile_CC+:} false; then :
4846 $as_echo_n "(cached) " >&6
4847 else
4848 ac_cv_sys_largefile_CC=no
4849 if test "$GCC" != yes; then
4850 ac_save_CC=$CC
4851 while :; do
4852 # IRIX 6.2 and later do not support large files by default,
4853 # so use the C compiler's -n32 option if that helps.
4854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4855 /* end confdefs.h. */
4856 #include <sys/types.h>
4857 /* Check that off_t can represent 2**63 - 1 correctly.
4858 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4859 since some C++ compilers masquerading as C compilers
4860 incorrectly reject 9223372036854775807. */
4861 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4862 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4863 && LARGE_OFF_T % 2147483647 == 1)
4864 ? 1 : -1];
4865 int
4866 main ()
4867 {
4868
4869 ;
4870 return 0;
4871 }
4872 _ACEOF
4873 if ac_fn_c_try_compile "$LINENO"; then :
4874 break
4875 fi
4876 rm -f core conftest.err conftest.$ac_objext
4877 CC="$CC -n32"
4878 if ac_fn_c_try_compile "$LINENO"; then :
4879 ac_cv_sys_largefile_CC=' -n32'; break
4880 fi
4881 rm -f core conftest.err conftest.$ac_objext
4882 break
4883 done
4884 CC=$ac_save_CC
4885 rm -f conftest.$ac_ext
4886 fi
4887 fi
4888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4889 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4890 if test "$ac_cv_sys_largefile_CC" != no; then
4891 CC=$CC$ac_cv_sys_largefile_CC
4892 fi
4893
4894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4895 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4896 if ${ac_cv_sys_file_offset_bits+:} false; then :
4897 $as_echo_n "(cached) " >&6
4898 else
4899 while :; do
4900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4901 /* end confdefs.h. */
4902 #include <sys/types.h>
4903 /* Check that off_t can represent 2**63 - 1 correctly.
4904 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4905 since some C++ compilers masquerading as C compilers
4906 incorrectly reject 9223372036854775807. */
4907 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4908 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4909 && LARGE_OFF_T % 2147483647 == 1)
4910 ? 1 : -1];
4911 int
4912 main ()
4913 {
4914
4915 ;
4916 return 0;
4917 }
4918 _ACEOF
4919 if ac_fn_c_try_compile "$LINENO"; then :
4920 ac_cv_sys_file_offset_bits=no; break
4921 fi
4922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4924 /* end confdefs.h. */
4925 #define _FILE_OFFSET_BITS 64
4926 #include <sys/types.h>
4927 /* Check that off_t can represent 2**63 - 1 correctly.
4928 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4929 since some C++ compilers masquerading as C compilers
4930 incorrectly reject 9223372036854775807. */
4931 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4932 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4933 && LARGE_OFF_T % 2147483647 == 1)
4934 ? 1 : -1];
4935 int
4936 main ()
4937 {
4938
4939 ;
4940 return 0;
4941 }
4942 _ACEOF
4943 if ac_fn_c_try_compile "$LINENO"; then :
4944 ac_cv_sys_file_offset_bits=64; break
4945 fi
4946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4947 ac_cv_sys_file_offset_bits=unknown
4948 break
4949 done
4950 fi
4951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4952 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4953 case $ac_cv_sys_file_offset_bits in #(
4954 no | unknown) ;;
4955 *)
4956 cat >>confdefs.h <<_ACEOF
4957 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4958 _ACEOF
4959 ;;
4960 esac
4961 rm -rf conftest*
4962 if test $ac_cv_sys_file_offset_bits = unknown; then
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4964 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4965 if ${ac_cv_sys_large_files+:} false; then :
4966 $as_echo_n "(cached) " >&6
4967 else
4968 while :; do
4969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4970 /* end confdefs.h. */
4971 #include <sys/types.h>
4972 /* Check that off_t can represent 2**63 - 1 correctly.
4973 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4974 since some C++ compilers masquerading as C compilers
4975 incorrectly reject 9223372036854775807. */
4976 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4977 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4978 && LARGE_OFF_T % 2147483647 == 1)
4979 ? 1 : -1];
4980 int
4981 main ()
4982 {
4983
4984 ;
4985 return 0;
4986 }
4987 _ACEOF
4988 if ac_fn_c_try_compile "$LINENO"; then :
4989 ac_cv_sys_large_files=no; break
4990 fi
4991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4993 /* end confdefs.h. */
4994 #define _LARGE_FILES 1
4995 #include <sys/types.h>
4996 /* Check that off_t can represent 2**63 - 1 correctly.
4997 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4998 since some C++ compilers masquerading as C compilers
4999 incorrectly reject 9223372036854775807. */
5000 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5001 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5002 && LARGE_OFF_T % 2147483647 == 1)
5003 ? 1 : -1];
5004 int
5005 main ()
5006 {
5007
5008 ;
5009 return 0;
5010 }
5011 _ACEOF
5012 if ac_fn_c_try_compile "$LINENO"; then :
5013 ac_cv_sys_large_files=1; break
5014 fi
5015 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5016 ac_cv_sys_large_files=unknown
5017 break
5018 done
5019 fi
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5021 $as_echo "$ac_cv_sys_large_files" >&6; }
5022 case $ac_cv_sys_large_files in #(
5023 no | unknown) ;;
5024 *)
5025 cat >>confdefs.h <<_ACEOF
5026 #define _LARGE_FILES $ac_cv_sys_large_files
5027 _ACEOF
5028 ;;
5029 esac
5030 rm -rf conftest*
5031 fi
5032
5033
5034 fi
5035
5036
5037 # Expand $ac_aux_dir to an absolute path.
5038 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5039
5040 if test x"${install_sh+set}" != xset; then
5041 case $am_aux_dir in
5042 *\ * | *\ *)
5043 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5044 *)
5045 install_sh="\${SHELL} $am_aux_dir/install-sh"
5046 esac
5047 fi
5048
5049 # Installed binaries are usually stripped using 'strip' when the user
5050 # run "make install-strip". However 'strip' might not be the right
5051 # tool to use in cross-compilation environments, therefore Automake
5052 # will honor the 'STRIP' environment variable to overrule this program.
5053 if test "$cross_compiling" != no; then
5054 if test -n "$ac_tool_prefix"; then
5055 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5056 set dummy ${ac_tool_prefix}strip; ac_word=$2
5057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5058 $as_echo_n "checking for $ac_word... " >&6; }
5059 if ${ac_cv_prog_STRIP+:} false; then :
5060 $as_echo_n "(cached) " >&6
5061 else
5062 if test -n "$STRIP"; then
5063 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5064 else
5065 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5066 for as_dir in $PATH
5067 do
5068 IFS=$as_save_IFS
5069 test -z "$as_dir" && as_dir=.
5070 for ac_exec_ext in '' $ac_executable_extensions; do
5071 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5072 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5074 break 2
5075 fi
5076 done
5077 done
5078 IFS=$as_save_IFS
5079
5080 fi
5081 fi
5082 STRIP=$ac_cv_prog_STRIP
5083 if test -n "$STRIP"; then
5084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5085 $as_echo "$STRIP" >&6; }
5086 else
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5088 $as_echo "no" >&6; }
5089 fi
5090
5091
5092 fi
5093 if test -z "$ac_cv_prog_STRIP"; then
5094 ac_ct_STRIP=$STRIP
5095 # Extract the first word of "strip", so it can be a program name with args.
5096 set dummy strip; ac_word=$2
5097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5098 $as_echo_n "checking for $ac_word... " >&6; }
5099 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5100 $as_echo_n "(cached) " >&6
5101 else
5102 if test -n "$ac_ct_STRIP"; then
5103 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5104 else
5105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5106 for as_dir in $PATH
5107 do
5108 IFS=$as_save_IFS
5109 test -z "$as_dir" && as_dir=.
5110 for ac_exec_ext in '' $ac_executable_extensions; do
5111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5112 ac_cv_prog_ac_ct_STRIP="strip"
5113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5114 break 2
5115 fi
5116 done
5117 done
5118 IFS=$as_save_IFS
5119
5120 fi
5121 fi
5122 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5123 if test -n "$ac_ct_STRIP"; then
5124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5125 $as_echo "$ac_ct_STRIP" >&6; }
5126 else
5127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5128 $as_echo "no" >&6; }
5129 fi
5130
5131 if test "x$ac_ct_STRIP" = x; then
5132 STRIP=":"
5133 else
5134 case $cross_compiling:$ac_tool_warned in
5135 yes:)
5136 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5137 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5138 ac_tool_warned=yes ;;
5139 esac
5140 STRIP=$ac_ct_STRIP
5141 fi
5142 else
5143 STRIP="$ac_cv_prog_STRIP"
5144 fi
5145
5146 fi
5147 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5148
5149
5150 ac_aux_dir=
5151 for ac_dir in .. "$srcdir"/..; do
5152 if test -f "$ac_dir/install-sh"; then
5153 ac_aux_dir=$ac_dir
5154 ac_install_sh="$ac_aux_dir/install-sh -c"
5155 break
5156 elif test -f "$ac_dir/install.sh"; then
5157 ac_aux_dir=$ac_dir
5158 ac_install_sh="$ac_aux_dir/install.sh -c"
5159 break
5160 elif test -f "$ac_dir/shtool"; then
5161 ac_aux_dir=$ac_dir
5162 ac_install_sh="$ac_aux_dir/shtool install -c"
5163 break
5164 fi
5165 done
5166 if test -z "$ac_aux_dir"; then
5167 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5168 fi
5169
5170 # These three variables are undocumented and unsupported,
5171 # and are intended to be withdrawn in a future Autoconf release.
5172 # They can cause serious problems if a builder's source tree is in a directory
5173 # whose full name contains unusual characters.
5174 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5175 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5176 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5177
5178
5179
5180 # Set build, build_cpu, build_vendor and build_os.
5181
5182
5183 # Set host, host_cpu, host_vendor, and host_os.
5184
5185
5186 # Set target, target_cpu, target_vendor, and target_os.
5187
5188
5189 case ${build_alias} in
5190 "") build_noncanonical=${build} ;;
5191 *) build_noncanonical=${build_alias} ;;
5192 esac
5193
5194 case ${host_alias} in
5195 "") host_noncanonical=${build_noncanonical} ;;
5196 *) host_noncanonical=${host_alias} ;;
5197 esac
5198
5199 case ${target_alias} in
5200 "") target_noncanonical=${host_noncanonical} ;;
5201 *) target_noncanonical=${target_alias} ;;
5202 esac
5203
5204
5205
5206
5207 test "$program_prefix" != NONE &&
5208 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5209 # Use a double $ so make ignores it.
5210 test "$program_suffix" != NONE &&
5211 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5212 # Double any \ or $.
5213 # By default was `s,x,x', remove it if useless.
5214 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5215 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5216
5217
5218 # We require a C++11 compiler. Check if one is available, and if
5219 # necessary, set CXX_DIALECT to some -std=xxx switch.
5220
5221 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5222 ac_ext=cpp
5223 ac_cpp='$CXXCPP $CPPFLAGS'
5224 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5225 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5226 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5227 CXX_DIALECT=""
5228 ac_success=no
5229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5230 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5231 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5232 $as_echo_n "(cached) " >&6
5233 else
5234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5235 /* end confdefs.h. */
5236
5237
5238 // If the compiler admits that it is not ready for C++11, why torture it?
5239 // Hopefully, this will speed up the test.
5240
5241 #ifndef __cplusplus
5242
5243 #error "This is not a C++ compiler"
5244
5245 #elif __cplusplus < 201103L
5246
5247 #error "This is not a C++11 compiler"
5248
5249 #else
5250
5251 namespace cxx11
5252 {
5253
5254 namespace test_static_assert
5255 {
5256
5257 template <typename T>
5258 struct check
5259 {
5260 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5261 };
5262
5263 }
5264
5265 namespace test_final_override
5266 {
5267
5268 struct Base
5269 {
5270 virtual void f() {}
5271 };
5272
5273 struct Derived : public Base
5274 {
5275 virtual void f() override {}
5276 };
5277
5278 }
5279
5280 namespace test_double_right_angle_brackets
5281 {
5282
5283 template < typename T >
5284 struct check {};
5285
5286 typedef check<void> single_type;
5287 typedef check<check<void>> double_type;
5288 typedef check<check<check<void>>> triple_type;
5289 typedef check<check<check<check<void>>>> quadruple_type;
5290
5291 }
5292
5293 namespace test_decltype
5294 {
5295
5296 int
5297 f()
5298 {
5299 int a = 1;
5300 decltype(a) b = 2;
5301 return a + b;
5302 }
5303
5304 }
5305
5306 namespace test_type_deduction
5307 {
5308
5309 template < typename T1, typename T2 >
5310 struct is_same
5311 {
5312 static const bool value = false;
5313 };
5314
5315 template < typename T >
5316 struct is_same<T, T>
5317 {
5318 static const bool value = true;
5319 };
5320
5321 template < typename T1, typename T2 >
5322 auto
5323 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5324 {
5325 return a1 + a2;
5326 }
5327
5328 int
5329 test(const int c, volatile int v)
5330 {
5331 static_assert(is_same<int, decltype(0)>::value == true, "");
5332 static_assert(is_same<int, decltype(c)>::value == false, "");
5333 static_assert(is_same<int, decltype(v)>::value == false, "");
5334 auto ac = c;
5335 auto av = v;
5336 auto sumi = ac + av + 'x';
5337 auto sumf = ac + av + 1.0;
5338 static_assert(is_same<int, decltype(ac)>::value == true, "");
5339 static_assert(is_same<int, decltype(av)>::value == true, "");
5340 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5341 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5342 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5343 return (sumf > 0.0) ? sumi : add(c, v);
5344 }
5345
5346 }
5347
5348 namespace test_noexcept
5349 {
5350
5351 int f() { return 0; }
5352 int g() noexcept { return 0; }
5353
5354 static_assert(noexcept(f()) == false, "");
5355 static_assert(noexcept(g()) == true, "");
5356
5357 }
5358
5359 namespace test_constexpr
5360 {
5361
5362 template < typename CharT >
5363 unsigned long constexpr
5364 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5365 {
5366 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5367 }
5368
5369 template < typename CharT >
5370 unsigned long constexpr
5371 strlen_c(const CharT *const s) noexcept
5372 {
5373 return strlen_c_r(s, 0UL);
5374 }
5375
5376 static_assert(strlen_c("") == 0UL, "");
5377 static_assert(strlen_c("1") == 1UL, "");
5378 static_assert(strlen_c("example") == 7UL, "");
5379 static_assert(strlen_c("another\0example") == 7UL, "");
5380
5381 }
5382
5383 namespace test_rvalue_references
5384 {
5385
5386 template < int N >
5387 struct answer
5388 {
5389 static constexpr int value = N;
5390 };
5391
5392 answer<1> f(int&) { return answer<1>(); }
5393 answer<2> f(const int&) { return answer<2>(); }
5394 answer<3> f(int&&) { return answer<3>(); }
5395
5396 void
5397 test()
5398 {
5399 int i = 0;
5400 const int c = 0;
5401 static_assert(decltype(f(i))::value == 1, "");
5402 static_assert(decltype(f(c))::value == 2, "");
5403 static_assert(decltype(f(0))::value == 3, "");
5404 }
5405
5406 }
5407
5408 namespace test_uniform_initialization
5409 {
5410
5411 struct test
5412 {
5413 static const int zero {};
5414 static const int one {1};
5415 };
5416
5417 static_assert(test::zero == 0, "");
5418 static_assert(test::one == 1, "");
5419
5420 }
5421
5422 namespace test_lambdas
5423 {
5424
5425 void
5426 test1()
5427 {
5428 auto lambda1 = [](){};
5429 auto lambda2 = lambda1;
5430 lambda1();
5431 lambda2();
5432 }
5433
5434 int
5435 test2()
5436 {
5437 auto a = [](int i, int j){ return i + j; }(1, 2);
5438 auto b = []() -> int { return '0'; }();
5439 auto c = [=](){ return a + b; }();
5440 auto d = [&](){ return c; }();
5441 auto e = [a, &b](int x) mutable {
5442 const auto identity = [](int y){ return y; };
5443 for (auto i = 0; i < a; ++i)
5444 a += b--;
5445 return x + identity(a + b);
5446 }(0);
5447 return a + b + c + d + e;
5448 }
5449
5450 int
5451 test3()
5452 {
5453 const auto nullary = [](){ return 0; };
5454 const auto unary = [](int x){ return x; };
5455 using nullary_t = decltype(nullary);
5456 using unary_t = decltype(unary);
5457 const auto higher1st = [](nullary_t f){ return f(); };
5458 const auto higher2nd = [unary](nullary_t f1){
5459 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5460 };
5461 return higher1st(nullary) + higher2nd(nullary)(unary);
5462 }
5463
5464 }
5465
5466 namespace test_variadic_templates
5467 {
5468
5469 template <int...>
5470 struct sum;
5471
5472 template <int N0, int... N1toN>
5473 struct sum<N0, N1toN...>
5474 {
5475 static constexpr auto value = N0 + sum<N1toN...>::value;
5476 };
5477
5478 template <>
5479 struct sum<>
5480 {
5481 static constexpr auto value = 0;
5482 };
5483
5484 static_assert(sum<>::value == 0, "");
5485 static_assert(sum<1>::value == 1, "");
5486 static_assert(sum<23>::value == 23, "");
5487 static_assert(sum<1, 2>::value == 3, "");
5488 static_assert(sum<5, 5, 11>::value == 21, "");
5489 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5490
5491 }
5492
5493 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5494 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5495 // because of this.
5496 namespace test_template_alias_sfinae
5497 {
5498
5499 struct foo {};
5500
5501 template<typename T>
5502 using member = typename T::member_type;
5503
5504 template<typename T>
5505 void func(...) {}
5506
5507 template<typename T>
5508 void func(member<T>*) {}
5509
5510 void test();
5511
5512 void test() { func<foo>(0); }
5513
5514 }
5515
5516 } // namespace cxx11
5517
5518 #endif // __cplusplus >= 201103L
5519
5520
5521
5522 _ACEOF
5523 if ac_fn_cxx_try_compile "$LINENO"; then :
5524 ax_cv_cxx_compile_cxx11=yes
5525 else
5526 ax_cv_cxx_compile_cxx11=no
5527 fi
5528 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5529 fi
5530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5531 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5532 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5533 ac_success=yes
5534 fi
5535
5536 if test x$ac_success = xno; then
5537 for alternative in ${ax_cxx_compile_alternatives}; do
5538 switch="-std=gnu++${alternative}"
5539 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5541 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5542 if eval \${$cachevar+:} false; then :
5543 $as_echo_n "(cached) " >&6
5544 else
5545 ac_save_CXX="$CXX"
5546 CXX="$CXX $switch"
5547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5548 /* end confdefs.h. */
5549
5550
5551 // If the compiler admits that it is not ready for C++11, why torture it?
5552 // Hopefully, this will speed up the test.
5553
5554 #ifndef __cplusplus
5555
5556 #error "This is not a C++ compiler"
5557
5558 #elif __cplusplus < 201103L
5559
5560 #error "This is not a C++11 compiler"
5561
5562 #else
5563
5564 namespace cxx11
5565 {
5566
5567 namespace test_static_assert
5568 {
5569
5570 template <typename T>
5571 struct check
5572 {
5573 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5574 };
5575
5576 }
5577
5578 namespace test_final_override
5579 {
5580
5581 struct Base
5582 {
5583 virtual void f() {}
5584 };
5585
5586 struct Derived : public Base
5587 {
5588 virtual void f() override {}
5589 };
5590
5591 }
5592
5593 namespace test_double_right_angle_brackets
5594 {
5595
5596 template < typename T >
5597 struct check {};
5598
5599 typedef check<void> single_type;
5600 typedef check<check<void>> double_type;
5601 typedef check<check<check<void>>> triple_type;
5602 typedef check<check<check<check<void>>>> quadruple_type;
5603
5604 }
5605
5606 namespace test_decltype
5607 {
5608
5609 int
5610 f()
5611 {
5612 int a = 1;
5613 decltype(a) b = 2;
5614 return a + b;
5615 }
5616
5617 }
5618
5619 namespace test_type_deduction
5620 {
5621
5622 template < typename T1, typename T2 >
5623 struct is_same
5624 {
5625 static const bool value = false;
5626 };
5627
5628 template < typename T >
5629 struct is_same<T, T>
5630 {
5631 static const bool value = true;
5632 };
5633
5634 template < typename T1, typename T2 >
5635 auto
5636 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5637 {
5638 return a1 + a2;
5639 }
5640
5641 int
5642 test(const int c, volatile int v)
5643 {
5644 static_assert(is_same<int, decltype(0)>::value == true, "");
5645 static_assert(is_same<int, decltype(c)>::value == false, "");
5646 static_assert(is_same<int, decltype(v)>::value == false, "");
5647 auto ac = c;
5648 auto av = v;
5649 auto sumi = ac + av + 'x';
5650 auto sumf = ac + av + 1.0;
5651 static_assert(is_same<int, decltype(ac)>::value == true, "");
5652 static_assert(is_same<int, decltype(av)>::value == true, "");
5653 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5654 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5655 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5656 return (sumf > 0.0) ? sumi : add(c, v);
5657 }
5658
5659 }
5660
5661 namespace test_noexcept
5662 {
5663
5664 int f() { return 0; }
5665 int g() noexcept { return 0; }
5666
5667 static_assert(noexcept(f()) == false, "");
5668 static_assert(noexcept(g()) == true, "");
5669
5670 }
5671
5672 namespace test_constexpr
5673 {
5674
5675 template < typename CharT >
5676 unsigned long constexpr
5677 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5678 {
5679 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5680 }
5681
5682 template < typename CharT >
5683 unsigned long constexpr
5684 strlen_c(const CharT *const s) noexcept
5685 {
5686 return strlen_c_r(s, 0UL);
5687 }
5688
5689 static_assert(strlen_c("") == 0UL, "");
5690 static_assert(strlen_c("1") == 1UL, "");
5691 static_assert(strlen_c("example") == 7UL, "");
5692 static_assert(strlen_c("another\0example") == 7UL, "");
5693
5694 }
5695
5696 namespace test_rvalue_references
5697 {
5698
5699 template < int N >
5700 struct answer
5701 {
5702 static constexpr int value = N;
5703 };
5704
5705 answer<1> f(int&) { return answer<1>(); }
5706 answer<2> f(const int&) { return answer<2>(); }
5707 answer<3> f(int&&) { return answer<3>(); }
5708
5709 void
5710 test()
5711 {
5712 int i = 0;
5713 const int c = 0;
5714 static_assert(decltype(f(i))::value == 1, "");
5715 static_assert(decltype(f(c))::value == 2, "");
5716 static_assert(decltype(f(0))::value == 3, "");
5717 }
5718
5719 }
5720
5721 namespace test_uniform_initialization
5722 {
5723
5724 struct test
5725 {
5726 static const int zero {};
5727 static const int one {1};
5728 };
5729
5730 static_assert(test::zero == 0, "");
5731 static_assert(test::one == 1, "");
5732
5733 }
5734
5735 namespace test_lambdas
5736 {
5737
5738 void
5739 test1()
5740 {
5741 auto lambda1 = [](){};
5742 auto lambda2 = lambda1;
5743 lambda1();
5744 lambda2();
5745 }
5746
5747 int
5748 test2()
5749 {
5750 auto a = [](int i, int j){ return i + j; }(1, 2);
5751 auto b = []() -> int { return '0'; }();
5752 auto c = [=](){ return a + b; }();
5753 auto d = [&](){ return c; }();
5754 auto e = [a, &b](int x) mutable {
5755 const auto identity = [](int y){ return y; };
5756 for (auto i = 0; i < a; ++i)
5757 a += b--;
5758 return x + identity(a + b);
5759 }(0);
5760 return a + b + c + d + e;
5761 }
5762
5763 int
5764 test3()
5765 {
5766 const auto nullary = [](){ return 0; };
5767 const auto unary = [](int x){ return x; };
5768 using nullary_t = decltype(nullary);
5769 using unary_t = decltype(unary);
5770 const auto higher1st = [](nullary_t f){ return f(); };
5771 const auto higher2nd = [unary](nullary_t f1){
5772 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5773 };
5774 return higher1st(nullary) + higher2nd(nullary)(unary);
5775 }
5776
5777 }
5778
5779 namespace test_variadic_templates
5780 {
5781
5782 template <int...>
5783 struct sum;
5784
5785 template <int N0, int... N1toN>
5786 struct sum<N0, N1toN...>
5787 {
5788 static constexpr auto value = N0 + sum<N1toN...>::value;
5789 };
5790
5791 template <>
5792 struct sum<>
5793 {
5794 static constexpr auto value = 0;
5795 };
5796
5797 static_assert(sum<>::value == 0, "");
5798 static_assert(sum<1>::value == 1, "");
5799 static_assert(sum<23>::value == 23, "");
5800 static_assert(sum<1, 2>::value == 3, "");
5801 static_assert(sum<5, 5, 11>::value == 21, "");
5802 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5803
5804 }
5805
5806 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5807 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5808 // because of this.
5809 namespace test_template_alias_sfinae
5810 {
5811
5812 struct foo {};
5813
5814 template<typename T>
5815 using member = typename T::member_type;
5816
5817 template<typename T>
5818 void func(...) {}
5819
5820 template<typename T>
5821 void func(member<T>*) {}
5822
5823 void test();
5824
5825 void test() { func<foo>(0); }
5826
5827 }
5828
5829 } // namespace cxx11
5830
5831 #endif // __cplusplus >= 201103L
5832
5833
5834
5835 _ACEOF
5836 if ac_fn_cxx_try_compile "$LINENO"; then :
5837 eval $cachevar=yes
5838 else
5839 eval $cachevar=no
5840 fi
5841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5842 CXX="$ac_save_CXX"
5843 fi
5844 eval ac_res=\$$cachevar
5845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5846 $as_echo "$ac_res" >&6; }
5847 if eval test x\$$cachevar = xyes; then
5848 CXX_DIALECT="$switch"
5849 CXX="$CXX $switch"
5850 if test -n "$CXXCPP" ; then
5851 CXXCPP="$CXXCPP $switch"
5852 fi
5853 ac_success=yes
5854 break
5855 fi
5856 done
5857 fi
5858
5859 if test x$ac_success = xno; then
5860 for alternative in ${ax_cxx_compile_alternatives}; do
5861 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5862 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5864 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5865 if eval \${$cachevar+:} false; then :
5866 $as_echo_n "(cached) " >&6
5867 else
5868 ac_save_CXX="$CXX"
5869 CXX="$CXX $switch"
5870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5871 /* end confdefs.h. */
5872
5873
5874 // If the compiler admits that it is not ready for C++11, why torture it?
5875 // Hopefully, this will speed up the test.
5876
5877 #ifndef __cplusplus
5878
5879 #error "This is not a C++ compiler"
5880
5881 #elif __cplusplus < 201103L
5882
5883 #error "This is not a C++11 compiler"
5884
5885 #else
5886
5887 namespace cxx11
5888 {
5889
5890 namespace test_static_assert
5891 {
5892
5893 template <typename T>
5894 struct check
5895 {
5896 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5897 };
5898
5899 }
5900
5901 namespace test_final_override
5902 {
5903
5904 struct Base
5905 {
5906 virtual void f() {}
5907 };
5908
5909 struct Derived : public Base
5910 {
5911 virtual void f() override {}
5912 };
5913
5914 }
5915
5916 namespace test_double_right_angle_brackets
5917 {
5918
5919 template < typename T >
5920 struct check {};
5921
5922 typedef check<void> single_type;
5923 typedef check<check<void>> double_type;
5924 typedef check<check<check<void>>> triple_type;
5925 typedef check<check<check<check<void>>>> quadruple_type;
5926
5927 }
5928
5929 namespace test_decltype
5930 {
5931
5932 int
5933 f()
5934 {
5935 int a = 1;
5936 decltype(a) b = 2;
5937 return a + b;
5938 }
5939
5940 }
5941
5942 namespace test_type_deduction
5943 {
5944
5945 template < typename T1, typename T2 >
5946 struct is_same
5947 {
5948 static const bool value = false;
5949 };
5950
5951 template < typename T >
5952 struct is_same<T, T>
5953 {
5954 static const bool value = true;
5955 };
5956
5957 template < typename T1, typename T2 >
5958 auto
5959 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5960 {
5961 return a1 + a2;
5962 }
5963
5964 int
5965 test(const int c, volatile int v)
5966 {
5967 static_assert(is_same<int, decltype(0)>::value == true, "");
5968 static_assert(is_same<int, decltype(c)>::value == false, "");
5969 static_assert(is_same<int, decltype(v)>::value == false, "");
5970 auto ac = c;
5971 auto av = v;
5972 auto sumi = ac + av + 'x';
5973 auto sumf = ac + av + 1.0;
5974 static_assert(is_same<int, decltype(ac)>::value == true, "");
5975 static_assert(is_same<int, decltype(av)>::value == true, "");
5976 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5977 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5978 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5979 return (sumf > 0.0) ? sumi : add(c, v);
5980 }
5981
5982 }
5983
5984 namespace test_noexcept
5985 {
5986
5987 int f() { return 0; }
5988 int g() noexcept { return 0; }
5989
5990 static_assert(noexcept(f()) == false, "");
5991 static_assert(noexcept(g()) == true, "");
5992
5993 }
5994
5995 namespace test_constexpr
5996 {
5997
5998 template < typename CharT >
5999 unsigned long constexpr
6000 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6001 {
6002 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6003 }
6004
6005 template < typename CharT >
6006 unsigned long constexpr
6007 strlen_c(const CharT *const s) noexcept
6008 {
6009 return strlen_c_r(s, 0UL);
6010 }
6011
6012 static_assert(strlen_c("") == 0UL, "");
6013 static_assert(strlen_c("1") == 1UL, "");
6014 static_assert(strlen_c("example") == 7UL, "");
6015 static_assert(strlen_c("another\0example") == 7UL, "");
6016
6017 }
6018
6019 namespace test_rvalue_references
6020 {
6021
6022 template < int N >
6023 struct answer
6024 {
6025 static constexpr int value = N;
6026 };
6027
6028 answer<1> f(int&) { return answer<1>(); }
6029 answer<2> f(const int&) { return answer<2>(); }
6030 answer<3> f(int&&) { return answer<3>(); }
6031
6032 void
6033 test()
6034 {
6035 int i = 0;
6036 const int c = 0;
6037 static_assert(decltype(f(i))::value == 1, "");
6038 static_assert(decltype(f(c))::value == 2, "");
6039 static_assert(decltype(f(0))::value == 3, "");
6040 }
6041
6042 }
6043
6044 namespace test_uniform_initialization
6045 {
6046
6047 struct test
6048 {
6049 static const int zero {};
6050 static const int one {1};
6051 };
6052
6053 static_assert(test::zero == 0, "");
6054 static_assert(test::one == 1, "");
6055
6056 }
6057
6058 namespace test_lambdas
6059 {
6060
6061 void
6062 test1()
6063 {
6064 auto lambda1 = [](){};
6065 auto lambda2 = lambda1;
6066 lambda1();
6067 lambda2();
6068 }
6069
6070 int
6071 test2()
6072 {
6073 auto a = [](int i, int j){ return i + j; }(1, 2);
6074 auto b = []() -> int { return '0'; }();
6075 auto c = [=](){ return a + b; }();
6076 auto d = [&](){ return c; }();
6077 auto e = [a, &b](int x) mutable {
6078 const auto identity = [](int y){ return y; };
6079 for (auto i = 0; i < a; ++i)
6080 a += b--;
6081 return x + identity(a + b);
6082 }(0);
6083 return a + b + c + d + e;
6084 }
6085
6086 int
6087 test3()
6088 {
6089 const auto nullary = [](){ return 0; };
6090 const auto unary = [](int x){ return x; };
6091 using nullary_t = decltype(nullary);
6092 using unary_t = decltype(unary);
6093 const auto higher1st = [](nullary_t f){ return f(); };
6094 const auto higher2nd = [unary](nullary_t f1){
6095 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6096 };
6097 return higher1st(nullary) + higher2nd(nullary)(unary);
6098 }
6099
6100 }
6101
6102 namespace test_variadic_templates
6103 {
6104
6105 template <int...>
6106 struct sum;
6107
6108 template <int N0, int... N1toN>
6109 struct sum<N0, N1toN...>
6110 {
6111 static constexpr auto value = N0 + sum<N1toN...>::value;
6112 };
6113
6114 template <>
6115 struct sum<>
6116 {
6117 static constexpr auto value = 0;
6118 };
6119
6120 static_assert(sum<>::value == 0, "");
6121 static_assert(sum<1>::value == 1, "");
6122 static_assert(sum<23>::value == 23, "");
6123 static_assert(sum<1, 2>::value == 3, "");
6124 static_assert(sum<5, 5, 11>::value == 21, "");
6125 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6126
6127 }
6128
6129 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6130 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6131 // because of this.
6132 namespace test_template_alias_sfinae
6133 {
6134
6135 struct foo {};
6136
6137 template<typename T>
6138 using member = typename T::member_type;
6139
6140 template<typename T>
6141 void func(...) {}
6142
6143 template<typename T>
6144 void func(member<T>*) {}
6145
6146 void test();
6147
6148 void test() { func<foo>(0); }
6149
6150 }
6151
6152 } // namespace cxx11
6153
6154 #endif // __cplusplus >= 201103L
6155
6156
6157
6158 _ACEOF
6159 if ac_fn_cxx_try_compile "$LINENO"; then :
6160 eval $cachevar=yes
6161 else
6162 eval $cachevar=no
6163 fi
6164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6165 CXX="$ac_save_CXX"
6166 fi
6167 eval ac_res=\$$cachevar
6168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6169 $as_echo "$ac_res" >&6; }
6170 if eval test x\$$cachevar = xyes; then
6171 CXX_DIALECT="$switch"
6172 CXX="$CXX $switch"
6173 if test -n "$CXXCPP" ; then
6174 CXXCPP="$CXXCPP $switch"
6175 fi
6176 ac_success=yes
6177 break
6178 fi
6179 done
6180 if test x$ac_success = xyes; then
6181 break
6182 fi
6183 done
6184 fi
6185 ac_ext=c
6186 ac_cpp='$CPP $CPPFLAGS'
6187 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6188 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6189 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6190
6191 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6192 if test x$ac_success = xno; then
6193 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6194 fi
6195 fi
6196 if test x$ac_success = xno; then
6197 HAVE_CXX11=0
6198 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6199 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6200 else
6201 HAVE_CXX11=1
6202
6203 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6204
6205 fi
6206
6207
6208
6209
6210 # Dependency checking.
6211 rm -rf .tst 2>/dev/null
6212 mkdir .tst 2>/dev/null
6213 if test -d .tst; then
6214 am__leading_dot=.
6215 else
6216 am__leading_dot=_
6217 fi
6218 rmdir .tst 2>/dev/null
6219
6220 DEPDIR="${am__leading_dot}deps"
6221
6222 ac_config_commands="$ac_config_commands depdir"
6223
6224
6225 depcc="$CC" am_compiler_list=
6226
6227 am_depcomp=$ac_aux_dir/depcomp
6228 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6229 $as_echo_n "checking dependency style of $depcc... " >&6; }
6230 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6231 $as_echo_n "(cached) " >&6
6232 else
6233 if test -f "$am_depcomp"; then
6234 # We make a subdir and do the tests there. Otherwise we can end up
6235 # making bogus files that we don't know about and never remove. For
6236 # instance it was reported that on HP-UX the gcc test will end up
6237 # making a dummy file named `D' -- because `-MD' means `put the output
6238 # in D'.
6239 mkdir conftest.dir
6240 # Copy depcomp to subdir because otherwise we won't find it if we're
6241 # using a relative directory.
6242 cp "$am_depcomp" conftest.dir
6243 cd conftest.dir
6244 # We will build objects and dependencies in a subdirectory because
6245 # it helps to detect inapplicable dependency modes. For instance
6246 # both Tru64's cc and ICC support -MD to output dependencies as a
6247 # side effect of compilation, but ICC will put the dependencies in
6248 # the current directory while Tru64 will put them in the object
6249 # directory.
6250 mkdir sub
6251
6252 am_cv_CC_dependencies_compiler_type=none
6253 if test "$am_compiler_list" = ""; then
6254 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6255 fi
6256 for depmode in $am_compiler_list; do
6257 if test $depmode = none; then break; fi
6258
6259 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6260 # Setup a source with many dependencies, because some compilers
6261 # like to wrap large dependency lists on column 80 (with \), and
6262 # we should not choose a depcomp mode which is confused by this.
6263 #
6264 # We need to recreate these files for each test, as the compiler may
6265 # overwrite some of them when testing with obscure command lines.
6266 # This happens at least with the AIX C compiler.
6267 : > sub/conftest.c
6268 for i in 1 2 3 4 5 6; do
6269 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6270 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6271 # Solaris 8's {/usr,}/bin/sh.
6272 touch sub/conftst$i.h
6273 done
6274 echo "include sub/conftest.Po" > confmf
6275
6276 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6277 # mode. It turns out that the SunPro C++ compiler does not properly
6278 # handle `-M -o', and we need to detect this.
6279 depcmd="depmode=$depmode \
6280 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6281 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6282 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6283 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6284 if env $depcmd > conftest.err 2>&1 &&
6285 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6286 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6287 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6288 # icc doesn't choke on unknown options, it will just issue warnings
6289 # or remarks (even with -Werror). So we grep stderr for any message
6290 # that says an option was ignored or not supported.
6291 # When given -MP, icc 7.0 and 7.1 complain thusly:
6292 # icc: Command line warning: ignoring option '-M'; no argument required
6293 # The diagnosis changed in icc 8.0:
6294 # icc: Command line remark: option '-MP' not supported
6295 if (grep 'ignoring option' conftest.err ||
6296 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6297 am_cv_CC_dependencies_compiler_type=$depmode
6298 $as_echo "$as_me:$LINENO: success" >&5
6299 break
6300 fi
6301 fi
6302 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6303 sed -e 's/^/| /' < conftest.err >&5
6304 done
6305
6306 cd ..
6307 rm -rf conftest.dir
6308 else
6309 am_cv_CC_dependencies_compiler_type=none
6310 fi
6311
6312 fi
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6314 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6315 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6316 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6317 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6318
6319 fi
6320
6321
6322
6323 CONFIG_OBS=
6324 CONFIG_DEPS=
6325 CONFIG_SRCS=
6326 ENABLE_CFLAGS=
6327
6328 CONFIG_ALL=
6329 CONFIG_CLEAN=
6330 CONFIG_INSTALL=
6331 CONFIG_UNINSTALL=
6332
6333 # If we haven't got the data from the intl directory,
6334 # assume NLS is disabled.
6335 USE_NLS=no
6336 LIBINTL=
6337 LIBINTL_DEP=
6338 INCINTL=
6339 XGETTEXT=
6340 GMSGFMT=
6341 POSUB=
6342
6343 if test -f ../intl/config.intl; then
6344 . ../intl/config.intl
6345 fi
6346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6347 $as_echo_n "checking whether NLS is requested... " >&6; }
6348 if test x"$USE_NLS" != xyes; then
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6350 $as_echo "no" >&6; }
6351 else
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6353 $as_echo "yes" >&6; }
6354
6355 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6356
6357
6358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6359 $as_echo_n "checking for catalogs to be installed... " >&6; }
6360 # Look for .po and .gmo files in the source directory.
6361 CATALOGS=
6362 XLINGUAS=
6363 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6364 # If there aren't any .gmo files the shell will give us the
6365 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6366 # weeded out.
6367 case "$cat" in *\**)
6368 continue;;
6369 esac
6370 # The quadruple backslash is collapsed to a double backslash
6371 # by the backticks, then collapsed again by the double quotes,
6372 # leaving us with one backslash in the sed expression (right
6373 # before the dot that mustn't act as a wildcard).
6374 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6375 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6376 # The user is allowed to set LINGUAS to a list of languages to
6377 # install catalogs for. If it's empty that means "all of them."
6378 if test "x$LINGUAS" = x; then
6379 CATALOGS="$CATALOGS $cat"
6380 XLINGUAS="$XLINGUAS $lang"
6381 else
6382 case "$LINGUAS" in *$lang*)
6383 CATALOGS="$CATALOGS $cat"
6384 XLINGUAS="$XLINGUAS $lang"
6385 ;;
6386 esac
6387 fi
6388 done
6389 LINGUAS="$XLINGUAS"
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6391 $as_echo "$LINGUAS" >&6; }
6392
6393
6394 DATADIRNAME=share
6395
6396 INSTOBJEXT=.mo
6397
6398 GENCAT=gencat
6399
6400 CATOBJEXT=.gmo
6401
6402 fi
6403
6404 localedir='${datadir}/locale'
6405
6406
6407 if test x"$USE_NLS" = xyes; then
6408 CONFIG_ALL="$CONFIG_ALL all-po"
6409 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6410 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6411 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6412 fi
6413
6414 PACKAGE=gdb
6415
6416 cat >>confdefs.h <<_ACEOF
6417 #define PACKAGE "$PACKAGE"
6418 _ACEOF
6419
6420
6421
6422 # We never need to detect it in this sub-configure.
6423 # But preserve it for config.status --recheck.
6424
6425
6426
6427 MAKEINFO_EXTRA_FLAGS=""
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6429 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6430 if ${gdb_cv_have_makeinfo_click+:} false; then :
6431 $as_echo_n "(cached) " >&6
6432 else
6433 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6434 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6435 gdb_cv_have_makeinfo_click=yes
6436 else
6437 gdb_cv_have_makeinfo_click=no
6438 fi
6439 fi
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6441 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6442 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6443 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6444 fi
6445
6446
6447
6448
6449 # Check whether --with-separate-debug-dir was given.
6450 if test "${with_separate_debug_dir+set}" = set; then :
6451 withval=$with_separate_debug_dir;
6452 DEBUGDIR=$withval
6453 else
6454 DEBUGDIR=${libdir}/debug
6455 fi
6456
6457
6458 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6459 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6460 ac_define_dir=`eval echo $DEBUGDIR`
6461 ac_define_dir=`eval echo $ac_define_dir`
6462
6463 cat >>confdefs.h <<_ACEOF
6464 #define DEBUGDIR "$ac_define_dir"
6465 _ACEOF
6466
6467
6468
6469
6470 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6471 if test "x$prefix" = xNONE; then
6472 test_prefix=/usr/local
6473 else
6474 test_prefix=$prefix
6475 fi
6476 else
6477 test_prefix=$exec_prefix
6478 fi
6479 value=0
6480 case ${ac_define_dir} in
6481 "${test_prefix}"|"${test_prefix}/"*|\
6482 '${exec_prefix}'|'${exec_prefix}/'*)
6483 value=1
6484 ;;
6485 esac
6486
6487 cat >>confdefs.h <<_ACEOF
6488 #define DEBUGDIR_RELOCATABLE $value
6489 _ACEOF
6490
6491
6492
6493
6494 # We can't pass paths as command line arguments.
6495 # Mingw32 tries to be clever and will convert the paths for us.
6496 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6497 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6498 # This breaks GDB's relocatable path conversions since paths passed in
6499 # config.h would not get so translated, the path prefixes no longer match.
6500
6501 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6502 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6503 ac_define_dir=`eval echo $bindir`
6504 ac_define_dir=`eval echo $ac_define_dir`
6505
6506 cat >>confdefs.h <<_ACEOF
6507 #define BINDIR "$ac_define_dir"
6508 _ACEOF
6509
6510
6511
6512 # GDB's datadir relocation
6513
6514
6515
6516 # Check whether --with-gdb-datadir was given.
6517 if test "${with_gdb_datadir+set}" = set; then :
6518 withval=$with_gdb_datadir;
6519 GDB_DATADIR=$withval
6520 else
6521 GDB_DATADIR=${datadir}/gdb
6522 fi
6523
6524
6525 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6526 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6527 ac_define_dir=`eval echo $GDB_DATADIR`
6528 ac_define_dir=`eval echo $ac_define_dir`
6529
6530 cat >>confdefs.h <<_ACEOF
6531 #define GDB_DATADIR "$ac_define_dir"
6532 _ACEOF
6533
6534
6535
6536
6537 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6538 if test "x$prefix" = xNONE; then
6539 test_prefix=/usr/local
6540 else
6541 test_prefix=$prefix
6542 fi
6543 else
6544 test_prefix=$exec_prefix
6545 fi
6546 value=0
6547 case ${ac_define_dir} in
6548 "${test_prefix}"|"${test_prefix}/"*|\
6549 '${exec_prefix}'|'${exec_prefix}/'*)
6550 value=1
6551 ;;
6552 esac
6553
6554 cat >>confdefs.h <<_ACEOF
6555 #define GDB_DATADIR_RELOCATABLE $value
6556 _ACEOF
6557
6558
6559
6560
6561
6562 # Check whether --with-relocated-sources was given.
6563 if test "${with_relocated_sources+set}" = set; then :
6564 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6565
6566 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6567 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6568 ac_define_dir=`eval echo $reloc_srcdir`
6569 ac_define_dir=`eval echo $ac_define_dir`
6570
6571 cat >>confdefs.h <<_ACEOF
6572 #define RELOC_SRCDIR "$ac_define_dir"
6573 _ACEOF
6574
6575
6576
6577 fi
6578
6579
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6581 $as_echo_n "checking for default auto-load directory... " >&6; }
6582
6583 # Check whether --with-auto-load-dir was given.
6584 if test "${with_auto_load_dir+set}" = set; then :
6585 withval=$with_auto_load_dir;
6586 else
6587 with_auto_load_dir='$debugdir:$datadir/auto-load'
6588 fi
6589
6590 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6591
6592 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6593 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6594 ac_define_dir=`eval echo $escape_dir`
6595 ac_define_dir=`eval echo $ac_define_dir`
6596
6597 cat >>confdefs.h <<_ACEOF
6598 #define AUTO_LOAD_DIR "$ac_define_dir"
6599 _ACEOF
6600
6601
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6603 $as_echo "$with_auto_load_dir" >&6; }
6604
6605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6606 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6607
6608 # Check whether --with-auto-load-safe-path was given.
6609 if test "${with_auto_load_safe_path+set}" = set; then :
6610 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6611 with_auto_load_safe_path="/"
6612 fi
6613 else
6614 with_auto_load_safe_path="$with_auto_load_dir"
6615 fi
6616
6617 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6618
6619 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6620 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6621 ac_define_dir=`eval echo $escape_dir`
6622 ac_define_dir=`eval echo $ac_define_dir`
6623
6624 cat >>confdefs.h <<_ACEOF
6625 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6626 _ACEOF
6627
6628
6629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6630 $as_echo "$with_auto_load_safe_path" >&6; }
6631
6632
6633
6634 subdirs="$subdirs testsuite"
6635
6636
6637 # Check whether to support alternative target configurations
6638 # Check whether --enable-targets was given.
6639 if test "${enable_targets+set}" = set; then :
6640 enableval=$enable_targets; case "${enableval}" in
6641 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6642 ;;
6643 no) enable_targets= ;;
6644 *) enable_targets=$enableval ;;
6645 esac
6646 fi
6647
6648
6649 # Check whether to enable 64-bit support on 32-bit hosts
6650 # Check whether --enable-64-bit-bfd was given.
6651 if test "${enable_64_bit_bfd+set}" = set; then :
6652 enableval=$enable_64_bit_bfd; case "${enableval}" in
6653 yes) want64=true ;;
6654 no) want64=false ;;
6655 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6656 esac
6657 else
6658 want64=false
6659 fi
6660
6661 # Provide defaults for some variables set by the per-host and per-target
6662 # configuration.
6663 gdb_host_obs=posix-hdep.o
6664
6665 if test "${target}" = "${host}"; then
6666 gdb_native=yes
6667 else
6668 gdb_native=no
6669 fi
6670
6671 . $srcdir/configure.host
6672
6673 # Accumulate some settings from configure.tgt over all enabled targets
6674
6675 TARGET_OBS=
6676 all_targets=
6677 HAVE_NATIVE_GCORE_TARGET=
6678
6679 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6680 do
6681 if test "$targ_alias" = "all"; then
6682 all_targets=true
6683 else
6684 # Canonicalize the secondary target names.
6685 result=`$ac_config_sub $targ_alias 2>/dev/null`
6686 if test -n "$result"; then
6687 targ=$result
6688 else
6689 targ=$targ_alias
6690 fi
6691
6692 . ${srcdir}/configure.tgt
6693
6694 if test -z "${gdb_target_obs}"; then :
6695 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6696 fi
6697
6698 # Target-specific object files
6699 for i in ${gdb_target_obs}; do
6700 case " $TARGET_OBS " in
6701 *" ${i} "*) ;;
6702 *)
6703 TARGET_OBS="$TARGET_OBS ${i}"
6704 ;;
6705 esac
6706 done
6707
6708 # Check whether this target needs 64-bit CORE_ADDR
6709 if test x${want64} = xfalse; then
6710 . ${srcdir}/../bfd/config.bfd
6711 fi
6712
6713 # Check whether this target is native and supports gcore.
6714 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6715 && $gdb_have_gcore; then
6716 HAVE_NATIVE_GCORE_TARGET=1
6717 fi
6718 fi
6719 done
6720
6721 if test x${all_targets} = xtrue; then
6722
6723 # We want all 64-bit targets if we either:
6724 # - run on a 64-bit host or
6725 # - already require 64-bit support for some other target or
6726 # - the --enable-64-bit-bfd option was supplied
6727 # Otherwise we only support all 32-bit targets.
6728 #
6729 # NOTE: This test must be in sync with the corresponding
6730 # tests in BFD!
6731
6732 if test x${want64} = xfalse; then
6733 # The cast to long int works around a bug in the HP C Compiler
6734 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6735 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6736 # This bug is HP SR number 8606223364.
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6738 $as_echo_n "checking size of long... " >&6; }
6739 if ${ac_cv_sizeof_long+:} false; then :
6740 $as_echo_n "(cached) " >&6
6741 else
6742 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6743
6744 else
6745 if test "$ac_cv_type_long" = yes; then
6746 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6747 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6748 as_fn_error 77 "cannot compute sizeof (long)
6749 See \`config.log' for more details" "$LINENO" 5; }
6750 else
6751 ac_cv_sizeof_long=0
6752 fi
6753 fi
6754
6755 fi
6756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6757 $as_echo "$ac_cv_sizeof_long" >&6; }
6758
6759
6760
6761 cat >>confdefs.h <<_ACEOF
6762 #define SIZEOF_LONG $ac_cv_sizeof_long
6763 _ACEOF
6764
6765
6766 if test "x${ac_cv_sizeof_long}" = "x8"; then
6767 want64=true
6768 fi
6769 fi
6770 if test x${want64} = xtrue; then
6771 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6772 else
6773 TARGET_OBS='$(ALL_TARGET_OBS)'
6774 fi
6775 fi
6776
6777
6778
6779
6780 # For other settings, only the main target counts.
6781 gdb_sim=
6782 gdb_osabi=
6783 targ=$target; . ${srcdir}/configure.tgt
6784
6785 # Fetch the default architecture and default target vector from BFD.
6786 targ=$target; . $srcdir/../bfd/config.bfd
6787
6788 # We only want the first architecture, so strip off the others if
6789 # there is more than one.
6790 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6791
6792 if test "x$targ_archs" != x; then
6793
6794 cat >>confdefs.h <<_ACEOF
6795 #define DEFAULT_BFD_ARCH $targ_archs
6796 _ACEOF
6797
6798 fi
6799 if test "x$targ_defvec" != x; then
6800
6801 cat >>confdefs.h <<_ACEOF
6802 #define DEFAULT_BFD_VEC $targ_defvec
6803 _ACEOF
6804
6805 fi
6806
6807 # Enable MI.
6808 # Check whether --enable-gdbmi was given.
6809 if test "${enable_gdbmi+set}" = set; then :
6810 enableval=$enable_gdbmi; case $enableval in
6811 yes | no)
6812 ;;
6813 *)
6814 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6815 esac
6816 else
6817 enable_gdbmi=yes
6818 fi
6819
6820 if test x"$enable_gdbmi" = xyes; then
6821 if test -d "$srcdir/mi"; then
6822 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6823 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6824 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6825 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6826 fi
6827 fi
6828
6829 # Enable TUI.
6830 # Check whether --enable-tui was given.
6831 if test "${enable_tui+set}" = set; then :
6832 enableval=$enable_tui; case $enableval in
6833 yes | no | auto)
6834 ;;
6835 *)
6836 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6837 esac
6838 else
6839 enable_tui=auto
6840 fi
6841
6842
6843 # Enable gdbtk.
6844 # Check whether --enable-gdbtk was given.
6845 if test "${enable_gdbtk+set}" = set; then :
6846 enableval=$enable_gdbtk; case $enableval in
6847 yes | no)
6848 ;;
6849 *)
6850 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6851 esac
6852 else
6853 if test -d "$srcdir/gdbtk"; then
6854 enable_gdbtk=yes
6855 else
6856 enable_gdbtk=no
6857 fi
6858 fi
6859
6860 # We unconditionally disable gdbtk tests on selected platforms.
6861 case $host_os in
6862 go32* | windows*)
6863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6864 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6865 enable_gdbtk=no ;;
6866 esac
6867
6868 # Handle optional debuginfod support
6869
6870
6871
6872
6873
6874
6875
6876 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6877 if test -n "$ac_tool_prefix"; then
6878 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6879 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6881 $as_echo_n "checking for $ac_word... " >&6; }
6882 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6883 $as_echo_n "(cached) " >&6
6884 else
6885 case $PKG_CONFIG in
6886 [\\/]* | ?:[\\/]*)
6887 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6888 ;;
6889 *)
6890 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6891 for as_dir in $PATH
6892 do
6893 IFS=$as_save_IFS
6894 test -z "$as_dir" && as_dir=.
6895 for ac_exec_ext in '' $ac_executable_extensions; do
6896 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6897 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6898 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6899 break 2
6900 fi
6901 done
6902 done
6903 IFS=$as_save_IFS
6904
6905 ;;
6906 esac
6907 fi
6908 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6909 if test -n "$PKG_CONFIG"; then
6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6911 $as_echo "$PKG_CONFIG" >&6; }
6912 else
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914 $as_echo "no" >&6; }
6915 fi
6916
6917
6918 fi
6919 if test -z "$ac_cv_path_PKG_CONFIG"; then
6920 ac_pt_PKG_CONFIG=$PKG_CONFIG
6921 # Extract the first word of "pkg-config", so it can be a program name with args.
6922 set dummy pkg-config; ac_word=$2
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6924 $as_echo_n "checking for $ac_word... " >&6; }
6925 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6926 $as_echo_n "(cached) " >&6
6927 else
6928 case $ac_pt_PKG_CONFIG in
6929 [\\/]* | ?:[\\/]*)
6930 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6931 ;;
6932 *)
6933 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6934 for as_dir in $PATH
6935 do
6936 IFS=$as_save_IFS
6937 test -z "$as_dir" && as_dir=.
6938 for ac_exec_ext in '' $ac_executable_extensions; do
6939 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6940 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6941 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6942 break 2
6943 fi
6944 done
6945 done
6946 IFS=$as_save_IFS
6947
6948 ;;
6949 esac
6950 fi
6951 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6952 if test -n "$ac_pt_PKG_CONFIG"; then
6953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6954 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
6955 else
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6957 $as_echo "no" >&6; }
6958 fi
6959
6960 if test "x$ac_pt_PKG_CONFIG" = x; then
6961 PKG_CONFIG=""
6962 else
6963 case $cross_compiling:$ac_tool_warned in
6964 yes:)
6965 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6966 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6967 ac_tool_warned=yes ;;
6968 esac
6969 PKG_CONFIG=$ac_pt_PKG_CONFIG
6970 fi
6971 else
6972 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6973 fi
6974
6975 fi
6976 if test -n "$PKG_CONFIG"; then
6977 _pkg_min_version=0.9.0
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6979 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6980 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6982 $as_echo "yes" >&6; }
6983 else
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6985 $as_echo "no" >&6; }
6986 PKG_CONFIG=""
6987 fi
6988 fi
6989
6990 # Handle optional debuginfod support
6991
6992 # Check whether --with-debuginfod was given.
6993 if test "${with_debuginfod+set}" = set; then :
6994 withval=$with_debuginfod;
6995 else
6996 with_debuginfod=auto
6997 fi
6998
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
7000 $as_echo_n "checking whether to use debuginfod... " >&6; }
7001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
7002 $as_echo "$with_debuginfod" >&6; }
7003
7004 if test "x$with_debuginfod" != xno; then
7005
7006 pkg_failed=no
7007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7008 $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7009
7010 if test -n "$DEBUGINFOD_CFLAGS"; then
7011 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7012 elif test -n "$PKG_CONFIG"; then
7013 if test -n "$PKG_CONFIG" && \
7014 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7015 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7016 ac_status=$?
7017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7018 test $ac_status = 0; }; then
7019 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7020 test "x$?" != "x0" && pkg_failed=yes
7021 else
7022 pkg_failed=yes
7023 fi
7024 else
7025 pkg_failed=untried
7026 fi
7027 if test -n "$DEBUGINFOD_LIBS"; then
7028 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7029 elif test -n "$PKG_CONFIG"; then
7030 if test -n "$PKG_CONFIG" && \
7031 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7032 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7033 ac_status=$?
7034 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7035 test $ac_status = 0; }; then
7036 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7037 test "x$?" != "x0" && pkg_failed=yes
7038 else
7039 pkg_failed=yes
7040 fi
7041 else
7042 pkg_failed=untried
7043 fi
7044
7045 if test $pkg_failed = no; then
7046 pkg_save_LDFLAGS="$LDFLAGS"
7047 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7049 /* end confdefs.h. */
7050
7051 int
7052 main ()
7053 {
7054
7055 ;
7056 return 0;
7057 }
7058 _ACEOF
7059 if ac_fn_c_try_link "$LINENO"; then :
7060
7061 else
7062 pkg_failed=yes
7063 fi
7064 rm -f core conftest.err conftest.$ac_objext \
7065 conftest$ac_exeext conftest.$ac_ext
7066 LDFLAGS=$pkg_save_LDFLAGS
7067 fi
7068
7069
7070
7071 if test $pkg_failed = yes; then
7072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7073 $as_echo "no" >&6; }
7074
7075 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7076 _pkg_short_errors_supported=yes
7077 else
7078 _pkg_short_errors_supported=no
7079 fi
7080 if test $_pkg_short_errors_supported = yes; then
7081 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7082 else
7083 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7084 fi
7085 # Put the nasty error message in config.log where it belongs
7086 echo "$DEBUGINFOD_PKG_ERRORS" >&5
7087
7088 if test "x$with_debuginfod" = xyes; then
7089 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7090 else
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7092 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7093 fi
7094 elif test $pkg_failed = untried; then
7095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7096 $as_echo "no" >&6; }
7097 if test "x$with_debuginfod" = xyes; then
7098 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7099 else
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7101 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7102 fi
7103 else
7104 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7105 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7107 $as_echo "yes" >&6; }
7108
7109 $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7110
7111 fi
7112 else
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7114 $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7115 fi
7116
7117
7118 # Libunwind support for ia64.
7119
7120 # Check whether --with-libunwind-ia64 was given.
7121 if test "${with_libunwind_ia64+set}" = set; then :
7122 withval=$with_libunwind_ia64;
7123 else
7124 with_libunwind_ia64=auto
7125 fi
7126
7127
7128 # Backward compatibility option.
7129 if test "${with_libunwind+set}" = set; then
7130 if test x"$with_libunwind_ia64" != xauto; then
7131 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7132 fi
7133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7134 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7135 with_libunwind_ia64="$with_libunwind"
7136 fi
7137
7138 case "$with_libunwind_ia64" in
7139 yes | no)
7140 ;;
7141 auto)
7142 for ac_header in libunwind-ia64.h
7143 do :
7144 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7145 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7146 cat >>confdefs.h <<_ACEOF
7147 #define HAVE_LIBUNWIND_IA64_H 1
7148 _ACEOF
7149
7150 fi
7151
7152 done
7153
7154 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7155 ;;
7156 *)
7157 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7158 ;;
7159 esac
7160
7161 if test x"$with_libunwind_ia64" = xyes; then
7162 for ac_header in libunwind-ia64.h
7163 do :
7164 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7165 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7166 cat >>confdefs.h <<_ACEOF
7167 #define HAVE_LIBUNWIND_IA64_H 1
7168 _ACEOF
7169
7170 fi
7171
7172 done
7173
7174 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7175 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7176 fi
7177 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7178 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7179 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7180 fi
7181
7182 opt_curses=no
7183
7184 # Check whether --with-curses was given.
7185 if test "${with_curses+set}" = set; then :
7186 withval=$with_curses; opt_curses=$withval
7187 fi
7188
7189
7190 prefer_curses=no
7191 if test "$opt_curses" = "yes"; then
7192 prefer_curses=yes
7193 fi
7194
7195 # Profiling support.
7196 # Check whether --enable-profiling was given.
7197 if test "${enable_profiling+set}" = set; then :
7198 enableval=$enable_profiling; case $enableval in
7199 yes | no)
7200 ;;
7201 *)
7202 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
7203 esac
7204 else
7205 enable_profiling=no
7206 fi
7207
7208
7209 for ac_func in monstartup _mcleanup
7210 do :
7211 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7212 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7213 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7214 cat >>confdefs.h <<_ACEOF
7215 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7216 _ACEOF
7217
7218 fi
7219 done
7220
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7222 $as_echo_n "checking for _etext... " >&6; }
7223 if ${ac_cv_var__etext+:} false; then :
7224 $as_echo_n "(cached) " >&6
7225 else
7226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7227 /* end confdefs.h. */
7228 #include <stdlib.h>
7229 extern char _etext;
7230 int
7231 main ()
7232 {
7233 free (&_etext);
7234
7235 ;
7236 return 0;
7237 }
7238 _ACEOF
7239 if ac_fn_c_try_link "$LINENO"; then :
7240 ac_cv_var__etext=yes
7241 else
7242 ac_cv_var__etext=no
7243
7244 fi
7245 rm -f core conftest.err conftest.$ac_objext \
7246 conftest$ac_exeext conftest.$ac_ext
7247
7248 fi
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7250 $as_echo "$ac_cv_var__etext" >&6; }
7251 if test "$ac_cv_var__etext" = yes; then
7252
7253 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7254
7255 fi
7256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7257 $as_echo_n "checking for etext... " >&6; }
7258 if ${ac_cv_var_etext+:} false; then :
7259 $as_echo_n "(cached) " >&6
7260 else
7261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7262 /* end confdefs.h. */
7263 #include <stdlib.h>
7264 extern char etext;
7265 int
7266 main ()
7267 {
7268 free (&etext);
7269
7270 ;
7271 return 0;
7272 }
7273 _ACEOF
7274 if ac_fn_c_try_link "$LINENO"; then :
7275 ac_cv_var_etext=yes
7276 else
7277 ac_cv_var_etext=no
7278
7279 fi
7280 rm -f core conftest.err conftest.$ac_objext \
7281 conftest$ac_exeext conftest.$ac_ext
7282
7283 fi
7284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7285 $as_echo "$ac_cv_var_etext" >&6; }
7286 if test "$ac_cv_var_etext" = yes; then
7287
7288 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7289
7290 fi
7291 if test "$enable_profiling" = yes ; then
7292 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7293 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7294 fi
7295 PROFILE_CFLAGS=-pg
7296 OLD_CFLAGS="$CFLAGS"
7297 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7298
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7300 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7301 if ${ac_cv_cc_supports_pg+:} false; then :
7302 $as_echo_n "(cached) " >&6
7303 else
7304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7305 /* end confdefs.h. */
7306
7307 int
7308 main ()
7309 {
7310 int x;
7311 ;
7312 return 0;
7313 }
7314 _ACEOF
7315 if ac_fn_c_try_compile "$LINENO"; then :
7316 ac_cv_cc_supports_pg=yes
7317 else
7318 ac_cv_cc_supports_pg=no
7319
7320 fi
7321 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7322
7323 fi
7324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7325 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7326
7327 if test "$ac_cv_cc_supports_pg" = no; then
7328 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7329 fi
7330
7331 CFLAGS="$OLD_CFLAGS"
7332 fi
7333
7334 CODESIGN_CERT=
7335 # Check whether --enable-codesign was given.
7336 if test "${enable_codesign+set}" = set; then :
7337 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7338 fi
7339
7340
7341
7342
7343
7344 # Check whether --with-pkgversion was given.
7345 if test "${with_pkgversion+set}" = set; then :
7346 withval=$with_pkgversion; case "$withval" in
7347 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7348 no) PKGVERSION= ;;
7349 *) PKGVERSION="($withval) " ;;
7350 esac
7351 else
7352 PKGVERSION="(GDB) "
7353
7354 fi
7355
7356
7357
7358
7359
7360 # Check whether --with-bugurl was given.
7361 if test "${with_bugurl+set}" = set; then :
7362 withval=$with_bugurl; case "$withval" in
7363 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7364 no) BUGURL=
7365 ;;
7366 *) BUGURL="$withval"
7367 ;;
7368 esac
7369 else
7370 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7371
7372 fi
7373
7374 case ${BUGURL} in
7375 "")
7376 REPORT_BUGS_TO=
7377 REPORT_BUGS_TEXI=
7378 ;;
7379 *)
7380 REPORT_BUGS_TO="<$BUGURL>"
7381 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7382 ;;
7383 esac;
7384
7385
7386
7387
7388 cat >>confdefs.h <<_ACEOF
7389 #define PKGVERSION "$PKGVERSION"
7390 _ACEOF
7391
7392
7393 cat >>confdefs.h <<_ACEOF
7394 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7395 _ACEOF
7396
7397
7398 # --------------------- #
7399 # Checks for programs. #
7400 # --------------------- #
7401
7402 for ac_prog in gawk mawk nawk awk
7403 do
7404 # Extract the first word of "$ac_prog", so it can be a program name with args.
7405 set dummy $ac_prog; ac_word=$2
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7407 $as_echo_n "checking for $ac_word... " >&6; }
7408 if ${ac_cv_prog_AWK+:} false; then :
7409 $as_echo_n "(cached) " >&6
7410 else
7411 if test -n "$AWK"; then
7412 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7413 else
7414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7415 for as_dir in $PATH
7416 do
7417 IFS=$as_save_IFS
7418 test -z "$as_dir" && as_dir=.
7419 for ac_exec_ext in '' $ac_executable_extensions; do
7420 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7421 ac_cv_prog_AWK="$ac_prog"
7422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7423 break 2
7424 fi
7425 done
7426 done
7427 IFS=$as_save_IFS
7428
7429 fi
7430 fi
7431 AWK=$ac_cv_prog_AWK
7432 if test -n "$AWK"; then
7433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7434 $as_echo "$AWK" >&6; }
7435 else
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437 $as_echo "no" >&6; }
7438 fi
7439
7440
7441 test -n "$AWK" && break
7442 done
7443
7444 # Find a good install program. We prefer a C program (faster),
7445 # so one script is as good as another. But avoid the broken or
7446 # incompatible versions:
7447 # SysV /etc/install, /usr/sbin/install
7448 # SunOS /usr/etc/install
7449 # IRIX /sbin/install
7450 # AIX /bin/install
7451 # AmigaOS /C/install, which installs bootblocks on floppy discs
7452 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7453 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7454 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7455 # OS/2's system install, which has a completely different semantic
7456 # ./install, which can be erroneously created by make from ./install.sh.
7457 # Reject install programs that cannot install multiple files.
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7459 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7460 if test -z "$INSTALL"; then
7461 if ${ac_cv_path_install+:} false; then :
7462 $as_echo_n "(cached) " >&6
7463 else
7464 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7465 for as_dir in $PATH
7466 do
7467 IFS=$as_save_IFS
7468 test -z "$as_dir" && as_dir=.
7469 # Account for people who put trailing slashes in PATH elements.
7470 case $as_dir/ in #((
7471 ./ | .// | /[cC]/* | \
7472 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7473 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7474 /usr/ucb/* ) ;;
7475 *)
7476 # OSF1 and SCO ODT 3.0 have their own names for install.
7477 # Don't use installbsd from OSF since it installs stuff as root
7478 # by default.
7479 for ac_prog in ginstall scoinst install; do
7480 for ac_exec_ext in '' $ac_executable_extensions; do
7481 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7482 if test $ac_prog = install &&
7483 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7484 # AIX install. It has an incompatible calling convention.
7485 :
7486 elif test $ac_prog = install &&
7487 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7488 # program-specific install script used by HP pwplus--don't use.
7489 :
7490 else
7491 rm -rf conftest.one conftest.two conftest.dir
7492 echo one > conftest.one
7493 echo two > conftest.two
7494 mkdir conftest.dir
7495 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7496 test -s conftest.one && test -s conftest.two &&
7497 test -s conftest.dir/conftest.one &&
7498 test -s conftest.dir/conftest.two
7499 then
7500 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7501 break 3
7502 fi
7503 fi
7504 fi
7505 done
7506 done
7507 ;;
7508 esac
7509
7510 done
7511 IFS=$as_save_IFS
7512
7513 rm -rf conftest.one conftest.two conftest.dir
7514
7515 fi
7516 if test "${ac_cv_path_install+set}" = set; then
7517 INSTALL=$ac_cv_path_install
7518 else
7519 # As a last resort, use the slow shell script. Don't cache a
7520 # value for INSTALL within a source directory, because that will
7521 # break other packages using the cache if that directory is
7522 # removed, or if the value is a relative name.
7523 INSTALL=$ac_install_sh
7524 fi
7525 fi
7526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7527 $as_echo "$INSTALL" >&6; }
7528
7529 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7530 # It thinks the first close brace ends the variable substitution.
7531 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7532
7533 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7534
7535 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7536
7537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7538 $as_echo_n "checking whether ln -s works... " >&6; }
7539 LN_S=$as_ln_s
7540 if test "$LN_S" = "ln -s"; then
7541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7542 $as_echo "yes" >&6; }
7543 else
7544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7545 $as_echo "no, using $LN_S" >&6; }
7546 fi
7547
7548 if test -n "$ac_tool_prefix"; then
7549 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7550 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7552 $as_echo_n "checking for $ac_word... " >&6; }
7553 if ${ac_cv_prog_RANLIB+:} false; then :
7554 $as_echo_n "(cached) " >&6
7555 else
7556 if test -n "$RANLIB"; then
7557 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7558 else
7559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7560 for as_dir in $PATH
7561 do
7562 IFS=$as_save_IFS
7563 test -z "$as_dir" && as_dir=.
7564 for ac_exec_ext in '' $ac_executable_extensions; do
7565 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7566 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7567 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7568 break 2
7569 fi
7570 done
7571 done
7572 IFS=$as_save_IFS
7573
7574 fi
7575 fi
7576 RANLIB=$ac_cv_prog_RANLIB
7577 if test -n "$RANLIB"; then
7578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7579 $as_echo "$RANLIB" >&6; }
7580 else
7581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7582 $as_echo "no" >&6; }
7583 fi
7584
7585
7586 fi
7587 if test -z "$ac_cv_prog_RANLIB"; then
7588 ac_ct_RANLIB=$RANLIB
7589 # Extract the first word of "ranlib", so it can be a program name with args.
7590 set dummy ranlib; ac_word=$2
7591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7592 $as_echo_n "checking for $ac_word... " >&6; }
7593 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7594 $as_echo_n "(cached) " >&6
7595 else
7596 if test -n "$ac_ct_RANLIB"; then
7597 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7598 else
7599 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7600 for as_dir in $PATH
7601 do
7602 IFS=$as_save_IFS
7603 test -z "$as_dir" && as_dir=.
7604 for ac_exec_ext in '' $ac_executable_extensions; do
7605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7606 ac_cv_prog_ac_ct_RANLIB="ranlib"
7607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7608 break 2
7609 fi
7610 done
7611 done
7612 IFS=$as_save_IFS
7613
7614 fi
7615 fi
7616 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7617 if test -n "$ac_ct_RANLIB"; then
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7619 $as_echo "$ac_ct_RANLIB" >&6; }
7620 else
7621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7622 $as_echo "no" >&6; }
7623 fi
7624
7625 if test "x$ac_ct_RANLIB" = x; then
7626 RANLIB=":"
7627 else
7628 case $cross_compiling:$ac_tool_warned in
7629 yes:)
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7631 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7632 ac_tool_warned=yes ;;
7633 esac
7634 RANLIB=$ac_ct_RANLIB
7635 fi
7636 else
7637 RANLIB="$ac_cv_prog_RANLIB"
7638 fi
7639
7640 for ac_prog in 'bison -y' byacc
7641 do
7642 # Extract the first word of "$ac_prog", so it can be a program name with args.
7643 set dummy $ac_prog; ac_word=$2
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7645 $as_echo_n "checking for $ac_word... " >&6; }
7646 if ${ac_cv_prog_YACC+:} false; then :
7647 $as_echo_n "(cached) " >&6
7648 else
7649 if test -n "$YACC"; then
7650 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7651 else
7652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7653 for as_dir in $PATH
7654 do
7655 IFS=$as_save_IFS
7656 test -z "$as_dir" && as_dir=.
7657 for ac_exec_ext in '' $ac_executable_extensions; do
7658 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7659 ac_cv_prog_YACC="$ac_prog"
7660 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7661 break 2
7662 fi
7663 done
7664 done
7665 IFS=$as_save_IFS
7666
7667 fi
7668 fi
7669 YACC=$ac_cv_prog_YACC
7670 if test -n "$YACC"; then
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7672 $as_echo "$YACC" >&6; }
7673 else
7674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7675 $as_echo "no" >&6; }
7676 fi
7677
7678
7679 test -n "$YACC" && break
7680 done
7681 test -n "$YACC" || YACC="yacc"
7682
7683
7684 if test -n "$ac_tool_prefix"; then
7685 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7686 set dummy ${ac_tool_prefix}ar; ac_word=$2
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7688 $as_echo_n "checking for $ac_word... " >&6; }
7689 if ${ac_cv_prog_AR+:} false; then :
7690 $as_echo_n "(cached) " >&6
7691 else
7692 if test -n "$AR"; then
7693 ac_cv_prog_AR="$AR" # Let the user override the test.
7694 else
7695 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7696 for as_dir in $PATH
7697 do
7698 IFS=$as_save_IFS
7699 test -z "$as_dir" && as_dir=.
7700 for ac_exec_ext in '' $ac_executable_extensions; do
7701 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7702 ac_cv_prog_AR="${ac_tool_prefix}ar"
7703 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7704 break 2
7705 fi
7706 done
7707 done
7708 IFS=$as_save_IFS
7709
7710 fi
7711 fi
7712 AR=$ac_cv_prog_AR
7713 if test -n "$AR"; then
7714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7715 $as_echo "$AR" >&6; }
7716 else
7717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7718 $as_echo "no" >&6; }
7719 fi
7720
7721
7722 fi
7723 if test -z "$ac_cv_prog_AR"; then
7724 ac_ct_AR=$AR
7725 # Extract the first word of "ar", so it can be a program name with args.
7726 set dummy ar; ac_word=$2
7727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7728 $as_echo_n "checking for $ac_word... " >&6; }
7729 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7730 $as_echo_n "(cached) " >&6
7731 else
7732 if test -n "$ac_ct_AR"; then
7733 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7734 else
7735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7736 for as_dir in $PATH
7737 do
7738 IFS=$as_save_IFS
7739 test -z "$as_dir" && as_dir=.
7740 for ac_exec_ext in '' $ac_executable_extensions; do
7741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7742 ac_cv_prog_ac_ct_AR="ar"
7743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7744 break 2
7745 fi
7746 done
7747 done
7748 IFS=$as_save_IFS
7749
7750 fi
7751 fi
7752 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7753 if test -n "$ac_ct_AR"; then
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7755 $as_echo "$ac_ct_AR" >&6; }
7756 else
7757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7758 $as_echo "no" >&6; }
7759 fi
7760
7761 if test "x$ac_ct_AR" = x; then
7762 AR=""
7763 else
7764 case $cross_compiling:$ac_tool_warned in
7765 yes:)
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7767 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7768 ac_tool_warned=yes ;;
7769 esac
7770 AR=$ac_ct_AR
7771 fi
7772 else
7773 AR="$ac_cv_prog_AR"
7774 fi
7775
7776 if test -n "$ac_tool_prefix"; then
7777 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7778 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7780 $as_echo_n "checking for $ac_word... " >&6; }
7781 if ${ac_cv_prog_DLLTOOL+:} false; then :
7782 $as_echo_n "(cached) " >&6
7783 else
7784 if test -n "$DLLTOOL"; then
7785 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7786 else
7787 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7788 for as_dir in $PATH
7789 do
7790 IFS=$as_save_IFS
7791 test -z "$as_dir" && as_dir=.
7792 for ac_exec_ext in '' $ac_executable_extensions; do
7793 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7794 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7796 break 2
7797 fi
7798 done
7799 done
7800 IFS=$as_save_IFS
7801
7802 fi
7803 fi
7804 DLLTOOL=$ac_cv_prog_DLLTOOL
7805 if test -n "$DLLTOOL"; then
7806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7807 $as_echo "$DLLTOOL" >&6; }
7808 else
7809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7810 $as_echo "no" >&6; }
7811 fi
7812
7813
7814 fi
7815 if test -z "$ac_cv_prog_DLLTOOL"; then
7816 ac_ct_DLLTOOL=$DLLTOOL
7817 # Extract the first word of "dlltool", so it can be a program name with args.
7818 set dummy dlltool; ac_word=$2
7819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7820 $as_echo_n "checking for $ac_word... " >&6; }
7821 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7822 $as_echo_n "(cached) " >&6
7823 else
7824 if test -n "$ac_ct_DLLTOOL"; then
7825 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7826 else
7827 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7828 for as_dir in $PATH
7829 do
7830 IFS=$as_save_IFS
7831 test -z "$as_dir" && as_dir=.
7832 for ac_exec_ext in '' $ac_executable_extensions; do
7833 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7834 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7835 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7836 break 2
7837 fi
7838 done
7839 done
7840 IFS=$as_save_IFS
7841
7842 fi
7843 fi
7844 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7845 if test -n "$ac_ct_DLLTOOL"; then
7846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7847 $as_echo "$ac_ct_DLLTOOL" >&6; }
7848 else
7849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7850 $as_echo "no" >&6; }
7851 fi
7852
7853 if test "x$ac_ct_DLLTOOL" = x; then
7854 DLLTOOL=""
7855 else
7856 case $cross_compiling:$ac_tool_warned in
7857 yes:)
7858 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7859 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7860 ac_tool_warned=yes ;;
7861 esac
7862 DLLTOOL=$ac_ct_DLLTOOL
7863 fi
7864 else
7865 DLLTOOL="$ac_cv_prog_DLLTOOL"
7866 fi
7867
7868 if test -n "$ac_tool_prefix"; then
7869 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7870 set dummy ${ac_tool_prefix}windres; ac_word=$2
7871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7872 $as_echo_n "checking for $ac_word... " >&6; }
7873 if ${ac_cv_prog_WINDRES+:} false; then :
7874 $as_echo_n "(cached) " >&6
7875 else
7876 if test -n "$WINDRES"; then
7877 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7878 else
7879 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7880 for as_dir in $PATH
7881 do
7882 IFS=$as_save_IFS
7883 test -z "$as_dir" && as_dir=.
7884 for ac_exec_ext in '' $ac_executable_extensions; do
7885 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7886 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7887 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7888 break 2
7889 fi
7890 done
7891 done
7892 IFS=$as_save_IFS
7893
7894 fi
7895 fi
7896 WINDRES=$ac_cv_prog_WINDRES
7897 if test -n "$WINDRES"; then
7898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7899 $as_echo "$WINDRES" >&6; }
7900 else
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7902 $as_echo "no" >&6; }
7903 fi
7904
7905
7906 fi
7907 if test -z "$ac_cv_prog_WINDRES"; then
7908 ac_ct_WINDRES=$WINDRES
7909 # Extract the first word of "windres", so it can be a program name with args.
7910 set dummy windres; ac_word=$2
7911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7912 $as_echo_n "checking for $ac_word... " >&6; }
7913 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7914 $as_echo_n "(cached) " >&6
7915 else
7916 if test -n "$ac_ct_WINDRES"; then
7917 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7918 else
7919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7920 for as_dir in $PATH
7921 do
7922 IFS=$as_save_IFS
7923 test -z "$as_dir" && as_dir=.
7924 for ac_exec_ext in '' $ac_executable_extensions; do
7925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7926 ac_cv_prog_ac_ct_WINDRES="windres"
7927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7928 break 2
7929 fi
7930 done
7931 done
7932 IFS=$as_save_IFS
7933
7934 fi
7935 fi
7936 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7937 if test -n "$ac_ct_WINDRES"; then
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7939 $as_echo "$ac_ct_WINDRES" >&6; }
7940 else
7941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7942 $as_echo "no" >&6; }
7943 fi
7944
7945 if test "x$ac_ct_WINDRES" = x; then
7946 WINDRES=""
7947 else
7948 case $cross_compiling:$ac_tool_warned in
7949 yes:)
7950 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7951 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7952 ac_tool_warned=yes ;;
7953 esac
7954 WINDRES=$ac_ct_WINDRES
7955 fi
7956 else
7957 WINDRES="$ac_cv_prog_WINDRES"
7958 fi
7959
7960
7961 case $host_os in
7962 gnu*)
7963 # Needed for GNU Hurd hosts.
7964 if test -n "$ac_tool_prefix"; then
7965 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7966 set dummy ${ac_tool_prefix}mig; ac_word=$2
7967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7968 $as_echo_n "checking for $ac_word... " >&6; }
7969 if ${ac_cv_prog_MIG+:} false; then :
7970 $as_echo_n "(cached) " >&6
7971 else
7972 if test -n "$MIG"; then
7973 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7974 else
7975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7976 for as_dir in $PATH
7977 do
7978 IFS=$as_save_IFS
7979 test -z "$as_dir" && as_dir=.
7980 for ac_exec_ext in '' $ac_executable_extensions; do
7981 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7982 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7983 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7984 break 2
7985 fi
7986 done
7987 done
7988 IFS=$as_save_IFS
7989
7990 fi
7991 fi
7992 MIG=$ac_cv_prog_MIG
7993 if test -n "$MIG"; then
7994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7995 $as_echo "$MIG" >&6; }
7996 else
7997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7998 $as_echo "no" >&6; }
7999 fi
8000
8001
8002 fi
8003 if test -z "$ac_cv_prog_MIG"; then
8004 ac_ct_MIG=$MIG
8005 # Extract the first word of "mig", so it can be a program name with args.
8006 set dummy mig; ac_word=$2
8007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8008 $as_echo_n "checking for $ac_word... " >&6; }
8009 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
8010 $as_echo_n "(cached) " >&6
8011 else
8012 if test -n "$ac_ct_MIG"; then
8013 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8014 else
8015 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8016 for as_dir in $PATH
8017 do
8018 IFS=$as_save_IFS
8019 test -z "$as_dir" && as_dir=.
8020 for ac_exec_ext in '' $ac_executable_extensions; do
8021 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8022 ac_cv_prog_ac_ct_MIG="mig"
8023 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8024 break 2
8025 fi
8026 done
8027 done
8028 IFS=$as_save_IFS
8029
8030 fi
8031 fi
8032 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8033 if test -n "$ac_ct_MIG"; then
8034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8035 $as_echo "$ac_ct_MIG" >&6; }
8036 else
8037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8038 $as_echo "no" >&6; }
8039 fi
8040
8041 if test "x$ac_ct_MIG" = x; then
8042 MIG=""
8043 else
8044 case $cross_compiling:$ac_tool_warned in
8045 yes:)
8046 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8047 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8048 ac_tool_warned=yes ;;
8049 esac
8050 MIG=$ac_ct_MIG
8051 fi
8052 else
8053 MIG="$ac_cv_prog_MIG"
8054 fi
8055
8056 if test x"$MIG" = x; then
8057 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8058 fi
8059 ;;
8060 esac
8061
8062 # ---------------------- #
8063 # Checks for libraries. #
8064 # ---------------------- #
8065
8066 # We might need to link with -lm; most simulators need it.
8067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8068 $as_echo_n "checking for main in -lm... " >&6; }
8069 if ${ac_cv_lib_m_main+:} false; then :
8070 $as_echo_n "(cached) " >&6
8071 else
8072 ac_check_lib_save_LIBS=$LIBS
8073 LIBS="-lm $LIBS"
8074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8075 /* end confdefs.h. */
8076
8077
8078 int
8079 main ()
8080 {
8081 return main ();
8082 ;
8083 return 0;
8084 }
8085 _ACEOF
8086 if ac_fn_c_try_link "$LINENO"; then :
8087 ac_cv_lib_m_main=yes
8088 else
8089 ac_cv_lib_m_main=no
8090 fi
8091 rm -f core conftest.err conftest.$ac_objext \
8092 conftest$ac_exeext conftest.$ac_ext
8093 LIBS=$ac_check_lib_save_LIBS
8094 fi
8095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8096 $as_echo "$ac_cv_lib_m_main" >&6; }
8097 if test "x$ac_cv_lib_m_main" = xyes; then :
8098 cat >>confdefs.h <<_ACEOF
8099 #define HAVE_LIBM 1
8100 _ACEOF
8101
8102 LIBS="-lm $LIBS"
8103
8104 fi
8105
8106
8107 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8109 $as_echo_n "checking for library containing gethostbyname... " >&6; }
8110 if ${ac_cv_search_gethostbyname+:} false; then :
8111 $as_echo_n "(cached) " >&6
8112 else
8113 ac_func_search_save_LIBS=$LIBS
8114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8115 /* end confdefs.h. */
8116
8117 /* Override any GCC internal prototype to avoid an error.
8118 Use char because int might match the return type of a GCC
8119 builtin and then its argument prototype would still apply. */
8120 #ifdef __cplusplus
8121 extern "C"
8122 #endif
8123 char gethostbyname ();
8124 int
8125 main ()
8126 {
8127 return gethostbyname ();
8128 ;
8129 return 0;
8130 }
8131 _ACEOF
8132 for ac_lib in '' nsl; do
8133 if test -z "$ac_lib"; then
8134 ac_res="none required"
8135 else
8136 ac_res=-l$ac_lib
8137 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8138 fi
8139 if ac_fn_c_try_link "$LINENO"; then :
8140 ac_cv_search_gethostbyname=$ac_res
8141 fi
8142 rm -f core conftest.err conftest.$ac_objext \
8143 conftest$ac_exeext
8144 if ${ac_cv_search_gethostbyname+:} false; then :
8145 break
8146 fi
8147 done
8148 if ${ac_cv_search_gethostbyname+:} false; then :
8149
8150 else
8151 ac_cv_search_gethostbyname=no
8152 fi
8153 rm conftest.$ac_ext
8154 LIBS=$ac_func_search_save_LIBS
8155 fi
8156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8157 $as_echo "$ac_cv_search_gethostbyname" >&6; }
8158 ac_res=$ac_cv_search_gethostbyname
8159 if test "$ac_res" != no; then :
8160 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8161
8162 fi
8163
8164
8165 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8167 $as_echo_n "checking for library containing socketpair... " >&6; }
8168 if ${ac_cv_search_socketpair+:} false; then :
8169 $as_echo_n "(cached) " >&6
8170 else
8171 ac_func_search_save_LIBS=$LIBS
8172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8173 /* end confdefs.h. */
8174
8175 /* Override any GCC internal prototype to avoid an error.
8176 Use char because int might match the return type of a GCC
8177 builtin and then its argument prototype would still apply. */
8178 #ifdef __cplusplus
8179 extern "C"
8180 #endif
8181 char socketpair ();
8182 int
8183 main ()
8184 {
8185 return socketpair ();
8186 ;
8187 return 0;
8188 }
8189 _ACEOF
8190 for ac_lib in '' socket; do
8191 if test -z "$ac_lib"; then
8192 ac_res="none required"
8193 else
8194 ac_res=-l$ac_lib
8195 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8196 fi
8197 if ac_fn_c_try_link "$LINENO"; then :
8198 ac_cv_search_socketpair=$ac_res
8199 fi
8200 rm -f core conftest.err conftest.$ac_objext \
8201 conftest$ac_exeext
8202 if ${ac_cv_search_socketpair+:} false; then :
8203 break
8204 fi
8205 done
8206 if ${ac_cv_search_socketpair+:} false; then :
8207
8208 else
8209 ac_cv_search_socketpair=no
8210 fi
8211 rm conftest.$ac_ext
8212 LIBS=$ac_func_search_save_LIBS
8213 fi
8214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8215 $as_echo "$ac_cv_search_socketpair" >&6; }
8216 ac_res=$ac_cv_search_socketpair
8217 if test "$ac_res" != no; then :
8218 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8219
8220 fi
8221
8222
8223 # Link in zlib if we can. This allows us to read compressed debug sections.
8224
8225 # Use the system's zlib library.
8226 zlibdir="-L\$(top_builddir)/../zlib"
8227 zlibinc="-I\$(top_srcdir)/../zlib"
8228
8229 # Check whether --with-system-zlib was given.
8230 if test "${with_system_zlib+set}" = set; then :
8231 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8232 zlibdir=
8233 zlibinc=
8234 fi
8235
8236 fi
8237
8238
8239
8240
8241
8242
8243 if test "X$prefix" = "XNONE"; then
8244 acl_final_prefix="$ac_default_prefix"
8245 else
8246 acl_final_prefix="$prefix"
8247 fi
8248 if test "X$exec_prefix" = "XNONE"; then
8249 acl_final_exec_prefix='${prefix}'
8250 else
8251 acl_final_exec_prefix="$exec_prefix"
8252 fi
8253 acl_save_prefix="$prefix"
8254 prefix="$acl_final_prefix"
8255 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8256 prefix="$acl_save_prefix"
8257
8258
8259 # Check whether --with-gnu-ld was given.
8260 if test "${with_gnu_ld+set}" = set; then :
8261 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8262 else
8263 with_gnu_ld=no
8264 fi
8265
8266 # Prepare PATH_SEPARATOR.
8267 # The user is always right.
8268 if test "${PATH_SEPARATOR+set}" != set; then
8269 echo "#! /bin/sh" >conf$$.sh
8270 echo "exit 0" >>conf$$.sh
8271 chmod +x conf$$.sh
8272 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8273 PATH_SEPARATOR=';'
8274 else
8275 PATH_SEPARATOR=:
8276 fi
8277 rm -f conf$$.sh
8278 fi
8279 ac_prog=ld
8280 if test "$GCC" = yes; then
8281 # Check if gcc -print-prog-name=ld gives a path.
8282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8283 $as_echo_n "checking for ld used by GCC... " >&6; }
8284 case $host in
8285 *-*-mingw*)
8286 # gcc leaves a trailing carriage return which upsets mingw
8287 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8288 *)
8289 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8290 esac
8291 case $ac_prog in
8292 # Accept absolute paths.
8293 [\\/]* | [A-Za-z]:[\\/]*)
8294 re_direlt='/[^/][^/]*/\.\./'
8295 # Canonicalize the path of ld
8296 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8297 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8298 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8299 done
8300 test -z "$LD" && LD="$ac_prog"
8301 ;;
8302 "")
8303 # If it fails, then pretend we aren't using GCC.
8304 ac_prog=ld
8305 ;;
8306 *)
8307 # If it is relative, then search for the first ld in PATH.
8308 with_gnu_ld=unknown
8309 ;;
8310 esac
8311 elif test "$with_gnu_ld" = yes; then
8312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8313 $as_echo_n "checking for GNU ld... " >&6; }
8314 else
8315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8316 $as_echo_n "checking for non-GNU ld... " >&6; }
8317 fi
8318 if ${acl_cv_path_LD+:} false; then :
8319 $as_echo_n "(cached) " >&6
8320 else
8321 if test -z "$LD"; then
8322 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8323 for ac_dir in $PATH; do
8324 test -z "$ac_dir" && ac_dir=.
8325 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8326 acl_cv_path_LD="$ac_dir/$ac_prog"
8327 # Check to see if the program is GNU ld. I'd rather use --version,
8328 # but apparently some GNU ld's only accept -v.
8329 # Break only if it was the GNU/non-GNU ld that we prefer.
8330 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8331 test "$with_gnu_ld" != no && break
8332 else
8333 test "$with_gnu_ld" != yes && break
8334 fi
8335 fi
8336 done
8337 IFS="$ac_save_ifs"
8338 else
8339 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8340 fi
8341 fi
8342
8343 LD="$acl_cv_path_LD"
8344 if test -n "$LD"; then
8345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8346 $as_echo "$LD" >&6; }
8347 else
8348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8349 $as_echo "no" >&6; }
8350 fi
8351 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8353 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8354 if ${acl_cv_prog_gnu_ld+:} false; then :
8355 $as_echo_n "(cached) " >&6
8356 else
8357 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8358 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8359 acl_cv_prog_gnu_ld=yes
8360 else
8361 acl_cv_prog_gnu_ld=no
8362 fi
8363 fi
8364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8365 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8366 with_gnu_ld=$acl_cv_prog_gnu_ld
8367
8368
8369
8370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8371 $as_echo_n "checking for shared library run path origin... " >&6; }
8372 if ${acl_cv_rpath+:} false; then :
8373 $as_echo_n "(cached) " >&6
8374 else
8375
8376 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8377 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8378 . ./conftest.sh
8379 rm -f ./conftest.sh
8380 acl_cv_rpath=done
8381
8382 fi
8383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8384 $as_echo "$acl_cv_rpath" >&6; }
8385 wl="$acl_cv_wl"
8386 libext="$acl_cv_libext"
8387 shlibext="$acl_cv_shlibext"
8388 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8389 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8390 hardcode_direct="$acl_cv_hardcode_direct"
8391 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8392 # Check whether --enable-rpath was given.
8393 if test "${enable_rpath+set}" = set; then :
8394 enableval=$enable_rpath; :
8395 else
8396 enable_rpath=yes
8397 fi
8398
8399
8400
8401
8402
8403
8404
8405
8406 use_additional=yes
8407
8408 acl_save_prefix="$prefix"
8409 prefix="$acl_final_prefix"
8410 acl_save_exec_prefix="$exec_prefix"
8411 exec_prefix="$acl_final_exec_prefix"
8412
8413 eval additional_includedir=\"$includedir\"
8414 eval additional_libdir=\"$libdir\"
8415
8416 exec_prefix="$acl_save_exec_prefix"
8417 prefix="$acl_save_prefix"
8418
8419
8420 # Check whether --with-libiconv-prefix was given.
8421 if test "${with_libiconv_prefix+set}" = set; then :
8422 withval=$with_libiconv_prefix;
8423 if test "X$withval" = "Xno"; then
8424 use_additional=no
8425 else
8426 if test "X$withval" = "X"; then
8427
8428 acl_save_prefix="$prefix"
8429 prefix="$acl_final_prefix"
8430 acl_save_exec_prefix="$exec_prefix"
8431 exec_prefix="$acl_final_exec_prefix"
8432
8433 eval additional_includedir=\"$includedir\"
8434 eval additional_libdir=\"$libdir\"
8435
8436 exec_prefix="$acl_save_exec_prefix"
8437 prefix="$acl_save_prefix"
8438
8439 else
8440 additional_includedir="$withval/include"
8441 additional_libdir="$withval/lib"
8442 fi
8443 fi
8444
8445 fi
8446
8447
8448 # Check whether --with-libiconv-type was given.
8449 if test "${with_libiconv_type+set}" = set; then :
8450 withval=$with_libiconv_type; with_libiconv_type=$withval
8451 else
8452 with_libiconv_type=auto
8453 fi
8454
8455 lib_type=`eval echo \$with_libiconv_type`
8456
8457 LIBICONV=
8458 LTLIBICONV=
8459 INCICONV=
8460 rpathdirs=
8461 ltrpathdirs=
8462 names_already_handled=
8463 names_next_round='iconv '
8464 while test -n "$names_next_round"; do
8465 names_this_round="$names_next_round"
8466 names_next_round=
8467 for name in $names_this_round; do
8468 already_handled=
8469 for n in $names_already_handled; do
8470 if test "$n" = "$name"; then
8471 already_handled=yes
8472 break
8473 fi
8474 done
8475 if test -z "$already_handled"; then
8476 names_already_handled="$names_already_handled $name"
8477 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8478 eval value=\"\$HAVE_LIB$uppername\"
8479 if test -n "$value"; then
8480 if test "$value" = yes; then
8481 eval value=\"\$LIB$uppername\"
8482 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8483 eval value=\"\$LTLIB$uppername\"
8484 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8485 else
8486 :
8487 fi
8488 else
8489 found_dir=
8490 found_la=
8491 found_so=
8492 found_a=
8493 if test $use_additional = yes; then
8494 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8495 found_dir="$additional_libdir"
8496 found_so="$additional_libdir/lib$name.$shlibext"
8497 if test -f "$additional_libdir/lib$name.la"; then
8498 found_la="$additional_libdir/lib$name.la"
8499 fi
8500 elif test x$lib_type != xshared; then
8501 if test -f "$additional_libdir/lib$name.$libext"; then
8502 found_dir="$additional_libdir"
8503 found_a="$additional_libdir/lib$name.$libext"
8504 if test -f "$additional_libdir/lib$name.la"; then
8505 found_la="$additional_libdir/lib$name.la"
8506 fi
8507 fi
8508 fi
8509 fi
8510 if test "X$found_dir" = "X"; then
8511 for x in $LDFLAGS $LTLIBICONV; do
8512
8513 acl_save_prefix="$prefix"
8514 prefix="$acl_final_prefix"
8515 acl_save_exec_prefix="$exec_prefix"
8516 exec_prefix="$acl_final_exec_prefix"
8517 eval x=\"$x\"
8518 exec_prefix="$acl_save_exec_prefix"
8519 prefix="$acl_save_prefix"
8520
8521 case "$x" in
8522 -L*)
8523 dir=`echo "X$x" | sed -e 's/^X-L//'`
8524 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8525 found_dir="$dir"
8526 found_so="$dir/lib$name.$shlibext"
8527 if test -f "$dir/lib$name.la"; then
8528 found_la="$dir/lib$name.la"
8529 fi
8530 elif test x$lib_type != xshared; then
8531 if test -f "$dir/lib$name.$libext"; then
8532 found_dir="$dir"
8533 found_a="$dir/lib$name.$libext"
8534 if test -f "$dir/lib$name.la"; then
8535 found_la="$dir/lib$name.la"
8536 fi
8537 fi
8538 fi
8539 ;;
8540 esac
8541 if test "X$found_dir" != "X"; then
8542 break
8543 fi
8544 done
8545 fi
8546 if test "X$found_dir" != "X"; then
8547 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8548 if test "X$found_so" != "X"; then
8549 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8550 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8551 else
8552 haveit=
8553 for x in $ltrpathdirs; do
8554 if test "X$x" = "X$found_dir"; then
8555 haveit=yes
8556 break
8557 fi
8558 done
8559 if test -z "$haveit"; then
8560 ltrpathdirs="$ltrpathdirs $found_dir"
8561 fi
8562 if test "$hardcode_direct" = yes; then
8563 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8564 else
8565 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8566 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8567 haveit=
8568 for x in $rpathdirs; do
8569 if test "X$x" = "X$found_dir"; then
8570 haveit=yes
8571 break
8572 fi
8573 done
8574 if test -z "$haveit"; then
8575 rpathdirs="$rpathdirs $found_dir"
8576 fi
8577 else
8578 haveit=
8579 for x in $LDFLAGS $LIBICONV; do
8580
8581 acl_save_prefix="$prefix"
8582 prefix="$acl_final_prefix"
8583 acl_save_exec_prefix="$exec_prefix"
8584 exec_prefix="$acl_final_exec_prefix"
8585 eval x=\"$x\"
8586 exec_prefix="$acl_save_exec_prefix"
8587 prefix="$acl_save_prefix"
8588
8589 if test "X$x" = "X-L$found_dir"; then
8590 haveit=yes
8591 break
8592 fi
8593 done
8594 if test -z "$haveit"; then
8595 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8596 fi
8597 if test "$hardcode_minus_L" != no; then
8598 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8599 else
8600 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8601 fi
8602 fi
8603 fi
8604 fi
8605 else
8606 if test "X$found_a" != "X"; then
8607 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8608 else
8609 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8610 fi
8611 fi
8612 additional_includedir=
8613 case "$found_dir" in
8614 */lib | */lib/)
8615 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8616 additional_includedir="$basedir/include"
8617 ;;
8618 esac
8619 if test "X$additional_includedir" != "X"; then
8620 if test "X$additional_includedir" != "X/usr/include"; then
8621 haveit=
8622 if test "X$additional_includedir" = "X/usr/local/include"; then
8623 if test -n "$GCC"; then
8624 case $host_os in
8625 linux*) haveit=yes;;
8626 esac
8627 fi
8628 fi
8629 if test -z "$haveit"; then
8630 for x in $CPPFLAGS $INCICONV; do
8631
8632 acl_save_prefix="$prefix"
8633 prefix="$acl_final_prefix"
8634 acl_save_exec_prefix="$exec_prefix"
8635 exec_prefix="$acl_final_exec_prefix"
8636 eval x=\"$x\"
8637 exec_prefix="$acl_save_exec_prefix"
8638 prefix="$acl_save_prefix"
8639
8640 if test "X$x" = "X-I$additional_includedir"; then
8641 haveit=yes
8642 break
8643 fi
8644 done
8645 if test -z "$haveit"; then
8646 if test -d "$additional_includedir"; then
8647 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8648 fi
8649 fi
8650 fi
8651 fi
8652 fi
8653 if test -n "$found_la"; then
8654 save_libdir="$libdir"
8655 case "$found_la" in
8656 */* | *\\*) . "$found_la" ;;
8657 *) . "./$found_la" ;;
8658 esac
8659 libdir="$save_libdir"
8660 for dep in $dependency_libs; do
8661 case "$dep" in
8662 -L*)
8663 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8664 if test "X$additional_libdir" != "X/usr/lib"; then
8665 haveit=
8666 if test "X$additional_libdir" = "X/usr/local/lib"; then
8667 if test -n "$GCC"; then
8668 case $host_os in
8669 linux*) haveit=yes;;
8670 esac
8671 fi
8672 fi
8673 if test -z "$haveit"; then
8674 haveit=
8675 for x in $LDFLAGS $LIBICONV; do
8676
8677 acl_save_prefix="$prefix"
8678 prefix="$acl_final_prefix"
8679 acl_save_exec_prefix="$exec_prefix"
8680 exec_prefix="$acl_final_exec_prefix"
8681 eval x=\"$x\"
8682 exec_prefix="$acl_save_exec_prefix"
8683 prefix="$acl_save_prefix"
8684
8685 if test "X$x" = "X-L$additional_libdir"; then
8686 haveit=yes
8687 break
8688 fi
8689 done
8690 if test -z "$haveit"; then
8691 if test -d "$additional_libdir"; then
8692 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8693 fi
8694 fi
8695 haveit=
8696 for x in $LDFLAGS $LTLIBICONV; do
8697
8698 acl_save_prefix="$prefix"
8699 prefix="$acl_final_prefix"
8700 acl_save_exec_prefix="$exec_prefix"
8701 exec_prefix="$acl_final_exec_prefix"
8702 eval x=\"$x\"
8703 exec_prefix="$acl_save_exec_prefix"
8704 prefix="$acl_save_prefix"
8705
8706 if test "X$x" = "X-L$additional_libdir"; then
8707 haveit=yes
8708 break
8709 fi
8710 done
8711 if test -z "$haveit"; then
8712 if test -d "$additional_libdir"; then
8713 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8714 fi
8715 fi
8716 fi
8717 fi
8718 ;;
8719 -R*)
8720 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8721 if test "$enable_rpath" != no; then
8722 haveit=
8723 for x in $rpathdirs; do
8724 if test "X$x" = "X$dir"; then
8725 haveit=yes
8726 break
8727 fi
8728 done
8729 if test -z "$haveit"; then
8730 rpathdirs="$rpathdirs $dir"
8731 fi
8732 haveit=
8733 for x in $ltrpathdirs; do
8734 if test "X$x" = "X$dir"; then
8735 haveit=yes
8736 break
8737 fi
8738 done
8739 if test -z "$haveit"; then
8740 ltrpathdirs="$ltrpathdirs $dir"
8741 fi
8742 fi
8743 ;;
8744 -l*)
8745 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8746 ;;
8747 *.la)
8748 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8749 ;;
8750 *)
8751 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8752 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8753 ;;
8754 esac
8755 done
8756 fi
8757 else
8758 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8759 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8760 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8761 else
8762 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8763 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8764 fi
8765 fi
8766 fi
8767 fi
8768 done
8769 done
8770 if test "X$rpathdirs" != "X"; then
8771 if test -n "$hardcode_libdir_separator"; then
8772 alldirs=
8773 for found_dir in $rpathdirs; do
8774 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8775 done
8776 acl_save_libdir="$libdir"
8777 libdir="$alldirs"
8778 eval flag=\"$hardcode_libdir_flag_spec\"
8779 libdir="$acl_save_libdir"
8780 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8781 else
8782 for found_dir in $rpathdirs; do
8783 acl_save_libdir="$libdir"
8784 libdir="$found_dir"
8785 eval flag=\"$hardcode_libdir_flag_spec\"
8786 libdir="$acl_save_libdir"
8787 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8788 done
8789 fi
8790 fi
8791 if test "X$ltrpathdirs" != "X"; then
8792 for found_dir in $ltrpathdirs; do
8793 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8794 done
8795 fi
8796
8797
8798
8799
8800
8801
8802
8803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8804 $as_echo_n "checking for iconv... " >&6; }
8805 if ${am_cv_func_iconv+:} false; then :
8806 $as_echo_n "(cached) " >&6
8807 else
8808
8809 am_cv_func_iconv="no, consider installing GNU libiconv"
8810 am_cv_lib_iconv=no
8811 am_save_CPPFLAGS="$CPPFLAGS"
8812 CPPFLAGS="$CPPFLAGS $INCICONV"
8813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8814 /* end confdefs.h. */
8815 #include <stdlib.h>
8816 #include <iconv.h>
8817 int
8818 main ()
8819 {
8820 iconv_t cd = iconv_open("","");
8821 iconv(cd,NULL,NULL,NULL,NULL);
8822 iconv_close(cd);
8823 ;
8824 return 0;
8825 }
8826 _ACEOF
8827 if ac_fn_c_try_link "$LINENO"; then :
8828 am_cv_func_iconv=yes
8829 fi
8830 rm -f core conftest.err conftest.$ac_objext \
8831 conftest$ac_exeext conftest.$ac_ext
8832 CPPFLAGS="$am_save_CPPFLAGS"
8833
8834 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8835 for _libs in .libs _libs; do
8836 am_save_CPPFLAGS="$CPPFLAGS"
8837 am_save_LIBS="$LIBS"
8838 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8839 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8841 /* end confdefs.h. */
8842 #include <stdlib.h>
8843 #include <iconv.h>
8844 int
8845 main ()
8846 {
8847 iconv_t cd = iconv_open("","");
8848 iconv(cd,NULL,NULL,NULL,NULL);
8849 iconv_close(cd);
8850 ;
8851 return 0;
8852 }
8853 _ACEOF
8854 if ac_fn_c_try_link "$LINENO"; then :
8855 INCICONV="-I../libiconv/include"
8856 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8857 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8858 am_cv_lib_iconv=yes
8859 am_cv_func_iconv=yes
8860 fi
8861 rm -f core conftest.err conftest.$ac_objext \
8862 conftest$ac_exeext conftest.$ac_ext
8863 CPPFLAGS="$am_save_CPPFLAGS"
8864 LIBS="$am_save_LIBS"
8865 if test "$am_cv_func_iconv" = "yes"; then
8866 break
8867 fi
8868 done
8869 fi
8870
8871 if test "$am_cv_func_iconv" != yes; then
8872 am_save_CPPFLAGS="$CPPFLAGS"
8873 am_save_LIBS="$LIBS"
8874 CPPFLAGS="$CPPFLAGS $INCICONV"
8875 LIBS="$LIBS $LIBICONV"
8876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8877 /* end confdefs.h. */
8878 #include <stdlib.h>
8879 #include <iconv.h>
8880 int
8881 main ()
8882 {
8883 iconv_t cd = iconv_open("","");
8884 iconv(cd,NULL,NULL,NULL,NULL);
8885 iconv_close(cd);
8886 ;
8887 return 0;
8888 }
8889 _ACEOF
8890 if ac_fn_c_try_link "$LINENO"; then :
8891 am_cv_lib_iconv=yes
8892 am_cv_func_iconv=yes
8893 fi
8894 rm -f core conftest.err conftest.$ac_objext \
8895 conftest$ac_exeext conftest.$ac_ext
8896 CPPFLAGS="$am_save_CPPFLAGS"
8897 LIBS="$am_save_LIBS"
8898 fi
8899
8900 fi
8901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8902 $as_echo "$am_cv_func_iconv" >&6; }
8903 if test "$am_cv_func_iconv" = yes; then
8904
8905 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8906
8907 fi
8908 if test "$am_cv_lib_iconv" = yes; then
8909
8910 for element in $INCICONV; do
8911 haveit=
8912 for x in $CPPFLAGS; do
8913
8914 acl_save_prefix="$prefix"
8915 prefix="$acl_final_prefix"
8916 acl_save_exec_prefix="$exec_prefix"
8917 exec_prefix="$acl_final_exec_prefix"
8918 eval x=\"$x\"
8919 exec_prefix="$acl_save_exec_prefix"
8920 prefix="$acl_save_prefix"
8921
8922 if test "X$x" = "X$element"; then
8923 haveit=yes
8924 break
8925 fi
8926 done
8927 if test -z "$haveit"; then
8928 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8929 fi
8930 done
8931
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8933 $as_echo_n "checking how to link with libiconv... " >&6; }
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8935 $as_echo "$LIBICONV" >&6; }
8936 else
8937 LIBICONV=
8938 LTLIBICONV=
8939 fi
8940
8941
8942
8943 if test "$am_cv_func_iconv" = yes; then
8944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8945 $as_echo_n "checking for iconv declaration... " >&6; }
8946 if ${am_cv_proto_iconv+:} false; then :
8947 $as_echo_n "(cached) " >&6
8948 else
8949
8950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8951 /* end confdefs.h. */
8952
8953 #include <stdlib.h>
8954 #include <iconv.h>
8955 extern
8956 #ifdef __cplusplus
8957 "C"
8958 #endif
8959 #if defined(__STDC__) || defined(__cplusplus)
8960 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8961 #else
8962 size_t iconv();
8963 #endif
8964
8965 int
8966 main ()
8967 {
8968
8969 ;
8970 return 0;
8971 }
8972 _ACEOF
8973 if ac_fn_c_try_compile "$LINENO"; then :
8974 am_cv_proto_iconv_arg1=""
8975 else
8976 am_cv_proto_iconv_arg1="const"
8977 fi
8978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8979 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);"
8980 fi
8981
8982 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8984 }$am_cv_proto_iconv" >&5
8985 $as_echo "${ac_t:-
8986 }$am_cv_proto_iconv" >&6; }
8987
8988 cat >>confdefs.h <<_ACEOF
8989 #define ICONV_CONST $am_cv_proto_iconv_arg1
8990 _ACEOF
8991
8992 fi
8993
8994
8995 # GDB may fork/exec the iconv program to get the list of supported character
8996 # sets. Allow the user to specify where to find it.
8997 # There are several factors affecting the choice of option name:
8998 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8999 # the build-time location of libiconv files.
9000 # - The program we need to find is iconv, which comes with glibc. The user
9001 # doesn't necessarily have libiconv installed. Therefore naming this
9002 # --with-libiconv-foo feels wrong.
9003 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9004 # defined to work on directories not files (though it really doesn't know
9005 # the difference).
9006 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
9007 # with --with-libiconv-prefix.
9008 # Putting these together is why the option name is --with-iconv-bin.
9009
9010
9011 # Check whether --with-iconv-bin was given.
9012 if test "${with_iconv_bin+set}" = set; then :
9013 withval=$with_iconv_bin; iconv_bin="${withval}"
9014
9015 cat >>confdefs.h <<_ACEOF
9016 #define ICONV_BIN "${iconv_bin}"
9017 _ACEOF
9018
9019
9020 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9021 if test "x$prefix" = xNONE; then
9022 test_prefix=/usr/local
9023 else
9024 test_prefix=$prefix
9025 fi
9026 else
9027 test_prefix=$exec_prefix
9028 fi
9029 value=0
9030 case ${iconv_bin} in
9031 "${test_prefix}"|"${test_prefix}/"*|\
9032 '${exec_prefix}'|'${exec_prefix}/'*)
9033 value=1
9034 ;;
9035 esac
9036
9037 cat >>confdefs.h <<_ACEOF
9038 #define ICONV_BIN_RELOCATABLE $value
9039 _ACEOF
9040
9041
9042
9043 fi
9044
9045
9046 # For the TUI, we need enhanced curses functionality.
9047 if test x"$enable_tui" != xno; then
9048 prefer_curses=yes
9049 fi
9050
9051 curses_found=no
9052 if test x"$prefer_curses" = xyes; then
9053 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9054 # curses library because the latter might not provide all the
9055 # functionality we need. However, this leads to problems on systems
9056 # where the linker searches /usr/local/lib, but the compiler doesn't
9057 # search /usr/local/include, if ncurses is installed in /usr/local. A
9058 # default installation of ncurses on alpha*-dec-osf* will lead to such
9059 # a situation.
9060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9061 $as_echo_n "checking for library containing waddstr... " >&6; }
9062 if ${ac_cv_search_waddstr+:} false; then :
9063 $as_echo_n "(cached) " >&6
9064 else
9065 ac_func_search_save_LIBS=$LIBS
9066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9067 /* end confdefs.h. */
9068
9069 /* Override any GCC internal prototype to avoid an error.
9070 Use char because int might match the return type of a GCC
9071 builtin and then its argument prototype would still apply. */
9072 #ifdef __cplusplus
9073 extern "C"
9074 #endif
9075 char waddstr ();
9076 int
9077 main ()
9078 {
9079 return waddstr ();
9080 ;
9081 return 0;
9082 }
9083 _ACEOF
9084 for ac_lib in '' ncursesw ncurses cursesX curses; do
9085 if test -z "$ac_lib"; then
9086 ac_res="none required"
9087 else
9088 ac_res=-l$ac_lib
9089 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9090 fi
9091 if ac_fn_c_try_link "$LINENO"; then :
9092 ac_cv_search_waddstr=$ac_res
9093 fi
9094 rm -f core conftest.err conftest.$ac_objext \
9095 conftest$ac_exeext
9096 if ${ac_cv_search_waddstr+:} false; then :
9097 break
9098 fi
9099 done
9100 if ${ac_cv_search_waddstr+:} false; then :
9101
9102 else
9103 ac_cv_search_waddstr=no
9104 fi
9105 rm conftest.$ac_ext
9106 LIBS=$ac_func_search_save_LIBS
9107 fi
9108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9109 $as_echo "$ac_cv_search_waddstr" >&6; }
9110 ac_res=$ac_cv_search_waddstr
9111 if test "$ac_res" != no; then :
9112 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9113
9114 fi
9115
9116
9117 if test "$ac_cv_search_waddstr" != no; then
9118 curses_found=yes
9119 fi
9120 fi
9121
9122 # Check whether we should enable the TUI, but only do so if we really
9123 # can.
9124 if test x"$enable_tui" != xno; then
9125 if test -d "$srcdir/tui"; then
9126 if test "$curses_found" != no; then
9127 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9128 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9129 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9130 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9131 else
9132 if test x"$enable_tui" = xyes; then
9133 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9134 else
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9136 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9137 fi
9138 fi
9139 fi
9140 fi
9141
9142 # Since GDB uses Readline, we need termcap functionality. In many
9143 # cases this will be provided by the curses library, but some systems
9144 # have a separate termcap library, or no curses library at all.
9145
9146 case $host_os in
9147 cygwin*)
9148 if test -d "$srcdir/libtermcap"; then
9149 LIBS="../libtermcap/libtermcap.a $LIBS"
9150 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9151 fi ;;
9152 go32* | *djgpp*)
9153 ac_cv_search_tgetent="none required"
9154 ;;
9155 esac
9156
9157 # These are the libraries checked by Readline.
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9159 $as_echo_n "checking for library containing tgetent... " >&6; }
9160 if ${ac_cv_search_tgetent+:} false; then :
9161 $as_echo_n "(cached) " >&6
9162 else
9163 ac_func_search_save_LIBS=$LIBS
9164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9165 /* end confdefs.h. */
9166
9167 /* Override any GCC internal prototype to avoid an error.
9168 Use char because int might match the return type of a GCC
9169 builtin and then its argument prototype would still apply. */
9170 #ifdef __cplusplus
9171 extern "C"
9172 #endif
9173 char tgetent ();
9174 int
9175 main ()
9176 {
9177 return tgetent ();
9178 ;
9179 return 0;
9180 }
9181 _ACEOF
9182 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9183 if test -z "$ac_lib"; then
9184 ac_res="none required"
9185 else
9186 ac_res=-l$ac_lib
9187 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9188 fi
9189 if ac_fn_c_try_link "$LINENO"; then :
9190 ac_cv_search_tgetent=$ac_res
9191 fi
9192 rm -f core conftest.err conftest.$ac_objext \
9193 conftest$ac_exeext
9194 if ${ac_cv_search_tgetent+:} false; then :
9195 break
9196 fi
9197 done
9198 if ${ac_cv_search_tgetent+:} false; then :
9199
9200 else
9201 ac_cv_search_tgetent=no
9202 fi
9203 rm conftest.$ac_ext
9204 LIBS=$ac_func_search_save_LIBS
9205 fi
9206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9207 $as_echo "$ac_cv_search_tgetent" >&6; }
9208 ac_res=$ac_cv_search_tgetent
9209 if test "$ac_res" != no; then :
9210 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9211
9212 fi
9213
9214
9215 if test "$ac_cv_search_tgetent" = no; then
9216 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9217 fi
9218
9219
9220 # Check whether --with-system-readline was given.
9221 if test "${with_system_readline+set}" = set; then :
9222 withval=$with_system_readline;
9223 fi
9224
9225
9226 if test "$with_system_readline" = yes; then
9227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9228 $as_echo_n "checking whether system readline is new enough... " >&6; }
9229 if ${gdb_cv_readline_ok+:} false; then :
9230 $as_echo_n "(cached) " >&6
9231 else
9232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9233 /* end confdefs.h. */
9234 #include <stdio.h>
9235 #include <readline/readline.h>
9236 int
9237 main ()
9238 {
9239 #if RL_VERSION_MAJOR < 7
9240 # error "readline version 7 required"
9241 #endif
9242
9243 ;
9244 return 0;
9245 }
9246 _ACEOF
9247 if ac_fn_c_try_compile "$LINENO"; then :
9248 gdb_cv_readline_ok=yes
9249 else
9250 gdb_cv_readline_ok=no
9251
9252 fi
9253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9254
9255 fi
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9257 $as_echo "$gdb_cv_readline_ok" >&6; }
9258 if test "$gdb_cv_readline_ok" != yes; then
9259 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9260 fi
9261
9262 READLINE=-lreadline
9263 READLINE_DEPS=
9264 READLINE_CFLAGS=
9265 READLINE_TEXI_INCFLAG=
9266 else
9267 READLINE='$(READLINE_DIR)/libreadline.a'
9268 READLINE_DEPS='$(READLINE)'
9269 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9270 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9271 fi
9272
9273
9274
9275
9276
9277 # Generate jit-reader.h
9278
9279 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9280 TARGET_PTR=
9281
9282 # The cast to long int works around a bug in the HP C Compiler
9283 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9284 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9285 # This bug is HP SR number 8606223364.
9286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9287 $as_echo_n "checking size of unsigned long long... " >&6; }
9288 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9289 $as_echo_n "(cached) " >&6
9290 else
9291 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9292
9293 else
9294 if test "$ac_cv_type_unsigned_long_long" = yes; then
9295 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9296 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9297 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9298 See \`config.log' for more details" "$LINENO" 5; }
9299 else
9300 ac_cv_sizeof_unsigned_long_long=0
9301 fi
9302 fi
9303
9304 fi
9305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9306 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9307
9308
9309
9310 cat >>confdefs.h <<_ACEOF
9311 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9312 _ACEOF
9313
9314
9315 # The cast to long int works around a bug in the HP C Compiler
9316 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9317 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9318 # This bug is HP SR number 8606223364.
9319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9320 $as_echo_n "checking size of unsigned long... " >&6; }
9321 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9322 $as_echo_n "(cached) " >&6
9323 else
9324 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9325
9326 else
9327 if test "$ac_cv_type_unsigned_long" = yes; then
9328 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9329 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9330 as_fn_error 77 "cannot compute sizeof (unsigned long)
9331 See \`config.log' for more details" "$LINENO" 5; }
9332 else
9333 ac_cv_sizeof_unsigned_long=0
9334 fi
9335 fi
9336
9337 fi
9338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9339 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9340
9341
9342
9343 cat >>confdefs.h <<_ACEOF
9344 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9345 _ACEOF
9346
9347
9348 # The cast to long int works around a bug in the HP C Compiler
9349 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9350 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9351 # This bug is HP SR number 8606223364.
9352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9353 $as_echo_n "checking size of unsigned __int128... " >&6; }
9354 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9355 $as_echo_n "(cached) " >&6
9356 else
9357 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9358
9359 else
9360 if test "$ac_cv_type_unsigned___int128" = yes; then
9361 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9362 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9363 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9364 See \`config.log' for more details" "$LINENO" 5; }
9365 else
9366 ac_cv_sizeof_unsigned___int128=0
9367 fi
9368 fi
9369
9370 fi
9371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9372 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9373
9374
9375
9376 cat >>confdefs.h <<_ACEOF
9377 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9378 _ACEOF
9379
9380
9381
9382 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9383 TARGET_PTR="unsigned long"
9384 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9385 TARGET_PTR="unsigned long long"
9386 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9387 TARGET_PTR="unsigned __int128"
9388 else
9389 TARGET_PTR="unsigned long"
9390 fi
9391
9392
9393 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9394
9395
9396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9397 $as_echo_n "checking for library containing dlopen... " >&6; }
9398 if ${ac_cv_search_dlopen+:} false; then :
9399 $as_echo_n "(cached) " >&6
9400 else
9401 ac_func_search_save_LIBS=$LIBS
9402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9403 /* end confdefs.h. */
9404
9405 /* Override any GCC internal prototype to avoid an error.
9406 Use char because int might match the return type of a GCC
9407 builtin and then its argument prototype would still apply. */
9408 #ifdef __cplusplus
9409 extern "C"
9410 #endif
9411 char dlopen ();
9412 int
9413 main ()
9414 {
9415 return dlopen ();
9416 ;
9417 return 0;
9418 }
9419 _ACEOF
9420 for ac_lib in '' dl; do
9421 if test -z "$ac_lib"; then
9422 ac_res="none required"
9423 else
9424 ac_res=-l$ac_lib
9425 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9426 fi
9427 if ac_fn_c_try_link "$LINENO"; then :
9428 ac_cv_search_dlopen=$ac_res
9429 fi
9430 rm -f core conftest.err conftest.$ac_objext \
9431 conftest$ac_exeext
9432 if ${ac_cv_search_dlopen+:} false; then :
9433 break
9434 fi
9435 done
9436 if ${ac_cv_search_dlopen+:} false; then :
9437
9438 else
9439 ac_cv_search_dlopen=no
9440 fi
9441 rm conftest.$ac_ext
9442 LIBS=$ac_func_search_save_LIBS
9443 fi
9444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9445 $as_echo "$ac_cv_search_dlopen" >&6; }
9446 ac_res=$ac_cv_search_dlopen
9447 if test "$ac_res" != no; then :
9448 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9449
9450 fi
9451
9452
9453
9454
9455 # Check whether --with-jit-reader-dir was given.
9456 if test "${with_jit_reader_dir+set}" = set; then :
9457 withval=$with_jit_reader_dir;
9458 JIT_READER_DIR=$withval
9459 else
9460 JIT_READER_DIR=${libdir}/gdb
9461 fi
9462
9463
9464 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9465 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9466 ac_define_dir=`eval echo $JIT_READER_DIR`
9467 ac_define_dir=`eval echo $ac_define_dir`
9468
9469 cat >>confdefs.h <<_ACEOF
9470 #define JIT_READER_DIR "$ac_define_dir"
9471 _ACEOF
9472
9473
9474
9475
9476 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9477 if test "x$prefix" = xNONE; then
9478 test_prefix=/usr/local
9479 else
9480 test_prefix=$prefix
9481 fi
9482 else
9483 test_prefix=$exec_prefix
9484 fi
9485 value=0
9486 case ${ac_define_dir} in
9487 "${test_prefix}"|"${test_prefix}/"*|\
9488 '${exec_prefix}'|'${exec_prefix}/'*)
9489 value=1
9490 ;;
9491 esac
9492
9493 cat >>confdefs.h <<_ACEOF
9494 #define JIT_READER_DIR_RELOCATABLE $value
9495 _ACEOF
9496
9497
9498
9499
9500
9501 # Check whether --with-expat was given.
9502 if test "${with_expat+set}" = set; then :
9503 withval=$with_expat;
9504 else
9505 with_expat=auto
9506 fi
9507
9508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9509 $as_echo_n "checking whether to use expat... " >&6; }
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9511 $as_echo "$with_expat" >&6; }
9512
9513 if test "${with_expat}" = no; then
9514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9515 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9516 HAVE_LIBEXPAT=no
9517 else
9518
9519
9520
9521
9522
9523
9524
9525
9526 use_additional=yes
9527
9528 acl_save_prefix="$prefix"
9529 prefix="$acl_final_prefix"
9530 acl_save_exec_prefix="$exec_prefix"
9531 exec_prefix="$acl_final_exec_prefix"
9532
9533 eval additional_includedir=\"$includedir\"
9534 eval additional_libdir=\"$libdir\"
9535
9536 exec_prefix="$acl_save_exec_prefix"
9537 prefix="$acl_save_prefix"
9538
9539
9540 # Check whether --with-libexpat-prefix was given.
9541 if test "${with_libexpat_prefix+set}" = set; then :
9542 withval=$with_libexpat_prefix;
9543 if test "X$withval" = "Xno"; then
9544 use_additional=no
9545 else
9546 if test "X$withval" = "X"; then
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 else
9560 additional_includedir="$withval/include"
9561 additional_libdir="$withval/lib"
9562 fi
9563 fi
9564
9565 fi
9566
9567
9568 # Check whether --with-libexpat-type was given.
9569 if test "${with_libexpat_type+set}" = set; then :
9570 withval=$with_libexpat_type; with_libexpat_type=$withval
9571 else
9572 with_libexpat_type=auto
9573 fi
9574
9575 lib_type=`eval echo \$with_libexpat_type`
9576
9577 LIBEXPAT=
9578 LTLIBEXPAT=
9579 INCEXPAT=
9580 rpathdirs=
9581 ltrpathdirs=
9582 names_already_handled=
9583 names_next_round='expat '
9584 while test -n "$names_next_round"; do
9585 names_this_round="$names_next_round"
9586 names_next_round=
9587 for name in $names_this_round; do
9588 already_handled=
9589 for n in $names_already_handled; do
9590 if test "$n" = "$name"; then
9591 already_handled=yes
9592 break
9593 fi
9594 done
9595 if test -z "$already_handled"; then
9596 names_already_handled="$names_already_handled $name"
9597 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9598 eval value=\"\$HAVE_LIB$uppername\"
9599 if test -n "$value"; then
9600 if test "$value" = yes; then
9601 eval value=\"\$LIB$uppername\"
9602 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9603 eval value=\"\$LTLIB$uppername\"
9604 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9605 else
9606 :
9607 fi
9608 else
9609 found_dir=
9610 found_la=
9611 found_so=
9612 found_a=
9613 if test $use_additional = yes; then
9614 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9615 found_dir="$additional_libdir"
9616 found_so="$additional_libdir/lib$name.$shlibext"
9617 if test -f "$additional_libdir/lib$name.la"; then
9618 found_la="$additional_libdir/lib$name.la"
9619 fi
9620 elif test x$lib_type != xshared; then
9621 if test -f "$additional_libdir/lib$name.$libext"; then
9622 found_dir="$additional_libdir"
9623 found_a="$additional_libdir/lib$name.$libext"
9624 if test -f "$additional_libdir/lib$name.la"; then
9625 found_la="$additional_libdir/lib$name.la"
9626 fi
9627 fi
9628 fi
9629 fi
9630 if test "X$found_dir" = "X"; then
9631 for x in $LDFLAGS $LTLIBEXPAT; do
9632
9633 acl_save_prefix="$prefix"
9634 prefix="$acl_final_prefix"
9635 acl_save_exec_prefix="$exec_prefix"
9636 exec_prefix="$acl_final_exec_prefix"
9637 eval x=\"$x\"
9638 exec_prefix="$acl_save_exec_prefix"
9639 prefix="$acl_save_prefix"
9640
9641 case "$x" in
9642 -L*)
9643 dir=`echo "X$x" | sed -e 's/^X-L//'`
9644 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9645 found_dir="$dir"
9646 found_so="$dir/lib$name.$shlibext"
9647 if test -f "$dir/lib$name.la"; then
9648 found_la="$dir/lib$name.la"
9649 fi
9650 elif test x$lib_type != xshared; then
9651 if test -f "$dir/lib$name.$libext"; then
9652 found_dir="$dir"
9653 found_a="$dir/lib$name.$libext"
9654 if test -f "$dir/lib$name.la"; then
9655 found_la="$dir/lib$name.la"
9656 fi
9657 fi
9658 fi
9659 ;;
9660 esac
9661 if test "X$found_dir" != "X"; then
9662 break
9663 fi
9664 done
9665 fi
9666 if test "X$found_dir" != "X"; then
9667 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9668 if test "X$found_so" != "X"; then
9669 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9670 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9671 else
9672 haveit=
9673 for x in $ltrpathdirs; do
9674 if test "X$x" = "X$found_dir"; then
9675 haveit=yes
9676 break
9677 fi
9678 done
9679 if test -z "$haveit"; then
9680 ltrpathdirs="$ltrpathdirs $found_dir"
9681 fi
9682 if test "$hardcode_direct" = yes; then
9683 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9684 else
9685 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9686 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9687 haveit=
9688 for x in $rpathdirs; do
9689 if test "X$x" = "X$found_dir"; then
9690 haveit=yes
9691 break
9692 fi
9693 done
9694 if test -z "$haveit"; then
9695 rpathdirs="$rpathdirs $found_dir"
9696 fi
9697 else
9698 haveit=
9699 for x in $LDFLAGS $LIBEXPAT; do
9700
9701 acl_save_prefix="$prefix"
9702 prefix="$acl_final_prefix"
9703 acl_save_exec_prefix="$exec_prefix"
9704 exec_prefix="$acl_final_exec_prefix"
9705 eval x=\"$x\"
9706 exec_prefix="$acl_save_exec_prefix"
9707 prefix="$acl_save_prefix"
9708
9709 if test "X$x" = "X-L$found_dir"; then
9710 haveit=yes
9711 break
9712 fi
9713 done
9714 if test -z "$haveit"; then
9715 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9716 fi
9717 if test "$hardcode_minus_L" != no; then
9718 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9719 else
9720 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9721 fi
9722 fi
9723 fi
9724 fi
9725 else
9726 if test "X$found_a" != "X"; then
9727 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9728 else
9729 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9730 fi
9731 fi
9732 additional_includedir=
9733 case "$found_dir" in
9734 */lib | */lib/)
9735 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9736 additional_includedir="$basedir/include"
9737 ;;
9738 esac
9739 if test "X$additional_includedir" != "X"; then
9740 if test "X$additional_includedir" != "X/usr/include"; then
9741 haveit=
9742 if test "X$additional_includedir" = "X/usr/local/include"; then
9743 if test -n "$GCC"; then
9744 case $host_os in
9745 linux*) haveit=yes;;
9746 esac
9747 fi
9748 fi
9749 if test -z "$haveit"; then
9750 for x in $CPPFLAGS $INCEXPAT; do
9751
9752 acl_save_prefix="$prefix"
9753 prefix="$acl_final_prefix"
9754 acl_save_exec_prefix="$exec_prefix"
9755 exec_prefix="$acl_final_exec_prefix"
9756 eval x=\"$x\"
9757 exec_prefix="$acl_save_exec_prefix"
9758 prefix="$acl_save_prefix"
9759
9760 if test "X$x" = "X-I$additional_includedir"; then
9761 haveit=yes
9762 break
9763 fi
9764 done
9765 if test -z "$haveit"; then
9766 if test -d "$additional_includedir"; then
9767 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9768 fi
9769 fi
9770 fi
9771 fi
9772 fi
9773 if test -n "$found_la"; then
9774 save_libdir="$libdir"
9775 case "$found_la" in
9776 */* | *\\*) . "$found_la" ;;
9777 *) . "./$found_la" ;;
9778 esac
9779 libdir="$save_libdir"
9780 for dep in $dependency_libs; do
9781 case "$dep" in
9782 -L*)
9783 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9784 if test "X$additional_libdir" != "X/usr/lib"; then
9785 haveit=
9786 if test "X$additional_libdir" = "X/usr/local/lib"; then
9787 if test -n "$GCC"; then
9788 case $host_os in
9789 linux*) haveit=yes;;
9790 esac
9791 fi
9792 fi
9793 if test -z "$haveit"; then
9794 haveit=
9795 for x in $LDFLAGS $LIBEXPAT; do
9796
9797 acl_save_prefix="$prefix"
9798 prefix="$acl_final_prefix"
9799 acl_save_exec_prefix="$exec_prefix"
9800 exec_prefix="$acl_final_exec_prefix"
9801 eval x=\"$x\"
9802 exec_prefix="$acl_save_exec_prefix"
9803 prefix="$acl_save_prefix"
9804
9805 if test "X$x" = "X-L$additional_libdir"; then
9806 haveit=yes
9807 break
9808 fi
9809 done
9810 if test -z "$haveit"; then
9811 if test -d "$additional_libdir"; then
9812 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9813 fi
9814 fi
9815 haveit=
9816 for x in $LDFLAGS $LTLIBEXPAT; do
9817
9818 acl_save_prefix="$prefix"
9819 prefix="$acl_final_prefix"
9820 acl_save_exec_prefix="$exec_prefix"
9821 exec_prefix="$acl_final_exec_prefix"
9822 eval x=\"$x\"
9823 exec_prefix="$acl_save_exec_prefix"
9824 prefix="$acl_save_prefix"
9825
9826 if test "X$x" = "X-L$additional_libdir"; then
9827 haveit=yes
9828 break
9829 fi
9830 done
9831 if test -z "$haveit"; then
9832 if test -d "$additional_libdir"; then
9833 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9834 fi
9835 fi
9836 fi
9837 fi
9838 ;;
9839 -R*)
9840 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9841 if test "$enable_rpath" != no; then
9842 haveit=
9843 for x in $rpathdirs; do
9844 if test "X$x" = "X$dir"; then
9845 haveit=yes
9846 break
9847 fi
9848 done
9849 if test -z "$haveit"; then
9850 rpathdirs="$rpathdirs $dir"
9851 fi
9852 haveit=
9853 for x in $ltrpathdirs; do
9854 if test "X$x" = "X$dir"; then
9855 haveit=yes
9856 break
9857 fi
9858 done
9859 if test -z "$haveit"; then
9860 ltrpathdirs="$ltrpathdirs $dir"
9861 fi
9862 fi
9863 ;;
9864 -l*)
9865 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9866 ;;
9867 *.la)
9868 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9869 ;;
9870 *)
9871 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9872 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9873 ;;
9874 esac
9875 done
9876 fi
9877 else
9878 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9879 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9880 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9881 else
9882 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9883 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9884 fi
9885 fi
9886 fi
9887 fi
9888 done
9889 done
9890 if test "X$rpathdirs" != "X"; then
9891 if test -n "$hardcode_libdir_separator"; then
9892 alldirs=
9893 for found_dir in $rpathdirs; do
9894 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9895 done
9896 acl_save_libdir="$libdir"
9897 libdir="$alldirs"
9898 eval flag=\"$hardcode_libdir_flag_spec\"
9899 libdir="$acl_save_libdir"
9900 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9901 else
9902 for found_dir in $rpathdirs; do
9903 acl_save_libdir="$libdir"
9904 libdir="$found_dir"
9905 eval flag=\"$hardcode_libdir_flag_spec\"
9906 libdir="$acl_save_libdir"
9907 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9908 done
9909 fi
9910 fi
9911 if test "X$ltrpathdirs" != "X"; then
9912 for found_dir in $ltrpathdirs; do
9913 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9914 done
9915 fi
9916
9917
9918 ac_save_CPPFLAGS="$CPPFLAGS"
9919
9920 for element in $INCEXPAT; do
9921 haveit=
9922 for x in $CPPFLAGS; do
9923
9924 acl_save_prefix="$prefix"
9925 prefix="$acl_final_prefix"
9926 acl_save_exec_prefix="$exec_prefix"
9927 exec_prefix="$acl_final_exec_prefix"
9928 eval x=\"$x\"
9929 exec_prefix="$acl_save_exec_prefix"
9930 prefix="$acl_save_prefix"
9931
9932 if test "X$x" = "X$element"; then
9933 haveit=yes
9934 break
9935 fi
9936 done
9937 if test -z "$haveit"; then
9938 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9939 fi
9940 done
9941
9942
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9944 $as_echo_n "checking for libexpat... " >&6; }
9945 if ${ac_cv_libexpat+:} false; then :
9946 $as_echo_n "(cached) " >&6
9947 else
9948
9949 ac_save_LIBS="$LIBS"
9950 LIBS="$LIBS $LIBEXPAT"
9951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9952 /* end confdefs.h. */
9953 #include "expat.h"
9954 int
9955 main ()
9956 {
9957 XML_Parser p = XML_ParserCreate (0);
9958 ;
9959 return 0;
9960 }
9961 _ACEOF
9962 if ac_fn_c_try_link "$LINENO"; then :
9963 ac_cv_libexpat=yes
9964 else
9965 ac_cv_libexpat=no
9966 fi
9967 rm -f core conftest.err conftest.$ac_objext \
9968 conftest$ac_exeext conftest.$ac_ext
9969 LIBS="$ac_save_LIBS"
9970
9971 fi
9972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9973 $as_echo "$ac_cv_libexpat" >&6; }
9974 if test "$ac_cv_libexpat" = yes; then
9975 HAVE_LIBEXPAT=yes
9976
9977 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9978
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9980 $as_echo_n "checking how to link with libexpat... " >&6; }
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9982 $as_echo "$LIBEXPAT" >&6; }
9983 else
9984 HAVE_LIBEXPAT=no
9985 CPPFLAGS="$ac_save_CPPFLAGS"
9986 LIBEXPAT=
9987 LTLIBEXPAT=
9988 fi
9989
9990
9991
9992
9993
9994
9995 if test "$HAVE_LIBEXPAT" != yes; then
9996 if test "$with_expat" = yes; then
9997 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9998 else
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10000 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10001 fi
10002 else
10003 save_LIBS=$LIBS
10004 LIBS="$LIBS $LIBEXPAT"
10005 for ac_func in XML_StopParser
10006 do :
10007 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10008 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
10009 cat >>confdefs.h <<_ACEOF
10010 #define HAVE_XML_STOPPARSER 1
10011 _ACEOF
10012
10013 fi
10014 done
10015
10016 LIBS=$save_LIBS
10017 fi
10018 fi
10019
10020 # Verify that we have a usable GMP library.
10021
10022
10023
10024
10025
10026
10027
10028
10029 use_additional=yes
10030
10031 acl_save_prefix="$prefix"
10032 prefix="$acl_final_prefix"
10033 acl_save_exec_prefix="$exec_prefix"
10034 exec_prefix="$acl_final_exec_prefix"
10035
10036 eval additional_includedir=\"$includedir\"
10037 eval additional_libdir=\"$libdir\"
10038
10039 exec_prefix="$acl_save_exec_prefix"
10040 prefix="$acl_save_prefix"
10041
10042
10043 # Check whether --with-libgmp-prefix was given.
10044 if test "${with_libgmp_prefix+set}" = set; then :
10045 withval=$with_libgmp_prefix;
10046 if test "X$withval" = "Xno"; then
10047 use_additional=no
10048 else
10049 if test "X$withval" = "X"; then
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 else
10063 additional_includedir="$withval/include"
10064 additional_libdir="$withval/lib"
10065 fi
10066 fi
10067
10068 fi
10069
10070
10071 # Check whether --with-libgmp-type was given.
10072 if test "${with_libgmp_type+set}" = set; then :
10073 withval=$with_libgmp_type; with_libgmp_type=$withval
10074 else
10075 with_libgmp_type=auto
10076 fi
10077
10078 lib_type=`eval echo \$with_libgmp_type`
10079
10080 LIBGMP=
10081 LTLIBGMP=
10082 INCGMP=
10083 rpathdirs=
10084 ltrpathdirs=
10085 names_already_handled=
10086 names_next_round='gmp '
10087 while test -n "$names_next_round"; do
10088 names_this_round="$names_next_round"
10089 names_next_round=
10090 for name in $names_this_round; do
10091 already_handled=
10092 for n in $names_already_handled; do
10093 if test "$n" = "$name"; then
10094 already_handled=yes
10095 break
10096 fi
10097 done
10098 if test -z "$already_handled"; then
10099 names_already_handled="$names_already_handled $name"
10100 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10101 eval value=\"\$HAVE_LIB$uppername\"
10102 if test -n "$value"; then
10103 if test "$value" = yes; then
10104 eval value=\"\$LIB$uppername\"
10105 test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value"
10106 eval value=\"\$LTLIB$uppername\"
10107 test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value"
10108 else
10109 :
10110 fi
10111 else
10112 found_dir=
10113 found_la=
10114 found_so=
10115 found_a=
10116 if test $use_additional = yes; then
10117 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10118 found_dir="$additional_libdir"
10119 found_so="$additional_libdir/lib$name.$shlibext"
10120 if test -f "$additional_libdir/lib$name.la"; then
10121 found_la="$additional_libdir/lib$name.la"
10122 fi
10123 elif test x$lib_type != xshared; then
10124 if test -f "$additional_libdir/lib$name.$libext"; then
10125 found_dir="$additional_libdir"
10126 found_a="$additional_libdir/lib$name.$libext"
10127 if test -f "$additional_libdir/lib$name.la"; then
10128 found_la="$additional_libdir/lib$name.la"
10129 fi
10130 fi
10131 fi
10132 fi
10133 if test "X$found_dir" = "X"; then
10134 for x in $LDFLAGS $LTLIBGMP; do
10135
10136 acl_save_prefix="$prefix"
10137 prefix="$acl_final_prefix"
10138 acl_save_exec_prefix="$exec_prefix"
10139 exec_prefix="$acl_final_exec_prefix"
10140 eval x=\"$x\"
10141 exec_prefix="$acl_save_exec_prefix"
10142 prefix="$acl_save_prefix"
10143
10144 case "$x" in
10145 -L*)
10146 dir=`echo "X$x" | sed -e 's/^X-L//'`
10147 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10148 found_dir="$dir"
10149 found_so="$dir/lib$name.$shlibext"
10150 if test -f "$dir/lib$name.la"; then
10151 found_la="$dir/lib$name.la"
10152 fi
10153 elif test x$lib_type != xshared; then
10154 if test -f "$dir/lib$name.$libext"; then
10155 found_dir="$dir"
10156 found_a="$dir/lib$name.$libext"
10157 if test -f "$dir/lib$name.la"; then
10158 found_la="$dir/lib$name.la"
10159 fi
10160 fi
10161 fi
10162 ;;
10163 esac
10164 if test "X$found_dir" != "X"; then
10165 break
10166 fi
10167 done
10168 fi
10169 if test "X$found_dir" != "X"; then
10170 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name"
10171 if test "X$found_so" != "X"; then
10172 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10173 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10174 else
10175 haveit=
10176 for x in $ltrpathdirs; do
10177 if test "X$x" = "X$found_dir"; then
10178 haveit=yes
10179 break
10180 fi
10181 done
10182 if test -z "$haveit"; then
10183 ltrpathdirs="$ltrpathdirs $found_dir"
10184 fi
10185 if test "$hardcode_direct" = yes; then
10186 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10187 else
10188 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10189 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10190 haveit=
10191 for x in $rpathdirs; do
10192 if test "X$x" = "X$found_dir"; then
10193 haveit=yes
10194 break
10195 fi
10196 done
10197 if test -z "$haveit"; then
10198 rpathdirs="$rpathdirs $found_dir"
10199 fi
10200 else
10201 haveit=
10202 for x in $LDFLAGS $LIBGMP; do
10203
10204 acl_save_prefix="$prefix"
10205 prefix="$acl_final_prefix"
10206 acl_save_exec_prefix="$exec_prefix"
10207 exec_prefix="$acl_final_exec_prefix"
10208 eval x=\"$x\"
10209 exec_prefix="$acl_save_exec_prefix"
10210 prefix="$acl_save_prefix"
10211
10212 if test "X$x" = "X-L$found_dir"; then
10213 haveit=yes
10214 break
10215 fi
10216 done
10217 if test -z "$haveit"; then
10218 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir"
10219 fi
10220 if test "$hardcode_minus_L" != no; then
10221 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10222 else
10223 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10224 fi
10225 fi
10226 fi
10227 fi
10228 else
10229 if test "X$found_a" != "X"; then
10230 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a"
10231 else
10232 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name"
10233 fi
10234 fi
10235 additional_includedir=
10236 case "$found_dir" in
10237 */lib | */lib/)
10238 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10239 additional_includedir="$basedir/include"
10240 ;;
10241 esac
10242 if test "X$additional_includedir" != "X"; then
10243 if test "X$additional_includedir" != "X/usr/include"; then
10244 haveit=
10245 if test "X$additional_includedir" = "X/usr/local/include"; then
10246 if test -n "$GCC"; then
10247 case $host_os in
10248 linux*) haveit=yes;;
10249 esac
10250 fi
10251 fi
10252 if test -z "$haveit"; then
10253 for x in $CPPFLAGS $INCGMP; do
10254
10255 acl_save_prefix="$prefix"
10256 prefix="$acl_final_prefix"
10257 acl_save_exec_prefix="$exec_prefix"
10258 exec_prefix="$acl_final_exec_prefix"
10259 eval x=\"$x\"
10260 exec_prefix="$acl_save_exec_prefix"
10261 prefix="$acl_save_prefix"
10262
10263 if test "X$x" = "X-I$additional_includedir"; then
10264 haveit=yes
10265 break
10266 fi
10267 done
10268 if test -z "$haveit"; then
10269 if test -d "$additional_includedir"; then
10270 INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir"
10271 fi
10272 fi
10273 fi
10274 fi
10275 fi
10276 if test -n "$found_la"; then
10277 save_libdir="$libdir"
10278 case "$found_la" in
10279 */* | *\\*) . "$found_la" ;;
10280 *) . "./$found_la" ;;
10281 esac
10282 libdir="$save_libdir"
10283 for dep in $dependency_libs; do
10284 case "$dep" in
10285 -L*)
10286 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10287 if test "X$additional_libdir" != "X/usr/lib"; then
10288 haveit=
10289 if test "X$additional_libdir" = "X/usr/local/lib"; then
10290 if test -n "$GCC"; then
10291 case $host_os in
10292 linux*) haveit=yes;;
10293 esac
10294 fi
10295 fi
10296 if test -z "$haveit"; then
10297 haveit=
10298 for x in $LDFLAGS $LIBGMP; do
10299
10300 acl_save_prefix="$prefix"
10301 prefix="$acl_final_prefix"
10302 acl_save_exec_prefix="$exec_prefix"
10303 exec_prefix="$acl_final_exec_prefix"
10304 eval x=\"$x\"
10305 exec_prefix="$acl_save_exec_prefix"
10306 prefix="$acl_save_prefix"
10307
10308 if test "X$x" = "X-L$additional_libdir"; then
10309 haveit=yes
10310 break
10311 fi
10312 done
10313 if test -z "$haveit"; then
10314 if test -d "$additional_libdir"; then
10315 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir"
10316 fi
10317 fi
10318 haveit=
10319 for x in $LDFLAGS $LTLIBGMP; do
10320
10321 acl_save_prefix="$prefix"
10322 prefix="$acl_final_prefix"
10323 acl_save_exec_prefix="$exec_prefix"
10324 exec_prefix="$acl_final_exec_prefix"
10325 eval x=\"$x\"
10326 exec_prefix="$acl_save_exec_prefix"
10327 prefix="$acl_save_prefix"
10328
10329 if test "X$x" = "X-L$additional_libdir"; then
10330 haveit=yes
10331 break
10332 fi
10333 done
10334 if test -z "$haveit"; then
10335 if test -d "$additional_libdir"; then
10336 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir"
10337 fi
10338 fi
10339 fi
10340 fi
10341 ;;
10342 -R*)
10343 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10344 if test "$enable_rpath" != no; then
10345 haveit=
10346 for x in $rpathdirs; do
10347 if test "X$x" = "X$dir"; then
10348 haveit=yes
10349 break
10350 fi
10351 done
10352 if test -z "$haveit"; then
10353 rpathdirs="$rpathdirs $dir"
10354 fi
10355 haveit=
10356 for x in $ltrpathdirs; do
10357 if test "X$x" = "X$dir"; then
10358 haveit=yes
10359 break
10360 fi
10361 done
10362 if test -z "$haveit"; then
10363 ltrpathdirs="$ltrpathdirs $dir"
10364 fi
10365 fi
10366 ;;
10367 -l*)
10368 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10369 ;;
10370 *.la)
10371 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10372 ;;
10373 *)
10374 LIBGMP="${LIBGMP}${LIBGMP:+ }$dep"
10375 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep"
10376 ;;
10377 esac
10378 done
10379 fi
10380 else
10381 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10382 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10383 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name"
10384 else
10385 LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext"
10386 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext"
10387 fi
10388 fi
10389 fi
10390 fi
10391 done
10392 done
10393 if test "X$rpathdirs" != "X"; then
10394 if test -n "$hardcode_libdir_separator"; then
10395 alldirs=
10396 for found_dir in $rpathdirs; do
10397 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10398 done
10399 acl_save_libdir="$libdir"
10400 libdir="$alldirs"
10401 eval flag=\"$hardcode_libdir_flag_spec\"
10402 libdir="$acl_save_libdir"
10403 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10404 else
10405 for found_dir in $rpathdirs; do
10406 acl_save_libdir="$libdir"
10407 libdir="$found_dir"
10408 eval flag=\"$hardcode_libdir_flag_spec\"
10409 libdir="$acl_save_libdir"
10410 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10411 done
10412 fi
10413 fi
10414 if test "X$ltrpathdirs" != "X"; then
10415 for found_dir in $ltrpathdirs; do
10416 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir"
10417 done
10418 fi
10419
10420
10421 ac_save_CPPFLAGS="$CPPFLAGS"
10422
10423 for element in $INCGMP; do
10424 haveit=
10425 for x in $CPPFLAGS; do
10426
10427 acl_save_prefix="$prefix"
10428 prefix="$acl_final_prefix"
10429 acl_save_exec_prefix="$exec_prefix"
10430 exec_prefix="$acl_final_exec_prefix"
10431 eval x=\"$x\"
10432 exec_prefix="$acl_save_exec_prefix"
10433 prefix="$acl_save_prefix"
10434
10435 if test "X$x" = "X$element"; then
10436 haveit=yes
10437 break
10438 fi
10439 done
10440 if test -z "$haveit"; then
10441 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10442 fi
10443 done
10444
10445
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5
10447 $as_echo_n "checking for libgmp... " >&6; }
10448 if ${ac_cv_libgmp+:} false; then :
10449 $as_echo_n "(cached) " >&6
10450 else
10451
10452 ac_save_LIBS="$LIBS"
10453 LIBS="$LIBS $LIBGMP"
10454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10455 /* end confdefs.h. */
10456 #include <gmp.h>
10457 int
10458 main ()
10459 {
10460 mpz_t n;
10461 mpz_init (n);
10462 ;
10463 return 0;
10464 }
10465 _ACEOF
10466 if ac_fn_c_try_link "$LINENO"; then :
10467 ac_cv_libgmp=yes
10468 else
10469 ac_cv_libgmp=no
10470 fi
10471 rm -f core conftest.err conftest.$ac_objext \
10472 conftest$ac_exeext conftest.$ac_ext
10473 LIBS="$ac_save_LIBS"
10474
10475 fi
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5
10477 $as_echo "$ac_cv_libgmp" >&6; }
10478 if test "$ac_cv_libgmp" = yes; then
10479 HAVE_LIBGMP=yes
10480
10481 $as_echo "#define HAVE_LIBGMP 1" >>confdefs.h
10482
10483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5
10484 $as_echo_n "checking how to link with libgmp... " >&6; }
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5
10486 $as_echo "$LIBGMP" >&6; }
10487 else
10488 HAVE_LIBGMP=no
10489 CPPFLAGS="$ac_save_CPPFLAGS"
10490 LIBGMP=
10491 LTLIBGMP=
10492 fi
10493
10494
10495
10496
10497
10498
10499 if test "$HAVE_LIBGMP" != yes; then
10500 as_fn_error $? "GMP is missing or unusable" "$LINENO" 5
10501 fi
10502
10503
10504 # Check whether --with-mpfr was given.
10505 if test "${with_mpfr+set}" = set; then :
10506 withval=$with_mpfr;
10507 else
10508 with_mpfr=auto
10509 fi
10510
10511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10512 $as_echo_n "checking whether to use MPFR... " >&6; }
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10514 $as_echo "$with_mpfr" >&6; }
10515
10516 if test "${with_mpfr}" = no; then
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10518 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10519 HAVE_LIBMPFR=no
10520 else
10521
10522
10523
10524
10525
10526
10527
10528
10529 use_additional=yes
10530
10531 acl_save_prefix="$prefix"
10532 prefix="$acl_final_prefix"
10533 acl_save_exec_prefix="$exec_prefix"
10534 exec_prefix="$acl_final_exec_prefix"
10535
10536 eval additional_includedir=\"$includedir\"
10537 eval additional_libdir=\"$libdir\"
10538
10539 exec_prefix="$acl_save_exec_prefix"
10540 prefix="$acl_save_prefix"
10541
10542
10543 # Check whether --with-libmpfr-prefix was given.
10544 if test "${with_libmpfr_prefix+set}" = set; then :
10545 withval=$with_libmpfr_prefix;
10546 if test "X$withval" = "Xno"; then
10547 use_additional=no
10548 else
10549 if test "X$withval" = "X"; then
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 else
10563 additional_includedir="$withval/include"
10564 additional_libdir="$withval/lib"
10565 fi
10566 fi
10567
10568 fi
10569
10570
10571 # Check whether --with-libmpfr-type was given.
10572 if test "${with_libmpfr_type+set}" = set; then :
10573 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10574 else
10575 with_libmpfr_type=auto
10576 fi
10577
10578 lib_type=`eval echo \$with_libmpfr_type`
10579
10580 LIBMPFR=
10581 LTLIBMPFR=
10582 INCMPFR=
10583 rpathdirs=
10584 ltrpathdirs=
10585 names_already_handled=
10586 names_next_round='mpfr gmp'
10587 while test -n "$names_next_round"; do
10588 names_this_round="$names_next_round"
10589 names_next_round=
10590 for name in $names_this_round; do
10591 already_handled=
10592 for n in $names_already_handled; do
10593 if test "$n" = "$name"; then
10594 already_handled=yes
10595 break
10596 fi
10597 done
10598 if test -z "$already_handled"; then
10599 names_already_handled="$names_already_handled $name"
10600 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10601 eval value=\"\$HAVE_LIB$uppername\"
10602 if test -n "$value"; then
10603 if test "$value" = yes; then
10604 eval value=\"\$LIB$uppername\"
10605 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10606 eval value=\"\$LTLIB$uppername\"
10607 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10608 else
10609 :
10610 fi
10611 else
10612 found_dir=
10613 found_la=
10614 found_so=
10615 found_a=
10616 if test $use_additional = yes; then
10617 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10618 found_dir="$additional_libdir"
10619 found_so="$additional_libdir/lib$name.$shlibext"
10620 if test -f "$additional_libdir/lib$name.la"; then
10621 found_la="$additional_libdir/lib$name.la"
10622 fi
10623 elif test x$lib_type != xshared; then
10624 if test -f "$additional_libdir/lib$name.$libext"; then
10625 found_dir="$additional_libdir"
10626 found_a="$additional_libdir/lib$name.$libext"
10627 if test -f "$additional_libdir/lib$name.la"; then
10628 found_la="$additional_libdir/lib$name.la"
10629 fi
10630 fi
10631 fi
10632 fi
10633 if test "X$found_dir" = "X"; then
10634 for x in $LDFLAGS $LTLIBMPFR; do
10635
10636 acl_save_prefix="$prefix"
10637 prefix="$acl_final_prefix"
10638 acl_save_exec_prefix="$exec_prefix"
10639 exec_prefix="$acl_final_exec_prefix"
10640 eval x=\"$x\"
10641 exec_prefix="$acl_save_exec_prefix"
10642 prefix="$acl_save_prefix"
10643
10644 case "$x" in
10645 -L*)
10646 dir=`echo "X$x" | sed -e 's/^X-L//'`
10647 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10648 found_dir="$dir"
10649 found_so="$dir/lib$name.$shlibext"
10650 if test -f "$dir/lib$name.la"; then
10651 found_la="$dir/lib$name.la"
10652 fi
10653 elif test x$lib_type != xshared; then
10654 if test -f "$dir/lib$name.$libext"; then
10655 found_dir="$dir"
10656 found_a="$dir/lib$name.$libext"
10657 if test -f "$dir/lib$name.la"; then
10658 found_la="$dir/lib$name.la"
10659 fi
10660 fi
10661 fi
10662 ;;
10663 esac
10664 if test "X$found_dir" != "X"; then
10665 break
10666 fi
10667 done
10668 fi
10669 if test "X$found_dir" != "X"; then
10670 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10671 if test "X$found_so" != "X"; then
10672 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10673 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10674 else
10675 haveit=
10676 for x in $ltrpathdirs; do
10677 if test "X$x" = "X$found_dir"; then
10678 haveit=yes
10679 break
10680 fi
10681 done
10682 if test -z "$haveit"; then
10683 ltrpathdirs="$ltrpathdirs $found_dir"
10684 fi
10685 if test "$hardcode_direct" = yes; then
10686 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10687 else
10688 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10689 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10690 haveit=
10691 for x in $rpathdirs; do
10692 if test "X$x" = "X$found_dir"; then
10693 haveit=yes
10694 break
10695 fi
10696 done
10697 if test -z "$haveit"; then
10698 rpathdirs="$rpathdirs $found_dir"
10699 fi
10700 else
10701 haveit=
10702 for x in $LDFLAGS $LIBMPFR; do
10703
10704 acl_save_prefix="$prefix"
10705 prefix="$acl_final_prefix"
10706 acl_save_exec_prefix="$exec_prefix"
10707 exec_prefix="$acl_final_exec_prefix"
10708 eval x=\"$x\"
10709 exec_prefix="$acl_save_exec_prefix"
10710 prefix="$acl_save_prefix"
10711
10712 if test "X$x" = "X-L$found_dir"; then
10713 haveit=yes
10714 break
10715 fi
10716 done
10717 if test -z "$haveit"; then
10718 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10719 fi
10720 if test "$hardcode_minus_L" != no; then
10721 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10722 else
10723 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10724 fi
10725 fi
10726 fi
10727 fi
10728 else
10729 if test "X$found_a" != "X"; then
10730 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10731 else
10732 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10733 fi
10734 fi
10735 additional_includedir=
10736 case "$found_dir" in
10737 */lib | */lib/)
10738 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10739 additional_includedir="$basedir/include"
10740 ;;
10741 esac
10742 if test "X$additional_includedir" != "X"; then
10743 if test "X$additional_includedir" != "X/usr/include"; then
10744 haveit=
10745 if test "X$additional_includedir" = "X/usr/local/include"; then
10746 if test -n "$GCC"; then
10747 case $host_os in
10748 linux*) haveit=yes;;
10749 esac
10750 fi
10751 fi
10752 if test -z "$haveit"; then
10753 for x in $CPPFLAGS $INCMPFR; do
10754
10755 acl_save_prefix="$prefix"
10756 prefix="$acl_final_prefix"
10757 acl_save_exec_prefix="$exec_prefix"
10758 exec_prefix="$acl_final_exec_prefix"
10759 eval x=\"$x\"
10760 exec_prefix="$acl_save_exec_prefix"
10761 prefix="$acl_save_prefix"
10762
10763 if test "X$x" = "X-I$additional_includedir"; then
10764 haveit=yes
10765 break
10766 fi
10767 done
10768 if test -z "$haveit"; then
10769 if test -d "$additional_includedir"; then
10770 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10771 fi
10772 fi
10773 fi
10774 fi
10775 fi
10776 if test -n "$found_la"; then
10777 save_libdir="$libdir"
10778 case "$found_la" in
10779 */* | *\\*) . "$found_la" ;;
10780 *) . "./$found_la" ;;
10781 esac
10782 libdir="$save_libdir"
10783 for dep in $dependency_libs; do
10784 case "$dep" in
10785 -L*)
10786 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10787 if test "X$additional_libdir" != "X/usr/lib"; then
10788 haveit=
10789 if test "X$additional_libdir" = "X/usr/local/lib"; then
10790 if test -n "$GCC"; then
10791 case $host_os in
10792 linux*) haveit=yes;;
10793 esac
10794 fi
10795 fi
10796 if test -z "$haveit"; then
10797 haveit=
10798 for x in $LDFLAGS $LIBMPFR; do
10799
10800 acl_save_prefix="$prefix"
10801 prefix="$acl_final_prefix"
10802 acl_save_exec_prefix="$exec_prefix"
10803 exec_prefix="$acl_final_exec_prefix"
10804 eval x=\"$x\"
10805 exec_prefix="$acl_save_exec_prefix"
10806 prefix="$acl_save_prefix"
10807
10808 if test "X$x" = "X-L$additional_libdir"; then
10809 haveit=yes
10810 break
10811 fi
10812 done
10813 if test -z "$haveit"; then
10814 if test -d "$additional_libdir"; then
10815 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10816 fi
10817 fi
10818 haveit=
10819 for x in $LDFLAGS $LTLIBMPFR; do
10820
10821 acl_save_prefix="$prefix"
10822 prefix="$acl_final_prefix"
10823 acl_save_exec_prefix="$exec_prefix"
10824 exec_prefix="$acl_final_exec_prefix"
10825 eval x=\"$x\"
10826 exec_prefix="$acl_save_exec_prefix"
10827 prefix="$acl_save_prefix"
10828
10829 if test "X$x" = "X-L$additional_libdir"; then
10830 haveit=yes
10831 break
10832 fi
10833 done
10834 if test -z "$haveit"; then
10835 if test -d "$additional_libdir"; then
10836 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10837 fi
10838 fi
10839 fi
10840 fi
10841 ;;
10842 -R*)
10843 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10844 if test "$enable_rpath" != no; then
10845 haveit=
10846 for x in $rpathdirs; do
10847 if test "X$x" = "X$dir"; then
10848 haveit=yes
10849 break
10850 fi
10851 done
10852 if test -z "$haveit"; then
10853 rpathdirs="$rpathdirs $dir"
10854 fi
10855 haveit=
10856 for x in $ltrpathdirs; do
10857 if test "X$x" = "X$dir"; then
10858 haveit=yes
10859 break
10860 fi
10861 done
10862 if test -z "$haveit"; then
10863 ltrpathdirs="$ltrpathdirs $dir"
10864 fi
10865 fi
10866 ;;
10867 -l*)
10868 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10869 ;;
10870 *.la)
10871 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10872 ;;
10873 *)
10874 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10875 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10876 ;;
10877 esac
10878 done
10879 fi
10880 else
10881 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10882 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10883 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10884 else
10885 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10886 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10887 fi
10888 fi
10889 fi
10890 fi
10891 done
10892 done
10893 if test "X$rpathdirs" != "X"; then
10894 if test -n "$hardcode_libdir_separator"; then
10895 alldirs=
10896 for found_dir in $rpathdirs; do
10897 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10898 done
10899 acl_save_libdir="$libdir"
10900 libdir="$alldirs"
10901 eval flag=\"$hardcode_libdir_flag_spec\"
10902 libdir="$acl_save_libdir"
10903 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10904 else
10905 for found_dir in $rpathdirs; do
10906 acl_save_libdir="$libdir"
10907 libdir="$found_dir"
10908 eval flag=\"$hardcode_libdir_flag_spec\"
10909 libdir="$acl_save_libdir"
10910 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10911 done
10912 fi
10913 fi
10914 if test "X$ltrpathdirs" != "X"; then
10915 for found_dir in $ltrpathdirs; do
10916 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10917 done
10918 fi
10919
10920
10921 ac_save_CPPFLAGS="$CPPFLAGS"
10922
10923 for element in $INCMPFR; do
10924 haveit=
10925 for x in $CPPFLAGS; do
10926
10927 acl_save_prefix="$prefix"
10928 prefix="$acl_final_prefix"
10929 acl_save_exec_prefix="$exec_prefix"
10930 exec_prefix="$acl_final_exec_prefix"
10931 eval x=\"$x\"
10932 exec_prefix="$acl_save_exec_prefix"
10933 prefix="$acl_save_prefix"
10934
10935 if test "X$x" = "X$element"; then
10936 haveit=yes
10937 break
10938 fi
10939 done
10940 if test -z "$haveit"; then
10941 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10942 fi
10943 done
10944
10945
10946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10947 $as_echo_n "checking for libmpfr... " >&6; }
10948 if ${ac_cv_libmpfr+:} false; then :
10949 $as_echo_n "(cached) " >&6
10950 else
10951
10952 ac_save_LIBS="$LIBS"
10953 LIBS="$LIBS $LIBMPFR"
10954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10955 /* end confdefs.h. */
10956 #include <mpfr.h>
10957 int
10958 main ()
10959 {
10960 mpfr_exp_t exp; mpfr_t x;
10961 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10962 ;
10963 return 0;
10964 }
10965 _ACEOF
10966 if ac_fn_c_try_link "$LINENO"; then :
10967 ac_cv_libmpfr=yes
10968 else
10969 ac_cv_libmpfr=no
10970 fi
10971 rm -f core conftest.err conftest.$ac_objext \
10972 conftest$ac_exeext conftest.$ac_ext
10973 LIBS="$ac_save_LIBS"
10974
10975 fi
10976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10977 $as_echo "$ac_cv_libmpfr" >&6; }
10978 if test "$ac_cv_libmpfr" = yes; then
10979 HAVE_LIBMPFR=yes
10980
10981 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10982
10983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10984 $as_echo_n "checking how to link with libmpfr... " >&6; }
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10986 $as_echo "$LIBMPFR" >&6; }
10987 else
10988 HAVE_LIBMPFR=no
10989 CPPFLAGS="$ac_save_CPPFLAGS"
10990 LIBMPFR=
10991 LTLIBMPFR=
10992 fi
10993
10994
10995
10996
10997
10998
10999 if test "$HAVE_LIBMPFR" != yes; then
11000 if test "$with_mpfr" = yes; then
11001 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
11002 else
11003 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
11004 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
11005 fi
11006 fi
11007 fi
11008
11009 # --------------------- #
11010 # Check for libpython. #
11011 # --------------------- #
11012
11013
11014
11015
11016
11017
11018 # Check whether --with-python was given.
11019 if test "${with_python+set}" = set; then :
11020 withval=$with_python;
11021 else
11022 with_python=auto
11023 fi
11024
11025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
11026 $as_echo_n "checking whether to use python... " >&6; }
11027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
11028 $as_echo "$with_python" >&6; }
11029
11030 if test "${with_python}" = no; then
11031 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11032 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11033 have_libpython=no
11034 else
11035 case "${with_python}" in
11036 [\\/]* | ?:[\\/]*)
11037 if test -d "${with_python}"; then
11038 # Assume the python binary is ${with_python}/bin/python.
11039 python_prog="${with_python}/bin/python"
11040 python_prefix=
11041 # If python does not exit ${with_python}/bin, then try in
11042 # ${with_python}. On Windows/MinGW, this is where the Python
11043 # executable is.
11044 if test ! -x "${python_prog}"; then
11045 python_prog="${with_python}/python"
11046 python_prefix=
11047 fi
11048 if test ! -x "${python_prog}"; then
11049 # Fall back to gdb 7.0/7.1 behaviour.
11050 python_prog=missing
11051 python_prefix=${with_python}
11052 fi
11053 elif test -x "${with_python}"; then
11054 # While we can't run python compiled for $host (unless host == build),
11055 # the user could write a script that provides the needed information,
11056 # so we support that.
11057 python_prog=${with_python}
11058 python_prefix=
11059 else
11060 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11061 fi
11062 ;;
11063 */*)
11064 # Disallow --with-python=foo/bar.
11065 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11066 ;;
11067 *)
11068 # The user has either specified auto, yes, or the name of the python
11069 # program assumed to be in $PATH.
11070 python_prefix=
11071 case "${with_python}" in
11072 yes | auto)
11073 if test "${build}" = "${host}"; then
11074 # Extract the first word of "python", so it can be a program name with args.
11075 set dummy python; ac_word=$2
11076 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11077 $as_echo_n "checking for $ac_word... " >&6; }
11078 if ${ac_cv_path_python_prog_path+:} false; then :
11079 $as_echo_n "(cached) " >&6
11080 else
11081 case $python_prog_path in
11082 [\\/]* | ?:[\\/]*)
11083 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11084 ;;
11085 *)
11086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11087 for as_dir in $PATH
11088 do
11089 IFS=$as_save_IFS
11090 test -z "$as_dir" && as_dir=.
11091 for ac_exec_ext in '' $ac_executable_extensions; do
11092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11093 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11095 break 2
11096 fi
11097 done
11098 done
11099 IFS=$as_save_IFS
11100
11101 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11102 ;;
11103 esac
11104 fi
11105 python_prog_path=$ac_cv_path_python_prog_path
11106 if test -n "$python_prog_path"; then
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11108 $as_echo "$python_prog_path" >&6; }
11109 else
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11111 $as_echo "no" >&6; }
11112 fi
11113
11114
11115 if test "${python_prog_path}" = missing; then
11116 python_prog=missing
11117 else
11118 python_prog=${python_prog_path}
11119 fi
11120 else
11121 # Not much we can do except assume the cross-compiler will find the
11122 # right files.
11123 python_prog=missing
11124 fi
11125 ;;
11126 *)
11127 # While we can't run python compiled for $host (unless host == build),
11128 # the user could write a script that provides the needed information,
11129 # so we support that.
11130 python_prog="${with_python}"
11131 # Extract the first word of "${python_prog}", so it can be a program name with args.
11132 set dummy ${python_prog}; ac_word=$2
11133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11134 $as_echo_n "checking for $ac_word... " >&6; }
11135 if ${ac_cv_path_python_prog_path+:} false; then :
11136 $as_echo_n "(cached) " >&6
11137 else
11138 case $python_prog_path in
11139 [\\/]* | ?:[\\/]*)
11140 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11141 ;;
11142 *)
11143 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11144 for as_dir in $PATH
11145 do
11146 IFS=$as_save_IFS
11147 test -z "$as_dir" && as_dir=.
11148 for ac_exec_ext in '' $ac_executable_extensions; do
11149 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11150 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11151 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11152 break 2
11153 fi
11154 done
11155 done
11156 IFS=$as_save_IFS
11157
11158 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11159 ;;
11160 esac
11161 fi
11162 python_prog_path=$ac_cv_path_python_prog_path
11163 if test -n "$python_prog_path"; then
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11165 $as_echo "$python_prog_path" >&6; }
11166 else
11167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11168 $as_echo "no" >&6; }
11169 fi
11170
11171
11172 if test "${python_prog_path}" = missing; then
11173 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
11174 fi
11175 ;;
11176 esac
11177 esac
11178
11179 if test "${python_prog}" != missing; then
11180 # We have a python program to use, but it may be too old.
11181 # Don't flag an error for --with-python=auto (the default).
11182 have_python_config=yes
11183 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11184 if test $? != 0; then
11185 have_python_config=failed
11186 if test "${with_python}" != auto; then
11187 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
11188 fi
11189 fi
11190 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11191 if test $? != 0; then
11192 have_python_config=failed
11193 if test "${with_python}" != auto; then
11194 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
11195 fi
11196 fi
11197 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11198 if test $? != 0; then
11199 have_python_config=failed
11200 if test "${with_python}" != auto; then
11201 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
11202 fi
11203 fi
11204 else
11205 # We do not have a python executable we can use to determine where
11206 # to find the Python headers and libs. We cannot guess the include
11207 # path from the python_prefix either, because that include path
11208 # depends on the Python version. So, there is nothing much we can
11209 # do except assume that the compiler will be able to find those files.
11210 python_includes=
11211 python_libs=
11212 have_python_config=no
11213 fi
11214
11215 # If we have python-config, only try the configuration it provides.
11216 # Otherwise fallback on the old way of trying different versions of
11217 # python in turn.
11218
11219 have_libpython=no
11220 if test "${have_python_config}" = yes; then
11221
11222
11223 new_CPPFLAGS=${python_includes}
11224 new_LIBS=${python_libs}
11225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11226 $as_echo_n "checking for python... " >&6; }
11227 save_CPPFLAGS=$CPPFLAGS
11228 save_LIBS=$LIBS
11229 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11230 LIBS="$new_LIBS $LIBS"
11231 found_usable_python=no
11232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11233 /* end confdefs.h. */
11234 #include "Python.h"
11235 int
11236 main ()
11237 {
11238 Py_Initialize ();
11239 ;
11240 return 0;
11241 }
11242 _ACEOF
11243 if ac_fn_c_try_link "$LINENO"; then :
11244 have_libpython=yes
11245 found_usable_python=yes
11246 PYTHON_CPPFLAGS=$new_CPPFLAGS
11247 PYTHON_LIBS=$new_LIBS
11248 fi
11249 rm -f core conftest.err conftest.$ac_objext \
11250 conftest$ac_exeext conftest.$ac_ext
11251 CPPFLAGS=$save_CPPFLAGS
11252 LIBS=$save_LIBS
11253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11254 $as_echo "${found_usable_python}" >&6; }
11255
11256 elif test "${have_python_config}" != failed; then
11257 if test "${have_libpython}" = no; then
11258
11259
11260 new_CPPFLAGS=${python_includes}
11261 new_LIBS="-lpython2.7 ${python_libs}"
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11263 $as_echo_n "checking for python... " >&6; }
11264 save_CPPFLAGS=$CPPFLAGS
11265 save_LIBS=$LIBS
11266 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11267 LIBS="$new_LIBS $LIBS"
11268 found_usable_python=no
11269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11270 /* end confdefs.h. */
11271 #include "Python.h"
11272 int
11273 main ()
11274 {
11275 Py_Initialize ();
11276 ;
11277 return 0;
11278 }
11279 _ACEOF
11280 if ac_fn_c_try_link "$LINENO"; then :
11281 have_libpython=yes
11282 found_usable_python=yes
11283 PYTHON_CPPFLAGS=$new_CPPFLAGS
11284 PYTHON_LIBS=$new_LIBS
11285 fi
11286 rm -f core conftest.err conftest.$ac_objext \
11287 conftest$ac_exeext conftest.$ac_ext
11288 CPPFLAGS=$save_CPPFLAGS
11289 LIBS=$save_LIBS
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11291 $as_echo "${found_usable_python}" >&6; }
11292
11293 fi
11294 if test "${have_libpython}" = no; then
11295
11296
11297 new_CPPFLAGS=${python_includes}
11298 new_LIBS="-lpython2.6 ${python_libs}"
11299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11300 $as_echo_n "checking for python... " >&6; }
11301 save_CPPFLAGS=$CPPFLAGS
11302 save_LIBS=$LIBS
11303 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11304 LIBS="$new_LIBS $LIBS"
11305 found_usable_python=no
11306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11307 /* end confdefs.h. */
11308 #include "Python.h"
11309 int
11310 main ()
11311 {
11312 Py_Initialize ();
11313 ;
11314 return 0;
11315 }
11316 _ACEOF
11317 if ac_fn_c_try_link "$LINENO"; then :
11318 have_libpython=yes
11319 found_usable_python=yes
11320 PYTHON_CPPFLAGS=$new_CPPFLAGS
11321 PYTHON_LIBS=$new_LIBS
11322 fi
11323 rm -f core conftest.err conftest.$ac_objext \
11324 conftest$ac_exeext conftest.$ac_ext
11325 CPPFLAGS=$save_CPPFLAGS
11326 LIBS=$save_LIBS
11327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11328 $as_echo "${found_usable_python}" >&6; }
11329
11330 fi
11331 fi
11332
11333 if test "${have_libpython}" = no; then
11334 case "${with_python}" in
11335 yes)
11336 as_fn_error $? "python is missing or unusable" "$LINENO" 5
11337 ;;
11338 auto)
11339 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11340 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11341 ;;
11342 *)
11343 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
11344 ;;
11345 esac
11346 else
11347 if test -n "${python_prefix}"; then
11348
11349 cat >>confdefs.h <<_ACEOF
11350 #define WITH_PYTHON_PATH "${python_prefix}"
11351 _ACEOF
11352
11353
11354 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11355 if test "x$prefix" = xNONE; then
11356 test_prefix=/usr/local
11357 else
11358 test_prefix=$prefix
11359 fi
11360 else
11361 test_prefix=$exec_prefix
11362 fi
11363 value=0
11364 case ${python_prefix} in
11365 "${test_prefix}"|"${test_prefix}/"*|\
11366 '${exec_prefix}'|'${exec_prefix}/'*)
11367 value=1
11368 ;;
11369 esac
11370
11371 cat >>confdefs.h <<_ACEOF
11372 #define PYTHON_PATH_RELOCATABLE $value
11373 _ACEOF
11374
11375
11376 fi
11377 fi
11378 fi
11379
11380
11381 # Check whether --with-python-libdir was given.
11382 if test "${with_python_libdir+set}" = set; then :
11383 withval=$with_python_libdir;
11384 else
11385
11386 # If no python libdir is specified then select one based on
11387 # python's prefix path.
11388 if test -n "${python_prefix}"; then
11389 with_python_libdir=${python_prefix}/lib
11390 fi
11391
11392 fi
11393
11394
11395 if test "${have_libpython}" != no; then
11396
11397 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
11398
11399 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11400 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11401 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11402 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
11403 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11404
11405 if test -n "${with_python_libdir}"; then
11406
11407 cat >>confdefs.h <<_ACEOF
11408 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
11409 _ACEOF
11410
11411
11412 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11413 if test "x$prefix" = xNONE; then
11414 test_prefix=/usr/local
11415 else
11416 test_prefix=$prefix
11417 fi
11418 else
11419 test_prefix=$exec_prefix
11420 fi
11421 value=0
11422 case ${with_python_libdir} in
11423 "${test_prefix}"|"${test_prefix}/"*|\
11424 '${exec_prefix}'|'${exec_prefix}/'*)
11425 value=1
11426 ;;
11427 esac
11428
11429 cat >>confdefs.h <<_ACEOF
11430 #define PYTHON_LIBDIR_RELOCATABLE $value
11431 _ACEOF
11432
11433
11434 fi
11435
11436 # Flags needed to compile Python code (taken from python-config --cflags).
11437 # We cannot call python-config directly because it will output whatever was
11438 # used when compiling the Python interpreter itself, including flags which
11439 # would make the python-related objects be compiled differently from the
11440 # rest of GDB (e.g., -O2 and -fPIC).
11441 if test "${GCC}" = yes; then
11442 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11443 # Python headers recommend -DNDEBUG, but it's unclear if that just
11444 # refers to building Python itself. In release mode, though, it
11445 # doesn't hurt for the Python code in gdb to follow.
11446 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
11447 fi
11448
11449 if test "x${tentative_python_cflags}" != x; then
11450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11451 $as_echo_n "checking compiler flags for python code... " >&6; }
11452 for flag in ${tentative_python_cflags}; do
11453 # Check that the compiler accepts it
11454 saved_CFLAGS="$CFLAGS"
11455 CFLAGS="$CFLAGS $flag"
11456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11457 /* end confdefs.h. */
11458
11459 int
11460 main ()
11461 {
11462
11463 ;
11464 return 0;
11465 }
11466 _ACEOF
11467 if ac_fn_c_try_compile "$LINENO"; then :
11468 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11469 fi
11470 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11471 CFLAGS="$saved_CFLAGS"
11472 done
11473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11474 $as_echo "${PYTHON_CFLAGS}" >&6; }
11475 fi
11476
11477 # On x64 Windows, Python's include headers, and pyconfig.h in
11478 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11479 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11480 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11481 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11482 # The issue was reported to the Python community, but still isn't
11483 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11484
11485 case "$gdb_host" in
11486 mingw64)
11487 if test "${GCC}" = yes; then
11488 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11489 fi
11490 ;;
11491 esac
11492 else
11493 # Even if Python support is not compiled in, we need to have this file
11494 # included so that the "python" command, et.al., still exists.
11495 CONFIG_OBS="$CONFIG_OBS python/python.o"
11496 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11497 fi
11498
11499 # Work around Python http://bugs.python.org/issue10112. See also
11500 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11501 # no effect. Note that the only test after this that uses Python is
11502 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11503 # run without -export-dynamic too.
11504 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11505
11506
11507
11508
11509 if test "${have_libpython}" != no; then
11510 HAVE_PYTHON_TRUE=
11511 HAVE_PYTHON_FALSE='#'
11512 else
11513 HAVE_PYTHON_TRUE='#'
11514 HAVE_PYTHON_FALSE=
11515 fi
11516
11517
11518 # -------------------- #
11519 # Check for libguile. #
11520 # -------------------- #
11521
11522
11523
11524
11525
11526
11527 # Check whether --with-guile was given.
11528 if test "${with_guile+set}" = set; then :
11529 withval=$with_guile;
11530 else
11531 with_guile=auto
11532 fi
11533
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11535 $as_echo_n "checking whether to use guile... " >&6; }
11536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11537 $as_echo "$with_guile" >&6; }
11538
11539 # Extract the first word of "pkg-config", so it can be a program name with args.
11540 set dummy pkg-config; ac_word=$2
11541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11542 $as_echo_n "checking for $ac_word... " >&6; }
11543 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11544 $as_echo_n "(cached) " >&6
11545 else
11546 case $pkg_config_prog_path in
11547 [\\/]* | ?:[\\/]*)
11548 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11549 ;;
11550 *)
11551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11552 for as_dir in $PATH
11553 do
11554 IFS=$as_save_IFS
11555 test -z "$as_dir" && as_dir=.
11556 for ac_exec_ext in '' $ac_executable_extensions; do
11557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11558 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11560 break 2
11561 fi
11562 done
11563 done
11564 IFS=$as_save_IFS
11565
11566 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11567 ;;
11568 esac
11569 fi
11570 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11571 if test -n "$pkg_config_prog_path"; then
11572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11573 $as_echo "$pkg_config_prog_path" >&6; }
11574 else
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11576 $as_echo "no" >&6; }
11577 fi
11578
11579
11580
11581 try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11582 have_libguile=no
11583 case "${with_guile}" in
11584 no)
11585 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11586 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11587 ;;
11588 auto)
11589 if test "${pkg_config_prog_path}" = "missing"; then
11590 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11591 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11592 else
11593
11594 pkg_config=${pkg_config_prog_path}
11595 guile_version_list=${try_guile_versions}
11596 flag_errors=no
11597
11598 found_usable_guile=checking
11599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11600 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11601 for guile_version in ${guile_version_list}; do
11602 ${pkg_config} --exists ${guile_version} 2>/dev/null
11603 if test $? != 0; then
11604 continue
11605 fi
11606 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11607 if test $? != 0; then
11608 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11609 fi
11610 new_LIBS=`${pkg_config} --libs ${guile_version}`
11611 if test $? != 0; then
11612 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11613 fi
11614 found_usable_guile=${guile_version}
11615 break
11616 done
11617 if test "${found_usable_guile}" = "checking"; then
11618 if test "${flag_errors}" = "yes"; then
11619 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11620 else
11621 found_usable_guile=no
11622 fi
11623 fi
11624 if test "${found_usable_guile}" != no; then
11625 save_CPPFLAGS=$CPPFLAGS
11626 save_LIBS=$LIBS
11627 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11628 LIBS="$LIBS $new_LIBS"
11629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11630 /* end confdefs.h. */
11631 #include "libguile.h"
11632 int
11633 main ()
11634 {
11635 scm_init_guile ();
11636 ;
11637 return 0;
11638 }
11639 _ACEOF
11640 if ac_fn_c_try_link "$LINENO"; then :
11641 have_libguile=yes
11642 GUILE_CPPFLAGS=$new_CPPFLAGS
11643 GUILE_LIBS=$new_LIBS
11644 else
11645 found_usable_guile=no
11646 fi
11647 rm -f core conftest.err conftest.$ac_objext \
11648 conftest$ac_exeext conftest.$ac_ext
11649 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11650 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11651
11652 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11653
11654
11655 fi
11656
11657 CPPFLAGS=$save_CPPFLAGS
11658 LIBS=$save_LIBS
11659 if test "${found_usable_guile}" = no; then
11660 if test "${flag_errors}" = yes; then
11661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11662 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11663 as_fn_error $? "linking guile version ${guile_version} test program failed
11664 See \`config.log' for more details" "$LINENO" 5; }
11665 fi
11666 fi
11667 fi
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11669 $as_echo "${found_usable_guile}" >&6; }
11670
11671 fi
11672 ;;
11673 yes)
11674 if test "${pkg_config_prog_path}" = "missing"; then
11675 as_fn_error $? "pkg-config not found" "$LINENO" 5
11676 fi
11677
11678 pkg_config=${pkg_config_prog_path}
11679 guile_version_list=${try_guile_versions}
11680 flag_errors=yes
11681
11682 found_usable_guile=checking
11683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11684 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11685 for guile_version in ${guile_version_list}; do
11686 ${pkg_config} --exists ${guile_version} 2>/dev/null
11687 if test $? != 0; then
11688 continue
11689 fi
11690 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11691 if test $? != 0; then
11692 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11693 fi
11694 new_LIBS=`${pkg_config} --libs ${guile_version}`
11695 if test $? != 0; then
11696 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11697 fi
11698 found_usable_guile=${guile_version}
11699 break
11700 done
11701 if test "${found_usable_guile}" = "checking"; then
11702 if test "${flag_errors}" = "yes"; then
11703 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11704 else
11705 found_usable_guile=no
11706 fi
11707 fi
11708 if test "${found_usable_guile}" != no; then
11709 save_CPPFLAGS=$CPPFLAGS
11710 save_LIBS=$LIBS
11711 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11712 LIBS="$LIBS $new_LIBS"
11713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11714 /* end confdefs.h. */
11715 #include "libguile.h"
11716 int
11717 main ()
11718 {
11719 scm_init_guile ();
11720 ;
11721 return 0;
11722 }
11723 _ACEOF
11724 if ac_fn_c_try_link "$LINENO"; then :
11725 have_libguile=yes
11726 GUILE_CPPFLAGS=$new_CPPFLAGS
11727 GUILE_LIBS=$new_LIBS
11728 else
11729 found_usable_guile=no
11730 fi
11731 rm -f core conftest.err conftest.$ac_objext \
11732 conftest$ac_exeext conftest.$ac_ext
11733 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11734 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11735
11736 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11737
11738
11739 fi
11740
11741 CPPFLAGS=$save_CPPFLAGS
11742 LIBS=$save_LIBS
11743 if test "${found_usable_guile}" = no; then
11744 if test "${flag_errors}" = yes; then
11745 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11746 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11747 as_fn_error $? "linking guile version ${guile_version} test program failed
11748 See \`config.log' for more details" "$LINENO" 5; }
11749 fi
11750 fi
11751 fi
11752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11753 $as_echo "${found_usable_guile}" >&6; }
11754
11755 ;;
11756 [\\/]* | ?:[\\/]*)
11757 if test -x "${with_guile}"; then
11758
11759 pkg_config=${with_guile}
11760 guile_version_list=${try_guile_versions}
11761 flag_errors=yes
11762
11763 found_usable_guile=checking
11764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11765 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11766 for guile_version in ${guile_version_list}; do
11767 ${pkg_config} --exists ${guile_version} 2>/dev/null
11768 if test $? != 0; then
11769 continue
11770 fi
11771 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11772 if test $? != 0; then
11773 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11774 fi
11775 new_LIBS=`${pkg_config} --libs ${guile_version}`
11776 if test $? != 0; then
11777 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11778 fi
11779 found_usable_guile=${guile_version}
11780 break
11781 done
11782 if test "${found_usable_guile}" = "checking"; then
11783 if test "${flag_errors}" = "yes"; then
11784 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11785 else
11786 found_usable_guile=no
11787 fi
11788 fi
11789 if test "${found_usable_guile}" != no; then
11790 save_CPPFLAGS=$CPPFLAGS
11791 save_LIBS=$LIBS
11792 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11793 LIBS="$LIBS $new_LIBS"
11794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11795 /* end confdefs.h. */
11796 #include "libguile.h"
11797 int
11798 main ()
11799 {
11800 scm_init_guile ();
11801 ;
11802 return 0;
11803 }
11804 _ACEOF
11805 if ac_fn_c_try_link "$LINENO"; then :
11806 have_libguile=yes
11807 GUILE_CPPFLAGS=$new_CPPFLAGS
11808 GUILE_LIBS=$new_LIBS
11809 else
11810 found_usable_guile=no
11811 fi
11812 rm -f core conftest.err conftest.$ac_objext \
11813 conftest$ac_exeext conftest.$ac_ext
11814 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11815 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11816
11817 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11818
11819
11820 fi
11821
11822 CPPFLAGS=$save_CPPFLAGS
11823 LIBS=$save_LIBS
11824 if test "${found_usable_guile}" = no; then
11825 if test "${flag_errors}" = yes; then
11826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11827 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11828 as_fn_error $? "linking guile version ${guile_version} test program failed
11829 See \`config.log' for more details" "$LINENO" 5; }
11830 fi
11831 fi
11832 fi
11833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11834 $as_echo "${found_usable_guile}" >&6; }
11835
11836 else
11837 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11838 fi
11839 ;;
11840 "" | */*)
11841 # Disallow --with=guile="" and --with-guile=foo/bar.
11842 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11843 ;;
11844 *)
11845 # A space separate list of guile versions to try, in order.
11846 if test "${pkg_config_prog_path}" = "missing"; then
11847 as_fn_error $? "pkg-config not found" "$LINENO" 5
11848 fi
11849
11850 pkg_config=${pkg_config_prog_path}
11851 guile_version_list=${with_guile}
11852 flag_errors=yes
11853
11854 found_usable_guile=checking
11855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11856 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11857 for guile_version in ${guile_version_list}; do
11858 ${pkg_config} --exists ${guile_version} 2>/dev/null
11859 if test $? != 0; then
11860 continue
11861 fi
11862 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11863 if test $? != 0; then
11864 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11865 fi
11866 new_LIBS=`${pkg_config} --libs ${guile_version}`
11867 if test $? != 0; then
11868 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11869 fi
11870 found_usable_guile=${guile_version}
11871 break
11872 done
11873 if test "${found_usable_guile}" = "checking"; then
11874 if test "${flag_errors}" = "yes"; then
11875 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11876 else
11877 found_usable_guile=no
11878 fi
11879 fi
11880 if test "${found_usable_guile}" != no; then
11881 save_CPPFLAGS=$CPPFLAGS
11882 save_LIBS=$LIBS
11883 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11884 LIBS="$LIBS $new_LIBS"
11885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886 /* end confdefs.h. */
11887 #include "libguile.h"
11888 int
11889 main ()
11890 {
11891 scm_init_guile ();
11892 ;
11893 return 0;
11894 }
11895 _ACEOF
11896 if ac_fn_c_try_link "$LINENO"; then :
11897 have_libguile=yes
11898 GUILE_CPPFLAGS=$new_CPPFLAGS
11899 GUILE_LIBS=$new_LIBS
11900 else
11901 found_usable_guile=no
11902 fi
11903 rm -f core conftest.err conftest.$ac_objext \
11904 conftest$ac_exeext conftest.$ac_ext
11905 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11906 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11907
11908 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11909
11910
11911 fi
11912
11913 CPPFLAGS=$save_CPPFLAGS
11914 LIBS=$save_LIBS
11915 if test "${found_usable_guile}" = no; then
11916 if test "${flag_errors}" = yes; then
11917 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11918 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11919 as_fn_error $? "linking guile version ${guile_version} test program failed
11920 See \`config.log' for more details" "$LINENO" 5; }
11921 fi
11922 fi
11923 fi
11924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11925 $as_echo "${found_usable_guile}" >&6; }
11926
11927 ;;
11928 esac
11929
11930 if test "${have_libguile}" != no; then
11931 case "${with_guile}" in
11932 [\\/]* | ?:[\\/]*)
11933
11934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11935 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11936 if ${ac_cv_guild_program_name+:} false; then :
11937 $as_echo_n "(cached) " >&6
11938 else
11939 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11940
11941 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11942 # the 'guild' and 'bindir' variables. In that case, try to guess
11943 # what the program name is, at the risk of getting it wrong if
11944 # Guile was configured with '--program-suffix' or similar.
11945 if test "x$ac_cv_guild_program_name" = "x"; then
11946 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11947 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11948 fi
11949
11950 fi
11951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11952 $as_echo "$ac_cv_guild_program_name" >&6; }
11953
11954 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11955 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11956 fi
11957
11958 GUILD="$ac_cv_guild_program_name"
11959
11960
11961 ;;
11962 *)
11963
11964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11965 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11966 if ${ac_cv_guild_program_name+:} false; then :
11967 $as_echo_n "(cached) " >&6
11968 else
11969 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11970
11971 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11972 # the 'guild' and 'bindir' variables. In that case, try to guess
11973 # what the program name is, at the risk of getting it wrong if
11974 # Guile was configured with '--program-suffix' or similar.
11975 if test "x$ac_cv_guild_program_name" = "x"; then
11976 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11977 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11978 fi
11979
11980 fi
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11982 $as_echo "$ac_cv_guild_program_name" >&6; }
11983
11984 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11985 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11986 fi
11987
11988 GUILD="$ac_cv_guild_program_name"
11989
11990
11991 ;;
11992 esac
11993
11994
11995 if test "$cross_compiling" = no; then
11996 GUILD_TARGET_FLAG=
11997 else
11998 GUILD_TARGET_FLAG="--target=$host"
11999 fi
12000
12001
12002
12003
12004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
12005 $as_echo_n "checking whether guild supports this host... " >&6; }
12006 if ${ac_cv_guild_ok+:} false; then :
12007 $as_echo_n "(cached) " >&6
12008 else
12009 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
12010 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
12011 ac_cv_guild_ok=yes
12012 else
12013 ac_cv_guild_ok=no
12014 fi
12015 fi
12016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
12017 $as_echo "$ac_cv_guild_ok" >&6; }
12018
12019 if test "$ac_cv_guild_ok" = no; then
12020 have_libguile=no
12021 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
12022 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
12023 fi
12024 fi
12025
12026 if test "${have_libguile}" != no; then
12027
12028 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
12029
12030 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
12031 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
12032 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
12033 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
12034 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
12035
12036 save_LIBS="$LIBS"
12037 save_CPPFLAGS="$CPPFLAGS"
12038 LIBS="$GUILE_LIBS"
12039 CPPFLAGS="$GUILE_CPPFLAGS"
12040 for ac_func in scm_new_smob
12041 do :
12042 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
12043 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
12044 cat >>confdefs.h <<_ACEOF
12045 #define HAVE_SCM_NEW_SMOB 1
12046 _ACEOF
12047
12048 fi
12049 done
12050
12051 LIBS="$save_LIBS"
12052 CPPFLAGS="$save_CPPFLAGS"
12053 else
12054 # Even if Guile support is not compiled in, we need to have these files
12055 # included.
12056 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
12057 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
12058 fi
12059
12060
12061 if test "${have_libguile}" != no; then
12062 HAVE_GUILE_TRUE=
12063 HAVE_GUILE_FALSE='#'
12064 else
12065 HAVE_GUILE_TRUE='#'
12066 HAVE_GUILE_FALSE=
12067 fi
12068
12069
12070 # ---------------------------- #
12071 # Check for source highlight. #
12072 # ---------------------------- #
12073
12074 SRCHIGH_LIBS=
12075 SRCHIGH_CFLAGS=
12076
12077 # Check whether --enable-source-highlight was given.
12078 if test "${enable_source_highlight+set}" = set; then :
12079 enableval=$enable_source_highlight; case "${enableval}" in
12080 yes) enable_source_highlight=yes ;;
12081 no) enable_source_highlight=no ;;
12082 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
12083 esac
12084 else
12085 enable_source_highlight=auto
12086 fi
12087
12088
12089 if test "${enable_source_highlight}" != "no"; then
12090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
12091 $as_echo_n "checking for the source-highlight library... " >&6; }
12092 if test "${pkg_config_prog_path}" = "missing"; then
12093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
12094 $as_echo "no - pkg-config not found" >&6; }
12095 if test "${enable_source_highlight}" = "yes"; then
12096 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
12097 fi
12098 else
12099 if ${pkg_config_prog_path} --exists source-highlight; then
12100 case "$LDFLAGS" in
12101 *static-libstdc*)
12102 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
12103 ;;
12104 esac
12105
12106 srchigh_pkg_cflags=`${pkg_config_prog_path} --cflags source-highlight`
12107 srchigh_pkg_libs=`${pkg_config_prog_path} --libs source-highlight`
12108
12109 # Now that we have found a source-highlight library, check if we can use
12110 # it. In particular, we're trying to detect the situation that the
12111 # library is using the new libstdc++ library abi ( see
12112 # https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html )
12113 # while the compiler being used to compile gdb is using the old abi.
12114 # Such a situation will result in an undefined reference to
12115 # srchilite::SourceHighlight::SourceHighlight(std::string const&).
12116 # This situation can occur for instance when using a source highlight
12117 # library compiled with g++ 7.5.0 while building gdb with g++ 4.8.5.
12118 ac_ext=cpp
12119 ac_cpp='$CXXCPP $CPPFLAGS'
12120 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12121 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12122 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12123
12124 save_CFLAGS=$CFLAGS
12125 save_LDFLAGS=$LDFLAGS
12126 CFLAGS="$CFLAGS $srchigh_pkg_cflags"
12127 LDFLAGS="$LDFLAGS $srchigh_pkg_libs"
12128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12129 /* end confdefs.h. */
12130 #include <srchilite/sourcehighlight.h>
12131 int
12132 main ()
12133 {
12134 std::string outlang = "esc.outlang";
12135 new srchilite::SourceHighlight (outlang);
12136
12137 ;
12138 return 0;
12139 }
12140 _ACEOF
12141 if ac_fn_cxx_try_link "$LINENO"; then :
12142 have_usable_source_highlight=yes
12143 else
12144 have_usable_source_highlight=no
12145
12146 fi
12147 rm -f core conftest.err conftest.$ac_objext \
12148 conftest$ac_exeext conftest.$ac_ext
12149 CFLAGS="$SAVE_CFLAGS"
12150 LDFLAGS="$SAVE_LDFLAGS"
12151 ac_ext=c
12152 ac_cpp='$CPP $CPPFLAGS'
12153 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12154 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12156
12157
12158 if test "${have_usable_source_highlight}" = "yes"; then
12159
12160 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
12161
12162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12163 $as_echo "yes" >&6; }
12164 SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
12165 SRCHIGH_LIBS="$srchigh_pkg_libs"
12166 else
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12168 $as_echo "no" >&6; }
12169 if test "${enable_source_highlight}" = "yes"; then
12170 as_fn_error $? "source-highlight in your system could not be used" "$LINENO" 5
12171 fi
12172 fi
12173 else
12174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12175 $as_echo "no" >&6; }
12176 if test "${enable_source_highlight}" = "yes"; then
12177 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
12178 fi
12179 fi
12180 fi
12181 fi
12182
12183
12184
12185 # ------------------------- #
12186 # Checks for header files. #
12187 # ------------------------- #
12188
12189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12190 $as_echo_n "checking for ANSI C header files... " >&6; }
12191 if ${ac_cv_header_stdc+:} false; then :
12192 $as_echo_n "(cached) " >&6
12193 else
12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12195 /* end confdefs.h. */
12196 #include <stdlib.h>
12197 #include <stdarg.h>
12198 #include <string.h>
12199 #include <float.h>
12200
12201 int
12202 main ()
12203 {
12204
12205 ;
12206 return 0;
12207 }
12208 _ACEOF
12209 if ac_fn_c_try_compile "$LINENO"; then :
12210 ac_cv_header_stdc=yes
12211 else
12212 ac_cv_header_stdc=no
12213 fi
12214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12215
12216 if test $ac_cv_header_stdc = yes; then
12217 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12219 /* end confdefs.h. */
12220 #include <string.h>
12221
12222 _ACEOF
12223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12224 $EGREP "memchr" >/dev/null 2>&1; then :
12225
12226 else
12227 ac_cv_header_stdc=no
12228 fi
12229 rm -f conftest*
12230
12231 fi
12232
12233 if test $ac_cv_header_stdc = yes; then
12234 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12236 /* end confdefs.h. */
12237 #include <stdlib.h>
12238
12239 _ACEOF
12240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12241 $EGREP "free" >/dev/null 2>&1; then :
12242
12243 else
12244 ac_cv_header_stdc=no
12245 fi
12246 rm -f conftest*
12247
12248 fi
12249
12250 if test $ac_cv_header_stdc = yes; then
12251 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12252 if test "$cross_compiling" = yes; then :
12253 :
12254 else
12255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12256 /* end confdefs.h. */
12257 #include <ctype.h>
12258 #include <stdlib.h>
12259 #if ((' ' & 0x0FF) == 0x020)
12260 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12261 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12262 #else
12263 # define ISLOWER(c) \
12264 (('a' <= (c) && (c) <= 'i') \
12265 || ('j' <= (c) && (c) <= 'r') \
12266 || ('s' <= (c) && (c) <= 'z'))
12267 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12268 #endif
12269
12270 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12271 int
12272 main ()
12273 {
12274 int i;
12275 for (i = 0; i < 256; i++)
12276 if (XOR (islower (i), ISLOWER (i))
12277 || toupper (i) != TOUPPER (i))
12278 return 2;
12279 return 0;
12280 }
12281 _ACEOF
12282 if ac_fn_c_try_run "$LINENO"; then :
12283
12284 else
12285 ac_cv_header_stdc=no
12286 fi
12287 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12288 conftest.$ac_objext conftest.beam conftest.$ac_ext
12289 fi
12290
12291 fi
12292 fi
12293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12294 $as_echo "$ac_cv_header_stdc" >&6; }
12295 if test $ac_cv_header_stdc = yes; then
12296
12297 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12298
12299 fi
12300
12301 # elf_hp.h is for HP/UX 64-bit shared library support.
12302 for ac_header in nlist.h machine/reg.h \
12303 thread_db.h \
12304 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12305 sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \
12306 sys/reg.h sys/debugreg.h \
12307 termios.h elf_hp.h
12308 do :
12309 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12310 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12311 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12312 cat >>confdefs.h <<_ACEOF
12313 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12314 _ACEOF
12315
12316 fi
12317
12318 done
12319
12320 for ac_header in sys/user.h
12321 do :
12322 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12323 # include <sys/param.h>
12324 #endif
12325
12326 "
12327 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12328 cat >>confdefs.h <<_ACEOF
12329 #define HAVE_SYS_USER_H 1
12330 _ACEOF
12331
12332 fi
12333
12334 done
12335
12336
12337 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12338 do :
12339 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12340 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12341 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12342 cat >>confdefs.h <<_ACEOF
12343 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12344 _ACEOF
12345
12346 fi
12347
12348 done
12349
12350 for ac_header in term.h
12351 do :
12352 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12353 # include <curses.h>
12354 #endif
12355
12356 "
12357 if test "x$ac_cv_header_term_h" = xyes; then :
12358 cat >>confdefs.h <<_ACEOF
12359 #define HAVE_TERM_H 1
12360 _ACEOF
12361
12362 fi
12363
12364 done
12365
12366
12367 for ac_header in sys/socket.h
12368 do :
12369 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12370 if test "x$ac_cv_header_sys_socket_h" = xyes; then :
12371 cat >>confdefs.h <<_ACEOF
12372 #define HAVE_SYS_SOCKET_H 1
12373 _ACEOF
12374
12375 fi
12376
12377 done
12378
12379 for ac_header in ws2tcpip.h
12380 do :
12381 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
12382 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
12383 cat >>confdefs.h <<_ACEOF
12384 #define HAVE_WS2TCPIP_H 1
12385 _ACEOF
12386
12387 fi
12388
12389 done
12390
12391 for ac_header in execinfo.h
12392 do :
12393 ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
12394 if test "x$ac_cv_header_execinfo_h" = xyes; then :
12395 cat >>confdefs.h <<_ACEOF
12396 #define HAVE_EXECINFO_H 1
12397 _ACEOF
12398
12399 fi
12400
12401 done
12402
12403
12404 # ------------------------- #
12405 # Checks for declarations. #
12406 # ------------------------- #
12407
12408
12409 # Check for presence and size of long long.
12410 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12411 if test "x$ac_cv_type_long_long" = xyes; then :
12412
12413 cat >>confdefs.h <<_ACEOF
12414 #define HAVE_LONG_LONG 1
12415 _ACEOF
12416
12417 # The cast to long int works around a bug in the HP C Compiler
12418 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12419 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12420 # This bug is HP SR number 8606223364.
12421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12422 $as_echo_n "checking size of long long... " >&6; }
12423 if ${ac_cv_sizeof_long_long+:} false; then :
12424 $as_echo_n "(cached) " >&6
12425 else
12426 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12427
12428 else
12429 if test "$ac_cv_type_long_long" = yes; then
12430 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12431 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12432 as_fn_error 77 "cannot compute sizeof (long long)
12433 See \`config.log' for more details" "$LINENO" 5; }
12434 else
12435 ac_cv_sizeof_long_long=0
12436 fi
12437 fi
12438
12439 fi
12440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12441 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12442
12443
12444
12445 cat >>confdefs.h <<_ACEOF
12446 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12447 _ACEOF
12448
12449
12450 fi
12451
12452
12453 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12454 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12455 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12456 ac_have_decl=1
12457 else
12458 ac_have_decl=0
12459 fi
12460
12461 cat >>confdefs.h <<_ACEOF
12462 #define HAVE_DECL_BASENAME $ac_have_decl
12463 _ACEOF
12464 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12465 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12466 ac_have_decl=1
12467 else
12468 ac_have_decl=0
12469 fi
12470
12471 cat >>confdefs.h <<_ACEOF
12472 #define HAVE_DECL_FFS $ac_have_decl
12473 _ACEOF
12474 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12475 if test "x$ac_cv_have_decl_asprintf" = xyes; 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_ASPRINTF $ac_have_decl
12483 _ACEOF
12484 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12485 if test "x$ac_cv_have_decl_vasprintf" = 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_VASPRINTF $ac_have_decl
12493 _ACEOF
12494 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12495 if test "x$ac_cv_have_decl_snprintf" = 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_SNPRINTF $ac_have_decl
12503 _ACEOF
12504 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12505 if test "x$ac_cv_have_decl_vsnprintf" = 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_VSNPRINTF $ac_have_decl
12513 _ACEOF
12514
12515 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12516 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12517 ac_have_decl=1
12518 else
12519 ac_have_decl=0
12520 fi
12521
12522 cat >>confdefs.h <<_ACEOF
12523 #define HAVE_DECL_STRTOL $ac_have_decl
12524 _ACEOF
12525 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12526 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12527 ac_have_decl=1
12528 else
12529 ac_have_decl=0
12530 fi
12531
12532 cat >>confdefs.h <<_ACEOF
12533 #define HAVE_DECL_STRTOUL $ac_have_decl
12534 _ACEOF
12535 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12536 if test "x$ac_cv_have_decl_strtoll" = 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_STRTOLL $ac_have_decl
12544 _ACEOF
12545 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12546 if test "x$ac_cv_have_decl_strtoull" = 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_STRTOULL $ac_have_decl
12554 _ACEOF
12555
12556 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12557 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12558 ac_have_decl=1
12559 else
12560 ac_have_decl=0
12561 fi
12562
12563 cat >>confdefs.h <<_ACEOF
12564 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12565 _ACEOF
12566
12567
12568
12569 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12570 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12571 ac_have_decl=1
12572 else
12573 ac_have_decl=0
12574 fi
12575
12576 cat >>confdefs.h <<_ACEOF
12577 #define HAVE_DECL_SNPRINTF $ac_have_decl
12578 _ACEOF
12579
12580
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12582 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12583 if ${am_cv_val_LC_MESSAGES+:} false; then :
12584 $as_echo_n "(cached) " >&6
12585 else
12586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12587 /* end confdefs.h. */
12588 #include <locale.h>
12589 int
12590 main ()
12591 {
12592 return LC_MESSAGES
12593 ;
12594 return 0;
12595 }
12596 _ACEOF
12597 if ac_fn_c_try_link "$LINENO"; then :
12598 am_cv_val_LC_MESSAGES=yes
12599 else
12600 am_cv_val_LC_MESSAGES=no
12601 fi
12602 rm -f core conftest.err conftest.$ac_objext \
12603 conftest$ac_exeext conftest.$ac_ext
12604 fi
12605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12606 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12607 if test $am_cv_val_LC_MESSAGES = yes; then
12608
12609 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12610
12611 fi
12612
12613
12614 # ------------------ #
12615 # Checks for types. #
12616 # ------------------ #
12617
12618 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12619 #if HAVE_SYS_SOCKET_H
12620 # include <sys/socket.h>
12621 #elif HAVE_WS2TCPIP_H
12622 # include <ws2tcpip.h>
12623 #endif
12624
12625 "
12626 if test "x$ac_cv_type_socklen_t" = xyes; then :
12627
12628 cat >>confdefs.h <<_ACEOF
12629 #define HAVE_SOCKLEN_T 1
12630 _ACEOF
12631
12632
12633 fi
12634
12635
12636 # ------------------------------------- #
12637 # Checks for compiler characteristics. #
12638 # ------------------------------------- #
12639
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12641 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12642 if ${ac_cv_c_const+:} false; then :
12643 $as_echo_n "(cached) " >&6
12644 else
12645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12646 /* end confdefs.h. */
12647
12648 int
12649 main ()
12650 {
12651
12652 #ifndef __cplusplus
12653 /* Ultrix mips cc rejects this sort of thing. */
12654 typedef int charset[2];
12655 const charset cs = { 0, 0 };
12656 /* SunOS 4.1.1 cc rejects this. */
12657 char const *const *pcpcc;
12658 char **ppc;
12659 /* NEC SVR4.0.2 mips cc rejects this. */
12660 struct point {int x, y;};
12661 static struct point const zero = {0,0};
12662 /* AIX XL C 1.02.0.0 rejects this.
12663 It does not let you subtract one const X* pointer from another in
12664 an arm of an if-expression whose if-part is not a constant
12665 expression */
12666 const char *g = "string";
12667 pcpcc = &g + (g ? g-g : 0);
12668 /* HPUX 7.0 cc rejects these. */
12669 ++pcpcc;
12670 ppc = (char**) pcpcc;
12671 pcpcc = (char const *const *) ppc;
12672 { /* SCO 3.2v4 cc rejects this sort of thing. */
12673 char tx;
12674 char *t = &tx;
12675 char const *s = 0 ? (char *) 0 : (char const *) 0;
12676
12677 *t++ = 0;
12678 if (s) return 0;
12679 }
12680 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12681 int x[] = {25, 17};
12682 const int *foo = &x[0];
12683 ++foo;
12684 }
12685 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12686 typedef const int *iptr;
12687 iptr p = 0;
12688 ++p;
12689 }
12690 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12691 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12692 struct s { int j; const int *ap[3]; } bx;
12693 struct s *b = &bx; b->j = 5;
12694 }
12695 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12696 const int foo = 10;
12697 if (!foo) return 0;
12698 }
12699 return !cs[0] && !zero.x;
12700 #endif
12701
12702 ;
12703 return 0;
12704 }
12705 _ACEOF
12706 if ac_fn_c_try_compile "$LINENO"; then :
12707 ac_cv_c_const=yes
12708 else
12709 ac_cv_c_const=no
12710 fi
12711 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12712 fi
12713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12714 $as_echo "$ac_cv_c_const" >&6; }
12715 if test $ac_cv_c_const = no; then
12716
12717 $as_echo "#define const /**/" >>confdefs.h
12718
12719 fi
12720
12721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12722 $as_echo_n "checking for inline... " >&6; }
12723 if ${ac_cv_c_inline+:} false; then :
12724 $as_echo_n "(cached) " >&6
12725 else
12726 ac_cv_c_inline=no
12727 for ac_kw in inline __inline__ __inline; do
12728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12729 /* end confdefs.h. */
12730 #ifndef __cplusplus
12731 typedef int foo_t;
12732 static $ac_kw foo_t static_foo () {return 0; }
12733 $ac_kw foo_t foo () {return 0; }
12734 #endif
12735
12736 _ACEOF
12737 if ac_fn_c_try_compile "$LINENO"; then :
12738 ac_cv_c_inline=$ac_kw
12739 fi
12740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12741 test "$ac_cv_c_inline" != no && break
12742 done
12743
12744 fi
12745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12746 $as_echo "$ac_cv_c_inline" >&6; }
12747
12748 case $ac_cv_c_inline in
12749 inline | yes) ;;
12750 *)
12751 case $ac_cv_c_inline in
12752 no) ac_val=;;
12753 *) ac_val=$ac_cv_c_inline;;
12754 esac
12755 cat >>confdefs.h <<_ACEOF
12756 #ifndef __cplusplus
12757 #define inline $ac_val
12758 #endif
12759 _ACEOF
12760 ;;
12761 esac
12762
12763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12764 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12765 if ${ac_cv_c_bigendian+:} false; then :
12766 $as_echo_n "(cached) " >&6
12767 else
12768 ac_cv_c_bigendian=unknown
12769 # See if we're dealing with a universal compiler.
12770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12771 /* end confdefs.h. */
12772 #ifndef __APPLE_CC__
12773 not a universal capable compiler
12774 #endif
12775 typedef int dummy;
12776
12777 _ACEOF
12778 if ac_fn_c_try_compile "$LINENO"; then :
12779
12780 # Check for potential -arch flags. It is not universal unless
12781 # there are at least two -arch flags with different values.
12782 ac_arch=
12783 ac_prev=
12784 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12785 if test -n "$ac_prev"; then
12786 case $ac_word in
12787 i?86 | x86_64 | ppc | ppc64)
12788 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12789 ac_arch=$ac_word
12790 else
12791 ac_cv_c_bigendian=universal
12792 break
12793 fi
12794 ;;
12795 esac
12796 ac_prev=
12797 elif test "x$ac_word" = "x-arch"; then
12798 ac_prev=arch
12799 fi
12800 done
12801 fi
12802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12803 if test $ac_cv_c_bigendian = unknown; then
12804 # See if sys/param.h defines the BYTE_ORDER macro.
12805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12806 /* end confdefs.h. */
12807 #include <sys/types.h>
12808 #include <sys/param.h>
12809
12810 int
12811 main ()
12812 {
12813 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12814 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12815 && LITTLE_ENDIAN)
12816 bogus endian macros
12817 #endif
12818
12819 ;
12820 return 0;
12821 }
12822 _ACEOF
12823 if ac_fn_c_try_compile "$LINENO"; then :
12824 # It does; now see whether it defined to BIG_ENDIAN or not.
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 BYTE_ORDER != BIG_ENDIAN
12834 not big endian
12835 #endif
12836
12837 ;
12838 return 0;
12839 }
12840 _ACEOF
12841 if ac_fn_c_try_compile "$LINENO"; then :
12842 ac_cv_c_bigendian=yes
12843 else
12844 ac_cv_c_bigendian=no
12845 fi
12846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12847 fi
12848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12849 fi
12850 if test $ac_cv_c_bigendian = unknown; then
12851 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12853 /* end confdefs.h. */
12854 #include <limits.h>
12855
12856 int
12857 main ()
12858 {
12859 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12860 bogus endian macros
12861 #endif
12862
12863 ;
12864 return 0;
12865 }
12866 _ACEOF
12867 if ac_fn_c_try_compile "$LINENO"; then :
12868 # It does; now see whether it defined to _BIG_ENDIAN or not.
12869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12870 /* end confdefs.h. */
12871 #include <limits.h>
12872
12873 int
12874 main ()
12875 {
12876 #ifndef _BIG_ENDIAN
12877 not big endian
12878 #endif
12879
12880 ;
12881 return 0;
12882 }
12883 _ACEOF
12884 if ac_fn_c_try_compile "$LINENO"; then :
12885 ac_cv_c_bigendian=yes
12886 else
12887 ac_cv_c_bigendian=no
12888 fi
12889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12890 fi
12891 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12892 fi
12893 if test $ac_cv_c_bigendian = unknown; then
12894 # Compile a test program.
12895 if test "$cross_compiling" = yes; then :
12896 # Try to guess by grepping values from an object file.
12897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12898 /* end confdefs.h. */
12899 short int ascii_mm[] =
12900 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12901 short int ascii_ii[] =
12902 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12903 int use_ascii (int i) {
12904 return ascii_mm[i] + ascii_ii[i];
12905 }
12906 short int ebcdic_ii[] =
12907 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12908 short int ebcdic_mm[] =
12909 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12910 int use_ebcdic (int i) {
12911 return ebcdic_mm[i] + ebcdic_ii[i];
12912 }
12913 extern int foo;
12914
12915 int
12916 main ()
12917 {
12918 return use_ascii (foo) == use_ebcdic (foo);
12919 ;
12920 return 0;
12921 }
12922 _ACEOF
12923 if ac_fn_c_try_compile "$LINENO"; then :
12924 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12925 ac_cv_c_bigendian=yes
12926 fi
12927 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12928 if test "$ac_cv_c_bigendian" = unknown; then
12929 ac_cv_c_bigendian=no
12930 else
12931 # finding both strings is unlikely to happen, but who knows?
12932 ac_cv_c_bigendian=unknown
12933 fi
12934 fi
12935 fi
12936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12937 else
12938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12939 /* end confdefs.h. */
12940 $ac_includes_default
12941 int
12942 main ()
12943 {
12944
12945 /* Are we little or big endian? From Harbison&Steele. */
12946 union
12947 {
12948 long int l;
12949 char c[sizeof (long int)];
12950 } u;
12951 u.l = 1;
12952 return u.c[sizeof (long int) - 1] == 1;
12953
12954 ;
12955 return 0;
12956 }
12957 _ACEOF
12958 if ac_fn_c_try_run "$LINENO"; then :
12959 ac_cv_c_bigendian=no
12960 else
12961 ac_cv_c_bigendian=yes
12962 fi
12963 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12964 conftest.$ac_objext conftest.beam conftest.$ac_ext
12965 fi
12966
12967 fi
12968 fi
12969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12970 $as_echo "$ac_cv_c_bigendian" >&6; }
12971 case $ac_cv_c_bigendian in #(
12972 yes)
12973 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12974 ;; #(
12975 no)
12976 ;; #(
12977 universal)
12978
12979 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12980
12981 ;; #(
12982 *)
12983 as_fn_error $? "unknown endianness
12984 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12985 esac
12986
12987
12988 # ------------------------------ #
12989 # Checks for library functions. #
12990 # ------------------------------ #
12991
12992 for ac_func in getuid getgid \
12993 pipe pread pread64 pwrite resize_term \
12994 getpgid setsid \
12995 sigaction sigsetmask socketpair \
12996 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12997 setrlimit getrlimit posix_madvise waitpid \
12998 use_default_colors
12999 do :
13000 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13001 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13002 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13003 cat >>confdefs.h <<_ACEOF
13004 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13005 _ACEOF
13006
13007 fi
13008 done
13009
13010
13011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13012 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13013 if ${am_cv_langinfo_codeset+:} false; then :
13014 $as_echo_n "(cached) " >&6
13015 else
13016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13017 /* end confdefs.h. */
13018 #include <langinfo.h>
13019 int
13020 main ()
13021 {
13022 char* cs = nl_langinfo(CODESET);
13023 ;
13024 return 0;
13025 }
13026 _ACEOF
13027 if ac_fn_c_try_link "$LINENO"; then :
13028 am_cv_langinfo_codeset=yes
13029 else
13030 am_cv_langinfo_codeset=no
13031 fi
13032 rm -f core conftest.err conftest.$ac_objext \
13033 conftest$ac_exeext conftest.$ac_ext
13034
13035 fi
13036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13037 $as_echo "$am_cv_langinfo_codeset" >&6; }
13038 if test $am_cv_langinfo_codeset = yes; then
13039
13040 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13041
13042 fi
13043
13044 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13045 if test "x$ac_cv_type_size_t" = xyes; then :
13046
13047 else
13048
13049 cat >>confdefs.h <<_ACEOF
13050 #define size_t unsigned int
13051 _ACEOF
13052
13053 fi
13054
13055
13056
13057
13058 for ac_header in $ac_header_list
13059 do :
13060 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13061 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13062 "
13063 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13064 cat >>confdefs.h <<_ACEOF
13065 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13066 _ACEOF
13067
13068 fi
13069
13070 done
13071
13072
13073
13074
13075
13076
13077
13078 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13079 if test "x$ac_cv_type_pid_t" = xyes; then :
13080
13081 else
13082
13083 cat >>confdefs.h <<_ACEOF
13084 #define pid_t int
13085 _ACEOF
13086
13087 fi
13088
13089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13090 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13091 if ${ac_cv_path_SED+:} false; then :
13092 $as_echo_n "(cached) " >&6
13093 else
13094 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13095 for ac_i in 1 2 3 4 5 6 7; do
13096 ac_script="$ac_script$as_nl$ac_script"
13097 done
13098 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13099 { ac_script=; unset ac_script;}
13100 if test -z "$SED"; then
13101 ac_path_SED_found=false
13102 # Loop through the user's path and test for each of PROGNAME-LIST
13103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13104 for as_dir in $PATH
13105 do
13106 IFS=$as_save_IFS
13107 test -z "$as_dir" && as_dir=.
13108 for ac_prog in sed gsed; do
13109 for ac_exec_ext in '' $ac_executable_extensions; do
13110 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13111 as_fn_executable_p "$ac_path_SED" || continue
13112 # Check for GNU ac_path_SED and select it if it is found.
13113 # Check for GNU $ac_path_SED
13114 case `"$ac_path_SED" --version 2>&1` in
13115 *GNU*)
13116 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13117 *)
13118 ac_count=0
13119 $as_echo_n 0123456789 >"conftest.in"
13120 while :
13121 do
13122 cat "conftest.in" "conftest.in" >"conftest.tmp"
13123 mv "conftest.tmp" "conftest.in"
13124 cp "conftest.in" "conftest.nl"
13125 $as_echo '' >> "conftest.nl"
13126 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13127 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13128 as_fn_arith $ac_count + 1 && ac_count=$as_val
13129 if test $ac_count -gt ${ac_path_SED_max-0}; then
13130 # Best one so far, save it but keep looking for a better one
13131 ac_cv_path_SED="$ac_path_SED"
13132 ac_path_SED_max=$ac_count
13133 fi
13134 # 10*(2^10) chars as input seems more than enough
13135 test $ac_count -gt 10 && break
13136 done
13137 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13138 esac
13139
13140 $ac_path_SED_found && break 3
13141 done
13142 done
13143 done
13144 IFS=$as_save_IFS
13145 if test -z "$ac_cv_path_SED"; then
13146 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13147 fi
13148 else
13149 ac_cv_path_SED=$SED
13150 fi
13151
13152 fi
13153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13154 $as_echo "$ac_cv_path_SED" >&6; }
13155 SED="$ac_cv_path_SED"
13156 rm -f conftest.sed
13157
13158
13159 # Set the 'development' global.
13160 . $srcdir/../bfd/development.sh
13161
13162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13163 $as_echo_n "checking for ANSI C header files... " >&6; }
13164 if ${ac_cv_header_stdc+:} false; then :
13165 $as_echo_n "(cached) " >&6
13166 else
13167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13168 /* end confdefs.h. */
13169 #include <stdlib.h>
13170 #include <stdarg.h>
13171 #include <string.h>
13172 #include <float.h>
13173
13174 int
13175 main ()
13176 {
13177
13178 ;
13179 return 0;
13180 }
13181 _ACEOF
13182 if ac_fn_c_try_compile "$LINENO"; then :
13183 ac_cv_header_stdc=yes
13184 else
13185 ac_cv_header_stdc=no
13186 fi
13187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13188
13189 if test $ac_cv_header_stdc = yes; then
13190 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13192 /* end confdefs.h. */
13193 #include <string.h>
13194
13195 _ACEOF
13196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13197 $EGREP "memchr" >/dev/null 2>&1; then :
13198
13199 else
13200 ac_cv_header_stdc=no
13201 fi
13202 rm -f conftest*
13203
13204 fi
13205
13206 if test $ac_cv_header_stdc = yes; then
13207 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13209 /* end confdefs.h. */
13210 #include <stdlib.h>
13211
13212 _ACEOF
13213 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13214 $EGREP "free" >/dev/null 2>&1; then :
13215
13216 else
13217 ac_cv_header_stdc=no
13218 fi
13219 rm -f conftest*
13220
13221 fi
13222
13223 if test $ac_cv_header_stdc = yes; then
13224 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13225 if test "$cross_compiling" = yes; then :
13226 :
13227 else
13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13229 /* end confdefs.h. */
13230 #include <ctype.h>
13231 #include <stdlib.h>
13232 #if ((' ' & 0x0FF) == 0x020)
13233 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13234 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13235 #else
13236 # define ISLOWER(c) \
13237 (('a' <= (c) && (c) <= 'i') \
13238 || ('j' <= (c) && (c) <= 'r') \
13239 || ('s' <= (c) && (c) <= 'z'))
13240 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13241 #endif
13242
13243 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13244 int
13245 main ()
13246 {
13247 int i;
13248 for (i = 0; i < 256; i++)
13249 if (XOR (islower (i), ISLOWER (i))
13250 || toupper (i) != TOUPPER (i))
13251 return 2;
13252 return 0;
13253 }
13254 _ACEOF
13255 if ac_fn_c_try_run "$LINENO"; then :
13256
13257 else
13258 ac_cv_header_stdc=no
13259 fi
13260 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13261 conftest.$ac_objext conftest.beam conftest.$ac_ext
13262 fi
13263
13264 fi
13265 fi
13266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13267 $as_echo "$ac_cv_header_stdc" >&6; }
13268 if test $ac_cv_header_stdc = yes; then
13269
13270 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13271
13272 fi
13273
13274 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13275 # for constant arguments. Useless!
13276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13277 $as_echo_n "checking for working alloca.h... " >&6; }
13278 if ${ac_cv_working_alloca_h+:} false; then :
13279 $as_echo_n "(cached) " >&6
13280 else
13281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13282 /* end confdefs.h. */
13283 #include <alloca.h>
13284 int
13285 main ()
13286 {
13287 char *p = (char *) alloca (2 * sizeof (int));
13288 if (p) return 0;
13289 ;
13290 return 0;
13291 }
13292 _ACEOF
13293 if ac_fn_c_try_link "$LINENO"; then :
13294 ac_cv_working_alloca_h=yes
13295 else
13296 ac_cv_working_alloca_h=no
13297 fi
13298 rm -f core conftest.err conftest.$ac_objext \
13299 conftest$ac_exeext conftest.$ac_ext
13300 fi
13301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13302 $as_echo "$ac_cv_working_alloca_h" >&6; }
13303 if test $ac_cv_working_alloca_h = yes; then
13304
13305 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13306
13307 fi
13308
13309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13310 $as_echo_n "checking for alloca... " >&6; }
13311 if ${ac_cv_func_alloca_works+:} false; then :
13312 $as_echo_n "(cached) " >&6
13313 else
13314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13315 /* end confdefs.h. */
13316 #ifdef __GNUC__
13317 # define alloca __builtin_alloca
13318 #else
13319 # ifdef _MSC_VER
13320 # include <malloc.h>
13321 # define alloca _alloca
13322 # else
13323 # ifdef HAVE_ALLOCA_H
13324 # include <alloca.h>
13325 # else
13326 # ifdef _AIX
13327 #pragma alloca
13328 # else
13329 # ifndef alloca /* predefined by HP cc +Olibcalls */
13330 void *alloca (size_t);
13331 # endif
13332 # endif
13333 # endif
13334 # endif
13335 #endif
13336
13337 int
13338 main ()
13339 {
13340 char *p = (char *) alloca (1);
13341 if (p) return 0;
13342 ;
13343 return 0;
13344 }
13345 _ACEOF
13346 if ac_fn_c_try_link "$LINENO"; then :
13347 ac_cv_func_alloca_works=yes
13348 else
13349 ac_cv_func_alloca_works=no
13350 fi
13351 rm -f core conftest.err conftest.$ac_objext \
13352 conftest$ac_exeext conftest.$ac_ext
13353 fi
13354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13355 $as_echo "$ac_cv_func_alloca_works" >&6; }
13356
13357 if test $ac_cv_func_alloca_works = yes; then
13358
13359 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13360
13361 else
13362 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13363 # that cause trouble. Some versions do not even contain alloca or
13364 # contain a buggy version. If you still want to use their alloca,
13365 # use ar to extract alloca.o from them instead of compiling alloca.c.
13366
13367 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13368
13369 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13370
13371
13372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13373 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13374 if ${ac_cv_os_cray+:} false; then :
13375 $as_echo_n "(cached) " >&6
13376 else
13377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13378 /* end confdefs.h. */
13379 #if defined CRAY && ! defined CRAY2
13380 webecray
13381 #else
13382 wenotbecray
13383 #endif
13384
13385 _ACEOF
13386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13387 $EGREP "webecray" >/dev/null 2>&1; then :
13388 ac_cv_os_cray=yes
13389 else
13390 ac_cv_os_cray=no
13391 fi
13392 rm -f conftest*
13393
13394 fi
13395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13396 $as_echo "$ac_cv_os_cray" >&6; }
13397 if test $ac_cv_os_cray = yes; then
13398 for ac_func in _getb67 GETB67 getb67; do
13399 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13400 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13401 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13402
13403 cat >>confdefs.h <<_ACEOF
13404 #define CRAY_STACKSEG_END $ac_func
13405 _ACEOF
13406
13407 break
13408 fi
13409
13410 done
13411 fi
13412
13413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13414 $as_echo_n "checking stack direction for C alloca... " >&6; }
13415 if ${ac_cv_c_stack_direction+:} false; then :
13416 $as_echo_n "(cached) " >&6
13417 else
13418 if test "$cross_compiling" = yes; then :
13419 ac_cv_c_stack_direction=0
13420 else
13421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13422 /* end confdefs.h. */
13423 $ac_includes_default
13424 int
13425 find_stack_direction (int *addr, int depth)
13426 {
13427 int dir, dummy = 0;
13428 if (! addr)
13429 addr = &dummy;
13430 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13431 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13432 return dir + dummy;
13433 }
13434
13435 int
13436 main (int argc, char **argv)
13437 {
13438 return find_stack_direction (0, argc + !argv + 20) < 0;
13439 }
13440 _ACEOF
13441 if ac_fn_c_try_run "$LINENO"; then :
13442 ac_cv_c_stack_direction=1
13443 else
13444 ac_cv_c_stack_direction=-1
13445 fi
13446 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13447 conftest.$ac_objext conftest.beam conftest.$ac_ext
13448 fi
13449
13450 fi
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13452 $as_echo "$ac_cv_c_stack_direction" >&6; }
13453 cat >>confdefs.h <<_ACEOF
13454 #define STACK_DIRECTION $ac_cv_c_stack_direction
13455 _ACEOF
13456
13457
13458 fi
13459
13460
13461 WIN32APILIBS=
13462 case ${host} in
13463 *mingw32*)
13464
13465 $as_echo "#define USE_WIN32API 1" >>confdefs.h
13466
13467 WIN32APILIBS="-lws2_32"
13468 ;;
13469 esac
13470
13471
13472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13473 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13474 if ${am_cv_langinfo_codeset+:} false; then :
13475 $as_echo_n "(cached) " >&6
13476 else
13477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13478 /* end confdefs.h. */
13479 #include <langinfo.h>
13480 int
13481 main ()
13482 {
13483 char* cs = nl_langinfo(CODESET);
13484 ;
13485 return 0;
13486 }
13487 _ACEOF
13488 if ac_fn_c_try_link "$LINENO"; then :
13489 am_cv_langinfo_codeset=yes
13490 else
13491 am_cv_langinfo_codeset=no
13492 fi
13493 rm -f core conftest.err conftest.$ac_objext \
13494 conftest$ac_exeext conftest.$ac_ext
13495
13496 fi
13497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13498 $as_echo "$am_cv_langinfo_codeset" >&6; }
13499 if test $am_cv_langinfo_codeset = yes; then
13500
13501 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13502
13503 fi
13504
13505
13506 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
13507 do :
13508 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13509 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13510 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13511 cat >>confdefs.h <<_ACEOF
13512 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13513 _ACEOF
13514
13515 fi
13516
13517 done
13518
13519
13520
13521 for ac_func in getpagesize
13522 do :
13523 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13524 if test "x$ac_cv_func_getpagesize" = xyes; then :
13525 cat >>confdefs.h <<_ACEOF
13526 #define HAVE_GETPAGESIZE 1
13527 _ACEOF
13528
13529 fi
13530 done
13531
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13533 $as_echo_n "checking for working mmap... " >&6; }
13534 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
13535 $as_echo_n "(cached) " >&6
13536 else
13537 if test "$cross_compiling" = yes; then :
13538 ac_cv_func_mmap_fixed_mapped=no
13539 else
13540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13541 /* end confdefs.h. */
13542 $ac_includes_default
13543 /* malloc might have been renamed as rpl_malloc. */
13544 #undef malloc
13545
13546 /* Thanks to Mike Haertel and Jim Avera for this test.
13547 Here is a matrix of mmap possibilities:
13548 mmap private not fixed
13549 mmap private fixed at somewhere currently unmapped
13550 mmap private fixed at somewhere already mapped
13551 mmap shared not fixed
13552 mmap shared fixed at somewhere currently unmapped
13553 mmap shared fixed at somewhere already mapped
13554 For private mappings, we should verify that changes cannot be read()
13555 back from the file, nor mmap's back from the file at a different
13556 address. (There have been systems where private was not correctly
13557 implemented like the infamous i386 svr4.0, and systems where the
13558 VM page cache was not coherent with the file system buffer cache
13559 like early versions of FreeBSD and possibly contemporary NetBSD.)
13560 For shared mappings, we should conversely verify that changes get
13561 propagated back to all the places they're supposed to be.
13562
13563 Grep wants private fixed already mapped.
13564 The main things grep needs to know about mmap are:
13565 * does it exist and is it safe to write into the mmap'd area
13566 * how to use it (BSD variants) */
13567
13568 #include <fcntl.h>
13569 #include <sys/mman.h>
13570
13571 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13572 char *malloc ();
13573 #endif
13574
13575 /* This mess was copied from the GNU getpagesize.h. */
13576 #ifndef HAVE_GETPAGESIZE
13577 # ifdef _SC_PAGESIZE
13578 # define getpagesize() sysconf(_SC_PAGESIZE)
13579 # else /* no _SC_PAGESIZE */
13580 # ifdef HAVE_SYS_PARAM_H
13581 # include <sys/param.h>
13582 # ifdef EXEC_PAGESIZE
13583 # define getpagesize() EXEC_PAGESIZE
13584 # else /* no EXEC_PAGESIZE */
13585 # ifdef NBPG
13586 # define getpagesize() NBPG * CLSIZE
13587 # ifndef CLSIZE
13588 # define CLSIZE 1
13589 # endif /* no CLSIZE */
13590 # else /* no NBPG */
13591 # ifdef NBPC
13592 # define getpagesize() NBPC
13593 # else /* no NBPC */
13594 # ifdef PAGESIZE
13595 # define getpagesize() PAGESIZE
13596 # endif /* PAGESIZE */
13597 # endif /* no NBPC */
13598 # endif /* no NBPG */
13599 # endif /* no EXEC_PAGESIZE */
13600 # else /* no HAVE_SYS_PARAM_H */
13601 # define getpagesize() 8192 /* punt totally */
13602 # endif /* no HAVE_SYS_PARAM_H */
13603 # endif /* no _SC_PAGESIZE */
13604
13605 #endif /* no HAVE_GETPAGESIZE */
13606
13607 int
13608 main ()
13609 {
13610 char *data, *data2, *data3;
13611 const char *cdata2;
13612 int i, pagesize;
13613 int fd, fd2;
13614
13615 pagesize = getpagesize ();
13616
13617 /* First, make a file with some known garbage in it. */
13618 data = (char *) malloc (pagesize);
13619 if (!data)
13620 return 1;
13621 for (i = 0; i < pagesize; ++i)
13622 *(data + i) = rand ();
13623 umask (0);
13624 fd = creat ("conftest.mmap", 0600);
13625 if (fd < 0)
13626 return 2;
13627 if (write (fd, data, pagesize) != pagesize)
13628 return 3;
13629 close (fd);
13630
13631 /* Next, check that the tail of a page is zero-filled. File must have
13632 non-zero length, otherwise we risk SIGBUS for entire page. */
13633 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13634 if (fd2 < 0)
13635 return 4;
13636 cdata2 = "";
13637 if (write (fd2, cdata2, 1) != 1)
13638 return 5;
13639 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13640 if (data2 == MAP_FAILED)
13641 return 6;
13642 for (i = 0; i < pagesize; ++i)
13643 if (*(data2 + i))
13644 return 7;
13645 close (fd2);
13646 if (munmap (data2, pagesize))
13647 return 8;
13648
13649 /* Next, try to mmap the file at a fixed address which already has
13650 something else allocated at it. If we can, also make sure that
13651 we see the same garbage. */
13652 fd = open ("conftest.mmap", O_RDWR);
13653 if (fd < 0)
13654 return 9;
13655 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13656 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13657 return 10;
13658 for (i = 0; i < pagesize; ++i)
13659 if (*(data + i) != *(data2 + i))
13660 return 11;
13661
13662 /* Finally, make sure that changes to the mapped area do not
13663 percolate back to the file as seen by read(). (This is a bug on
13664 some variants of i386 svr4.0.) */
13665 for (i = 0; i < pagesize; ++i)
13666 *(data2 + i) = *(data2 + i) + 1;
13667 data3 = (char *) malloc (pagesize);
13668 if (!data3)
13669 return 12;
13670 if (read (fd, data3, pagesize) != pagesize)
13671 return 13;
13672 for (i = 0; i < pagesize; ++i)
13673 if (*(data + i) != *(data3 + i))
13674 return 14;
13675 close (fd);
13676 return 0;
13677 }
13678 _ACEOF
13679 if ac_fn_c_try_run "$LINENO"; then :
13680 ac_cv_func_mmap_fixed_mapped=yes
13681 else
13682 ac_cv_func_mmap_fixed_mapped=no
13683 fi
13684 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13685 conftest.$ac_objext conftest.beam conftest.$ac_ext
13686 fi
13687
13688 fi
13689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13690 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13691 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13692
13693 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13694
13695 fi
13696 rm -f conftest.mmap conftest.txt
13697
13698 for ac_header in vfork.h
13699 do :
13700 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13701 if test "x$ac_cv_header_vfork_h" = xyes; then :
13702 cat >>confdefs.h <<_ACEOF
13703 #define HAVE_VFORK_H 1
13704 _ACEOF
13705
13706 fi
13707
13708 done
13709
13710 for ac_func in fork vfork
13711 do :
13712 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13713 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13714 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13715 cat >>confdefs.h <<_ACEOF
13716 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13717 _ACEOF
13718
13719 fi
13720 done
13721
13722 if test "x$ac_cv_func_fork" = xyes; then
13723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13724 $as_echo_n "checking for working fork... " >&6; }
13725 if ${ac_cv_func_fork_works+:} false; then :
13726 $as_echo_n "(cached) " >&6
13727 else
13728 if test "$cross_compiling" = yes; then :
13729 ac_cv_func_fork_works=cross
13730 else
13731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13732 /* end confdefs.h. */
13733 $ac_includes_default
13734 int
13735 main ()
13736 {
13737
13738 /* By Ruediger Kuhlmann. */
13739 return fork () < 0;
13740
13741 ;
13742 return 0;
13743 }
13744 _ACEOF
13745 if ac_fn_c_try_run "$LINENO"; then :
13746 ac_cv_func_fork_works=yes
13747 else
13748 ac_cv_func_fork_works=no
13749 fi
13750 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13751 conftest.$ac_objext conftest.beam conftest.$ac_ext
13752 fi
13753
13754 fi
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13756 $as_echo "$ac_cv_func_fork_works" >&6; }
13757
13758 else
13759 ac_cv_func_fork_works=$ac_cv_func_fork
13760 fi
13761 if test "x$ac_cv_func_fork_works" = xcross; then
13762 case $host in
13763 *-*-amigaos* | *-*-msdosdjgpp*)
13764 # Override, as these systems have only a dummy fork() stub
13765 ac_cv_func_fork_works=no
13766 ;;
13767 *)
13768 ac_cv_func_fork_works=yes
13769 ;;
13770 esac
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13772 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13773 fi
13774 ac_cv_func_vfork_works=$ac_cv_func_vfork
13775 if test "x$ac_cv_func_vfork" = xyes; then
13776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13777 $as_echo_n "checking for working vfork... " >&6; }
13778 if ${ac_cv_func_vfork_works+:} false; then :
13779 $as_echo_n "(cached) " >&6
13780 else
13781 if test "$cross_compiling" = yes; then :
13782 ac_cv_func_vfork_works=cross
13783 else
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h. */
13786 /* Thanks to Paul Eggert for this test. */
13787 $ac_includes_default
13788 #include <sys/wait.h>
13789 #ifdef HAVE_VFORK_H
13790 # include <vfork.h>
13791 #endif
13792 /* On some sparc systems, changes by the child to local and incoming
13793 argument registers are propagated back to the parent. The compiler
13794 is told about this with #include <vfork.h>, but some compilers
13795 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13796 static variable whose address is put into a register that is
13797 clobbered by the vfork. */
13798 static void
13799 #ifdef __cplusplus
13800 sparc_address_test (int arg)
13801 # else
13802 sparc_address_test (arg) int arg;
13803 #endif
13804 {
13805 static pid_t child;
13806 if (!child) {
13807 child = vfork ();
13808 if (child < 0) {
13809 perror ("vfork");
13810 _exit(2);
13811 }
13812 if (!child) {
13813 arg = getpid();
13814 write(-1, "", 0);
13815 _exit (arg);
13816 }
13817 }
13818 }
13819
13820 int
13821 main ()
13822 {
13823 pid_t parent = getpid ();
13824 pid_t child;
13825
13826 sparc_address_test (0);
13827
13828 child = vfork ();
13829
13830 if (child == 0) {
13831 /* Here is another test for sparc vfork register problems. This
13832 test uses lots of local variables, at least as many local
13833 variables as main has allocated so far including compiler
13834 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13835 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13836 reuse the register of parent for one of the local variables,
13837 since it will think that parent can't possibly be used any more
13838 in this routine. Assigning to the local variable will thus
13839 munge parent in the parent process. */
13840 pid_t
13841 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13842 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13843 /* Convince the compiler that p..p7 are live; otherwise, it might
13844 use the same hardware register for all 8 local variables. */
13845 if (p != p1 || p != p2 || p != p3 || p != p4
13846 || p != p5 || p != p6 || p != p7)
13847 _exit(1);
13848
13849 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13850 from child file descriptors. If the child closes a descriptor
13851 before it execs or exits, this munges the parent's descriptor
13852 as well. Test for this by closing stdout in the child. */
13853 _exit(close(fileno(stdout)) != 0);
13854 } else {
13855 int status;
13856 struct stat st;
13857
13858 while (wait(&status) != child)
13859 ;
13860 return (
13861 /* Was there some problem with vforking? */
13862 child < 0
13863
13864 /* Did the child fail? (This shouldn't happen.) */
13865 || status
13866
13867 /* Did the vfork/compiler bug occur? */
13868 || parent != getpid()
13869
13870 /* Did the file descriptor bug occur? */
13871 || fstat(fileno(stdout), &st) != 0
13872 );
13873 }
13874 }
13875 _ACEOF
13876 if ac_fn_c_try_run "$LINENO"; then :
13877 ac_cv_func_vfork_works=yes
13878 else
13879 ac_cv_func_vfork_works=no
13880 fi
13881 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13882 conftest.$ac_objext conftest.beam conftest.$ac_ext
13883 fi
13884
13885 fi
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13887 $as_echo "$ac_cv_func_vfork_works" >&6; }
13888
13889 fi;
13890 if test "x$ac_cv_func_fork_works" = xcross; then
13891 ac_cv_func_vfork_works=$ac_cv_func_vfork
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13893 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13894 fi
13895
13896 if test "x$ac_cv_func_vfork_works" = xyes; then
13897
13898 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13899
13900 else
13901
13902 $as_echo "#define vfork fork" >>confdefs.h
13903
13904 fi
13905 if test "x$ac_cv_func_fork_works" = xyes; then
13906
13907 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13908
13909 fi
13910
13911 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13912 ptrace64 sbrk setns sigaltstack sigprocmask \
13913 setpgid setpgrp getrusage getauxval sigtimedwait
13914 do :
13915 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13916 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13917 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13918 cat >>confdefs.h <<_ACEOF
13919 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13920 _ACEOF
13921
13922 fi
13923 done
13924
13925
13926 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
13927 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
13928 # only in linux/personality.h.
13929 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13930 "
13931 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13932 ac_have_decl=1
13933 else
13934 ac_have_decl=0
13935 fi
13936
13937 cat >>confdefs.h <<_ACEOF
13938 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13939 _ACEOF
13940
13941
13942 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13943 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13944 ac_have_decl=1
13945 else
13946 ac_have_decl=0
13947 fi
13948
13949 cat >>confdefs.h <<_ACEOF
13950 #define HAVE_DECL_STRSTR $ac_have_decl
13951 _ACEOF
13952
13953
13954 # ----------------------- #
13955 # Checks for structures. #
13956 # ----------------------- #
13957
13958 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13959 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13960
13961 cat >>confdefs.h <<_ACEOF
13962 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13963 _ACEOF
13964
13965
13966 fi
13967 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13968 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13969
13970 cat >>confdefs.h <<_ACEOF
13971 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13972 _ACEOF
13973
13974
13975 fi
13976
13977
13978 # On FreeBSD we need libutil for the kinfo_get* functions. On
13979 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13980 # Figure out which one to use.
13981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13982 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13983 if ${ac_cv_search_kinfo_getfile+:} false; then :
13984 $as_echo_n "(cached) " >&6
13985 else
13986 ac_func_search_save_LIBS=$LIBS
13987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13988 /* end confdefs.h. */
13989
13990 /* Override any GCC internal prototype to avoid an error.
13991 Use char because int might match the return type of a GCC
13992 builtin and then its argument prototype would still apply. */
13993 #ifdef __cplusplus
13994 extern "C"
13995 #endif
13996 char kinfo_getfile ();
13997 int
13998 main ()
13999 {
14000 return kinfo_getfile ();
14001 ;
14002 return 0;
14003 }
14004 _ACEOF
14005 for ac_lib in '' util util-freebsd; do
14006 if test -z "$ac_lib"; then
14007 ac_res="none required"
14008 else
14009 ac_res=-l$ac_lib
14010 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14011 fi
14012 if ac_fn_c_try_link "$LINENO"; then :
14013 ac_cv_search_kinfo_getfile=$ac_res
14014 fi
14015 rm -f core conftest.err conftest.$ac_objext \
14016 conftest$ac_exeext
14017 if ${ac_cv_search_kinfo_getfile+:} false; then :
14018 break
14019 fi
14020 done
14021 if ${ac_cv_search_kinfo_getfile+:} false; then :
14022
14023 else
14024 ac_cv_search_kinfo_getfile=no
14025 fi
14026 rm conftest.$ac_ext
14027 LIBS=$ac_func_search_save_LIBS
14028 fi
14029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
14030 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
14031 ac_res=$ac_cv_search_kinfo_getfile
14032 if test "$ac_res" != no; then :
14033 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14034
14035 fi
14036
14037
14038 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
14039 for ac_func in kinfo_getfile
14040 do :
14041 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
14042 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
14043 cat >>confdefs.h <<_ACEOF
14044 #define HAVE_KINFO_GETFILE 1
14045 _ACEOF
14046
14047 fi
14048 done
14049
14050
14051 # Check for std::thread. This does not work on some platforms, like
14052 # mingw and DJGPP.
14053 ac_ext=cpp
14054 ac_cpp='$CXXCPP $CPPFLAGS'
14055 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14056 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14057 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14058
14059
14060
14061
14062
14063 ac_ext=c
14064 ac_cpp='$CPP $CPPFLAGS'
14065 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14066 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14067 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14068
14069 ax_pthread_ok=no
14070
14071 # We used to check for pthread.h first, but this fails if pthread.h
14072 # requires special compiler flags (e.g. on Tru64 or Sequent).
14073 # It gets checked for in the link test anyway.
14074
14075 # First of all, check if the user has set any of the PTHREAD_LIBS,
14076 # etcetera environment variables, and if threads linking works using
14077 # them:
14078 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
14079 ax_pthread_save_CC="$CC"
14080 ax_pthread_save_CFLAGS="$CFLAGS"
14081 ax_pthread_save_LIBS="$LIBS"
14082 if test "x$PTHREAD_CC" != "x"; then :
14083 CC="$PTHREAD_CC"
14084 fi
14085 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14086 LIBS="$PTHREAD_LIBS $LIBS"
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
14088 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
14089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14090 /* end confdefs.h. */
14091
14092 /* Override any GCC internal prototype to avoid an error.
14093 Use char because int might match the return type of a GCC
14094 builtin and then its argument prototype would still apply. */
14095 #ifdef __cplusplus
14096 extern "C"
14097 #endif
14098 char pthread_join ();
14099 int
14100 main ()
14101 {
14102 return pthread_join ();
14103 ;
14104 return 0;
14105 }
14106 _ACEOF
14107 if ac_fn_c_try_link "$LINENO"; then :
14108 ax_pthread_ok=yes
14109 fi
14110 rm -f core conftest.err conftest.$ac_objext \
14111 conftest$ac_exeext conftest.$ac_ext
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14113 $as_echo "$ax_pthread_ok" >&6; }
14114 if test "x$ax_pthread_ok" = "xno"; then
14115 PTHREAD_LIBS=""
14116 PTHREAD_CFLAGS=""
14117 fi
14118 CC="$ax_pthread_save_CC"
14119 CFLAGS="$ax_pthread_save_CFLAGS"
14120 LIBS="$ax_pthread_save_LIBS"
14121 fi
14122
14123 # We must check for the threads library under a number of different
14124 # names; the ordering is very important because some systems
14125 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14126 # libraries is broken (non-POSIX).
14127
14128 # Create a list of thread flags to try. Items starting with a "-" are
14129 # C compiler flags, and other items are library names, except for "none"
14130 # which indicates that we try without any flags at all, and "pthread-config"
14131 # which is a program returning the flags for the Pth emulation library.
14132
14133 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
14134
14135 # The ordering *is* (sometimes) important. Some notes on the
14136 # individual items follow:
14137
14138 # pthreads: AIX (must check this before -lpthread)
14139 # none: in case threads are in libc; should be tried before -Kthread and
14140 # other compiler flags to prevent continual compiler warnings
14141 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14142 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14143 # (Note: HP C rejects this with "bad form for `-t' option")
14144 # -pthreads: Solaris/gcc (Note: HP C also rejects)
14145 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14146 # doesn't hurt to check since this sometimes defines pthreads and
14147 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
14148 # is present but should not be used directly; and before -mthreads,
14149 # because the compiler interprets this as "-mt" + "-hreads")
14150 # -mthreads: Mingw32/gcc, Lynx/gcc
14151 # pthread: Linux, etcetera
14152 # --thread-safe: KAI C++
14153 # pthread-config: use pthread-config program (for GNU Pth library)
14154
14155 case $host_os in
14156
14157 freebsd*)
14158
14159 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14160 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
14161
14162 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14163 ;;
14164
14165 hpux*)
14166
14167 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14168 # multi-threading and also sets -lpthread."
14169
14170 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14171 ;;
14172
14173 openedition*)
14174
14175 # IBM z/OS requires a feature-test macro to be defined in order to
14176 # enable POSIX threads at all, so give the user a hint if this is
14177 # not set. (We don't define these ourselves, as they can affect
14178 # other portions of the system API in unpredictable ways.)
14179
14180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14181 /* end confdefs.h. */
14182
14183 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14184 AX_PTHREAD_ZOS_MISSING
14185 # endif
14186
14187 _ACEOF
14188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14189 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14190 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14191 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
14192 fi
14193 rm -f conftest*
14194
14195 ;;
14196
14197 solaris*)
14198
14199 # On Solaris (at least, for some versions), libc contains stubbed
14200 # (non-functional) versions of the pthreads routines, so link-based
14201 # tests will erroneously succeed. (N.B.: The stubs are missing
14202 # pthread_cleanup_push, or rather a function called by this macro,
14203 # so we could check for that, but who knows whether they'll stub
14204 # that too in a future libc.) So we'll check first for the
14205 # standard Solaris way of linking pthreads (-mt -lpthread).
14206
14207 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
14208 ;;
14209 esac
14210
14211 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14212
14213 if test "x$GCC" = "xyes"; then :
14214 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
14215 fi
14216
14217 # The presence of a feature test macro requesting re-entrant function
14218 # definitions is, on some systems, a strong hint that pthreads support is
14219 # correctly enabled
14220
14221 case $host_os in
14222 darwin* | hpux* | linux* | osf* | solaris*)
14223 ax_pthread_check_macro="_REENTRANT"
14224 ;;
14225
14226 aix*)
14227 ax_pthread_check_macro="_THREAD_SAFE"
14228 ;;
14229
14230 *)
14231 ax_pthread_check_macro="--"
14232 ;;
14233 esac
14234 if test "x$ax_pthread_check_macro" = "x--"; then :
14235 ax_pthread_check_cond=0
14236 else
14237 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
14238 fi
14239
14240 # Are we compiling with Clang?
14241
14242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14243 $as_echo_n "checking whether $CC is Clang... " >&6; }
14244 if ${ax_cv_PTHREAD_CLANG+:} false; then :
14245 $as_echo_n "(cached) " >&6
14246 else
14247 ax_cv_PTHREAD_CLANG=no
14248 # Note that Autoconf sets GCC=yes for Clang as well as GCC
14249 if test "x$GCC" = "xyes"; then
14250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14251 /* end confdefs.h. */
14252 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14253 # if defined(__clang__) && defined(__llvm__)
14254 AX_PTHREAD_CC_IS_CLANG
14255 # endif
14256
14257 _ACEOF
14258 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14259 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14260 ax_cv_PTHREAD_CLANG=yes
14261 fi
14262 rm -f conftest*
14263
14264 fi
14265
14266 fi
14267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14268 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14269 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
14270
14271 ax_pthread_clang_warning=no
14272
14273 # Clang needs special handling, because older versions handle the -pthread
14274 # option in a rather... idiosyncratic way
14275
14276 if test "x$ax_pthread_clang" = "xyes"; then
14277
14278 # Clang takes -pthread; it has never supported any other flag
14279
14280 # (Note 1: This will need to be revisited if a system that Clang
14281 # supports has POSIX threads in a separate library. This tends not
14282 # to be the way of modern systems, but it's conceivable.)
14283
14284 # (Note 2: On some systems, notably Darwin, -pthread is not needed
14285 # to get POSIX threads support; the API is always present and
14286 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
14287 # -pthread does define _REENTRANT, and while the Darwin headers
14288 # ignore this macro, third-party headers might not.)
14289
14290 PTHREAD_CFLAGS="-pthread"
14291 PTHREAD_LIBS=
14292
14293 ax_pthread_ok=yes
14294
14295 # However, older versions of Clang make a point of warning the user
14296 # that, in an invocation where only linking and no compilation is
14297 # taking place, the -pthread option has no effect ("argument unused
14298 # during compilation"). They expect -pthread to be passed in only
14299 # when source code is being compiled.
14300 #
14301 # Problem is, this is at odds with the way Automake and most other
14302 # C build frameworks function, which is that the same flags used in
14303 # compilation (CFLAGS) are also used in linking. Many systems
14304 # supported by AX_PTHREAD require exactly this for POSIX threads
14305 # support, and in fact it is often not straightforward to specify a
14306 # flag that is used only in the compilation phase and not in
14307 # linking. Such a scenario is extremely rare in practice.
14308 #
14309 # Even though use of the -pthread flag in linking would only print
14310 # a warning, this can be a nuisance for well-run software projects
14311 # that build with -Werror. So if the active version of Clang has
14312 # this misfeature, we search for an option to squash it.
14313
14314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14315 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14316 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14317 $as_echo_n "(cached) " >&6
14318 else
14319 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14320 # Create an alternate version of $ac_link that compiles and
14321 # links in two steps (.c -> .o, .o -> exe) instead of one
14322 # (.c -> exe), because the warning occurs only in the second
14323 # step
14324 ax_pthread_save_ac_link="$ac_link"
14325 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14326 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14327 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14328 ax_pthread_save_CFLAGS="$CFLAGS"
14329 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14330 if test "x$ax_pthread_try" = "xunknown"; then :
14331 break
14332 fi
14333 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14334 ac_link="$ax_pthread_save_ac_link"
14335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14336 /* end confdefs.h. */
14337 int main(void){return 0;}
14338 _ACEOF
14339 if ac_fn_c_try_link "$LINENO"; then :
14340 ac_link="$ax_pthread_2step_ac_link"
14341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14342 /* end confdefs.h. */
14343 int main(void){return 0;}
14344 _ACEOF
14345 if ac_fn_c_try_link "$LINENO"; then :
14346 break
14347 fi
14348 rm -f core conftest.err conftest.$ac_objext \
14349 conftest$ac_exeext conftest.$ac_ext
14350
14351 fi
14352 rm -f core conftest.err conftest.$ac_objext \
14353 conftest$ac_exeext conftest.$ac_ext
14354 done
14355 ac_link="$ax_pthread_save_ac_link"
14356 CFLAGS="$ax_pthread_save_CFLAGS"
14357 if test "x$ax_pthread_try" = "x"; then :
14358 ax_pthread_try=no
14359 fi
14360 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
14361
14362 fi
14363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14364 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
14365
14366 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14367 no | unknown) ;;
14368 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14369 esac
14370
14371 fi # $ax_pthread_clang = yes
14372
14373 if test "x$ax_pthread_ok" = "xno"; then
14374 for ax_pthread_try_flag in $ax_pthread_flags; do
14375
14376 case $ax_pthread_try_flag in
14377 none)
14378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14379 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
14380 ;;
14381
14382 -mt,pthread)
14383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14384 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14385 PTHREAD_CFLAGS="-mt"
14386 PTHREAD_LIBS="-lpthread"
14387 ;;
14388
14389 -*)
14390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14391 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14392 PTHREAD_CFLAGS="$ax_pthread_try_flag"
14393 ;;
14394
14395 pthread-config)
14396 # Extract the first word of "pthread-config", so it can be a program name with args.
14397 set dummy pthread-config; ac_word=$2
14398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14399 $as_echo_n "checking for $ac_word... " >&6; }
14400 if ${ac_cv_prog_ax_pthread_config+:} false; then :
14401 $as_echo_n "(cached) " >&6
14402 else
14403 if test -n "$ax_pthread_config"; then
14404 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14405 else
14406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14407 for as_dir in $PATH
14408 do
14409 IFS=$as_save_IFS
14410 test -z "$as_dir" && as_dir=.
14411 for ac_exec_ext in '' $ac_executable_extensions; do
14412 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14413 ac_cv_prog_ax_pthread_config="yes"
14414 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14415 break 2
14416 fi
14417 done
14418 done
14419 IFS=$as_save_IFS
14420
14421 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14422 fi
14423 fi
14424 ax_pthread_config=$ac_cv_prog_ax_pthread_config
14425 if test -n "$ax_pthread_config"; then
14426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14427 $as_echo "$ax_pthread_config" >&6; }
14428 else
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14430 $as_echo "no" >&6; }
14431 fi
14432
14433
14434 if test "x$ax_pthread_config" = "xno"; then :
14435 continue
14436 fi
14437 PTHREAD_CFLAGS="`pthread-config --cflags`"
14438 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14439 ;;
14440
14441 *)
14442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14443 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14444 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14445 ;;
14446 esac
14447
14448 ax_pthread_save_CFLAGS="$CFLAGS"
14449 ax_pthread_save_LIBS="$LIBS"
14450 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14451 LIBS="$PTHREAD_LIBS $LIBS"
14452
14453 # Check for various functions. We must include pthread.h,
14454 # since some functions may be macros. (On the Sequent, we
14455 # need a special flag -Kthread to make this header compile.)
14456 # We check for pthread_join because it is in -lpthread on IRIX
14457 # while pthread_create is in libc. We check for pthread_attr_init
14458 # due to DEC craziness with -lpthreads. We check for
14459 # pthread_cleanup_push because it is one of the few pthread
14460 # functions on Solaris that doesn't have a non-functional libc stub.
14461 # We try pthread_create on general principles.
14462
14463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14464 /* end confdefs.h. */
14465 #include <pthread.h>
14466 # if $ax_pthread_check_cond
14467 # error "$ax_pthread_check_macro must be defined"
14468 # endif
14469 static void routine(void *a) { a = 0; }
14470 static void *start_routine(void *a) { return a; }
14471 int
14472 main ()
14473 {
14474 pthread_t th; pthread_attr_t attr;
14475 pthread_create(&th, 0, start_routine, 0);
14476 pthread_join(th, 0);
14477 pthread_attr_init(&attr);
14478 pthread_cleanup_push(routine, 0);
14479 pthread_cleanup_pop(0) /* ; */
14480 ;
14481 return 0;
14482 }
14483 _ACEOF
14484 if ac_fn_c_try_link "$LINENO"; then :
14485 ax_pthread_ok=yes
14486 fi
14487 rm -f core conftest.err conftest.$ac_objext \
14488 conftest$ac_exeext conftest.$ac_ext
14489
14490 CFLAGS="$ax_pthread_save_CFLAGS"
14491 LIBS="$ax_pthread_save_LIBS"
14492
14493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14494 $as_echo "$ax_pthread_ok" >&6; }
14495 if test "x$ax_pthread_ok" = "xyes"; then :
14496 break
14497 fi
14498
14499 PTHREAD_LIBS=""
14500 PTHREAD_CFLAGS=""
14501 done
14502 fi
14503
14504 # Various other checks:
14505 if test "x$ax_pthread_ok" = "xyes"; then
14506 ax_pthread_save_CFLAGS="$CFLAGS"
14507 ax_pthread_save_LIBS="$LIBS"
14508 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14509 LIBS="$PTHREAD_LIBS $LIBS"
14510
14511 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14513 $as_echo_n "checking for joinable pthread attribute... " >&6; }
14514 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14515 $as_echo_n "(cached) " >&6
14516 else
14517 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14518 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14520 /* end confdefs.h. */
14521 #include <pthread.h>
14522 int
14523 main ()
14524 {
14525 int attr = $ax_pthread_attr; return attr /* ; */
14526 ;
14527 return 0;
14528 }
14529 _ACEOF
14530 if ac_fn_c_try_link "$LINENO"; then :
14531 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14532 fi
14533 rm -f core conftest.err conftest.$ac_objext \
14534 conftest$ac_exeext conftest.$ac_ext
14535 done
14536
14537 fi
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14539 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14540 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14541 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14542 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14543
14544 cat >>confdefs.h <<_ACEOF
14545 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14546 _ACEOF
14547
14548 ax_pthread_joinable_attr_defined=yes
14549
14550 fi
14551
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14553 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14554 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14555 $as_echo_n "(cached) " >&6
14556 else
14557 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14558 case $host_os in
14559 solaris*)
14560 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14561 ;;
14562 esac
14563
14564 fi
14565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14566 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14567 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14568 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14569 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14570 ax_pthread_special_flags_added=yes
14571 fi
14572
14573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14574 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14575 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14576 $as_echo_n "(cached) " >&6
14577 else
14578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14579 /* end confdefs.h. */
14580 #include <pthread.h>
14581 int
14582 main ()
14583 {
14584 int i = PTHREAD_PRIO_INHERIT;
14585 ;
14586 return 0;
14587 }
14588 _ACEOF
14589 if ac_fn_c_try_link "$LINENO"; then :
14590 ax_cv_PTHREAD_PRIO_INHERIT=yes
14591 else
14592 ax_cv_PTHREAD_PRIO_INHERIT=no
14593 fi
14594 rm -f core conftest.err conftest.$ac_objext \
14595 conftest$ac_exeext conftest.$ac_ext
14596
14597 fi
14598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14599 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14600 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14601 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14602
14603 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14604
14605 ax_pthread_prio_inherit_defined=yes
14606
14607 fi
14608
14609 CFLAGS="$ax_pthread_save_CFLAGS"
14610 LIBS="$ax_pthread_save_LIBS"
14611
14612 # More AIX lossage: compile with *_r variant
14613 if test "x$GCC" != "xyes"; then
14614 case $host_os in
14615 aix*)
14616 case "x/$CC" in #(
14617 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14618 #handle absolute path differently from PATH based program lookup
14619 case "x$CC" in #(
14620 x/*) :
14621 if as_fn_executable_p ${CC}_r; then :
14622 PTHREAD_CC="${CC}_r"
14623 fi ;; #(
14624 *) :
14625 for ac_prog in ${CC}_r
14626 do
14627 # Extract the first word of "$ac_prog", so it can be a program name with args.
14628 set dummy $ac_prog; ac_word=$2
14629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14630 $as_echo_n "checking for $ac_word... " >&6; }
14631 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14632 $as_echo_n "(cached) " >&6
14633 else
14634 if test -n "$PTHREAD_CC"; then
14635 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14636 else
14637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14638 for as_dir in $PATH
14639 do
14640 IFS=$as_save_IFS
14641 test -z "$as_dir" && as_dir=.
14642 for ac_exec_ext in '' $ac_executable_extensions; do
14643 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14644 ac_cv_prog_PTHREAD_CC="$ac_prog"
14645 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14646 break 2
14647 fi
14648 done
14649 done
14650 IFS=$as_save_IFS
14651
14652 fi
14653 fi
14654 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14655 if test -n "$PTHREAD_CC"; then
14656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14657 $as_echo "$PTHREAD_CC" >&6; }
14658 else
14659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14660 $as_echo "no" >&6; }
14661 fi
14662
14663
14664 test -n "$PTHREAD_CC" && break
14665 done
14666 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14667 ;;
14668 esac ;; #(
14669 *) :
14670 ;;
14671 esac
14672 ;;
14673 esac
14674 fi
14675 fi
14676
14677 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14678
14679
14680
14681
14682
14683 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14684 if test "x$ax_pthread_ok" = "xyes"; then
14685 threads=yes
14686 :
14687 else
14688 ax_pthread_ok=no
14689 threads=no
14690 fi
14691 ac_ext=cpp
14692 ac_cpp='$CXXCPP $CPPFLAGS'
14693 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14694 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14695 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14696
14697
14698 if test "$threads" = "yes"; then
14699 save_LIBS="$LIBS"
14700 LIBS="$PTHREAD_LIBS $LIBS"
14701 save_CXXFLAGS="$CXXFLAGS"
14702 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14704 $as_echo_n "checking for std::thread... " >&6; }
14705 if ${gdb_cv_cxx_std_thread+:} false; then :
14706 $as_echo_n "(cached) " >&6
14707 else
14708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14709 /* end confdefs.h. */
14710 #include <thread>
14711 void callback() { }
14712 int
14713 main ()
14714 {
14715 std::thread t(callback);
14716 ;
14717 return 0;
14718 }
14719 _ACEOF
14720 if ac_fn_cxx_try_compile "$LINENO"; then :
14721 gdb_cv_cxx_std_thread=yes
14722 else
14723 gdb_cv_cxx_std_thread=no
14724 fi
14725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14726 fi
14727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14728 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
14729
14730 # This check must be here, while LIBS includes any necessary
14731 # threading library.
14732 for ac_func in pthread_sigmask pthread_setname_np
14733 do :
14734 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14735 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14736 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14737 cat >>confdefs.h <<_ACEOF
14738 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14739 _ACEOF
14740
14741 fi
14742 done
14743
14744
14745 LIBS="$save_LIBS"
14746 CXXFLAGS="$save_CXXFLAGS"
14747 fi
14748 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14749
14750 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14751
14752 fi
14753 ac_ext=c
14754 ac_cpp='$CPP $CPPFLAGS'
14755 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14756 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14757 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14758
14759
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14761 $as_echo_n "checking for sigsetjmp... " >&6; }
14762 if ${gdb_cv_func_sigsetjmp+:} false; then :
14763 $as_echo_n "(cached) " >&6
14764 else
14765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14766 /* end confdefs.h. */
14767 #include <setjmp.h>
14768 int
14769 main ()
14770 {
14771 sigjmp_buf env;
14772 while (! sigsetjmp (env, 1))
14773 siglongjmp (env, 1);
14774
14775 ;
14776 return 0;
14777 }
14778 _ACEOF
14779 if ac_fn_c_try_compile "$LINENO"; then :
14780 gdb_cv_func_sigsetjmp=yes
14781 else
14782 gdb_cv_func_sigsetjmp=no
14783
14784 fi
14785 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14786
14787 fi
14788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14789 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14790 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14791
14792 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14793
14794 fi
14795
14796
14797 # Check whether --with-intel_pt was given.
14798 if test "${with_intel_pt+set}" = set; then :
14799 withval=$with_intel_pt;
14800 else
14801 with_intel_pt=auto
14802 fi
14803
14804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14805 $as_echo_n "checking whether to use intel pt... " >&6; }
14806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14807 $as_echo "$with_intel_pt" >&6; }
14808
14809 if test "${with_intel_pt}" = no; then
14810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14811 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14812 HAVE_LIBIPT=no
14813 else
14814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14815 /* end confdefs.h. */
14816
14817 #include <linux/perf_event.h>
14818 #ifndef PERF_ATTR_SIZE_VER5
14819 # error
14820 #endif
14821
14822 _ACEOF
14823 if ac_fn_c_try_cpp "$LINENO"; then :
14824 perf_event=yes
14825 else
14826 perf_event=no
14827 fi
14828 rm -f conftest.err conftest.i conftest.$ac_ext
14829 if test "$perf_event" != yes; then
14830 if test "$with_intel_pt" = yes; then
14831 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14832 else
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14834 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14835 fi
14836 fi
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846 use_additional=yes
14847
14848 acl_save_prefix="$prefix"
14849 prefix="$acl_final_prefix"
14850 acl_save_exec_prefix="$exec_prefix"
14851 exec_prefix="$acl_final_exec_prefix"
14852
14853 eval additional_includedir=\"$includedir\"
14854 eval additional_libdir=\"$libdir\"
14855
14856 exec_prefix="$acl_save_exec_prefix"
14857 prefix="$acl_save_prefix"
14858
14859
14860 # Check whether --with-libipt-prefix was given.
14861 if test "${with_libipt_prefix+set}" = set; then :
14862 withval=$with_libipt_prefix;
14863 if test "X$withval" = "Xno"; then
14864 use_additional=no
14865 else
14866 if test "X$withval" = "X"; then
14867
14868 acl_save_prefix="$prefix"
14869 prefix="$acl_final_prefix"
14870 acl_save_exec_prefix="$exec_prefix"
14871 exec_prefix="$acl_final_exec_prefix"
14872
14873 eval additional_includedir=\"$includedir\"
14874 eval additional_libdir=\"$libdir\"
14875
14876 exec_prefix="$acl_save_exec_prefix"
14877 prefix="$acl_save_prefix"
14878
14879 else
14880 additional_includedir="$withval/include"
14881 additional_libdir="$withval/lib"
14882 fi
14883 fi
14884
14885 fi
14886
14887
14888 # Check whether --with-libipt-type was given.
14889 if test "${with_libipt_type+set}" = set; then :
14890 withval=$with_libipt_type; with_libipt_type=$withval
14891 else
14892 with_libipt_type=auto
14893 fi
14894
14895 lib_type=`eval echo \$with_libipt_type`
14896
14897 LIBIPT=
14898 LTLIBIPT=
14899 INCIPT=
14900 rpathdirs=
14901 ltrpathdirs=
14902 names_already_handled=
14903 names_next_round='ipt '
14904 while test -n "$names_next_round"; do
14905 names_this_round="$names_next_round"
14906 names_next_round=
14907 for name in $names_this_round; do
14908 already_handled=
14909 for n in $names_already_handled; do
14910 if test "$n" = "$name"; then
14911 already_handled=yes
14912 break
14913 fi
14914 done
14915 if test -z "$already_handled"; then
14916 names_already_handled="$names_already_handled $name"
14917 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14918 eval value=\"\$HAVE_LIB$uppername\"
14919 if test -n "$value"; then
14920 if test "$value" = yes; then
14921 eval value=\"\$LIB$uppername\"
14922 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14923 eval value=\"\$LTLIB$uppername\"
14924 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14925 else
14926 :
14927 fi
14928 else
14929 found_dir=
14930 found_la=
14931 found_so=
14932 found_a=
14933 if test $use_additional = yes; then
14934 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14935 found_dir="$additional_libdir"
14936 found_so="$additional_libdir/lib$name.$shlibext"
14937 if test -f "$additional_libdir/lib$name.la"; then
14938 found_la="$additional_libdir/lib$name.la"
14939 fi
14940 elif test x$lib_type != xshared; then
14941 if test -f "$additional_libdir/lib$name.$libext"; then
14942 found_dir="$additional_libdir"
14943 found_a="$additional_libdir/lib$name.$libext"
14944 if test -f "$additional_libdir/lib$name.la"; then
14945 found_la="$additional_libdir/lib$name.la"
14946 fi
14947 fi
14948 fi
14949 fi
14950 if test "X$found_dir" = "X"; then
14951 for x in $LDFLAGS $LTLIBIPT; do
14952
14953 acl_save_prefix="$prefix"
14954 prefix="$acl_final_prefix"
14955 acl_save_exec_prefix="$exec_prefix"
14956 exec_prefix="$acl_final_exec_prefix"
14957 eval x=\"$x\"
14958 exec_prefix="$acl_save_exec_prefix"
14959 prefix="$acl_save_prefix"
14960
14961 case "$x" in
14962 -L*)
14963 dir=`echo "X$x" | sed -e 's/^X-L//'`
14964 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14965 found_dir="$dir"
14966 found_so="$dir/lib$name.$shlibext"
14967 if test -f "$dir/lib$name.la"; then
14968 found_la="$dir/lib$name.la"
14969 fi
14970 elif test x$lib_type != xshared; then
14971 if test -f "$dir/lib$name.$libext"; then
14972 found_dir="$dir"
14973 found_a="$dir/lib$name.$libext"
14974 if test -f "$dir/lib$name.la"; then
14975 found_la="$dir/lib$name.la"
14976 fi
14977 fi
14978 fi
14979 ;;
14980 esac
14981 if test "X$found_dir" != "X"; then
14982 break
14983 fi
14984 done
14985 fi
14986 if test "X$found_dir" != "X"; then
14987 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14988 if test "X$found_so" != "X"; then
14989 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14990 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14991 else
14992 haveit=
14993 for x in $ltrpathdirs; do
14994 if test "X$x" = "X$found_dir"; then
14995 haveit=yes
14996 break
14997 fi
14998 done
14999 if test -z "$haveit"; then
15000 ltrpathdirs="$ltrpathdirs $found_dir"
15001 fi
15002 if test "$hardcode_direct" = yes; then
15003 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15004 else
15005 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15006 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15007 haveit=
15008 for x in $rpathdirs; do
15009 if test "X$x" = "X$found_dir"; then
15010 haveit=yes
15011 break
15012 fi
15013 done
15014 if test -z "$haveit"; then
15015 rpathdirs="$rpathdirs $found_dir"
15016 fi
15017 else
15018 haveit=
15019 for x in $LDFLAGS $LIBIPT; do
15020
15021 acl_save_prefix="$prefix"
15022 prefix="$acl_final_prefix"
15023 acl_save_exec_prefix="$exec_prefix"
15024 exec_prefix="$acl_final_exec_prefix"
15025 eval x=\"$x\"
15026 exec_prefix="$acl_save_exec_prefix"
15027 prefix="$acl_save_prefix"
15028
15029 if test "X$x" = "X-L$found_dir"; then
15030 haveit=yes
15031 break
15032 fi
15033 done
15034 if test -z "$haveit"; then
15035 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
15036 fi
15037 if test "$hardcode_minus_L" != no; then
15038 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15039 else
15040 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15041 fi
15042 fi
15043 fi
15044 fi
15045 else
15046 if test "X$found_a" != "X"; then
15047 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
15048 else
15049 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
15050 fi
15051 fi
15052 additional_includedir=
15053 case "$found_dir" in
15054 */lib | */lib/)
15055 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15056 additional_includedir="$basedir/include"
15057 ;;
15058 esac
15059 if test "X$additional_includedir" != "X"; then
15060 if test "X$additional_includedir" != "X/usr/include"; then
15061 haveit=
15062 if test "X$additional_includedir" = "X/usr/local/include"; then
15063 if test -n "$GCC"; then
15064 case $host_os in
15065 linux*) haveit=yes;;
15066 esac
15067 fi
15068 fi
15069 if test -z "$haveit"; then
15070 for x in $CPPFLAGS $INCIPT; do
15071
15072 acl_save_prefix="$prefix"
15073 prefix="$acl_final_prefix"
15074 acl_save_exec_prefix="$exec_prefix"
15075 exec_prefix="$acl_final_exec_prefix"
15076 eval x=\"$x\"
15077 exec_prefix="$acl_save_exec_prefix"
15078 prefix="$acl_save_prefix"
15079
15080 if test "X$x" = "X-I$additional_includedir"; then
15081 haveit=yes
15082 break
15083 fi
15084 done
15085 if test -z "$haveit"; then
15086 if test -d "$additional_includedir"; then
15087 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
15088 fi
15089 fi
15090 fi
15091 fi
15092 fi
15093 if test -n "$found_la"; then
15094 save_libdir="$libdir"
15095 case "$found_la" in
15096 */* | *\\*) . "$found_la" ;;
15097 *) . "./$found_la" ;;
15098 esac
15099 libdir="$save_libdir"
15100 for dep in $dependency_libs; do
15101 case "$dep" in
15102 -L*)
15103 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15104 if test "X$additional_libdir" != "X/usr/lib"; then
15105 haveit=
15106 if test "X$additional_libdir" = "X/usr/local/lib"; then
15107 if test -n "$GCC"; then
15108 case $host_os in
15109 linux*) haveit=yes;;
15110 esac
15111 fi
15112 fi
15113 if test -z "$haveit"; then
15114 haveit=
15115 for x in $LDFLAGS $LIBIPT; do
15116
15117 acl_save_prefix="$prefix"
15118 prefix="$acl_final_prefix"
15119 acl_save_exec_prefix="$exec_prefix"
15120 exec_prefix="$acl_final_exec_prefix"
15121 eval x=\"$x\"
15122 exec_prefix="$acl_save_exec_prefix"
15123 prefix="$acl_save_prefix"
15124
15125 if test "X$x" = "X-L$additional_libdir"; then
15126 haveit=yes
15127 break
15128 fi
15129 done
15130 if test -z "$haveit"; then
15131 if test -d "$additional_libdir"; then
15132 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
15133 fi
15134 fi
15135 haveit=
15136 for x in $LDFLAGS $LTLIBIPT; do
15137
15138 acl_save_prefix="$prefix"
15139 prefix="$acl_final_prefix"
15140 acl_save_exec_prefix="$exec_prefix"
15141 exec_prefix="$acl_final_exec_prefix"
15142 eval x=\"$x\"
15143 exec_prefix="$acl_save_exec_prefix"
15144 prefix="$acl_save_prefix"
15145
15146 if test "X$x" = "X-L$additional_libdir"; then
15147 haveit=yes
15148 break
15149 fi
15150 done
15151 if test -z "$haveit"; then
15152 if test -d "$additional_libdir"; then
15153 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
15154 fi
15155 fi
15156 fi
15157 fi
15158 ;;
15159 -R*)
15160 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15161 if test "$enable_rpath" != no; then
15162 haveit=
15163 for x in $rpathdirs; do
15164 if test "X$x" = "X$dir"; then
15165 haveit=yes
15166 break
15167 fi
15168 done
15169 if test -z "$haveit"; then
15170 rpathdirs="$rpathdirs $dir"
15171 fi
15172 haveit=
15173 for x in $ltrpathdirs; do
15174 if test "X$x" = "X$dir"; then
15175 haveit=yes
15176 break
15177 fi
15178 done
15179 if test -z "$haveit"; then
15180 ltrpathdirs="$ltrpathdirs $dir"
15181 fi
15182 fi
15183 ;;
15184 -l*)
15185 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15186 ;;
15187 *.la)
15188 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15189 ;;
15190 *)
15191 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
15192 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
15193 ;;
15194 esac
15195 done
15196 fi
15197 else
15198 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
15199 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15200 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
15201 else
15202 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
15203 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
15204 fi
15205 fi
15206 fi
15207 fi
15208 done
15209 done
15210 if test "X$rpathdirs" != "X"; then
15211 if test -n "$hardcode_libdir_separator"; then
15212 alldirs=
15213 for found_dir in $rpathdirs; do
15214 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15215 done
15216 acl_save_libdir="$libdir"
15217 libdir="$alldirs"
15218 eval flag=\"$hardcode_libdir_flag_spec\"
15219 libdir="$acl_save_libdir"
15220 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15221 else
15222 for found_dir in $rpathdirs; do
15223 acl_save_libdir="$libdir"
15224 libdir="$found_dir"
15225 eval flag=\"$hardcode_libdir_flag_spec\"
15226 libdir="$acl_save_libdir"
15227 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15228 done
15229 fi
15230 fi
15231 if test "X$ltrpathdirs" != "X"; then
15232 for found_dir in $ltrpathdirs; do
15233 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
15234 done
15235 fi
15236
15237
15238 ac_save_CPPFLAGS="$CPPFLAGS"
15239
15240 for element in $INCIPT; do
15241 haveit=
15242 for x in $CPPFLAGS; do
15243
15244 acl_save_prefix="$prefix"
15245 prefix="$acl_final_prefix"
15246 acl_save_exec_prefix="$exec_prefix"
15247 exec_prefix="$acl_final_exec_prefix"
15248 eval x=\"$x\"
15249 exec_prefix="$acl_save_exec_prefix"
15250 prefix="$acl_save_prefix"
15251
15252 if test "X$x" = "X$element"; then
15253 haveit=yes
15254 break
15255 fi
15256 done
15257 if test -z "$haveit"; then
15258 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15259 fi
15260 done
15261
15262
15263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
15264 $as_echo_n "checking for libipt... " >&6; }
15265 if ${ac_cv_libipt+:} false; then :
15266 $as_echo_n "(cached) " >&6
15267 else
15268
15269 ac_save_LIBS="$LIBS"
15270 LIBS="$LIBS $LIBIPT"
15271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15272 /* end confdefs.h. */
15273 #include "intel-pt.h"
15274 int
15275 main ()
15276 {
15277 pt_insn_alloc_decoder (0);
15278 ;
15279 return 0;
15280 }
15281 _ACEOF
15282 if ac_fn_c_try_link "$LINENO"; then :
15283 ac_cv_libipt=yes
15284 else
15285 ac_cv_libipt=no
15286 fi
15287 rm -f core conftest.err conftest.$ac_objext \
15288 conftest$ac_exeext conftest.$ac_ext
15289 LIBS="$ac_save_LIBS"
15290
15291 fi
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
15293 $as_echo "$ac_cv_libipt" >&6; }
15294 if test "$ac_cv_libipt" = yes; then
15295 HAVE_LIBIPT=yes
15296
15297 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
15298
15299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
15300 $as_echo_n "checking how to link with libipt... " >&6; }
15301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
15302 $as_echo "$LIBIPT" >&6; }
15303 else
15304 HAVE_LIBIPT=no
15305 CPPFLAGS="$ac_save_CPPFLAGS"
15306 LIBIPT=
15307 LTLIBIPT=
15308 fi
15309
15310
15311
15312
15313
15314
15315 if test "$HAVE_LIBIPT" != yes; then
15316 if test "$with_intel_pt" = yes; then
15317 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
15318 else
15319 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
15320 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
15321 fi
15322 else
15323 save_LIBS=$LIBS
15324 LIBS="$LIBS $LIBIPT"
15325 for ac_func in pt_insn_event
15326 do :
15327 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
15328 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
15329 cat >>confdefs.h <<_ACEOF
15330 #define HAVE_PT_INSN_EVENT 1
15331 _ACEOF
15332
15333 fi
15334 done
15335
15336 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
15337 "
15338 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
15339
15340 cat >>confdefs.h <<_ACEOF
15341 #define HAVE_STRUCT_PT_INSN_ENABLED 1
15342 _ACEOF
15343
15344
15345 fi
15346 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
15347 "
15348 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
15349
15350 cat >>confdefs.h <<_ACEOF
15351 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
15352 _ACEOF
15353
15354
15355 fi
15356
15357 LIBS=$save_LIBS
15358 fi
15359 fi
15360
15361 # Check if the compiler and runtime support printing long longs.
15362
15363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15364 $as_echo_n "checking for long long support in printf... " >&6; }
15365 if ${gdb_cv_printf_has_long_long+:} false; then :
15366 $as_echo_n "(cached) " >&6
15367 else
15368 if test "$cross_compiling" = yes; then :
15369 gdb_cv_printf_has_long_long=no
15370 else
15371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15372 /* end confdefs.h. */
15373 $ac_includes_default
15374 int
15375 main ()
15376 {
15377 char buf[32];
15378 long long l = 0;
15379 l = (l << 16) + 0x0123;
15380 l = (l << 16) + 0x4567;
15381 l = (l << 16) + 0x89ab;
15382 l = (l << 16) + 0xcdef;
15383 sprintf (buf, "0x%016llx", l);
15384 return (strcmp ("0x0123456789abcdef", buf));
15385 ;
15386 return 0;
15387 }
15388 _ACEOF
15389 if ac_fn_c_try_run "$LINENO"; then :
15390 gdb_cv_printf_has_long_long=yes
15391 else
15392 gdb_cv_printf_has_long_long=no
15393 fi
15394 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15395 conftest.$ac_objext conftest.beam conftest.$ac_ext
15396 fi
15397
15398 fi
15399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15400 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15401 if test "$gdb_cv_printf_has_long_long" = yes; then
15402
15403 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15404
15405 fi
15406
15407
15408 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15409
15410 for ac_header in sys/procfs.h
15411 do :
15412 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
15413 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
15414 cat >>confdefs.h <<_ACEOF
15415 #define HAVE_SYS_PROCFS_H 1
15416 _ACEOF
15417
15418 fi
15419
15420 done
15421
15422 if test "$ac_cv_header_sys_procfs_h" = yes; then
15423
15424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15425 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15426 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
15427 $as_echo_n "(cached) " >&6
15428 else
15429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15430 /* end confdefs.h. */
15431
15432 #define _SYSCALL32
15433 #include <sys/procfs.h>
15434 int
15435 main ()
15436 {
15437 gregset_t avar
15438 ;
15439 return 0;
15440 }
15441 _ACEOF
15442 if ac_fn_c_try_compile "$LINENO"; then :
15443 bfd_cv_have_sys_procfs_type_gregset_t=yes
15444 else
15445 bfd_cv_have_sys_procfs_type_gregset_t=no
15446
15447 fi
15448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15449 fi
15450
15451 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
15452
15453 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
15454
15455 fi
15456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15457 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
15458
15459
15460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15461 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15462 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
15463 $as_echo_n "(cached) " >&6
15464 else
15465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15466 /* end confdefs.h. */
15467
15468 #define _SYSCALL32
15469 #include <sys/procfs.h>
15470 int
15471 main ()
15472 {
15473 fpregset_t avar
15474 ;
15475 return 0;
15476 }
15477 _ACEOF
15478 if ac_fn_c_try_compile "$LINENO"; then :
15479 bfd_cv_have_sys_procfs_type_fpregset_t=yes
15480 else
15481 bfd_cv_have_sys_procfs_type_fpregset_t=no
15482
15483 fi
15484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15485 fi
15486
15487 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
15488
15489 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
15490
15491 fi
15492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15493 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
15494
15495
15496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15497 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15498 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
15499 $as_echo_n "(cached) " >&6
15500 else
15501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15502 /* end confdefs.h. */
15503
15504 #define _SYSCALL32
15505 #include <sys/procfs.h>
15506 int
15507 main ()
15508 {
15509 prgregset_t avar
15510 ;
15511 return 0;
15512 }
15513 _ACEOF
15514 if ac_fn_c_try_compile "$LINENO"; then :
15515 bfd_cv_have_sys_procfs_type_prgregset_t=yes
15516 else
15517 bfd_cv_have_sys_procfs_type_prgregset_t=no
15518
15519 fi
15520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15521 fi
15522
15523 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
15524
15525 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15526
15527 fi
15528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15529 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15530
15531
15532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15533 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15534 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
15535 $as_echo_n "(cached) " >&6
15536 else
15537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15538 /* end confdefs.h. */
15539
15540 #define _SYSCALL32
15541 #include <sys/procfs.h>
15542 int
15543 main ()
15544 {
15545 prfpregset_t avar
15546 ;
15547 return 0;
15548 }
15549 _ACEOF
15550 if ac_fn_c_try_compile "$LINENO"; then :
15551 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
15552 else
15553 bfd_cv_have_sys_procfs_type_prfpregset_t=no
15554
15555 fi
15556 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15557 fi
15558
15559 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15560
15561 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15562
15563 fi
15564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15565 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15566
15567
15568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15569 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15570 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15571 $as_echo_n "(cached) " >&6
15572 else
15573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15574 /* end confdefs.h. */
15575
15576 #define _SYSCALL32
15577 #include <sys/procfs.h>
15578 int
15579 main ()
15580 {
15581 prgregset32_t avar
15582 ;
15583 return 0;
15584 }
15585 _ACEOF
15586 if ac_fn_c_try_compile "$LINENO"; then :
15587 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15588 else
15589 bfd_cv_have_sys_procfs_type_prgregset32_t=no
15590
15591 fi
15592 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15593 fi
15594
15595 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15596
15597 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15598
15599 fi
15600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15601 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15602
15603
15604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15605 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15606 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15607 $as_echo_n "(cached) " >&6
15608 else
15609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15610 /* end confdefs.h. */
15611
15612 #define _SYSCALL32
15613 #include <sys/procfs.h>
15614 int
15615 main ()
15616 {
15617 lwpid_t avar
15618 ;
15619 return 0;
15620 }
15621 _ACEOF
15622 if ac_fn_c_try_compile "$LINENO"; then :
15623 bfd_cv_have_sys_procfs_type_lwpid_t=yes
15624 else
15625 bfd_cv_have_sys_procfs_type_lwpid_t=no
15626
15627 fi
15628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15629 fi
15630
15631 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15632
15633 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15634
15635 fi
15636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15637 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15638
15639
15640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15641 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15642 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15643 $as_echo_n "(cached) " >&6
15644 else
15645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15646 /* end confdefs.h. */
15647
15648 #define _SYSCALL32
15649 #include <sys/procfs.h>
15650 int
15651 main ()
15652 {
15653 psaddr_t avar
15654 ;
15655 return 0;
15656 }
15657 _ACEOF
15658 if ac_fn_c_try_compile "$LINENO"; then :
15659 bfd_cv_have_sys_procfs_type_psaddr_t=yes
15660 else
15661 bfd_cv_have_sys_procfs_type_psaddr_t=no
15662
15663 fi
15664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15665 fi
15666
15667 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15668
15669 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15670
15671 fi
15672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15673 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15674
15675
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15677 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15678 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15679 $as_echo_n "(cached) " >&6
15680 else
15681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15682 /* end confdefs.h. */
15683
15684 #define _SYSCALL32
15685 #include <sys/procfs.h>
15686 int
15687 main ()
15688 {
15689 elf_fpregset_t avar
15690 ;
15691 return 0;
15692 }
15693 _ACEOF
15694 if ac_fn_c_try_compile "$LINENO"; then :
15695 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15696 else
15697 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15698
15699 fi
15700 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15701 fi
15702
15703 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15704
15705 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15706
15707 fi
15708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15709 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15710
15711 fi
15712
15713
15714 # Check the return and argument types of ptrace.
15715
15716
15717 for ac_header in sys/ptrace.h ptrace.h
15718 do :
15719 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15720 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15721 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15722 cat >>confdefs.h <<_ACEOF
15723 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15724 _ACEOF
15725
15726 fi
15727
15728 done
15729
15730
15731 gdb_ptrace_headers='
15732 #include <sys/types.h>
15733 #if HAVE_SYS_PTRACE_H
15734 # include <sys/ptrace.h>
15735 #endif
15736 #if HAVE_UNISTD_H
15737 # include <unistd.h>
15738 #endif
15739 '
15740
15741 # Check return type. Varargs (used on GNU/Linux) conflict with the
15742 # empty argument list, so check for that explicitly.
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15744 $as_echo_n "checking return type of ptrace... " >&6; }
15745 if ${gdb_cv_func_ptrace_ret+:} false; then :
15746 $as_echo_n "(cached) " >&6
15747 else
15748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15749 /* end confdefs.h. */
15750  $gdb_ptrace_headers
15751 int
15752 main ()
15753 {
15754 extern long ptrace (enum __ptrace_request, ...);
15755
15756 ;
15757 return 0;
15758 }
15759 _ACEOF
15760 if ac_fn_c_try_compile "$LINENO"; then :
15761 gdb_cv_func_ptrace_ret='long'
15762 else
15763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15764 /* end confdefs.h. */
15765 $gdb_ptrace_headers
15766 int
15767 main ()
15768 {
15769 extern int ptrace ();
15770
15771 ;
15772 return 0;
15773 }
15774 _ACEOF
15775 if ac_fn_c_try_compile "$LINENO"; then :
15776 gdb_cv_func_ptrace_ret='int'
15777 else
15778 gdb_cv_func_ptrace_ret='long'
15779
15780 fi
15781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15782
15783 fi
15784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15785
15786 fi
15787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15788 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15789
15790
15791 cat >>confdefs.h <<_ACEOF
15792 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15793 _ACEOF
15794
15795
15796 # Check argument types.
15797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15798 $as_echo_n "checking types of arguments for ptrace... " >&6; }
15799 if ${gdb_cv_func_ptrace_args+:} false; then :
15800 $as_echo_n "(cached) " >&6
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 long ptrace (enum __ptrace_request, ...);
15809
15810 ;
15811 return 0;
15812 }
15813 _ACEOF
15814 if ac_fn_c_try_compile "$LINENO"; then :
15815 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15816 else
15817 for gdb_arg1 in 'int' 'long'; do
15818 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15819 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15820 for gdb_arg4 in 'int' 'long' 'void *'; do
15821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15822 /* end confdefs.h. */
15823 $gdb_ptrace_headers
15824 int
15825 main ()
15826 {
15827 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15828
15829 ;
15830 return 0;
15831 }
15832 _ACEOF
15833 if ac_fn_c_try_compile "$LINENO"; then :
15834 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15835 break 4;
15836
15837 fi
15838 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15839
15840 for gdb_arg5 in 'int *' 'int' 'long'; do
15841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15842 /* end confdefs.h. */
15843 $gdb_ptrace_headers
15844 int
15845 main ()
15846 {
15847 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15848
15849 ;
15850 return 0;
15851 }
15852 _ACEOF
15853 if ac_fn_c_try_compile "$LINENO"; then :
15854 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15855 break 5;
15856
15857 fi
15858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15859 done
15860 done
15861 done
15862 done
15863 done
15864 # Provide a safe default value.
15865 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15866
15867 fi
15868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15869
15870 fi
15871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15872 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15873
15874 ac_save_IFS=$IFS; IFS=','
15875 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15876 IFS=$ac_save_IFS
15877 shift
15878
15879 cat >>confdefs.h <<_ACEOF
15880 #define PTRACE_TYPE_ARG1 $1
15881 _ACEOF
15882
15883
15884 cat >>confdefs.h <<_ACEOF
15885 #define PTRACE_TYPE_ARG3 $3
15886 _ACEOF
15887
15888
15889 cat >>confdefs.h <<_ACEOF
15890 #define PTRACE_TYPE_ARG4 $4
15891 _ACEOF
15892
15893 if test -n "$5"; then
15894
15895 cat >>confdefs.h <<_ACEOF
15896 #define PTRACE_TYPE_ARG5 $5
15897 _ACEOF
15898
15899 fi
15900
15901
15902 if test "$cross_compiling" = no; then
15903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15904 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15905 if ${ac_cv_func_setpgrp_void+:} false; then :
15906 $as_echo_n "(cached) " >&6
15907 else
15908 if test "$cross_compiling" = yes; then :
15909 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15910 else
15911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15912 /* end confdefs.h. */
15913 $ac_includes_default
15914 int
15915 main ()
15916 {
15917 /* If this system has a BSD-style setpgrp which takes arguments,
15918 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15919 exit successfully. */
15920 return setpgrp (1,1) != -1;
15921 ;
15922 return 0;
15923 }
15924 _ACEOF
15925 if ac_fn_c_try_run "$LINENO"; then :
15926 ac_cv_func_setpgrp_void=no
15927 else
15928 ac_cv_func_setpgrp_void=yes
15929 fi
15930 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15931 conftest.$ac_objext conftest.beam conftest.$ac_ext
15932 fi
15933
15934 fi
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15936 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15937 if test $ac_cv_func_setpgrp_void = yes; then
15938
15939 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15940
15941 fi
15942
15943 else
15944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15945 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15946 if ${ac_cv_func_setpgrp_void+:} false; then :
15947 $as_echo_n "(cached) " >&6
15948 else
15949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15950 /* end confdefs.h. */
15951 #include <unistd.h>
15952 int
15953 main ()
15954 {
15955 if (setpgrp(1,1) == -1)
15956 exit (0);
15957 else
15958 exit (1);
15959
15960 ;
15961 return 0;
15962 }
15963 _ACEOF
15964 if ac_fn_c_try_compile "$LINENO"; then :
15965 ac_cv_func_setpgrp_void=no
15966 else
15967 ac_cv_func_setpgrp_void=yes
15968
15969 fi
15970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15971
15972 fi
15973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15974 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15975 if test "$ac_cv_func_setpgrp_void" = yes; then
15976 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15977
15978 fi
15979 fi
15980
15981 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15982 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15983 #include <sys/proc.h>
15984
15985 "
15986 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15987
15988 cat >>confdefs.h <<_ACEOF
15989 #define HAVE_STRUCT_THREAD_TD_PCB 1
15990 _ACEOF
15991
15992
15993 fi
15994
15995
15996 # See if <sys/lwp.h> defines `struct lwp`.
15997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15998 $as_echo_n "checking for struct lwp... " >&6; }
15999 if ${gdb_cv_struct_lwp+:} false; then :
16000 $as_echo_n "(cached) " >&6
16001 else
16002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16003 /* end confdefs.h. */
16004 #include <sys/param.h>
16005 #define _KMEMUSER
16006 #include <sys/lwp.h>
16007 int
16008 main ()
16009 {
16010 struct lwp l;
16011
16012 ;
16013 return 0;
16014 }
16015 _ACEOF
16016 if ac_fn_c_try_compile "$LINENO"; then :
16017 gdb_cv_struct_lwp=yes
16018 else
16019 gdb_cv_struct_lwp=no
16020
16021 fi
16022 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16023
16024 fi
16025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
16026 $as_echo "$gdb_cv_struct_lwp" >&6; }
16027 if test "$gdb_cv_struct_lwp" = yes; then
16028
16029 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
16030
16031 fi
16032
16033 # See if <machine/reg.h> degines `struct reg'.
16034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
16035 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
16036 if ${gdb_cv_struct_reg+:} false; then :
16037 $as_echo_n "(cached) " >&6
16038 else
16039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16040 /* end confdefs.h. */
16041 #include <sys/types.h>
16042 #include <machine/reg.h>
16043 int
16044 main ()
16045 {
16046 struct reg r;
16047
16048 ;
16049 return 0;
16050 }
16051 _ACEOF
16052 if ac_fn_c_try_compile "$LINENO"; then :
16053 gdb_cv_struct_reg=yes
16054 else
16055 gdb_cv_struct_reg=no
16056
16057 fi
16058 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16059
16060 fi
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
16062 $as_echo "$gdb_cv_struct_reg" >&6; }
16063 if test "$gdb_cv_struct_reg" = yes; then
16064
16065 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
16066
16067 fi
16068
16069 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16070 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
16071 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
16072 #include <machine/reg.h>
16073 "
16074 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
16075
16076 cat >>confdefs.h <<_ACEOF
16077 #define HAVE_STRUCT_REG_R_FS 1
16078 _ACEOF
16079
16080
16081 fi
16082 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
16083 #include <machine/reg.h>
16084 "
16085 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
16086
16087 cat >>confdefs.h <<_ACEOF
16088 #define HAVE_STRUCT_REG_R_GS 1
16089 _ACEOF
16090
16091
16092 fi
16093
16094
16095 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
16096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
16097 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
16098 if ${gdb_cv_have_ptrace_getregs+:} false; then :
16099 $as_echo_n "(cached) " >&6
16100 else
16101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16102 /* end confdefs.h. */
16103 #include <sys/ptrace.h>
16104 int
16105 main ()
16106 {
16107 PTRACE_GETREGS;
16108 ;
16109 return 0;
16110 }
16111 _ACEOF
16112 if ac_fn_c_try_compile "$LINENO"; then :
16113 gdb_cv_have_ptrace_getregs=yes
16114 else
16115 gdb_cv_have_ptrace_getregs=no
16116
16117 fi
16118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16119
16120 fi
16121
16122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
16123 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
16124 if test "$gdb_cv_have_ptrace_getregs" = yes; then
16125
16126 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
16127
16128 fi
16129
16130 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
16131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
16132 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
16133 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
16134 $as_echo_n "(cached) " >&6
16135 else
16136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16137 /* end confdefs.h. */
16138 #include <sys/ptrace.h>
16139 int
16140 main ()
16141 {
16142 PTRACE_GETFPXREGS;
16143 ;
16144 return 0;
16145 }
16146 _ACEOF
16147 if ac_fn_c_try_compile "$LINENO"; then :
16148 gdb_cv_have_ptrace_getfpxregs=yes
16149 else
16150 gdb_cv_have_ptrace_getfpxregs=no
16151
16152 fi
16153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16154
16155 fi
16156
16157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16158 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
16159 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
16160
16161 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
16162
16163 fi
16164
16165 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
16166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
16167 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
16168 if ${gdb_cv_have_pt_getdbregs+:} false; then :
16169 $as_echo_n "(cached) " >&6
16170 else
16171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16172 /* end confdefs.h. */
16173 #include <sys/types.h>
16174 #include <sys/ptrace.h>
16175 int
16176 main ()
16177 {
16178 PT_GETDBREGS;
16179
16180 ;
16181 return 0;
16182 }
16183 _ACEOF
16184 if ac_fn_c_try_compile "$LINENO"; then :
16185 gdb_cv_have_pt_getdbregs=yes
16186 else
16187 gdb_cv_have_pt_getdbregs=no
16188
16189 fi
16190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16191
16192 fi
16193
16194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
16195 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
16196 if test "$gdb_cv_have_pt_getdbregs" = yes; then
16197
16198 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
16199
16200 fi
16201
16202 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
16203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
16204 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
16205 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
16206 $as_echo_n "(cached) " >&6
16207 else
16208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16209 /* end confdefs.h. */
16210 #include <sys/types.h>
16211 #include <sys/ptrace.h>
16212 int
16213 main ()
16214 {
16215 PT_GETXMMREGS;
16216
16217 ;
16218 return 0;
16219 }
16220 _ACEOF
16221 if ac_fn_c_try_compile "$LINENO"; then :
16222 gdb_cv_have_pt_getxmmregs=yes
16223 else
16224 gdb_cv_have_pt_getxmmregs=no
16225
16226 fi
16227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16228
16229 fi
16230
16231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
16232 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
16233 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
16234
16235 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
16236
16237 fi
16238
16239 # See if <sys/ptrace.h> supports LWP names on FreeBSD
16240 # Older FreeBSD versions don't have the pl_tdname member of
16241 # `struct ptrace_lwpinfo'.
16242 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
16243 "
16244 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
16245
16246 cat >>confdefs.h <<_ACEOF
16247 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
16248 _ACEOF
16249
16250
16251 fi
16252
16253
16254 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
16255 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
16256 # FreeBSD 10.3.
16257 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>
16258 "
16259 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
16260
16261 cat >>confdefs.h <<_ACEOF
16262 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
16263 _ACEOF
16264
16265
16266 fi
16267
16268
16269 # Check if the compiler supports the `long long' type.
16270
16271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
16272 $as_echo_n "checking for long long support in compiler... " >&6; }
16273 if ${gdb_cv_c_long_long+:} false; then :
16274 $as_echo_n "(cached) " >&6
16275 else
16276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16277 /* end confdefs.h. */
16278 extern long long foo;
16279 int
16280 main ()
16281 {
16282 switch (foo & 2) { case 0: return 1; }
16283 ;
16284 return 0;
16285 }
16286 _ACEOF
16287 if ac_fn_c_try_compile "$LINENO"; then :
16288 gdb_cv_c_long_long=yes
16289 else
16290 gdb_cv_c_long_long=no
16291 fi
16292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16293 fi
16294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
16295 $as_echo "$gdb_cv_c_long_long" >&6; }
16296 if test "$gdb_cv_c_long_long" != yes; then
16297 # libdecnumber requires long long.
16298 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
16299 fi
16300
16301 # Check if the compiler and runtime support printing decfloats.
16302
16303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
16304 $as_echo_n "checking for decfloat support in printf... " >&6; }
16305 if ${gdb_cv_printf_has_decfloat+:} false; then :
16306 $as_echo_n "(cached) " >&6
16307 else
16308 if test "$cross_compiling" = yes; then :
16309 gdb_cv_printf_has_decfloat=no
16310 else
16311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16312 /* end confdefs.h. */
16313 $ac_includes_default
16314 int
16315 main ()
16316 {
16317 char buf[64];
16318 _Decimal32 d32 = 1.2345df;
16319 _Decimal64 d64 = 1.2345dd;
16320 _Decimal128 d128 = 1.2345dl;
16321 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
16322 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
16323 ;
16324 return 0;
16325 }
16326 _ACEOF
16327 if ac_fn_c_try_run "$LINENO"; then :
16328 gdb_cv_printf_has_decfloat=yes
16329 else
16330 gdb_cv_printf_has_decfloat=no
16331 fi
16332 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16333 conftest.$ac_objext conftest.beam conftest.$ac_ext
16334 fi
16335
16336 fi
16337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
16338 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
16339 if test "$gdb_cv_printf_has_decfloat" = yes; then
16340
16341 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
16342
16343 fi
16344
16345 # Check if the compiler supports the `long double' type. We can't use
16346 # AC_C_LONG_DOUBLE because that one does additional checks on the
16347 # constants defined in <float.h> that fail on some systems,
16348 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
16349
16350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
16351 $as_echo_n "checking for long double support in compiler... " >&6; }
16352 if ${gdb_cv_c_long_double+:} false; then :
16353 $as_echo_n "(cached) " >&6
16354 else
16355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16356 /* end confdefs.h. */
16357 long double foo;
16358 _ACEOF
16359 if ac_fn_c_try_compile "$LINENO"; then :
16360 gdb_cv_c_long_double=yes
16361 else
16362 gdb_cv_c_long_double=no
16363 fi
16364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16365 fi
16366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
16367 $as_echo "$gdb_cv_c_long_double" >&6; }
16368 if test "$gdb_cv_c_long_double" = yes; then
16369
16370 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16371
16372 fi
16373
16374 # Check if the compiler and runtime support printing long doubles.
16375
16376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
16377 $as_echo_n "checking for long double support in printf... " >&6; }
16378 if ${gdb_cv_printf_has_long_double+:} false; then :
16379 $as_echo_n "(cached) " >&6
16380 else
16381 if test "$cross_compiling" = yes; then :
16382 gdb_cv_printf_has_long_double=no
16383 else
16384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16385 /* end confdefs.h. */
16386 $ac_includes_default
16387 int
16388 main ()
16389 {
16390 char buf[16];
16391 long double f = 3.141592653;
16392 sprintf (buf, "%Lg", f);
16393 return (strncmp ("3.14159", buf, 7));
16394 ;
16395 return 0;
16396 }
16397 _ACEOF
16398 if ac_fn_c_try_run "$LINENO"; then :
16399 gdb_cv_printf_has_long_double=yes
16400 else
16401 gdb_cv_printf_has_long_double=no
16402 fi
16403 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16404 conftest.$ac_objext conftest.beam conftest.$ac_ext
16405 fi
16406
16407 fi
16408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
16409 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
16410 if test "$gdb_cv_printf_has_long_double" = yes; then
16411
16412 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
16413
16414 fi
16415
16416 # Check if the compiler and runtime support scanning long doubles.
16417
16418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
16419 $as_echo_n "checking for long double support in scanf... " >&6; }
16420 if ${gdb_cv_scanf_has_long_double+:} false; then :
16421 $as_echo_n "(cached) " >&6
16422 else
16423 if test "$cross_compiling" = yes; then :
16424 gdb_cv_scanf_has_long_double=no
16425 else
16426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427 /* end confdefs.h. */
16428 #include <stdio.h>
16429 int
16430 main ()
16431 {
16432 char *buf = "3.141592653";
16433 long double f = 0;
16434 sscanf (buf, "%Lg", &f);
16435 return !(f > 3.14159 && f < 3.14160);
16436 ;
16437 return 0;
16438 }
16439 _ACEOF
16440 if ac_fn_c_try_run "$LINENO"; then :
16441 gdb_cv_scanf_has_long_double=yes
16442 else
16443 gdb_cv_scanf_has_long_double=no
16444 fi
16445 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16446 conftest.$ac_objext conftest.beam conftest.$ac_ext
16447 fi
16448
16449 fi
16450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16451 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
16452 if test "$gdb_cv_scanf_has_long_double" = yes; then
16453
16454 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
16455
16456 fi
16457
16458 case ${host_os} in
16459 aix*)
16460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16461 $as_echo_n "checking for -bbigtoc option... " >&6; }
16462 if ${gdb_cv_bigtoc+:} false; then :
16463 $as_echo_n "(cached) " >&6
16464 else
16465 SAVE_LDFLAGS=$LDFLAGS
16466
16467 case $GCC in
16468 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16469 *) gdb_cv_bigtoc=-bbigtoc ;;
16470 esac
16471
16472 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16474 /* end confdefs.h. */
16475
16476 int
16477 main ()
16478 {
16479 int i;
16480 ;
16481 return 0;
16482 }
16483 _ACEOF
16484 if ac_fn_c_try_link "$LINENO"; then :
16485
16486 else
16487 gdb_cv_bigtoc=
16488
16489 fi
16490 rm -f core conftest.err conftest.$ac_objext \
16491 conftest$ac_exeext conftest.$ac_ext
16492 LDFLAGS="${SAVE_LDFLAGS}"
16493
16494 fi
16495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16496 $as_echo "$gdb_cv_bigtoc" >&6; }
16497 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16498 ;;
16499 esac
16500
16501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16502 $as_echo_n "checking for the dynamic export flag... " >&6; }
16503 dynamic_list=false
16504 if test "${gdb_native}" = yes; then
16505 # The dynamically loaded libthread_db needs access to symbols in the gdb
16506 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16507 # may not be supported there.
16508 old_LDFLAGS="$LDFLAGS"
16509 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16510 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16511 LDFLAGS="$LDFLAGS $RDYNAMIC"
16512 if test "${have_libpython}" = no; then
16513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16514 /* end confdefs.h. */
16515
16516 int
16517 main ()
16518 {
16519
16520 ;
16521 return 0;
16522 }
16523 _ACEOF
16524 if ac_fn_c_try_link "$LINENO"; then :
16525 dynamic_list=true
16526 fi
16527 rm -f core conftest.err conftest.$ac_objext \
16528 conftest$ac_exeext conftest.$ac_ext
16529 else
16530 # Workaround http://bugs.python.org/issue4434 where static
16531 # libpythonX.Y.a would get its symbols required for
16532 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16533 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16534
16535 # Note the workaround for Python
16536 # http://bugs.python.org/issue10112 earlier has removed
16537 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16538 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16539 # always pass.
16540 old_CFLAGS="$CFLAGS"
16541 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16542 old_LIBS="$LIBS"
16543 LIBS="$LIBS $PYTHON_LIBS"
16544 old_CPPFLAGS="$CPPFLAGS"
16545 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16546 if test "$cross_compiling" = yes; then :
16547 true
16548 else
16549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16550 /* end confdefs.h. */
16551 #include "Python.h"
16552 int
16553 main ()
16554 {
16555 int err;
16556 Py_Initialize ();
16557 err = PyRun_SimpleString ("import ctypes\n");
16558 Py_Finalize ();
16559 return err == 0 ? 0 : 1;
16560 ;
16561 return 0;
16562 }
16563 _ACEOF
16564 if ac_fn_c_try_run "$LINENO"; then :
16565 dynamic_list=true
16566 fi
16567 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16568 conftest.$ac_objext conftest.beam conftest.$ac_ext
16569 fi
16570
16571 LIBS="$old_LIBS"
16572 CFLAGS="$old_CFLAGS"
16573 CPPFLAGS="$old_CPPFLAGS"
16574 fi
16575 LDFLAGS="$old_LDFLAGS"
16576 fi
16577 if $dynamic_list; then
16578 found="-Wl,--dynamic-list"
16579 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16580 else
16581 found="-rdynamic"
16582 RDYNAMIC="-rdynamic"
16583 fi
16584
16585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16586 $as_echo "$found" >&6; }
16587
16588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether execinfo.h backtrace is available" >&5
16589 $as_echo_n "checking whether execinfo.h backtrace is available... " >&6; }
16590 if ${gdb_cv_execinfo_backtrace+:} false; then :
16591 $as_echo_n "(cached) " >&6
16592 else
16593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16594 /* end confdefs.h. */
16595
16596 #include <execinfo.h>
16597
16598 int
16599 main ()
16600 {
16601
16602 int f;
16603 void *b[2];
16604 f = backtrace (b, 2);
16605 backtrace_symbols_fd (b, f, 2);
16606
16607 ;
16608 return 0;
16609 }
16610 _ACEOF
16611 if ac_fn_c_try_link "$LINENO"; then :
16612 gdb_cv_execinfo_backtrace=yes
16613 else
16614 gdb_cv_execinfo_backtrace=no
16615 fi
16616 rm -f core conftest.err conftest.$ac_objext \
16617 conftest$ac_exeext conftest.$ac_ext
16618 fi
16619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_execinfo_backtrace" >&5
16620 $as_echo "$gdb_cv_execinfo_backtrace" >&6; }
16621 if test "$gdb_cv_execinfo_backtrace" = yes; then
16622
16623 $as_echo "#define HAVE_EXECINFO_BACKTRACE 1" >>confdefs.h
16624
16625 fi
16626
16627
16628 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16629 case ${host_os} in
16630 aix*)
16631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16632 $as_echo_n "checking for AiX thread debugging library... " >&6; }
16633 if ${gdb_cv_have_aix_thread_debug+:} false; then :
16634 $as_echo_n "(cached) " >&6
16635 else
16636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16637 /* end confdefs.h. */
16638 #include <sys/pthdebug.h>
16639 int
16640 main ()
16641 {
16642 #ifndef PTHDB_VERSION_3
16643 #error
16644 #endif
16645
16646 ;
16647 return 0;
16648 }
16649 _ACEOF
16650 if ac_fn_c_try_compile "$LINENO"; then :
16651 gdb_cv_have_aix_thread_debug=yes
16652 else
16653 gdb_cv_have_aix_thread_debug=no
16654
16655 fi
16656 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16657
16658 fi
16659
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16661 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16662 if test "$gdb_cv_have_aix_thread_debug" = yes; then
16663 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16664 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16665 LIBS="$LIBS -lpthdebug"
16666
16667 # Older versions of AIX do not provide the declaration for
16668 # the getthrds function (it appears that it was introduced
16669 # with AIX 6.x).
16670 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16671 "
16672 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16673 ac_have_decl=1
16674 else
16675 ac_have_decl=0
16676 fi
16677
16678 cat >>confdefs.h <<_ACEOF
16679 #define HAVE_DECL_GETTHRDS $ac_have_decl
16680 _ACEOF
16681
16682 fi
16683 ;;
16684 esac
16685
16686 fi
16687
16688 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16690 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16691 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16692 $as_echo_n "(cached) " >&6
16693 else
16694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16695 /* end confdefs.h. */
16696 #include <thread_db.h>
16697 int
16698 main ()
16699 {
16700 int i = TD_NOTALLOC;
16701
16702 ;
16703 return 0;
16704 }
16705 _ACEOF
16706 if ac_fn_c_try_compile "$LINENO"; then :
16707 gdb_cv_thread_db_h_has_td_notalloc=yes
16708 else
16709 gdb_cv_thread_db_h_has_td_notalloc=no
16710
16711 fi
16712 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16713
16714 fi
16715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16716 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16717
16718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16719 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16720 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16721 $as_echo_n "(cached) " >&6
16722 else
16723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16724 /* end confdefs.h. */
16725 #include <thread_db.h>
16726 int
16727 main ()
16728 {
16729 int i = TD_VERSION;
16730
16731 ;
16732 return 0;
16733 }
16734 _ACEOF
16735 if ac_fn_c_try_compile "$LINENO"; then :
16736 gdb_cv_thread_db_h_has_td_version=yes
16737 else
16738 gdb_cv_thread_db_h_has_td_version=no
16739
16740 fi
16741 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16742
16743 fi
16744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16745 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16746
16747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16748 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16749 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16750 $as_echo_n "(cached) " >&6
16751 else
16752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16753 /* end confdefs.h. */
16754 #include <thread_db.h>
16755 int
16756 main ()
16757 {
16758 int i = TD_NOTLS;
16759
16760 ;
16761 return 0;
16762 }
16763 _ACEOF
16764 if ac_fn_c_try_compile "$LINENO"; then :
16765 gdb_cv_thread_db_h_has_td_notls=yes
16766 else
16767 gdb_cv_thread_db_h_has_td_notls=no
16768
16769 fi
16770 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16771
16772 fi
16773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16774 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16775 fi
16776 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16777
16778 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16779
16780 fi
16781 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16782
16783 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16784
16785 fi
16786 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16787
16788 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16789
16790 fi
16791
16792 case $host_os in
16793 go32* | *djgpp*)
16794 gdbinit=gdb.ini
16795 ;;
16796 *)
16797 gdbinit=.gdbinit
16798 ;;
16799 esac
16800
16801 cat >>confdefs.h <<_ACEOF
16802 #define GDBINIT "$gdbinit"
16803 _ACEOF
16804
16805
16806
16807 cat >>confdefs.h <<_ACEOF
16808 #define GDBEARLYINIT ".gdbearlyinit"
16809 _ACEOF
16810
16811
16812
16813 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16814 # except that the argument to --with-sysroot is optional.
16815 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16816 if test "x$with_sysroot" = xyes; then
16817 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16818 fi
16819
16820 # Check whether --with-sysroot was given.
16821 if test "${with_sysroot+set}" = set; then :
16822 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16823 else
16824 TARGET_SYSTEM_ROOT=
16825 fi
16826
16827
16828 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16829 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16830 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16831 ac_define_dir=`eval echo $ac_define_dir`
16832
16833 cat >>confdefs.h <<_ACEOF
16834 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16835 _ACEOF
16836
16837
16838
16839
16840 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16841 if test "x$prefix" = xNONE; then
16842 test_prefix=/usr/local
16843 else
16844 test_prefix=$prefix
16845 fi
16846 else
16847 test_prefix=$exec_prefix
16848 fi
16849 value=0
16850 case ${ac_define_dir} in
16851 "${test_prefix}"|"${test_prefix}/"*|\
16852 '${exec_prefix}'|'${exec_prefix}/'*)
16853 value=1
16854 ;;
16855 esac
16856
16857 cat >>confdefs.h <<_ACEOF
16858 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16859 _ACEOF
16860
16861
16862
16863
16864
16865 # Check whether --with-system-gdbinit was given.
16866 if test "${with_system_gdbinit+set}" = set; then :
16867 withval=$with_system_gdbinit;
16868 SYSTEM_GDBINIT=$withval
16869 else
16870 SYSTEM_GDBINIT=
16871 fi
16872
16873
16874 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16875 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16876 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16877 ac_define_dir=`eval echo $ac_define_dir`
16878
16879 cat >>confdefs.h <<_ACEOF
16880 #define SYSTEM_GDBINIT "$ac_define_dir"
16881 _ACEOF
16882
16883
16884
16885
16886 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16887 if test "x$prefix" = xNONE; then
16888 test_prefix=/usr/local
16889 else
16890 test_prefix=$prefix
16891 fi
16892 else
16893 test_prefix=$exec_prefix
16894 fi
16895 value=0
16896 case ${ac_define_dir} in
16897 "${test_prefix}"|"${test_prefix}/"*|\
16898 '${exec_prefix}'|'${exec_prefix}/'*)
16899 value=1
16900 ;;
16901 esac
16902
16903 cat >>confdefs.h <<_ACEOF
16904 #define SYSTEM_GDBINIT_RELOCATABLE $value
16905 _ACEOF
16906
16907
16908
16909
16910
16911 # Check whether --with-system-gdbinit-dir was given.
16912 if test "${with_system_gdbinit_dir+set}" = set; then :
16913 withval=$with_system_gdbinit_dir;
16914 SYSTEM_GDBINIT_DIR=$withval
16915 else
16916 SYSTEM_GDBINIT_DIR=
16917 fi
16918
16919
16920 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16921 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16922 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16923 ac_define_dir=`eval echo $ac_define_dir`
16924
16925 cat >>confdefs.h <<_ACEOF
16926 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16927 _ACEOF
16928
16929
16930
16931
16932 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16933 if test "x$prefix" = xNONE; then
16934 test_prefix=/usr/local
16935 else
16936 test_prefix=$prefix
16937 fi
16938 else
16939 test_prefix=$exec_prefix
16940 fi
16941 value=0
16942 case ${ac_define_dir} in
16943 "${test_prefix}"|"${test_prefix}/"*|\
16944 '${exec_prefix}'|'${exec_prefix}/'*)
16945 value=1
16946 ;;
16947 esac
16948
16949 cat >>confdefs.h <<_ACEOF
16950 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16951 _ACEOF
16952
16953
16954
16955
16956
16957 # Check whether --enable-werror was given.
16958 if test "${enable_werror+set}" = set; then :
16959 enableval=$enable_werror; case "${enableval}" in
16960 yes | y) ERROR_ON_WARNING="yes" ;;
16961 no | n) ERROR_ON_WARNING="no" ;;
16962 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16963 esac
16964 fi
16965
16966
16967 # Enable -Werror by default when using gcc. Turn it off for releases.
16968 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16969 ERROR_ON_WARNING=yes
16970 fi
16971
16972 WERROR_CFLAGS=""
16973 if test "${ERROR_ON_WARNING}" = yes ; then
16974 WERROR_CFLAGS="-Werror"
16975 fi
16976
16977 # The options we'll try to enable.
16978 build_warnings="-Wall -Wpointer-arith \
16979 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16980 -Wno-switch -Wno-char-subscripts \
16981 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16982 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16983 -Wno-mismatched-tags \
16984 -Wno-error=deprecated-register \
16985 -Wsuggest-override \
16986 -Wimplicit-fallthrough=3 \
16987 -Wduplicated-cond \
16988 -Wshadow=local \
16989 -Wdeprecated-copy \
16990 -Wdeprecated-copy-dtor \
16991 -Wredundant-move \
16992 -Wmissing-declarations \
16993 -Wmissing-prototypes \
16994 -Wstrict-null-sentinel \
16995 "
16996
16997 case "${host}" in
16998 *-*-mingw32*)
16999 # Enable -Wno-format by default when using gcc on mingw since many
17000 # GCC versions complain about %I64.
17001 build_warnings="$build_warnings -Wno-format" ;;
17002 *-*-solaris*)
17003 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
17004 # doesn't understand.
17005 build_warnings="$build_warnings -Wno-unknown-pragmas"
17006 # Solaris 11 <unistd.h> marks vfork deprecated.
17007 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
17008 *)
17009 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
17010 # but there's a special case for this below.
17011 build_warnings="$build_warnings -Wformat-nonliteral" ;;
17012 esac
17013
17014 # Check whether --enable-build-warnings was given.
17015 if test "${enable_build_warnings+set}" = set; then :
17016 enableval=$enable_build_warnings; case "${enableval}" in
17017 yes) ;;
17018 no) build_warnings="-w";;
17019 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17020 build_warnings="${build_warnings} ${t}";;
17021 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17022 build_warnings="${t} ${build_warnings}";;
17023 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17024 esac
17025 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17026 echo "Setting compiler warning flags = $build_warnings" 6>&1
17027 fi
17028 fi
17029 # Check whether --enable-gdb-build-warnings was given.
17030 if test "${enable_gdb_build_warnings+set}" = set; then :
17031 enableval=$enable_gdb_build_warnings; case "${enableval}" in
17032 yes) ;;
17033 no) build_warnings="-w";;
17034 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17035 build_warnings="${build_warnings} ${t}";;
17036 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17037 build_warnings="${t} ${build_warnings}";;
17038 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17039 esac
17040 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17041 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
17042 fi
17043 fi
17044
17045 # The set of warnings supported by a C++ compiler is not the same as
17046 # of the C compiler.
17047 ac_ext=cpp
17048 ac_cpp='$CXXCPP $CPPFLAGS'
17049 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17050 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17051 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17052
17053
17054 WARN_CFLAGS=""
17055 if test "x${build_warnings}" != x -a "x$GCC" = xyes
17056 then
17057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
17058 $as_echo_n "checking compiler warning flags... " >&6; }
17059 # Separate out the -Werror flag as some files just cannot be
17060 # compiled with it enabled.
17061 for w in ${build_warnings}; do
17062 # GCC does not complain about -Wno-unknown-warning. Invert
17063 # and test -Wunknown-warning instead.
17064 case $w in
17065 -Wno-*)
17066 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
17067 -Wformat-nonliteral)
17068 # gcc requires -Wformat before -Wformat-nonliteral
17069 # will work, so stick them together.
17070 w="-Wformat $w"
17071 wtest="$w"
17072 ;;
17073 *)
17074 wtest=$w ;;
17075 esac
17076
17077 case $w in
17078 -Werr*) WERROR_CFLAGS=-Werror ;;
17079 *)
17080 # Check whether GCC accepts it.
17081 saved_CFLAGS="$CFLAGS"
17082 CFLAGS="$CFLAGS -Werror $wtest"
17083 saved_CXXFLAGS="$CXXFLAGS"
17084 CXXFLAGS="$CXXFLAGS -Werror $wtest"
17085 if test "x$w" = "x-Wunused-variable"; then
17086 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
17087 # fixed in GCC 4.9. This test is derived from the gdb
17088 # source code that triggered this bug in GCC.
17089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17090 /* end confdefs.h. */
17091 struct scoped_restore_base {};
17092 struct scoped_restore_tmpl : public scoped_restore_base {
17093 ~scoped_restore_tmpl() {}
17094 };
17095 int
17096 main ()
17097 {
17098 const scoped_restore_base &b = scoped_restore_tmpl();
17099
17100 ;
17101 return 0;
17102 }
17103 _ACEOF
17104 if ac_fn_cxx_try_compile "$LINENO"; then :
17105 WARN_CFLAGS="${WARN_CFLAGS} $w"
17106 fi
17107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17108 else
17109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17110 /* end confdefs.h. */
17111
17112 int
17113 main ()
17114 {
17115
17116 ;
17117 return 0;
17118 }
17119 _ACEOF
17120 if ac_fn_cxx_try_compile "$LINENO"; then :
17121 WARN_CFLAGS="${WARN_CFLAGS} $w"
17122 fi
17123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17124 fi
17125 CFLAGS="$saved_CFLAGS"
17126 CXXFLAGS="$saved_CXXFLAGS"
17127 esac
17128 done
17129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
17130 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
17131 fi
17132
17133
17134
17135 ac_ext=c
17136 ac_cpp='$CPP $CPPFLAGS'
17137 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17138 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17139 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17140
17141
17142
17143 # Check whether --enable-ubsan was given.
17144 if test "${enable_ubsan+set}" = set; then :
17145 enableval=$enable_ubsan;
17146 else
17147 enable_ubsan=no
17148 fi
17149
17150 if test "x$enable_ubsan" = xauto; then
17151 if $development; then
17152 enable_ubsan=yes
17153 fi
17154 fi
17155 ac_ext=cpp
17156 ac_cpp='$CXXCPP $CPPFLAGS'
17157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17158 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17160
17161 if test "x$enable_ubsan" = xyes; then
17162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
17163 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
17164 saved_CXXFLAGS="$CXXFLAGS"
17165 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17167 /* end confdefs.h. */
17168
17169 int
17170 main ()
17171 {
17172
17173 ;
17174 return 0;
17175 }
17176 _ACEOF
17177 if ac_fn_cxx_try_link "$LINENO"; then :
17178 enable_ubsan=yes
17179 else
17180 enable_ubsan=no
17181
17182 fi
17183 rm -f core conftest.err conftest.$ac_objext \
17184 conftest$ac_exeext conftest.$ac_ext
17185 CXXFLAGS="$saved_CXXFLAGS"
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
17187 $as_echo "$enable_ubsan" >&6; }
17188 if test "x$enable_ubsan" = xyes; then
17189 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17190 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
17191 fi
17192 fi
17193 ac_ext=c
17194 ac_cpp='$CPP $CPPFLAGS'
17195 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17196 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17197 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17198
17199
17200
17201 # In the Cygwin environment, we need some additional flags.
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
17203 $as_echo_n "checking for cygwin... " >&6; }
17204 if ${gdb_cv_os_cygwin+:} false; then :
17205 $as_echo_n "(cached) " >&6
17206 else
17207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17208 /* end confdefs.h. */
17209
17210 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
17211 lose
17212 #endif
17213 _ACEOF
17214 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17215 $EGREP "^lose$" >/dev/null 2>&1; then :
17216 gdb_cv_os_cygwin=yes
17217 else
17218 gdb_cv_os_cygwin=no
17219 fi
17220 rm -f conftest*
17221
17222 fi
17223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
17224 $as_echo "$gdb_cv_os_cygwin" >&6; }
17225
17226
17227 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
17228 case ${host} in
17229 *go32* ) SER_HARDWIRE=ser-go32.o ;;
17230 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
17231 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
17232 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
17233 esac
17234
17235
17236 # libreadline needs libuser32.a in a cygwin environment
17237 WIN32LIBS=
17238 if test x"$gdb_cv_os_cygwin" = xyes; then
17239 WIN32LIBS="-luser32"
17240 case "${target}" in
17241 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
17242 ;;
17243 esac
17244 fi
17245
17246 # The ser-tcp.c module requires sockets.
17247 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
17248 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
17249
17250 # Add ELF support to GDB, but only if BFD includes ELF support.
17251
17252 OLD_CFLAGS=$CFLAGS
17253 OLD_LDFLAGS=$LDFLAGS
17254 OLD_LIBS=$LIBS
17255 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17256 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17257 # always want our bfd.
17258 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17259 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17260 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17261 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17262 LIBS="-lbfd -liberty -lz $intl $LIBS"
17263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
17264 $as_echo_n "checking for ELF support in BFD... " >&6; }
17265 if ${gdb_cv_var_elf+:} false; then :
17266 $as_echo_n "(cached) " >&6
17267 else
17268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17269 /* end confdefs.h. */
17270 #include <stdlib.h>
17271 #include <string.h>
17272 #include "bfd.h"
17273 #include "elf-bfd.h"
17274 int
17275 main ()
17276 {
17277 return bfd_get_elf_phdr_upper_bound (NULL);
17278
17279 ;
17280 return 0;
17281 }
17282 _ACEOF
17283 if ac_fn_c_try_link "$LINENO"; then :
17284 gdb_cv_var_elf=yes
17285 else
17286 gdb_cv_var_elf=no
17287
17288 fi
17289 rm -f core conftest.err conftest.$ac_objext \
17290 conftest$ac_exeext conftest.$ac_ext
17291
17292 fi
17293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
17294 $as_echo "$gdb_cv_var_elf" >&6; }
17295 CFLAGS=$OLD_CFLAGS
17296 LDFLAGS=$OLD_LDFLAGS
17297 LIBS=$OLD_LIBS
17298 if test "$gdb_cv_var_elf" = yes; then
17299 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
17300 gcore-elf.o elf-none-tdep.o"
17301
17302 $as_echo "#define HAVE_ELF 1" >>confdefs.h
17303
17304 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
17305 if test "$plugins" = "yes"; then
17306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17307 $as_echo_n "checking for library containing dlopen... " >&6; }
17308 if ${ac_cv_search_dlopen+:} false; then :
17309 $as_echo_n "(cached) " >&6
17310 else
17311 ac_func_search_save_LIBS=$LIBS
17312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17313 /* end confdefs.h. */
17314
17315 /* Override any GCC internal prototype to avoid an error.
17316 Use char because int might match the return type of a GCC
17317 builtin and then its argument prototype would still apply. */
17318 #ifdef __cplusplus
17319 extern "C"
17320 #endif
17321 char dlopen ();
17322 int
17323 main ()
17324 {
17325 return dlopen ();
17326 ;
17327 return 0;
17328 }
17329 _ACEOF
17330 for ac_lib in '' dl; do
17331 if test -z "$ac_lib"; then
17332 ac_res="none required"
17333 else
17334 ac_res=-l$ac_lib
17335 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17336 fi
17337 if ac_fn_c_try_link "$LINENO"; then :
17338 ac_cv_search_dlopen=$ac_res
17339 fi
17340 rm -f core conftest.err conftest.$ac_objext \
17341 conftest$ac_exeext
17342 if ${ac_cv_search_dlopen+:} false; then :
17343 break
17344 fi
17345 done
17346 if ${ac_cv_search_dlopen+:} false; then :
17347
17348 else
17349 ac_cv_search_dlopen=no
17350 fi
17351 rm conftest.$ac_ext
17352 LIBS=$ac_func_search_save_LIBS
17353 fi
17354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17355 $as_echo "$ac_cv_search_dlopen" >&6; }
17356 ac_res=$ac_cv_search_dlopen
17357 if test "$ac_res" != no; then :
17358 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17359
17360 fi
17361
17362 fi
17363 fi
17364
17365 # Add macho support to GDB, but only if BFD includes it.
17366
17367 OLD_CFLAGS=$CFLAGS
17368 OLD_LDFLAGS=$LDFLAGS
17369 OLD_LIBS=$LIBS
17370 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17371 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17372 # always want our bfd.
17373 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17374 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17375 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17376 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17377 LIBS="-lbfd -liberty -lz $intl $LIBS"
17378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
17379 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
17380 if ${gdb_cv_var_macho+:} false; then :
17381 $as_echo_n "(cached) " >&6
17382 else
17383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17384 /* end confdefs.h. */
17385 #include <stdlib.h>
17386 #include <string.h>
17387 #include "bfd.h"
17388 #include "mach-o.h"
17389 int
17390 main ()
17391 {
17392 return bfd_mach_o_lookup_command (NULL, 0, NULL);
17393
17394 ;
17395 return 0;
17396 }
17397 _ACEOF
17398 if ac_fn_c_try_link "$LINENO"; then :
17399 gdb_cv_var_macho=yes
17400 else
17401 gdb_cv_var_macho=no
17402
17403 fi
17404 rm -f core conftest.err conftest.$ac_objext \
17405 conftest$ac_exeext conftest.$ac_ext
17406
17407 fi
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
17409 $as_echo "$gdb_cv_var_macho" >&6; }
17410 CFLAGS=$OLD_CFLAGS
17411 LDFLAGS=$OLD_LDFLAGS
17412 LIBS=$OLD_LIBS
17413 if test "$gdb_cv_var_macho" = yes; then
17414 CONFIG_OBS="$CONFIG_OBS machoread.o"
17415 fi
17416
17417 # Add any host-specific objects to GDB.
17418 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
17419
17420 # If building on ELF, look for lzma support for embedded compressed debug info.
17421 if test "$gdb_cv_var_elf" = yes; then
17422
17423 # Check whether --with-lzma was given.
17424 if test "${with_lzma+set}" = set; then :
17425 withval=$with_lzma;
17426 else
17427 with_lzma=auto
17428 fi
17429
17430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
17431 $as_echo_n "checking whether to use lzma... " >&6; }
17432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
17433 $as_echo "$with_lzma" >&6; }
17434
17435 if test "${with_lzma}" != no; then
17436
17437
17438
17439
17440
17441
17442
17443
17444 use_additional=yes
17445
17446 acl_save_prefix="$prefix"
17447 prefix="$acl_final_prefix"
17448 acl_save_exec_prefix="$exec_prefix"
17449 exec_prefix="$acl_final_exec_prefix"
17450
17451 eval additional_includedir=\"$includedir\"
17452 eval additional_libdir=\"$libdir\"
17453
17454 exec_prefix="$acl_save_exec_prefix"
17455 prefix="$acl_save_prefix"
17456
17457
17458 # Check whether --with-liblzma-prefix was given.
17459 if test "${with_liblzma_prefix+set}" = set; then :
17460 withval=$with_liblzma_prefix;
17461 if test "X$withval" = "Xno"; then
17462 use_additional=no
17463 else
17464 if test "X$withval" = "X"; then
17465
17466 acl_save_prefix="$prefix"
17467 prefix="$acl_final_prefix"
17468 acl_save_exec_prefix="$exec_prefix"
17469 exec_prefix="$acl_final_exec_prefix"
17470
17471 eval additional_includedir=\"$includedir\"
17472 eval additional_libdir=\"$libdir\"
17473
17474 exec_prefix="$acl_save_exec_prefix"
17475 prefix="$acl_save_prefix"
17476
17477 else
17478 additional_includedir="$withval/include"
17479 additional_libdir="$withval/lib"
17480 fi
17481 fi
17482
17483 fi
17484
17485
17486 # Check whether --with-liblzma-type was given.
17487 if test "${with_liblzma_type+set}" = set; then :
17488 withval=$with_liblzma_type; with_liblzma_type=$withval
17489 else
17490 with_liblzma_type=auto
17491 fi
17492
17493 lib_type=`eval echo \$with_liblzma_type`
17494
17495 LIBLZMA=
17496 LTLIBLZMA=
17497 INCLZMA=
17498 rpathdirs=
17499 ltrpathdirs=
17500 names_already_handled=
17501 names_next_round='lzma '
17502 while test -n "$names_next_round"; do
17503 names_this_round="$names_next_round"
17504 names_next_round=
17505 for name in $names_this_round; do
17506 already_handled=
17507 for n in $names_already_handled; do
17508 if test "$n" = "$name"; then
17509 already_handled=yes
17510 break
17511 fi
17512 done
17513 if test -z "$already_handled"; then
17514 names_already_handled="$names_already_handled $name"
17515 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17516 eval value=\"\$HAVE_LIB$uppername\"
17517 if test -n "$value"; then
17518 if test "$value" = yes; then
17519 eval value=\"\$LIB$uppername\"
17520 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17521 eval value=\"\$LTLIB$uppername\"
17522 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17523 else
17524 :
17525 fi
17526 else
17527 found_dir=
17528 found_la=
17529 found_so=
17530 found_a=
17531 if test $use_additional = yes; then
17532 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17533 found_dir="$additional_libdir"
17534 found_so="$additional_libdir/lib$name.$shlibext"
17535 if test -f "$additional_libdir/lib$name.la"; then
17536 found_la="$additional_libdir/lib$name.la"
17537 fi
17538 elif test x$lib_type != xshared; then
17539 if test -f "$additional_libdir/lib$name.$libext"; then
17540 found_dir="$additional_libdir"
17541 found_a="$additional_libdir/lib$name.$libext"
17542 if test -f "$additional_libdir/lib$name.la"; then
17543 found_la="$additional_libdir/lib$name.la"
17544 fi
17545 fi
17546 fi
17547 fi
17548 if test "X$found_dir" = "X"; then
17549 for x in $LDFLAGS $LTLIBLZMA; do
17550
17551 acl_save_prefix="$prefix"
17552 prefix="$acl_final_prefix"
17553 acl_save_exec_prefix="$exec_prefix"
17554 exec_prefix="$acl_final_exec_prefix"
17555 eval x=\"$x\"
17556 exec_prefix="$acl_save_exec_prefix"
17557 prefix="$acl_save_prefix"
17558
17559 case "$x" in
17560 -L*)
17561 dir=`echo "X$x" | sed -e 's/^X-L//'`
17562 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17563 found_dir="$dir"
17564 found_so="$dir/lib$name.$shlibext"
17565 if test -f "$dir/lib$name.la"; then
17566 found_la="$dir/lib$name.la"
17567 fi
17568 elif test x$lib_type != xshared; then
17569 if test -f "$dir/lib$name.$libext"; then
17570 found_dir="$dir"
17571 found_a="$dir/lib$name.$libext"
17572 if test -f "$dir/lib$name.la"; then
17573 found_la="$dir/lib$name.la"
17574 fi
17575 fi
17576 fi
17577 ;;
17578 esac
17579 if test "X$found_dir" != "X"; then
17580 break
17581 fi
17582 done
17583 fi
17584 if test "X$found_dir" != "X"; then
17585 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17586 if test "X$found_so" != "X"; then
17587 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17588 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17589 else
17590 haveit=
17591 for x in $ltrpathdirs; do
17592 if test "X$x" = "X$found_dir"; then
17593 haveit=yes
17594 break
17595 fi
17596 done
17597 if test -z "$haveit"; then
17598 ltrpathdirs="$ltrpathdirs $found_dir"
17599 fi
17600 if test "$hardcode_direct" = yes; then
17601 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17602 else
17603 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17604 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17605 haveit=
17606 for x in $rpathdirs; do
17607 if test "X$x" = "X$found_dir"; then
17608 haveit=yes
17609 break
17610 fi
17611 done
17612 if test -z "$haveit"; then
17613 rpathdirs="$rpathdirs $found_dir"
17614 fi
17615 else
17616 haveit=
17617 for x in $LDFLAGS $LIBLZMA; do
17618
17619 acl_save_prefix="$prefix"
17620 prefix="$acl_final_prefix"
17621 acl_save_exec_prefix="$exec_prefix"
17622 exec_prefix="$acl_final_exec_prefix"
17623 eval x=\"$x\"
17624 exec_prefix="$acl_save_exec_prefix"
17625 prefix="$acl_save_prefix"
17626
17627 if test "X$x" = "X-L$found_dir"; then
17628 haveit=yes
17629 break
17630 fi
17631 done
17632 if test -z "$haveit"; then
17633 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17634 fi
17635 if test "$hardcode_minus_L" != no; then
17636 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17637 else
17638 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17639 fi
17640 fi
17641 fi
17642 fi
17643 else
17644 if test "X$found_a" != "X"; then
17645 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17646 else
17647 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17648 fi
17649 fi
17650 additional_includedir=
17651 case "$found_dir" in
17652 */lib | */lib/)
17653 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17654 additional_includedir="$basedir/include"
17655 ;;
17656 esac
17657 if test "X$additional_includedir" != "X"; then
17658 if test "X$additional_includedir" != "X/usr/include"; then
17659 haveit=
17660 if test "X$additional_includedir" = "X/usr/local/include"; then
17661 if test -n "$GCC"; then
17662 case $host_os in
17663 linux*) haveit=yes;;
17664 esac
17665 fi
17666 fi
17667 if test -z "$haveit"; then
17668 for x in $CPPFLAGS $INCLZMA; do
17669
17670 acl_save_prefix="$prefix"
17671 prefix="$acl_final_prefix"
17672 acl_save_exec_prefix="$exec_prefix"
17673 exec_prefix="$acl_final_exec_prefix"
17674 eval x=\"$x\"
17675 exec_prefix="$acl_save_exec_prefix"
17676 prefix="$acl_save_prefix"
17677
17678 if test "X$x" = "X-I$additional_includedir"; then
17679 haveit=yes
17680 break
17681 fi
17682 done
17683 if test -z "$haveit"; then
17684 if test -d "$additional_includedir"; then
17685 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17686 fi
17687 fi
17688 fi
17689 fi
17690 fi
17691 if test -n "$found_la"; then
17692 save_libdir="$libdir"
17693 case "$found_la" in
17694 */* | *\\*) . "$found_la" ;;
17695 *) . "./$found_la" ;;
17696 esac
17697 libdir="$save_libdir"
17698 for dep in $dependency_libs; do
17699 case "$dep" in
17700 -L*)
17701 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17702 if test "X$additional_libdir" != "X/usr/lib"; then
17703 haveit=
17704 if test "X$additional_libdir" = "X/usr/local/lib"; then
17705 if test -n "$GCC"; then
17706 case $host_os in
17707 linux*) haveit=yes;;
17708 esac
17709 fi
17710 fi
17711 if test -z "$haveit"; then
17712 haveit=
17713 for x in $LDFLAGS $LIBLZMA; do
17714
17715 acl_save_prefix="$prefix"
17716 prefix="$acl_final_prefix"
17717 acl_save_exec_prefix="$exec_prefix"
17718 exec_prefix="$acl_final_exec_prefix"
17719 eval x=\"$x\"
17720 exec_prefix="$acl_save_exec_prefix"
17721 prefix="$acl_save_prefix"
17722
17723 if test "X$x" = "X-L$additional_libdir"; then
17724 haveit=yes
17725 break
17726 fi
17727 done
17728 if test -z "$haveit"; then
17729 if test -d "$additional_libdir"; then
17730 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17731 fi
17732 fi
17733 haveit=
17734 for x in $LDFLAGS $LTLIBLZMA; do
17735
17736 acl_save_prefix="$prefix"
17737 prefix="$acl_final_prefix"
17738 acl_save_exec_prefix="$exec_prefix"
17739 exec_prefix="$acl_final_exec_prefix"
17740 eval x=\"$x\"
17741 exec_prefix="$acl_save_exec_prefix"
17742 prefix="$acl_save_prefix"
17743
17744 if test "X$x" = "X-L$additional_libdir"; then
17745 haveit=yes
17746 break
17747 fi
17748 done
17749 if test -z "$haveit"; then
17750 if test -d "$additional_libdir"; then
17751 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17752 fi
17753 fi
17754 fi
17755 fi
17756 ;;
17757 -R*)
17758 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17759 if test "$enable_rpath" != no; then
17760 haveit=
17761 for x in $rpathdirs; do
17762 if test "X$x" = "X$dir"; then
17763 haveit=yes
17764 break
17765 fi
17766 done
17767 if test -z "$haveit"; then
17768 rpathdirs="$rpathdirs $dir"
17769 fi
17770 haveit=
17771 for x in $ltrpathdirs; do
17772 if test "X$x" = "X$dir"; then
17773 haveit=yes
17774 break
17775 fi
17776 done
17777 if test -z "$haveit"; then
17778 ltrpathdirs="$ltrpathdirs $dir"
17779 fi
17780 fi
17781 ;;
17782 -l*)
17783 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17784 ;;
17785 *.la)
17786 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17787 ;;
17788 *)
17789 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17790 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17791 ;;
17792 esac
17793 done
17794 fi
17795 else
17796 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17797 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17798 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17799 else
17800 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17801 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17802 fi
17803 fi
17804 fi
17805 fi
17806 done
17807 done
17808 if test "X$rpathdirs" != "X"; then
17809 if test -n "$hardcode_libdir_separator"; then
17810 alldirs=
17811 for found_dir in $rpathdirs; do
17812 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17813 done
17814 acl_save_libdir="$libdir"
17815 libdir="$alldirs"
17816 eval flag=\"$hardcode_libdir_flag_spec\"
17817 libdir="$acl_save_libdir"
17818 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17819 else
17820 for found_dir in $rpathdirs; do
17821 acl_save_libdir="$libdir"
17822 libdir="$found_dir"
17823 eval flag=\"$hardcode_libdir_flag_spec\"
17824 libdir="$acl_save_libdir"
17825 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17826 done
17827 fi
17828 fi
17829 if test "X$ltrpathdirs" != "X"; then
17830 for found_dir in $ltrpathdirs; do
17831 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17832 done
17833 fi
17834
17835
17836 ac_save_CPPFLAGS="$CPPFLAGS"
17837
17838 for element in $INCLZMA; do
17839 haveit=
17840 for x in $CPPFLAGS; do
17841
17842 acl_save_prefix="$prefix"
17843 prefix="$acl_final_prefix"
17844 acl_save_exec_prefix="$exec_prefix"
17845 exec_prefix="$acl_final_exec_prefix"
17846 eval x=\"$x\"
17847 exec_prefix="$acl_save_exec_prefix"
17848 prefix="$acl_save_prefix"
17849
17850 if test "X$x" = "X$element"; then
17851 haveit=yes
17852 break
17853 fi
17854 done
17855 if test -z "$haveit"; then
17856 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17857 fi
17858 done
17859
17860
17861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17862 $as_echo_n "checking for liblzma... " >&6; }
17863 if ${ac_cv_liblzma+:} false; then :
17864 $as_echo_n "(cached) " >&6
17865 else
17866
17867 ac_save_LIBS="$LIBS"
17868 LIBS="$LIBS $LIBLZMA"
17869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17870 /* end confdefs.h. */
17871 #include "lzma.h"
17872 int
17873 main ()
17874 {
17875 lzma_index_iter iter;
17876 lzma_index_iter_init (&iter, 0);
17877 lzma_mf_is_supported (LZMA_MF_HC3);
17878 ;
17879 return 0;
17880 }
17881 _ACEOF
17882 if ac_fn_c_try_link "$LINENO"; then :
17883 ac_cv_liblzma=yes
17884 else
17885 ac_cv_liblzma=no
17886 fi
17887 rm -f core conftest.err conftest.$ac_objext \
17888 conftest$ac_exeext conftest.$ac_ext
17889 LIBS="$ac_save_LIBS"
17890
17891 fi
17892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17893 $as_echo "$ac_cv_liblzma" >&6; }
17894 if test "$ac_cv_liblzma" = yes; then
17895 HAVE_LIBLZMA=yes
17896
17897 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17898
17899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17900 $as_echo_n "checking how to link with liblzma... " >&6; }
17901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17902 $as_echo "$LIBLZMA" >&6; }
17903 else
17904 HAVE_LIBLZMA=no
17905 CPPFLAGS="$ac_save_CPPFLAGS"
17906 LIBLZMA=
17907 LTLIBLZMA=
17908 fi
17909
17910
17911
17912
17913
17914
17915 if test "$HAVE_LIBLZMA" != yes; then
17916 if test "$with_lzma" = yes; then
17917 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17918 fi
17919 fi
17920 fi
17921 fi
17922
17923 LIBGUI="../libgui/src/libgui.a"
17924 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17925
17926
17927
17928 WIN32LDAPP=
17929
17930
17931
17932 case "${host}" in
17933 *-*-cygwin* | *-*-mingw* )
17934 configdir="win"
17935 ;;
17936 *)
17937 configdir="unix"
17938 ;;
17939 esac
17940
17941 GDBTKLIBS=
17942 if test "${enable_gdbtk}" = "yes"; then
17943
17944 # Gdbtk must have an absolute path to srcdir in order to run
17945 # properly when not installed.
17946 here=`pwd`
17947 cd ${srcdir}
17948 GDBTK_SRC_DIR=`pwd`
17949 cd $here
17950
17951
17952 #
17953 # Ok, lets find the tcl configuration
17954 # First, look for one uninstalled.
17955 # the alternative search directory is invoked by --with-tcl
17956 #
17957
17958 if test x"${no_tcl}" = x ; then
17959 # we reset no_tcl in case something fails here
17960 no_tcl=true
17961
17962 # Check whether --with-tcl was given.
17963 if test "${with_tcl+set}" = set; then :
17964 withval=$with_tcl; with_tclconfig=${withval}
17965 fi
17966
17967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17968 $as_echo_n "checking for Tcl configuration... " >&6; }
17969 if ${ac_cv_c_tclconfig+:} false; then :
17970 $as_echo_n "(cached) " >&6
17971 else
17972
17973
17974 # First check to see if --with-tcl was specified.
17975 case "${host}" in
17976 *-*-cygwin*) platDir="win" ;;
17977 *) platDir="unix" ;;
17978 esac
17979 if test x"${with_tclconfig}" != x ; then
17980 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17981 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17982 else
17983 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17984 fi
17985 fi
17986
17987 # then check for a private Tcl installation
17988 if test x"${ac_cv_c_tclconfig}" = x ; then
17989 for i in \
17990 ../tcl \
17991 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17992 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17993 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17994 ../../tcl \
17995 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17996 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17997 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17998 ../../../tcl \
17999 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18000 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
18001 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
18002 if test -f "$i/$platDir/tclConfig.sh" ; then
18003 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18004 break
18005 fi
18006 done
18007 fi
18008
18009 # on Darwin, check in Framework installation locations
18010 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
18011 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18012 `ls -d /Library/Frameworks 2>/dev/null` \
18013 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18014 `ls -d /System/Library/Frameworks 2>/dev/null` \
18015 ; do
18016 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
18017 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
18018 break
18019 fi
18020 done
18021 fi
18022
18023 # check in a few common install locations
18024 if test x"${ac_cv_c_tclconfig}" = x ; then
18025 for i in `ls -d ${libdir} 2>/dev/null` \
18026 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18027 `ls -d ${prefix}/lib 2>/dev/null` \
18028 `ls -d /usr/local/lib 2>/dev/null` \
18029 `ls -d /usr/contrib/lib 2>/dev/null` \
18030 `ls -d /usr/lib 2>/dev/null` \
18031 ; do
18032 if test -f "$i/tclConfig.sh" ; then
18033 ac_cv_c_tclconfig=`(cd $i; pwd)`
18034 break
18035 fi
18036 done
18037 fi
18038
18039 # check in a few other private locations
18040 if test x"${ac_cv_c_tclconfig}" = x ; then
18041 for i in \
18042 ${srcdir}/../tcl \
18043 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18044 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
18045 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
18046 if test -f "$i/$platDir/tclConfig.sh" ; then
18047 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18048 break
18049 fi
18050 done
18051 fi
18052
18053 fi
18054
18055
18056 if test x"${ac_cv_c_tclconfig}" = x ; then
18057 TCL_BIN_DIR="# no Tcl configs found"
18058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
18059 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
18060 else
18061 no_tcl=
18062 TCL_BIN_DIR=${ac_cv_c_tclconfig}
18063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
18064 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18065 fi
18066 fi
18067
18068
18069 # If $no_tk is nonempty, then we can't do Tk, and there is no
18070 # point to doing Tcl.
18071
18072 #
18073 # Ok, lets find the tk configuration
18074 # First, look for one uninstalled.
18075 # the alternative search directory is invoked by --with-tk
18076 #
18077
18078 if test x"${no_tk}" = x ; then
18079 # we reset no_tk in case something fails here
18080 no_tk=true
18081
18082 # Check whether --with-tk was given.
18083 if test "${with_tk+set}" = set; then :
18084 withval=$with_tk; with_tkconfig=${withval}
18085 fi
18086
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
18088 $as_echo_n "checking for Tk configuration... " >&6; }
18089 if ${ac_cv_c_tkconfig+:} false; then :
18090 $as_echo_n "(cached) " >&6
18091 else
18092
18093
18094 # First check to see if --with-tkconfig was specified.
18095 if test x"${with_tkconfig}" != x ; then
18096 if test -f "${with_tkconfig}/tkConfig.sh" ; then
18097 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
18098 else
18099 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
18100 fi
18101 fi
18102
18103 # then check for a private Tk library
18104 case "${host}" in
18105 *-*-cygwin*) platDir="win" ;;
18106 *) platDir="unix" ;;
18107 esac
18108 if test x"${ac_cv_c_tkconfig}" = x ; then
18109 for i in \
18110 ../tk \
18111 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18112 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
18113 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
18114 ../../tk \
18115 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18116 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
18117 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
18118 ../../../tk \
18119 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18120 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
18121 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
18122 if test -f "$i/$platDir/tkConfig.sh" ; then
18123 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18124 break
18125 fi
18126 done
18127 fi
18128
18129 # on Darwin, check in Framework installation locations
18130 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
18131 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18132 `ls -d /Library/Frameworks 2>/dev/null` \
18133 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18134 `ls -d /System/Library/Frameworks 2>/dev/null` \
18135 ; do
18136 if test -f "$i/Tk.framework/tkConfig.sh" ; then
18137 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
18138 break
18139 fi
18140 done
18141 fi
18142
18143 # check in a few common install locations
18144 if test x"${ac_cv_c_tkconfig}" = x ; then
18145 for i in `ls -d ${libdir} 2>/dev/null` \
18146 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18147 `ls -d ${prefix}/lib 2>/dev/null` \
18148 `ls -d /usr/local/lib 2>/dev/null` \
18149 `ls -d /usr/contrib/lib 2>/dev/null` \
18150 `ls -d /usr/lib 2>/dev/null` \
18151 ; do
18152 if test -f "$i/tkConfig.sh" ; then
18153 ac_cv_c_tkconfig=`(cd $i; pwd)`
18154 break
18155 fi
18156 done
18157 fi
18158 # check in a few other private locations
18159 if test x"${ac_cv_c_tkconfig}" = x ; then
18160 for i in \
18161 ${srcdir}/../tk \
18162 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18163 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
18164 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
18165 if test -f "$i/$platDir/tkConfig.sh" ; then
18166 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18167 break
18168 fi
18169 done
18170 fi
18171
18172 fi
18173
18174
18175 if test x"${ac_cv_c_tkconfig}" = x ; then
18176 TK_BIN_DIR="# no Tk configs found"
18177 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
18178 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
18179 else
18180 no_tk=
18181 TK_BIN_DIR=${ac_cv_c_tkconfig}
18182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
18183 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18184 fi
18185 fi
18186
18187
18188 if test -z "${no_tcl}" -a -z "${no_tk}"; then
18189
18190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
18191 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
18192
18193 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
18194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18195 $as_echo "loading" >&6; }
18196 . ${TCL_BIN_DIR}/tclConfig.sh
18197 else
18198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
18199 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18200 fi
18201
18202 # eval is required to do the TCL_DBGX substitution
18203 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
18204 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18205
18206 # If the TCL_BIN_DIR is the build directory (not the install directory),
18207 # then set the common variable name to the value of the build variables.
18208 # For example, the variable TCL_LIB_SPEC will be set to the value
18209 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
18210 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
18211 # installed and uninstalled version of Tcl.
18212 if test -f "${TCL_BIN_DIR}/Makefile" ; then
18213 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
18214 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
18215 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
18216 elif test "`uname -s`" = "Darwin"; then
18217 # If Tcl was built as a framework, attempt to use the libraries
18218 # from the framework at the given location so that linking works
18219 # against Tcl.framework installed in an arbitrary location.
18220 case ${TCL_DEFS} in
18221 *TCL_FRAMEWORK*)
18222 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
18223 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
18224 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
18225 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
18226 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
18227 break
18228 fi
18229 done
18230 fi
18231 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
18232 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
18233 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
18234 fi
18235 ;;
18236 esac
18237 fi
18238
18239 # eval is required to do the TCL_DBGX substitution
18240 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
18241 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
18242 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
18243 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259 # Check for in-tree tcl
18260 here=`pwd`
18261 cd ${srcdir}/..
18262 topdir=`pwd`
18263 cd ${here}
18264
18265 intree="no"
18266 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
18267 intree="yes"
18268 fi
18269
18270 # Find Tcl private headers
18271 if test x"${intree}" = xno; then
18272
18273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
18274 $as_echo_n "checking for Tcl private headers... " >&6; }
18275 private_dir=""
18276 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
18277 if test -f ${dir}/tclInt.h ; then
18278 private_dir=${dir}
18279 fi
18280
18281 if test x"${private_dir}" = x; then
18282 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
18283 else
18284 TCL_PRIVATE_INCLUDE="-I${private_dir}"
18285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18286 $as_echo "${private_dir}" >&6; }
18287 fi
18288
18289 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
18290 TCL_LIBRARY="${TCL_LIB_SPEC}"
18291 TCL_DEPS=""
18292 else
18293 # If building tcl in the same src tree, private headers
18294 # are not needed, but we need to be sure to use the right
18295 # headers library
18296 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
18297 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
18298 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
18299 fi
18300
18301
18302
18303
18304
18305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
18306 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
18307
18308 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
18309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18310 $as_echo "loading" >&6; }
18311 . ${TK_BIN_DIR}/tkConfig.sh
18312 else
18313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
18314 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18315 fi
18316
18317 # eval is required to do the TK_DBGX substitution
18318 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
18319 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
18320
18321 # If the TK_BIN_DIR is the build directory (not the install directory),
18322 # then set the common variable name to the value of the build variables.
18323 # For example, the variable TK_LIB_SPEC will be set to the value
18324 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
18325 # instead of TK_BUILD_LIB_SPEC since it will work with both an
18326 # installed and uninstalled version of Tcl.
18327 if test -f "${TK_BIN_DIR}/Makefile" ; then
18328 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
18329 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
18330 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
18331 elif test "`uname -s`" = "Darwin"; then
18332 # If Tk was built as a framework, attempt to use the libraries
18333 # from the framework at the given location so that linking works
18334 # against Tk.framework installed in an arbitrary location.
18335 case ${TK_DEFS} in
18336 *TK_FRAMEWORK*)
18337 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
18338 for i in "`cd ${TK_BIN_DIR}; pwd`" \
18339 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
18340 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
18341 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
18342 break
18343 fi
18344 done
18345 fi
18346 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
18347 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
18348 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
18349 fi
18350 ;;
18351 esac
18352 fi
18353
18354 # eval is required to do the TK_DBGX substitution
18355 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
18356 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
18357 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
18358 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373 # Check for in-tree Tk
18374 intree="no"
18375 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
18376 intree="yes"
18377 fi
18378
18379 # Find Tk private headers
18380 if test x"${intree}" = xno; then
18381
18382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
18383 $as_echo_n "checking for Tk private headers... " >&6; }
18384 private_dir=""
18385 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
18386 if test -f ${dir}/tkInt.h; then
18387 private_dir=${dir}
18388 fi
18389
18390 if test x"${private_dir}" = x; then
18391 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
18392 else
18393 TK_PRIVATE_INCLUDE="-I${private_dir}"
18394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18395 $as_echo "${private_dir}" >&6; }
18396 fi
18397
18398 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
18399 TK_LIBRARY=${TK_LIB_SPEC}
18400 TK_DEPS=""
18401 else
18402 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
18403 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
18404 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
18405 fi
18406
18407
18408
18409
18410
18411 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
18412
18413 # Include some libraries that Tcl and Tk want.
18414 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
18415 # Yes, the ordering seems wrong here. But it isn't.
18416 # TK_LIBS is the list of libraries that need to be linked
18417 # after Tcl/Tk. Note that this isn't put into LIBS. If it
18418 # were in LIBS then any link tests after this point would
18419 # try to include things like `$(LIBGUI)', which wouldn't work.
18420 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
18421
18422 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
18423 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
18424 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
18425 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
18426 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
18427 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
18428 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
18429
18430 if test x"$gdb_cv_os_cygwin" = xyes; then
18431 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
18432 WIN32LDAPP="-Wl,--subsystem,console"
18433 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
18434 fi
18435
18436 subdirs="$subdirs gdbtk"
18437
18438 fi
18439 fi
18440
18441
18442
18443
18444
18445
18446
18447
18448 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
18449 $as_echo_n "checking for X... " >&6; }
18450
18451
18452 # Check whether --with-x was given.
18453 if test "${with_x+set}" = set; then :
18454 withval=$with_x;
18455 fi
18456
18457 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
18458 if test "x$with_x" = xno; then
18459 # The user explicitly disabled X.
18460 have_x=disabled
18461 else
18462 case $x_includes,$x_libraries in #(
18463 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
18464 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
18465 $as_echo_n "(cached) " >&6
18466 else
18467 # One or both of the vars are not set, and there is no cached value.
18468 ac_x_includes=no ac_x_libraries=no
18469 rm -f -r conftest.dir
18470 if mkdir conftest.dir; then
18471 cd conftest.dir
18472 cat >Imakefile <<'_ACEOF'
18473 incroot:
18474 @echo incroot='${INCROOT}'
18475 usrlibdir:
18476 @echo usrlibdir='${USRLIBDIR}'
18477 libdir:
18478 @echo libdir='${LIBDIR}'
18479 _ACEOF
18480 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
18481 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
18482 for ac_var in incroot usrlibdir libdir; do
18483 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
18484 done
18485 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
18486 for ac_extension in a so sl dylib la dll; do
18487 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
18488 test -f "$ac_im_libdir/libX11.$ac_extension"; then
18489 ac_im_usrlibdir=$ac_im_libdir; break
18490 fi
18491 done
18492 # Screen out bogus values from the imake configuration. They are
18493 # bogus both because they are the default anyway, and because
18494 # using them would break gcc on systems where it needs fixed includes.
18495 case $ac_im_incroot in
18496 /usr/include) ac_x_includes= ;;
18497 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
18498 esac
18499 case $ac_im_usrlibdir in
18500 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
18501 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
18502 esac
18503 fi
18504 cd ..
18505 rm -f -r conftest.dir
18506 fi
18507
18508 # Standard set of common directories for X headers.
18509 # Check X11 before X11Rn because it is often a symlink to the current release.
18510 ac_x_header_dirs='
18511 /usr/X11/include
18512 /usr/X11R7/include
18513 /usr/X11R6/include
18514 /usr/X11R5/include
18515 /usr/X11R4/include
18516
18517 /usr/include/X11
18518 /usr/include/X11R7
18519 /usr/include/X11R6
18520 /usr/include/X11R5
18521 /usr/include/X11R4
18522
18523 /usr/local/X11/include
18524 /usr/local/X11R7/include
18525 /usr/local/X11R6/include
18526 /usr/local/X11R5/include
18527 /usr/local/X11R4/include
18528
18529 /usr/local/include/X11
18530 /usr/local/include/X11R7
18531 /usr/local/include/X11R6
18532 /usr/local/include/X11R5
18533 /usr/local/include/X11R4
18534
18535 /usr/X386/include
18536 /usr/x386/include
18537 /usr/XFree86/include/X11
18538
18539 /usr/include
18540 /usr/local/include
18541 /usr/unsupported/include
18542 /usr/athena/include
18543 /usr/local/x11r5/include
18544 /usr/lpp/Xamples/include
18545
18546 /usr/openwin/include
18547 /usr/openwin/share/include'
18548
18549 if test "$ac_x_includes" = no; then
18550 # Guess where to find include files, by looking for Xlib.h.
18551 # First, try using that file with no special directory specified.
18552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18553 /* end confdefs.h. */
18554 #include <X11/Xlib.h>
18555 _ACEOF
18556 if ac_fn_c_try_cpp "$LINENO"; then :
18557 # We can compile using X headers with no special include directory.
18558 ac_x_includes=
18559 else
18560 for ac_dir in $ac_x_header_dirs; do
18561 if test -r "$ac_dir/X11/Xlib.h"; then
18562 ac_x_includes=$ac_dir
18563 break
18564 fi
18565 done
18566 fi
18567 rm -f conftest.err conftest.i conftest.$ac_ext
18568 fi # $ac_x_includes = no
18569
18570 if test "$ac_x_libraries" = no; then
18571 # Check for the libraries.
18572 # See if we find them without any special options.
18573 # Don't add to $LIBS permanently.
18574 ac_save_LIBS=$LIBS
18575 LIBS="-lX11 $LIBS"
18576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18577 /* end confdefs.h. */
18578 #include <X11/Xlib.h>
18579 int
18580 main ()
18581 {
18582 XrmInitialize ()
18583 ;
18584 return 0;
18585 }
18586 _ACEOF
18587 if ac_fn_c_try_link "$LINENO"; then :
18588 LIBS=$ac_save_LIBS
18589 # We can link X programs with no special library path.
18590 ac_x_libraries=
18591 else
18592 LIBS=$ac_save_LIBS
18593 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18594 do
18595 # Don't even attempt the hair of trying to link an X program!
18596 for ac_extension in a so sl dylib la dll; do
18597 if test -r "$ac_dir/libX11.$ac_extension"; then
18598 ac_x_libraries=$ac_dir
18599 break 2
18600 fi
18601 done
18602 done
18603 fi
18604 rm -f core conftest.err conftest.$ac_objext \
18605 conftest$ac_exeext conftest.$ac_ext
18606 fi # $ac_x_libraries = no
18607
18608 case $ac_x_includes,$ac_x_libraries in #(
18609 no,* | *,no | *\'*)
18610 # Didn't find X, or a directory has "'" in its name.
18611 ac_cv_have_x="have_x=no";; #(
18612 *)
18613 # Record where we found X for the cache.
18614 ac_cv_have_x="have_x=yes\
18615 ac_x_includes='$ac_x_includes'\
18616 ac_x_libraries='$ac_x_libraries'"
18617 esac
18618 fi
18619 ;; #(
18620 *) have_x=yes;;
18621 esac
18622 eval "$ac_cv_have_x"
18623 fi # $with_x != no
18624
18625 if test "$have_x" != yes; then
18626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18627 $as_echo "$have_x" >&6; }
18628 no_x=yes
18629 else
18630 # If each of the values was on the command line, it overrides each guess.
18631 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18632 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18633 # Update the cache value to reflect the command line values.
18634 ac_cv_have_x="have_x=yes\
18635 ac_x_includes='$x_includes'\
18636 ac_x_libraries='$x_libraries'"
18637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18638 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18639 fi
18640
18641
18642 # Unlike the sim directory, whether a simulator is linked is controlled by
18643 # presence of a gdb_sim definition in the target configure.tgt entry.
18644 # This code just checks for a few cases where we'd like to ignore those
18645 # definitions, even when they're present in the '.mt' file. These cases
18646 # are when --disable-sim is specified, or if the simulator directory is
18647 # not part of the source tree.
18648 #
18649 # Check whether --enable-sim was given.
18650 if test "${enable_sim+set}" = set; then :
18651 enableval=$enable_sim; echo "enable_sim = $enable_sim";
18652 echo "enableval = ${enableval}";
18653 case "${enableval}" in
18654 yes) ignore_sim=false ;;
18655 no) ignore_sim=true ;;
18656 *) ignore_sim=false ;;
18657 esac
18658 else
18659 ignore_sim=false
18660 fi
18661
18662
18663 if test ! -d "${srcdir}/../sim"; then
18664 ignore_sim=true
18665 fi
18666
18667 SIM=
18668 SIM_OBS=
18669 if test "${ignore_sim}" = "false"; then
18670 if test x"${gdb_sim}" != x ; then
18671 SIM="${gdb_sim}"
18672 SIM_OBS="remote-sim.o"
18673
18674 $as_echo "#define WITH_SIM 1" >>confdefs.h
18675
18676
18677 # Some tdep code should only be compiled in when the ppc sim is
18678 # built. PR sim/13418.
18679 case $target in
18680 powerpc*-*-*)
18681
18682 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18683
18684 ;;
18685 esac
18686 fi
18687 fi
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702 # List of host floatformats.
18703
18704 cat >>confdefs.h <<_ACEOF
18705 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18706 _ACEOF
18707
18708
18709 cat >>confdefs.h <<_ACEOF
18710 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18711 _ACEOF
18712
18713
18714 cat >>confdefs.h <<_ACEOF
18715 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18716 _ACEOF
18717
18718
18719 # target_subdir is used by the testsuite to find the target libraries.
18720 target_subdir=
18721 if test "${host}" != "${target}"; then
18722 target_subdir="${target_alias}/"
18723 fi
18724
18725
18726 # Import nat definitions.
18727 nat_makefile_frag=/dev/null
18728 if test "${gdb_native}" = "yes"; then
18729 . ${srcdir}/configure.nat
18730 nativefile=$NAT_FILE
18731 fi
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743 if test x"${gdb_osabi}" != x ; then
18744
18745 cat >>confdefs.h <<_ACEOF
18746 #define GDB_OSABI_DEFAULT $gdb_osabi
18747 _ACEOF
18748
18749 fi
18750
18751 # Setup possible use of libbacktrace.
18752 # Check whether --enable-libbacktrace was given.
18753 if test "${enable_libbacktrace+set}" = set; then :
18754 enableval=$enable_libbacktrace; case "${enableval}" in
18755 yes) enable_libbacktrace=yes ;;
18756 no) enable_libbacktrace=no ;;
18757 *) as_fn_error $? "bad value ${enableval} for --enable-libbacktrace option" "$LINENO" 5 ;;
18758 esac
18759 else
18760 enable_libbacktrace=yes
18761 fi
18762
18763
18764 if test "${enable_libbacktrace}" == "yes"; then
18765 LIBBACKTRACE_INC="-I$srcdir/../libbacktrace/ -I../libbacktrace/"
18766 LIBBACKTRACE_LIB=../libbacktrace/.libs/libbacktrace.a
18767
18768 $as_echo "#define HAVE_LIBBACKTRACE 1" >>confdefs.h
18769
18770 else
18771 LIBBACKTRACE_INC=
18772 LIBBACKTRACE_LIB=
18773 fi
18774
18775
18776
18777
18778 # Check for babeltrace and babeltrace-ctf
18779
18780 # Check whether --with-babeltrace was given.
18781 if test "${with_babeltrace+set}" = set; then :
18782 withval=$with_babeltrace;
18783 else
18784 with_babeltrace=auto
18785 fi
18786
18787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18788 $as_echo_n "checking whether to use babeltrace... " >&6; }
18789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18790 $as_echo "$with_babeltrace" >&6; }
18791
18792 if test "x$with_babeltrace" = "xno"; then
18793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18794 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18795 else
18796 # Append -Werror to CFLAGS so that configure can catch the warning
18797 # "assignment from incompatible pointer type", which is related to
18798 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18799 # in GDB, while babeltrace 1.0.3 is broken.
18800 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18801 # safe to save and restore CFLAGS here.
18802 saved_CFLAGS=$CFLAGS
18803 CFLAGS="$CFLAGS -Werror"
18804
18805
18806
18807
18808
18809
18810
18811
18812 use_additional=yes
18813
18814 acl_save_prefix="$prefix"
18815 prefix="$acl_final_prefix"
18816 acl_save_exec_prefix="$exec_prefix"
18817 exec_prefix="$acl_final_exec_prefix"
18818
18819 eval additional_includedir=\"$includedir\"
18820 eval additional_libdir=\"$libdir\"
18821
18822 exec_prefix="$acl_save_exec_prefix"
18823 prefix="$acl_save_prefix"
18824
18825
18826 # Check whether --with-libbabeltrace-prefix was given.
18827 if test "${with_libbabeltrace_prefix+set}" = set; then :
18828 withval=$with_libbabeltrace_prefix;
18829 if test "X$withval" = "Xno"; then
18830 use_additional=no
18831 else
18832 if test "X$withval" = "X"; then
18833
18834 acl_save_prefix="$prefix"
18835 prefix="$acl_final_prefix"
18836 acl_save_exec_prefix="$exec_prefix"
18837 exec_prefix="$acl_final_exec_prefix"
18838
18839 eval additional_includedir=\"$includedir\"
18840 eval additional_libdir=\"$libdir\"
18841
18842 exec_prefix="$acl_save_exec_prefix"
18843 prefix="$acl_save_prefix"
18844
18845 else
18846 additional_includedir="$withval/include"
18847 additional_libdir="$withval/lib"
18848 fi
18849 fi
18850
18851 fi
18852
18853
18854 # Check whether --with-libbabeltrace-type was given.
18855 if test "${with_libbabeltrace_type+set}" = set; then :
18856 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18857 else
18858 with_libbabeltrace_type=auto
18859 fi
18860
18861 lib_type=`eval echo \$with_libbabeltrace_type`
18862
18863 LIBBABELTRACE=
18864 LTLIBBABELTRACE=
18865 INCBABELTRACE=
18866 rpathdirs=
18867 ltrpathdirs=
18868 names_already_handled=
18869 names_next_round='babeltrace babeltrace-ctf'
18870 while test -n "$names_next_round"; do
18871 names_this_round="$names_next_round"
18872 names_next_round=
18873 for name in $names_this_round; do
18874 already_handled=
18875 for n in $names_already_handled; do
18876 if test "$n" = "$name"; then
18877 already_handled=yes
18878 break
18879 fi
18880 done
18881 if test -z "$already_handled"; then
18882 names_already_handled="$names_already_handled $name"
18883 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18884 eval value=\"\$HAVE_LIB$uppername\"
18885 if test -n "$value"; then
18886 if test "$value" = yes; then
18887 eval value=\"\$LIB$uppername\"
18888 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18889 eval value=\"\$LTLIB$uppername\"
18890 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18891 else
18892 :
18893 fi
18894 else
18895 found_dir=
18896 found_la=
18897 found_so=
18898 found_a=
18899 if test $use_additional = yes; then
18900 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18901 found_dir="$additional_libdir"
18902 found_so="$additional_libdir/lib$name.$shlibext"
18903 if test -f "$additional_libdir/lib$name.la"; then
18904 found_la="$additional_libdir/lib$name.la"
18905 fi
18906 elif test x$lib_type != xshared; then
18907 if test -f "$additional_libdir/lib$name.$libext"; then
18908 found_dir="$additional_libdir"
18909 found_a="$additional_libdir/lib$name.$libext"
18910 if test -f "$additional_libdir/lib$name.la"; then
18911 found_la="$additional_libdir/lib$name.la"
18912 fi
18913 fi
18914 fi
18915 fi
18916 if test "X$found_dir" = "X"; then
18917 for x in $LDFLAGS $LTLIBBABELTRACE; do
18918
18919 acl_save_prefix="$prefix"
18920 prefix="$acl_final_prefix"
18921 acl_save_exec_prefix="$exec_prefix"
18922 exec_prefix="$acl_final_exec_prefix"
18923 eval x=\"$x\"
18924 exec_prefix="$acl_save_exec_prefix"
18925 prefix="$acl_save_prefix"
18926
18927 case "$x" in
18928 -L*)
18929 dir=`echo "X$x" | sed -e 's/^X-L//'`
18930 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18931 found_dir="$dir"
18932 found_so="$dir/lib$name.$shlibext"
18933 if test -f "$dir/lib$name.la"; then
18934 found_la="$dir/lib$name.la"
18935 fi
18936 elif test x$lib_type != xshared; then
18937 if test -f "$dir/lib$name.$libext"; then
18938 found_dir="$dir"
18939 found_a="$dir/lib$name.$libext"
18940 if test -f "$dir/lib$name.la"; then
18941 found_la="$dir/lib$name.la"
18942 fi
18943 fi
18944 fi
18945 ;;
18946 esac
18947 if test "X$found_dir" != "X"; then
18948 break
18949 fi
18950 done
18951 fi
18952 if test "X$found_dir" != "X"; then
18953 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18954 if test "X$found_so" != "X"; then
18955 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18956 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18957 else
18958 haveit=
18959 for x in $ltrpathdirs; do
18960 if test "X$x" = "X$found_dir"; then
18961 haveit=yes
18962 break
18963 fi
18964 done
18965 if test -z "$haveit"; then
18966 ltrpathdirs="$ltrpathdirs $found_dir"
18967 fi
18968 if test "$hardcode_direct" = yes; then
18969 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18970 else
18971 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18972 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18973 haveit=
18974 for x in $rpathdirs; do
18975 if test "X$x" = "X$found_dir"; then
18976 haveit=yes
18977 break
18978 fi
18979 done
18980 if test -z "$haveit"; then
18981 rpathdirs="$rpathdirs $found_dir"
18982 fi
18983 else
18984 haveit=
18985 for x in $LDFLAGS $LIBBABELTRACE; do
18986
18987 acl_save_prefix="$prefix"
18988 prefix="$acl_final_prefix"
18989 acl_save_exec_prefix="$exec_prefix"
18990 exec_prefix="$acl_final_exec_prefix"
18991 eval x=\"$x\"
18992 exec_prefix="$acl_save_exec_prefix"
18993 prefix="$acl_save_prefix"
18994
18995 if test "X$x" = "X-L$found_dir"; then
18996 haveit=yes
18997 break
18998 fi
18999 done
19000 if test -z "$haveit"; then
19001 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
19002 fi
19003 if test "$hardcode_minus_L" != no; then
19004 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19005 else
19006 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19007 fi
19008 fi
19009 fi
19010 fi
19011 else
19012 if test "X$found_a" != "X"; then
19013 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
19014 else
19015 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
19016 fi
19017 fi
19018 additional_includedir=
19019 case "$found_dir" in
19020 */lib | */lib/)
19021 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19022 additional_includedir="$basedir/include"
19023 ;;
19024 esac
19025 if test "X$additional_includedir" != "X"; then
19026 if test "X$additional_includedir" != "X/usr/include"; then
19027 haveit=
19028 if test "X$additional_includedir" = "X/usr/local/include"; then
19029 if test -n "$GCC"; then
19030 case $host_os in
19031 linux*) haveit=yes;;
19032 esac
19033 fi
19034 fi
19035 if test -z "$haveit"; then
19036 for x in $CPPFLAGS $INCBABELTRACE; do
19037
19038 acl_save_prefix="$prefix"
19039 prefix="$acl_final_prefix"
19040 acl_save_exec_prefix="$exec_prefix"
19041 exec_prefix="$acl_final_exec_prefix"
19042 eval x=\"$x\"
19043 exec_prefix="$acl_save_exec_prefix"
19044 prefix="$acl_save_prefix"
19045
19046 if test "X$x" = "X-I$additional_includedir"; then
19047 haveit=yes
19048 break
19049 fi
19050 done
19051 if test -z "$haveit"; then
19052 if test -d "$additional_includedir"; then
19053 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
19054 fi
19055 fi
19056 fi
19057 fi
19058 fi
19059 if test -n "$found_la"; then
19060 save_libdir="$libdir"
19061 case "$found_la" in
19062 */* | *\\*) . "$found_la" ;;
19063 *) . "./$found_la" ;;
19064 esac
19065 libdir="$save_libdir"
19066 for dep in $dependency_libs; do
19067 case "$dep" in
19068 -L*)
19069 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19070 if test "X$additional_libdir" != "X/usr/lib"; then
19071 haveit=
19072 if test "X$additional_libdir" = "X/usr/local/lib"; then
19073 if test -n "$GCC"; then
19074 case $host_os in
19075 linux*) haveit=yes;;
19076 esac
19077 fi
19078 fi
19079 if test -z "$haveit"; then
19080 haveit=
19081 for x in $LDFLAGS $LIBBABELTRACE; do
19082
19083 acl_save_prefix="$prefix"
19084 prefix="$acl_final_prefix"
19085 acl_save_exec_prefix="$exec_prefix"
19086 exec_prefix="$acl_final_exec_prefix"
19087 eval x=\"$x\"
19088 exec_prefix="$acl_save_exec_prefix"
19089 prefix="$acl_save_prefix"
19090
19091 if test "X$x" = "X-L$additional_libdir"; then
19092 haveit=yes
19093 break
19094 fi
19095 done
19096 if test -z "$haveit"; then
19097 if test -d "$additional_libdir"; then
19098 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
19099 fi
19100 fi
19101 haveit=
19102 for x in $LDFLAGS $LTLIBBABELTRACE; do
19103
19104 acl_save_prefix="$prefix"
19105 prefix="$acl_final_prefix"
19106 acl_save_exec_prefix="$exec_prefix"
19107 exec_prefix="$acl_final_exec_prefix"
19108 eval x=\"$x\"
19109 exec_prefix="$acl_save_exec_prefix"
19110 prefix="$acl_save_prefix"
19111
19112 if test "X$x" = "X-L$additional_libdir"; then
19113 haveit=yes
19114 break
19115 fi
19116 done
19117 if test -z "$haveit"; then
19118 if test -d "$additional_libdir"; then
19119 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
19120 fi
19121 fi
19122 fi
19123 fi
19124 ;;
19125 -R*)
19126 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19127 if test "$enable_rpath" != no; then
19128 haveit=
19129 for x in $rpathdirs; do
19130 if test "X$x" = "X$dir"; then
19131 haveit=yes
19132 break
19133 fi
19134 done
19135 if test -z "$haveit"; then
19136 rpathdirs="$rpathdirs $dir"
19137 fi
19138 haveit=
19139 for x in $ltrpathdirs; do
19140 if test "X$x" = "X$dir"; then
19141 haveit=yes
19142 break
19143 fi
19144 done
19145 if test -z "$haveit"; then
19146 ltrpathdirs="$ltrpathdirs $dir"
19147 fi
19148 fi
19149 ;;
19150 -l*)
19151 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19152 ;;
19153 *.la)
19154 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19155 ;;
19156 *)
19157 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
19158 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
19159 ;;
19160 esac
19161 done
19162 fi
19163 else
19164 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19165 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19166 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
19167 else
19168 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
19169 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
19170 fi
19171 fi
19172 fi
19173 fi
19174 done
19175 done
19176 if test "X$rpathdirs" != "X"; then
19177 if test -n "$hardcode_libdir_separator"; then
19178 alldirs=
19179 for found_dir in $rpathdirs; do
19180 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19181 done
19182 acl_save_libdir="$libdir"
19183 libdir="$alldirs"
19184 eval flag=\"$hardcode_libdir_flag_spec\"
19185 libdir="$acl_save_libdir"
19186 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19187 else
19188 for found_dir in $rpathdirs; do
19189 acl_save_libdir="$libdir"
19190 libdir="$found_dir"
19191 eval flag=\"$hardcode_libdir_flag_spec\"
19192 libdir="$acl_save_libdir"
19193 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19194 done
19195 fi
19196 fi
19197 if test "X$ltrpathdirs" != "X"; then
19198 for found_dir in $ltrpathdirs; do
19199 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
19200 done
19201 fi
19202
19203
19204 ac_save_CPPFLAGS="$CPPFLAGS"
19205
19206 for element in $INCBABELTRACE; do
19207 haveit=
19208 for x in $CPPFLAGS; do
19209
19210 acl_save_prefix="$prefix"
19211 prefix="$acl_final_prefix"
19212 acl_save_exec_prefix="$exec_prefix"
19213 exec_prefix="$acl_final_exec_prefix"
19214 eval x=\"$x\"
19215 exec_prefix="$acl_save_exec_prefix"
19216 prefix="$acl_save_prefix"
19217
19218 if test "X$x" = "X$element"; then
19219 haveit=yes
19220 break
19221 fi
19222 done
19223 if test -z "$haveit"; then
19224 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19225 fi
19226 done
19227
19228
19229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
19230 $as_echo_n "checking for libbabeltrace... " >&6; }
19231 if ${ac_cv_libbabeltrace+:} false; then :
19232 $as_echo_n "(cached) " >&6
19233 else
19234
19235 ac_save_LIBS="$LIBS"
19236 LIBS="$LIBS $LIBBABELTRACE"
19237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19238 /* end confdefs.h. */
19239 #include <babeltrace/babeltrace.h>
19240 #include <babeltrace/ctf/events.h>
19241 #include <babeltrace/ctf/iterator.h>
19242 int
19243 main ()
19244 {
19245 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
19246 struct bt_ctf_event *event = NULL;
19247 const struct bt_definition *scope;
19248
19249 pos->type = BT_SEEK_BEGIN;
19250 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
19251 scope = bt_ctf_get_top_level_scope (event,
19252 BT_STREAM_EVENT_HEADER);
19253 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
19254
19255 ;
19256 return 0;
19257 }
19258 _ACEOF
19259 if ac_fn_c_try_link "$LINENO"; then :
19260 ac_cv_libbabeltrace=yes
19261 else
19262 ac_cv_libbabeltrace=no
19263 fi
19264 rm -f core conftest.err conftest.$ac_objext \
19265 conftest$ac_exeext conftest.$ac_ext
19266 LIBS="$ac_save_LIBS"
19267
19268 fi
19269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
19270 $as_echo "$ac_cv_libbabeltrace" >&6; }
19271 if test "$ac_cv_libbabeltrace" = yes; then
19272 HAVE_LIBBABELTRACE=yes
19273
19274 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
19275
19276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
19277 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
19278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
19279 $as_echo "$LIBBABELTRACE" >&6; }
19280 else
19281 HAVE_LIBBABELTRACE=no
19282 CPPFLAGS="$ac_save_CPPFLAGS"
19283 LIBBABELTRACE=
19284 LTLIBBABELTRACE=
19285 fi
19286
19287
19288
19289
19290
19291
19292 CFLAGS=$saved_CFLAGS
19293
19294 if test "$HAVE_LIBBABELTRACE" != yes; then
19295 if test "$with_babeltrace" = yes; then
19296 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
19297 else
19298 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
19299 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
19300 fi
19301 fi
19302 fi
19303
19304 # Check for xxhash
19305
19306 # Check whether --with-xxhash was given.
19307 if test "${with_xxhash+set}" = set; then :
19308 withval=$with_xxhash;
19309 else
19310 with_xxhash=auto
19311 fi
19312
19313
19314 # Check whether --enable-libctf was given.
19315 if test "${enable_libctf+set}" = set; then :
19316 enableval=$enable_libctf;
19317 case "$enableval" in
19318 yes|no) ;;
19319 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
19320 esac
19321
19322 else
19323 enable_libctf=yes
19324 fi
19325
19326
19327 if test x${enable_static} = xno; then
19328 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
19329 CTF_DEPS="../libctf/.libs/libctf.so"
19330 else
19331 LIBCTF="../libctf/.libs/libctf.a"
19332 CTF_DEPS="$LIBCTF"
19333 fi
19334 if test "${enable_libctf}" = yes; then
19335
19336 $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
19337
19338 else
19339 LIBCTF=
19340 CTF_DEPS=
19341 fi
19342
19343
19344
19345 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
19346 # empty version.
19347
19348 if test "x$with_xxhash" != "xno"; then
19349
19350
19351
19352
19353
19354
19355
19356
19357 use_additional=yes
19358
19359 acl_save_prefix="$prefix"
19360 prefix="$acl_final_prefix"
19361 acl_save_exec_prefix="$exec_prefix"
19362 exec_prefix="$acl_final_exec_prefix"
19363
19364 eval additional_includedir=\"$includedir\"
19365 eval additional_libdir=\"$libdir\"
19366
19367 exec_prefix="$acl_save_exec_prefix"
19368 prefix="$acl_save_prefix"
19369
19370
19371 # Check whether --with-libxxhash-prefix was given.
19372 if test "${with_libxxhash_prefix+set}" = set; then :
19373 withval=$with_libxxhash_prefix;
19374 if test "X$withval" = "Xno"; then
19375 use_additional=no
19376 else
19377 if test "X$withval" = "X"; then
19378
19379 acl_save_prefix="$prefix"
19380 prefix="$acl_final_prefix"
19381 acl_save_exec_prefix="$exec_prefix"
19382 exec_prefix="$acl_final_exec_prefix"
19383
19384 eval additional_includedir=\"$includedir\"
19385 eval additional_libdir=\"$libdir\"
19386
19387 exec_prefix="$acl_save_exec_prefix"
19388 prefix="$acl_save_prefix"
19389
19390 else
19391 additional_includedir="$withval/include"
19392 additional_libdir="$withval/lib"
19393 fi
19394 fi
19395
19396 fi
19397
19398
19399 # Check whether --with-libxxhash-type was given.
19400 if test "${with_libxxhash_type+set}" = set; then :
19401 withval=$with_libxxhash_type; with_libxxhash_type=$withval
19402 else
19403 with_libxxhash_type=auto
19404 fi
19405
19406 lib_type=`eval echo \$with_libxxhash_type`
19407
19408 LIBXXHASH=
19409 LTLIBXXHASH=
19410 INCXXHASH=
19411 rpathdirs=
19412 ltrpathdirs=
19413 names_already_handled=
19414 names_next_round='xxhash '
19415 while test -n "$names_next_round"; do
19416 names_this_round="$names_next_round"
19417 names_next_round=
19418 for name in $names_this_round; do
19419 already_handled=
19420 for n in $names_already_handled; do
19421 if test "$n" = "$name"; then
19422 already_handled=yes
19423 break
19424 fi
19425 done
19426 if test -z "$already_handled"; then
19427 names_already_handled="$names_already_handled $name"
19428 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19429 eval value=\"\$HAVE_LIB$uppername\"
19430 if test -n "$value"; then
19431 if test "$value" = yes; then
19432 eval value=\"\$LIB$uppername\"
19433 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
19434 eval value=\"\$LTLIB$uppername\"
19435 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
19436 else
19437 :
19438 fi
19439 else
19440 found_dir=
19441 found_la=
19442 found_so=
19443 found_a=
19444 if test $use_additional = yes; then
19445 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19446 found_dir="$additional_libdir"
19447 found_so="$additional_libdir/lib$name.$shlibext"
19448 if test -f "$additional_libdir/lib$name.la"; then
19449 found_la="$additional_libdir/lib$name.la"
19450 fi
19451 elif test x$lib_type != xshared; then
19452 if test -f "$additional_libdir/lib$name.$libext"; then
19453 found_dir="$additional_libdir"
19454 found_a="$additional_libdir/lib$name.$libext"
19455 if test -f "$additional_libdir/lib$name.la"; then
19456 found_la="$additional_libdir/lib$name.la"
19457 fi
19458 fi
19459 fi
19460 fi
19461 if test "X$found_dir" = "X"; then
19462 for x in $LDFLAGS $LTLIBXXHASH; do
19463
19464 acl_save_prefix="$prefix"
19465 prefix="$acl_final_prefix"
19466 acl_save_exec_prefix="$exec_prefix"
19467 exec_prefix="$acl_final_exec_prefix"
19468 eval x=\"$x\"
19469 exec_prefix="$acl_save_exec_prefix"
19470 prefix="$acl_save_prefix"
19471
19472 case "$x" in
19473 -L*)
19474 dir=`echo "X$x" | sed -e 's/^X-L//'`
19475 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19476 found_dir="$dir"
19477 found_so="$dir/lib$name.$shlibext"
19478 if test -f "$dir/lib$name.la"; then
19479 found_la="$dir/lib$name.la"
19480 fi
19481 elif test x$lib_type != xshared; then
19482 if test -f "$dir/lib$name.$libext"; then
19483 found_dir="$dir"
19484 found_a="$dir/lib$name.$libext"
19485 if test -f "$dir/lib$name.la"; then
19486 found_la="$dir/lib$name.la"
19487 fi
19488 fi
19489 fi
19490 ;;
19491 esac
19492 if test "X$found_dir" != "X"; then
19493 break
19494 fi
19495 done
19496 fi
19497 if test "X$found_dir" != "X"; then
19498 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
19499 if test "X$found_so" != "X"; then
19500 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19501 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19502 else
19503 haveit=
19504 for x in $ltrpathdirs; do
19505 if test "X$x" = "X$found_dir"; then
19506 haveit=yes
19507 break
19508 fi
19509 done
19510 if test -z "$haveit"; then
19511 ltrpathdirs="$ltrpathdirs $found_dir"
19512 fi
19513 if test "$hardcode_direct" = yes; then
19514 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19515 else
19516 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19517 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19518 haveit=
19519 for x in $rpathdirs; do
19520 if test "X$x" = "X$found_dir"; then
19521 haveit=yes
19522 break
19523 fi
19524 done
19525 if test -z "$haveit"; then
19526 rpathdirs="$rpathdirs $found_dir"
19527 fi
19528 else
19529 haveit=
19530 for x in $LDFLAGS $LIBXXHASH; do
19531
19532 acl_save_prefix="$prefix"
19533 prefix="$acl_final_prefix"
19534 acl_save_exec_prefix="$exec_prefix"
19535 exec_prefix="$acl_final_exec_prefix"
19536 eval x=\"$x\"
19537 exec_prefix="$acl_save_exec_prefix"
19538 prefix="$acl_save_prefix"
19539
19540 if test "X$x" = "X-L$found_dir"; then
19541 haveit=yes
19542 break
19543 fi
19544 done
19545 if test -z "$haveit"; then
19546 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19547 fi
19548 if test "$hardcode_minus_L" != no; then
19549 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19550 else
19551 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19552 fi
19553 fi
19554 fi
19555 fi
19556 else
19557 if test "X$found_a" != "X"; then
19558 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19559 else
19560 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19561 fi
19562 fi
19563 additional_includedir=
19564 case "$found_dir" in
19565 */lib | */lib/)
19566 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19567 additional_includedir="$basedir/include"
19568 ;;
19569 esac
19570 if test "X$additional_includedir" != "X"; then
19571 if test "X$additional_includedir" != "X/usr/include"; then
19572 haveit=
19573 if test "X$additional_includedir" = "X/usr/local/include"; then
19574 if test -n "$GCC"; then
19575 case $host_os in
19576 linux*) haveit=yes;;
19577 esac
19578 fi
19579 fi
19580 if test -z "$haveit"; then
19581 for x in $CPPFLAGS $INCXXHASH; do
19582
19583 acl_save_prefix="$prefix"
19584 prefix="$acl_final_prefix"
19585 acl_save_exec_prefix="$exec_prefix"
19586 exec_prefix="$acl_final_exec_prefix"
19587 eval x=\"$x\"
19588 exec_prefix="$acl_save_exec_prefix"
19589 prefix="$acl_save_prefix"
19590
19591 if test "X$x" = "X-I$additional_includedir"; then
19592 haveit=yes
19593 break
19594 fi
19595 done
19596 if test -z "$haveit"; then
19597 if test -d "$additional_includedir"; then
19598 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19599 fi
19600 fi
19601 fi
19602 fi
19603 fi
19604 if test -n "$found_la"; then
19605 save_libdir="$libdir"
19606 case "$found_la" in
19607 */* | *\\*) . "$found_la" ;;
19608 *) . "./$found_la" ;;
19609 esac
19610 libdir="$save_libdir"
19611 for dep in $dependency_libs; do
19612 case "$dep" in
19613 -L*)
19614 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19615 if test "X$additional_libdir" != "X/usr/lib"; then
19616 haveit=
19617 if test "X$additional_libdir" = "X/usr/local/lib"; then
19618 if test -n "$GCC"; then
19619 case $host_os in
19620 linux*) haveit=yes;;
19621 esac
19622 fi
19623 fi
19624 if test -z "$haveit"; then
19625 haveit=
19626 for x in $LDFLAGS $LIBXXHASH; do
19627
19628 acl_save_prefix="$prefix"
19629 prefix="$acl_final_prefix"
19630 acl_save_exec_prefix="$exec_prefix"
19631 exec_prefix="$acl_final_exec_prefix"
19632 eval x=\"$x\"
19633 exec_prefix="$acl_save_exec_prefix"
19634 prefix="$acl_save_prefix"
19635
19636 if test "X$x" = "X-L$additional_libdir"; then
19637 haveit=yes
19638 break
19639 fi
19640 done
19641 if test -z "$haveit"; then
19642 if test -d "$additional_libdir"; then
19643 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19644 fi
19645 fi
19646 haveit=
19647 for x in $LDFLAGS $LTLIBXXHASH; do
19648
19649 acl_save_prefix="$prefix"
19650 prefix="$acl_final_prefix"
19651 acl_save_exec_prefix="$exec_prefix"
19652 exec_prefix="$acl_final_exec_prefix"
19653 eval x=\"$x\"
19654 exec_prefix="$acl_save_exec_prefix"
19655 prefix="$acl_save_prefix"
19656
19657 if test "X$x" = "X-L$additional_libdir"; then
19658 haveit=yes
19659 break
19660 fi
19661 done
19662 if test -z "$haveit"; then
19663 if test -d "$additional_libdir"; then
19664 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19665 fi
19666 fi
19667 fi
19668 fi
19669 ;;
19670 -R*)
19671 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19672 if test "$enable_rpath" != no; then
19673 haveit=
19674 for x in $rpathdirs; do
19675 if test "X$x" = "X$dir"; then
19676 haveit=yes
19677 break
19678 fi
19679 done
19680 if test -z "$haveit"; then
19681 rpathdirs="$rpathdirs $dir"
19682 fi
19683 haveit=
19684 for x in $ltrpathdirs; do
19685 if test "X$x" = "X$dir"; then
19686 haveit=yes
19687 break
19688 fi
19689 done
19690 if test -z "$haveit"; then
19691 ltrpathdirs="$ltrpathdirs $dir"
19692 fi
19693 fi
19694 ;;
19695 -l*)
19696 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19697 ;;
19698 *.la)
19699 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19700 ;;
19701 *)
19702 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19703 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19704 ;;
19705 esac
19706 done
19707 fi
19708 else
19709 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19710 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19711 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19712 else
19713 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19714 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19715 fi
19716 fi
19717 fi
19718 fi
19719 done
19720 done
19721 if test "X$rpathdirs" != "X"; then
19722 if test -n "$hardcode_libdir_separator"; then
19723 alldirs=
19724 for found_dir in $rpathdirs; do
19725 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19726 done
19727 acl_save_libdir="$libdir"
19728 libdir="$alldirs"
19729 eval flag=\"$hardcode_libdir_flag_spec\"
19730 libdir="$acl_save_libdir"
19731 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19732 else
19733 for found_dir in $rpathdirs; do
19734 acl_save_libdir="$libdir"
19735 libdir="$found_dir"
19736 eval flag=\"$hardcode_libdir_flag_spec\"
19737 libdir="$acl_save_libdir"
19738 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19739 done
19740 fi
19741 fi
19742 if test "X$ltrpathdirs" != "X"; then
19743 for found_dir in $ltrpathdirs; do
19744 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19745 done
19746 fi
19747
19748
19749 ac_save_CPPFLAGS="$CPPFLAGS"
19750
19751 for element in $INCXXHASH; do
19752 haveit=
19753 for x in $CPPFLAGS; do
19754
19755 acl_save_prefix="$prefix"
19756 prefix="$acl_final_prefix"
19757 acl_save_exec_prefix="$exec_prefix"
19758 exec_prefix="$acl_final_exec_prefix"
19759 eval x=\"$x\"
19760 exec_prefix="$acl_save_exec_prefix"
19761 prefix="$acl_save_prefix"
19762
19763 if test "X$x" = "X$element"; then
19764 haveit=yes
19765 break
19766 fi
19767 done
19768 if test -z "$haveit"; then
19769 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19770 fi
19771 done
19772
19773
19774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19775 $as_echo_n "checking for libxxhash... " >&6; }
19776 if ${ac_cv_libxxhash+:} false; then :
19777 $as_echo_n "(cached) " >&6
19778 else
19779
19780 ac_save_LIBS="$LIBS"
19781 LIBS="$LIBS $LIBXXHASH"
19782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19783 /* end confdefs.h. */
19784 #include <xxhash.h>
19785 int
19786 main ()
19787 {
19788 XXH32("foo", 3, 0);
19789
19790 ;
19791 return 0;
19792 }
19793 _ACEOF
19794 if ac_fn_c_try_link "$LINENO"; then :
19795 ac_cv_libxxhash=yes
19796 else
19797 ac_cv_libxxhash=no
19798 fi
19799 rm -f core conftest.err conftest.$ac_objext \
19800 conftest$ac_exeext conftest.$ac_ext
19801 LIBS="$ac_save_LIBS"
19802
19803 fi
19804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19805 $as_echo "$ac_cv_libxxhash" >&6; }
19806 if test "$ac_cv_libxxhash" = yes; then
19807 HAVE_LIBXXHASH=yes
19808
19809 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19810
19811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19812 $as_echo_n "checking how to link with libxxhash... " >&6; }
19813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19814 $as_echo "$LIBXXHASH" >&6; }
19815 else
19816 HAVE_LIBXXHASH=no
19817 CPPFLAGS="$ac_save_CPPFLAGS"
19818 LIBXXHASH=
19819 LTLIBXXHASH=
19820 fi
19821
19822
19823
19824
19825
19826
19827 if test "$HAVE_LIBXXHASH" != yes; then
19828 if test "$with_xxhash" = yes; then
19829 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19830 fi
19831 fi
19832 if test "x$with_xxhash" = "xauto"; then
19833 with_xxhash="$HAVE_LIBXXHASH"
19834 fi
19835 fi
19836
19837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19838 $as_echo_n "checking whether to use xxhash... " >&6; }
19839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19840 $as_echo "$with_xxhash" >&6; }
19841
19842 NM_H=
19843 rm -f nm.h
19844 if test "${nativefile}" != ""; then
19845 case "${nativefile}" in
19846 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19847 * ) GDB_NM_FILE="${nativefile}"
19848 esac
19849 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19850
19851
19852 cat >>confdefs.h <<_ACEOF
19853 #define GDB_NM_FILE "${GDB_NM_FILE}"
19854 _ACEOF
19855
19856 NM_H=nm.h
19857 fi
19858
19859
19860
19861 for ac_prog in xsltproc
19862 do
19863 # Extract the first word of "$ac_prog", so it can be a program name with args.
19864 set dummy $ac_prog; ac_word=$2
19865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19866 $as_echo_n "checking for $ac_word... " >&6; }
19867 if ${ac_cv_path_XSLTPROC+:} false; then :
19868 $as_echo_n "(cached) " >&6
19869 else
19870 case $XSLTPROC in
19871 [\\/]* | ?:[\\/]*)
19872 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19873 ;;
19874 *)
19875 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19876 for as_dir in $PATH
19877 do
19878 IFS=$as_save_IFS
19879 test -z "$as_dir" && as_dir=.
19880 for ac_exec_ext in '' $ac_executable_extensions; do
19881 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19882 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19883 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19884 break 2
19885 fi
19886 done
19887 done
19888 IFS=$as_save_IFS
19889
19890 ;;
19891 esac
19892 fi
19893 XSLTPROC=$ac_cv_path_XSLTPROC
19894 if test -n "$XSLTPROC"; then
19895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19896 $as_echo "$XSLTPROC" >&6; }
19897 else
19898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19899 $as_echo "no" >&6; }
19900 fi
19901
19902
19903 test -n "$XSLTPROC" && break
19904 done
19905 test -n "$XSLTPROC" || XSLTPROC="missing"
19906
19907 if test "x$USE_MAINTAINER_MODE" = xyes; then
19908 if test "${XSLTPROC}" = missing; then
19909 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19910 fi
19911 fi
19912
19913
19914
19915
19916
19917 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19918
19919
19920
19921 # Check whether we will enable the inclusion of unit tests when
19922 # compiling GDB.
19923 #
19924 # The default value of this option changes depending whether we're on
19925 # development mode (in which case it's "true") or not (in which case
19926 # it's "false"). The $development variable is set by the GDB_AC_COMMON
19927 # macro, which must therefore be used before GDB_AC_SELFTEST.
19928
19929 if test "x$development" != xtrue && test "x$development" != xfalse; then :
19930 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19931 fi
19932
19933 # Check whether --enable-unit-tests was given.
19934 if test "${enable_unit_tests+set}" = set; then :
19935 enableval=$enable_unit_tests; case "${enableval}" in
19936 yes) enable_unittests=true ;;
19937 no) enable_unittests=false ;;
19938 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19939 esac
19940 else
19941 enable_unittests=$development
19942 fi
19943
19944
19945 if $enable_unittests; then
19946
19947 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19948
19949
19950 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19951 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19952
19953 fi
19954
19955
19956
19957 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19958 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19959 if test "x$GDB_TRANSFORM_NAME" = x; then
19960 GDB_TRANSFORM_NAME=gdb
19961 fi
19962
19963
19964
19965 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19966 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19967 if test "x$GCORE_TRANSFORM_NAME" = x; then
19968 GCORE_TRANSFORM_NAME=gcore
19969 fi
19970
19971
19972 ac_config_files="$ac_config_files gcore"
19973
19974 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
19975
19976
19977 cat >confcache <<\_ACEOF
19978 # This file is a shell script that caches the results of configure
19979 # tests run on this system so they can be shared between configure
19980 # scripts and configure runs, see configure's option --config-cache.
19981 # It is not useful on other systems. If it contains results you don't
19982 # want to keep, you may remove or edit it.
19983 #
19984 # config.status only pays attention to the cache file if you give it
19985 # the --recheck option to rerun configure.
19986 #
19987 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19988 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19989 # following values.
19990
19991 _ACEOF
19992
19993 # The following way of writing the cache mishandles newlines in values,
19994 # but we know of no workaround that is simple, portable, and efficient.
19995 # So, we kill variables containing newlines.
19996 # Ultrix sh set writes to stderr and can't be redirected directly,
19997 # and sets the high bit in the cache file unless we assign to the vars.
19998 (
19999 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20000 eval ac_val=\$$ac_var
20001 case $ac_val in #(
20002 *${as_nl}*)
20003 case $ac_var in #(
20004 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20005 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20006 esac
20007 case $ac_var in #(
20008 _ | IFS | as_nl) ;; #(
20009 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20010 *) { eval $ac_var=; unset $ac_var;} ;;
20011 esac ;;
20012 esac
20013 done
20014
20015 (set) 2>&1 |
20016 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20017 *${as_nl}ac_space=\ *)
20018 # `set' does not quote correctly, so add quotes: double-quote
20019 # substitution turns \\\\ into \\, and sed turns \\ into \.
20020 sed -n \
20021 "s/'/'\\\\''/g;
20022 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20023 ;; #(
20024 *)
20025 # `set' quotes correctly as required by POSIX, so do not add quotes.
20026 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20027 ;;
20028 esac |
20029 sort
20030 ) |
20031 sed '
20032 /^ac_cv_env_/b end
20033 t clear
20034 :clear
20035 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20036 t end
20037 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20038 :end' >>confcache
20039 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20040 if test -w "$cache_file"; then
20041 if test "x$cache_file" != "x/dev/null"; then
20042 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20043 $as_echo "$as_me: updating cache $cache_file" >&6;}
20044 if test ! -f "$cache_file" || test -h "$cache_file"; then
20045 cat confcache >"$cache_file"
20046 else
20047 case $cache_file in #(
20048 */* | ?:*)
20049 mv -f confcache "$cache_file"$$ &&
20050 mv -f "$cache_file"$$ "$cache_file" ;; #(
20051 *)
20052 mv -f confcache "$cache_file" ;;
20053 esac
20054 fi
20055 fi
20056 else
20057 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20058 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20059 fi
20060 fi
20061 rm -f confcache
20062
20063 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20064 # Let make expand exec_prefix.
20065 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20066
20067 DEFS=-DHAVE_CONFIG_H
20068
20069 ac_libobjs=
20070 ac_ltlibobjs=
20071 U=
20072 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20073 # 1. Remove the extension, and $U if already installed.
20074 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20075 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20076 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20077 # will be set to the directory where LIBOBJS objects are built.
20078 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20079 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20080 done
20081 LIBOBJS=$ac_libobjs
20082
20083 LTLIBOBJS=$ac_ltlibobjs
20084
20085
20086 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
20087 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
20088 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20089 fi
20090 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
20091 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
20092 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20093 fi
20094 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
20095 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
20096 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20097 fi
20098
20099
20100 : "${CONFIG_STATUS=./config.status}"
20101 ac_write_fail=0
20102 ac_clean_files_save=$ac_clean_files
20103 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20104 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20105 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20106 as_write_fail=0
20107 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20108 #! $SHELL
20109 # Generated by $as_me.
20110 # Run this file to recreate the current configuration.
20111 # Compiler output produced by configure, useful for debugging
20112 # configure, is in config.log if it exists.
20113
20114 debug=false
20115 ac_cs_recheck=false
20116 ac_cs_silent=false
20117
20118 SHELL=\${CONFIG_SHELL-$SHELL}
20119 export SHELL
20120 _ASEOF
20121 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20122 ## -------------------- ##
20123 ## M4sh Initialization. ##
20124 ## -------------------- ##
20125
20126 # Be more Bourne compatible
20127 DUALCASE=1; export DUALCASE # for MKS sh
20128 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20129 emulate sh
20130 NULLCMD=:
20131 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20132 # is contrary to our usage. Disable this feature.
20133 alias -g '${1+"$@"}'='"$@"'
20134 setopt NO_GLOB_SUBST
20135 else
20136 case `(set -o) 2>/dev/null` in #(
20137 *posix*) :
20138 set -o posix ;; #(
20139 *) :
20140 ;;
20141 esac
20142 fi
20143
20144
20145 as_nl='
20146 '
20147 export as_nl
20148 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20149 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20150 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20151 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20152 # Prefer a ksh shell builtin over an external printf program on Solaris,
20153 # but without wasting forks for bash or zsh.
20154 if test -z "$BASH_VERSION$ZSH_VERSION" \
20155 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20156 as_echo='print -r --'
20157 as_echo_n='print -rn --'
20158 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20159 as_echo='printf %s\n'
20160 as_echo_n='printf %s'
20161 else
20162 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20163 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20164 as_echo_n='/usr/ucb/echo -n'
20165 else
20166 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20167 as_echo_n_body='eval
20168 arg=$1;
20169 case $arg in #(
20170 *"$as_nl"*)
20171 expr "X$arg" : "X\\(.*\\)$as_nl";
20172 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20173 esac;
20174 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20175 '
20176 export as_echo_n_body
20177 as_echo_n='sh -c $as_echo_n_body as_echo'
20178 fi
20179 export as_echo_body
20180 as_echo='sh -c $as_echo_body as_echo'
20181 fi
20182
20183 # The user is always right.
20184 if test "${PATH_SEPARATOR+set}" != set; then
20185 PATH_SEPARATOR=:
20186 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20187 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20188 PATH_SEPARATOR=';'
20189 }
20190 fi
20191
20192
20193 # IFS
20194 # We need space, tab and new line, in precisely that order. Quoting is
20195 # there to prevent editors from complaining about space-tab.
20196 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20197 # splitting by setting IFS to empty value.)
20198 IFS=" "" $as_nl"
20199
20200 # Find who we are. Look in the path if we contain no directory separator.
20201 as_myself=
20202 case $0 in #((
20203 *[\\/]* ) as_myself=$0 ;;
20204 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20205 for as_dir in $PATH
20206 do
20207 IFS=$as_save_IFS
20208 test -z "$as_dir" && as_dir=.
20209 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20210 done
20211 IFS=$as_save_IFS
20212
20213 ;;
20214 esac
20215 # We did not find ourselves, most probably we were run as `sh COMMAND'
20216 # in which case we are not to be found in the path.
20217 if test "x$as_myself" = x; then
20218 as_myself=$0
20219 fi
20220 if test ! -f "$as_myself"; then
20221 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20222 exit 1
20223 fi
20224
20225 # Unset variables that we do not need and which cause bugs (e.g. in
20226 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20227 # suppresses any "Segmentation fault" message there. '((' could
20228 # trigger a bug in pdksh 5.2.14.
20229 for as_var in BASH_ENV ENV MAIL MAILPATH
20230 do eval test x\${$as_var+set} = xset \
20231 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20232 done
20233 PS1='$ '
20234 PS2='> '
20235 PS4='+ '
20236
20237 # NLS nuisances.
20238 LC_ALL=C
20239 export LC_ALL
20240 LANGUAGE=C
20241 export LANGUAGE
20242
20243 # CDPATH.
20244 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20245
20246
20247 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20248 # ----------------------------------------
20249 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20250 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20251 # script with STATUS, using 1 if that was 0.
20252 as_fn_error ()
20253 {
20254 as_status=$1; test $as_status -eq 0 && as_status=1
20255 if test "$4"; then
20256 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20257 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20258 fi
20259 $as_echo "$as_me: error: $2" >&2
20260 as_fn_exit $as_status
20261 } # as_fn_error
20262
20263
20264 # as_fn_set_status STATUS
20265 # -----------------------
20266 # Set $? to STATUS, without forking.
20267 as_fn_set_status ()
20268 {
20269 return $1
20270 } # as_fn_set_status
20271
20272 # as_fn_exit STATUS
20273 # -----------------
20274 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20275 as_fn_exit ()
20276 {
20277 set +e
20278 as_fn_set_status $1
20279 exit $1
20280 } # as_fn_exit
20281
20282 # as_fn_unset VAR
20283 # ---------------
20284 # Portably unset VAR.
20285 as_fn_unset ()
20286 {
20287 { eval $1=; unset $1;}
20288 }
20289 as_unset=as_fn_unset
20290 # as_fn_append VAR VALUE
20291 # ----------------------
20292 # Append the text in VALUE to the end of the definition contained in VAR. Take
20293 # advantage of any shell optimizations that allow amortized linear growth over
20294 # repeated appends, instead of the typical quadratic growth present in naive
20295 # implementations.
20296 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20297 eval 'as_fn_append ()
20298 {
20299 eval $1+=\$2
20300 }'
20301 else
20302 as_fn_append ()
20303 {
20304 eval $1=\$$1\$2
20305 }
20306 fi # as_fn_append
20307
20308 # as_fn_arith ARG...
20309 # ------------------
20310 # Perform arithmetic evaluation on the ARGs, and store the result in the
20311 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20312 # must be portable across $(()) and expr.
20313 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20314 eval 'as_fn_arith ()
20315 {
20316 as_val=$(( $* ))
20317 }'
20318 else
20319 as_fn_arith ()
20320 {
20321 as_val=`expr "$@" || test $? -eq 1`
20322 }
20323 fi # as_fn_arith
20324
20325
20326 if expr a : '\(a\)' >/dev/null 2>&1 &&
20327 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20328 as_expr=expr
20329 else
20330 as_expr=false
20331 fi
20332
20333 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20334 as_basename=basename
20335 else
20336 as_basename=false
20337 fi
20338
20339 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20340 as_dirname=dirname
20341 else
20342 as_dirname=false
20343 fi
20344
20345 as_me=`$as_basename -- "$0" ||
20346 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20347 X"$0" : 'X\(//\)$' \| \
20348 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20349 $as_echo X/"$0" |
20350 sed '/^.*\/\([^/][^/]*\)\/*$/{
20351 s//\1/
20352 q
20353 }
20354 /^X\/\(\/\/\)$/{
20355 s//\1/
20356 q
20357 }
20358 /^X\/\(\/\).*/{
20359 s//\1/
20360 q
20361 }
20362 s/.*/./; q'`
20363
20364 # Avoid depending upon Character Ranges.
20365 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20366 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20367 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20368 as_cr_digits='0123456789'
20369 as_cr_alnum=$as_cr_Letters$as_cr_digits
20370
20371 ECHO_C= ECHO_N= ECHO_T=
20372 case `echo -n x` in #(((((
20373 -n*)
20374 case `echo 'xy\c'` in
20375 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20376 xy) ECHO_C='\c';;
20377 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20378 ECHO_T=' ';;
20379 esac;;
20380 *)
20381 ECHO_N='-n';;
20382 esac
20383
20384 rm -f conf$$ conf$$.exe conf$$.file
20385 if test -d conf$$.dir; then
20386 rm -f conf$$.dir/conf$$.file
20387 else
20388 rm -f conf$$.dir
20389 mkdir conf$$.dir 2>/dev/null
20390 fi
20391 if (echo >conf$$.file) 2>/dev/null; then
20392 if ln -s conf$$.file conf$$ 2>/dev/null; then
20393 as_ln_s='ln -s'
20394 # ... but there are two gotchas:
20395 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20396 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20397 # In both cases, we have to default to `cp -pR'.
20398 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20399 as_ln_s='cp -pR'
20400 elif ln conf$$.file conf$$ 2>/dev/null; then
20401 as_ln_s=ln
20402 else
20403 as_ln_s='cp -pR'
20404 fi
20405 else
20406 as_ln_s='cp -pR'
20407 fi
20408 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20409 rmdir conf$$.dir 2>/dev/null
20410
20411
20412 # as_fn_mkdir_p
20413 # -------------
20414 # Create "$as_dir" as a directory, including parents if necessary.
20415 as_fn_mkdir_p ()
20416 {
20417
20418 case $as_dir in #(
20419 -*) as_dir=./$as_dir;;
20420 esac
20421 test -d "$as_dir" || eval $as_mkdir_p || {
20422 as_dirs=
20423 while :; do
20424 case $as_dir in #(
20425 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20426 *) as_qdir=$as_dir;;
20427 esac
20428 as_dirs="'$as_qdir' $as_dirs"
20429 as_dir=`$as_dirname -- "$as_dir" ||
20430 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20431 X"$as_dir" : 'X\(//\)[^/]' \| \
20432 X"$as_dir" : 'X\(//\)$' \| \
20433 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20434 $as_echo X"$as_dir" |
20435 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20436 s//\1/
20437 q
20438 }
20439 /^X\(\/\/\)[^/].*/{
20440 s//\1/
20441 q
20442 }
20443 /^X\(\/\/\)$/{
20444 s//\1/
20445 q
20446 }
20447 /^X\(\/\).*/{
20448 s//\1/
20449 q
20450 }
20451 s/.*/./; q'`
20452 test -d "$as_dir" && break
20453 done
20454 test -z "$as_dirs" || eval "mkdir $as_dirs"
20455 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20456
20457
20458 } # as_fn_mkdir_p
20459 if mkdir -p . 2>/dev/null; then
20460 as_mkdir_p='mkdir -p "$as_dir"'
20461 else
20462 test -d ./-p && rmdir ./-p
20463 as_mkdir_p=false
20464 fi
20465
20466
20467 # as_fn_executable_p FILE
20468 # -----------------------
20469 # Test if FILE is an executable regular file.
20470 as_fn_executable_p ()
20471 {
20472 test -f "$1" && test -x "$1"
20473 } # as_fn_executable_p
20474 as_test_x='test -x'
20475 as_executable_p=as_fn_executable_p
20476
20477 # Sed expression to map a string onto a valid CPP name.
20478 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20479
20480 # Sed expression to map a string onto a valid variable name.
20481 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20482
20483
20484 exec 6>&1
20485 ## ----------------------------------- ##
20486 ## Main body of $CONFIG_STATUS script. ##
20487 ## ----------------------------------- ##
20488 _ASEOF
20489 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20490
20491 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20492 # Save the log message, to keep $0 and so on meaningful, and to
20493 # report actual input values of CONFIG_FILES etc. instead of their
20494 # values after options handling.
20495 ac_log="
20496 This file was extended by $as_me, which was
20497 generated by GNU Autoconf 2.69. Invocation command line was
20498
20499 CONFIG_FILES = $CONFIG_FILES
20500 CONFIG_HEADERS = $CONFIG_HEADERS
20501 CONFIG_LINKS = $CONFIG_LINKS
20502 CONFIG_COMMANDS = $CONFIG_COMMANDS
20503 $ $0 $@
20504
20505 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20506 "
20507
20508 _ACEOF
20509
20510 case $ac_config_files in *"
20511 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20512 esac
20513
20514 case $ac_config_headers in *"
20515 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20516 esac
20517
20518
20519 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20520 # Files that config.status was made for.
20521 config_files="$ac_config_files"
20522 config_headers="$ac_config_headers"
20523 config_links="$ac_config_links"
20524 config_commands="$ac_config_commands"
20525
20526 _ACEOF
20527
20528 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20529 ac_cs_usage="\
20530 \`$as_me' instantiates files and other configuration actions
20531 from templates according to the current configuration. Unless the files
20532 and actions are specified as TAGs, all are instantiated by default.
20533
20534 Usage: $0 [OPTION]... [TAG]...
20535
20536 -h, --help print this help, then exit
20537 -V, --version print version number and configuration settings, then exit
20538 --config print configuration, then exit
20539 -q, --quiet, --silent
20540 do not print progress messages
20541 -d, --debug don't remove temporary files
20542 --recheck update $as_me by reconfiguring in the same conditions
20543 --file=FILE[:TEMPLATE]
20544 instantiate the configuration file FILE
20545 --header=FILE[:TEMPLATE]
20546 instantiate the configuration header FILE
20547
20548 Configuration files:
20549 $config_files
20550
20551 Configuration headers:
20552 $config_headers
20553
20554 Configuration links:
20555 $config_links
20556
20557 Configuration commands:
20558 $config_commands
20559
20560 Report bugs to the package provider."
20561
20562 _ACEOF
20563 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20564 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20565 ac_cs_version="\\
20566 config.status
20567 configured by $0, generated by GNU Autoconf 2.69,
20568 with options \\"\$ac_cs_config\\"
20569
20570 Copyright (C) 2012 Free Software Foundation, Inc.
20571 This config.status script is free software; the Free Software Foundation
20572 gives unlimited permission to copy, distribute and modify it."
20573
20574 ac_pwd='$ac_pwd'
20575 srcdir='$srcdir'
20576 INSTALL='$INSTALL'
20577 AWK='$AWK'
20578 test -n "\$AWK" || AWK=awk
20579 _ACEOF
20580
20581 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20582 # The default lists apply if the user does not specify any file.
20583 ac_need_defaults=:
20584 while test $# != 0
20585 do
20586 case $1 in
20587 --*=?*)
20588 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20589 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20590 ac_shift=:
20591 ;;
20592 --*=)
20593 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20594 ac_optarg=
20595 ac_shift=:
20596 ;;
20597 *)
20598 ac_option=$1
20599 ac_optarg=$2
20600 ac_shift=shift
20601 ;;
20602 esac
20603
20604 case $ac_option in
20605 # Handling of the options.
20606 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20607 ac_cs_recheck=: ;;
20608 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20609 $as_echo "$ac_cs_version"; exit ;;
20610 --config | --confi | --conf | --con | --co | --c )
20611 $as_echo "$ac_cs_config"; exit ;;
20612 --debug | --debu | --deb | --de | --d | -d )
20613 debug=: ;;
20614 --file | --fil | --fi | --f )
20615 $ac_shift
20616 case $ac_optarg in
20617 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20618 '') as_fn_error $? "missing file argument" ;;
20619 esac
20620 as_fn_append CONFIG_FILES " '$ac_optarg'"
20621 ac_need_defaults=false;;
20622 --header | --heade | --head | --hea )
20623 $ac_shift
20624 case $ac_optarg in
20625 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20626 esac
20627 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20628 ac_need_defaults=false;;
20629 --he | --h)
20630 # Conflict between --help and --header
20631 as_fn_error $? "ambiguous option: \`$1'
20632 Try \`$0 --help' for more information.";;
20633 --help | --hel | -h )
20634 $as_echo "$ac_cs_usage"; exit ;;
20635 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20636 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20637 ac_cs_silent=: ;;
20638
20639 # This is an error.
20640 -*) as_fn_error $? "unrecognized option: \`$1'
20641 Try \`$0 --help' for more information." ;;
20642
20643 *) as_fn_append ac_config_targets " $1"
20644 ac_need_defaults=false ;;
20645
20646 esac
20647 shift
20648 done
20649
20650 ac_configure_extra_args=
20651
20652 if $ac_cs_silent; then
20653 exec 6>/dev/null
20654 ac_configure_extra_args="$ac_configure_extra_args --silent"
20655 fi
20656
20657 _ACEOF
20658 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20659 if \$ac_cs_recheck; then
20660 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20661 shift
20662 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20663 CONFIG_SHELL='$SHELL'
20664 export CONFIG_SHELL
20665 exec "\$@"
20666 fi
20667
20668 _ACEOF
20669 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20670 exec 5>>config.log
20671 {
20672 echo
20673 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20674 ## Running $as_me. ##
20675 _ASBOX
20676 $as_echo "$ac_log"
20677 } >&5
20678
20679 _ACEOF
20680 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20681 #
20682 # INIT-COMMANDS
20683 #
20684 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20685 GDB_NM_FILE=$GDB_NM_FILE
20686
20687 _ACEOF
20688
20689 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20690
20691 # Handling of arguments.
20692 for ac_config_target in $ac_config_targets
20693 do
20694 case $ac_config_target in
20695 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20696 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20697 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20698 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20699 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20700 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20701 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20702 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20703 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20704 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20705
20706 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20707 esac
20708 done
20709
20710
20711 # If the user did not use the arguments to specify the items to instantiate,
20712 # then the envvar interface is used. Set only those that are not.
20713 # We use the long form for the default assignment because of an extremely
20714 # bizarre bug on SunOS 4.1.3.
20715 if $ac_need_defaults; then
20716 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20717 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20718 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20719 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20720 fi
20721
20722 # Have a temporary directory for convenience. Make it in the build tree
20723 # simply because there is no reason against having it here, and in addition,
20724 # creating and moving files from /tmp can sometimes cause problems.
20725 # Hook for its removal unless debugging.
20726 # Note that there is a small window in which the directory will not be cleaned:
20727 # after its creation but before its name has been assigned to `$tmp'.
20728 $debug ||
20729 {
20730 tmp= ac_tmp=
20731 trap 'exit_status=$?
20732 : "${ac_tmp:=$tmp}"
20733 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20734 ' 0
20735 trap 'as_fn_exit 1' 1 2 13 15
20736 }
20737 # Create a (secure) tmp directory for tmp files.
20738
20739 {
20740 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20741 test -d "$tmp"
20742 } ||
20743 {
20744 tmp=./conf$$-$RANDOM
20745 (umask 077 && mkdir "$tmp")
20746 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20747 ac_tmp=$tmp
20748
20749 # Set up the scripts for CONFIG_FILES section.
20750 # No need to generate them if there are no CONFIG_FILES.
20751 # This happens for instance with `./config.status config.h'.
20752 if test -n "$CONFIG_FILES"; then
20753
20754 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20755 ac_cs_awk_getline=:
20756 ac_cs_awk_pipe_init=
20757 ac_cs_awk_read_file='
20758 while ((getline aline < (F[key])) > 0)
20759 print(aline)
20760 close(F[key])'
20761 ac_cs_awk_pipe_fini=
20762 else
20763 ac_cs_awk_getline=false
20764 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20765 ac_cs_awk_read_file='
20766 print "|#_!!_#|"
20767 print "cat " F[key] " &&"
20768 '$ac_cs_awk_pipe_init
20769 # The final `:' finishes the AND list.
20770 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20771 fi
20772 ac_cr=`echo X | tr X '\015'`
20773 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20774 # But we know of no other shell where ac_cr would be empty at this
20775 # point, so we can use a bashism as a fallback.
20776 if test "x$ac_cr" = x; then
20777 eval ac_cr=\$\'\\r\'
20778 fi
20779 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20780 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20781 ac_cs_awk_cr='\\r'
20782 else
20783 ac_cs_awk_cr=$ac_cr
20784 fi
20785
20786 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20787 _ACEOF
20788
20789 # Create commands to substitute file output variables.
20790 {
20791 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20792 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20793 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20794 echo "_ACAWK" &&
20795 echo "_ACEOF"
20796 } >conf$$files.sh &&
20797 . ./conf$$files.sh ||
20798 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20799 rm -f conf$$files.sh
20800
20801 {
20802 echo "cat >conf$$subs.awk <<_ACEOF" &&
20803 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20804 echo "_ACEOF"
20805 } >conf$$subs.sh ||
20806 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20807 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20808 ac_delim='%!_!# '
20809 for ac_last_try in false false false false false :; do
20810 . ./conf$$subs.sh ||
20811 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20812
20813 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20814 if test $ac_delim_n = $ac_delim_num; then
20815 break
20816 elif $ac_last_try; then
20817 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20818 else
20819 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20820 fi
20821 done
20822 rm -f conf$$subs.sh
20823
20824 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20825 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20826 _ACEOF
20827 sed -n '
20828 h
20829 s/^/S["/; s/!.*/"]=/
20830 p
20831 g
20832 s/^[^!]*!//
20833 :repl
20834 t repl
20835 s/'"$ac_delim"'$//
20836 t delim
20837 :nl
20838 h
20839 s/\(.\{148\}\)..*/\1/
20840 t more1
20841 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20842 p
20843 n
20844 b repl
20845 :more1
20846 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20847 p
20848 g
20849 s/.\{148\}//
20850 t nl
20851 :delim
20852 h
20853 s/\(.\{148\}\)..*/\1/
20854 t more2
20855 s/["\\]/\\&/g; s/^/"/; s/$/"/
20856 p
20857 b
20858 :more2
20859 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20860 p
20861 g
20862 s/.\{148\}//
20863 t delim
20864 ' <conf$$subs.awk | sed '
20865 /^[^""]/{
20866 N
20867 s/\n//
20868 }
20869 ' >>$CONFIG_STATUS || ac_write_fail=1
20870 rm -f conf$$subs.awk
20871 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20872 _ACAWK
20873 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20874 for (key in S) S_is_set[key] = 1
20875 FS = "\a"
20876 \$ac_cs_awk_pipe_init
20877 }
20878 {
20879 line = $ 0
20880 nfields = split(line, field, "@")
20881 substed = 0
20882 len = length(field[1])
20883 for (i = 2; i < nfields; i++) {
20884 key = field[i]
20885 keylen = length(key)
20886 if (S_is_set[key]) {
20887 value = S[key]
20888 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20889 len += length(value) + length(field[++i])
20890 substed = 1
20891 } else
20892 len += 1 + keylen
20893 }
20894 if (nfields == 3 && !substed) {
20895 key = field[2]
20896 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20897 \$ac_cs_awk_read_file
20898 next
20899 }
20900 }
20901 print line
20902 }
20903 \$ac_cs_awk_pipe_fini
20904 _ACAWK
20905 _ACEOF
20906 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20907 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20908 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20909 else
20910 cat
20911 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20912 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20913 _ACEOF
20914
20915 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20916 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20917 # trailing colons and then remove the whole line if VPATH becomes empty
20918 # (actually we leave an empty line to preserve line numbers).
20919 if test "x$srcdir" = x.; then
20920 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20921 h
20922 s///
20923 s/^/:/
20924 s/[ ]*$/:/
20925 s/:\$(srcdir):/:/g
20926 s/:\${srcdir}:/:/g
20927 s/:@srcdir@:/:/g
20928 s/^:*//
20929 s/:*$//
20930 x
20931 s/\(=[ ]*\).*/\1/
20932 G
20933 s/\n//
20934 s/^[^=]*=[ ]*$//
20935 }'
20936 fi
20937
20938 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20939 fi # test -n "$CONFIG_FILES"
20940
20941 # Set up the scripts for CONFIG_HEADERS section.
20942 # No need to generate them if there are no CONFIG_HEADERS.
20943 # This happens for instance with `./config.status Makefile'.
20944 if test -n "$CONFIG_HEADERS"; then
20945 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20946 BEGIN {
20947 _ACEOF
20948
20949 # Transform confdefs.h into an awk script `defines.awk', embedded as
20950 # here-document in config.status, that substitutes the proper values into
20951 # config.h.in to produce config.h.
20952
20953 # Create a delimiter string that does not exist in confdefs.h, to ease
20954 # handling of long lines.
20955 ac_delim='%!_!# '
20956 for ac_last_try in false false :; do
20957 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20958 if test -z "$ac_tt"; then
20959 break
20960 elif $ac_last_try; then
20961 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20962 else
20963 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20964 fi
20965 done
20966
20967 # For the awk script, D is an array of macro values keyed by name,
20968 # likewise P contains macro parameters if any. Preserve backslash
20969 # newline sequences.
20970
20971 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20972 sed -n '
20973 s/.\{148\}/&'"$ac_delim"'/g
20974 t rset
20975 :rset
20976 s/^[ ]*#[ ]*define[ ][ ]*/ /
20977 t def
20978 d
20979 :def
20980 s/\\$//
20981 t bsnl
20982 s/["\\]/\\&/g
20983 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20984 D["\1"]=" \3"/p
20985 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20986 d
20987 :bsnl
20988 s/["\\]/\\&/g
20989 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20990 D["\1"]=" \3\\\\\\n"\\/p
20991 t cont
20992 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20993 t cont
20994 d
20995 :cont
20996 n
20997 s/.\{148\}/&'"$ac_delim"'/g
20998 t clear
20999 :clear
21000 s/\\$//
21001 t bsnlc
21002 s/["\\]/\\&/g; s/^/"/; s/$/"/p
21003 d
21004 :bsnlc
21005 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21006 b cont
21007 ' <confdefs.h | sed '
21008 s/'"$ac_delim"'/"\\\
21009 "/g' >>$CONFIG_STATUS || ac_write_fail=1
21010
21011 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21012 for (key in D) D_is_set[key] = 1
21013 FS = "\a"
21014 }
21015 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21016 line = \$ 0
21017 split(line, arg, " ")
21018 if (arg[1] == "#") {
21019 defundef = arg[2]
21020 mac1 = arg[3]
21021 } else {
21022 defundef = substr(arg[1], 2)
21023 mac1 = arg[2]
21024 }
21025 split(mac1, mac2, "(") #)
21026 macro = mac2[1]
21027 prefix = substr(line, 1, index(line, defundef) - 1)
21028 if (D_is_set[macro]) {
21029 # Preserve the white space surrounding the "#".
21030 print prefix "define", macro P[macro] D[macro]
21031 next
21032 } else {
21033 # Replace #undef with comments. This is necessary, for example,
21034 # in the case of _POSIX_SOURCE, which is predefined and required
21035 # on some systems where configure will not decide to define it.
21036 if (defundef == "undef") {
21037 print "/*", prefix defundef, macro, "*/"
21038 next
21039 }
21040 }
21041 }
21042 { print }
21043 _ACAWK
21044 _ACEOF
21045 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21046 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21047 fi # test -n "$CONFIG_HEADERS"
21048
21049
21050 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
21051 shift
21052 for ac_tag
21053 do
21054 case $ac_tag in
21055 :[FHLC]) ac_mode=$ac_tag; continue;;
21056 esac
21057 case $ac_mode$ac_tag in
21058 :[FHL]*:*);;
21059 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21060 :[FH]-) ac_tag=-:-;;
21061 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21062 esac
21063 ac_save_IFS=$IFS
21064 IFS=:
21065 set x $ac_tag
21066 IFS=$ac_save_IFS
21067 shift
21068 ac_file=$1
21069 shift
21070
21071 case $ac_mode in
21072 :L) ac_source=$1;;
21073 :[FH])
21074 ac_file_inputs=
21075 for ac_f
21076 do
21077 case $ac_f in
21078 -) ac_f="$ac_tmp/stdin";;
21079 *) # Look for the file first in the build tree, then in the source tree
21080 # (if the path is not absolute). The absolute path cannot be DOS-style,
21081 # because $ac_f cannot contain `:'.
21082 test -f "$ac_f" ||
21083 case $ac_f in
21084 [\\/$]*) false;;
21085 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21086 esac ||
21087 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21088 esac
21089 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21090 as_fn_append ac_file_inputs " '$ac_f'"
21091 done
21092
21093 # Let's still pretend it is `configure' which instantiates (i.e., don't
21094 # use $as_me), people would be surprised to read:
21095 # /* config.h. Generated by config.status. */
21096 configure_input='Generated from '`
21097 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21098 `' by configure.'
21099 if test x"$ac_file" != x-; then
21100 configure_input="$ac_file. $configure_input"
21101 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21102 $as_echo "$as_me: creating $ac_file" >&6;}
21103 fi
21104 # Neutralize special characters interpreted by sed in replacement strings.
21105 case $configure_input in #(
21106 *\&* | *\|* | *\\* )
21107 ac_sed_conf_input=`$as_echo "$configure_input" |
21108 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21109 *) ac_sed_conf_input=$configure_input;;
21110 esac
21111
21112 case $ac_tag in
21113 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21114 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21115 esac
21116 ;;
21117 esac
21118
21119 ac_dir=`$as_dirname -- "$ac_file" ||
21120 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21121 X"$ac_file" : 'X\(//\)[^/]' \| \
21122 X"$ac_file" : 'X\(//\)$' \| \
21123 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21124 $as_echo X"$ac_file" |
21125 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21126 s//\1/
21127 q
21128 }
21129 /^X\(\/\/\)[^/].*/{
21130 s//\1/
21131 q
21132 }
21133 /^X\(\/\/\)$/{
21134 s//\1/
21135 q
21136 }
21137 /^X\(\/\).*/{
21138 s//\1/
21139 q
21140 }
21141 s/.*/./; q'`
21142 as_dir="$ac_dir"; as_fn_mkdir_p
21143 ac_builddir=.
21144
21145 case "$ac_dir" in
21146 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21147 *)
21148 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21149 # A ".." for each directory in $ac_dir_suffix.
21150 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21151 case $ac_top_builddir_sub in
21152 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21153 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21154 esac ;;
21155 esac
21156 ac_abs_top_builddir=$ac_pwd
21157 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21158 # for backward compatibility:
21159 ac_top_builddir=$ac_top_build_prefix
21160
21161 case $srcdir in
21162 .) # We are building in place.
21163 ac_srcdir=.
21164 ac_top_srcdir=$ac_top_builddir_sub
21165 ac_abs_top_srcdir=$ac_pwd ;;
21166 [\\/]* | ?:[\\/]* ) # Absolute name.
21167 ac_srcdir=$srcdir$ac_dir_suffix;
21168 ac_top_srcdir=$srcdir
21169 ac_abs_top_srcdir=$srcdir ;;
21170 *) # Relative name.
21171 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21172 ac_top_srcdir=$ac_top_build_prefix$srcdir
21173 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21174 esac
21175 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21176
21177
21178 case $ac_mode in
21179 :F)
21180 #
21181 # CONFIG_FILE
21182 #
21183
21184 case $INSTALL in
21185 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21186 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21187 esac
21188 _ACEOF
21189
21190 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21191 # If the template does not know about datarootdir, expand it.
21192 # FIXME: This hack should be removed a few years after 2.60.
21193 ac_datarootdir_hack=; ac_datarootdir_seen=
21194 ac_sed_dataroot='
21195 /datarootdir/ {
21196 p
21197 q
21198 }
21199 /@datadir@/p
21200 /@docdir@/p
21201 /@infodir@/p
21202 /@localedir@/p
21203 /@mandir@/p'
21204 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21205 *datarootdir*) ac_datarootdir_seen=yes;;
21206 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21208 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21209 _ACEOF
21210 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21211 ac_datarootdir_hack='
21212 s&@datadir@&$datadir&g
21213 s&@docdir@&$docdir&g
21214 s&@infodir@&$infodir&g
21215 s&@localedir@&$localedir&g
21216 s&@mandir@&$mandir&g
21217 s&\\\${datarootdir}&$datarootdir&g' ;;
21218 esac
21219 _ACEOF
21220
21221 # Neutralize VPATH when `$srcdir' = `.'.
21222 # Shell code in configure.ac might set extrasub.
21223 # FIXME: do we really want to maintain this feature?
21224 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21225 ac_sed_extra="$ac_vpsub
21226 $extrasub
21227 _ACEOF
21228 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21229 :t
21230 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21231 s|@configure_input@|$ac_sed_conf_input|;t t
21232 s&@top_builddir@&$ac_top_builddir_sub&;t t
21233 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21234 s&@srcdir@&$ac_srcdir&;t t
21235 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21236 s&@top_srcdir@&$ac_top_srcdir&;t t
21237 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21238 s&@builddir@&$ac_builddir&;t t
21239 s&@abs_builddir@&$ac_abs_builddir&;t t
21240 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21241 s&@INSTALL@&$ac_INSTALL&;t t
21242 $ac_datarootdir_hack
21243 "
21244 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
21245 if $ac_cs_awk_getline; then
21246 $AWK -f "$ac_tmp/subs.awk"
21247 else
21248 $AWK -f "$ac_tmp/subs.awk" | $SHELL
21249 fi \
21250 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21251
21252 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21253 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21254 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21255 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21257 which seems to be undefined. Please make sure it is defined" >&5
21258 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21259 which seems to be undefined. Please make sure it is defined" >&2;}
21260
21261 rm -f "$ac_tmp/stdin"
21262 case $ac_file in
21263 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21264 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21265 esac \
21266 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21267 ;;
21268 :H)
21269 #
21270 # CONFIG_HEADER
21271 #
21272 if test x"$ac_file" != x-; then
21273 {
21274 $as_echo "/* $configure_input */" \
21275 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21276 } >"$ac_tmp/config.h" \
21277 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21278 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21279 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21280 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21281 else
21282 rm -f "$ac_file"
21283 mv "$ac_tmp/config.h" "$ac_file" \
21284 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21285 fi
21286 else
21287 $as_echo "/* $configure_input */" \
21288 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21289 || as_fn_error $? "could not create -" "$LINENO" 5
21290 fi
21291 ;;
21292 :L)
21293 #
21294 # CONFIG_LINK
21295 #
21296
21297 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21298 :
21299 else
21300 # Prefer the file from the source tree if names are identical.
21301 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21302 ac_source=$srcdir/$ac_source
21303 fi
21304
21305 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21306 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21307
21308 if test ! -r "$ac_source"; then
21309 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21310 fi
21311 rm -f "$ac_file"
21312
21313 # Try a relative symlink, then a hard link, then a copy.
21314 case $ac_source in
21315 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21316 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21317 esac
21318 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21319 ln "$ac_source" "$ac_file" 2>/dev/null ||
21320 cp -p "$ac_source" "$ac_file" ||
21321 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21322 fi
21323 ;;
21324 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21325 $as_echo "$as_me: executing $ac_file commands" >&6;}
21326 ;;
21327 esac
21328
21329
21330 case $ac_file$ac_mode in
21331 "config.h":H) echo > stamp-h ;;
21332 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
21333 "nm.h":L) echo > stamp-nmh ;;
21334 "gcore":F) chmod +x gcore ;;
21335
21336 esac
21337 done # for ac_tag
21338
21339
21340 as_fn_exit 0
21341 _ACEOF
21342 ac_clean_files=$ac_clean_files_save
21343
21344 test $ac_write_fail = 0 ||
21345 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21346
21347
21348 # configure is writing to config.log, and then calls config.status.
21349 # config.status does its own redirection, appending to config.log.
21350 # Unfortunately, on DOS this fails, as config.log is still kept open
21351 # by configure, so config.status won't be able to write to it; its
21352 # output is simply discarded. So we exec the FD to /dev/null,
21353 # effectively closing config.log, so it can be properly (re)opened and
21354 # appended to by config.status. When coming back to configure, we
21355 # need to make the FD available again.
21356 if test "$no_create" != yes; then
21357 ac_cs_success=:
21358 ac_config_status_args=
21359 test "$silent" = yes &&
21360 ac_config_status_args="$ac_config_status_args --quiet"
21361 exec 5>/dev/null
21362 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21363 exec 5>>config.log
21364 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21365 # would make configure fail if this is the last instruction.
21366 $ac_cs_success || as_fn_exit 1
21367 fi
21368
21369 #
21370 # CONFIG_SUBDIRS section.
21371 #
21372 if test "$no_recursion" != yes; then
21373
21374 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
21375 # so they do not pile up.
21376 ac_sub_configure_args=
21377 ac_prev=
21378 eval "set x $ac_configure_args"
21379 shift
21380 for ac_arg
21381 do
21382 if test -n "$ac_prev"; then
21383 ac_prev=
21384 continue
21385 fi
21386 case $ac_arg in
21387 -cache-file | --cache-file | --cache-fil | --cache-fi \
21388 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
21389 ac_prev=cache_file ;;
21390 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
21391 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
21392 | --c=*)
21393 ;;
21394 --config-cache | -C)
21395 ;;
21396 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
21397 ac_prev=srcdir ;;
21398 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
21399 ;;
21400 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
21401 ac_prev=prefix ;;
21402 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
21403 ;;
21404 --disable-option-checking)
21405 ;;
21406 *)
21407 case $ac_arg in
21408 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21409 esac
21410 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
21411 esac
21412 done
21413
21414 # Always prepend --prefix to ensure using the same prefix
21415 # in subdir configurations.
21416 ac_arg="--prefix=$prefix"
21417 case $ac_arg in
21418 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21419 esac
21420 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
21421
21422 # Pass --silent
21423 if test "$silent" = yes; then
21424 ac_sub_configure_args="--silent $ac_sub_configure_args"
21425 fi
21426
21427 # Always prepend --disable-option-checking to silence warnings, since
21428 # different subdirs can have different --enable and --with options.
21429 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
21430
21431 ac_popdir=`pwd`
21432 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
21433
21434 # Do not complain, so a configure script can configure whichever
21435 # parts of a large source tree are present.
21436 test -d "$srcdir/$ac_dir" || continue
21437
21438 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
21439 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
21440 $as_echo "$ac_msg" >&6
21441 as_dir="$ac_dir"; as_fn_mkdir_p
21442 ac_builddir=.
21443
21444 case "$ac_dir" in
21445 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21446 *)
21447 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21448 # A ".." for each directory in $ac_dir_suffix.
21449 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21450 case $ac_top_builddir_sub in
21451 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21452 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21453 esac ;;
21454 esac
21455 ac_abs_top_builddir=$ac_pwd
21456 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21457 # for backward compatibility:
21458 ac_top_builddir=$ac_top_build_prefix
21459
21460 case $srcdir in
21461 .) # We are building in place.
21462 ac_srcdir=.
21463 ac_top_srcdir=$ac_top_builddir_sub
21464 ac_abs_top_srcdir=$ac_pwd ;;
21465 [\\/]* | ?:[\\/]* ) # Absolute name.
21466 ac_srcdir=$srcdir$ac_dir_suffix;
21467 ac_top_srcdir=$srcdir
21468 ac_abs_top_srcdir=$srcdir ;;
21469 *) # Relative name.
21470 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21471 ac_top_srcdir=$ac_top_build_prefix$srcdir
21472 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21473 esac
21474 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21475
21476
21477 cd "$ac_dir"
21478
21479 # Check for guested configure; otherwise get Cygnus style configure.
21480 if test -f "$ac_srcdir/configure.gnu"; then
21481 ac_sub_configure=$ac_srcdir/configure.gnu
21482 elif test -f "$ac_srcdir/configure"; then
21483 ac_sub_configure=$ac_srcdir/configure
21484 elif test -f "$ac_srcdir/configure.in"; then
21485 # This should be Cygnus configure.
21486 ac_sub_configure=$ac_aux_dir/configure
21487 else
21488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
21489 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
21490 ac_sub_configure=
21491 fi
21492
21493 # The recursion is here.
21494 if test -n "$ac_sub_configure"; then
21495 # Make the cache file name correct relative to the subdirectory.
21496 case $cache_file in
21497 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
21498 *) # Relative name.
21499 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
21500 esac
21501
21502 { $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
21503 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
21504 # The eval makes quoting arguments work.
21505 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
21506 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
21507 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
21508 fi
21509
21510 cd "$ac_popdir"
21511 done
21512 fi
21513 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21514 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21515 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21516 fi
21517