Automatic date update in version.in
[binutils-gdb.git] / gdb / configure
blob4dbd0c3b13ceeb94a3e50d246a481eb981be5eff
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
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 ## -------------------- ##
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 *) :
30 esac
34 as_nl='
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"
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
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=';'
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"
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
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
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
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
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='+ '
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
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
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 *) :
174 esac
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; }
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 :
190 else
191 exitcode=1; echo positional parameters were not saved.
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
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
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
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
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
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
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
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."
272 exit 1
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
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
285 # as_fn_unset VAR
286 # ---------------
287 # Portably unset VAR.
288 as_fn_unset ()
290 { eval $1=; unset $1;}
292 as_unset=as_fn_unset
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
297 as_fn_set_status ()
299 return $1
300 } # as_fn_set_status
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 ()
307 set +e
308 as_fn_set_status $1
309 exit $1
310 } # as_fn_exit
312 # as_fn_mkdir_p
313 # -------------
314 # Create "$as_dir" as a directory, including parents if necessary.
315 as_fn_mkdir_p ()
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/
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
343 /^X\(\/\/\)$/{
344 s//\1/
347 /^X\(\/\).*/{
348 s//\1/
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"
358 } # as_fn_mkdir_p
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p ()
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 ()
376 eval $1+=\$2
378 else
379 as_fn_append ()
381 eval $1=\$$1\$2
383 fi # as_fn_append
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 ()
393 as_val=$(( $* ))
395 else
396 as_fn_arith ()
398 as_val=`expr "$@" || test $? -eq 1`
400 fi # as_fn_arith
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 ()
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
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417 } # as_fn_error
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
426 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428 else
429 as_basename=false
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
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/
447 /^X\/\(\/\/\)$/{
448 s//\1/
451 /^X\/\(\/\).*/{
452 s//\1/
455 s/.*/./; q'`
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
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 '
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
478 :lineno
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; }
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
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;;
510 ECHO_N='-n';;
511 esac
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
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'
534 else
535 as_ln_s='cp -pR'
537 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538 rmdir conf$$.dir 2>/dev/null
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
547 as_test_x='test -x'
548 as_executable_p=as_fn_executable_p
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'"
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'"
557 test -n "$DJDIR" || exec 7<&0 </dev/null
558 exec 6>&1
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`
566 # Initializations.
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=
577 # Identity of this package.
578 PACKAGE_NAME=
579 PACKAGE_TARNAME=
580 PACKAGE_VERSION=
581 PACKAGE_STRING=
582 PACKAGE_BUGREPORT=
583 PACKAGE_URL=
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"
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
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
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
753 WINDRES
754 DLLTOOL
756 YFLAGS
757 YACC
758 RANLIB
759 LN_S
760 INSTALL_DATA
761 INSTALL_SCRIPT
762 INSTALL_PROGRAM
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 ENABLE_BFD_64_BIT_FALSE
776 ENABLE_BFD_64_BIT_TRUE
777 subdirs
778 GDB_DATADIR
779 DEBUGDIR
780 MAKEINFO_EXTRA_FLAGS
781 MAKEINFOFLAGS
782 MAKEINFO
783 PACKAGE
784 CATOBJEXT
785 GENCAT
786 INSTOBJEXT
787 DATADIRNAME
788 CATALOGS
789 POSUB
790 GMSGFMT
791 XGETTEXT
792 INCINTL
793 LIBINTL_DEP
794 LIBINTL
795 USE_NLS
796 CCDEPMODE
797 DEPDIR
798 am__leading_dot
799 CXX_DIALECT
800 HAVE_CXX11
801 target_noncanonical
802 INSTALL_STRIP_PROGRAM
803 STRIP
804 install_sh
805 LARGEFILE_CPPFLAGS
806 target_os
807 target_vendor
808 target_cpu
809 target
810 host_os
811 host_vendor
812 host_cpu
813 host
814 build_os
815 build_vendor
816 build_cpu
817 build
818 EGREP
819 GREP
821 ac_ct_CXX
822 CXXFLAGS
824 OBJEXT
825 EXEEXT
826 ac_ct_CC
827 CPPFLAGS
828 LDFLAGS
829 CFLAGS
831 MAINT
832 MAINTAINER_MODE_FALSE
833 MAINTAINER_MODE_TRUE
834 target_alias
835 host_alias
836 build_alias
837 LIBS
838 ECHO_T
839 ECHO_N
840 ECHO_C
841 DEFS
842 mandir
843 localedir
844 libdir
845 psdir
846 pdfdir
847 dvidir
848 htmldir
849 infodir
850 docdir
851 oldincludedir
852 includedir
853 localstatedir
854 sharedstatedir
855 sysconfdir
856 datadir
857 datarootdir
858 libexecdir
859 sbindir
860 bindir
861 program_transform_name
862 prefix
863 exec_prefix
864 PACKAGE_URL
865 PACKAGE_BUGREPORT
866 PACKAGE_STRING
867 PACKAGE_VERSION
868 PACKAGE_TARNAME
869 PACKAGE_NAME
870 PATH_SEPARATOR
871 SHELL'
872 ac_subst_files='nat_makefile_frag'
873 ac_user_opts='
874 enable_option_checking
875 enable_maintainer_mode
876 enable_plugins
877 enable_largefile
878 with_separate_debug_dir
879 with_gdb_datadir
880 with_relocated_sources
881 with_auto_load_dir
882 with_auto_load_safe_path
883 enable_targets
884 enable_64_bit_bfd
885 enable_gdbmi
886 enable_tui
887 enable_gdbtk
888 with_debuginfod
889 with_libunwind_ia64
890 with_curses
891 enable_profiling
892 enable_codesign
893 with_pkgversion
894 with_bugurl
895 with_system_zlib
896 with_gnu_ld
897 enable_rpath
898 with_libiconv_prefix
899 with_libiconv_type
900 with_iconv_bin
901 with_system_readline
902 with_jit_reader_dir
903 with_expat
904 with_libexpat_prefix
905 with_libexpat_type
906 with_libgmp_prefix
907 with_libgmp_type
908 with_mpfr
909 with_libmpfr_prefix
910 with_libmpfr_type
911 with_python
912 with_python_libdir
913 with_guile
914 enable_source_highlight
915 enable_threading
916 with_intel_pt
917 with_libipt_prefix
918 with_libipt_type
919 with_sysroot
920 with_system_gdbinit
921 with_system_gdbinit_dir
922 enable_werror
923 enable_build_warnings
924 enable_gdb_build_warnings
925 enable_ubsan
926 with_lzma
927 with_liblzma_prefix
928 with_liblzma_type
929 with_tcl
930 with_tk
931 with_x
932 enable_sim
933 enable_libbacktrace
934 with_babeltrace
935 with_libbabeltrace_prefix
936 with_libbabeltrace_type
937 with_xxhash
938 enable_libctf
939 with_libxxhash_prefix
940 with_libxxhash_type
941 enable_unit_tests
943 ac_precious_vars='build_alias
944 host_alias
945 target_alias
947 CFLAGS
948 LDFLAGS
949 LIBS
950 CPPFLAGS
952 CXXFLAGS
955 MAKEINFO
956 MAKEINFOFLAGS
957 PKG_CONFIG
958 PKG_CONFIG_PATH
959 PKG_CONFIG_LIBDIR
960 DEBUGINFOD_CFLAGS
961 DEBUGINFOD_LIBS
962 YACC
963 YFLAGS
964 XMKMF'
965 ac_subdirs_all='testsuite
966 gdbtk'
968 # Initialize some variables set by options.
969 ac_init_help=
970 ac_init_version=false
971 ac_unrecognized_opts=
972 ac_unrecognized_sep=
973 # The variables have the same names as the options, with
974 # dashes changed to underlines.
975 cache_file=/dev/null
976 exec_prefix=NONE
977 no_create=
978 no_recursion=
979 prefix=NONE
980 program_prefix=NONE
981 program_suffix=NONE
982 program_transform_name=s,x,x,
983 silent=
984 site=
985 srcdir=
986 verbose=
987 x_includes=NONE
988 x_libraries=NONE
990 # Installation directory options.
991 # These are left unexpanded so users can "make install exec_prefix=/foo"
992 # and all the variables that are supposed to be based on exec_prefix
993 # by default will actually change.
994 # Use braces instead of parens because sh, perl, etc. also accept them.
995 # (The list follows the same order as the GNU Coding Standards.)
996 bindir='${exec_prefix}/bin'
997 sbindir='${exec_prefix}/sbin'
998 libexecdir='${exec_prefix}/libexec'
999 datarootdir='${prefix}/share'
1000 datadir='${datarootdir}'
1001 sysconfdir='${prefix}/etc'
1002 sharedstatedir='${prefix}/com'
1003 localstatedir='${prefix}/var'
1004 includedir='${prefix}/include'
1005 oldincludedir='/usr/include'
1006 docdir='${datarootdir}/doc/${PACKAGE}'
1007 infodir='${datarootdir}/info'
1008 htmldir='${docdir}'
1009 dvidir='${docdir}'
1010 pdfdir='${docdir}'
1011 psdir='${docdir}'
1012 libdir='${exec_prefix}/lib'
1013 localedir='${datarootdir}/locale'
1014 mandir='${datarootdir}/man'
1016 ac_prev=
1017 ac_dashdash=
1018 for ac_option
1020 # If the previous option needs an argument, assign it.
1021 if test -n "$ac_prev"; then
1022 eval $ac_prev=\$ac_option
1023 ac_prev=
1024 continue
1027 case $ac_option in
1028 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1029 *=) ac_optarg= ;;
1030 *) ac_optarg=yes ;;
1031 esac
1033 # Accept the important Cygnus configure options, so we can diagnose typos.
1035 case $ac_dashdash$ac_option in
1037 ac_dashdash=yes ;;
1039 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1040 ac_prev=bindir ;;
1041 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1042 bindir=$ac_optarg ;;
1044 -build | --build | --buil | --bui | --bu)
1045 ac_prev=build_alias ;;
1046 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1047 build_alias=$ac_optarg ;;
1049 -cache-file | --cache-file | --cache-fil | --cache-fi \
1050 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1051 ac_prev=cache_file ;;
1052 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1053 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1054 cache_file=$ac_optarg ;;
1056 --config-cache | -C)
1057 cache_file=config.cache ;;
1059 -datadir | --datadir | --datadi | --datad)
1060 ac_prev=datadir ;;
1061 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1062 datadir=$ac_optarg ;;
1064 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1065 | --dataroo | --dataro | --datar)
1066 ac_prev=datarootdir ;;
1067 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1068 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1069 datarootdir=$ac_optarg ;;
1071 -disable-* | --disable-*)
1072 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1073 # Reject names that are not valid shell variable names.
1074 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1075 as_fn_error $? "invalid feature name: $ac_useropt"
1076 ac_useropt_orig=$ac_useropt
1077 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1078 case $ac_user_opts in
1080 "enable_$ac_useropt"
1081 "*) ;;
1082 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1083 ac_unrecognized_sep=', ';;
1084 esac
1085 eval enable_$ac_useropt=no ;;
1087 -docdir | --docdir | --docdi | --doc | --do)
1088 ac_prev=docdir ;;
1089 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1090 docdir=$ac_optarg ;;
1092 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1093 ac_prev=dvidir ;;
1094 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1095 dvidir=$ac_optarg ;;
1097 -enable-* | --enable-*)
1098 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1099 # Reject names that are not valid shell variable names.
1100 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1101 as_fn_error $? "invalid feature name: $ac_useropt"
1102 ac_useropt_orig=$ac_useropt
1103 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1104 case $ac_user_opts in
1106 "enable_$ac_useropt"
1107 "*) ;;
1108 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1109 ac_unrecognized_sep=', ';;
1110 esac
1111 eval enable_$ac_useropt=\$ac_optarg ;;
1113 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1114 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1115 | --exec | --exe | --ex)
1116 ac_prev=exec_prefix ;;
1117 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1118 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1119 | --exec=* | --exe=* | --ex=*)
1120 exec_prefix=$ac_optarg ;;
1122 -gas | --gas | --ga | --g)
1123 # Obsolete; use --with-gas.
1124 with_gas=yes ;;
1126 -help | --help | --hel | --he | -h)
1127 ac_init_help=long ;;
1128 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1129 ac_init_help=recursive ;;
1130 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1131 ac_init_help=short ;;
1133 -host | --host | --hos | --ho)
1134 ac_prev=host_alias ;;
1135 -host=* | --host=* | --hos=* | --ho=*)
1136 host_alias=$ac_optarg ;;
1138 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1139 ac_prev=htmldir ;;
1140 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1141 | --ht=*)
1142 htmldir=$ac_optarg ;;
1144 -includedir | --includedir | --includedi | --included | --include \
1145 | --includ | --inclu | --incl | --inc)
1146 ac_prev=includedir ;;
1147 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1148 | --includ=* | --inclu=* | --incl=* | --inc=*)
1149 includedir=$ac_optarg ;;
1151 -infodir | --infodir | --infodi | --infod | --info | --inf)
1152 ac_prev=infodir ;;
1153 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1154 infodir=$ac_optarg ;;
1156 -libdir | --libdir | --libdi | --libd)
1157 ac_prev=libdir ;;
1158 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1159 libdir=$ac_optarg ;;
1161 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1162 | --libexe | --libex | --libe)
1163 ac_prev=libexecdir ;;
1164 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1165 | --libexe=* | --libex=* | --libe=*)
1166 libexecdir=$ac_optarg ;;
1168 -localedir | --localedir | --localedi | --localed | --locale)
1169 ac_prev=localedir ;;
1170 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1171 localedir=$ac_optarg ;;
1173 -localstatedir | --localstatedir | --localstatedi | --localstated \
1174 | --localstate | --localstat | --localsta | --localst | --locals)
1175 ac_prev=localstatedir ;;
1176 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1177 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1178 localstatedir=$ac_optarg ;;
1180 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1181 ac_prev=mandir ;;
1182 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1183 mandir=$ac_optarg ;;
1185 -nfp | --nfp | --nf)
1186 # Obsolete; use --without-fp.
1187 with_fp=no ;;
1189 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1190 | --no-cr | --no-c | -n)
1191 no_create=yes ;;
1193 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1194 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1195 no_recursion=yes ;;
1197 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1198 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1199 | --oldin | --oldi | --old | --ol | --o)
1200 ac_prev=oldincludedir ;;
1201 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1202 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1203 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1204 oldincludedir=$ac_optarg ;;
1206 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1207 ac_prev=prefix ;;
1208 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1209 prefix=$ac_optarg ;;
1211 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1212 | --program-pre | --program-pr | --program-p)
1213 ac_prev=program_prefix ;;
1214 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1215 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1216 program_prefix=$ac_optarg ;;
1218 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1219 | --program-suf | --program-su | --program-s)
1220 ac_prev=program_suffix ;;
1221 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1222 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1223 program_suffix=$ac_optarg ;;
1225 -program-transform-name | --program-transform-name \
1226 | --program-transform-nam | --program-transform-na \
1227 | --program-transform-n | --program-transform- \
1228 | --program-transform | --program-transfor \
1229 | --program-transfo | --program-transf \
1230 | --program-trans | --program-tran \
1231 | --progr-tra | --program-tr | --program-t)
1232 ac_prev=program_transform_name ;;
1233 -program-transform-name=* | --program-transform-name=* \
1234 | --program-transform-nam=* | --program-transform-na=* \
1235 | --program-transform-n=* | --program-transform-=* \
1236 | --program-transform=* | --program-transfor=* \
1237 | --program-transfo=* | --program-transf=* \
1238 | --program-trans=* | --program-tran=* \
1239 | --progr-tra=* | --program-tr=* | --program-t=*)
1240 program_transform_name=$ac_optarg ;;
1242 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1243 ac_prev=pdfdir ;;
1244 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1245 pdfdir=$ac_optarg ;;
1247 -psdir | --psdir | --psdi | --psd | --ps)
1248 ac_prev=psdir ;;
1249 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1250 psdir=$ac_optarg ;;
1252 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1253 | -silent | --silent | --silen | --sile | --sil)
1254 silent=yes ;;
1256 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1257 ac_prev=sbindir ;;
1258 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1259 | --sbi=* | --sb=*)
1260 sbindir=$ac_optarg ;;
1262 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1263 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1264 | --sharedst | --shareds | --shared | --share | --shar \
1265 | --sha | --sh)
1266 ac_prev=sharedstatedir ;;
1267 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1268 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1269 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1270 | --sha=* | --sh=*)
1271 sharedstatedir=$ac_optarg ;;
1273 -site | --site | --sit)
1274 ac_prev=site ;;
1275 -site=* | --site=* | --sit=*)
1276 site=$ac_optarg ;;
1278 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1279 ac_prev=srcdir ;;
1280 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1281 srcdir=$ac_optarg ;;
1283 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1284 | --syscon | --sysco | --sysc | --sys | --sy)
1285 ac_prev=sysconfdir ;;
1286 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1287 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1288 sysconfdir=$ac_optarg ;;
1290 -target | --target | --targe | --targ | --tar | --ta | --t)
1291 ac_prev=target_alias ;;
1292 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1293 target_alias=$ac_optarg ;;
1295 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1296 verbose=yes ;;
1298 -version | --version | --versio | --versi | --vers | -V)
1299 ac_init_version=: ;;
1301 -with-* | --with-*)
1302 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1303 # Reject names that are not valid shell variable names.
1304 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1305 as_fn_error $? "invalid package name: $ac_useropt"
1306 ac_useropt_orig=$ac_useropt
1307 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1308 case $ac_user_opts in
1310 "with_$ac_useropt"
1311 "*) ;;
1312 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1313 ac_unrecognized_sep=', ';;
1314 esac
1315 eval with_$ac_useropt=\$ac_optarg ;;
1317 -without-* | --without-*)
1318 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1319 # Reject names that are not valid shell variable names.
1320 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1321 as_fn_error $? "invalid package name: $ac_useropt"
1322 ac_useropt_orig=$ac_useropt
1323 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1324 case $ac_user_opts in
1326 "with_$ac_useropt"
1327 "*) ;;
1328 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1329 ac_unrecognized_sep=', ';;
1330 esac
1331 eval with_$ac_useropt=no ;;
1333 --x)
1334 # Obsolete; use --with-x.
1335 with_x=yes ;;
1337 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1338 | --x-incl | --x-inc | --x-in | --x-i)
1339 ac_prev=x_includes ;;
1340 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1341 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1342 x_includes=$ac_optarg ;;
1344 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1345 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1346 ac_prev=x_libraries ;;
1347 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1348 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1349 x_libraries=$ac_optarg ;;
1351 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1352 Try \`$0 --help' for more information"
1355 *=*)
1356 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1357 # Reject names that are not valid shell variable names.
1358 case $ac_envvar in #(
1359 '' | [0-9]* | *[!_$as_cr_alnum]* )
1360 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1361 esac
1362 eval $ac_envvar=\$ac_optarg
1363 export $ac_envvar ;;
1366 # FIXME: should be removed in autoconf 3.0.
1367 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1368 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1369 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1370 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1373 esac
1374 done
1376 if test -n "$ac_prev"; then
1377 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1378 as_fn_error $? "missing argument to $ac_option"
1381 if test -n "$ac_unrecognized_opts"; then
1382 case $enable_option_checking in
1383 no) ;;
1384 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1385 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1386 esac
1389 # Check all directory arguments for consistency.
1390 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1391 datadir sysconfdir sharedstatedir localstatedir includedir \
1392 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1393 libdir localedir mandir
1395 eval ac_val=\$$ac_var
1396 # Remove trailing slashes.
1397 case $ac_val in
1398 */ )
1399 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1400 eval $ac_var=\$ac_val;;
1401 esac
1402 # Be sure to have absolute directory names.
1403 case $ac_val in
1404 [\\/$]* | ?:[\\/]* ) continue;;
1405 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1406 esac
1407 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1408 done
1410 # There might be people who depend on the old broken behavior: `$host'
1411 # used to hold the argument of --host etc.
1412 # FIXME: To remove some day.
1413 build=$build_alias
1414 host=$host_alias
1415 target=$target_alias
1417 # FIXME: To remove some day.
1418 if test "x$host_alias" != x; then
1419 if test "x$build_alias" = x; then
1420 cross_compiling=maybe
1421 elif test "x$build_alias" != "x$host_alias"; then
1422 cross_compiling=yes
1426 ac_tool_prefix=
1427 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1429 test "$silent" = yes && exec 6>/dev/null
1432 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1433 ac_ls_di=`ls -di .` &&
1434 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1435 as_fn_error $? "working directory cannot be determined"
1436 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1437 as_fn_error $? "pwd does not report name of working directory"
1440 # Find the source files, if location was not specified.
1441 if test -z "$srcdir"; then
1442 ac_srcdir_defaulted=yes
1443 # Try the directory containing this script, then the parent directory.
1444 ac_confdir=`$as_dirname -- "$as_myself" ||
1445 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1446 X"$as_myself" : 'X\(//\)[^/]' \| \
1447 X"$as_myself" : 'X\(//\)$' \| \
1448 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1449 $as_echo X"$as_myself" |
1450 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1451 s//\1/
1454 /^X\(\/\/\)[^/].*/{
1455 s//\1/
1458 /^X\(\/\/\)$/{
1459 s//\1/
1462 /^X\(\/\).*/{
1463 s//\1/
1466 s/.*/./; q'`
1467 srcdir=$ac_confdir
1468 if test ! -r "$srcdir/$ac_unique_file"; then
1469 srcdir=..
1471 else
1472 ac_srcdir_defaulted=no
1474 if test ! -r "$srcdir/$ac_unique_file"; then
1475 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1476 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1478 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1479 ac_abs_confdir=`(
1480 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1481 pwd)`
1482 # When building in place, set srcdir=.
1483 if test "$ac_abs_confdir" = "$ac_pwd"; then
1484 srcdir=.
1486 # Remove unnecessary trailing slashes from srcdir.
1487 # Double slashes in file names in object file debugging info
1488 # mess up M-x gdb in Emacs.
1489 case $srcdir in
1490 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1491 esac
1492 for ac_var in $ac_precious_vars; do
1493 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1494 eval ac_env_${ac_var}_value=\$${ac_var}
1495 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1496 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1497 done
1500 # Report the --help message.
1502 if test "$ac_init_help" = "long"; then
1503 # Omit some internal or obsolete options to make the list less imposing.
1504 # This message is too long to be a string in the A/UX 3.1 sh.
1505 cat <<_ACEOF
1506 \`configure' configures this package to adapt to many kinds of systems.
1508 Usage: $0 [OPTION]... [VAR=VALUE]...
1510 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1511 VAR=VALUE. See below for descriptions of some of the useful variables.
1513 Defaults for the options are specified in brackets.
1515 Configuration:
1516 -h, --help display this help and exit
1517 --help=short display options specific to this package
1518 --help=recursive display the short help of all the included packages
1519 -V, --version display version information and exit
1520 -q, --quiet, --silent do not print \`checking ...' messages
1521 --cache-file=FILE cache test results in FILE [disabled]
1522 -C, --config-cache alias for \`--cache-file=config.cache'
1523 -n, --no-create do not create output files
1524 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1526 Installation directories:
1527 --prefix=PREFIX install architecture-independent files in PREFIX
1528 [$ac_default_prefix]
1529 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1530 [PREFIX]
1532 By default, \`make install' will install all the files in
1533 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1534 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1535 for instance \`--prefix=\$HOME'.
1537 For better control, use the options below.
1539 Fine tuning of the installation directories:
1540 --bindir=DIR user executables [EPREFIX/bin]
1541 --sbindir=DIR system admin executables [EPREFIX/sbin]
1542 --libexecdir=DIR program executables [EPREFIX/libexec]
1543 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1544 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1545 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1546 --libdir=DIR object code libraries [EPREFIX/lib]
1547 --includedir=DIR C header files [PREFIX/include]
1548 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1549 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1550 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1551 --infodir=DIR info documentation [DATAROOTDIR/info]
1552 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1553 --mandir=DIR man documentation [DATAROOTDIR/man]
1554 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1555 --htmldir=DIR html documentation [DOCDIR]
1556 --dvidir=DIR dvi documentation [DOCDIR]
1557 --pdfdir=DIR pdf documentation [DOCDIR]
1558 --psdir=DIR ps documentation [DOCDIR]
1559 _ACEOF
1561 cat <<\_ACEOF
1563 Program names:
1564 --program-prefix=PREFIX prepend PREFIX to installed program names
1565 --program-suffix=SUFFIX append SUFFIX to installed program names
1566 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1568 X features:
1569 --x-includes=DIR X include files are in DIR
1570 --x-libraries=DIR X library files are in DIR
1572 System types:
1573 --build=BUILD configure for building on BUILD [guessed]
1574 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1575 --target=TARGET configure for building compilers for TARGET [HOST]
1576 _ACEOF
1579 if test -n "$ac_init_help"; then
1581 cat <<\_ACEOF
1583 Optional Features:
1584 --disable-option-checking ignore unrecognized --enable/--with options
1585 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1586 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1587 --enable-maintainer-mode
1588 enable make rules and dependencies not useful (and
1589 sometimes confusing) to the casual installer
1590 --enable-plugins Enable support for plugins
1591 --disable-largefile omit support for large files
1592 --enable-targets=TARGETS
1593 alternative target configurations
1594 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1595 --disable-gdbmi disable machine-interface (MI)
1596 --enable-tui enable full-screen terminal user interface (TUI)
1597 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1598 --enable-profiling enable profiling of GDB
1599 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1600 --disable-rpath do not hardcode runtime library paths
1601 --enable-source-highlight
1602 enable source-highlight for source listings
1603 --enable-threading include support for parallel processing of data
1604 (yes/no)
1605 --enable-werror treat compile warnings as errors
1606 --enable-build-warnings enable build-time compiler warnings if gcc is used
1607 --enable-gdb-build-warnings
1608 enable GDB specific build-time compiler warnings if
1609 gcc is used
1610 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1611 --enable-sim link gdb with simulator
1612 --enable-libbacktrace use libbacktrace to write a backtrace after a fatal
1613 signal.
1614 --enable-libctf Handle .ctf type-info sections [default=yes]
1615 --enable-unit-tests Enable the inclusion of unit tests when compiling
1618 Optional Packages:
1619 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1620 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1621 --with-separate-debug-dir=PATH
1622 look for global separate debug info in this path
1623 [LIBDIR/debug]
1624 --with-gdb-datadir=PATH look for global separate data files in this path
1625 [DATADIR/gdb]
1626 --with-relocated-sources=PATH
1627 automatically relocate this path for source files
1628 --with-auto-load-dir=PATH
1629 directories from which to load auto-loaded scripts
1630 [$debugdir:$datadir/auto-load]
1631 --with-auto-load-safe-path=PATH
1632 directories safe to hold auto-loaded files
1633 [--with-auto-load-dir]
1634 --without-auto-load-safe-path
1635 do not restrict auto-loaded files locations
1636 --with-debuginfod Enable debuginfo lookups with debuginfod
1637 (auto/yes/no)
1638 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1639 --with-curses use the curses library instead of the termcap
1640 library
1641 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1642 --with-bugurl=URL Direct users to URL to report a bug
1643 --with-system-zlib use installed libz
1644 --with-gnu-ld assume the C compiler uses GNU ld default=no
1645 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1646 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1647 --with-libiconv-type=TYPE type of library to search for (auto/static/shared)
1648 --with-iconv-bin=PATH specify where to find the iconv program
1649 --with-system-readline use installed readline library
1650 --with-jit-reader-dir=PATH
1651 directory to load the JIT readers from
1652 --with-expat include expat support (auto/yes/no)
1653 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1654 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1655 --with-libexpat-type=TYPE type of library to search for (auto/static/shared)
1656 --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib
1657 --without-libgmp-prefix don't search for libgmp in includedir and libdir
1658 --with-libgmp-type=TYPE type of library to search for (auto/static/shared)
1659 --with-mpfr include MPFR support (auto/yes/no)
1660 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1661 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1662 --with-libmpfr-type=TYPE type of library to search for (auto/static/shared)
1663 --with-python[=PYTHON] include python support
1664 (auto/yes/no/<python-program>)
1665 --with-python-libdir[=DIR]
1666 search for python's libraries in DIR
1667 --with-guile[=GUILE] include guile support
1668 (auto/yes/no/<guile-version>/<pkg-config-program>)
1669 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1670 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1671 --without-libipt-prefix don't search for libipt in includedir and libdir
1672 --with-libipt-type=TYPE type of library to search for (auto/static/shared)
1673 --with-sysroot[=DIR] search for usr/lib et al within DIR
1674 --with-system-gdbinit=PATH
1675 automatically load a system-wide gdbinit file
1676 --with-system-gdbinit-dir=PATH
1677 automatically load system-wide gdbinit files from
1678 this directory
1679 --with-lzma support lzma compression (auto/yes/no)
1680 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1681 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1682 --with-liblzma-type=TYPE type of library to search for (auto/static/shared)
1683 --with-tcl directory containing tcl configuration (tclConfig.sh)
1684 --with-tk directory containing tk configuration (tkConfig.sh)
1685 --with-x use the X Window System
1686 --with-babeltrace include babeltrace support (auto/yes/no)
1687 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1688 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1689 --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared)
1690 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1691 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1692 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1693 --with-libxxhash-type=TYPE type of library to search for (auto/static/shared)
1695 Some influential environment variables:
1696 CC C compiler command
1697 CFLAGS C compiler flags
1698 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1699 nonstandard directory <lib dir>
1700 LIBS libraries to pass to the linker, e.g. -l<library>
1701 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1702 you have headers in a nonstandard directory <include dir>
1703 CXX C++ compiler command
1704 CXXFLAGS C++ compiler flags
1705 CPP C preprocessor
1706 MAKEINFO Parent configure detects if it is of sufficient version.
1707 MAKEINFOFLAGS
1708 Parameters for MAKEINFO.
1709 PKG_CONFIG path to pkg-config utility
1710 PKG_CONFIG_PATH
1711 directories to add to pkg-config's search path
1712 PKG_CONFIG_LIBDIR
1713 path overriding pkg-config's built-in search path
1714 DEBUGINFOD_CFLAGS
1715 C compiler flags for DEBUGINFOD, overriding pkg-config
1716 DEBUGINFOD_LIBS
1717 linker flags for DEBUGINFOD, overriding pkg-config
1718 YACC The `Yet Another Compiler Compiler' implementation to use.
1719 Defaults to the first program found out of: `bison -y', `byacc',
1720 `yacc'.
1721 YFLAGS The list of arguments that will be passed by default to $YACC.
1722 This script will default YFLAGS to the empty string to avoid a
1723 default value of `-d' given by some make applications.
1724 XMKMF Path to xmkmf, Makefile generator for X Window System
1726 Use these variables to override the choices made by `configure' or to help
1727 it to find libraries and programs with nonstandard names/locations.
1729 Report bugs to the package provider.
1730 _ACEOF
1731 ac_status=$?
1734 if test "$ac_init_help" = "recursive"; then
1735 # If there are subdirs, report their specific --help.
1736 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1737 test -d "$ac_dir" ||
1738 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1739 continue
1740 ac_builddir=.
1742 case "$ac_dir" in
1743 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1745 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1746 # A ".." for each directory in $ac_dir_suffix.
1747 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1748 case $ac_top_builddir_sub in
1749 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1750 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1751 esac ;;
1752 esac
1753 ac_abs_top_builddir=$ac_pwd
1754 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1755 # for backward compatibility:
1756 ac_top_builddir=$ac_top_build_prefix
1758 case $srcdir in
1759 .) # We are building in place.
1760 ac_srcdir=.
1761 ac_top_srcdir=$ac_top_builddir_sub
1762 ac_abs_top_srcdir=$ac_pwd ;;
1763 [\\/]* | ?:[\\/]* ) # Absolute name.
1764 ac_srcdir=$srcdir$ac_dir_suffix;
1765 ac_top_srcdir=$srcdir
1766 ac_abs_top_srcdir=$srcdir ;;
1767 *) # Relative name.
1768 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1769 ac_top_srcdir=$ac_top_build_prefix$srcdir
1770 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1771 esac
1772 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1774 cd "$ac_dir" || { ac_status=$?; continue; }
1775 # Check for guested configure.
1776 if test -f "$ac_srcdir/configure.gnu"; then
1777 echo &&
1778 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1779 elif test -f "$ac_srcdir/configure"; then
1780 echo &&
1781 $SHELL "$ac_srcdir/configure" --help=recursive
1782 else
1783 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1784 fi || ac_status=$?
1785 cd "$ac_pwd" || { ac_status=$?; break; }
1786 done
1789 test -n "$ac_init_help" && exit $ac_status
1790 if $ac_init_version; then
1791 cat <<\_ACEOF
1792 configure
1793 generated by GNU Autoconf 2.69
1795 Copyright (C) 2012 Free Software Foundation, Inc.
1796 This configure script is free software; the Free Software Foundation
1797 gives unlimited permission to copy, distribute and modify it.
1798 _ACEOF
1799 exit
1802 ## ------------------------ ##
1803 ## Autoconf initialization. ##
1804 ## ------------------------ ##
1806 # ac_fn_c_try_compile LINENO
1807 # --------------------------
1808 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1809 ac_fn_c_try_compile ()
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 rm -f conftest.$ac_objext
1813 if { { ac_try="$ac_compile"
1814 case "(($ac_try" in
1815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816 *) ac_try_echo=$ac_try;;
1817 esac
1818 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819 $as_echo "$ac_try_echo"; } >&5
1820 (eval "$ac_compile") 2>conftest.err
1821 ac_status=$?
1822 if test -s conftest.err; then
1823 grep -v '^ *+' conftest.err >conftest.er1
1824 cat conftest.er1 >&5
1825 mv -f conftest.er1 conftest.err
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; } && {
1829 test -z "$ac_c_werror_flag" ||
1830 test ! -s conftest.err
1831 } && test -s conftest.$ac_objext; then :
1832 ac_retval=0
1833 else
1834 $as_echo "$as_me: failed program was:" >&5
1835 sed 's/^/| /' conftest.$ac_ext >&5
1837 ac_retval=1
1839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1840 as_fn_set_status $ac_retval
1842 } # ac_fn_c_try_compile
1844 # ac_fn_cxx_try_compile LINENO
1845 # ----------------------------
1846 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1847 ac_fn_cxx_try_compile ()
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 rm -f conftest.$ac_objext
1851 if { { ac_try="$ac_compile"
1852 case "(($ac_try" in
1853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1854 *) ac_try_echo=$ac_try;;
1855 esac
1856 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1857 $as_echo "$ac_try_echo"; } >&5
1858 (eval "$ac_compile") 2>conftest.err
1859 ac_status=$?
1860 if test -s conftest.err; then
1861 grep -v '^ *+' conftest.err >conftest.er1
1862 cat conftest.er1 >&5
1863 mv -f conftest.er1 conftest.err
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; } && {
1867 test -z "$ac_cxx_werror_flag" ||
1868 test ! -s conftest.err
1869 } && test -s conftest.$ac_objext; then :
1870 ac_retval=0
1871 else
1872 $as_echo "$as_me: failed program was:" >&5
1873 sed 's/^/| /' conftest.$ac_ext >&5
1875 ac_retval=1
1877 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1878 as_fn_set_status $ac_retval
1880 } # ac_fn_cxx_try_compile
1882 # ac_fn_c_try_cpp LINENO
1883 # ----------------------
1884 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1885 ac_fn_c_try_cpp ()
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888 if { { ac_try="$ac_cpp conftest.$ac_ext"
1889 case "(($ac_try" in
1890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1891 *) ac_try_echo=$ac_try;;
1892 esac
1893 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1894 $as_echo "$ac_try_echo"; } >&5
1895 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1896 ac_status=$?
1897 if test -s conftest.err; then
1898 grep -v '^ *+' conftest.err >conftest.er1
1899 cat conftest.er1 >&5
1900 mv -f conftest.er1 conftest.err
1902 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1903 test $ac_status = 0; } > conftest.i && {
1904 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1905 test ! -s conftest.err
1906 }; then :
1907 ac_retval=0
1908 else
1909 $as_echo "$as_me: failed program was:" >&5
1910 sed 's/^/| /' conftest.$ac_ext >&5
1912 ac_retval=1
1914 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1915 as_fn_set_status $ac_retval
1917 } # ac_fn_c_try_cpp
1919 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1920 # -------------------------------------------------------
1921 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1922 # the include files in INCLUDES and setting the cache variable VAR
1923 # accordingly.
1924 ac_fn_c_check_header_mongrel ()
1926 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1927 if eval \${$3+:} false; then :
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1929 $as_echo_n "checking for $2... " >&6; }
1930 if eval \${$3+:} false; then :
1931 $as_echo_n "(cached) " >&6
1933 eval ac_res=\$$3
1934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1935 $as_echo "$ac_res" >&6; }
1936 else
1937 # Is the header compilable?
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1939 $as_echo_n "checking $2 usability... " >&6; }
1940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1941 /* end confdefs.h. */
1943 #include <$2>
1944 _ACEOF
1945 if ac_fn_c_try_compile "$LINENO"; then :
1946 ac_header_compiler=yes
1947 else
1948 ac_header_compiler=no
1950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1952 $as_echo "$ac_header_compiler" >&6; }
1954 # Is the header present?
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1956 $as_echo_n "checking $2 presence... " >&6; }
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958 /* end confdefs.h. */
1959 #include <$2>
1960 _ACEOF
1961 if ac_fn_c_try_cpp "$LINENO"; then :
1962 ac_header_preproc=yes
1963 else
1964 ac_header_preproc=no
1966 rm -f conftest.err conftest.i conftest.$ac_ext
1967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1968 $as_echo "$ac_header_preproc" >&6; }
1970 # So? What about this header?
1971 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1972 yes:no: )
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1974 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1976 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1978 no:yes:* )
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1980 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1982 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1983 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1984 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1986 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1988 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1990 esac
1991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1992 $as_echo_n "checking for $2... " >&6; }
1993 if eval \${$3+:} false; then :
1994 $as_echo_n "(cached) " >&6
1995 else
1996 eval "$3=\$ac_header_compiler"
1998 eval ac_res=\$$3
1999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2000 $as_echo "$ac_res" >&6; }
2002 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2004 } # ac_fn_c_check_header_mongrel
2006 # ac_fn_c_try_run LINENO
2007 # ----------------------
2008 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2009 # that executables *can* be run.
2010 ac_fn_c_try_run ()
2012 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2013 if { { ac_try="$ac_link"
2014 case "(($ac_try" in
2015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2016 *) ac_try_echo=$ac_try;;
2017 esac
2018 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2019 $as_echo "$ac_try_echo"; } >&5
2020 (eval "$ac_link") 2>&5
2021 ac_status=$?
2022 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2023 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2024 { { case "(($ac_try" in
2025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2026 *) ac_try_echo=$ac_try;;
2027 esac
2028 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2029 $as_echo "$ac_try_echo"; } >&5
2030 (eval "$ac_try") 2>&5
2031 ac_status=$?
2032 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2033 test $ac_status = 0; }; }; then :
2034 ac_retval=0
2035 else
2036 $as_echo "$as_me: program exited with status $ac_status" >&5
2037 $as_echo "$as_me: failed program was:" >&5
2038 sed 's/^/| /' conftest.$ac_ext >&5
2040 ac_retval=$ac_status
2042 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2043 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2044 as_fn_set_status $ac_retval
2046 } # ac_fn_c_try_run
2048 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2049 # -------------------------------------------------------
2050 # Tests whether HEADER exists and can be compiled using the include files in
2051 # INCLUDES, setting the cache variable VAR accordingly.
2052 ac_fn_c_check_header_compile ()
2054 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2056 $as_echo_n "checking for $2... " >&6; }
2057 if eval \${$3+:} false; then :
2058 $as_echo_n "(cached) " >&6
2059 else
2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2061 /* end confdefs.h. */
2063 #include <$2>
2064 _ACEOF
2065 if ac_fn_c_try_compile "$LINENO"; then :
2066 eval "$3=yes"
2067 else
2068 eval "$3=no"
2070 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 eval ac_res=\$$3
2073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2074 $as_echo "$ac_res" >&6; }
2075 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2077 } # ac_fn_c_check_header_compile
2079 # ac_fn_c_try_link LINENO
2080 # -----------------------
2081 # Try to link conftest.$ac_ext, and return whether this succeeded.
2082 ac_fn_c_try_link ()
2084 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2085 rm -f conftest.$ac_objext conftest$ac_exeext
2086 if { { ac_try="$ac_link"
2087 case "(($ac_try" in
2088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2089 *) ac_try_echo=$ac_try;;
2090 esac
2091 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2092 $as_echo "$ac_try_echo"; } >&5
2093 (eval "$ac_link") 2>conftest.err
2094 ac_status=$?
2095 if test -s conftest.err; then
2096 grep -v '^ *+' conftest.err >conftest.er1
2097 cat conftest.er1 >&5
2098 mv -f conftest.er1 conftest.err
2100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2101 test $ac_status = 0; } && {
2102 test -z "$ac_c_werror_flag" ||
2103 test ! -s conftest.err
2104 } && test -s conftest$ac_exeext && {
2105 test "$cross_compiling" = yes ||
2106 test -x conftest$ac_exeext
2107 }; then :
2108 ac_retval=0
2109 else
2110 $as_echo "$as_me: failed program was:" >&5
2111 sed 's/^/| /' conftest.$ac_ext >&5
2113 ac_retval=1
2115 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2116 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2117 # interfere with the next link command; also delete a directory that is
2118 # left behind by Apple's compiler. We do this before executing the actions.
2119 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2120 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2121 as_fn_set_status $ac_retval
2123 } # ac_fn_c_try_link
2125 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2126 # --------------------------------------------
2127 # Tries to find the compile-time value of EXPR in a program that includes
2128 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2129 # computed
2130 ac_fn_c_compute_int ()
2132 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2133 if test "$cross_compiling" = yes; then
2134 # Depending upon the size, compute the lo and hi bounds.
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136 /* end confdefs.h. */
2139 main ()
2141 static int test_array [1 - 2 * !(($2) >= 0)];
2142 test_array [0] = 0;
2143 return test_array [0];
2146 return 0;
2148 _ACEOF
2149 if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_lo=0 ac_mid=0
2151 while :; do
2152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2153 /* end confdefs.h. */
2156 main ()
2158 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2159 test_array [0] = 0;
2160 return test_array [0];
2163 return 0;
2165 _ACEOF
2166 if ac_fn_c_try_compile "$LINENO"; then :
2167 ac_hi=$ac_mid; break
2168 else
2169 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2170 if test $ac_lo -le $ac_mid; then
2171 ac_lo= ac_hi=
2172 break
2174 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2177 done
2178 else
2179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2180 /* end confdefs.h. */
2183 main ()
2185 static int test_array [1 - 2 * !(($2) < 0)];
2186 test_array [0] = 0;
2187 return test_array [0];
2190 return 0;
2192 _ACEOF
2193 if ac_fn_c_try_compile "$LINENO"; then :
2194 ac_hi=-1 ac_mid=-1
2195 while :; do
2196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2197 /* end confdefs.h. */
2200 main ()
2202 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2203 test_array [0] = 0;
2204 return test_array [0];
2207 return 0;
2209 _ACEOF
2210 if ac_fn_c_try_compile "$LINENO"; then :
2211 ac_lo=$ac_mid; break
2212 else
2213 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2214 if test $ac_mid -le $ac_hi; then
2215 ac_lo= ac_hi=
2216 break
2218 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221 done
2222 else
2223 ac_lo= ac_hi=
2225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2228 # Binary search between lo and hi bounds.
2229 while test "x$ac_lo" != "x$ac_hi"; do
2230 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232 /* end confdefs.h. */
2235 main ()
2237 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2238 test_array [0] = 0;
2239 return test_array [0];
2242 return 0;
2244 _ACEOF
2245 if ac_fn_c_try_compile "$LINENO"; then :
2246 ac_hi=$ac_mid
2247 else
2248 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2250 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2251 done
2252 case $ac_lo in #((
2253 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2254 '') ac_retval=1 ;;
2255 esac
2256 else
2257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2258 /* end confdefs.h. */
2260 static long int longval () { return $2; }
2261 static unsigned long int ulongval () { return $2; }
2262 #include <stdio.h>
2263 #include <stdlib.h>
2265 main ()
2268 FILE *f = fopen ("conftest.val", "w");
2269 if (! f)
2270 return 1;
2271 if (($2) < 0)
2273 long int i = longval ();
2274 if (i != ($2))
2275 return 1;
2276 fprintf (f, "%ld", i);
2278 else
2280 unsigned long int i = ulongval ();
2281 if (i != ($2))
2282 return 1;
2283 fprintf (f, "%lu", i);
2285 /* Do not output a trailing newline, as this causes \r\n confusion
2286 on some platforms. */
2287 return ferror (f) || fclose (f) != 0;
2290 return 0;
2292 _ACEOF
2293 if ac_fn_c_try_run "$LINENO"; then :
2294 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2295 else
2296 ac_retval=1
2298 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2299 conftest.$ac_objext conftest.beam conftest.$ac_ext
2300 rm -f conftest.val
2303 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2304 as_fn_set_status $ac_retval
2306 } # ac_fn_c_compute_int
2308 # ac_fn_c_check_func LINENO FUNC VAR
2309 # ----------------------------------
2310 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2311 ac_fn_c_check_func ()
2313 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2315 $as_echo_n "checking for $2... " >&6; }
2316 if eval \${$3+:} false; then :
2317 $as_echo_n "(cached) " >&6
2318 else
2319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2320 /* end confdefs.h. */
2321 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2322 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2323 #define $2 innocuous_$2
2325 /* System header to define __stub macros and hopefully few prototypes,
2326 which can conflict with char $2 (); below.
2327 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2328 <limits.h> exists even on freestanding compilers. */
2330 #ifdef __STDC__
2331 # include <limits.h>
2332 #else
2333 # include <assert.h>
2334 #endif
2336 #undef $2
2338 /* Override any GCC internal prototype to avoid an error.
2339 Use char because int might match the return type of a GCC
2340 builtin and then its argument prototype would still apply. */
2341 #ifdef __cplusplus
2342 extern "C"
2343 #endif
2344 char $2 ();
2345 /* The GNU C library defines this for functions which it implements
2346 to always fail with ENOSYS. Some functions are actually named
2347 something starting with __ and the normal name is an alias. */
2348 #if defined __stub_$2 || defined __stub___$2
2349 choke me
2350 #endif
2353 main ()
2355 return $2 ();
2357 return 0;
2359 _ACEOF
2360 if ac_fn_c_try_link "$LINENO"; then :
2361 eval "$3=yes"
2362 else
2363 eval "$3=no"
2365 rm -f core conftest.err conftest.$ac_objext \
2366 conftest$ac_exeext conftest.$ac_ext
2368 eval ac_res=\$$3
2369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2370 $as_echo "$ac_res" >&6; }
2371 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2373 } # ac_fn_c_check_func
2375 # ac_fn_cxx_try_link LINENO
2376 # -------------------------
2377 # Try to link conftest.$ac_ext, and return whether this succeeded.
2378 ac_fn_cxx_try_link ()
2380 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2381 rm -f conftest.$ac_objext conftest$ac_exeext
2382 if { { ac_try="$ac_link"
2383 case "(($ac_try" in
2384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2385 *) ac_try_echo=$ac_try;;
2386 esac
2387 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2388 $as_echo "$ac_try_echo"; } >&5
2389 (eval "$ac_link") 2>conftest.err
2390 ac_status=$?
2391 if test -s conftest.err; then
2392 grep -v '^ *+' conftest.err >conftest.er1
2393 cat conftest.er1 >&5
2394 mv -f conftest.er1 conftest.err
2396 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2397 test $ac_status = 0; } && {
2398 test -z "$ac_cxx_werror_flag" ||
2399 test ! -s conftest.err
2400 } && test -s conftest$ac_exeext && {
2401 test "$cross_compiling" = yes ||
2402 test -x conftest$ac_exeext
2403 }; then :
2404 ac_retval=0
2405 else
2406 $as_echo "$as_me: failed program was:" >&5
2407 sed 's/^/| /' conftest.$ac_ext >&5
2409 ac_retval=1
2411 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2412 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2413 # interfere with the next link command; also delete a directory that is
2414 # left behind by Apple's compiler. We do this before executing the actions.
2415 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2416 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2417 as_fn_set_status $ac_retval
2419 } # ac_fn_cxx_try_link
2421 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2422 # -------------------------------------------
2423 # Tests whether TYPE exists after having included INCLUDES, setting cache
2424 # variable VAR accordingly.
2425 ac_fn_c_check_type ()
2427 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2429 $as_echo_n "checking for $2... " >&6; }
2430 if eval \${$3+:} false; then :
2431 $as_echo_n "(cached) " >&6
2432 else
2433 eval "$3=no"
2434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2435 /* end confdefs.h. */
2438 main ()
2440 if (sizeof ($2))
2441 return 0;
2443 return 0;
2445 _ACEOF
2446 if ac_fn_c_try_compile "$LINENO"; then :
2447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2448 /* end confdefs.h. */
2451 main ()
2453 if (sizeof (($2)))
2454 return 0;
2456 return 0;
2458 _ACEOF
2459 if ac_fn_c_try_compile "$LINENO"; then :
2461 else
2462 eval "$3=yes"
2464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2466 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2468 eval ac_res=\$$3
2469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2470 $as_echo "$ac_res" >&6; }
2471 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473 } # ac_fn_c_check_type
2475 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2476 # ---------------------------------------------
2477 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2478 # accordingly.
2479 ac_fn_c_check_decl ()
2481 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2482 as_decl_name=`echo $2|sed 's/ *(.*//'`
2483 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2485 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2486 if eval \${$3+:} false; then :
2487 $as_echo_n "(cached) " >&6
2488 else
2489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2490 /* end confdefs.h. */
2493 main ()
2495 #ifndef $as_decl_name
2496 #ifdef __cplusplus
2497 (void) $as_decl_use;
2498 #else
2499 (void) $as_decl_name;
2500 #endif
2501 #endif
2504 return 0;
2506 _ACEOF
2507 if ac_fn_c_try_compile "$LINENO"; then :
2508 eval "$3=yes"
2509 else
2510 eval "$3=no"
2512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2514 eval ac_res=\$$3
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2516 $as_echo "$ac_res" >&6; }
2517 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2519 } # ac_fn_c_check_decl
2521 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2522 # ----------------------------------------------------
2523 # Tries to find if the field MEMBER exists in type AGGR, after including
2524 # INCLUDES, setting cache variable VAR accordingly.
2525 ac_fn_c_check_member ()
2527 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2529 $as_echo_n "checking for $2.$3... " >&6; }
2530 if eval \${$4+:} false; then :
2531 $as_echo_n "(cached) " >&6
2532 else
2533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2534 /* end confdefs.h. */
2537 main ()
2539 static $2 ac_aggr;
2540 if (ac_aggr.$3)
2541 return 0;
2543 return 0;
2545 _ACEOF
2546 if ac_fn_c_try_compile "$LINENO"; then :
2547 eval "$4=yes"
2548 else
2549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2550 /* end confdefs.h. */
2553 main ()
2555 static $2 ac_aggr;
2556 if (sizeof ac_aggr.$3)
2557 return 0;
2559 return 0;
2561 _ACEOF
2562 if ac_fn_c_try_compile "$LINENO"; then :
2563 eval "$4=yes"
2564 else
2565 eval "$4=no"
2567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2569 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2571 eval ac_res=\$$4
2572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2573 $as_echo "$ac_res" >&6; }
2574 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2576 } # ac_fn_c_check_member
2578 # ac_fn_cxx_check_func LINENO FUNC VAR
2579 # ------------------------------------
2580 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2581 ac_fn_cxx_check_func ()
2583 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2585 $as_echo_n "checking for $2... " >&6; }
2586 if eval \${$3+:} false; then :
2587 $as_echo_n "(cached) " >&6
2588 else
2589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2590 /* end confdefs.h. */
2591 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2592 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2593 #define $2 innocuous_$2
2595 /* System header to define __stub macros and hopefully few prototypes,
2596 which can conflict with char $2 (); below.
2597 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2598 <limits.h> exists even on freestanding compilers. */
2600 #ifdef __STDC__
2601 # include <limits.h>
2602 #else
2603 # include <assert.h>
2604 #endif
2606 #undef $2
2608 /* Override any GCC internal prototype to avoid an error.
2609 Use char because int might match the return type of a GCC
2610 builtin and then its argument prototype would still apply. */
2611 #ifdef __cplusplus
2612 extern "C"
2613 #endif
2614 char $2 ();
2615 /* The GNU C library defines this for functions which it implements
2616 to always fail with ENOSYS. Some functions are actually named
2617 something starting with __ and the normal name is an alias. */
2618 #if defined __stub_$2 || defined __stub___$2
2619 choke me
2620 #endif
2623 main ()
2625 return $2 ();
2627 return 0;
2629 _ACEOF
2630 if ac_fn_cxx_try_link "$LINENO"; then :
2631 eval "$3=yes"
2632 else
2633 eval "$3=no"
2635 rm -f core conftest.err conftest.$ac_objext \
2636 conftest$ac_exeext conftest.$ac_ext
2638 eval ac_res=\$$3
2639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2640 $as_echo "$ac_res" >&6; }
2641 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2643 } # ac_fn_cxx_check_func
2644 cat >config.log <<_ACEOF
2645 This file contains any messages produced by compilers while
2646 running configure, to aid debugging if configure makes a mistake.
2648 It was created by $as_me, which was
2649 generated by GNU Autoconf 2.69. Invocation command line was
2651 $ $0 $@
2653 _ACEOF
2654 exec 5>>config.log
2656 cat <<_ASUNAME
2657 ## --------- ##
2658 ## Platform. ##
2659 ## --------- ##
2661 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2662 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2663 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2664 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2665 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2667 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2668 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2670 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2671 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2672 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2673 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2674 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2675 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2676 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2678 _ASUNAME
2680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2681 for as_dir in $PATH
2683 IFS=$as_save_IFS
2684 test -z "$as_dir" && as_dir=.
2685 $as_echo "PATH: $as_dir"
2686 done
2687 IFS=$as_save_IFS
2689 } >&5
2691 cat >&5 <<_ACEOF
2694 ## ----------- ##
2695 ## Core tests. ##
2696 ## ----------- ##
2698 _ACEOF
2701 # Keep a trace of the command line.
2702 # Strip out --no-create and --no-recursion so they do not pile up.
2703 # Strip out --silent because we don't want to record it for future runs.
2704 # Also quote any args containing shell meta-characters.
2705 # Make two passes to allow for proper duplicate-argument suppression.
2706 ac_configure_args=
2707 ac_configure_args0=
2708 ac_configure_args1=
2709 ac_must_keep_next=false
2710 for ac_pass in 1 2
2712 for ac_arg
2714 case $ac_arg in
2715 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2716 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2717 | -silent | --silent | --silen | --sile | --sil)
2718 continue ;;
2719 *\'*)
2720 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2721 esac
2722 case $ac_pass in
2723 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2725 as_fn_append ac_configure_args1 " '$ac_arg'"
2726 if test $ac_must_keep_next = true; then
2727 ac_must_keep_next=false # Got value, back to normal.
2728 else
2729 case $ac_arg in
2730 *=* | --config-cache | -C | -disable-* | --disable-* \
2731 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2732 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2733 | -with-* | --with-* | -without-* | --without-* | --x)
2734 case "$ac_configure_args0 " in
2735 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2736 esac
2738 -* ) ac_must_keep_next=true ;;
2739 esac
2741 as_fn_append ac_configure_args " '$ac_arg'"
2743 esac
2744 done
2745 done
2746 { ac_configure_args0=; unset ac_configure_args0;}
2747 { ac_configure_args1=; unset ac_configure_args1;}
2749 # When interrupted or exit'd, cleanup temporary files, and complete
2750 # config.log. We remove comments because anyway the quotes in there
2751 # would cause problems or look ugly.
2752 # WARNING: Use '\'' to represent an apostrophe within the trap.
2753 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2754 trap 'exit_status=$?
2755 # Save into config.log some information that might help in debugging.
2757 echo
2759 $as_echo "## ---------------- ##
2760 ## Cache variables. ##
2761 ## ---------------- ##"
2762 echo
2763 # The following way of writing the cache mishandles newlines in values,
2765 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2766 eval ac_val=\$$ac_var
2767 case $ac_val in #(
2768 *${as_nl}*)
2769 case $ac_var in #(
2770 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2771 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2772 esac
2773 case $ac_var in #(
2774 _ | IFS | as_nl) ;; #(
2775 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2776 *) { eval $ac_var=; unset $ac_var;} ;;
2777 esac ;;
2778 esac
2779 done
2780 (set) 2>&1 |
2781 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2782 *${as_nl}ac_space=\ *)
2783 sed -n \
2784 "s/'\''/'\''\\\\'\'''\''/g;
2785 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2786 ;; #(
2788 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2790 esac |
2791 sort
2793 echo
2795 $as_echo "## ----------------- ##
2796 ## Output variables. ##
2797 ## ----------------- ##"
2798 echo
2799 for ac_var in $ac_subst_vars
2801 eval ac_val=\$$ac_var
2802 case $ac_val in
2803 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2804 esac
2805 $as_echo "$ac_var='\''$ac_val'\''"
2806 done | sort
2807 echo
2809 if test -n "$ac_subst_files"; then
2810 $as_echo "## ------------------- ##
2811 ## File substitutions. ##
2812 ## ------------------- ##"
2813 echo
2814 for ac_var in $ac_subst_files
2816 eval ac_val=\$$ac_var
2817 case $ac_val in
2818 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2819 esac
2820 $as_echo "$ac_var='\''$ac_val'\''"
2821 done | sort
2822 echo
2825 if test -s confdefs.h; then
2826 $as_echo "## ----------- ##
2827 ## confdefs.h. ##
2828 ## ----------- ##"
2829 echo
2830 cat confdefs.h
2831 echo
2833 test "$ac_signal" != 0 &&
2834 $as_echo "$as_me: caught signal $ac_signal"
2835 $as_echo "$as_me: exit $exit_status"
2836 } >&5
2837 rm -f core *.core core.conftest.* &&
2838 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2839 exit $exit_status
2841 for ac_signal in 1 2 13 15; do
2842 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2843 done
2844 ac_signal=0
2846 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2847 rm -f -r conftest* confdefs.h
2849 $as_echo "/* confdefs.h */" > confdefs.h
2851 # Predefined preprocessor variables.
2853 cat >>confdefs.h <<_ACEOF
2854 #define PACKAGE_NAME "$PACKAGE_NAME"
2855 _ACEOF
2857 cat >>confdefs.h <<_ACEOF
2858 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2859 _ACEOF
2861 cat >>confdefs.h <<_ACEOF
2862 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2863 _ACEOF
2865 cat >>confdefs.h <<_ACEOF
2866 #define PACKAGE_STRING "$PACKAGE_STRING"
2867 _ACEOF
2869 cat >>confdefs.h <<_ACEOF
2870 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2871 _ACEOF
2873 cat >>confdefs.h <<_ACEOF
2874 #define PACKAGE_URL "$PACKAGE_URL"
2875 _ACEOF
2878 # Let the site file select an alternate cache file if it wants to.
2879 # Prefer an explicitly selected file to automatically selected ones.
2880 ac_site_file1=NONE
2881 ac_site_file2=NONE
2882 if test -n "$CONFIG_SITE"; then
2883 # We do not want a PATH search for config.site.
2884 case $CONFIG_SITE in #((
2885 -*) ac_site_file1=./$CONFIG_SITE;;
2886 */*) ac_site_file1=$CONFIG_SITE;;
2887 *) ac_site_file1=./$CONFIG_SITE;;
2888 esac
2889 elif test "x$prefix" != xNONE; then
2890 ac_site_file1=$prefix/share/config.site
2891 ac_site_file2=$prefix/etc/config.site
2892 else
2893 ac_site_file1=$ac_default_prefix/share/config.site
2894 ac_site_file2=$ac_default_prefix/etc/config.site
2896 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2898 test "x$ac_site_file" = xNONE && continue
2899 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2900 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2901 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2902 sed 's/^/| /' "$ac_site_file" >&5
2903 . "$ac_site_file" \
2904 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2905 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2906 as_fn_error $? "failed to load site script $ac_site_file
2907 See \`config.log' for more details" "$LINENO" 5; }
2909 done
2911 if test -r "$cache_file"; then
2912 # Some versions of bash will fail to source /dev/null (special files
2913 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2914 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2915 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2916 $as_echo "$as_me: loading cache $cache_file" >&6;}
2917 case $cache_file in
2918 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2919 *) . "./$cache_file";;
2920 esac
2922 else
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2924 $as_echo "$as_me: creating cache $cache_file" >&6;}
2925 >$cache_file
2928 as_fn_append ac_header_list " stdlib.h"
2929 as_fn_append ac_header_list " unistd.h"
2930 as_fn_append ac_header_list " sys/param.h"
2931 # Check that the precious variables saved in the cache have kept the same
2932 # value.
2933 ac_cache_corrupted=false
2934 for ac_var in $ac_precious_vars; do
2935 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2936 eval ac_new_set=\$ac_env_${ac_var}_set
2937 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2938 eval ac_new_val=\$ac_env_${ac_var}_value
2939 case $ac_old_set,$ac_new_set in
2940 set,)
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2942 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2943 ac_cache_corrupted=: ;;
2944 ,set)
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2946 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2947 ac_cache_corrupted=: ;;
2948 ,);;
2950 if test "x$ac_old_val" != "x$ac_new_val"; then
2951 # differences in whitespace do not lead to failure.
2952 ac_old_val_w=`echo x $ac_old_val`
2953 ac_new_val_w=`echo x $ac_new_val`
2954 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2956 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2957 ac_cache_corrupted=:
2958 else
2959 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2960 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2961 eval $ac_var=\$ac_old_val
2963 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2964 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2965 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2966 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2967 fi;;
2968 esac
2969 # Pass precious variables to config.status.
2970 if test "$ac_new_set" = set; then
2971 case $ac_new_val in
2972 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2973 *) ac_arg=$ac_var=$ac_new_val ;;
2974 esac
2975 case " $ac_configure_args " in
2976 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2977 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2978 esac
2980 done
2981 if $ac_cache_corrupted; then
2982 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2983 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2984 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2985 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2986 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2988 ## -------------------- ##
2989 ## Main body of script. ##
2990 ## -------------------- ##
2992 ac_ext=c
2993 ac_cpp='$CPP $CPPFLAGS'
2994 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2995 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2996 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3004 ac_config_headers="$ac_config_headers config.h:config.in"
3007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3008 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3009 # Check whether --enable-maintainer-mode was given.
3010 if test "${enable_maintainer_mode+set}" = set; then :
3011 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
3012 else
3013 USE_MAINTAINER_MODE=no
3016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3017 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3018 if test $USE_MAINTAINER_MODE = yes; then
3019 MAINTAINER_MODE_TRUE=
3020 MAINTAINER_MODE_FALSE='#'
3021 else
3022 MAINTAINER_MODE_TRUE='#'
3023 MAINTAINER_MODE_FALSE=
3026 MAINT=$MAINTAINER_MODE_TRUE
3030 ac_ext=c
3031 ac_cpp='$CPP $CPPFLAGS'
3032 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3033 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3034 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3035 if test -n "$ac_tool_prefix"; then
3036 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3037 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3039 $as_echo_n "checking for $ac_word... " >&6; }
3040 if ${ac_cv_prog_CC+:} false; then :
3041 $as_echo_n "(cached) " >&6
3042 else
3043 if test -n "$CC"; then
3044 ac_cv_prog_CC="$CC" # Let the user override the test.
3045 else
3046 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3047 for as_dir in $PATH
3049 IFS=$as_save_IFS
3050 test -z "$as_dir" && as_dir=.
3051 for ac_exec_ext in '' $ac_executable_extensions; do
3052 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3053 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3054 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3055 break 2
3057 done
3058 done
3059 IFS=$as_save_IFS
3063 CC=$ac_cv_prog_CC
3064 if test -n "$CC"; then
3065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3066 $as_echo "$CC" >&6; }
3067 else
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3069 $as_echo "no" >&6; }
3074 if test -z "$ac_cv_prog_CC"; then
3075 ac_ct_CC=$CC
3076 # Extract the first word of "gcc", so it can be a program name with args.
3077 set dummy gcc; ac_word=$2
3078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3079 $as_echo_n "checking for $ac_word... " >&6; }
3080 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3081 $as_echo_n "(cached) " >&6
3082 else
3083 if test -n "$ac_ct_CC"; then
3084 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3085 else
3086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3087 for as_dir in $PATH
3089 IFS=$as_save_IFS
3090 test -z "$as_dir" && as_dir=.
3091 for ac_exec_ext in '' $ac_executable_extensions; do
3092 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3093 ac_cv_prog_ac_ct_CC="gcc"
3094 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3095 break 2
3097 done
3098 done
3099 IFS=$as_save_IFS
3103 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3104 if test -n "$ac_ct_CC"; then
3105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3106 $as_echo "$ac_ct_CC" >&6; }
3107 else
3108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3109 $as_echo "no" >&6; }
3112 if test "x$ac_ct_CC" = x; then
3113 CC=""
3114 else
3115 case $cross_compiling:$ac_tool_warned in
3116 yes:)
3117 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3118 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3119 ac_tool_warned=yes ;;
3120 esac
3121 CC=$ac_ct_CC
3123 else
3124 CC="$ac_cv_prog_CC"
3127 if test -z "$CC"; then
3128 if test -n "$ac_tool_prefix"; then
3129 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3130 set dummy ${ac_tool_prefix}cc; ac_word=$2
3131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3132 $as_echo_n "checking for $ac_word... " >&6; }
3133 if ${ac_cv_prog_CC+:} false; then :
3134 $as_echo_n "(cached) " >&6
3135 else
3136 if test -n "$CC"; then
3137 ac_cv_prog_CC="$CC" # Let the user override the test.
3138 else
3139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3140 for as_dir in $PATH
3142 IFS=$as_save_IFS
3143 test -z "$as_dir" && as_dir=.
3144 for ac_exec_ext in '' $ac_executable_extensions; do
3145 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3146 ac_cv_prog_CC="${ac_tool_prefix}cc"
3147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3148 break 2
3150 done
3151 done
3152 IFS=$as_save_IFS
3156 CC=$ac_cv_prog_CC
3157 if test -n "$CC"; then
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3159 $as_echo "$CC" >&6; }
3160 else
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3162 $as_echo "no" >&6; }
3168 if test -z "$CC"; then
3169 # Extract the first word of "cc", so it can be a program name with args.
3170 set dummy cc; ac_word=$2
3171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3172 $as_echo_n "checking for $ac_word... " >&6; }
3173 if ${ac_cv_prog_CC+:} false; then :
3174 $as_echo_n "(cached) " >&6
3175 else
3176 if test -n "$CC"; then
3177 ac_cv_prog_CC="$CC" # Let the user override the test.
3178 else
3179 ac_prog_rejected=no
3180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3181 for as_dir in $PATH
3183 IFS=$as_save_IFS
3184 test -z "$as_dir" && as_dir=.
3185 for ac_exec_ext in '' $ac_executable_extensions; do
3186 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3187 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3188 ac_prog_rejected=yes
3189 continue
3191 ac_cv_prog_CC="cc"
3192 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3193 break 2
3195 done
3196 done
3197 IFS=$as_save_IFS
3199 if test $ac_prog_rejected = yes; then
3200 # We found a bogon in the path, so make sure we never use it.
3201 set dummy $ac_cv_prog_CC
3202 shift
3203 if test $# != 0; then
3204 # We chose a different compiler from the bogus one.
3205 # However, it has the same basename, so the bogon will be chosen
3206 # first if we set CC to just the basename; use the full file name.
3207 shift
3208 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3213 CC=$ac_cv_prog_CC
3214 if test -n "$CC"; then
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3216 $as_echo "$CC" >&6; }
3217 else
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3219 $as_echo "no" >&6; }
3224 if test -z "$CC"; then
3225 if test -n "$ac_tool_prefix"; then
3226 for ac_prog in cl.exe
3228 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3229 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3231 $as_echo_n "checking for $ac_word... " >&6; }
3232 if ${ac_cv_prog_CC+:} false; then :
3233 $as_echo_n "(cached) " >&6
3234 else
3235 if test -n "$CC"; then
3236 ac_cv_prog_CC="$CC" # Let the user override the test.
3237 else
3238 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3239 for as_dir in $PATH
3241 IFS=$as_save_IFS
3242 test -z "$as_dir" && as_dir=.
3243 for ac_exec_ext in '' $ac_executable_extensions; do
3244 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3245 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3247 break 2
3249 done
3250 done
3251 IFS=$as_save_IFS
3255 CC=$ac_cv_prog_CC
3256 if test -n "$CC"; then
3257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3258 $as_echo "$CC" >&6; }
3259 else
3260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3261 $as_echo "no" >&6; }
3265 test -n "$CC" && break
3266 done
3268 if test -z "$CC"; then
3269 ac_ct_CC=$CC
3270 for ac_prog in cl.exe
3272 # Extract the first word of "$ac_prog", so it can be a program name with args.
3273 set dummy $ac_prog; ac_word=$2
3274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3275 $as_echo_n "checking for $ac_word... " >&6; }
3276 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3277 $as_echo_n "(cached) " >&6
3278 else
3279 if test -n "$ac_ct_CC"; then
3280 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3281 else
3282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3283 for as_dir in $PATH
3285 IFS=$as_save_IFS
3286 test -z "$as_dir" && as_dir=.
3287 for ac_exec_ext in '' $ac_executable_extensions; do
3288 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3289 ac_cv_prog_ac_ct_CC="$ac_prog"
3290 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3291 break 2
3293 done
3294 done
3295 IFS=$as_save_IFS
3299 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3300 if test -n "$ac_ct_CC"; then
3301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3302 $as_echo "$ac_ct_CC" >&6; }
3303 else
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3305 $as_echo "no" >&6; }
3309 test -n "$ac_ct_CC" && break
3310 done
3312 if test "x$ac_ct_CC" = x; then
3313 CC=""
3314 else
3315 case $cross_compiling:$ac_tool_warned in
3316 yes:)
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3318 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3319 ac_tool_warned=yes ;;
3320 esac
3321 CC=$ac_ct_CC
3328 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3329 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3330 as_fn_error $? "no acceptable C compiler found in \$PATH
3331 See \`config.log' for more details" "$LINENO" 5; }
3333 # Provide some information about the compiler.
3334 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3335 set X $ac_compile
3336 ac_compiler=$2
3337 for ac_option in --version -v -V -qversion; do
3338 { { ac_try="$ac_compiler $ac_option >&5"
3339 case "(($ac_try" in
3340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3341 *) ac_try_echo=$ac_try;;
3342 esac
3343 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3344 $as_echo "$ac_try_echo"; } >&5
3345 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3346 ac_status=$?
3347 if test -s conftest.err; then
3348 sed '10a\
3349 ... rest of stderr output deleted ...
3350 10q' conftest.err >conftest.er1
3351 cat conftest.er1 >&5
3353 rm -f conftest.er1 conftest.err
3354 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3355 test $ac_status = 0; }
3356 done
3358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3359 /* end confdefs.h. */
3362 main ()
3366 return 0;
3368 _ACEOF
3369 ac_clean_files_save=$ac_clean_files
3370 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3371 # Try to create an executable without -o first, disregard a.out.
3372 # It will help us diagnose broken compilers, and finding out an intuition
3373 # of exeext.
3374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3375 $as_echo_n "checking whether the C compiler works... " >&6; }
3376 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3378 # The possible output files:
3379 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3381 ac_rmfiles=
3382 for ac_file in $ac_files
3384 case $ac_file in
3385 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3386 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3387 esac
3388 done
3389 rm -f $ac_rmfiles
3391 if { { ac_try="$ac_link_default"
3392 case "(($ac_try" in
3393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3394 *) ac_try_echo=$ac_try;;
3395 esac
3396 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3397 $as_echo "$ac_try_echo"; } >&5
3398 (eval "$ac_link_default") 2>&5
3399 ac_status=$?
3400 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3401 test $ac_status = 0; }; then :
3402 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3403 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3404 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3405 # so that the user can short-circuit this test for compilers unknown to
3406 # Autoconf.
3407 for ac_file in $ac_files ''
3409 test -f "$ac_file" || continue
3410 case $ac_file in
3411 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3413 [ab].out )
3414 # We found the default executable, but exeext='' is most
3415 # certainly right.
3416 break;;
3417 *.* )
3418 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3419 then :; else
3420 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3422 # We set ac_cv_exeext here because the later test for it is not
3423 # safe: cross compilers may not add the suffix if given an `-o'
3424 # argument, so we may need to know it at that point already.
3425 # Even if this section looks crufty: it has the advantage of
3426 # actually working.
3427 break;;
3429 break;;
3430 esac
3431 done
3432 test "$ac_cv_exeext" = no && ac_cv_exeext=
3434 else
3435 ac_file=''
3437 if test -z "$ac_file"; then :
3438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3439 $as_echo "no" >&6; }
3440 $as_echo "$as_me: failed program was:" >&5
3441 sed 's/^/| /' conftest.$ac_ext >&5
3443 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3444 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3445 as_fn_error 77 "C compiler cannot create executables
3446 See \`config.log' for more details" "$LINENO" 5; }
3447 else
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3449 $as_echo "yes" >&6; }
3451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3452 $as_echo_n "checking for C compiler default output file name... " >&6; }
3453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3454 $as_echo "$ac_file" >&6; }
3455 ac_exeext=$ac_cv_exeext
3457 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3458 ac_clean_files=$ac_clean_files_save
3459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3460 $as_echo_n "checking for suffix of executables... " >&6; }
3461 if { { ac_try="$ac_link"
3462 case "(($ac_try" in
3463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3464 *) ac_try_echo=$ac_try;;
3465 esac
3466 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3467 $as_echo "$ac_try_echo"; } >&5
3468 (eval "$ac_link") 2>&5
3469 ac_status=$?
3470 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3471 test $ac_status = 0; }; then :
3472 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3473 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3474 # work properly (i.e., refer to `conftest.exe'), while it won't with
3475 # `rm'.
3476 for ac_file in conftest.exe conftest conftest.*; do
3477 test -f "$ac_file" || continue
3478 case $ac_file in
3479 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3480 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3481 break;;
3482 * ) break;;
3483 esac
3484 done
3485 else
3486 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3487 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3488 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3489 See \`config.log' for more details" "$LINENO" 5; }
3491 rm -f conftest conftest$ac_cv_exeext
3492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3493 $as_echo "$ac_cv_exeext" >&6; }
3495 rm -f conftest.$ac_ext
3496 EXEEXT=$ac_cv_exeext
3497 ac_exeext=$EXEEXT
3498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3499 /* end confdefs.h. */
3500 #include <stdio.h>
3502 main ()
3504 FILE *f = fopen ("conftest.out", "w");
3505 return ferror (f) || fclose (f) != 0;
3508 return 0;
3510 _ACEOF
3511 ac_clean_files="$ac_clean_files conftest.out"
3512 # Check that the compiler produces executables we can run. If not, either
3513 # the compiler is broken, or we cross compile.
3514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3515 $as_echo_n "checking whether we are cross compiling... " >&6; }
3516 if test "$cross_compiling" != yes; then
3517 { { ac_try="$ac_link"
3518 case "(($ac_try" in
3519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3520 *) ac_try_echo=$ac_try;;
3521 esac
3522 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3523 $as_echo "$ac_try_echo"; } >&5
3524 (eval "$ac_link") 2>&5
3525 ac_status=$?
3526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3527 test $ac_status = 0; }
3528 if { ac_try='./conftest$ac_cv_exeext'
3529 { { case "(($ac_try" in
3530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3531 *) ac_try_echo=$ac_try;;
3532 esac
3533 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3534 $as_echo "$ac_try_echo"; } >&5
3535 (eval "$ac_try") 2>&5
3536 ac_status=$?
3537 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3538 test $ac_status = 0; }; }; then
3539 cross_compiling=no
3540 else
3541 if test "$cross_compiling" = maybe; then
3542 cross_compiling=yes
3543 else
3544 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3545 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3546 as_fn_error $? "cannot run C compiled programs.
3547 If you meant to cross compile, use \`--host'.
3548 See \`config.log' for more details" "$LINENO" 5; }
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3553 $as_echo "$cross_compiling" >&6; }
3555 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3556 ac_clean_files=$ac_clean_files_save
3557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3558 $as_echo_n "checking for suffix of object files... " >&6; }
3559 if ${ac_cv_objext+:} false; then :
3560 $as_echo_n "(cached) " >&6
3561 else
3562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3563 /* end confdefs.h. */
3566 main ()
3570 return 0;
3572 _ACEOF
3573 rm -f conftest.o conftest.obj
3574 if { { ac_try="$ac_compile"
3575 case "(($ac_try" in
3576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3577 *) ac_try_echo=$ac_try;;
3578 esac
3579 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3580 $as_echo "$ac_try_echo"; } >&5
3581 (eval "$ac_compile") 2>&5
3582 ac_status=$?
3583 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3584 test $ac_status = 0; }; then :
3585 for ac_file in conftest.o conftest.obj conftest.*; do
3586 test -f "$ac_file" || continue;
3587 case $ac_file in
3588 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3589 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3590 break;;
3591 esac
3592 done
3593 else
3594 $as_echo "$as_me: failed program was:" >&5
3595 sed 's/^/| /' conftest.$ac_ext >&5
3597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3598 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3599 as_fn_error $? "cannot compute suffix of object files: cannot compile
3600 See \`config.log' for more details" "$LINENO" 5; }
3602 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3605 $as_echo "$ac_cv_objext" >&6; }
3606 OBJEXT=$ac_cv_objext
3607 ac_objext=$OBJEXT
3608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3609 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3610 if ${ac_cv_c_compiler_gnu+:} false; then :
3611 $as_echo_n "(cached) " >&6
3612 else
3613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3614 /* end confdefs.h. */
3617 main ()
3619 #ifndef __GNUC__
3620 choke me
3621 #endif
3624 return 0;
3626 _ACEOF
3627 if ac_fn_c_try_compile "$LINENO"; then :
3628 ac_compiler_gnu=yes
3629 else
3630 ac_compiler_gnu=no
3632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3633 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3637 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3638 if test $ac_compiler_gnu = yes; then
3639 GCC=yes
3640 else
3641 GCC=
3643 ac_test_CFLAGS=${CFLAGS+set}
3644 ac_save_CFLAGS=$CFLAGS
3645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3646 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3647 if ${ac_cv_prog_cc_g+:} false; then :
3648 $as_echo_n "(cached) " >&6
3649 else
3650 ac_save_c_werror_flag=$ac_c_werror_flag
3651 ac_c_werror_flag=yes
3652 ac_cv_prog_cc_g=no
3653 CFLAGS="-g"
3654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3655 /* end confdefs.h. */
3658 main ()
3662 return 0;
3664 _ACEOF
3665 if ac_fn_c_try_compile "$LINENO"; then :
3666 ac_cv_prog_cc_g=yes
3667 else
3668 CFLAGS=""
3669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3670 /* end confdefs.h. */
3673 main ()
3677 return 0;
3679 _ACEOF
3680 if ac_fn_c_try_compile "$LINENO"; then :
3682 else
3683 ac_c_werror_flag=$ac_save_c_werror_flag
3684 CFLAGS="-g"
3685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3686 /* end confdefs.h. */
3689 main ()
3693 return 0;
3695 _ACEOF
3696 if ac_fn_c_try_compile "$LINENO"; then :
3697 ac_cv_prog_cc_g=yes
3699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3703 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3704 ac_c_werror_flag=$ac_save_c_werror_flag
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3707 $as_echo "$ac_cv_prog_cc_g" >&6; }
3708 if test "$ac_test_CFLAGS" = set; then
3709 CFLAGS=$ac_save_CFLAGS
3710 elif test $ac_cv_prog_cc_g = yes; then
3711 if test "$GCC" = yes; then
3712 CFLAGS="-g -O2"
3713 else
3714 CFLAGS="-g"
3716 else
3717 if test "$GCC" = yes; then
3718 CFLAGS="-O2"
3719 else
3720 CFLAGS=
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3724 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3725 if ${ac_cv_prog_cc_c89+:} false; then :
3726 $as_echo_n "(cached) " >&6
3727 else
3728 ac_cv_prog_cc_c89=no
3729 ac_save_CC=$CC
3730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3731 /* end confdefs.h. */
3732 #include <stdarg.h>
3733 #include <stdio.h>
3734 struct stat;
3735 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3736 struct buf { int x; };
3737 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3738 static char *e (p, i)
3739 char **p;
3740 int i;
3742 return p[i];
3744 static char *f (char * (*g) (char **, int), char **p, ...)
3746 char *s;
3747 va_list v;
3748 va_start (v,p);
3749 s = g (p, va_arg (v,int));
3750 va_end (v);
3751 return s;
3754 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3755 function prototypes and stuff, but not '\xHH' hex character constants.
3756 These don't provoke an error unfortunately, instead are silently treated
3757 as 'x'. The following induces an error, until -std is added to get
3758 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3759 array size at least. It's necessary to write '\x00'==0 to get something
3760 that's true only with -std. */
3761 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3763 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3764 inside strings and character constants. */
3765 #define FOO(x) 'x'
3766 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3768 int test (int i, double x);
3769 struct s1 {int (*f) (int a);};
3770 struct s2 {int (*f) (double a);};
3771 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3772 int argc;
3773 char **argv;
3775 main ()
3777 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3779 return 0;
3781 _ACEOF
3782 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3783 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3785 CC="$ac_save_CC $ac_arg"
3786 if ac_fn_c_try_compile "$LINENO"; then :
3787 ac_cv_prog_cc_c89=$ac_arg
3789 rm -f core conftest.err conftest.$ac_objext
3790 test "x$ac_cv_prog_cc_c89" != "xno" && break
3791 done
3792 rm -f conftest.$ac_ext
3793 CC=$ac_save_CC
3796 # AC_CACHE_VAL
3797 case "x$ac_cv_prog_cc_c89" in
3799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3800 $as_echo "none needed" >&6; } ;;
3801 xno)
3802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3803 $as_echo "unsupported" >&6; } ;;
3805 CC="$CC $ac_cv_prog_cc_c89"
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3807 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3808 esac
3809 if test "x$ac_cv_prog_cc_c89" != xno; then :
3813 ac_ext=c
3814 ac_cpp='$CPP $CPPFLAGS'
3815 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3816 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3817 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3819 ac_ext=cpp
3820 ac_cpp='$CXXCPP $CPPFLAGS'
3821 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3822 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3823 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3824 if test -z "$CXX"; then
3825 if test -n "$CCC"; then
3826 CXX=$CCC
3827 else
3828 if test -n "$ac_tool_prefix"; then
3829 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3831 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3832 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834 $as_echo_n "checking for $ac_word... " >&6; }
3835 if ${ac_cv_prog_CXX+:} false; then :
3836 $as_echo_n "(cached) " >&6
3837 else
3838 if test -n "$CXX"; then
3839 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3840 else
3841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3842 for as_dir in $PATH
3844 IFS=$as_save_IFS
3845 test -z "$as_dir" && as_dir=.
3846 for ac_exec_ext in '' $ac_executable_extensions; do
3847 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3848 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3850 break 2
3852 done
3853 done
3854 IFS=$as_save_IFS
3858 CXX=$ac_cv_prog_CXX
3859 if test -n "$CXX"; then
3860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3861 $as_echo "$CXX" >&6; }
3862 else
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864 $as_echo "no" >&6; }
3868 test -n "$CXX" && break
3869 done
3871 if test -z "$CXX"; then
3872 ac_ct_CXX=$CXX
3873 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3875 # Extract the first word of "$ac_prog", so it can be a program name with args.
3876 set dummy $ac_prog; ac_word=$2
3877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3878 $as_echo_n "checking for $ac_word... " >&6; }
3879 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3880 $as_echo_n "(cached) " >&6
3881 else
3882 if test -n "$ac_ct_CXX"; then
3883 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3884 else
3885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3886 for as_dir in $PATH
3888 IFS=$as_save_IFS
3889 test -z "$as_dir" && as_dir=.
3890 for ac_exec_ext in '' $ac_executable_extensions; do
3891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3892 ac_cv_prog_ac_ct_CXX="$ac_prog"
3893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3894 break 2
3896 done
3897 done
3898 IFS=$as_save_IFS
3902 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3903 if test -n "$ac_ct_CXX"; then
3904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3905 $as_echo "$ac_ct_CXX" >&6; }
3906 else
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3908 $as_echo "no" >&6; }
3912 test -n "$ac_ct_CXX" && break
3913 done
3915 if test "x$ac_ct_CXX" = x; then
3916 CXX="g++"
3917 else
3918 case $cross_compiling:$ac_tool_warned in
3919 yes:)
3920 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3921 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3922 ac_tool_warned=yes ;;
3923 esac
3924 CXX=$ac_ct_CXX
3930 # Provide some information about the compiler.
3931 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3932 set X $ac_compile
3933 ac_compiler=$2
3934 for ac_option in --version -v -V -qversion; do
3935 { { ac_try="$ac_compiler $ac_option >&5"
3936 case "(($ac_try" in
3937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3938 *) ac_try_echo=$ac_try;;
3939 esac
3940 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3941 $as_echo "$ac_try_echo"; } >&5
3942 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3943 ac_status=$?
3944 if test -s conftest.err; then
3945 sed '10a\
3946 ... rest of stderr output deleted ...
3947 10q' conftest.err >conftest.er1
3948 cat conftest.er1 >&5
3950 rm -f conftest.er1 conftest.err
3951 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3952 test $ac_status = 0; }
3953 done
3955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3956 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3957 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3958 $as_echo_n "(cached) " >&6
3959 else
3960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3961 /* end confdefs.h. */
3964 main ()
3966 #ifndef __GNUC__
3967 choke me
3968 #endif
3971 return 0;
3973 _ACEOF
3974 if ac_fn_cxx_try_compile "$LINENO"; then :
3975 ac_compiler_gnu=yes
3976 else
3977 ac_compiler_gnu=no
3979 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3980 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3984 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3985 if test $ac_compiler_gnu = yes; then
3986 GXX=yes
3987 else
3988 GXX=
3990 ac_test_CXXFLAGS=${CXXFLAGS+set}
3991 ac_save_CXXFLAGS=$CXXFLAGS
3992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3993 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3994 if ${ac_cv_prog_cxx_g+:} false; then :
3995 $as_echo_n "(cached) " >&6
3996 else
3997 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3998 ac_cxx_werror_flag=yes
3999 ac_cv_prog_cxx_g=no
4000 CXXFLAGS="-g"
4001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002 /* end confdefs.h. */
4005 main ()
4009 return 0;
4011 _ACEOF
4012 if ac_fn_cxx_try_compile "$LINENO"; then :
4013 ac_cv_prog_cxx_g=yes
4014 else
4015 CXXFLAGS=""
4016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4017 /* end confdefs.h. */
4020 main ()
4024 return 0;
4026 _ACEOF
4027 if ac_fn_cxx_try_compile "$LINENO"; then :
4029 else
4030 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4031 CXXFLAGS="-g"
4032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4033 /* end confdefs.h. */
4036 main ()
4040 return 0;
4042 _ACEOF
4043 if ac_fn_cxx_try_compile "$LINENO"; then :
4044 ac_cv_prog_cxx_g=yes
4046 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4050 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4051 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4054 $as_echo "$ac_cv_prog_cxx_g" >&6; }
4055 if test "$ac_test_CXXFLAGS" = set; then
4056 CXXFLAGS=$ac_save_CXXFLAGS
4057 elif test $ac_cv_prog_cxx_g = yes; then
4058 if test "$GXX" = yes; then
4059 CXXFLAGS="-g -O2"
4060 else
4061 CXXFLAGS="-g"
4063 else
4064 if test "$GXX" = yes; then
4065 CXXFLAGS="-O2"
4066 else
4067 CXXFLAGS=
4070 ac_ext=c
4071 ac_cpp='$CPP $CPPFLAGS'
4072 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4073 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4074 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4078 ac_ext=c
4079 ac_cpp='$CPP $CPPFLAGS'
4080 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4081 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4082 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4084 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4085 # On Suns, sometimes $CPP names a directory.
4086 if test -n "$CPP" && test -d "$CPP"; then
4087 CPP=
4089 if test -z "$CPP"; then
4090 if ${ac_cv_prog_CPP+:} false; then :
4091 $as_echo_n "(cached) " >&6
4092 else
4093 # Double quotes because CPP needs to be expanded
4094 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4096 ac_preproc_ok=false
4097 for ac_c_preproc_warn_flag in '' yes
4099 # Use a header file that comes with gcc, so configuring glibc
4100 # with a fresh cross-compiler works.
4101 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4102 # <limits.h> exists even on freestanding compilers.
4103 # On the NeXT, cc -E runs the code through the compiler's parser,
4104 # not just through cpp. "Syntax error" is here to catch this case.
4105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4106 /* end confdefs.h. */
4107 #ifdef __STDC__
4108 # include <limits.h>
4109 #else
4110 # include <assert.h>
4111 #endif
4112 Syntax error
4113 _ACEOF
4114 if ac_fn_c_try_cpp "$LINENO"; then :
4116 else
4117 # Broken: fails on valid input.
4118 continue
4120 rm -f conftest.err conftest.i conftest.$ac_ext
4122 # OK, works on sane cases. Now check whether nonexistent headers
4123 # can be detected and how.
4124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4125 /* end confdefs.h. */
4126 #include <ac_nonexistent.h>
4127 _ACEOF
4128 if ac_fn_c_try_cpp "$LINENO"; then :
4129 # Broken: success on invalid input.
4130 continue
4131 else
4132 # Passes both tests.
4133 ac_preproc_ok=:
4134 break
4136 rm -f conftest.err conftest.i conftest.$ac_ext
4138 done
4139 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4140 rm -f conftest.i conftest.err conftest.$ac_ext
4141 if $ac_preproc_ok; then :
4142 break
4145 done
4146 ac_cv_prog_CPP=$CPP
4149 CPP=$ac_cv_prog_CPP
4150 else
4151 ac_cv_prog_CPP=$CPP
4153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4154 $as_echo "$CPP" >&6; }
4155 ac_preproc_ok=false
4156 for ac_c_preproc_warn_flag in '' yes
4158 # Use a header file that comes with gcc, so configuring glibc
4159 # with a fresh cross-compiler works.
4160 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4161 # <limits.h> exists even on freestanding compilers.
4162 # On the NeXT, cc -E runs the code through the compiler's parser,
4163 # not just through cpp. "Syntax error" is here to catch this case.
4164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4165 /* end confdefs.h. */
4166 #ifdef __STDC__
4167 # include <limits.h>
4168 #else
4169 # include <assert.h>
4170 #endif
4171 Syntax error
4172 _ACEOF
4173 if ac_fn_c_try_cpp "$LINENO"; then :
4175 else
4176 # Broken: fails on valid input.
4177 continue
4179 rm -f conftest.err conftest.i conftest.$ac_ext
4181 # OK, works on sane cases. Now check whether nonexistent headers
4182 # can be detected and how.
4183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4184 /* end confdefs.h. */
4185 #include <ac_nonexistent.h>
4186 _ACEOF
4187 if ac_fn_c_try_cpp "$LINENO"; then :
4188 # Broken: success on invalid input.
4189 continue
4190 else
4191 # Passes both tests.
4192 ac_preproc_ok=:
4193 break
4195 rm -f conftest.err conftest.i conftest.$ac_ext
4197 done
4198 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4199 rm -f conftest.i conftest.err conftest.$ac_ext
4200 if $ac_preproc_ok; then :
4202 else
4203 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4204 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4205 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4206 See \`config.log' for more details" "$LINENO" 5; }
4209 ac_ext=c
4210 ac_cpp='$CPP $CPPFLAGS'
4211 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4212 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4213 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4217 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4218 if ${ac_cv_path_GREP+:} false; then :
4219 $as_echo_n "(cached) " >&6
4220 else
4221 if test -z "$GREP"; then
4222 ac_path_GREP_found=false
4223 # Loop through the user's path and test for each of PROGNAME-LIST
4224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4225 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4227 IFS=$as_save_IFS
4228 test -z "$as_dir" && as_dir=.
4229 for ac_prog in grep ggrep; do
4230 for ac_exec_ext in '' $ac_executable_extensions; do
4231 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4232 as_fn_executable_p "$ac_path_GREP" || continue
4233 # Check for GNU ac_path_GREP and select it if it is found.
4234 # Check for GNU $ac_path_GREP
4235 case `"$ac_path_GREP" --version 2>&1` in
4236 *GNU*)
4237 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4239 ac_count=0
4240 $as_echo_n 0123456789 >"conftest.in"
4241 while :
4243 cat "conftest.in" "conftest.in" >"conftest.tmp"
4244 mv "conftest.tmp" "conftest.in"
4245 cp "conftest.in" "conftest.nl"
4246 $as_echo 'GREP' >> "conftest.nl"
4247 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4248 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4249 as_fn_arith $ac_count + 1 && ac_count=$as_val
4250 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4251 # Best one so far, save it but keep looking for a better one
4252 ac_cv_path_GREP="$ac_path_GREP"
4253 ac_path_GREP_max=$ac_count
4255 # 10*(2^10) chars as input seems more than enough
4256 test $ac_count -gt 10 && break
4257 done
4258 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4259 esac
4261 $ac_path_GREP_found && break 3
4262 done
4263 done
4264 done
4265 IFS=$as_save_IFS
4266 if test -z "$ac_cv_path_GREP"; then
4267 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4269 else
4270 ac_cv_path_GREP=$GREP
4274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4275 $as_echo "$ac_cv_path_GREP" >&6; }
4276 GREP="$ac_cv_path_GREP"
4279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4280 $as_echo_n "checking for egrep... " >&6; }
4281 if ${ac_cv_path_EGREP+:} false; then :
4282 $as_echo_n "(cached) " >&6
4283 else
4284 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4285 then ac_cv_path_EGREP="$GREP -E"
4286 else
4287 if test -z "$EGREP"; then
4288 ac_path_EGREP_found=false
4289 # Loop through the user's path and test for each of PROGNAME-LIST
4290 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4291 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4293 IFS=$as_save_IFS
4294 test -z "$as_dir" && as_dir=.
4295 for ac_prog in egrep; do
4296 for ac_exec_ext in '' $ac_executable_extensions; do
4297 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4298 as_fn_executable_p "$ac_path_EGREP" || continue
4299 # Check for GNU ac_path_EGREP and select it if it is found.
4300 # Check for GNU $ac_path_EGREP
4301 case `"$ac_path_EGREP" --version 2>&1` in
4302 *GNU*)
4303 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4305 ac_count=0
4306 $as_echo_n 0123456789 >"conftest.in"
4307 while :
4309 cat "conftest.in" "conftest.in" >"conftest.tmp"
4310 mv "conftest.tmp" "conftest.in"
4311 cp "conftest.in" "conftest.nl"
4312 $as_echo 'EGREP' >> "conftest.nl"
4313 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4314 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4315 as_fn_arith $ac_count + 1 && ac_count=$as_val
4316 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4317 # Best one so far, save it but keep looking for a better one
4318 ac_cv_path_EGREP="$ac_path_EGREP"
4319 ac_path_EGREP_max=$ac_count
4321 # 10*(2^10) chars as input seems more than enough
4322 test $ac_count -gt 10 && break
4323 done
4324 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4325 esac
4327 $ac_path_EGREP_found && break 3
4328 done
4329 done
4330 done
4331 IFS=$as_save_IFS
4332 if test -z "$ac_cv_path_EGREP"; then
4333 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4335 else
4336 ac_cv_path_EGREP=$EGREP
4341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4342 $as_echo "$ac_cv_path_EGREP" >&6; }
4343 EGREP="$ac_cv_path_EGREP"
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4347 $as_echo_n "checking for ANSI C header files... " >&6; }
4348 if ${ac_cv_header_stdc+:} false; then :
4349 $as_echo_n "(cached) " >&6
4350 else
4351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4352 /* end confdefs.h. */
4353 #include <stdlib.h>
4354 #include <stdarg.h>
4355 #include <string.h>
4356 #include <float.h>
4359 main ()
4363 return 0;
4365 _ACEOF
4366 if ac_fn_c_try_compile "$LINENO"; then :
4367 ac_cv_header_stdc=yes
4368 else
4369 ac_cv_header_stdc=no
4371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4373 if test $ac_cv_header_stdc = yes; then
4374 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4376 /* end confdefs.h. */
4377 #include <string.h>
4379 _ACEOF
4380 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4381 $EGREP "memchr" >/dev/null 2>&1; then :
4383 else
4384 ac_cv_header_stdc=no
4386 rm -f conftest*
4390 if test $ac_cv_header_stdc = yes; then
4391 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4393 /* end confdefs.h. */
4394 #include <stdlib.h>
4396 _ACEOF
4397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4398 $EGREP "free" >/dev/null 2>&1; then :
4400 else
4401 ac_cv_header_stdc=no
4403 rm -f conftest*
4407 if test $ac_cv_header_stdc = yes; then
4408 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4409 if test "$cross_compiling" = yes; then :
4411 else
4412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4413 /* end confdefs.h. */
4414 #include <ctype.h>
4415 #include <stdlib.h>
4416 #if ((' ' & 0x0FF) == 0x020)
4417 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4418 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4419 #else
4420 # define ISLOWER(c) \
4421 (('a' <= (c) && (c) <= 'i') \
4422 || ('j' <= (c) && (c) <= 'r') \
4423 || ('s' <= (c) && (c) <= 'z'))
4424 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4425 #endif
4427 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4429 main ()
4431 int i;
4432 for (i = 0; i < 256; i++)
4433 if (XOR (islower (i), ISLOWER (i))
4434 || toupper (i) != TOUPPER (i))
4435 return 2;
4436 return 0;
4438 _ACEOF
4439 if ac_fn_c_try_run "$LINENO"; then :
4441 else
4442 ac_cv_header_stdc=no
4444 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4445 conftest.$ac_objext conftest.beam conftest.$ac_ext
4450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4451 $as_echo "$ac_cv_header_stdc" >&6; }
4452 if test $ac_cv_header_stdc = yes; then
4454 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4458 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4459 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4460 inttypes.h stdint.h unistd.h
4461 do :
4462 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4463 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4465 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4466 cat >>confdefs.h <<_ACEOF
4467 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4468 _ACEOF
4472 done
4476 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4477 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4478 MINIX=yes
4479 else
4480 MINIX=
4484 if test "$MINIX" = yes; then
4486 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4489 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4492 $as_echo "#define _MINIX 1" >>confdefs.h
4497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4498 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4499 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4500 $as_echo_n "(cached) " >&6
4501 else
4502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4503 /* end confdefs.h. */
4505 # define __EXTENSIONS__ 1
4506 $ac_includes_default
4508 main ()
4512 return 0;
4514 _ACEOF
4515 if ac_fn_c_try_compile "$LINENO"; then :
4516 ac_cv_safe_to_define___extensions__=yes
4517 else
4518 ac_cv_safe_to_define___extensions__=no
4520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4523 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4524 test $ac_cv_safe_to_define___extensions__ = yes &&
4525 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4527 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4529 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4531 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4533 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4536 ac_aux_dir=
4537 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4538 if test -f "$ac_dir/install-sh"; then
4539 ac_aux_dir=$ac_dir
4540 ac_install_sh="$ac_aux_dir/install-sh -c"
4541 break
4542 elif test -f "$ac_dir/install.sh"; then
4543 ac_aux_dir=$ac_dir
4544 ac_install_sh="$ac_aux_dir/install.sh -c"
4545 break
4546 elif test -f "$ac_dir/shtool"; then
4547 ac_aux_dir=$ac_dir
4548 ac_install_sh="$ac_aux_dir/shtool install -c"
4549 break
4551 done
4552 if test -z "$ac_aux_dir"; then
4553 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4556 # These three variables are undocumented and unsupported,
4557 # and are intended to be withdrawn in a future Autoconf release.
4558 # They can cause serious problems if a builder's source tree is in a directory
4559 # whose full name contains unusual characters.
4560 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4561 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4562 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4565 # Make sure we can run config.sub.
4566 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4567 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4570 $as_echo_n "checking build system type... " >&6; }
4571 if ${ac_cv_build+:} false; then :
4572 $as_echo_n "(cached) " >&6
4573 else
4574 ac_build_alias=$build_alias
4575 test "x$ac_build_alias" = x &&
4576 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4577 test "x$ac_build_alias" = x &&
4578 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4579 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4580 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4584 $as_echo "$ac_cv_build" >&6; }
4585 case $ac_cv_build in
4586 *-*-*) ;;
4587 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4588 esac
4589 build=$ac_cv_build
4590 ac_save_IFS=$IFS; IFS='-'
4591 set x $ac_cv_build
4592 shift
4593 build_cpu=$1
4594 build_vendor=$2
4595 shift; shift
4596 # Remember, the first character of IFS is used to create $*,
4597 # except with old shells:
4598 build_os=$*
4599 IFS=$ac_save_IFS
4600 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4604 $as_echo_n "checking host system type... " >&6; }
4605 if ${ac_cv_host+:} false; then :
4606 $as_echo_n "(cached) " >&6
4607 else
4608 if test "x$host_alias" = x; then
4609 ac_cv_host=$ac_cv_build
4610 else
4611 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4612 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4617 $as_echo "$ac_cv_host" >&6; }
4618 case $ac_cv_host in
4619 *-*-*) ;;
4620 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4621 esac
4622 host=$ac_cv_host
4623 ac_save_IFS=$IFS; IFS='-'
4624 set x $ac_cv_host
4625 shift
4626 host_cpu=$1
4627 host_vendor=$2
4628 shift; shift
4629 # Remember, the first character of IFS is used to create $*,
4630 # except with old shells:
4631 host_os=$*
4632 IFS=$ac_save_IFS
4633 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4637 $as_echo_n "checking target system type... " >&6; }
4638 if ${ac_cv_target+:} false; then :
4639 $as_echo_n "(cached) " >&6
4640 else
4641 if test "x$target_alias" = x; then
4642 ac_cv_target=$ac_cv_host
4643 else
4644 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4645 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4650 $as_echo "$ac_cv_target" >&6; }
4651 case $ac_cv_target in
4652 *-*-*) ;;
4653 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4654 esac
4655 target=$ac_cv_target
4656 ac_save_IFS=$IFS; IFS='-'
4657 set x $ac_cv_target
4658 shift
4659 target_cpu=$1
4660 target_vendor=$2
4661 shift; shift
4662 # Remember, the first character of IFS is used to create $*,
4663 # except with old shells:
4664 target_os=$*
4665 IFS=$ac_save_IFS
4666 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4669 # The aliases save the names the user supplied, while $host etc.
4670 # will get canonicalized.
4671 test -n "$target_alias" &&
4672 test "$program_prefix$program_suffix$program_transform_name" = \
4673 NONENONEs,x,x, &&
4674 program_prefix=${target_alias}-
4676 # The tests for host and target for $enable_largefile require
4677 # canonical names.
4681 # As the $enable_largefile decision depends on --enable-plugins we must set it
4682 # even in directories otherwise not depending on the $plugins option.
4685 maybe_plugins=no
4686 for ac_header in dlfcn.h
4687 do :
4688 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4690 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4691 cat >>confdefs.h <<_ACEOF
4692 #define HAVE_DLFCN_H 1
4693 _ACEOF
4694 maybe_plugins=yes
4697 done
4699 for ac_header in windows.h
4700 do :
4701 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4703 if test "x$ac_cv_header_windows_h" = xyes; then :
4704 cat >>confdefs.h <<_ACEOF
4705 #define HAVE_WINDOWS_H 1
4706 _ACEOF
4707 maybe_plugins=yes
4710 done
4713 # Check whether --enable-plugins was given.
4714 if test "${enable_plugins+set}" = set; then :
4715 enableval=$enable_plugins; case "${enableval}" in
4716 no) plugins=no ;;
4717 *) plugins=yes
4718 if test "$maybe_plugins" != "yes" ; then
4719 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4720 fi ;;
4721 esac
4722 else
4723 plugins=$maybe_plugins
4727 if test "$plugins" = "yes"; then
4728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4729 $as_echo_n "checking for library containing dlsym... " >&6; }
4730 if ${ac_cv_search_dlsym+:} false; then :
4731 $as_echo_n "(cached) " >&6
4732 else
4733 ac_func_search_save_LIBS=$LIBS
4734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4735 /* end confdefs.h. */
4737 /* Override any GCC internal prototype to avoid an error.
4738 Use char because int might match the return type of a GCC
4739 builtin and then its argument prototype would still apply. */
4740 #ifdef __cplusplus
4741 extern "C"
4742 #endif
4743 char dlsym ();
4745 main ()
4747 return dlsym ();
4749 return 0;
4751 _ACEOF
4752 for ac_lib in '' dl; do
4753 if test -z "$ac_lib"; then
4754 ac_res="none required"
4755 else
4756 ac_res=-l$ac_lib
4757 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4759 if ac_fn_c_try_link "$LINENO"; then :
4760 ac_cv_search_dlsym=$ac_res
4762 rm -f core conftest.err conftest.$ac_objext \
4763 conftest$ac_exeext
4764 if ${ac_cv_search_dlsym+:} false; then :
4765 break
4767 done
4768 if ${ac_cv_search_dlsym+:} false; then :
4770 else
4771 ac_cv_search_dlsym=no
4773 rm conftest.$ac_ext
4774 LIBS=$ac_func_search_save_LIBS
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4777 $as_echo "$ac_cv_search_dlsym" >&6; }
4778 ac_res=$ac_cv_search_dlsym
4779 if test "$ac_res" != no; then :
4780 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4787 case "${host}" in
4788 sparc-*-solaris*|i?86-*-solaris*)
4789 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
4790 # were mutually exclusive until Solaris 11.3. Without procfs support,
4791 # the bfd/ elf module cannot provide certain routines such as
4792 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
4793 # explicitly requested large-file support through the
4794 # --enable-largefile switch, disable large-file support in favor of
4795 # procfs support.
4797 # Check if <sys/procfs.h> is incompatible with large-file support.
4798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4799 /* end confdefs.h. */
4800 #define _FILE_OFFSET_BITS 64
4801 #define _STRUCTURED_PROC 1
4802 #include <sys/procfs.h>
4804 main ()
4808 return 0;
4810 _ACEOF
4811 if ac_fn_c_try_compile "$LINENO"; then :
4812 acx_cv_procfs_lfs=yes
4813 else
4814 acx_cv_procfs_lfs=no
4816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4818 # Forcefully disable large-file support only if necessary, gdb is in
4819 # tree and enabled.
4820 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
4821 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then
4822 : ${enable_largefile="no"}
4823 if test "$plugins" = yes; then
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
4825 plugin support disabled; require large-file support which is incompatible with GDB." >&5
4826 $as_echo "$as_me: WARNING:
4827 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
4828 plugins=no
4832 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
4833 # benefit of g++ 9+ which predefines it on Solaris.
4834 if test "$enable_largefile" = no; then
4835 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS"
4839 esac
4841 # Check whether --enable-largefile was given.
4842 if test "${enable_largefile+set}" = set; then :
4843 enableval=$enable_largefile;
4846 if test "$enable_largefile" != no; then
4848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4849 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4850 if ${ac_cv_sys_largefile_CC+:} false; then :
4851 $as_echo_n "(cached) " >&6
4852 else
4853 ac_cv_sys_largefile_CC=no
4854 if test "$GCC" != yes; then
4855 ac_save_CC=$CC
4856 while :; do
4857 # IRIX 6.2 and later do not support large files by default,
4858 # so use the C compiler's -n32 option if that helps.
4859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4860 /* end confdefs.h. */
4861 #include <sys/types.h>
4862 /* Check that off_t can represent 2**63 - 1 correctly.
4863 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4864 since some C++ compilers masquerading as C compilers
4865 incorrectly reject 9223372036854775807. */
4866 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4867 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4868 && LARGE_OFF_T % 2147483647 == 1)
4869 ? 1 : -1];
4871 main ()
4875 return 0;
4877 _ACEOF
4878 if ac_fn_c_try_compile "$LINENO"; then :
4879 break
4881 rm -f core conftest.err conftest.$ac_objext
4882 CC="$CC -n32"
4883 if ac_fn_c_try_compile "$LINENO"; then :
4884 ac_cv_sys_largefile_CC=' -n32'; break
4886 rm -f core conftest.err conftest.$ac_objext
4887 break
4888 done
4889 CC=$ac_save_CC
4890 rm -f conftest.$ac_ext
4893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4894 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4895 if test "$ac_cv_sys_largefile_CC" != no; then
4896 CC=$CC$ac_cv_sys_largefile_CC
4899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4900 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4901 if ${ac_cv_sys_file_offset_bits+:} false; then :
4902 $as_echo_n "(cached) " >&6
4903 else
4904 while :; do
4905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4906 /* end confdefs.h. */
4907 #include <sys/types.h>
4908 /* Check that off_t can represent 2**63 - 1 correctly.
4909 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4910 since some C++ compilers masquerading as C compilers
4911 incorrectly reject 9223372036854775807. */
4912 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4913 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4914 && LARGE_OFF_T % 2147483647 == 1)
4915 ? 1 : -1];
4917 main ()
4921 return 0;
4923 _ACEOF
4924 if ac_fn_c_try_compile "$LINENO"; then :
4925 ac_cv_sys_file_offset_bits=no; break
4927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4929 /* end confdefs.h. */
4930 #define _FILE_OFFSET_BITS 64
4931 #include <sys/types.h>
4932 /* Check that off_t can represent 2**63 - 1 correctly.
4933 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4934 since some C++ compilers masquerading as C compilers
4935 incorrectly reject 9223372036854775807. */
4936 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4937 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4938 && LARGE_OFF_T % 2147483647 == 1)
4939 ? 1 : -1];
4941 main ()
4945 return 0;
4947 _ACEOF
4948 if ac_fn_c_try_compile "$LINENO"; then :
4949 ac_cv_sys_file_offset_bits=64; break
4951 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4952 ac_cv_sys_file_offset_bits=unknown
4953 break
4954 done
4956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4957 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4958 case $ac_cv_sys_file_offset_bits in #(
4959 no | unknown) ;;
4961 cat >>confdefs.h <<_ACEOF
4962 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4963 _ACEOF
4965 esac
4966 rm -rf conftest*
4967 if test $ac_cv_sys_file_offset_bits = unknown; then
4968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4969 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4970 if ${ac_cv_sys_large_files+:} false; then :
4971 $as_echo_n "(cached) " >&6
4972 else
4973 while :; do
4974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4975 /* end confdefs.h. */
4976 #include <sys/types.h>
4977 /* Check that off_t can represent 2**63 - 1 correctly.
4978 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4979 since some C++ compilers masquerading as C compilers
4980 incorrectly reject 9223372036854775807. */
4981 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4982 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4983 && LARGE_OFF_T % 2147483647 == 1)
4984 ? 1 : -1];
4986 main ()
4990 return 0;
4992 _ACEOF
4993 if ac_fn_c_try_compile "$LINENO"; then :
4994 ac_cv_sys_large_files=no; break
4996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4998 /* end confdefs.h. */
4999 #define _LARGE_FILES 1
5000 #include <sys/types.h>
5001 /* Check that off_t can represent 2**63 - 1 correctly.
5002 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5003 since some C++ compilers masquerading as C compilers
5004 incorrectly reject 9223372036854775807. */
5005 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5006 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5007 && LARGE_OFF_T % 2147483647 == 1)
5008 ? 1 : -1];
5010 main ()
5014 return 0;
5016 _ACEOF
5017 if ac_fn_c_try_compile "$LINENO"; then :
5018 ac_cv_sys_large_files=1; break
5020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5021 ac_cv_sys_large_files=unknown
5022 break
5023 done
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5026 $as_echo "$ac_cv_sys_large_files" >&6; }
5027 case $ac_cv_sys_large_files in #(
5028 no | unknown) ;;
5030 cat >>confdefs.h <<_ACEOF
5031 #define _LARGE_FILES $ac_cv_sys_large_files
5032 _ACEOF
5034 esac
5035 rm -rf conftest*
5042 # Expand $ac_aux_dir to an absolute path.
5043 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5045 if test x"${install_sh+set}" != xset; then
5046 case $am_aux_dir in
5047 *\ * | *\ *)
5048 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5050 install_sh="\${SHELL} $am_aux_dir/install-sh"
5051 esac
5054 # Installed binaries are usually stripped using 'strip' when the user
5055 # run "make install-strip". However 'strip' might not be the right
5056 # tool to use in cross-compilation environments, therefore Automake
5057 # will honor the 'STRIP' environment variable to overrule this program.
5058 if test "$cross_compiling" != no; then
5059 if test -n "$ac_tool_prefix"; then
5060 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5061 set dummy ${ac_tool_prefix}strip; ac_word=$2
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5063 $as_echo_n "checking for $ac_word... " >&6; }
5064 if ${ac_cv_prog_STRIP+:} false; then :
5065 $as_echo_n "(cached) " >&6
5066 else
5067 if test -n "$STRIP"; then
5068 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5069 else
5070 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5071 for as_dir in $PATH
5073 IFS=$as_save_IFS
5074 test -z "$as_dir" && as_dir=.
5075 for ac_exec_ext in '' $ac_executable_extensions; do
5076 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5077 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5078 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5079 break 2
5081 done
5082 done
5083 IFS=$as_save_IFS
5087 STRIP=$ac_cv_prog_STRIP
5088 if test -n "$STRIP"; then
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5090 $as_echo "$STRIP" >&6; }
5091 else
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5093 $as_echo "no" >&6; }
5098 if test -z "$ac_cv_prog_STRIP"; then
5099 ac_ct_STRIP=$STRIP
5100 # Extract the first word of "strip", so it can be a program name with args.
5101 set dummy strip; ac_word=$2
5102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5103 $as_echo_n "checking for $ac_word... " >&6; }
5104 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5105 $as_echo_n "(cached) " >&6
5106 else
5107 if test -n "$ac_ct_STRIP"; then
5108 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5109 else
5110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111 for as_dir in $PATH
5113 IFS=$as_save_IFS
5114 test -z "$as_dir" && as_dir=.
5115 for ac_exec_ext in '' $ac_executable_extensions; do
5116 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5117 ac_cv_prog_ac_ct_STRIP="strip"
5118 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119 break 2
5121 done
5122 done
5123 IFS=$as_save_IFS
5127 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5128 if test -n "$ac_ct_STRIP"; then
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5130 $as_echo "$ac_ct_STRIP" >&6; }
5131 else
5132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5133 $as_echo "no" >&6; }
5136 if test "x$ac_ct_STRIP" = x; then
5137 STRIP=":"
5138 else
5139 case $cross_compiling:$ac_tool_warned in
5140 yes:)
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5142 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5143 ac_tool_warned=yes ;;
5144 esac
5145 STRIP=$ac_ct_STRIP
5147 else
5148 STRIP="$ac_cv_prog_STRIP"
5152 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5155 ac_aux_dir=
5156 for ac_dir in .. "$srcdir"/..; do
5157 if test -f "$ac_dir/install-sh"; then
5158 ac_aux_dir=$ac_dir
5159 ac_install_sh="$ac_aux_dir/install-sh -c"
5160 break
5161 elif test -f "$ac_dir/install.sh"; then
5162 ac_aux_dir=$ac_dir
5163 ac_install_sh="$ac_aux_dir/install.sh -c"
5164 break
5165 elif test -f "$ac_dir/shtool"; then
5166 ac_aux_dir=$ac_dir
5167 ac_install_sh="$ac_aux_dir/shtool install -c"
5168 break
5170 done
5171 if test -z "$ac_aux_dir"; then
5172 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5175 # These three variables are undocumented and unsupported,
5176 # and are intended to be withdrawn in a future Autoconf release.
5177 # They can cause serious problems if a builder's source tree is in a directory
5178 # whose full name contains unusual characters.
5179 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5180 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5181 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5185 # Set build, build_cpu, build_vendor and build_os.
5188 # Set host, host_cpu, host_vendor, and host_os.
5191 # Set target, target_cpu, target_vendor, and target_os.
5194 case ${build_alias} in
5195 "") build_noncanonical=${build} ;;
5196 *) build_noncanonical=${build_alias} ;;
5197 esac
5199 case ${host_alias} in
5200 "") host_noncanonical=${build_noncanonical} ;;
5201 *) host_noncanonical=${host_alias} ;;
5202 esac
5204 case ${target_alias} in
5205 "") target_noncanonical=${host_noncanonical} ;;
5206 *) target_noncanonical=${target_alias} ;;
5207 esac
5212 test "$program_prefix" != NONE &&
5213 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5214 # Use a double $ so make ignores it.
5215 test "$program_suffix" != NONE &&
5216 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5217 # Double any \ or $.
5218 # By default was `s,x,x', remove it if useless.
5219 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5220 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5223 # We require a C++11 compiler. Check if one is available, and if
5224 # necessary, set CXX_DIALECT to some -std=xxx switch.
5226 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5227 ac_ext=cpp
5228 ac_cpp='$CXXCPP $CPPFLAGS'
5229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5230 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5232 CXX_DIALECT=""
5233 ac_success=no
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5235 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5236 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5237 $as_echo_n "(cached) " >&6
5238 else
5239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5240 /* end confdefs.h. */
5243 // If the compiler admits that it is not ready for C++11, why torture it?
5244 // Hopefully, this will speed up the test.
5246 #ifndef __cplusplus
5248 #error "This is not a C++ compiler"
5250 #elif __cplusplus < 201103L
5252 #error "This is not a C++11 compiler"
5254 #else
5256 namespace cxx11
5259 namespace test_static_assert
5262 template <typename T>
5263 struct check
5265 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5270 namespace test_final_override
5273 struct Base
5275 virtual void f() {}
5278 struct Derived : public Base
5280 virtual void f() override {}
5285 namespace test_double_right_angle_brackets
5288 template < typename T >
5289 struct check {};
5291 typedef check<void> single_type;
5292 typedef check<check<void>> double_type;
5293 typedef check<check<check<void>>> triple_type;
5294 typedef check<check<check<check<void>>>> quadruple_type;
5298 namespace test_decltype
5304 int a = 1;
5305 decltype(a) b = 2;
5306 return a + b;
5311 namespace test_type_deduction
5314 template < typename T1, typename T2 >
5315 struct is_same
5317 static const bool value = false;
5320 template < typename T >
5321 struct is_same<T, T>
5323 static const bool value = true;
5326 template < typename T1, typename T2 >
5327 auto
5328 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5330 return a1 + a2;
5334 test(const int c, volatile int v)
5336 static_assert(is_same<int, decltype(0)>::value == true, "");
5337 static_assert(is_same<int, decltype(c)>::value == false, "");
5338 static_assert(is_same<int, decltype(v)>::value == false, "");
5339 auto ac = c;
5340 auto av = v;
5341 auto sumi = ac + av + 'x';
5342 auto sumf = ac + av + 1.0;
5343 static_assert(is_same<int, decltype(ac)>::value == true, "");
5344 static_assert(is_same<int, decltype(av)>::value == true, "");
5345 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5346 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5347 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5348 return (sumf > 0.0) ? sumi : add(c, v);
5353 namespace test_noexcept
5356 int f() { return 0; }
5357 int g() noexcept { return 0; }
5359 static_assert(noexcept(f()) == false, "");
5360 static_assert(noexcept(g()) == true, "");
5364 namespace test_constexpr
5367 template < typename CharT >
5368 unsigned long constexpr
5369 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5371 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5374 template < typename CharT >
5375 unsigned long constexpr
5376 strlen_c(const CharT *const s) noexcept
5378 return strlen_c_r(s, 0UL);
5381 static_assert(strlen_c("") == 0UL, "");
5382 static_assert(strlen_c("1") == 1UL, "");
5383 static_assert(strlen_c("example") == 7UL, "");
5384 static_assert(strlen_c("another\0example") == 7UL, "");
5388 namespace test_rvalue_references
5391 template < int N >
5392 struct answer
5394 static constexpr int value = N;
5397 answer<1> f(int&) { return answer<1>(); }
5398 answer<2> f(const int&) { return answer<2>(); }
5399 answer<3> f(int&&) { return answer<3>(); }
5401 void
5402 test()
5404 int i = 0;
5405 const int c = 0;
5406 static_assert(decltype(f(i))::value == 1, "");
5407 static_assert(decltype(f(c))::value == 2, "");
5408 static_assert(decltype(f(0))::value == 3, "");
5413 namespace test_uniform_initialization
5416 struct test
5418 static const int zero {};
5419 static const int one {1};
5422 static_assert(test::zero == 0, "");
5423 static_assert(test::one == 1, "");
5427 namespace test_lambdas
5430 void
5431 test1()
5433 auto lambda1 = [](){};
5434 auto lambda2 = lambda1;
5435 lambda1();
5436 lambda2();
5440 test2()
5442 auto a = [](int i, int j){ return i + j; }(1, 2);
5443 auto b = []() -> int { return '0'; }();
5444 auto c = [=](){ return a + b; }();
5445 auto d = [&](){ return c; }();
5446 auto e = [a, &b](int x) mutable {
5447 const auto identity = [](int y){ return y; };
5448 for (auto i = 0; i < a; ++i)
5449 a += b--;
5450 return x + identity(a + b);
5451 }(0);
5452 return a + b + c + d + e;
5456 test3()
5458 const auto nullary = [](){ return 0; };
5459 const auto unary = [](int x){ return x; };
5460 using nullary_t = decltype(nullary);
5461 using unary_t = decltype(unary);
5462 const auto higher1st = [](nullary_t f){ return f(); };
5463 const auto higher2nd = [unary](nullary_t f1){
5464 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5466 return higher1st(nullary) + higher2nd(nullary)(unary);
5471 namespace test_variadic_templates
5474 template <int...>
5475 struct sum;
5477 template <int N0, int... N1toN>
5478 struct sum<N0, N1toN...>
5480 static constexpr auto value = N0 + sum<N1toN...>::value;
5483 template <>
5484 struct sum<>
5486 static constexpr auto value = 0;
5489 static_assert(sum<>::value == 0, "");
5490 static_assert(sum<1>::value == 1, "");
5491 static_assert(sum<23>::value == 23, "");
5492 static_assert(sum<1, 2>::value == 3, "");
5493 static_assert(sum<5, 5, 11>::value == 21, "");
5494 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5498 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5499 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5500 // because of this.
5501 namespace test_template_alias_sfinae
5504 struct foo {};
5506 template<typename T>
5507 using member = typename T::member_type;
5509 template<typename T>
5510 void func(...) {}
5512 template<typename T>
5513 void func(member<T>*) {}
5515 void test();
5517 void test() { func<foo>(0); }
5521 } // namespace cxx11
5523 #endif // __cplusplus >= 201103L
5527 _ACEOF
5528 if ac_fn_cxx_try_compile "$LINENO"; then :
5529 ax_cv_cxx_compile_cxx11=yes
5530 else
5531 ax_cv_cxx_compile_cxx11=no
5533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5536 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5537 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5538 ac_success=yes
5541 if test x$ac_success = xno; then
5542 for alternative in ${ax_cxx_compile_alternatives}; do
5543 switch="-std=gnu++${alternative}"
5544 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5546 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5547 if eval \${$cachevar+:} false; then :
5548 $as_echo_n "(cached) " >&6
5549 else
5550 ac_save_CXX="$CXX"
5551 CXX="$CXX $switch"
5552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5553 /* end confdefs.h. */
5556 // If the compiler admits that it is not ready for C++11, why torture it?
5557 // Hopefully, this will speed up the test.
5559 #ifndef __cplusplus
5561 #error "This is not a C++ compiler"
5563 #elif __cplusplus < 201103L
5565 #error "This is not a C++11 compiler"
5567 #else
5569 namespace cxx11
5572 namespace test_static_assert
5575 template <typename T>
5576 struct check
5578 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5583 namespace test_final_override
5586 struct Base
5588 virtual void f() {}
5591 struct Derived : public Base
5593 virtual void f() override {}
5598 namespace test_double_right_angle_brackets
5601 template < typename T >
5602 struct check {};
5604 typedef check<void> single_type;
5605 typedef check<check<void>> double_type;
5606 typedef check<check<check<void>>> triple_type;
5607 typedef check<check<check<check<void>>>> quadruple_type;
5611 namespace test_decltype
5617 int a = 1;
5618 decltype(a) b = 2;
5619 return a + b;
5624 namespace test_type_deduction
5627 template < typename T1, typename T2 >
5628 struct is_same
5630 static const bool value = false;
5633 template < typename T >
5634 struct is_same<T, T>
5636 static const bool value = true;
5639 template < typename T1, typename T2 >
5640 auto
5641 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5643 return a1 + a2;
5647 test(const int c, volatile int v)
5649 static_assert(is_same<int, decltype(0)>::value == true, "");
5650 static_assert(is_same<int, decltype(c)>::value == false, "");
5651 static_assert(is_same<int, decltype(v)>::value == false, "");
5652 auto ac = c;
5653 auto av = v;
5654 auto sumi = ac + av + 'x';
5655 auto sumf = ac + av + 1.0;
5656 static_assert(is_same<int, decltype(ac)>::value == true, "");
5657 static_assert(is_same<int, decltype(av)>::value == true, "");
5658 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5659 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5660 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5661 return (sumf > 0.0) ? sumi : add(c, v);
5666 namespace test_noexcept
5669 int f() { return 0; }
5670 int g() noexcept { return 0; }
5672 static_assert(noexcept(f()) == false, "");
5673 static_assert(noexcept(g()) == true, "");
5677 namespace test_constexpr
5680 template < typename CharT >
5681 unsigned long constexpr
5682 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5684 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5687 template < typename CharT >
5688 unsigned long constexpr
5689 strlen_c(const CharT *const s) noexcept
5691 return strlen_c_r(s, 0UL);
5694 static_assert(strlen_c("") == 0UL, "");
5695 static_assert(strlen_c("1") == 1UL, "");
5696 static_assert(strlen_c("example") == 7UL, "");
5697 static_assert(strlen_c("another\0example") == 7UL, "");
5701 namespace test_rvalue_references
5704 template < int N >
5705 struct answer
5707 static constexpr int value = N;
5710 answer<1> f(int&) { return answer<1>(); }
5711 answer<2> f(const int&) { return answer<2>(); }
5712 answer<3> f(int&&) { return answer<3>(); }
5714 void
5715 test()
5717 int i = 0;
5718 const int c = 0;
5719 static_assert(decltype(f(i))::value == 1, "");
5720 static_assert(decltype(f(c))::value == 2, "");
5721 static_assert(decltype(f(0))::value == 3, "");
5726 namespace test_uniform_initialization
5729 struct test
5731 static const int zero {};
5732 static const int one {1};
5735 static_assert(test::zero == 0, "");
5736 static_assert(test::one == 1, "");
5740 namespace test_lambdas
5743 void
5744 test1()
5746 auto lambda1 = [](){};
5747 auto lambda2 = lambda1;
5748 lambda1();
5749 lambda2();
5753 test2()
5755 auto a = [](int i, int j){ return i + j; }(1, 2);
5756 auto b = []() -> int { return '0'; }();
5757 auto c = [=](){ return a + b; }();
5758 auto d = [&](){ return c; }();
5759 auto e = [a, &b](int x) mutable {
5760 const auto identity = [](int y){ return y; };
5761 for (auto i = 0; i < a; ++i)
5762 a += b--;
5763 return x + identity(a + b);
5764 }(0);
5765 return a + b + c + d + e;
5769 test3()
5771 const auto nullary = [](){ return 0; };
5772 const auto unary = [](int x){ return x; };
5773 using nullary_t = decltype(nullary);
5774 using unary_t = decltype(unary);
5775 const auto higher1st = [](nullary_t f){ return f(); };
5776 const auto higher2nd = [unary](nullary_t f1){
5777 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5779 return higher1st(nullary) + higher2nd(nullary)(unary);
5784 namespace test_variadic_templates
5787 template <int...>
5788 struct sum;
5790 template <int N0, int... N1toN>
5791 struct sum<N0, N1toN...>
5793 static constexpr auto value = N0 + sum<N1toN...>::value;
5796 template <>
5797 struct sum<>
5799 static constexpr auto value = 0;
5802 static_assert(sum<>::value == 0, "");
5803 static_assert(sum<1>::value == 1, "");
5804 static_assert(sum<23>::value == 23, "");
5805 static_assert(sum<1, 2>::value == 3, "");
5806 static_assert(sum<5, 5, 11>::value == 21, "");
5807 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5811 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5812 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5813 // because of this.
5814 namespace test_template_alias_sfinae
5817 struct foo {};
5819 template<typename T>
5820 using member = typename T::member_type;
5822 template<typename T>
5823 void func(...) {}
5825 template<typename T>
5826 void func(member<T>*) {}
5828 void test();
5830 void test() { func<foo>(0); }
5834 } // namespace cxx11
5836 #endif // __cplusplus >= 201103L
5840 _ACEOF
5841 if ac_fn_cxx_try_compile "$LINENO"; then :
5842 eval $cachevar=yes
5843 else
5844 eval $cachevar=no
5846 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5847 CXX="$ac_save_CXX"
5849 eval ac_res=\$$cachevar
5850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5851 $as_echo "$ac_res" >&6; }
5852 if eval test x\$$cachevar = xyes; then
5853 CXX_DIALECT="$switch"
5854 CXX="$CXX $switch"
5855 if test -n "$CXXCPP" ; then
5856 CXXCPP="$CXXCPP $switch"
5858 ac_success=yes
5859 break
5861 done
5864 if test x$ac_success = xno; then
5865 for alternative in ${ax_cxx_compile_alternatives}; do
5866 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5867 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5869 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5870 if eval \${$cachevar+:} false; then :
5871 $as_echo_n "(cached) " >&6
5872 else
5873 ac_save_CXX="$CXX"
5874 CXX="$CXX $switch"
5875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5876 /* end confdefs.h. */
5879 // If the compiler admits that it is not ready for C++11, why torture it?
5880 // Hopefully, this will speed up the test.
5882 #ifndef __cplusplus
5884 #error "This is not a C++ compiler"
5886 #elif __cplusplus < 201103L
5888 #error "This is not a C++11 compiler"
5890 #else
5892 namespace cxx11
5895 namespace test_static_assert
5898 template <typename T>
5899 struct check
5901 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5906 namespace test_final_override
5909 struct Base
5911 virtual void f() {}
5914 struct Derived : public Base
5916 virtual void f() override {}
5921 namespace test_double_right_angle_brackets
5924 template < typename T >
5925 struct check {};
5927 typedef check<void> single_type;
5928 typedef check<check<void>> double_type;
5929 typedef check<check<check<void>>> triple_type;
5930 typedef check<check<check<check<void>>>> quadruple_type;
5934 namespace test_decltype
5940 int a = 1;
5941 decltype(a) b = 2;
5942 return a + b;
5947 namespace test_type_deduction
5950 template < typename T1, typename T2 >
5951 struct is_same
5953 static const bool value = false;
5956 template < typename T >
5957 struct is_same<T, T>
5959 static const bool value = true;
5962 template < typename T1, typename T2 >
5963 auto
5964 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5966 return a1 + a2;
5970 test(const int c, volatile int v)
5972 static_assert(is_same<int, decltype(0)>::value == true, "");
5973 static_assert(is_same<int, decltype(c)>::value == false, "");
5974 static_assert(is_same<int, decltype(v)>::value == false, "");
5975 auto ac = c;
5976 auto av = v;
5977 auto sumi = ac + av + 'x';
5978 auto sumf = ac + av + 1.0;
5979 static_assert(is_same<int, decltype(ac)>::value == true, "");
5980 static_assert(is_same<int, decltype(av)>::value == true, "");
5981 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5982 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5983 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5984 return (sumf > 0.0) ? sumi : add(c, v);
5989 namespace test_noexcept
5992 int f() { return 0; }
5993 int g() noexcept { return 0; }
5995 static_assert(noexcept(f()) == false, "");
5996 static_assert(noexcept(g()) == true, "");
6000 namespace test_constexpr
6003 template < typename CharT >
6004 unsigned long constexpr
6005 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
6007 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
6010 template < typename CharT >
6011 unsigned long constexpr
6012 strlen_c(const CharT *const s) noexcept
6014 return strlen_c_r(s, 0UL);
6017 static_assert(strlen_c("") == 0UL, "");
6018 static_assert(strlen_c("1") == 1UL, "");
6019 static_assert(strlen_c("example") == 7UL, "");
6020 static_assert(strlen_c("another\0example") == 7UL, "");
6024 namespace test_rvalue_references
6027 template < int N >
6028 struct answer
6030 static constexpr int value = N;
6033 answer<1> f(int&) { return answer<1>(); }
6034 answer<2> f(const int&) { return answer<2>(); }
6035 answer<3> f(int&&) { return answer<3>(); }
6037 void
6038 test()
6040 int i = 0;
6041 const int c = 0;
6042 static_assert(decltype(f(i))::value == 1, "");
6043 static_assert(decltype(f(c))::value == 2, "");
6044 static_assert(decltype(f(0))::value == 3, "");
6049 namespace test_uniform_initialization
6052 struct test
6054 static const int zero {};
6055 static const int one {1};
6058 static_assert(test::zero == 0, "");
6059 static_assert(test::one == 1, "");
6063 namespace test_lambdas
6066 void
6067 test1()
6069 auto lambda1 = [](){};
6070 auto lambda2 = lambda1;
6071 lambda1();
6072 lambda2();
6076 test2()
6078 auto a = [](int i, int j){ return i + j; }(1, 2);
6079 auto b = []() -> int { return '0'; }();
6080 auto c = [=](){ return a + b; }();
6081 auto d = [&](){ return c; }();
6082 auto e = [a, &b](int x) mutable {
6083 const auto identity = [](int y){ return y; };
6084 for (auto i = 0; i < a; ++i)
6085 a += b--;
6086 return x + identity(a + b);
6087 }(0);
6088 return a + b + c + d + e;
6092 test3()
6094 const auto nullary = [](){ return 0; };
6095 const auto unary = [](int x){ return x; };
6096 using nullary_t = decltype(nullary);
6097 using unary_t = decltype(unary);
6098 const auto higher1st = [](nullary_t f){ return f(); };
6099 const auto higher2nd = [unary](nullary_t f1){
6100 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6102 return higher1st(nullary) + higher2nd(nullary)(unary);
6107 namespace test_variadic_templates
6110 template <int...>
6111 struct sum;
6113 template <int N0, int... N1toN>
6114 struct sum<N0, N1toN...>
6116 static constexpr auto value = N0 + sum<N1toN...>::value;
6119 template <>
6120 struct sum<>
6122 static constexpr auto value = 0;
6125 static_assert(sum<>::value == 0, "");
6126 static_assert(sum<1>::value == 1, "");
6127 static_assert(sum<23>::value == 23, "");
6128 static_assert(sum<1, 2>::value == 3, "");
6129 static_assert(sum<5, 5, 11>::value == 21, "");
6130 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6134 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6135 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6136 // because of this.
6137 namespace test_template_alias_sfinae
6140 struct foo {};
6142 template<typename T>
6143 using member = typename T::member_type;
6145 template<typename T>
6146 void func(...) {}
6148 template<typename T>
6149 void func(member<T>*) {}
6151 void test();
6153 void test() { func<foo>(0); }
6157 } // namespace cxx11
6159 #endif // __cplusplus >= 201103L
6163 _ACEOF
6164 if ac_fn_cxx_try_compile "$LINENO"; then :
6165 eval $cachevar=yes
6166 else
6167 eval $cachevar=no
6169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6170 CXX="$ac_save_CXX"
6172 eval ac_res=\$$cachevar
6173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6174 $as_echo "$ac_res" >&6; }
6175 if eval test x\$$cachevar = xyes; then
6176 CXX_DIALECT="$switch"
6177 CXX="$CXX $switch"
6178 if test -n "$CXXCPP" ; then
6179 CXXCPP="$CXXCPP $switch"
6181 ac_success=yes
6182 break
6184 done
6185 if test x$ac_success = xyes; then
6186 break
6188 done
6190 ac_ext=c
6191 ac_cpp='$CPP $CPPFLAGS'
6192 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6193 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6194 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6196 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6197 if test x$ac_success = xno; then
6198 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6201 if test x$ac_success = xno; then
6202 HAVE_CXX11=0
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6204 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6205 else
6206 HAVE_CXX11=1
6208 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6215 # Dependency checking.
6216 rm -rf .tst 2>/dev/null
6217 mkdir .tst 2>/dev/null
6218 if test -d .tst; then
6219 am__leading_dot=.
6220 else
6221 am__leading_dot=_
6223 rmdir .tst 2>/dev/null
6225 DEPDIR="${am__leading_dot}deps"
6227 ac_config_commands="$ac_config_commands depdir"
6230 depcc="$CC" am_compiler_list=
6232 am_depcomp=$ac_aux_dir/depcomp
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6234 $as_echo_n "checking dependency style of $depcc... " >&6; }
6235 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6236 $as_echo_n "(cached) " >&6
6237 else
6238 if test -f "$am_depcomp"; then
6239 # We make a subdir and do the tests there. Otherwise we can end up
6240 # making bogus files that we don't know about and never remove. For
6241 # instance it was reported that on HP-UX the gcc test will end up
6242 # making a dummy file named `D' -- because `-MD' means `put the output
6243 # in D'.
6244 mkdir conftest.dir
6245 # Copy depcomp to subdir because otherwise we won't find it if we're
6246 # using a relative directory.
6247 cp "$am_depcomp" conftest.dir
6248 cd conftest.dir
6249 # We will build objects and dependencies in a subdirectory because
6250 # it helps to detect inapplicable dependency modes. For instance
6251 # both Tru64's cc and ICC support -MD to output dependencies as a
6252 # side effect of compilation, but ICC will put the dependencies in
6253 # the current directory while Tru64 will put them in the object
6254 # directory.
6255 mkdir sub
6257 am_cv_CC_dependencies_compiler_type=none
6258 if test "$am_compiler_list" = ""; then
6259 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6261 for depmode in $am_compiler_list; do
6262 if test $depmode = none; then break; fi
6264 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6265 # Setup a source with many dependencies, because some compilers
6266 # like to wrap large dependency lists on column 80 (with \), and
6267 # we should not choose a depcomp mode which is confused by this.
6269 # We need to recreate these files for each test, as the compiler may
6270 # overwrite some of them when testing with obscure command lines.
6271 # This happens at least with the AIX C compiler.
6272 : > sub/conftest.c
6273 for i in 1 2 3 4 5 6; do
6274 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6275 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6276 # Solaris 8's {/usr,}/bin/sh.
6277 touch sub/conftst$i.h
6278 done
6279 echo "include sub/conftest.Po" > confmf
6281 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6282 # mode. It turns out that the SunPro C++ compiler does not properly
6283 # handle `-M -o', and we need to detect this.
6284 depcmd="depmode=$depmode \
6285 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6286 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6287 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6288 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6289 if env $depcmd > conftest.err 2>&1 &&
6290 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6291 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6292 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6293 # icc doesn't choke on unknown options, it will just issue warnings
6294 # or remarks (even with -Werror). So we grep stderr for any message
6295 # that says an option was ignored or not supported.
6296 # When given -MP, icc 7.0 and 7.1 complain thusly:
6297 # icc: Command line warning: ignoring option '-M'; no argument required
6298 # The diagnosis changed in icc 8.0:
6299 # icc: Command line remark: option '-MP' not supported
6300 if (grep 'ignoring option' conftest.err ||
6301 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6302 am_cv_CC_dependencies_compiler_type=$depmode
6303 $as_echo "$as_me:$LINENO: success" >&5
6304 break
6307 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6308 sed -e 's/^/| /' < conftest.err >&5
6309 done
6311 cd ..
6312 rm -rf conftest.dir
6313 else
6314 am_cv_CC_dependencies_compiler_type=none
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6319 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6320 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6321 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6322 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6328 CONFIG_OBS=
6329 CONFIG_DEPS=
6330 CONFIG_SRCS=
6331 ENABLE_CFLAGS=
6333 CONFIG_ALL=
6334 CONFIG_CLEAN=
6335 CONFIG_INSTALL=
6336 CONFIG_UNINSTALL=
6338 # If we haven't got the data from the intl directory,
6339 # assume NLS is disabled.
6340 USE_NLS=no
6341 LIBINTL=
6342 LIBINTL_DEP=
6343 INCINTL=
6344 XGETTEXT=
6345 GMSGFMT=
6346 POSUB=
6348 if test -f ../intl/config.intl; then
6349 . ../intl/config.intl
6351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6352 $as_echo_n "checking whether NLS is requested... " >&6; }
6353 if test x"$USE_NLS" != xyes; then
6354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6355 $as_echo "no" >&6; }
6356 else
6357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6358 $as_echo "yes" >&6; }
6360 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6364 $as_echo_n "checking for catalogs to be installed... " >&6; }
6365 # Look for .po and .gmo files in the source directory.
6366 CATALOGS=
6367 XLINGUAS=
6368 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6369 # If there aren't any .gmo files the shell will give us the
6370 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6371 # weeded out.
6372 case "$cat" in *\**)
6373 continue;;
6374 esac
6375 # The quadruple backslash is collapsed to a double backslash
6376 # by the backticks, then collapsed again by the double quotes,
6377 # leaving us with one backslash in the sed expression (right
6378 # before the dot that mustn't act as a wildcard).
6379 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6380 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6381 # The user is allowed to set LINGUAS to a list of languages to
6382 # install catalogs for. If it's empty that means "all of them."
6383 if test "x$LINGUAS" = x; then
6384 CATALOGS="$CATALOGS $cat"
6385 XLINGUAS="$XLINGUAS $lang"
6386 else
6387 case "$LINGUAS" in *$lang*)
6388 CATALOGS="$CATALOGS $cat"
6389 XLINGUAS="$XLINGUAS $lang"
6391 esac
6393 done
6394 LINGUAS="$XLINGUAS"
6395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6396 $as_echo "$LINGUAS" >&6; }
6399 DATADIRNAME=share
6401 INSTOBJEXT=.mo
6403 GENCAT=gencat
6405 CATOBJEXT=.gmo
6409 localedir='${datadir}/locale'
6412 if test x"$USE_NLS" = xyes; then
6413 CONFIG_ALL="$CONFIG_ALL all-po"
6414 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6415 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6416 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6419 PACKAGE=gdb
6421 cat >>confdefs.h <<_ACEOF
6422 #define PACKAGE "$PACKAGE"
6423 _ACEOF
6427 # We never need to detect it in this sub-configure.
6428 # But preserve it for config.status --recheck.
6432 MAKEINFO_EXTRA_FLAGS=""
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6434 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6435 if ${gdb_cv_have_makeinfo_click+:} false; then :
6436 $as_echo_n "(cached) " >&6
6437 else
6438 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6439 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6440 gdb_cv_have_makeinfo_click=yes
6441 else
6442 gdb_cv_have_makeinfo_click=no
6445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6446 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6447 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6448 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6454 # Check whether --with-separate-debug-dir was given.
6455 if test "${with_separate_debug_dir+set}" = set; then :
6456 withval=$with_separate_debug_dir;
6457 DEBUGDIR=$withval
6458 else
6459 DEBUGDIR=${libdir}/debug
6463 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6464 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6465 ac_define_dir=`eval echo $DEBUGDIR`
6466 ac_define_dir=`eval echo $ac_define_dir`
6468 cat >>confdefs.h <<_ACEOF
6469 #define DEBUGDIR "$ac_define_dir"
6470 _ACEOF
6475 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6476 if test "x$prefix" = xNONE; then
6477 test_prefix=/usr/local
6478 else
6479 test_prefix=$prefix
6481 else
6482 test_prefix=$exec_prefix
6484 value=0
6485 case ${ac_define_dir} in
6486 "${test_prefix}"|"${test_prefix}/"*|\
6487 '${exec_prefix}'|'${exec_prefix}/'*)
6488 value=1
6490 esac
6492 cat >>confdefs.h <<_ACEOF
6493 #define DEBUGDIR_RELOCATABLE $value
6494 _ACEOF
6499 # We can't pass paths as command line arguments.
6500 # Mingw32 tries to be clever and will convert the paths for us.
6501 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6502 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6503 # This breaks GDB's relocatable path conversions since paths passed in
6504 # config.h would not get so translated, the path prefixes no longer match.
6506 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6507 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6508 ac_define_dir=`eval echo $bindir`
6509 ac_define_dir=`eval echo $ac_define_dir`
6511 cat >>confdefs.h <<_ACEOF
6512 #define BINDIR "$ac_define_dir"
6513 _ACEOF
6517 # GDB's datadir relocation
6521 # Check whether --with-gdb-datadir was given.
6522 if test "${with_gdb_datadir+set}" = set; then :
6523 withval=$with_gdb_datadir;
6524 GDB_DATADIR=$withval
6525 else
6526 GDB_DATADIR=${datadir}/gdb
6530 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6531 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6532 ac_define_dir=`eval echo $GDB_DATADIR`
6533 ac_define_dir=`eval echo $ac_define_dir`
6535 cat >>confdefs.h <<_ACEOF
6536 #define GDB_DATADIR "$ac_define_dir"
6537 _ACEOF
6542 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6543 if test "x$prefix" = xNONE; then
6544 test_prefix=/usr/local
6545 else
6546 test_prefix=$prefix
6548 else
6549 test_prefix=$exec_prefix
6551 value=0
6552 case ${ac_define_dir} in
6553 "${test_prefix}"|"${test_prefix}/"*|\
6554 '${exec_prefix}'|'${exec_prefix}/'*)
6555 value=1
6557 esac
6559 cat >>confdefs.h <<_ACEOF
6560 #define GDB_DATADIR_RELOCATABLE $value
6561 _ACEOF
6567 # Check whether --with-relocated-sources was given.
6568 if test "${with_relocated_sources+set}" = set; then :
6569 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6571 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6572 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6573 ac_define_dir=`eval echo $reloc_srcdir`
6574 ac_define_dir=`eval echo $ac_define_dir`
6576 cat >>confdefs.h <<_ACEOF
6577 #define RELOC_SRCDIR "$ac_define_dir"
6578 _ACEOF
6585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6586 $as_echo_n "checking for default auto-load directory... " >&6; }
6588 # Check whether --with-auto-load-dir was given.
6589 if test "${with_auto_load_dir+set}" = set; then :
6590 withval=$with_auto_load_dir;
6591 else
6592 with_auto_load_dir='$debugdir:$datadir/auto-load'
6595 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6597 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6598 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6599 ac_define_dir=`eval echo $escape_dir`
6600 ac_define_dir=`eval echo $ac_define_dir`
6602 cat >>confdefs.h <<_ACEOF
6603 #define AUTO_LOAD_DIR "$ac_define_dir"
6604 _ACEOF
6607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6608 $as_echo "$with_auto_load_dir" >&6; }
6610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6611 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6613 # Check whether --with-auto-load-safe-path was given.
6614 if test "${with_auto_load_safe_path+set}" = set; then :
6615 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6616 with_auto_load_safe_path="/"
6618 else
6619 with_auto_load_safe_path="$with_auto_load_dir"
6622 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6624 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6625 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6626 ac_define_dir=`eval echo $escape_dir`
6627 ac_define_dir=`eval echo $ac_define_dir`
6629 cat >>confdefs.h <<_ACEOF
6630 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6631 _ACEOF
6634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6635 $as_echo "$with_auto_load_safe_path" >&6; }
6639 subdirs="$subdirs testsuite"
6642 # Check whether to support alternative target configurations
6643 # Check whether --enable-targets was given.
6644 if test "${enable_targets+set}" = set; then :
6645 enableval=$enable_targets; case "${enableval}" in
6646 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6648 no) enable_targets= ;;
6649 *) enable_targets=$enableval ;;
6650 esac
6654 # Check whether --enable-64-bit-bfd was given.
6655 if test "${enable_64_bit_bfd+set}" = set; then :
6656 enableval=$enable_64_bit_bfd; case $enableval in #(
6657 yes|no) :
6658 ;; #(
6659 *) :
6660 as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; #(
6661 *) :
6663 esac
6664 else
6665 enable_64_bit_bfd=no
6669 if test "x$enable_64_bit_bfd" = "xno"; then :
6670 # The cast to long int works around a bug in the HP C Compiler
6671 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6672 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6673 # This bug is HP SR number 8606223364.
6674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
6675 $as_echo_n "checking size of void *... " >&6; }
6676 if ${ac_cv_sizeof_void_p+:} false; then :
6677 $as_echo_n "(cached) " >&6
6678 else
6679 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
6681 else
6682 if test "$ac_cv_type_void_p" = yes; then
6683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6684 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6685 as_fn_error 77 "cannot compute sizeof (void *)
6686 See \`config.log' for more details" "$LINENO" 5; }
6687 else
6688 ac_cv_sizeof_void_p=0
6693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
6694 $as_echo "$ac_cv_sizeof_void_p" >&6; }
6698 cat >>confdefs.h <<_ACEOF
6699 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
6700 _ACEOF
6703 if test "x$ac_cv_sizeof_void_p" = "x8"; then :
6704 enable_64_bit_bfd=yes
6709 if test "x$enable_64_bit_bfd" = "xyes"; then
6710 ENABLE_BFD_64_BIT_TRUE=
6711 ENABLE_BFD_64_BIT_FALSE='#'
6712 else
6713 ENABLE_BFD_64_BIT_TRUE='#'
6714 ENABLE_BFD_64_BIT_FALSE=
6719 # Provide defaults for some variables set by the per-host and per-target
6720 # configuration.
6721 gdb_host_obs=posix-hdep.o
6723 if test "${target}" = "${host}"; then
6724 gdb_native=yes
6725 else
6726 gdb_native=no
6729 . $srcdir/configure.host
6731 # Accumulate some settings from configure.tgt over all enabled targets
6733 TARGET_OBS=
6734 all_targets=
6735 HAVE_NATIVE_GCORE_TARGET=
6737 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6739 if test "$targ_alias" = "all"; then
6740 all_targets=true
6741 else
6742 # Canonicalize the secondary target names.
6743 result=`$ac_config_sub $targ_alias 2>/dev/null`
6744 if test -n "$result"; then
6745 targ=$result
6746 else
6747 targ=$targ_alias
6750 . ${srcdir}/configure.tgt
6752 if test -z "${gdb_target_obs}"; then :
6753 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6756 # Target-specific object files
6757 for i in ${gdb_target_obs}; do
6758 case " $TARGET_OBS " in
6759 *" ${i} "*) ;;
6761 TARGET_OBS="$TARGET_OBS ${i}"
6763 esac
6764 done
6766 # Check whether this target needs 64-bit CORE_ADDR
6767 if test x${enable_64_bit_bfd} = xno; then
6768 . ${srcdir}/../bfd/config.bfd
6771 # Check whether this target is native and supports gcore.
6772 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6773 && $gdb_have_gcore; then
6774 HAVE_NATIVE_GCORE_TARGET=1
6777 done
6779 if test x${all_targets} = xtrue; then
6780 if test x${enable_64_bit_bfd} = xyes; then
6781 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6782 else
6783 TARGET_OBS='$(ALL_TARGET_OBS)'
6790 # For other settings, only the main target counts.
6791 gdb_sim=
6792 gdb_osabi=
6793 targ=$target; . ${srcdir}/configure.tgt
6795 # Fetch the default architecture and default target vector from BFD.
6796 targ=$target; . $srcdir/../bfd/config.bfd
6798 # We only want the first architecture, so strip off the others if
6799 # there is more than one.
6800 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6802 if test "x$targ_archs" != x; then
6804 cat >>confdefs.h <<_ACEOF
6805 #define DEFAULT_BFD_ARCH $targ_archs
6806 _ACEOF
6809 if test "x$targ_defvec" != x; then
6811 cat >>confdefs.h <<_ACEOF
6812 #define DEFAULT_BFD_VEC $targ_defvec
6813 _ACEOF
6817 # Enable MI.
6818 # Check whether --enable-gdbmi was given.
6819 if test "${enable_gdbmi+set}" = set; then :
6820 enableval=$enable_gdbmi;
6821 case $enableval in
6822 yes | no)
6825 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5
6827 esac
6829 else
6830 enable_gdbmi=yes
6833 if test x"$enable_gdbmi" = xyes; then
6834 if test -d "$srcdir/mi"; then
6835 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6836 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6837 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6838 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6842 # Enable TUI.
6843 # Check whether --enable-tui was given.
6844 if test "${enable_tui+set}" = set; then :
6845 enableval=$enable_tui;
6846 case $enableval in
6847 yes | no | auto)
6850 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5
6852 esac
6854 else
6855 enable_tui=auto
6859 # Enable gdbtk.
6860 # Check whether --enable-gdbtk was given.
6861 if test "${enable_gdbtk+set}" = set; then :
6862 enableval=$enable_gdbtk;
6863 case $enableval in
6864 yes | no)
6867 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5
6869 esac
6871 else
6872 if test -d "$srcdir/gdbtk"; then
6873 enable_gdbtk=yes
6874 else
6875 enable_gdbtk=no
6879 # We unconditionally disable gdbtk tests on selected platforms.
6880 case $host_os in
6881 go32* | windows*)
6882 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6883 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6884 enable_gdbtk=no ;;
6885 esac
6887 # Handle optional debuginfod support
6895 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6896 if test -n "$ac_tool_prefix"; then
6897 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6898 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6900 $as_echo_n "checking for $ac_word... " >&6; }
6901 if ${ac_cv_path_PKG_CONFIG+:} false; then :
6902 $as_echo_n "(cached) " >&6
6903 else
6904 case $PKG_CONFIG in
6905 [\\/]* | ?:[\\/]*)
6906 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6909 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6910 for as_dir in $PATH
6912 IFS=$as_save_IFS
6913 test -z "$as_dir" && as_dir=.
6914 for ac_exec_ext in '' $ac_executable_extensions; do
6915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6916 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6918 break 2
6920 done
6921 done
6922 IFS=$as_save_IFS
6925 esac
6927 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6928 if test -n "$PKG_CONFIG"; then
6929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
6930 $as_echo "$PKG_CONFIG" >&6; }
6931 else
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6933 $as_echo "no" >&6; }
6938 if test -z "$ac_cv_path_PKG_CONFIG"; then
6939 ac_pt_PKG_CONFIG=$PKG_CONFIG
6940 # Extract the first word of "pkg-config", so it can be a program name with args.
6941 set dummy pkg-config; ac_word=$2
6942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6943 $as_echo_n "checking for $ac_word... " >&6; }
6944 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
6945 $as_echo_n "(cached) " >&6
6946 else
6947 case $ac_pt_PKG_CONFIG in
6948 [\\/]* | ?:[\\/]*)
6949 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6952 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6953 for as_dir in $PATH
6955 IFS=$as_save_IFS
6956 test -z "$as_dir" && as_dir=.
6957 for ac_exec_ext in '' $ac_executable_extensions; do
6958 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6959 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
6960 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6961 break 2
6963 done
6964 done
6965 IFS=$as_save_IFS
6968 esac
6970 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6971 if test -n "$ac_pt_PKG_CONFIG"; then
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
6973 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
6974 else
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6976 $as_echo "no" >&6; }
6979 if test "x$ac_pt_PKG_CONFIG" = x; then
6980 PKG_CONFIG=""
6981 else
6982 case $cross_compiling:$ac_tool_warned in
6983 yes:)
6984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6985 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6986 ac_tool_warned=yes ;;
6987 esac
6988 PKG_CONFIG=$ac_pt_PKG_CONFIG
6990 else
6991 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6995 if test -n "$PKG_CONFIG"; then
6996 _pkg_min_version=0.9.0
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
6998 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
6999 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7001 $as_echo "yes" >&6; }
7002 else
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7004 $as_echo "no" >&6; }
7005 PKG_CONFIG=""
7009 # Handle optional debuginfod support
7011 # Check whether --with-debuginfod was given.
7012 if test "${with_debuginfod+set}" = set; then :
7013 withval=$with_debuginfod;
7014 else
7015 with_debuginfod=auto
7018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5
7019 $as_echo_n "checking whether to use debuginfod... " >&6; }
7020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5
7021 $as_echo "$with_debuginfod" >&6; }
7023 if test "x$with_debuginfod" != xno; then
7025 pkg_failed=no
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdebuginfod >= 0.179" >&5
7027 $as_echo_n "checking for libdebuginfod >= 0.179... " >&6; }
7029 if test -n "$DEBUGINFOD_CFLAGS"; then
7030 pkg_cv_DEBUGINFOD_CFLAGS="$DEBUGINFOD_CFLAGS"
7031 elif test -n "$PKG_CONFIG"; then
7032 if test -n "$PKG_CONFIG" && \
7033 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7034 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7035 ac_status=$?
7036 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7037 test $ac_status = 0; }; then
7038 pkg_cv_DEBUGINFOD_CFLAGS=`$PKG_CONFIG --cflags "libdebuginfod >= 0.179" 2>/dev/null`
7039 test "x$?" != "x0" && pkg_failed=yes
7040 else
7041 pkg_failed=yes
7043 else
7044 pkg_failed=untried
7046 if test -n "$DEBUGINFOD_LIBS"; then
7047 pkg_cv_DEBUGINFOD_LIBS="$DEBUGINFOD_LIBS"
7048 elif test -n "$PKG_CONFIG"; then
7049 if test -n "$PKG_CONFIG" && \
7050 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdebuginfod >= 0.179\""; } >&5
7051 ($PKG_CONFIG --exists --print-errors "libdebuginfod >= 0.179") 2>&5
7052 ac_status=$?
7053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7054 test $ac_status = 0; }; then
7055 pkg_cv_DEBUGINFOD_LIBS=`$PKG_CONFIG --libs "libdebuginfod >= 0.179" 2>/dev/null`
7056 test "x$?" != "x0" && pkg_failed=yes
7057 else
7058 pkg_failed=yes
7060 else
7061 pkg_failed=untried
7064 if test $pkg_failed = no; then
7065 pkg_save_LDFLAGS="$LDFLAGS"
7066 LDFLAGS="$LDFLAGS $pkg_cv_DEBUGINFOD_LIBS"
7067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7068 /* end confdefs.h. */
7071 main ()
7075 return 0;
7077 _ACEOF
7078 if ac_fn_c_try_link "$LINENO"; then :
7080 else
7081 pkg_failed=yes
7083 rm -f core conftest.err conftest.$ac_objext \
7084 conftest$ac_exeext conftest.$ac_ext
7085 LDFLAGS=$pkg_save_LDFLAGS
7090 if test $pkg_failed = yes; then
7091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7092 $as_echo "no" >&6; }
7094 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7095 _pkg_short_errors_supported=yes
7096 else
7097 _pkg_short_errors_supported=no
7099 if test $_pkg_short_errors_supported = yes; then
7100 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7101 else
7102 DEBUGINFOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdebuginfod >= 0.179" 2>&1`
7104 # Put the nasty error message in config.log where it belongs
7105 echo "$DEBUGINFOD_PKG_ERRORS" >&5
7107 if test "x$with_debuginfod" = xyes; then
7108 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7109 else
7110 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7111 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7113 elif test $pkg_failed = untried; then
7114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7115 $as_echo "no" >&6; }
7116 if test "x$with_debuginfod" = xyes; then
7117 as_fn_error $? "\"--with-debuginfod was given, but libdebuginfod is missing or unusable.\"" "$LINENO" 5
7118 else
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&5
7120 $as_echo "$as_me: WARNING: libdebuginfod is missing or unusable; some features may be unavailable." >&2;}
7122 else
7123 DEBUGINFOD_CFLAGS=$pkg_cv_DEBUGINFOD_CFLAGS
7124 DEBUGINFOD_LIBS=$pkg_cv_DEBUGINFOD_LIBS
7125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7126 $as_echo "yes" >&6; }
7128 $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
7131 else
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5
7133 $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;}
7137 # Libunwind support for ia64.
7139 # Check whether --with-libunwind-ia64 was given.
7140 if test "${with_libunwind_ia64+set}" = set; then :
7141 withval=$with_libunwind_ia64;
7142 else
7143 with_libunwind_ia64=auto
7147 # Backward compatibility option.
7148 if test "${with_libunwind+set}" = set; then
7149 if test x"$with_libunwind_ia64" != xauto; then
7150 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
7152 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
7153 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
7154 with_libunwind_ia64="$with_libunwind"
7157 case "$with_libunwind_ia64" in
7158 yes | no)
7160 auto)
7161 for ac_header in libunwind-ia64.h
7162 do :
7163 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7164 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7165 cat >>confdefs.h <<_ACEOF
7166 #define HAVE_LIBUNWIND_IA64_H 1
7167 _ACEOF
7171 done
7173 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
7176 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
7178 esac
7180 if test x"$with_libunwind_ia64" = xyes; then
7181 for ac_header in libunwind-ia64.h
7182 do :
7183 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
7184 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
7185 cat >>confdefs.h <<_ACEOF
7186 #define HAVE_LIBUNWIND_IA64_H 1
7187 _ACEOF
7191 done
7193 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
7194 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
7196 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
7197 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
7198 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
7201 opt_curses=no
7203 # Check whether --with-curses was given.
7204 if test "${with_curses+set}" = set; then :
7205 withval=$with_curses; opt_curses=$withval
7209 prefer_curses=no
7210 if test "$opt_curses" = "yes"; then
7211 prefer_curses=yes
7214 # Profiling support.
7215 # Check whether --enable-profiling was given.
7216 if test "${enable_profiling+set}" = set; then :
7217 enableval=$enable_profiling;
7218 case $enableval in
7219 yes | no)
7222 as_fn_error $? "bad value $enableval for --enable-profiling" "$LINENO" 5
7224 esac
7226 else
7227 enable_profiling=no
7231 for ac_func in monstartup _mcleanup
7232 do :
7233 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7234 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7235 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7236 cat >>confdefs.h <<_ACEOF
7237 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7238 _ACEOF
7241 done
7243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
7244 $as_echo_n "checking for _etext... " >&6; }
7245 if ${ac_cv_var__etext+:} false; then :
7246 $as_echo_n "(cached) " >&6
7247 else
7248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7249 /* end confdefs.h. */
7250 #include <stdlib.h>
7251 extern char _etext;
7253 main ()
7255 free (&_etext);
7258 return 0;
7260 _ACEOF
7261 if ac_fn_c_try_link "$LINENO"; then :
7262 ac_cv_var__etext=yes
7263 else
7264 ac_cv_var__etext=no
7267 rm -f core conftest.err conftest.$ac_objext \
7268 conftest$ac_exeext conftest.$ac_ext
7271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
7272 $as_echo "$ac_cv_var__etext" >&6; }
7273 if test "$ac_cv_var__etext" = yes; then
7275 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
7278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
7279 $as_echo_n "checking for etext... " >&6; }
7280 if ${ac_cv_var_etext+:} false; then :
7281 $as_echo_n "(cached) " >&6
7282 else
7283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7284 /* end confdefs.h. */
7285 #include <stdlib.h>
7286 extern char etext;
7288 main ()
7290 free (&etext);
7293 return 0;
7295 _ACEOF
7296 if ac_fn_c_try_link "$LINENO"; then :
7297 ac_cv_var_etext=yes
7298 else
7299 ac_cv_var_etext=no
7302 rm -f core conftest.err conftest.$ac_objext \
7303 conftest$ac_exeext conftest.$ac_ext
7306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
7307 $as_echo "$ac_cv_var_etext" >&6; }
7308 if test "$ac_cv_var_etext" = yes; then
7310 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
7313 if test "$enable_profiling" = yes ; then
7314 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
7315 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
7317 PROFILE_CFLAGS=-pg
7318 OLD_CFLAGS="$CFLAGS"
7319 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
7321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7322 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7323 if ${ac_cv_cc_supports_pg+:} false; then :
7324 $as_echo_n "(cached) " >&6
7325 else
7326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7327 /* end confdefs.h. */
7330 main ()
7332 int x;
7334 return 0;
7336 _ACEOF
7337 if ac_fn_c_try_compile "$LINENO"; then :
7338 ac_cv_cc_supports_pg=yes
7339 else
7340 ac_cv_cc_supports_pg=no
7343 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7347 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7349 if test "$ac_cv_cc_supports_pg" = no; then
7350 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7353 CFLAGS="$OLD_CFLAGS"
7356 CODESIGN_CERT=
7357 # Check whether --enable-codesign was given.
7358 if test "${enable_codesign+set}" = set; then :
7359 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7366 # Check whether --with-pkgversion was given.
7367 if test "${with_pkgversion+set}" = set; then :
7368 withval=$with_pkgversion; case "$withval" in
7369 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7370 no) PKGVERSION= ;;
7371 *) PKGVERSION="($withval) " ;;
7372 esac
7373 else
7374 PKGVERSION="(GDB) "
7382 # Check whether --with-bugurl was given.
7383 if test "${with_bugurl+set}" = set; then :
7384 withval=$with_bugurl; case "$withval" in
7385 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7386 no) BUGURL=
7388 *) BUGURL="$withval"
7390 esac
7391 else
7392 BUGURL="https://www.gnu.org/software/gdb/bugs/"
7396 case ${BUGURL} in
7398 REPORT_BUGS_TO=
7399 REPORT_BUGS_TEXI=
7402 REPORT_BUGS_TO="<$BUGURL>"
7403 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7405 esac;
7410 cat >>confdefs.h <<_ACEOF
7411 #define PKGVERSION "$PKGVERSION"
7412 _ACEOF
7415 cat >>confdefs.h <<_ACEOF
7416 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7417 _ACEOF
7420 # --------------------- #
7421 # Checks for programs. #
7422 # --------------------- #
7424 for ac_prog in gawk mawk nawk awk
7426 # Extract the first word of "$ac_prog", so it can be a program name with args.
7427 set dummy $ac_prog; ac_word=$2
7428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7429 $as_echo_n "checking for $ac_word... " >&6; }
7430 if ${ac_cv_prog_AWK+:} false; then :
7431 $as_echo_n "(cached) " >&6
7432 else
7433 if test -n "$AWK"; then
7434 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7435 else
7436 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7437 for as_dir in $PATH
7439 IFS=$as_save_IFS
7440 test -z "$as_dir" && as_dir=.
7441 for ac_exec_ext in '' $ac_executable_extensions; do
7442 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7443 ac_cv_prog_AWK="$ac_prog"
7444 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7445 break 2
7447 done
7448 done
7449 IFS=$as_save_IFS
7453 AWK=$ac_cv_prog_AWK
7454 if test -n "$AWK"; then
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7456 $as_echo "$AWK" >&6; }
7457 else
7458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7459 $as_echo "no" >&6; }
7463 test -n "$AWK" && break
7464 done
7466 # Find a good install program. We prefer a C program (faster),
7467 # so one script is as good as another. But avoid the broken or
7468 # incompatible versions:
7469 # SysV /etc/install, /usr/sbin/install
7470 # SunOS /usr/etc/install
7471 # IRIX /sbin/install
7472 # AIX /bin/install
7473 # AmigaOS /C/install, which installs bootblocks on floppy discs
7474 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7475 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7476 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7477 # OS/2's system install, which has a completely different semantic
7478 # ./install, which can be erroneously created by make from ./install.sh.
7479 # Reject install programs that cannot install multiple files.
7480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7481 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7482 if test -z "$INSTALL"; then
7483 if ${ac_cv_path_install+:} false; then :
7484 $as_echo_n "(cached) " >&6
7485 else
7486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7487 for as_dir in $PATH
7489 IFS=$as_save_IFS
7490 test -z "$as_dir" && as_dir=.
7491 # Account for people who put trailing slashes in PATH elements.
7492 case $as_dir/ in #((
7493 ./ | .// | /[cC]/* | \
7494 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7495 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7496 /usr/ucb/* ) ;;
7498 # OSF1 and SCO ODT 3.0 have their own names for install.
7499 # Don't use installbsd from OSF since it installs stuff as root
7500 # by default.
7501 for ac_prog in ginstall scoinst install; do
7502 for ac_exec_ext in '' $ac_executable_extensions; do
7503 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7504 if test $ac_prog = install &&
7505 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7506 # AIX install. It has an incompatible calling convention.
7508 elif test $ac_prog = install &&
7509 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7510 # program-specific install script used by HP pwplus--don't use.
7512 else
7513 rm -rf conftest.one conftest.two conftest.dir
7514 echo one > conftest.one
7515 echo two > conftest.two
7516 mkdir conftest.dir
7517 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7518 test -s conftest.one && test -s conftest.two &&
7519 test -s conftest.dir/conftest.one &&
7520 test -s conftest.dir/conftest.two
7521 then
7522 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7523 break 3
7527 done
7528 done
7530 esac
7532 done
7533 IFS=$as_save_IFS
7535 rm -rf conftest.one conftest.two conftest.dir
7538 if test "${ac_cv_path_install+set}" = set; then
7539 INSTALL=$ac_cv_path_install
7540 else
7541 # As a last resort, use the slow shell script. Don't cache a
7542 # value for INSTALL within a source directory, because that will
7543 # break other packages using the cache if that directory is
7544 # removed, or if the value is a relative name.
7545 INSTALL=$ac_install_sh
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7549 $as_echo "$INSTALL" >&6; }
7551 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7552 # It thinks the first close brace ends the variable substitution.
7553 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7555 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7557 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7560 $as_echo_n "checking whether ln -s works... " >&6; }
7561 LN_S=$as_ln_s
7562 if test "$LN_S" = "ln -s"; then
7563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7564 $as_echo "yes" >&6; }
7565 else
7566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7567 $as_echo "no, using $LN_S" >&6; }
7570 if test -n "$ac_tool_prefix"; then
7571 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7572 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7574 $as_echo_n "checking for $ac_word... " >&6; }
7575 if ${ac_cv_prog_RANLIB+:} false; then :
7576 $as_echo_n "(cached) " >&6
7577 else
7578 if test -n "$RANLIB"; then
7579 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7580 else
7581 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7582 for as_dir in $PATH
7584 IFS=$as_save_IFS
7585 test -z "$as_dir" && as_dir=.
7586 for ac_exec_ext in '' $ac_executable_extensions; do
7587 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7588 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7589 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7590 break 2
7592 done
7593 done
7594 IFS=$as_save_IFS
7598 RANLIB=$ac_cv_prog_RANLIB
7599 if test -n "$RANLIB"; then
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7601 $as_echo "$RANLIB" >&6; }
7602 else
7603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7604 $as_echo "no" >&6; }
7609 if test -z "$ac_cv_prog_RANLIB"; then
7610 ac_ct_RANLIB=$RANLIB
7611 # Extract the first word of "ranlib", so it can be a program name with args.
7612 set dummy ranlib; ac_word=$2
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7614 $as_echo_n "checking for $ac_word... " >&6; }
7615 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7616 $as_echo_n "(cached) " >&6
7617 else
7618 if test -n "$ac_ct_RANLIB"; then
7619 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7620 else
7621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7622 for as_dir in $PATH
7624 IFS=$as_save_IFS
7625 test -z "$as_dir" && as_dir=.
7626 for ac_exec_ext in '' $ac_executable_extensions; do
7627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7628 ac_cv_prog_ac_ct_RANLIB="ranlib"
7629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7630 break 2
7632 done
7633 done
7634 IFS=$as_save_IFS
7638 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7639 if test -n "$ac_ct_RANLIB"; then
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7641 $as_echo "$ac_ct_RANLIB" >&6; }
7642 else
7643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7644 $as_echo "no" >&6; }
7647 if test "x$ac_ct_RANLIB" = x; then
7648 RANLIB=":"
7649 else
7650 case $cross_compiling:$ac_tool_warned in
7651 yes:)
7652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7653 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7654 ac_tool_warned=yes ;;
7655 esac
7656 RANLIB=$ac_ct_RANLIB
7658 else
7659 RANLIB="$ac_cv_prog_RANLIB"
7662 for ac_prog in 'bison -y' byacc
7664 # Extract the first word of "$ac_prog", so it can be a program name with args.
7665 set dummy $ac_prog; ac_word=$2
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7667 $as_echo_n "checking for $ac_word... " >&6; }
7668 if ${ac_cv_prog_YACC+:} false; then :
7669 $as_echo_n "(cached) " >&6
7670 else
7671 if test -n "$YACC"; then
7672 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7673 else
7674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7675 for as_dir in $PATH
7677 IFS=$as_save_IFS
7678 test -z "$as_dir" && as_dir=.
7679 for ac_exec_ext in '' $ac_executable_extensions; do
7680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7681 ac_cv_prog_YACC="$ac_prog"
7682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7683 break 2
7685 done
7686 done
7687 IFS=$as_save_IFS
7691 YACC=$ac_cv_prog_YACC
7692 if test -n "$YACC"; then
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7694 $as_echo "$YACC" >&6; }
7695 else
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697 $as_echo "no" >&6; }
7701 test -n "$YACC" && break
7702 done
7703 test -n "$YACC" || YACC="yacc"
7706 if test -n "$ac_tool_prefix"; then
7707 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7708 set dummy ${ac_tool_prefix}ar; ac_word=$2
7709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7710 $as_echo_n "checking for $ac_word... " >&6; }
7711 if ${ac_cv_prog_AR+:} false; then :
7712 $as_echo_n "(cached) " >&6
7713 else
7714 if test -n "$AR"; then
7715 ac_cv_prog_AR="$AR" # Let the user override the test.
7716 else
7717 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7718 for as_dir in $PATH
7720 IFS=$as_save_IFS
7721 test -z "$as_dir" && as_dir=.
7722 for ac_exec_ext in '' $ac_executable_extensions; do
7723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7724 ac_cv_prog_AR="${ac_tool_prefix}ar"
7725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7726 break 2
7728 done
7729 done
7730 IFS=$as_save_IFS
7734 AR=$ac_cv_prog_AR
7735 if test -n "$AR"; then
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7737 $as_echo "$AR" >&6; }
7738 else
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740 $as_echo "no" >&6; }
7745 if test -z "$ac_cv_prog_AR"; then
7746 ac_ct_AR=$AR
7747 # Extract the first word of "ar", so it can be a program name with args.
7748 set dummy ar; ac_word=$2
7749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7750 $as_echo_n "checking for $ac_word... " >&6; }
7751 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7752 $as_echo_n "(cached) " >&6
7753 else
7754 if test -n "$ac_ct_AR"; then
7755 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7756 else
7757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7758 for as_dir in $PATH
7760 IFS=$as_save_IFS
7761 test -z "$as_dir" && as_dir=.
7762 for ac_exec_ext in '' $ac_executable_extensions; do
7763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7764 ac_cv_prog_ac_ct_AR="ar"
7765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7766 break 2
7768 done
7769 done
7770 IFS=$as_save_IFS
7774 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7775 if test -n "$ac_ct_AR"; then
7776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7777 $as_echo "$ac_ct_AR" >&6; }
7778 else
7779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7780 $as_echo "no" >&6; }
7783 if test "x$ac_ct_AR" = x; then
7784 AR=""
7785 else
7786 case $cross_compiling:$ac_tool_warned in
7787 yes:)
7788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7789 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7790 ac_tool_warned=yes ;;
7791 esac
7792 AR=$ac_ct_AR
7794 else
7795 AR="$ac_cv_prog_AR"
7798 if test -n "$ac_tool_prefix"; then
7799 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7800 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7802 $as_echo_n "checking for $ac_word... " >&6; }
7803 if ${ac_cv_prog_DLLTOOL+:} false; then :
7804 $as_echo_n "(cached) " >&6
7805 else
7806 if test -n "$DLLTOOL"; then
7807 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7808 else
7809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7810 for as_dir in $PATH
7812 IFS=$as_save_IFS
7813 test -z "$as_dir" && as_dir=.
7814 for ac_exec_ext in '' $ac_executable_extensions; do
7815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7816 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7818 break 2
7820 done
7821 done
7822 IFS=$as_save_IFS
7826 DLLTOOL=$ac_cv_prog_DLLTOOL
7827 if test -n "$DLLTOOL"; then
7828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7829 $as_echo "$DLLTOOL" >&6; }
7830 else
7831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7832 $as_echo "no" >&6; }
7837 if test -z "$ac_cv_prog_DLLTOOL"; then
7838 ac_ct_DLLTOOL=$DLLTOOL
7839 # Extract the first word of "dlltool", so it can be a program name with args.
7840 set dummy dlltool; ac_word=$2
7841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7842 $as_echo_n "checking for $ac_word... " >&6; }
7843 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7844 $as_echo_n "(cached) " >&6
7845 else
7846 if test -n "$ac_ct_DLLTOOL"; then
7847 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7848 else
7849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7850 for as_dir in $PATH
7852 IFS=$as_save_IFS
7853 test -z "$as_dir" && as_dir=.
7854 for ac_exec_ext in '' $ac_executable_extensions; do
7855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7856 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7858 break 2
7860 done
7861 done
7862 IFS=$as_save_IFS
7866 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7867 if test -n "$ac_ct_DLLTOOL"; then
7868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7869 $as_echo "$ac_ct_DLLTOOL" >&6; }
7870 else
7871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872 $as_echo "no" >&6; }
7875 if test "x$ac_ct_DLLTOOL" = x; then
7876 DLLTOOL=""
7877 else
7878 case $cross_compiling:$ac_tool_warned in
7879 yes:)
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7881 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7882 ac_tool_warned=yes ;;
7883 esac
7884 DLLTOOL=$ac_ct_DLLTOOL
7886 else
7887 DLLTOOL="$ac_cv_prog_DLLTOOL"
7890 if test -n "$ac_tool_prefix"; then
7891 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7892 set dummy ${ac_tool_prefix}windres; ac_word=$2
7893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7894 $as_echo_n "checking for $ac_word... " >&6; }
7895 if ${ac_cv_prog_WINDRES+:} false; then :
7896 $as_echo_n "(cached) " >&6
7897 else
7898 if test -n "$WINDRES"; then
7899 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7900 else
7901 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7902 for as_dir in $PATH
7904 IFS=$as_save_IFS
7905 test -z "$as_dir" && as_dir=.
7906 for ac_exec_ext in '' $ac_executable_extensions; do
7907 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7908 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7909 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7910 break 2
7912 done
7913 done
7914 IFS=$as_save_IFS
7918 WINDRES=$ac_cv_prog_WINDRES
7919 if test -n "$WINDRES"; then
7920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7921 $as_echo "$WINDRES" >&6; }
7922 else
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7924 $as_echo "no" >&6; }
7929 if test -z "$ac_cv_prog_WINDRES"; then
7930 ac_ct_WINDRES=$WINDRES
7931 # Extract the first word of "windres", so it can be a program name with args.
7932 set dummy windres; ac_word=$2
7933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7934 $as_echo_n "checking for $ac_word... " >&6; }
7935 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7936 $as_echo_n "(cached) " >&6
7937 else
7938 if test -n "$ac_ct_WINDRES"; then
7939 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7940 else
7941 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7942 for as_dir in $PATH
7944 IFS=$as_save_IFS
7945 test -z "$as_dir" && as_dir=.
7946 for ac_exec_ext in '' $ac_executable_extensions; do
7947 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7948 ac_cv_prog_ac_ct_WINDRES="windres"
7949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7950 break 2
7952 done
7953 done
7954 IFS=$as_save_IFS
7958 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7959 if test -n "$ac_ct_WINDRES"; then
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7961 $as_echo "$ac_ct_WINDRES" >&6; }
7962 else
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7964 $as_echo "no" >&6; }
7967 if test "x$ac_ct_WINDRES" = x; then
7968 WINDRES=""
7969 else
7970 case $cross_compiling:$ac_tool_warned in
7971 yes:)
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7973 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7974 ac_tool_warned=yes ;;
7975 esac
7976 WINDRES=$ac_ct_WINDRES
7978 else
7979 WINDRES="$ac_cv_prog_WINDRES"
7983 case $host_os in
7984 gnu*)
7985 # Needed for GNU Hurd hosts.
7986 if test -n "$ac_tool_prefix"; then
7987 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7988 set dummy ${ac_tool_prefix}mig; ac_word=$2
7989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7990 $as_echo_n "checking for $ac_word... " >&6; }
7991 if ${ac_cv_prog_MIG+:} false; then :
7992 $as_echo_n "(cached) " >&6
7993 else
7994 if test -n "$MIG"; then
7995 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7996 else
7997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7998 for as_dir in $PATH
8000 IFS=$as_save_IFS
8001 test -z "$as_dir" && as_dir=.
8002 for ac_exec_ext in '' $ac_executable_extensions; do
8003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8004 ac_cv_prog_MIG="${ac_tool_prefix}mig"
8005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8006 break 2
8008 done
8009 done
8010 IFS=$as_save_IFS
8014 MIG=$ac_cv_prog_MIG
8015 if test -n "$MIG"; then
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
8017 $as_echo "$MIG" >&6; }
8018 else
8019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8020 $as_echo "no" >&6; }
8025 if test -z "$ac_cv_prog_MIG"; then
8026 ac_ct_MIG=$MIG
8027 # Extract the first word of "mig", so it can be a program name with args.
8028 set dummy mig; ac_word=$2
8029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8030 $as_echo_n "checking for $ac_word... " >&6; }
8031 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
8032 $as_echo_n "(cached) " >&6
8033 else
8034 if test -n "$ac_ct_MIG"; then
8035 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
8036 else
8037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8038 for as_dir in $PATH
8040 IFS=$as_save_IFS
8041 test -z "$as_dir" && as_dir=.
8042 for ac_exec_ext in '' $ac_executable_extensions; do
8043 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8044 ac_cv_prog_ac_ct_MIG="mig"
8045 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8046 break 2
8048 done
8049 done
8050 IFS=$as_save_IFS
8054 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
8055 if test -n "$ac_ct_MIG"; then
8056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
8057 $as_echo "$ac_ct_MIG" >&6; }
8058 else
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8060 $as_echo "no" >&6; }
8063 if test "x$ac_ct_MIG" = x; then
8064 MIG=""
8065 else
8066 case $cross_compiling:$ac_tool_warned in
8067 yes:)
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8069 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8070 ac_tool_warned=yes ;;
8071 esac
8072 MIG=$ac_ct_MIG
8074 else
8075 MIG="$ac_cv_prog_MIG"
8078 if test x"$MIG" = x; then
8079 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
8082 esac
8084 # ---------------------- #
8085 # Checks for libraries. #
8086 # ---------------------- #
8088 # We might need to link with -lm; most simulators need it.
8089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
8090 $as_echo_n "checking for main in -lm... " >&6; }
8091 if ${ac_cv_lib_m_main+:} false; then :
8092 $as_echo_n "(cached) " >&6
8093 else
8094 ac_check_lib_save_LIBS=$LIBS
8095 LIBS="-lm $LIBS"
8096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8097 /* end confdefs.h. */
8101 main ()
8103 return main ();
8105 return 0;
8107 _ACEOF
8108 if ac_fn_c_try_link "$LINENO"; then :
8109 ac_cv_lib_m_main=yes
8110 else
8111 ac_cv_lib_m_main=no
8113 rm -f core conftest.err conftest.$ac_objext \
8114 conftest$ac_exeext conftest.$ac_ext
8115 LIBS=$ac_check_lib_save_LIBS
8117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
8118 $as_echo "$ac_cv_lib_m_main" >&6; }
8119 if test "x$ac_cv_lib_m_main" = xyes; then :
8120 cat >>confdefs.h <<_ACEOF
8121 #define HAVE_LIBM 1
8122 _ACEOF
8124 LIBS="-lm $LIBS"
8129 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
8131 $as_echo_n "checking for library containing gethostbyname... " >&6; }
8132 if ${ac_cv_search_gethostbyname+:} false; then :
8133 $as_echo_n "(cached) " >&6
8134 else
8135 ac_func_search_save_LIBS=$LIBS
8136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8137 /* end confdefs.h. */
8139 /* Override any GCC internal prototype to avoid an error.
8140 Use char because int might match the return type of a GCC
8141 builtin and then its argument prototype would still apply. */
8142 #ifdef __cplusplus
8143 extern "C"
8144 #endif
8145 char gethostbyname ();
8147 main ()
8149 return gethostbyname ();
8151 return 0;
8153 _ACEOF
8154 for ac_lib in '' nsl; do
8155 if test -z "$ac_lib"; then
8156 ac_res="none required"
8157 else
8158 ac_res=-l$ac_lib
8159 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8161 if ac_fn_c_try_link "$LINENO"; then :
8162 ac_cv_search_gethostbyname=$ac_res
8164 rm -f core conftest.err conftest.$ac_objext \
8165 conftest$ac_exeext
8166 if ${ac_cv_search_gethostbyname+:} false; then :
8167 break
8169 done
8170 if ${ac_cv_search_gethostbyname+:} false; then :
8172 else
8173 ac_cv_search_gethostbyname=no
8175 rm conftest.$ac_ext
8176 LIBS=$ac_func_search_save_LIBS
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
8179 $as_echo "$ac_cv_search_gethostbyname" >&6; }
8180 ac_res=$ac_cv_search_gethostbyname
8181 if test "$ac_res" != no; then :
8182 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8187 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
8188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
8189 $as_echo_n "checking for library containing socketpair... " >&6; }
8190 if ${ac_cv_search_socketpair+:} false; then :
8191 $as_echo_n "(cached) " >&6
8192 else
8193 ac_func_search_save_LIBS=$LIBS
8194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8195 /* end confdefs.h. */
8197 /* Override any GCC internal prototype to avoid an error.
8198 Use char because int might match the return type of a GCC
8199 builtin and then its argument prototype would still apply. */
8200 #ifdef __cplusplus
8201 extern "C"
8202 #endif
8203 char socketpair ();
8205 main ()
8207 return socketpair ();
8209 return 0;
8211 _ACEOF
8212 for ac_lib in '' socket; do
8213 if test -z "$ac_lib"; then
8214 ac_res="none required"
8215 else
8216 ac_res=-l$ac_lib
8217 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8219 if ac_fn_c_try_link "$LINENO"; then :
8220 ac_cv_search_socketpair=$ac_res
8222 rm -f core conftest.err conftest.$ac_objext \
8223 conftest$ac_exeext
8224 if ${ac_cv_search_socketpair+:} false; then :
8225 break
8227 done
8228 if ${ac_cv_search_socketpair+:} false; then :
8230 else
8231 ac_cv_search_socketpair=no
8233 rm conftest.$ac_ext
8234 LIBS=$ac_func_search_save_LIBS
8236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
8237 $as_echo "$ac_cv_search_socketpair" >&6; }
8238 ac_res=$ac_cv_search_socketpair
8239 if test "$ac_res" != no; then :
8240 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8245 # Link in zlib if we can. This allows us to read compressed debug sections.
8247 # Use the system's zlib library.
8248 zlibdir="-L\$(top_builddir)/../zlib"
8249 zlibinc="-I\$(top_srcdir)/../zlib"
8251 # Check whether --with-system-zlib was given.
8252 if test "${with_system_zlib+set}" = set; then :
8253 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
8254 zlibdir=
8255 zlibinc=
8265 if test "X$prefix" = "XNONE"; then
8266 acl_final_prefix="$ac_default_prefix"
8267 else
8268 acl_final_prefix="$prefix"
8270 if test "X$exec_prefix" = "XNONE"; then
8271 acl_final_exec_prefix='${prefix}'
8272 else
8273 acl_final_exec_prefix="$exec_prefix"
8275 acl_save_prefix="$prefix"
8276 prefix="$acl_final_prefix"
8277 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8278 prefix="$acl_save_prefix"
8281 # Check whether --with-gnu-ld was given.
8282 if test "${with_gnu_ld+set}" = set; then :
8283 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8284 else
8285 with_gnu_ld=no
8288 # Prepare PATH_SEPARATOR.
8289 # The user is always right.
8290 if test "${PATH_SEPARATOR+set}" != set; then
8291 echo "#! /bin/sh" >conf$$.sh
8292 echo "exit 0" >>conf$$.sh
8293 chmod +x conf$$.sh
8294 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8295 PATH_SEPARATOR=';'
8296 else
8297 PATH_SEPARATOR=:
8299 rm -f conf$$.sh
8301 ac_prog=ld
8302 if test "$GCC" = yes; then
8303 # Check if gcc -print-prog-name=ld gives a path.
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8305 $as_echo_n "checking for ld used by GCC... " >&6; }
8306 case $host in
8307 *-*-mingw*)
8308 # gcc leaves a trailing carriage return which upsets mingw
8309 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8311 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8312 esac
8313 case $ac_prog in
8314 # Accept absolute paths.
8315 [\\/]* | [A-Za-z]:[\\/]*)
8316 re_direlt='/[^/][^/]*/\.\./'
8317 # Canonicalize the path of ld
8318 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8319 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8320 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8321 done
8322 test -z "$LD" && LD="$ac_prog"
8325 # If it fails, then pretend we aren't using GCC.
8326 ac_prog=ld
8329 # If it is relative, then search for the first ld in PATH.
8330 with_gnu_ld=unknown
8332 esac
8333 elif test "$with_gnu_ld" = yes; then
8334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8335 $as_echo_n "checking for GNU ld... " >&6; }
8336 else
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8338 $as_echo_n "checking for non-GNU ld... " >&6; }
8340 if ${acl_cv_path_LD+:} false; then :
8341 $as_echo_n "(cached) " >&6
8342 else
8343 if test -z "$LD"; then
8344 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8345 for ac_dir in $PATH; do
8346 test -z "$ac_dir" && ac_dir=.
8347 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8348 acl_cv_path_LD="$ac_dir/$ac_prog"
8349 # Check to see if the program is GNU ld. I'd rather use --version,
8350 # but apparently some GNU ld's only accept -v.
8351 # Break only if it was the GNU/non-GNU ld that we prefer.
8352 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8353 test "$with_gnu_ld" != no && break
8354 else
8355 test "$with_gnu_ld" != yes && break
8358 done
8359 IFS="$ac_save_ifs"
8360 else
8361 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8365 LD="$acl_cv_path_LD"
8366 if test -n "$LD"; then
8367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8368 $as_echo "$LD" >&6; }
8369 else
8370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8371 $as_echo "no" >&6; }
8373 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8375 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8376 if ${acl_cv_prog_gnu_ld+:} false; then :
8377 $as_echo_n "(cached) " >&6
8378 else
8379 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8380 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8381 acl_cv_prog_gnu_ld=yes
8382 else
8383 acl_cv_prog_gnu_ld=no
8386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8387 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8388 with_gnu_ld=$acl_cv_prog_gnu_ld
8392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8393 $as_echo_n "checking for shared library run path origin... " >&6; }
8394 if ${acl_cv_rpath+:} false; then :
8395 $as_echo_n "(cached) " >&6
8396 else
8398 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8399 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8400 . ./conftest.sh
8401 rm -f ./conftest.sh
8402 acl_cv_rpath=done
8405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8406 $as_echo "$acl_cv_rpath" >&6; }
8407 wl="$acl_cv_wl"
8408 libext="$acl_cv_libext"
8409 shlibext="$acl_cv_shlibext"
8410 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8411 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8412 hardcode_direct="$acl_cv_hardcode_direct"
8413 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8414 # Check whether --enable-rpath was given.
8415 if test "${enable_rpath+set}" = set; then :
8416 enableval=$enable_rpath; :
8417 else
8418 enable_rpath=yes
8428 use_additional=yes
8430 acl_save_prefix="$prefix"
8431 prefix="$acl_final_prefix"
8432 acl_save_exec_prefix="$exec_prefix"
8433 exec_prefix="$acl_final_exec_prefix"
8435 eval additional_includedir=\"$includedir\"
8436 eval additional_libdir=\"$libdir\"
8438 exec_prefix="$acl_save_exec_prefix"
8439 prefix="$acl_save_prefix"
8442 # Check whether --with-libiconv-prefix was given.
8443 if test "${with_libiconv_prefix+set}" = set; then :
8444 withval=$with_libiconv_prefix;
8445 if test "X$withval" = "Xno"; then
8446 use_additional=no
8447 else
8448 if test "X$withval" = "X"; then
8450 acl_save_prefix="$prefix"
8451 prefix="$acl_final_prefix"
8452 acl_save_exec_prefix="$exec_prefix"
8453 exec_prefix="$acl_final_exec_prefix"
8455 eval additional_includedir=\"$includedir\"
8456 eval additional_libdir=\"$libdir\"
8458 exec_prefix="$acl_save_exec_prefix"
8459 prefix="$acl_save_prefix"
8461 else
8462 additional_includedir="$withval/include"
8463 additional_libdir="$withval/lib"
8470 # Check whether --with-libiconv-type was given.
8471 if test "${with_libiconv_type+set}" = set; then :
8472 withval=$with_libiconv_type; with_libiconv_type=$withval
8473 else
8474 with_libiconv_type=auto
8477 lib_type=`eval echo \$with_libiconv_type`
8479 LIBICONV=
8480 LTLIBICONV=
8481 INCICONV=
8482 rpathdirs=
8483 ltrpathdirs=
8484 names_already_handled=
8485 names_next_round='iconv '
8486 while test -n "$names_next_round"; do
8487 names_this_round="$names_next_round"
8488 names_next_round=
8489 for name in $names_this_round; do
8490 already_handled=
8491 for n in $names_already_handled; do
8492 if test "$n" = "$name"; then
8493 already_handled=yes
8494 break
8496 done
8497 if test -z "$already_handled"; then
8498 names_already_handled="$names_already_handled $name"
8499 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8500 eval value=\"\$HAVE_LIB$uppername\"
8501 if test -n "$value"; then
8502 if test "$value" = yes; then
8503 eval value=\"\$LIB$uppername\"
8504 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8505 eval value=\"\$LTLIB$uppername\"
8506 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8507 else
8510 else
8511 found_dir=
8512 found_la=
8513 found_so=
8514 found_a=
8515 if test $use_additional = yes; then
8516 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8517 found_dir="$additional_libdir"
8518 found_so="$additional_libdir/lib$name.$shlibext"
8519 if test -f "$additional_libdir/lib$name.la"; then
8520 found_la="$additional_libdir/lib$name.la"
8522 elif test x$lib_type != xshared; then
8523 if test -f "$additional_libdir/lib$name.$libext"; then
8524 found_dir="$additional_libdir"
8525 found_a="$additional_libdir/lib$name.$libext"
8526 if test -f "$additional_libdir/lib$name.la"; then
8527 found_la="$additional_libdir/lib$name.la"
8532 if test "X$found_dir" = "X"; then
8533 for x in $LDFLAGS $LTLIBICONV; do
8535 acl_save_prefix="$prefix"
8536 prefix="$acl_final_prefix"
8537 acl_save_exec_prefix="$exec_prefix"
8538 exec_prefix="$acl_final_exec_prefix"
8539 eval x=\"$x\"
8540 exec_prefix="$acl_save_exec_prefix"
8541 prefix="$acl_save_prefix"
8543 case "$x" in
8544 -L*)
8545 dir=`echo "X$x" | sed -e 's/^X-L//'`
8546 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
8547 found_dir="$dir"
8548 found_so="$dir/lib$name.$shlibext"
8549 if test -f "$dir/lib$name.la"; then
8550 found_la="$dir/lib$name.la"
8552 elif test x$lib_type != xshared; then
8553 if test -f "$dir/lib$name.$libext"; then
8554 found_dir="$dir"
8555 found_a="$dir/lib$name.$libext"
8556 if test -f "$dir/lib$name.la"; then
8557 found_la="$dir/lib$name.la"
8562 esac
8563 if test "X$found_dir" != "X"; then
8564 break
8566 done
8568 if test "X$found_dir" != "X"; then
8569 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8570 if test "X$found_so" != "X"; then
8571 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8572 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8573 else
8574 haveit=
8575 for x in $ltrpathdirs; do
8576 if test "X$x" = "X$found_dir"; then
8577 haveit=yes
8578 break
8580 done
8581 if test -z "$haveit"; then
8582 ltrpathdirs="$ltrpathdirs $found_dir"
8584 if test "$hardcode_direct" = yes; then
8585 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8586 else
8587 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8588 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8589 haveit=
8590 for x in $rpathdirs; do
8591 if test "X$x" = "X$found_dir"; then
8592 haveit=yes
8593 break
8595 done
8596 if test -z "$haveit"; then
8597 rpathdirs="$rpathdirs $found_dir"
8599 else
8600 haveit=
8601 for x in $LDFLAGS $LIBICONV; do
8603 acl_save_prefix="$prefix"
8604 prefix="$acl_final_prefix"
8605 acl_save_exec_prefix="$exec_prefix"
8606 exec_prefix="$acl_final_exec_prefix"
8607 eval x=\"$x\"
8608 exec_prefix="$acl_save_exec_prefix"
8609 prefix="$acl_save_prefix"
8611 if test "X$x" = "X-L$found_dir"; then
8612 haveit=yes
8613 break
8615 done
8616 if test -z "$haveit"; then
8617 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8619 if test "$hardcode_minus_L" != no; then
8620 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8621 else
8622 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8627 else
8628 if test "X$found_a" != "X"; then
8629 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8630 else
8631 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8634 additional_includedir=
8635 case "$found_dir" in
8636 */lib | */lib/)
8637 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8638 additional_includedir="$basedir/include"
8640 esac
8641 if test "X$additional_includedir" != "X"; then
8642 if test "X$additional_includedir" != "X/usr/include"; then
8643 haveit=
8644 if test "X$additional_includedir" = "X/usr/local/include"; then
8645 if test -n "$GCC"; then
8646 case $host_os in
8647 linux*) haveit=yes;;
8648 esac
8651 if test -z "$haveit"; then
8652 for x in $CPPFLAGS $INCICONV; do
8654 acl_save_prefix="$prefix"
8655 prefix="$acl_final_prefix"
8656 acl_save_exec_prefix="$exec_prefix"
8657 exec_prefix="$acl_final_exec_prefix"
8658 eval x=\"$x\"
8659 exec_prefix="$acl_save_exec_prefix"
8660 prefix="$acl_save_prefix"
8662 if test "X$x" = "X-I$additional_includedir"; then
8663 haveit=yes
8664 break
8666 done
8667 if test -z "$haveit"; then
8668 if test -d "$additional_includedir"; then
8669 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8675 if test -n "$found_la"; then
8676 save_libdir="$libdir"
8677 case "$found_la" in
8678 */* | *\\*) . "$found_la" ;;
8679 *) . "./$found_la" ;;
8680 esac
8681 libdir="$save_libdir"
8682 for dep in $dependency_libs; do
8683 case "$dep" in
8684 -L*)
8685 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8686 if test "X$additional_libdir" != "X/usr/lib"; then
8687 haveit=
8688 if test "X$additional_libdir" = "X/usr/local/lib"; then
8689 if test -n "$GCC"; then
8690 case $host_os in
8691 linux*) haveit=yes;;
8692 esac
8695 if test -z "$haveit"; then
8696 haveit=
8697 for x in $LDFLAGS $LIBICONV; do
8699 acl_save_prefix="$prefix"
8700 prefix="$acl_final_prefix"
8701 acl_save_exec_prefix="$exec_prefix"
8702 exec_prefix="$acl_final_exec_prefix"
8703 eval x=\"$x\"
8704 exec_prefix="$acl_save_exec_prefix"
8705 prefix="$acl_save_prefix"
8707 if test "X$x" = "X-L$additional_libdir"; then
8708 haveit=yes
8709 break
8711 done
8712 if test -z "$haveit"; then
8713 if test -d "$additional_libdir"; then
8714 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8717 haveit=
8718 for x in $LDFLAGS $LTLIBICONV; do
8720 acl_save_prefix="$prefix"
8721 prefix="$acl_final_prefix"
8722 acl_save_exec_prefix="$exec_prefix"
8723 exec_prefix="$acl_final_exec_prefix"
8724 eval x=\"$x\"
8725 exec_prefix="$acl_save_exec_prefix"
8726 prefix="$acl_save_prefix"
8728 if test "X$x" = "X-L$additional_libdir"; then
8729 haveit=yes
8730 break
8732 done
8733 if test -z "$haveit"; then
8734 if test -d "$additional_libdir"; then
8735 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8741 -R*)
8742 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8743 if test "$enable_rpath" != no; then
8744 haveit=
8745 for x in $rpathdirs; do
8746 if test "X$x" = "X$dir"; then
8747 haveit=yes
8748 break
8750 done
8751 if test -z "$haveit"; then
8752 rpathdirs="$rpathdirs $dir"
8754 haveit=
8755 for x in $ltrpathdirs; do
8756 if test "X$x" = "X$dir"; then
8757 haveit=yes
8758 break
8760 done
8761 if test -z "$haveit"; then
8762 ltrpathdirs="$ltrpathdirs $dir"
8766 -l*)
8767 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8769 *.la)
8770 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8773 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8774 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8776 esac
8777 done
8779 else
8780 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
8781 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8782 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8783 else
8784 LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext"
8785 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext"
8790 done
8791 done
8792 if test "X$rpathdirs" != "X"; then
8793 if test -n "$hardcode_libdir_separator"; then
8794 alldirs=
8795 for found_dir in $rpathdirs; do
8796 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8797 done
8798 acl_save_libdir="$libdir"
8799 libdir="$alldirs"
8800 eval flag=\"$hardcode_libdir_flag_spec\"
8801 libdir="$acl_save_libdir"
8802 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8803 else
8804 for found_dir in $rpathdirs; do
8805 acl_save_libdir="$libdir"
8806 libdir="$found_dir"
8807 eval flag=\"$hardcode_libdir_flag_spec\"
8808 libdir="$acl_save_libdir"
8809 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8810 done
8813 if test "X$ltrpathdirs" != "X"; then
8814 for found_dir in $ltrpathdirs; do
8815 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8816 done
8825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8826 $as_echo_n "checking for iconv... " >&6; }
8827 if ${am_cv_func_iconv+:} false; then :
8828 $as_echo_n "(cached) " >&6
8829 else
8831 am_cv_func_iconv="no, consider installing GNU libiconv"
8832 am_cv_lib_iconv=no
8833 am_save_CPPFLAGS="$CPPFLAGS"
8834 CPPFLAGS="$CPPFLAGS $INCICONV"
8835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8836 /* end confdefs.h. */
8837 #include <stdlib.h>
8838 #include <iconv.h>
8840 main ()
8842 iconv_t cd = iconv_open("","");
8843 iconv(cd,NULL,NULL,NULL,NULL);
8844 iconv_close(cd);
8846 return 0;
8848 _ACEOF
8849 if ac_fn_c_try_link "$LINENO"; then :
8850 am_cv_func_iconv=yes
8852 rm -f core conftest.err conftest.$ac_objext \
8853 conftest$ac_exeext conftest.$ac_ext
8854 CPPFLAGS="$am_save_CPPFLAGS"
8856 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8857 for _libs in .libs _libs; do
8858 am_save_CPPFLAGS="$CPPFLAGS"
8859 am_save_LIBS="$LIBS"
8860 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8861 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8863 /* end confdefs.h. */
8864 #include <stdlib.h>
8865 #include <iconv.h>
8867 main ()
8869 iconv_t cd = iconv_open("","");
8870 iconv(cd,NULL,NULL,NULL,NULL);
8871 iconv_close(cd);
8873 return 0;
8875 _ACEOF
8876 if ac_fn_c_try_link "$LINENO"; then :
8877 INCICONV="-I../libiconv/include"
8878 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8879 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8880 am_cv_lib_iconv=yes
8881 am_cv_func_iconv=yes
8883 rm -f core conftest.err conftest.$ac_objext \
8884 conftest$ac_exeext conftest.$ac_ext
8885 CPPFLAGS="$am_save_CPPFLAGS"
8886 LIBS="$am_save_LIBS"
8887 if test "$am_cv_func_iconv" = "yes"; then
8888 break
8890 done
8893 if test "$am_cv_func_iconv" != yes; then
8894 am_save_CPPFLAGS="$CPPFLAGS"
8895 am_save_LIBS="$LIBS"
8896 CPPFLAGS="$CPPFLAGS $INCICONV"
8897 LIBS="$LIBS $LIBICONV"
8898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8899 /* end confdefs.h. */
8900 #include <stdlib.h>
8901 #include <iconv.h>
8903 main ()
8905 iconv_t cd = iconv_open("","");
8906 iconv(cd,NULL,NULL,NULL,NULL);
8907 iconv_close(cd);
8909 return 0;
8911 _ACEOF
8912 if ac_fn_c_try_link "$LINENO"; then :
8913 am_cv_lib_iconv=yes
8914 am_cv_func_iconv=yes
8916 rm -f core conftest.err conftest.$ac_objext \
8917 conftest$ac_exeext conftest.$ac_ext
8918 CPPFLAGS="$am_save_CPPFLAGS"
8919 LIBS="$am_save_LIBS"
8923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8924 $as_echo "$am_cv_func_iconv" >&6; }
8925 if test "$am_cv_func_iconv" = yes; then
8927 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8930 if test "$am_cv_lib_iconv" = yes; then
8932 for element in $INCICONV; do
8933 haveit=
8934 for x in $CPPFLAGS; do
8936 acl_save_prefix="$prefix"
8937 prefix="$acl_final_prefix"
8938 acl_save_exec_prefix="$exec_prefix"
8939 exec_prefix="$acl_final_exec_prefix"
8940 eval x=\"$x\"
8941 exec_prefix="$acl_save_exec_prefix"
8942 prefix="$acl_save_prefix"
8944 if test "X$x" = "X$element"; then
8945 haveit=yes
8946 break
8948 done
8949 if test -z "$haveit"; then
8950 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8952 done
8954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8955 $as_echo_n "checking how to link with libiconv... " >&6; }
8956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8957 $as_echo "$LIBICONV" >&6; }
8958 else
8959 LIBICONV=
8960 LTLIBICONV=
8965 if test "$am_cv_func_iconv" = yes; then
8966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8967 $as_echo_n "checking for iconv declaration... " >&6; }
8968 if ${am_cv_proto_iconv+:} false; then :
8969 $as_echo_n "(cached) " >&6
8970 else
8972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8973 /* end confdefs.h. */
8975 #include <stdlib.h>
8976 #include <iconv.h>
8977 extern
8978 #ifdef __cplusplus
8980 #endif
8981 #if defined(__STDC__) || defined(__cplusplus)
8982 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8983 #else
8984 size_t iconv();
8985 #endif
8988 main ()
8992 return 0;
8994 _ACEOF
8995 if ac_fn_c_try_compile "$LINENO"; then :
8996 am_cv_proto_iconv_arg1=""
8997 else
8998 am_cv_proto_iconv_arg1="const"
9000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9001 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);"
9004 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
9005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
9006 }$am_cv_proto_iconv" >&5
9007 $as_echo "${ac_t:-
9008 }$am_cv_proto_iconv" >&6; }
9010 cat >>confdefs.h <<_ACEOF
9011 #define ICONV_CONST $am_cv_proto_iconv_arg1
9012 _ACEOF
9017 # GDB may fork/exec the iconv program to get the list of supported character
9018 # sets. Allow the user to specify where to find it.
9019 # There are several factors affecting the choice of option name:
9020 # - There is already --with-libiconv-prefix but we can't use it, it specifies
9021 # the build-time location of libiconv files.
9022 # - The program we need to find is iconv, which comes with glibc. The user
9023 # doesn't necessarily have libiconv installed. Therefore naming this
9024 # --with-libiconv-foo feels wrong.
9025 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
9026 # defined to work on directories not files (though it really doesn't know
9027 # the difference).
9028 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
9029 # with --with-libiconv-prefix.
9030 # Putting these together is why the option name is --with-iconv-bin.
9033 # Check whether --with-iconv-bin was given.
9034 if test "${with_iconv_bin+set}" = set; then :
9035 withval=$with_iconv_bin; iconv_bin="${withval}"
9037 cat >>confdefs.h <<_ACEOF
9038 #define ICONV_BIN "${iconv_bin}"
9039 _ACEOF
9042 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9043 if test "x$prefix" = xNONE; then
9044 test_prefix=/usr/local
9045 else
9046 test_prefix=$prefix
9048 else
9049 test_prefix=$exec_prefix
9051 value=0
9052 case ${iconv_bin} in
9053 "${test_prefix}"|"${test_prefix}/"*|\
9054 '${exec_prefix}'|'${exec_prefix}/'*)
9055 value=1
9057 esac
9059 cat >>confdefs.h <<_ACEOF
9060 #define ICONV_BIN_RELOCATABLE $value
9061 _ACEOF
9068 # For the TUI, we need enhanced curses functionality.
9069 if test x"$enable_tui" != xno; then
9070 prefer_curses=yes
9073 curses_found=no
9074 if test x"$prefer_curses" = xyes; then
9075 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
9076 # curses library because the latter might not provide all the
9077 # functionality we need. However, this leads to problems on systems
9078 # where the linker searches /usr/local/lib, but the compiler doesn't
9079 # search /usr/local/include, if ncurses is installed in /usr/local. A
9080 # default installation of ncurses on alpha*-dec-osf* will lead to such
9081 # a situation.
9082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
9083 $as_echo_n "checking for library containing waddstr... " >&6; }
9084 if ${ac_cv_search_waddstr+:} false; then :
9085 $as_echo_n "(cached) " >&6
9086 else
9087 ac_func_search_save_LIBS=$LIBS
9088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9089 /* end confdefs.h. */
9091 /* Override any GCC internal prototype to avoid an error.
9092 Use char because int might match the return type of a GCC
9093 builtin and then its argument prototype would still apply. */
9094 #ifdef __cplusplus
9095 extern "C"
9096 #endif
9097 char waddstr ();
9099 main ()
9101 return waddstr ();
9103 return 0;
9105 _ACEOF
9106 for ac_lib in '' ncursesw ncurses cursesX curses; do
9107 if test -z "$ac_lib"; then
9108 ac_res="none required"
9109 else
9110 ac_res=-l$ac_lib
9111 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9113 if ac_fn_c_try_link "$LINENO"; then :
9114 ac_cv_search_waddstr=$ac_res
9116 rm -f core conftest.err conftest.$ac_objext \
9117 conftest$ac_exeext
9118 if ${ac_cv_search_waddstr+:} false; then :
9119 break
9121 done
9122 if ${ac_cv_search_waddstr+:} false; then :
9124 else
9125 ac_cv_search_waddstr=no
9127 rm conftest.$ac_ext
9128 LIBS=$ac_func_search_save_LIBS
9130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
9131 $as_echo "$ac_cv_search_waddstr" >&6; }
9132 ac_res=$ac_cv_search_waddstr
9133 if test "$ac_res" != no; then :
9134 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9139 if test "$ac_cv_search_waddstr" != no; then
9140 curses_found=yes
9144 # Check whether we should enable the TUI, but only do so if we really
9145 # can.
9146 if test x"$enable_tui" != xno; then
9147 if test -d "$srcdir/tui"; then
9148 if test "$curses_found" != no; then
9149 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
9150 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
9151 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
9152 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
9153 else
9154 if test x"$enable_tui" = xyes; then
9155 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
9156 else
9157 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
9158 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
9164 # Since GDB uses Readline, we need termcap functionality. In many
9165 # cases this will be provided by the curses library, but some systems
9166 # have a separate termcap library, or no curses library at all.
9168 case $host_os in
9169 cygwin*)
9170 if test -d "$srcdir/libtermcap"; then
9171 LIBS="../libtermcap/libtermcap.a $LIBS"
9172 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
9173 fi ;;
9174 go32* | *djgpp*)
9175 ac_cv_search_tgetent="none required"
9177 esac
9179 # These are the libraries checked by Readline.
9180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
9181 $as_echo_n "checking for library containing tgetent... " >&6; }
9182 if ${ac_cv_search_tgetent+:} false; then :
9183 $as_echo_n "(cached) " >&6
9184 else
9185 ac_func_search_save_LIBS=$LIBS
9186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9187 /* end confdefs.h. */
9189 /* Override any GCC internal prototype to avoid an error.
9190 Use char because int might match the return type of a GCC
9191 builtin and then its argument prototype would still apply. */
9192 #ifdef __cplusplus
9193 extern "C"
9194 #endif
9195 char tgetent ();
9197 main ()
9199 return tgetent ();
9201 return 0;
9203 _ACEOF
9204 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
9205 if test -z "$ac_lib"; then
9206 ac_res="none required"
9207 else
9208 ac_res=-l$ac_lib
9209 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9211 if ac_fn_c_try_link "$LINENO"; then :
9212 ac_cv_search_tgetent=$ac_res
9214 rm -f core conftest.err conftest.$ac_objext \
9215 conftest$ac_exeext
9216 if ${ac_cv_search_tgetent+:} false; then :
9217 break
9219 done
9220 if ${ac_cv_search_tgetent+:} false; then :
9222 else
9223 ac_cv_search_tgetent=no
9225 rm conftest.$ac_ext
9226 LIBS=$ac_func_search_save_LIBS
9228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
9229 $as_echo "$ac_cv_search_tgetent" >&6; }
9230 ac_res=$ac_cv_search_tgetent
9231 if test "$ac_res" != no; then :
9232 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9237 if test "$ac_cv_search_tgetent" = no; then
9238 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
9242 # Check whether --with-system-readline was given.
9243 if test "${with_system_readline+set}" = set; then :
9244 withval=$with_system_readline;
9248 if test "$with_system_readline" = yes; then
9249 for ac_header in readline/readline.h
9250 do :
9251 ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default"
9252 if test "x$ac_cv_header_readline_readline_h" = xyes; then :
9253 cat >>confdefs.h <<_ACEOF
9254 #define HAVE_READLINE_READLINE_H 1
9255 _ACEOF
9256 readline_h=yes
9257 else
9258 readline_h=no
9261 done
9263 if test "$readline_h" = "no"; then
9264 as_fn_error $? "readline development packages are probably missing" "$LINENO" 5
9266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
9267 $as_echo_n "checking whether system readline is new enough... " >&6; }
9268 if ${gdb_cv_readline_ok+:} false; then :
9269 $as_echo_n "(cached) " >&6
9270 else
9271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9272 /* end confdefs.h. */
9273 #include <stdio.h>
9274 #include <readline/readline.h>
9276 main ()
9278 #if RL_VERSION_MAJOR < 7
9279 # error "readline version 7 required"
9280 #endif
9283 return 0;
9285 _ACEOF
9286 if ac_fn_c_try_compile "$LINENO"; then :
9287 gdb_cv_readline_ok=yes
9288 else
9289 gdb_cv_readline_ok=no
9292 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
9296 $as_echo "$gdb_cv_readline_ok" >&6; }
9297 if test "$gdb_cv_readline_ok" != yes; then
9298 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9301 READLINE=-lreadline
9302 READLINE_DEPS=
9303 READLINE_CFLAGS=
9304 READLINE_TEXI_INCFLAG=
9305 else
9306 READLINE='$(READLINE_DIR)/libreadline.a'
9307 READLINE_DEPS='$(READLINE)'
9308 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9309 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9316 # Generate jit-reader.h
9318 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9319 TARGET_PTR=
9321 # The cast to long int works around a bug in the HP C Compiler
9322 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9323 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9324 # This bug is HP SR number 8606223364.
9325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9326 $as_echo_n "checking size of unsigned long long... " >&6; }
9327 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9328 $as_echo_n "(cached) " >&6
9329 else
9330 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9332 else
9333 if test "$ac_cv_type_unsigned_long_long" = yes; then
9334 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9335 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9336 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9337 See \`config.log' for more details" "$LINENO" 5; }
9338 else
9339 ac_cv_sizeof_unsigned_long_long=0
9344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9345 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9349 cat >>confdefs.h <<_ACEOF
9350 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9351 _ACEOF
9354 # The cast to long int works around a bug in the HP C Compiler
9355 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9356 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9357 # This bug is HP SR number 8606223364.
9358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9359 $as_echo_n "checking size of unsigned long... " >&6; }
9360 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9361 $as_echo_n "(cached) " >&6
9362 else
9363 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9365 else
9366 if test "$ac_cv_type_unsigned_long" = yes; then
9367 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9368 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9369 as_fn_error 77 "cannot compute sizeof (unsigned long)
9370 See \`config.log' for more details" "$LINENO" 5; }
9371 else
9372 ac_cv_sizeof_unsigned_long=0
9377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9378 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9382 cat >>confdefs.h <<_ACEOF
9383 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9384 _ACEOF
9387 # The cast to long int works around a bug in the HP C Compiler
9388 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9389 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9390 # This bug is HP SR number 8606223364.
9391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9392 $as_echo_n "checking size of unsigned __int128... " >&6; }
9393 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9394 $as_echo_n "(cached) " >&6
9395 else
9396 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9398 else
9399 if test "$ac_cv_type_unsigned___int128" = yes; then
9400 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9401 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9402 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9403 See \`config.log' for more details" "$LINENO" 5; }
9404 else
9405 ac_cv_sizeof_unsigned___int128=0
9410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9411 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9415 cat >>confdefs.h <<_ACEOF
9416 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9417 _ACEOF
9421 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9422 TARGET_PTR="unsigned long"
9423 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9424 TARGET_PTR="unsigned long long"
9425 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9426 TARGET_PTR="unsigned __int128"
9427 else
9428 TARGET_PTR="unsigned long"
9432 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9435 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9436 $as_echo_n "checking for library containing dlopen... " >&6; }
9437 if ${ac_cv_search_dlopen+:} false; then :
9438 $as_echo_n "(cached) " >&6
9439 else
9440 ac_func_search_save_LIBS=$LIBS
9441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9442 /* end confdefs.h. */
9444 /* Override any GCC internal prototype to avoid an error.
9445 Use char because int might match the return type of a GCC
9446 builtin and then its argument prototype would still apply. */
9447 #ifdef __cplusplus
9448 extern "C"
9449 #endif
9450 char dlopen ();
9452 main ()
9454 return dlopen ();
9456 return 0;
9458 _ACEOF
9459 for ac_lib in '' dl; do
9460 if test -z "$ac_lib"; then
9461 ac_res="none required"
9462 else
9463 ac_res=-l$ac_lib
9464 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9466 if ac_fn_c_try_link "$LINENO"; then :
9467 ac_cv_search_dlopen=$ac_res
9469 rm -f core conftest.err conftest.$ac_objext \
9470 conftest$ac_exeext
9471 if ${ac_cv_search_dlopen+:} false; then :
9472 break
9474 done
9475 if ${ac_cv_search_dlopen+:} false; then :
9477 else
9478 ac_cv_search_dlopen=no
9480 rm conftest.$ac_ext
9481 LIBS=$ac_func_search_save_LIBS
9483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9484 $as_echo "$ac_cv_search_dlopen" >&6; }
9485 ac_res=$ac_cv_search_dlopen
9486 if test "$ac_res" != no; then :
9487 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9494 # Check whether --with-jit-reader-dir was given.
9495 if test "${with_jit_reader_dir+set}" = set; then :
9496 withval=$with_jit_reader_dir;
9497 JIT_READER_DIR=$withval
9498 else
9499 JIT_READER_DIR=${libdir}/gdb
9503 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9504 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9505 ac_define_dir=`eval echo $JIT_READER_DIR`
9506 ac_define_dir=`eval echo $ac_define_dir`
9508 cat >>confdefs.h <<_ACEOF
9509 #define JIT_READER_DIR "$ac_define_dir"
9510 _ACEOF
9515 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9516 if test "x$prefix" = xNONE; then
9517 test_prefix=/usr/local
9518 else
9519 test_prefix=$prefix
9521 else
9522 test_prefix=$exec_prefix
9524 value=0
9525 case ${ac_define_dir} in
9526 "${test_prefix}"|"${test_prefix}/"*|\
9527 '${exec_prefix}'|'${exec_prefix}/'*)
9528 value=1
9530 esac
9532 cat >>confdefs.h <<_ACEOF
9533 #define JIT_READER_DIR_RELOCATABLE $value
9534 _ACEOF
9540 # Check whether --with-expat was given.
9541 if test "${with_expat+set}" = set; then :
9542 withval=$with_expat;
9543 else
9544 with_expat=auto
9547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9548 $as_echo_n "checking whether to use expat... " >&6; }
9549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9550 $as_echo "$with_expat" >&6; }
9552 if test "${with_expat}" = no; then
9553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9554 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9555 HAVE_LIBEXPAT=no
9556 else
9565 use_additional=yes
9567 acl_save_prefix="$prefix"
9568 prefix="$acl_final_prefix"
9569 acl_save_exec_prefix="$exec_prefix"
9570 exec_prefix="$acl_final_exec_prefix"
9572 eval additional_includedir=\"$includedir\"
9573 eval additional_libdir=\"$libdir\"
9575 exec_prefix="$acl_save_exec_prefix"
9576 prefix="$acl_save_prefix"
9579 # Check whether --with-libexpat-prefix was given.
9580 if test "${with_libexpat_prefix+set}" = set; then :
9581 withval=$with_libexpat_prefix;
9582 if test "X$withval" = "Xno"; then
9583 use_additional=no
9584 else
9585 if test "X$withval" = "X"; then
9587 acl_save_prefix="$prefix"
9588 prefix="$acl_final_prefix"
9589 acl_save_exec_prefix="$exec_prefix"
9590 exec_prefix="$acl_final_exec_prefix"
9592 eval additional_includedir=\"$includedir\"
9593 eval additional_libdir=\"$libdir\"
9595 exec_prefix="$acl_save_exec_prefix"
9596 prefix="$acl_save_prefix"
9598 else
9599 additional_includedir="$withval/include"
9600 additional_libdir="$withval/lib"
9607 # Check whether --with-libexpat-type was given.
9608 if test "${with_libexpat_type+set}" = set; then :
9609 withval=$with_libexpat_type; with_libexpat_type=$withval
9610 else
9611 with_libexpat_type=auto
9614 lib_type=`eval echo \$with_libexpat_type`
9616 LIBEXPAT=
9617 LTLIBEXPAT=
9618 INCEXPAT=
9619 rpathdirs=
9620 ltrpathdirs=
9621 names_already_handled=
9622 names_next_round='expat '
9623 while test -n "$names_next_round"; do
9624 names_this_round="$names_next_round"
9625 names_next_round=
9626 for name in $names_this_round; do
9627 already_handled=
9628 for n in $names_already_handled; do
9629 if test "$n" = "$name"; then
9630 already_handled=yes
9631 break
9633 done
9634 if test -z "$already_handled"; then
9635 names_already_handled="$names_already_handled $name"
9636 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9637 eval value=\"\$HAVE_LIB$uppername\"
9638 if test -n "$value"; then
9639 if test "$value" = yes; then
9640 eval value=\"\$LIB$uppername\"
9641 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9642 eval value=\"\$LTLIB$uppername\"
9643 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9644 else
9647 else
9648 found_dir=
9649 found_la=
9650 found_so=
9651 found_a=
9652 if test $use_additional = yes; then
9653 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9654 found_dir="$additional_libdir"
9655 found_so="$additional_libdir/lib$name.$shlibext"
9656 if test -f "$additional_libdir/lib$name.la"; then
9657 found_la="$additional_libdir/lib$name.la"
9659 elif test x$lib_type != xshared; then
9660 if test -f "$additional_libdir/lib$name.$libext"; then
9661 found_dir="$additional_libdir"
9662 found_a="$additional_libdir/lib$name.$libext"
9663 if test -f "$additional_libdir/lib$name.la"; then
9664 found_la="$additional_libdir/lib$name.la"
9669 if test "X$found_dir" = "X"; then
9670 for x in $LDFLAGS $LTLIBEXPAT; do
9672 acl_save_prefix="$prefix"
9673 prefix="$acl_final_prefix"
9674 acl_save_exec_prefix="$exec_prefix"
9675 exec_prefix="$acl_final_exec_prefix"
9676 eval x=\"$x\"
9677 exec_prefix="$acl_save_exec_prefix"
9678 prefix="$acl_save_prefix"
9680 case "$x" in
9681 -L*)
9682 dir=`echo "X$x" | sed -e 's/^X-L//'`
9683 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
9684 found_dir="$dir"
9685 found_so="$dir/lib$name.$shlibext"
9686 if test -f "$dir/lib$name.la"; then
9687 found_la="$dir/lib$name.la"
9689 elif test x$lib_type != xshared; then
9690 if test -f "$dir/lib$name.$libext"; then
9691 found_dir="$dir"
9692 found_a="$dir/lib$name.$libext"
9693 if test -f "$dir/lib$name.la"; then
9694 found_la="$dir/lib$name.la"
9699 esac
9700 if test "X$found_dir" != "X"; then
9701 break
9703 done
9705 if test "X$found_dir" != "X"; then
9706 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9707 if test "X$found_so" != "X"; then
9708 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9709 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9710 else
9711 haveit=
9712 for x in $ltrpathdirs; do
9713 if test "X$x" = "X$found_dir"; then
9714 haveit=yes
9715 break
9717 done
9718 if test -z "$haveit"; then
9719 ltrpathdirs="$ltrpathdirs $found_dir"
9721 if test "$hardcode_direct" = yes; then
9722 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9723 else
9724 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9725 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9726 haveit=
9727 for x in $rpathdirs; do
9728 if test "X$x" = "X$found_dir"; then
9729 haveit=yes
9730 break
9732 done
9733 if test -z "$haveit"; then
9734 rpathdirs="$rpathdirs $found_dir"
9736 else
9737 haveit=
9738 for x in $LDFLAGS $LIBEXPAT; do
9740 acl_save_prefix="$prefix"
9741 prefix="$acl_final_prefix"
9742 acl_save_exec_prefix="$exec_prefix"
9743 exec_prefix="$acl_final_exec_prefix"
9744 eval x=\"$x\"
9745 exec_prefix="$acl_save_exec_prefix"
9746 prefix="$acl_save_prefix"
9748 if test "X$x" = "X-L$found_dir"; then
9749 haveit=yes
9750 break
9752 done
9753 if test -z "$haveit"; then
9754 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9756 if test "$hardcode_minus_L" != no; then
9757 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9758 else
9759 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9764 else
9765 if test "X$found_a" != "X"; then
9766 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9767 else
9768 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9771 additional_includedir=
9772 case "$found_dir" in
9773 */lib | */lib/)
9774 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9775 additional_includedir="$basedir/include"
9777 esac
9778 if test "X$additional_includedir" != "X"; then
9779 if test "X$additional_includedir" != "X/usr/include"; then
9780 haveit=
9781 if test "X$additional_includedir" = "X/usr/local/include"; then
9782 if test -n "$GCC"; then
9783 case $host_os in
9784 linux*) haveit=yes;;
9785 esac
9788 if test -z "$haveit"; then
9789 for x in $CPPFLAGS $INCEXPAT; do
9791 acl_save_prefix="$prefix"
9792 prefix="$acl_final_prefix"
9793 acl_save_exec_prefix="$exec_prefix"
9794 exec_prefix="$acl_final_exec_prefix"
9795 eval x=\"$x\"
9796 exec_prefix="$acl_save_exec_prefix"
9797 prefix="$acl_save_prefix"
9799 if test "X$x" = "X-I$additional_includedir"; then
9800 haveit=yes
9801 break
9803 done
9804 if test -z "$haveit"; then
9805 if test -d "$additional_includedir"; then
9806 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9812 if test -n "$found_la"; then
9813 save_libdir="$libdir"
9814 case "$found_la" in
9815 */* | *\\*) . "$found_la" ;;
9816 *) . "./$found_la" ;;
9817 esac
9818 libdir="$save_libdir"
9819 for dep in $dependency_libs; do
9820 case "$dep" in
9821 -L*)
9822 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9823 if test "X$additional_libdir" != "X/usr/lib"; then
9824 haveit=
9825 if test "X$additional_libdir" = "X/usr/local/lib"; then
9826 if test -n "$GCC"; then
9827 case $host_os in
9828 linux*) haveit=yes;;
9829 esac
9832 if test -z "$haveit"; then
9833 haveit=
9834 for x in $LDFLAGS $LIBEXPAT; do
9836 acl_save_prefix="$prefix"
9837 prefix="$acl_final_prefix"
9838 acl_save_exec_prefix="$exec_prefix"
9839 exec_prefix="$acl_final_exec_prefix"
9840 eval x=\"$x\"
9841 exec_prefix="$acl_save_exec_prefix"
9842 prefix="$acl_save_prefix"
9844 if test "X$x" = "X-L$additional_libdir"; then
9845 haveit=yes
9846 break
9848 done
9849 if test -z "$haveit"; then
9850 if test -d "$additional_libdir"; then
9851 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9854 haveit=
9855 for x in $LDFLAGS $LTLIBEXPAT; do
9857 acl_save_prefix="$prefix"
9858 prefix="$acl_final_prefix"
9859 acl_save_exec_prefix="$exec_prefix"
9860 exec_prefix="$acl_final_exec_prefix"
9861 eval x=\"$x\"
9862 exec_prefix="$acl_save_exec_prefix"
9863 prefix="$acl_save_prefix"
9865 if test "X$x" = "X-L$additional_libdir"; then
9866 haveit=yes
9867 break
9869 done
9870 if test -z "$haveit"; then
9871 if test -d "$additional_libdir"; then
9872 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9878 -R*)
9879 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9880 if test "$enable_rpath" != no; then
9881 haveit=
9882 for x in $rpathdirs; do
9883 if test "X$x" = "X$dir"; then
9884 haveit=yes
9885 break
9887 done
9888 if test -z "$haveit"; then
9889 rpathdirs="$rpathdirs $dir"
9891 haveit=
9892 for x in $ltrpathdirs; do
9893 if test "X$x" = "X$dir"; then
9894 haveit=yes
9895 break
9897 done
9898 if test -z "$haveit"; then
9899 ltrpathdirs="$ltrpathdirs $dir"
9903 -l*)
9904 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9906 *.la)
9907 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9910 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9911 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9913 esac
9914 done
9916 else
9917 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
9918 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9919 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9920 else
9921 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext"
9922 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext"
9927 done
9928 done
9929 if test "X$rpathdirs" != "X"; then
9930 if test -n "$hardcode_libdir_separator"; then
9931 alldirs=
9932 for found_dir in $rpathdirs; do
9933 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9934 done
9935 acl_save_libdir="$libdir"
9936 libdir="$alldirs"
9937 eval flag=\"$hardcode_libdir_flag_spec\"
9938 libdir="$acl_save_libdir"
9939 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9940 else
9941 for found_dir in $rpathdirs; do
9942 acl_save_libdir="$libdir"
9943 libdir="$found_dir"
9944 eval flag=\"$hardcode_libdir_flag_spec\"
9945 libdir="$acl_save_libdir"
9946 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9947 done
9950 if test "X$ltrpathdirs" != "X"; then
9951 for found_dir in $ltrpathdirs; do
9952 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9953 done
9957 ac_save_CPPFLAGS="$CPPFLAGS"
9959 for element in $INCEXPAT; do
9960 haveit=
9961 for x in $CPPFLAGS; do
9963 acl_save_prefix="$prefix"
9964 prefix="$acl_final_prefix"
9965 acl_save_exec_prefix="$exec_prefix"
9966 exec_prefix="$acl_final_exec_prefix"
9967 eval x=\"$x\"
9968 exec_prefix="$acl_save_exec_prefix"
9969 prefix="$acl_save_prefix"
9971 if test "X$x" = "X$element"; then
9972 haveit=yes
9973 break
9975 done
9976 if test -z "$haveit"; then
9977 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9979 done
9982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9983 $as_echo_n "checking for libexpat... " >&6; }
9984 if ${ac_cv_libexpat+:} false; then :
9985 $as_echo_n "(cached) " >&6
9986 else
9988 ac_save_LIBS="$LIBS"
9989 LIBS="$LIBS $LIBEXPAT"
9990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9991 /* end confdefs.h. */
9992 #include "expat.h"
9994 main ()
9996 XML_Parser p = XML_ParserCreate (0);
9998 return 0;
10000 _ACEOF
10001 if ac_fn_c_try_link "$LINENO"; then :
10002 ac_cv_libexpat=yes
10003 else
10004 ac_cv_libexpat=no
10006 rm -f core conftest.err conftest.$ac_objext \
10007 conftest$ac_exeext conftest.$ac_ext
10008 LIBS="$ac_save_LIBS"
10011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
10012 $as_echo "$ac_cv_libexpat" >&6; }
10013 if test "$ac_cv_libexpat" = yes; then
10014 HAVE_LIBEXPAT=yes
10016 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
10018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
10019 $as_echo_n "checking how to link with libexpat... " >&6; }
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
10021 $as_echo "$LIBEXPAT" >&6; }
10022 else
10023 HAVE_LIBEXPAT=no
10024 CPPFLAGS="$ac_save_CPPFLAGS"
10025 LIBEXPAT=
10026 LTLIBEXPAT=
10034 if test "$HAVE_LIBEXPAT" != yes; then
10035 if test "$with_expat" = yes; then
10036 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
10037 else
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
10039 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
10041 else
10042 save_LIBS=$LIBS
10043 LIBS="$LIBS $LIBEXPAT"
10044 for ac_func in XML_StopParser
10045 do :
10046 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
10047 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
10048 cat >>confdefs.h <<_ACEOF
10049 #define HAVE_XML_STOPPARSER 1
10050 _ACEOF
10053 done
10055 LIBS=$save_LIBS
10059 # Verify that we have a usable GMP library.
10068 use_additional=yes
10070 acl_save_prefix="$prefix"
10071 prefix="$acl_final_prefix"
10072 acl_save_exec_prefix="$exec_prefix"
10073 exec_prefix="$acl_final_exec_prefix"
10075 eval additional_includedir=\"$includedir\"
10076 eval additional_libdir=\"$libdir\"
10078 exec_prefix="$acl_save_exec_prefix"
10079 prefix="$acl_save_prefix"
10082 # Check whether --with-libgmp-prefix was given.
10083 if test "${with_libgmp_prefix+set}" = set; then :
10084 withval=$with_libgmp_prefix;
10085 if test "X$withval" = "Xno"; then
10086 use_additional=no
10087 else
10088 if test "X$withval" = "X"; then
10090 acl_save_prefix="$prefix"
10091 prefix="$acl_final_prefix"
10092 acl_save_exec_prefix="$exec_prefix"
10093 exec_prefix="$acl_final_exec_prefix"
10095 eval additional_includedir=\"$includedir\"
10096 eval additional_libdir=\"$libdir\"
10098 exec_prefix="$acl_save_exec_prefix"
10099 prefix="$acl_save_prefix"
10101 else
10102 additional_includedir="$withval/include"
10103 additional_libdir="$withval/lib"
10110 # Check whether --with-libgmp-type was given.
10111 if test "${with_libgmp_type+set}" = set; then :
10112 withval=$with_libgmp_type; with_libgmp_type=$withval
10113 else
10114 with_libgmp_type=auto
10117 lib_type=`eval echo \$with_libgmp_type`
10119 LIBGMP=
10120 LTLIBGMP=
10121 INCGMP=
10122 rpathdirs=
10123 ltrpathdirs=
10124 names_already_handled=
10125 names_next_round='gmp '
10126 while test -n "$names_next_round"; do
10127 names_this_round="$names_next_round"
10128 names_next_round=
10129 for name in $names_this_round; do
10130 already_handled=
10131 for n in $names_already_handled; do
10132 if test "$n" = "$name"; then
10133 already_handled=yes
10134 break
10136 done
10137 if test -z "$already_handled"; then
10138 names_already_handled="$names_already_handled $name"
10139 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10140 eval value=\"\$HAVE_LIB$uppername\"
10141 if test -n "$value"; then
10142 if test "$value" = yes; then
10143 eval value=\"\$LIB$uppername\"
10144 test -z "$value" || LIBGMP="${LIBGMP}${LIBGMP:+ }$value"
10145 eval value=\"\$LTLIB$uppername\"
10146 test -z "$value" || LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$value"
10147 else
10150 else
10151 found_dir=
10152 found_la=
10153 found_so=
10154 found_a=
10155 if test $use_additional = yes; then
10156 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10157 found_dir="$additional_libdir"
10158 found_so="$additional_libdir/lib$name.$shlibext"
10159 if test -f "$additional_libdir/lib$name.la"; then
10160 found_la="$additional_libdir/lib$name.la"
10162 elif test x$lib_type != xshared; then
10163 if test -f "$additional_libdir/lib$name.$libext"; then
10164 found_dir="$additional_libdir"
10165 found_a="$additional_libdir/lib$name.$libext"
10166 if test -f "$additional_libdir/lib$name.la"; then
10167 found_la="$additional_libdir/lib$name.la"
10172 if test "X$found_dir" = "X"; then
10173 for x in $LDFLAGS $LTLIBGMP; do
10175 acl_save_prefix="$prefix"
10176 prefix="$acl_final_prefix"
10177 acl_save_exec_prefix="$exec_prefix"
10178 exec_prefix="$acl_final_exec_prefix"
10179 eval x=\"$x\"
10180 exec_prefix="$acl_save_exec_prefix"
10181 prefix="$acl_save_prefix"
10183 case "$x" in
10184 -L*)
10185 dir=`echo "X$x" | sed -e 's/^X-L//'`
10186 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10187 found_dir="$dir"
10188 found_so="$dir/lib$name.$shlibext"
10189 if test -f "$dir/lib$name.la"; then
10190 found_la="$dir/lib$name.la"
10192 elif test x$lib_type != xshared; then
10193 if test -f "$dir/lib$name.$libext"; then
10194 found_dir="$dir"
10195 found_a="$dir/lib$name.$libext"
10196 if test -f "$dir/lib$name.la"; then
10197 found_la="$dir/lib$name.la"
10202 esac
10203 if test "X$found_dir" != "X"; then
10204 break
10206 done
10208 if test "X$found_dir" != "X"; then
10209 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$found_dir -l$name"
10210 if test "X$found_so" != "X"; then
10211 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10212 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10213 else
10214 haveit=
10215 for x in $ltrpathdirs; do
10216 if test "X$x" = "X$found_dir"; then
10217 haveit=yes
10218 break
10220 done
10221 if test -z "$haveit"; then
10222 ltrpathdirs="$ltrpathdirs $found_dir"
10224 if test "$hardcode_direct" = yes; then
10225 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10226 else
10227 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10228 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10229 haveit=
10230 for x in $rpathdirs; do
10231 if test "X$x" = "X$found_dir"; then
10232 haveit=yes
10233 break
10235 done
10236 if test -z "$haveit"; then
10237 rpathdirs="$rpathdirs $found_dir"
10239 else
10240 haveit=
10241 for x in $LDFLAGS $LIBGMP; do
10243 acl_save_prefix="$prefix"
10244 prefix="$acl_final_prefix"
10245 acl_save_exec_prefix="$exec_prefix"
10246 exec_prefix="$acl_final_exec_prefix"
10247 eval x=\"$x\"
10248 exec_prefix="$acl_save_exec_prefix"
10249 prefix="$acl_save_prefix"
10251 if test "X$x" = "X-L$found_dir"; then
10252 haveit=yes
10253 break
10255 done
10256 if test -z "$haveit"; then
10257 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir"
10259 if test "$hardcode_minus_L" != no; then
10260 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_so"
10261 else
10262 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10267 else
10268 if test "X$found_a" != "X"; then
10269 LIBGMP="${LIBGMP}${LIBGMP:+ }$found_a"
10270 else
10271 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$found_dir -l$name"
10274 additional_includedir=
10275 case "$found_dir" in
10276 */lib | */lib/)
10277 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10278 additional_includedir="$basedir/include"
10280 esac
10281 if test "X$additional_includedir" != "X"; then
10282 if test "X$additional_includedir" != "X/usr/include"; then
10283 haveit=
10284 if test "X$additional_includedir" = "X/usr/local/include"; then
10285 if test -n "$GCC"; then
10286 case $host_os in
10287 linux*) haveit=yes;;
10288 esac
10291 if test -z "$haveit"; then
10292 for x in $CPPFLAGS $INCGMP; do
10294 acl_save_prefix="$prefix"
10295 prefix="$acl_final_prefix"
10296 acl_save_exec_prefix="$exec_prefix"
10297 exec_prefix="$acl_final_exec_prefix"
10298 eval x=\"$x\"
10299 exec_prefix="$acl_save_exec_prefix"
10300 prefix="$acl_save_prefix"
10302 if test "X$x" = "X-I$additional_includedir"; then
10303 haveit=yes
10304 break
10306 done
10307 if test -z "$haveit"; then
10308 if test -d "$additional_includedir"; then
10309 INCGMP="${INCGMP}${INCGMP:+ }-I$additional_includedir"
10315 if test -n "$found_la"; then
10316 save_libdir="$libdir"
10317 case "$found_la" in
10318 */* | *\\*) . "$found_la" ;;
10319 *) . "./$found_la" ;;
10320 esac
10321 libdir="$save_libdir"
10322 for dep in $dependency_libs; do
10323 case "$dep" in
10324 -L*)
10325 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10326 if test "X$additional_libdir" != "X/usr/lib"; then
10327 haveit=
10328 if test "X$additional_libdir" = "X/usr/local/lib"; then
10329 if test -n "$GCC"; then
10330 case $host_os in
10331 linux*) haveit=yes;;
10332 esac
10335 if test -z "$haveit"; then
10336 haveit=
10337 for x in $LDFLAGS $LIBGMP; do
10339 acl_save_prefix="$prefix"
10340 prefix="$acl_final_prefix"
10341 acl_save_exec_prefix="$exec_prefix"
10342 exec_prefix="$acl_final_exec_prefix"
10343 eval x=\"$x\"
10344 exec_prefix="$acl_save_exec_prefix"
10345 prefix="$acl_save_prefix"
10347 if test "X$x" = "X-L$additional_libdir"; then
10348 haveit=yes
10349 break
10351 done
10352 if test -z "$haveit"; then
10353 if test -d "$additional_libdir"; then
10354 LIBGMP="${LIBGMP}${LIBGMP:+ }-L$additional_libdir"
10357 haveit=
10358 for x in $LDFLAGS $LTLIBGMP; do
10360 acl_save_prefix="$prefix"
10361 prefix="$acl_final_prefix"
10362 acl_save_exec_prefix="$exec_prefix"
10363 exec_prefix="$acl_final_exec_prefix"
10364 eval x=\"$x\"
10365 exec_prefix="$acl_save_exec_prefix"
10366 prefix="$acl_save_prefix"
10368 if test "X$x" = "X-L$additional_libdir"; then
10369 haveit=yes
10370 break
10372 done
10373 if test -z "$haveit"; then
10374 if test -d "$additional_libdir"; then
10375 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-L$additional_libdir"
10381 -R*)
10382 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10383 if test "$enable_rpath" != no; then
10384 haveit=
10385 for x in $rpathdirs; do
10386 if test "X$x" = "X$dir"; then
10387 haveit=yes
10388 break
10390 done
10391 if test -z "$haveit"; then
10392 rpathdirs="$rpathdirs $dir"
10394 haveit=
10395 for x in $ltrpathdirs; do
10396 if test "X$x" = "X$dir"; then
10397 haveit=yes
10398 break
10400 done
10401 if test -z "$haveit"; then
10402 ltrpathdirs="$ltrpathdirs $dir"
10406 -l*)
10407 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10409 *.la)
10410 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10413 LIBGMP="${LIBGMP}${LIBGMP:+ }$dep"
10414 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }$dep"
10416 esac
10417 done
10419 else
10420 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10421 LIBGMP="${LIBGMP}${LIBGMP:+ }-l$name"
10422 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l$name"
10423 else
10424 LIBGMP="${LIBGMP}${LIBGMP:+ }-l:lib$name.$libext"
10425 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-l:lib$name.$libext"
10430 done
10431 done
10432 if test "X$rpathdirs" != "X"; then
10433 if test -n "$hardcode_libdir_separator"; then
10434 alldirs=
10435 for found_dir in $rpathdirs; do
10436 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10437 done
10438 acl_save_libdir="$libdir"
10439 libdir="$alldirs"
10440 eval flag=\"$hardcode_libdir_flag_spec\"
10441 libdir="$acl_save_libdir"
10442 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10443 else
10444 for found_dir in $rpathdirs; do
10445 acl_save_libdir="$libdir"
10446 libdir="$found_dir"
10447 eval flag=\"$hardcode_libdir_flag_spec\"
10448 libdir="$acl_save_libdir"
10449 LIBGMP="${LIBGMP}${LIBGMP:+ }$flag"
10450 done
10453 if test "X$ltrpathdirs" != "X"; then
10454 for found_dir in $ltrpathdirs; do
10455 LTLIBGMP="${LTLIBGMP}${LTLIBGMP:+ }-R$found_dir"
10456 done
10460 ac_save_CPPFLAGS="$CPPFLAGS"
10462 for element in $INCGMP; do
10463 haveit=
10464 for x in $CPPFLAGS; do
10466 acl_save_prefix="$prefix"
10467 prefix="$acl_final_prefix"
10468 acl_save_exec_prefix="$exec_prefix"
10469 exec_prefix="$acl_final_exec_prefix"
10470 eval x=\"$x\"
10471 exec_prefix="$acl_save_exec_prefix"
10472 prefix="$acl_save_prefix"
10474 if test "X$x" = "X$element"; then
10475 haveit=yes
10476 break
10478 done
10479 if test -z "$haveit"; then
10480 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10482 done
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgmp" >&5
10486 $as_echo_n "checking for libgmp... " >&6; }
10487 if ${ac_cv_libgmp+:} false; then :
10488 $as_echo_n "(cached) " >&6
10489 else
10491 ac_save_LIBS="$LIBS"
10492 LIBS="$LIBS $LIBGMP"
10493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10494 /* end confdefs.h. */
10495 #include <gmp.h>
10497 main ()
10499 mpz_t n;
10500 mpz_init (n);
10502 return 0;
10504 _ACEOF
10505 if ac_fn_c_try_link "$LINENO"; then :
10506 ac_cv_libgmp=yes
10507 else
10508 ac_cv_libgmp=no
10510 rm -f core conftest.err conftest.$ac_objext \
10511 conftest$ac_exeext conftest.$ac_ext
10512 LIBS="$ac_save_LIBS"
10515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libgmp" >&5
10516 $as_echo "$ac_cv_libgmp" >&6; }
10517 if test "$ac_cv_libgmp" = yes; then
10518 HAVE_LIBGMP=yes
10520 $as_echo "#define HAVE_LIBGMP 1" >>confdefs.h
10522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libgmp" >&5
10523 $as_echo_n "checking how to link with libgmp... " >&6; }
10524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGMP" >&5
10525 $as_echo "$LIBGMP" >&6; }
10526 else
10527 HAVE_LIBGMP=no
10528 CPPFLAGS="$ac_save_CPPFLAGS"
10529 LIBGMP=
10530 LTLIBGMP=
10538 if test "$HAVE_LIBGMP" != yes; then
10539 as_fn_error $? "GMP is missing or unusable" "$LINENO" 5
10543 # Check whether --with-mpfr was given.
10544 if test "${with_mpfr+set}" = set; then :
10545 withval=$with_mpfr;
10546 else
10547 with_mpfr=auto
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
10551 $as_echo_n "checking whether to use MPFR... " >&6; }
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
10553 $as_echo "$with_mpfr" >&6; }
10555 if test "${with_mpfr}" = no; then
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
10557 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
10558 HAVE_LIBMPFR=no
10559 else
10568 use_additional=yes
10570 acl_save_prefix="$prefix"
10571 prefix="$acl_final_prefix"
10572 acl_save_exec_prefix="$exec_prefix"
10573 exec_prefix="$acl_final_exec_prefix"
10575 eval additional_includedir=\"$includedir\"
10576 eval additional_libdir=\"$libdir\"
10578 exec_prefix="$acl_save_exec_prefix"
10579 prefix="$acl_save_prefix"
10582 # Check whether --with-libmpfr-prefix was given.
10583 if test "${with_libmpfr_prefix+set}" = set; then :
10584 withval=$with_libmpfr_prefix;
10585 if test "X$withval" = "Xno"; then
10586 use_additional=no
10587 else
10588 if test "X$withval" = "X"; then
10590 acl_save_prefix="$prefix"
10591 prefix="$acl_final_prefix"
10592 acl_save_exec_prefix="$exec_prefix"
10593 exec_prefix="$acl_final_exec_prefix"
10595 eval additional_includedir=\"$includedir\"
10596 eval additional_libdir=\"$libdir\"
10598 exec_prefix="$acl_save_exec_prefix"
10599 prefix="$acl_save_prefix"
10601 else
10602 additional_includedir="$withval/include"
10603 additional_libdir="$withval/lib"
10610 # Check whether --with-libmpfr-type was given.
10611 if test "${with_libmpfr_type+set}" = set; then :
10612 withval=$with_libmpfr_type; with_libmpfr_type=$withval
10613 else
10614 with_libmpfr_type=auto
10617 lib_type=`eval echo \$with_libmpfr_type`
10619 LIBMPFR=
10620 LTLIBMPFR=
10621 INCMPFR=
10622 rpathdirs=
10623 ltrpathdirs=
10624 names_already_handled=
10625 names_next_round='mpfr gmp'
10626 while test -n "$names_next_round"; do
10627 names_this_round="$names_next_round"
10628 names_next_round=
10629 for name in $names_this_round; do
10630 already_handled=
10631 for n in $names_already_handled; do
10632 if test "$n" = "$name"; then
10633 already_handled=yes
10634 break
10636 done
10637 if test -z "$already_handled"; then
10638 names_already_handled="$names_already_handled $name"
10639 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
10640 eval value=\"\$HAVE_LIB$uppername\"
10641 if test -n "$value"; then
10642 if test "$value" = yes; then
10643 eval value=\"\$LIB$uppername\"
10644 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
10645 eval value=\"\$LTLIB$uppername\"
10646 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
10647 else
10650 else
10651 found_dir=
10652 found_la=
10653 found_so=
10654 found_a=
10655 if test $use_additional = yes; then
10656 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10657 found_dir="$additional_libdir"
10658 found_so="$additional_libdir/lib$name.$shlibext"
10659 if test -f "$additional_libdir/lib$name.la"; then
10660 found_la="$additional_libdir/lib$name.la"
10662 elif test x$lib_type != xshared; then
10663 if test -f "$additional_libdir/lib$name.$libext"; then
10664 found_dir="$additional_libdir"
10665 found_a="$additional_libdir/lib$name.$libext"
10666 if test -f "$additional_libdir/lib$name.la"; then
10667 found_la="$additional_libdir/lib$name.la"
10672 if test "X$found_dir" = "X"; then
10673 for x in $LDFLAGS $LTLIBMPFR; do
10675 acl_save_prefix="$prefix"
10676 prefix="$acl_final_prefix"
10677 acl_save_exec_prefix="$exec_prefix"
10678 exec_prefix="$acl_final_exec_prefix"
10679 eval x=\"$x\"
10680 exec_prefix="$acl_save_exec_prefix"
10681 prefix="$acl_save_prefix"
10683 case "$x" in
10684 -L*)
10685 dir=`echo "X$x" | sed -e 's/^X-L//'`
10686 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
10687 found_dir="$dir"
10688 found_so="$dir/lib$name.$shlibext"
10689 if test -f "$dir/lib$name.la"; then
10690 found_la="$dir/lib$name.la"
10692 elif test x$lib_type != xshared; then
10693 if test -f "$dir/lib$name.$libext"; then
10694 found_dir="$dir"
10695 found_a="$dir/lib$name.$libext"
10696 if test -f "$dir/lib$name.la"; then
10697 found_la="$dir/lib$name.la"
10702 esac
10703 if test "X$found_dir" != "X"; then
10704 break
10706 done
10708 if test "X$found_dir" != "X"; then
10709 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
10710 if test "X$found_so" != "X"; then
10711 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
10712 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10713 else
10714 haveit=
10715 for x in $ltrpathdirs; do
10716 if test "X$x" = "X$found_dir"; then
10717 haveit=yes
10718 break
10720 done
10721 if test -z "$haveit"; then
10722 ltrpathdirs="$ltrpathdirs $found_dir"
10724 if test "$hardcode_direct" = yes; then
10725 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10726 else
10727 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
10728 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10729 haveit=
10730 for x in $rpathdirs; do
10731 if test "X$x" = "X$found_dir"; then
10732 haveit=yes
10733 break
10735 done
10736 if test -z "$haveit"; then
10737 rpathdirs="$rpathdirs $found_dir"
10739 else
10740 haveit=
10741 for x in $LDFLAGS $LIBMPFR; do
10743 acl_save_prefix="$prefix"
10744 prefix="$acl_final_prefix"
10745 acl_save_exec_prefix="$exec_prefix"
10746 exec_prefix="$acl_final_exec_prefix"
10747 eval x=\"$x\"
10748 exec_prefix="$acl_save_exec_prefix"
10749 prefix="$acl_save_prefix"
10751 if test "X$x" = "X-L$found_dir"; then
10752 haveit=yes
10753 break
10755 done
10756 if test -z "$haveit"; then
10757 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
10759 if test "$hardcode_minus_L" != no; then
10760 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
10761 else
10762 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10767 else
10768 if test "X$found_a" != "X"; then
10769 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
10770 else
10771 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
10774 additional_includedir=
10775 case "$found_dir" in
10776 */lib | */lib/)
10777 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
10778 additional_includedir="$basedir/include"
10780 esac
10781 if test "X$additional_includedir" != "X"; then
10782 if test "X$additional_includedir" != "X/usr/include"; then
10783 haveit=
10784 if test "X$additional_includedir" = "X/usr/local/include"; then
10785 if test -n "$GCC"; then
10786 case $host_os in
10787 linux*) haveit=yes;;
10788 esac
10791 if test -z "$haveit"; then
10792 for x in $CPPFLAGS $INCMPFR; do
10794 acl_save_prefix="$prefix"
10795 prefix="$acl_final_prefix"
10796 acl_save_exec_prefix="$exec_prefix"
10797 exec_prefix="$acl_final_exec_prefix"
10798 eval x=\"$x\"
10799 exec_prefix="$acl_save_exec_prefix"
10800 prefix="$acl_save_prefix"
10802 if test "X$x" = "X-I$additional_includedir"; then
10803 haveit=yes
10804 break
10806 done
10807 if test -z "$haveit"; then
10808 if test -d "$additional_includedir"; then
10809 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10815 if test -n "$found_la"; then
10816 save_libdir="$libdir"
10817 case "$found_la" in
10818 */* | *\\*) . "$found_la" ;;
10819 *) . "./$found_la" ;;
10820 esac
10821 libdir="$save_libdir"
10822 for dep in $dependency_libs; do
10823 case "$dep" in
10824 -L*)
10825 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10826 if test "X$additional_libdir" != "X/usr/lib"; then
10827 haveit=
10828 if test "X$additional_libdir" = "X/usr/local/lib"; then
10829 if test -n "$GCC"; then
10830 case $host_os in
10831 linux*) haveit=yes;;
10832 esac
10835 if test -z "$haveit"; then
10836 haveit=
10837 for x in $LDFLAGS $LIBMPFR; do
10839 acl_save_prefix="$prefix"
10840 prefix="$acl_final_prefix"
10841 acl_save_exec_prefix="$exec_prefix"
10842 exec_prefix="$acl_final_exec_prefix"
10843 eval x=\"$x\"
10844 exec_prefix="$acl_save_exec_prefix"
10845 prefix="$acl_save_prefix"
10847 if test "X$x" = "X-L$additional_libdir"; then
10848 haveit=yes
10849 break
10851 done
10852 if test -z "$haveit"; then
10853 if test -d "$additional_libdir"; then
10854 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10857 haveit=
10858 for x in $LDFLAGS $LTLIBMPFR; do
10860 acl_save_prefix="$prefix"
10861 prefix="$acl_final_prefix"
10862 acl_save_exec_prefix="$exec_prefix"
10863 exec_prefix="$acl_final_exec_prefix"
10864 eval x=\"$x\"
10865 exec_prefix="$acl_save_exec_prefix"
10866 prefix="$acl_save_prefix"
10868 if test "X$x" = "X-L$additional_libdir"; then
10869 haveit=yes
10870 break
10872 done
10873 if test -z "$haveit"; then
10874 if test -d "$additional_libdir"; then
10875 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10881 -R*)
10882 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10883 if test "$enable_rpath" != no; then
10884 haveit=
10885 for x in $rpathdirs; do
10886 if test "X$x" = "X$dir"; then
10887 haveit=yes
10888 break
10890 done
10891 if test -z "$haveit"; then
10892 rpathdirs="$rpathdirs $dir"
10894 haveit=
10895 for x in $ltrpathdirs; do
10896 if test "X$x" = "X$dir"; then
10897 haveit=yes
10898 break
10900 done
10901 if test -z "$haveit"; then
10902 ltrpathdirs="$ltrpathdirs $dir"
10906 -l*)
10907 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10909 *.la)
10910 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10913 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10914 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10916 esac
10917 done
10919 else
10920 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
10921 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10922 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10923 else
10924 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext"
10925 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext"
10930 done
10931 done
10932 if test "X$rpathdirs" != "X"; then
10933 if test -n "$hardcode_libdir_separator"; then
10934 alldirs=
10935 for found_dir in $rpathdirs; do
10936 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10937 done
10938 acl_save_libdir="$libdir"
10939 libdir="$alldirs"
10940 eval flag=\"$hardcode_libdir_flag_spec\"
10941 libdir="$acl_save_libdir"
10942 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10943 else
10944 for found_dir in $rpathdirs; do
10945 acl_save_libdir="$libdir"
10946 libdir="$found_dir"
10947 eval flag=\"$hardcode_libdir_flag_spec\"
10948 libdir="$acl_save_libdir"
10949 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10950 done
10953 if test "X$ltrpathdirs" != "X"; then
10954 for found_dir in $ltrpathdirs; do
10955 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10956 done
10960 ac_save_CPPFLAGS="$CPPFLAGS"
10962 for element in $INCMPFR; do
10963 haveit=
10964 for x in $CPPFLAGS; do
10966 acl_save_prefix="$prefix"
10967 prefix="$acl_final_prefix"
10968 acl_save_exec_prefix="$exec_prefix"
10969 exec_prefix="$acl_final_exec_prefix"
10970 eval x=\"$x\"
10971 exec_prefix="$acl_save_exec_prefix"
10972 prefix="$acl_save_prefix"
10974 if test "X$x" = "X$element"; then
10975 haveit=yes
10976 break
10978 done
10979 if test -z "$haveit"; then
10980 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10982 done
10985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10986 $as_echo_n "checking for libmpfr... " >&6; }
10987 if ${ac_cv_libmpfr+:} false; then :
10988 $as_echo_n "(cached) " >&6
10989 else
10991 ac_save_LIBS="$LIBS"
10992 LIBS="$LIBS $LIBMPFR"
10993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10994 /* end confdefs.h. */
10995 #include <mpfr.h>
10997 main ()
10999 mpfr_exp_t exp; mpfr_t x;
11000 mpfr_frexp (&exp, x, x, MPFR_RNDN);
11002 return 0;
11004 _ACEOF
11005 if ac_fn_c_try_link "$LINENO"; then :
11006 ac_cv_libmpfr=yes
11007 else
11008 ac_cv_libmpfr=no
11010 rm -f core conftest.err conftest.$ac_objext \
11011 conftest$ac_exeext conftest.$ac_ext
11012 LIBS="$ac_save_LIBS"
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
11016 $as_echo "$ac_cv_libmpfr" >&6; }
11017 if test "$ac_cv_libmpfr" = yes; then
11018 HAVE_LIBMPFR=yes
11020 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
11023 $as_echo_n "checking how to link with libmpfr... " >&6; }
11024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
11025 $as_echo "$LIBMPFR" >&6; }
11026 else
11027 HAVE_LIBMPFR=no
11028 CPPFLAGS="$ac_save_CPPFLAGS"
11029 LIBMPFR=
11030 LTLIBMPFR=
11038 if test "$HAVE_LIBMPFR" != yes; then
11039 if test "$with_mpfr" = yes; then
11040 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
11041 else
11042 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
11043 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
11048 # --------------------- #
11049 # Check for libpython. #
11050 # --------------------- #
11057 # Check whether --with-python was given.
11058 if test "${with_python+set}" = set; then :
11059 withval=$with_python;
11060 else
11061 with_python=auto
11064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
11065 $as_echo_n "checking whether to use python... " >&6; }
11066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
11067 $as_echo "$with_python" >&6; }
11069 if test "${with_python}" = no; then
11070 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
11071 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
11072 have_libpython=no
11073 else
11074 case "${with_python}" in
11075 [\\/]* | ?:[\\/]*)
11076 if test -d "${with_python}"; then
11077 # Assume the python binary is ${with_python}/bin/python.
11078 python_prog="${with_python}/bin/python"
11079 python_prefix=
11080 # If python does not exit ${with_python}/bin, then try in
11081 # ${with_python}. On Windows/MinGW, this is where the Python
11082 # executable is.
11083 if test ! -x "${python_prog}"; then
11084 python_prog="${with_python}/python"
11085 python_prefix=
11087 if test ! -x "${python_prog}"; then
11088 # Fall back to gdb 7.0/7.1 behaviour.
11089 python_prog=missing
11090 python_prefix=${with_python}
11092 elif test -x "${with_python}"; then
11093 # While we can't run python compiled for $host (unless host == build),
11094 # the user could write a script that provides the needed information,
11095 # so we support that.
11096 python_prog=${with_python}
11097 python_prefix=
11098 else
11099 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11102 */*)
11103 # Disallow --with-python=foo/bar.
11104 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
11107 # The user has either specified auto, yes, or the name of the python
11108 # program assumed to be in $PATH.
11109 python_prefix=
11110 case "${with_python}" in
11111 yes | auto)
11112 if test "${build}" = "${host}"; then
11113 # Look first for 'python', then 'python3'.
11114 for ac_prog in python python3
11116 # Extract the first word of "$ac_prog", so it can be a program name with args.
11117 set dummy $ac_prog; ac_word=$2
11118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11119 $as_echo_n "checking for $ac_word... " >&6; }
11120 if ${ac_cv_path_python_prog_path+:} false; then :
11121 $as_echo_n "(cached) " >&6
11122 else
11123 case $python_prog_path in
11124 [\\/]* | ?:[\\/]*)
11125 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11128 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11129 for as_dir in $PATH
11131 IFS=$as_save_IFS
11132 test -z "$as_dir" && as_dir=.
11133 for ac_exec_ext in '' $ac_executable_extensions; do
11134 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11135 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11136 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11137 break 2
11139 done
11140 done
11141 IFS=$as_save_IFS
11144 esac
11146 python_prog_path=$ac_cv_path_python_prog_path
11147 if test -n "$python_prog_path"; then
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11149 $as_echo "$python_prog_path" >&6; }
11150 else
11151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11152 $as_echo "no" >&6; }
11156 test -n "$python_prog_path" && break
11157 done
11158 test -n "$python_prog_path" || python_prog_path="missing"
11160 if test "${python_prog_path}" = missing; then
11161 python_prog=missing
11162 else
11163 python_prog=${python_prog_path}
11165 else
11166 # Not much we can do except assume the cross-compiler will find the
11167 # right files.
11168 python_prog=missing
11172 # While we can't run python compiled for $host (unless host == build),
11173 # the user could write a script that provides the needed information,
11174 # so we support that.
11175 python_prog="${with_python}"
11176 # Extract the first word of "${python_prog}", so it can be a program name with args.
11177 set dummy ${python_prog}; ac_word=$2
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11179 $as_echo_n "checking for $ac_word... " >&6; }
11180 if ${ac_cv_path_python_prog_path+:} false; then :
11181 $as_echo_n "(cached) " >&6
11182 else
11183 case $python_prog_path in
11184 [\\/]* | ?:[\\/]*)
11185 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
11188 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11189 for as_dir in $PATH
11191 IFS=$as_save_IFS
11192 test -z "$as_dir" && as_dir=.
11193 for ac_exec_ext in '' $ac_executable_extensions; do
11194 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11195 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
11196 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11197 break 2
11199 done
11200 done
11201 IFS=$as_save_IFS
11203 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
11205 esac
11207 python_prog_path=$ac_cv_path_python_prog_path
11208 if test -n "$python_prog_path"; then
11209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
11210 $as_echo "$python_prog_path" >&6; }
11211 else
11212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11213 $as_echo "no" >&6; }
11217 if test "${python_prog_path}" = missing; then
11218 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
11221 esac
11222 esac
11224 if test "${python_prog}" != missing; then
11225 # We have a python program to use, but it may be too old.
11226 # Don't flag an error for --with-python=auto (the default).
11227 have_python_config=yes
11228 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
11229 if test $? != 0; then
11230 have_python_config=failed
11231 if test "${with_python}" != auto; then
11232 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
11235 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
11236 if test $? != 0; then
11237 have_python_config=failed
11238 if test "${with_python}" != auto; then
11239 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
11242 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
11243 if test $? != 0; then
11244 have_python_config=failed
11245 if test "${with_python}" != auto; then
11246 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
11249 else
11250 # We do not have a python executable we can use to determine where
11251 # to find the Python headers and libs. We cannot guess the include
11252 # path from the python_prefix either, because that include path
11253 # depends on the Python version. So, there is nothing much we can
11254 # do except assume that the compiler will be able to find those files.
11255 python_includes=
11256 python_libs=
11257 have_python_config=no
11260 # If we have python-config, only try the configuration it provides.
11261 # Otherwise fallback on the old way of trying different versions of
11262 # python in turn.
11264 have_libpython=no
11265 if test "${have_python_config}" = yes; then
11268 new_CPPFLAGS=${python_includes}
11269 new_LIBS=${python_libs}
11270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
11271 $as_echo_n "checking for python... " >&6; }
11272 save_CPPFLAGS=$CPPFLAGS
11273 save_LIBS=$LIBS
11274 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11275 LIBS="$new_LIBS $LIBS"
11276 found_usable_python=no
11277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11278 /* end confdefs.h. */
11279 #include "Python.h"
11281 main ()
11284 #if PY_MAJOR_VERSION != 3
11285 # error "We only support Python 3"
11286 #endif
11287 Py_Initialize ();
11290 return 0;
11292 _ACEOF
11293 if ac_fn_c_try_link "$LINENO"; then :
11294 have_libpython=yes
11295 found_usable_python=yes
11296 PYTHON_CPPFLAGS=$new_CPPFLAGS
11297 PYTHON_LIBS=$new_LIBS
11299 rm -f core conftest.err conftest.$ac_objext \
11300 conftest$ac_exeext conftest.$ac_ext
11301 CPPFLAGS=$save_CPPFLAGS
11302 LIBS=$save_LIBS
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
11304 $as_echo "${found_usable_python}" >&6; }
11308 if test "${have_libpython}" = no; then
11309 case "${with_python}" in
11310 yes)
11311 as_fn_error $? "python is missing or unusable" "$LINENO" 5
11313 auto)
11314 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
11315 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
11318 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
11320 esac
11321 else
11322 if test -n "${python_prefix}"; then
11324 cat >>confdefs.h <<_ACEOF
11325 #define WITH_PYTHON_PATH "${python_prefix}"
11326 _ACEOF
11329 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11330 if test "x$prefix" = xNONE; then
11331 test_prefix=/usr/local
11332 else
11333 test_prefix=$prefix
11335 else
11336 test_prefix=$exec_prefix
11338 value=0
11339 case ${python_prefix} in
11340 "${test_prefix}"|"${test_prefix}/"*|\
11341 '${exec_prefix}'|'${exec_prefix}/'*)
11342 value=1
11344 esac
11346 cat >>confdefs.h <<_ACEOF
11347 #define PYTHON_PATH_RELOCATABLE $value
11348 _ACEOF
11356 # Check whether --with-python-libdir was given.
11357 if test "${with_python_libdir+set}" = set; then :
11358 withval=$with_python_libdir;
11359 else
11361 # If no python libdir is specified then select one based on
11362 # python's prefix path.
11363 if test -n "${python_prefix}"; then
11364 with_python_libdir=${python_prefix}/lib
11370 if test "${have_libpython}" != no; then
11372 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
11374 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
11375 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
11376 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
11377 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
11378 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
11380 if test -n "${with_python_libdir}"; then
11382 cat >>confdefs.h <<_ACEOF
11383 #define WITH_PYTHON_LIBDIR "${with_python_libdir}"
11384 _ACEOF
11387 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
11388 if test "x$prefix" = xNONE; then
11389 test_prefix=/usr/local
11390 else
11391 test_prefix=$prefix
11393 else
11394 test_prefix=$exec_prefix
11396 value=0
11397 case ${with_python_libdir} in
11398 "${test_prefix}"|"${test_prefix}/"*|\
11399 '${exec_prefix}'|'${exec_prefix}/'*)
11400 value=1
11402 esac
11404 cat >>confdefs.h <<_ACEOF
11405 #define PYTHON_LIBDIR_RELOCATABLE $value
11406 _ACEOF
11411 # Flags needed to compile Python code (taken from python-config --cflags).
11412 # We cannot call python-config directly because it will output whatever was
11413 # used when compiling the Python interpreter itself, including flags which
11414 # would make the python-related objects be compiled differently from the
11415 # rest of GDB (e.g., -O2 and -fPIC).
11416 if test "${GCC}" = yes; then
11417 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
11418 # Python headers recommend -DNDEBUG, but it's unclear if that just
11419 # refers to building Python itself. In release mode, though, it
11420 # doesn't hurt for the Python code in gdb to follow.
11421 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
11424 if test "x${tentative_python_cflags}" != x; then
11425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
11426 $as_echo_n "checking compiler flags for python code... " >&6; }
11427 for flag in ${tentative_python_cflags}; do
11428 # Check that the compiler accepts it
11429 saved_CFLAGS="$CFLAGS"
11430 CFLAGS="$CFLAGS $flag"
11431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11432 /* end confdefs.h. */
11435 main ()
11439 return 0;
11441 _ACEOF
11442 if ac_fn_c_try_compile "$LINENO"; then :
11443 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
11445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11446 CFLAGS="$saved_CFLAGS"
11447 done
11448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
11449 $as_echo "${PYTHON_CFLAGS}" >&6; }
11452 # On x64 Windows, Python's include headers, and pyconfig.h in
11453 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
11454 # version of Windows. Unfortunately, MS_WIN64 is only defined if
11455 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
11456 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
11457 # The issue was reported to the Python community, but still isn't
11458 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
11460 case "$gdb_host" in
11461 mingw64)
11462 if test "${GCC}" = yes; then
11463 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
11466 esac
11467 else
11468 # Even if Python support is not compiled in, we need to have this file
11469 # included so that the "python" command, et.al., still exists.
11470 CONFIG_OBS="$CONFIG_OBS python/python.o"
11471 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
11474 # Work around Python http://bugs.python.org/issue10112. See also
11475 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
11476 # no effect. Note that the only test after this that uses Python is
11477 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
11478 # run without -export-dynamic too.
11479 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
11484 if test "${have_libpython}" != no; then
11485 HAVE_PYTHON_TRUE=
11486 HAVE_PYTHON_FALSE='#'
11487 else
11488 HAVE_PYTHON_TRUE='#'
11489 HAVE_PYTHON_FALSE=
11493 # -------------------- #
11494 # Check for libguile. #
11495 # -------------------- #
11502 # Check whether --with-guile was given.
11503 if test "${with_guile+set}" = set; then :
11504 withval=$with_guile;
11505 else
11506 with_guile=auto
11509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
11510 $as_echo_n "checking whether to use guile... " >&6; }
11511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
11512 $as_echo "$with_guile" >&6; }
11514 # Extract the first word of "pkg-config", so it can be a program name with args.
11515 set dummy pkg-config; ac_word=$2
11516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11517 $as_echo_n "checking for $ac_word... " >&6; }
11518 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
11519 $as_echo_n "(cached) " >&6
11520 else
11521 case $pkg_config_prog_path in
11522 [\\/]* | ?:[\\/]*)
11523 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
11526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11527 for as_dir in $PATH
11529 IFS=$as_save_IFS
11530 test -z "$as_dir" && as_dir=.
11531 for ac_exec_ext in '' $ac_executable_extensions; do
11532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11533 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
11534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11535 break 2
11537 done
11538 done
11539 IFS=$as_save_IFS
11541 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
11543 esac
11545 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
11546 if test -n "$pkg_config_prog_path"; then
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
11548 $as_echo "$pkg_config_prog_path" >&6; }
11549 else
11550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11551 $as_echo "no" >&6; }
11556 try_guile_versions="guile-3.0 guile-2.2 guile-2.0"
11557 have_libguile=no
11558 case "${with_guile}" in
11560 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
11561 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
11563 auto)
11564 if test "${pkg_config_prog_path}" = "missing"; then
11565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
11566 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
11567 else
11569 pkg_config=${pkg_config_prog_path}
11570 guile_version_list=${try_guile_versions}
11571 flag_errors=no
11573 found_usable_guile=checking
11574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11575 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11576 for guile_version in ${guile_version_list}; do
11577 ${pkg_config} --exists ${guile_version} 2>/dev/null
11578 if test $? != 0; then
11579 continue
11581 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11582 if test $? != 0; then
11583 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11585 new_LIBS=`${pkg_config} --libs ${guile_version}`
11586 if test $? != 0; then
11587 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11589 found_usable_guile=${guile_version}
11590 break
11591 done
11592 if test "${found_usable_guile}" = "checking"; then
11593 if test "${flag_errors}" = "yes"; then
11594 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11595 else
11596 found_usable_guile=no
11599 if test "${found_usable_guile}" != no; then
11600 save_CPPFLAGS=$CPPFLAGS
11601 save_LIBS=$LIBS
11602 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11603 LIBS="$LIBS $new_LIBS"
11604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11605 /* end confdefs.h. */
11606 #include "libguile.h"
11608 main ()
11610 scm_init_guile ();
11612 return 0;
11614 _ACEOF
11615 if ac_fn_c_try_link "$LINENO"; then :
11616 have_libguile=yes
11617 GUILE_CPPFLAGS=$new_CPPFLAGS
11618 GUILE_LIBS=$new_LIBS
11619 else
11620 found_usable_guile=no
11622 rm -f core conftest.err conftest.$ac_objext \
11623 conftest$ac_exeext conftest.$ac_ext
11624 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11625 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11627 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11632 CPPFLAGS=$save_CPPFLAGS
11633 LIBS=$save_LIBS
11634 if test "${found_usable_guile}" = no; then
11635 if test "${flag_errors}" = yes; then
11636 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11637 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11638 as_fn_error $? "linking guile version ${guile_version} test program failed
11639 See \`config.log' for more details" "$LINENO" 5; }
11643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11644 $as_echo "${found_usable_guile}" >&6; }
11648 yes)
11649 if test "${pkg_config_prog_path}" = "missing"; then
11650 as_fn_error $? "pkg-config not found" "$LINENO" 5
11653 pkg_config=${pkg_config_prog_path}
11654 guile_version_list=${try_guile_versions}
11655 flag_errors=yes
11657 found_usable_guile=checking
11658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11659 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11660 for guile_version in ${guile_version_list}; do
11661 ${pkg_config} --exists ${guile_version} 2>/dev/null
11662 if test $? != 0; then
11663 continue
11665 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11666 if test $? != 0; then
11667 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11669 new_LIBS=`${pkg_config} --libs ${guile_version}`
11670 if test $? != 0; then
11671 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11673 found_usable_guile=${guile_version}
11674 break
11675 done
11676 if test "${found_usable_guile}" = "checking"; then
11677 if test "${flag_errors}" = "yes"; then
11678 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11679 else
11680 found_usable_guile=no
11683 if test "${found_usable_guile}" != no; then
11684 save_CPPFLAGS=$CPPFLAGS
11685 save_LIBS=$LIBS
11686 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11687 LIBS="$LIBS $new_LIBS"
11688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11689 /* end confdefs.h. */
11690 #include "libguile.h"
11692 main ()
11694 scm_init_guile ();
11696 return 0;
11698 _ACEOF
11699 if ac_fn_c_try_link "$LINENO"; then :
11700 have_libguile=yes
11701 GUILE_CPPFLAGS=$new_CPPFLAGS
11702 GUILE_LIBS=$new_LIBS
11703 else
11704 found_usable_guile=no
11706 rm -f core conftest.err conftest.$ac_objext \
11707 conftest$ac_exeext conftest.$ac_ext
11708 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11709 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11711 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11716 CPPFLAGS=$save_CPPFLAGS
11717 LIBS=$save_LIBS
11718 if test "${found_usable_guile}" = no; then
11719 if test "${flag_errors}" = yes; then
11720 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11721 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11722 as_fn_error $? "linking guile version ${guile_version} test program failed
11723 See \`config.log' for more details" "$LINENO" 5; }
11727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11728 $as_echo "${found_usable_guile}" >&6; }
11731 [\\/]* | ?:[\\/]*)
11732 if test -x "${with_guile}"; then
11734 pkg_config=${with_guile}
11735 guile_version_list=${try_guile_versions}
11736 flag_errors=yes
11738 found_usable_guile=checking
11739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11740 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11741 for guile_version in ${guile_version_list}; do
11742 ${pkg_config} --exists ${guile_version} 2>/dev/null
11743 if test $? != 0; then
11744 continue
11746 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11747 if test $? != 0; then
11748 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11750 new_LIBS=`${pkg_config} --libs ${guile_version}`
11751 if test $? != 0; then
11752 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11754 found_usable_guile=${guile_version}
11755 break
11756 done
11757 if test "${found_usable_guile}" = "checking"; then
11758 if test "${flag_errors}" = "yes"; then
11759 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11760 else
11761 found_usable_guile=no
11764 if test "${found_usable_guile}" != no; then
11765 save_CPPFLAGS=$CPPFLAGS
11766 save_LIBS=$LIBS
11767 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11768 LIBS="$LIBS $new_LIBS"
11769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11770 /* end confdefs.h. */
11771 #include "libguile.h"
11773 main ()
11775 scm_init_guile ();
11777 return 0;
11779 _ACEOF
11780 if ac_fn_c_try_link "$LINENO"; then :
11781 have_libguile=yes
11782 GUILE_CPPFLAGS=$new_CPPFLAGS
11783 GUILE_LIBS=$new_LIBS
11784 else
11785 found_usable_guile=no
11787 rm -f core conftest.err conftest.$ac_objext \
11788 conftest$ac_exeext conftest.$ac_ext
11789 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11790 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11792 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11797 CPPFLAGS=$save_CPPFLAGS
11798 LIBS=$save_LIBS
11799 if test "${found_usable_guile}" = no; then
11800 if test "${flag_errors}" = yes; then
11801 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11802 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11803 as_fn_error $? "linking guile version ${guile_version} test program failed
11804 See \`config.log' for more details" "$LINENO" 5; }
11808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11809 $as_echo "${found_usable_guile}" >&6; }
11811 else
11812 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11815 "" | */*)
11816 # Disallow --with=guile="" and --with-guile=foo/bar.
11817 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11820 # A space separate list of guile versions to try, in order.
11821 if test "${pkg_config_prog_path}" = "missing"; then
11822 as_fn_error $? "pkg-config not found" "$LINENO" 5
11825 pkg_config=${pkg_config_prog_path}
11826 guile_version_list=${with_guile}
11827 flag_errors=yes
11829 found_usable_guile=checking
11830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11831 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11832 for guile_version in ${guile_version_list}; do
11833 ${pkg_config} --exists ${guile_version} 2>/dev/null
11834 if test $? != 0; then
11835 continue
11837 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11838 if test $? != 0; then
11839 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11841 new_LIBS=`${pkg_config} --libs ${guile_version}`
11842 if test $? != 0; then
11843 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11845 found_usable_guile=${guile_version}
11846 break
11847 done
11848 if test "${found_usable_guile}" = "checking"; then
11849 if test "${flag_errors}" = "yes"; then
11850 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11851 else
11852 found_usable_guile=no
11855 if test "${found_usable_guile}" != no; then
11856 save_CPPFLAGS=$CPPFLAGS
11857 save_LIBS=$LIBS
11858 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11859 LIBS="$LIBS $new_LIBS"
11860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11861 /* end confdefs.h. */
11862 #include "libguile.h"
11864 main ()
11866 scm_init_guile ();
11868 return 0;
11870 _ACEOF
11871 if ac_fn_c_try_link "$LINENO"; then :
11872 have_libguile=yes
11873 GUILE_CPPFLAGS=$new_CPPFLAGS
11874 GUILE_LIBS=$new_LIBS
11875 else
11876 found_usable_guile=no
11878 rm -f core conftest.err conftest.$ac_objext \
11879 conftest$ac_exeext conftest.$ac_ext
11880 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11881 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11883 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11888 CPPFLAGS=$save_CPPFLAGS
11889 LIBS=$save_LIBS
11890 if test "${found_usable_guile}" = no; then
11891 if test "${flag_errors}" = yes; then
11892 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11893 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11894 as_fn_error $? "linking guile version ${guile_version} test program failed
11895 See \`config.log' for more details" "$LINENO" 5; }
11899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11900 $as_echo "${found_usable_guile}" >&6; }
11903 esac
11905 if test "${have_libguile}" != no; then
11906 case "${with_guile}" in
11907 [\\/]* | ?:[\\/]*)
11909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11910 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11911 if ${ac_cv_guild_program_name+:} false; then :
11912 $as_echo_n "(cached) " >&6
11913 else
11914 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11916 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11917 # the 'guild' and 'bindir' variables. In that case, try to guess
11918 # what the program name is, at the risk of getting it wrong if
11919 # Guile was configured with '--program-suffix' or similar.
11920 if test "x$ac_cv_guild_program_name" = "x"; then
11921 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11922 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11927 $as_echo "$ac_cv_guild_program_name" >&6; }
11929 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11930 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11933 GUILD="$ac_cv_guild_program_name"
11939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11940 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11941 if ${ac_cv_guild_program_name+:} false; then :
11942 $as_echo_n "(cached) " >&6
11943 else
11944 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11946 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11947 # the 'guild' and 'bindir' variables. In that case, try to guess
11948 # what the program name is, at the risk of getting it wrong if
11949 # Guile was configured with '--program-suffix' or similar.
11950 if test "x$ac_cv_guild_program_name" = "x"; then
11951 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11952 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11957 $as_echo "$ac_cv_guild_program_name" >&6; }
11959 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11960 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11963 GUILD="$ac_cv_guild_program_name"
11967 esac
11970 if test "$cross_compiling" = no; then
11971 GUILD_TARGET_FLAG=
11972 else
11973 GUILD_TARGET_FLAG="--target=$host"
11979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11980 $as_echo_n "checking whether guild supports this host... " >&6; }
11981 if ${ac_cv_guild_ok+:} false; then :
11982 $as_echo_n "(cached) " >&6
11983 else
11984 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11985 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11986 ac_cv_guild_ok=yes
11987 else
11988 ac_cv_guild_ok=no
11991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11992 $as_echo "$ac_cv_guild_ok" >&6; }
11994 if test "$ac_cv_guild_ok" = no; then
11995 have_libguile=no
11996 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11997 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
12001 if test "${have_libguile}" != no; then
12003 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
12005 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
12006 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
12007 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
12008 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
12009 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
12011 save_LIBS="$LIBS"
12012 save_CPPFLAGS="$CPPFLAGS"
12013 LIBS="$GUILE_LIBS"
12014 CPPFLAGS="$GUILE_CPPFLAGS"
12015 for ac_func in scm_new_smob
12016 do :
12017 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
12018 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
12019 cat >>confdefs.h <<_ACEOF
12020 #define HAVE_SCM_NEW_SMOB 1
12021 _ACEOF
12024 done
12026 LIBS="$save_LIBS"
12027 CPPFLAGS="$save_CPPFLAGS"
12028 else
12029 # Even if Guile support is not compiled in, we need to have these files
12030 # included.
12031 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
12032 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
12036 if test "${have_libguile}" != no; then
12037 HAVE_GUILE_TRUE=
12038 HAVE_GUILE_FALSE='#'
12039 else
12040 HAVE_GUILE_TRUE='#'
12041 HAVE_GUILE_FALSE=
12045 # ---------------------------- #
12046 # Check for source highlight. #
12047 # ---------------------------- #
12049 SRCHIGH_LIBS=
12050 SRCHIGH_CFLAGS=
12052 # Check whether --enable-source-highlight was given.
12053 if test "${enable_source_highlight+set}" = set; then :
12054 enableval=$enable_source_highlight;
12055 case $enableval in
12056 yes | no | auto)
12059 as_fn_error $? "bad value $enableval for --enable-source-highlight" "$LINENO" 5
12061 esac
12063 else
12064 enable_source_highlight=auto
12068 if test "${enable_source_highlight}" != "no"; then
12069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
12070 $as_echo_n "checking for the source-highlight library... " >&6; }
12071 if test "${pkg_config_prog_path}" = "missing"; then
12072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
12073 $as_echo "no - pkg-config not found" >&6; }
12074 if test "${enable_source_highlight}" = "yes"; then
12075 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
12077 else
12078 if ${pkg_config_prog_path} --exists source-highlight; then
12079 case "$LDFLAGS" in
12080 *static-libstdc*)
12081 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
12083 esac
12085 srchigh_pkg_cflags=`${pkg_config_prog_path} --cflags source-highlight`
12086 srchigh_pkg_libs=`${pkg_config_prog_path} --libs source-highlight`
12088 # Now that we have found a source-highlight library, check if we can use
12089 # it. In particular, we're trying to detect the situation that the
12090 # library is using the new libstdc++ library abi ( see
12091 # https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html )
12092 # while the compiler being used to compile gdb is using the old abi.
12093 # Such a situation will result in an undefined reference to
12094 # srchilite::SourceHighlight::SourceHighlight(std::string const&).
12095 # This situation can occur for instance when using a source highlight
12096 # library compiled with g++ 7.5.0 while building gdb with g++ 4.8.5.
12097 ac_ext=cpp
12098 ac_cpp='$CXXCPP $CPPFLAGS'
12099 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12100 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12101 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12103 save_CXXFLAGS="$CXXFLAGS"
12104 save_LIBS="$LIBS"
12105 CXXFLAGS="$CXXFLAGS $srchigh_pkg_cflags"
12106 LIBS="$LIBS $srchigh_pkg_libs"
12107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12108 /* end confdefs.h. */
12109 #include <srchilite/sourcehighlight.h>
12111 main ()
12113 std::string outlang = "esc.outlang";
12114 new srchilite::SourceHighlight (outlang);
12117 return 0;
12119 _ACEOF
12120 if ac_fn_cxx_try_link "$LINENO"; then :
12121 have_usable_source_highlight=yes
12122 else
12123 have_usable_source_highlight=no
12126 rm -f core conftest.err conftest.$ac_objext \
12127 conftest$ac_exeext conftest.$ac_ext
12128 CXXFLAGS="$save_CXXFLAGS"
12129 LIBS="$save_LIBS"
12130 ac_ext=c
12131 ac_cpp='$CPP $CPPFLAGS'
12132 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12133 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12137 if test "${have_usable_source_highlight}" = "yes"; then
12139 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
12141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12142 $as_echo "yes" >&6; }
12143 SRCHIGH_CFLAGS="$srchigh_pkg_cflags"
12144 SRCHIGH_LIBS="$srchigh_pkg_libs"
12145 else
12146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12147 $as_echo "no" >&6; }
12148 if test "${enable_source_highlight}" = "yes"; then
12149 as_fn_error $? "source-highlight in your system could not be used" "$LINENO" 5
12152 else
12153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12154 $as_echo "no" >&6; }
12155 if test "${enable_source_highlight}" = "yes"; then
12156 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
12164 # ------------------------- #
12165 # Checks for header files. #
12166 # ------------------------- #
12168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12169 $as_echo_n "checking for ANSI C header files... " >&6; }
12170 if ${ac_cv_header_stdc+:} false; then :
12171 $as_echo_n "(cached) " >&6
12172 else
12173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12174 /* end confdefs.h. */
12175 #include <stdlib.h>
12176 #include <stdarg.h>
12177 #include <string.h>
12178 #include <float.h>
12181 main ()
12185 return 0;
12187 _ACEOF
12188 if ac_fn_c_try_compile "$LINENO"; then :
12189 ac_cv_header_stdc=yes
12190 else
12191 ac_cv_header_stdc=no
12193 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12195 if test $ac_cv_header_stdc = yes; then
12196 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12198 /* end confdefs.h. */
12199 #include <string.h>
12201 _ACEOF
12202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12203 $EGREP "memchr" >/dev/null 2>&1; then :
12205 else
12206 ac_cv_header_stdc=no
12208 rm -f conftest*
12212 if test $ac_cv_header_stdc = yes; then
12213 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12215 /* end confdefs.h. */
12216 #include <stdlib.h>
12218 _ACEOF
12219 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12220 $EGREP "free" >/dev/null 2>&1; then :
12222 else
12223 ac_cv_header_stdc=no
12225 rm -f conftest*
12229 if test $ac_cv_header_stdc = yes; then
12230 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12231 if test "$cross_compiling" = yes; then :
12233 else
12234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12235 /* end confdefs.h. */
12236 #include <ctype.h>
12237 #include <stdlib.h>
12238 #if ((' ' & 0x0FF) == 0x020)
12239 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12240 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12241 #else
12242 # define ISLOWER(c) \
12243 (('a' <= (c) && (c) <= 'i') \
12244 || ('j' <= (c) && (c) <= 'r') \
12245 || ('s' <= (c) && (c) <= 'z'))
12246 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12247 #endif
12249 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12251 main ()
12253 int i;
12254 for (i = 0; i < 256; i++)
12255 if (XOR (islower (i), ISLOWER (i))
12256 || toupper (i) != TOUPPER (i))
12257 return 2;
12258 return 0;
12260 _ACEOF
12261 if ac_fn_c_try_run "$LINENO"; then :
12263 else
12264 ac_cv_header_stdc=no
12266 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12267 conftest.$ac_objext conftest.beam conftest.$ac_ext
12272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12273 $as_echo "$ac_cv_header_stdc" >&6; }
12274 if test $ac_cv_header_stdc = yes; then
12276 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12280 # elf_hp.h is for HP/UX 64-bit shared library support.
12281 for ac_header in nlist.h machine/reg.h \
12282 thread_db.h \
12283 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
12284 sys/procctl.h sys/resource.h sys/ptrace.h ptrace.h \
12285 sys/reg.h sys/debugreg.h \
12286 termios.h elf_hp.h
12287 do :
12288 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12289 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12290 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12291 cat >>confdefs.h <<_ACEOF
12292 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12293 _ACEOF
12297 done
12299 for ac_header in sys/user.h
12300 do :
12301 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
12302 # include <sys/param.h>
12303 #endif
12306 if test "x$ac_cv_header_sys_user_h" = xyes; then :
12307 cat >>confdefs.h <<_ACEOF
12308 #define HAVE_SYS_USER_H 1
12309 _ACEOF
12313 done
12316 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
12317 do :
12318 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12319 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12320 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12321 cat >>confdefs.h <<_ACEOF
12322 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12323 _ACEOF
12327 done
12329 for ac_header in term.h
12330 do :
12331 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
12332 # include <curses.h>
12333 #endif
12336 if test "x$ac_cv_header_term_h" = xyes; then :
12337 cat >>confdefs.h <<_ACEOF
12338 #define HAVE_TERM_H 1
12339 _ACEOF
12343 done
12346 for ac_header in sys/socket.h
12347 do :
12348 ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
12349 if test "x$ac_cv_header_sys_socket_h" = xyes; then :
12350 cat >>confdefs.h <<_ACEOF
12351 #define HAVE_SYS_SOCKET_H 1
12352 _ACEOF
12356 done
12358 for ac_header in ws2tcpip.h
12359 do :
12360 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
12361 if test "x$ac_cv_header_ws2tcpip_h" = xyes; then :
12362 cat >>confdefs.h <<_ACEOF
12363 #define HAVE_WS2TCPIP_H 1
12364 _ACEOF
12368 done
12370 for ac_header in execinfo.h
12371 do :
12372 ac_fn_c_check_header_mongrel "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default"
12373 if test "x$ac_cv_header_execinfo_h" = xyes; then :
12374 cat >>confdefs.h <<_ACEOF
12375 #define HAVE_EXECINFO_H 1
12376 _ACEOF
12380 done
12383 # ------------------------- #
12384 # Checks for declarations. #
12385 # ------------------------- #
12388 # Check for presence and size of long long.
12389 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12390 if test "x$ac_cv_type_long_long" = xyes; then :
12392 cat >>confdefs.h <<_ACEOF
12393 #define HAVE_LONG_LONG 1
12394 _ACEOF
12396 # The cast to long int works around a bug in the HP C Compiler
12397 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12398 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12399 # This bug is HP SR number 8606223364.
12400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
12401 $as_echo_n "checking size of long long... " >&6; }
12402 if ${ac_cv_sizeof_long_long+:} false; then :
12403 $as_echo_n "(cached) " >&6
12404 else
12405 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
12407 else
12408 if test "$ac_cv_type_long_long" = yes; then
12409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12410 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12411 as_fn_error 77 "cannot compute sizeof (long long)
12412 See \`config.log' for more details" "$LINENO" 5; }
12413 else
12414 ac_cv_sizeof_long_long=0
12419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
12420 $as_echo "$ac_cv_sizeof_long_long" >&6; }
12424 cat >>confdefs.h <<_ACEOF
12425 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
12426 _ACEOF
12432 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
12433 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
12434 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
12435 ac_have_decl=1
12436 else
12437 ac_have_decl=0
12440 cat >>confdefs.h <<_ACEOF
12441 #define HAVE_DECL_BASENAME $ac_have_decl
12442 _ACEOF
12443 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
12444 if test "x$ac_cv_have_decl_ffs" = xyes; then :
12445 ac_have_decl=1
12446 else
12447 ac_have_decl=0
12450 cat >>confdefs.h <<_ACEOF
12451 #define HAVE_DECL_FFS $ac_have_decl
12452 _ACEOF
12453 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
12454 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
12455 ac_have_decl=1
12456 else
12457 ac_have_decl=0
12460 cat >>confdefs.h <<_ACEOF
12461 #define HAVE_DECL_ASPRINTF $ac_have_decl
12462 _ACEOF
12463 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
12464 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
12465 ac_have_decl=1
12466 else
12467 ac_have_decl=0
12470 cat >>confdefs.h <<_ACEOF
12471 #define HAVE_DECL_VASPRINTF $ac_have_decl
12472 _ACEOF
12473 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12474 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12475 ac_have_decl=1
12476 else
12477 ac_have_decl=0
12480 cat >>confdefs.h <<_ACEOF
12481 #define HAVE_DECL_SNPRINTF $ac_have_decl
12482 _ACEOF
12483 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
12484 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
12485 ac_have_decl=1
12486 else
12487 ac_have_decl=0
12490 cat >>confdefs.h <<_ACEOF
12491 #define HAVE_DECL_VSNPRINTF $ac_have_decl
12492 _ACEOF
12494 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
12495 if test "x$ac_cv_have_decl_strtol" = xyes; then :
12496 ac_have_decl=1
12497 else
12498 ac_have_decl=0
12501 cat >>confdefs.h <<_ACEOF
12502 #define HAVE_DECL_STRTOL $ac_have_decl
12503 _ACEOF
12504 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
12505 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
12506 ac_have_decl=1
12507 else
12508 ac_have_decl=0
12511 cat >>confdefs.h <<_ACEOF
12512 #define HAVE_DECL_STRTOUL $ac_have_decl
12513 _ACEOF
12514 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
12515 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
12516 ac_have_decl=1
12517 else
12518 ac_have_decl=0
12521 cat >>confdefs.h <<_ACEOF
12522 #define HAVE_DECL_STRTOLL $ac_have_decl
12523 _ACEOF
12524 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
12525 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
12526 ac_have_decl=1
12527 else
12528 ac_have_decl=0
12531 cat >>confdefs.h <<_ACEOF
12532 #define HAVE_DECL_STRTOULL $ac_have_decl
12533 _ACEOF
12535 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
12536 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
12537 ac_have_decl=1
12538 else
12539 ac_have_decl=0
12542 cat >>confdefs.h <<_ACEOF
12543 #define HAVE_DECL_STRVERSCMP $ac_have_decl
12544 _ACEOF
12548 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
12549 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
12550 ac_have_decl=1
12551 else
12552 ac_have_decl=0
12555 cat >>confdefs.h <<_ACEOF
12556 #define HAVE_DECL_SNPRINTF $ac_have_decl
12557 _ACEOF
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12561 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12562 if ${am_cv_val_LC_MESSAGES+:} false; then :
12563 $as_echo_n "(cached) " >&6
12564 else
12565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12566 /* end confdefs.h. */
12567 #include <locale.h>
12569 main ()
12571 return LC_MESSAGES
12573 return 0;
12575 _ACEOF
12576 if ac_fn_c_try_link "$LINENO"; then :
12577 am_cv_val_LC_MESSAGES=yes
12578 else
12579 am_cv_val_LC_MESSAGES=no
12581 rm -f core conftest.err conftest.$ac_objext \
12582 conftest$ac_exeext conftest.$ac_ext
12584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12585 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12586 if test $am_cv_val_LC_MESSAGES = yes; then
12588 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12593 # ------------------ #
12594 # Checks for types. #
12595 # ------------------ #
12597 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
12598 #if HAVE_SYS_SOCKET_H
12599 # include <sys/socket.h>
12600 #elif HAVE_WS2TCPIP_H
12601 # include <ws2tcpip.h>
12602 #endif
12605 if test "x$ac_cv_type_socklen_t" = xyes; then :
12607 cat >>confdefs.h <<_ACEOF
12608 #define HAVE_SOCKLEN_T 1
12609 _ACEOF
12615 # ------------------------------------- #
12616 # Checks for compiler characteristics. #
12617 # ------------------------------------- #
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12620 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
12621 if ${ac_cv_c_const+:} false; then :
12622 $as_echo_n "(cached) " >&6
12623 else
12624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12625 /* end confdefs.h. */
12628 main ()
12631 #ifndef __cplusplus
12632 /* Ultrix mips cc rejects this sort of thing. */
12633 typedef int charset[2];
12634 const charset cs = { 0, 0 };
12635 /* SunOS 4.1.1 cc rejects this. */
12636 char const *const *pcpcc;
12637 char **ppc;
12638 /* NEC SVR4.0.2 mips cc rejects this. */
12639 struct point {int x, y;};
12640 static struct point const zero = {0,0};
12641 /* AIX XL C 1.02.0.0 rejects this.
12642 It does not let you subtract one const X* pointer from another in
12643 an arm of an if-expression whose if-part is not a constant
12644 expression */
12645 const char *g = "string";
12646 pcpcc = &g + (g ? g-g : 0);
12647 /* HPUX 7.0 cc rejects these. */
12648 ++pcpcc;
12649 ppc = (char**) pcpcc;
12650 pcpcc = (char const *const *) ppc;
12651 { /* SCO 3.2v4 cc rejects this sort of thing. */
12652 char tx;
12653 char *t = &tx;
12654 char const *s = 0 ? (char *) 0 : (char const *) 0;
12656 *t++ = 0;
12657 if (s) return 0;
12659 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12660 int x[] = {25, 17};
12661 const int *foo = &x[0];
12662 ++foo;
12664 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12665 typedef const int *iptr;
12666 iptr p = 0;
12667 ++p;
12669 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
12670 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12671 struct s { int j; const int *ap[3]; } bx;
12672 struct s *b = &bx; b->j = 5;
12674 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12675 const int foo = 10;
12676 if (!foo) return 0;
12678 return !cs[0] && !zero.x;
12679 #endif
12682 return 0;
12684 _ACEOF
12685 if ac_fn_c_try_compile "$LINENO"; then :
12686 ac_cv_c_const=yes
12687 else
12688 ac_cv_c_const=no
12690 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12693 $as_echo "$ac_cv_c_const" >&6; }
12694 if test $ac_cv_c_const = no; then
12696 $as_echo "#define const /**/" >>confdefs.h
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
12701 $as_echo_n "checking for inline... " >&6; }
12702 if ${ac_cv_c_inline+:} false; then :
12703 $as_echo_n "(cached) " >&6
12704 else
12705 ac_cv_c_inline=no
12706 for ac_kw in inline __inline__ __inline; do
12707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12708 /* end confdefs.h. */
12709 #ifndef __cplusplus
12710 typedef int foo_t;
12711 static $ac_kw foo_t static_foo () {return 0; }
12712 $ac_kw foo_t foo () {return 0; }
12713 #endif
12715 _ACEOF
12716 if ac_fn_c_try_compile "$LINENO"; then :
12717 ac_cv_c_inline=$ac_kw
12719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12720 test "$ac_cv_c_inline" != no && break
12721 done
12724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
12725 $as_echo "$ac_cv_c_inline" >&6; }
12727 case $ac_cv_c_inline in
12728 inline | yes) ;;
12730 case $ac_cv_c_inline in
12731 no) ac_val=;;
12732 *) ac_val=$ac_cv_c_inline;;
12733 esac
12734 cat >>confdefs.h <<_ACEOF
12735 #ifndef __cplusplus
12736 #define inline $ac_val
12737 #endif
12738 _ACEOF
12740 esac
12742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
12743 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
12744 if ${ac_cv_c_bigendian+:} false; then :
12745 $as_echo_n "(cached) " >&6
12746 else
12747 ac_cv_c_bigendian=unknown
12748 # See if we're dealing with a universal compiler.
12749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12750 /* end confdefs.h. */
12751 #ifndef __APPLE_CC__
12752 not a universal capable compiler
12753 #endif
12754 typedef int dummy;
12756 _ACEOF
12757 if ac_fn_c_try_compile "$LINENO"; then :
12759 # Check for potential -arch flags. It is not universal unless
12760 # there are at least two -arch flags with different values.
12761 ac_arch=
12762 ac_prev=
12763 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12764 if test -n "$ac_prev"; then
12765 case $ac_word in
12766 i?86 | x86_64 | ppc | ppc64)
12767 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12768 ac_arch=$ac_word
12769 else
12770 ac_cv_c_bigendian=universal
12771 break
12774 esac
12775 ac_prev=
12776 elif test "x$ac_word" = "x-arch"; then
12777 ac_prev=arch
12779 done
12781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12782 if test $ac_cv_c_bigendian = unknown; then
12783 # See if sys/param.h defines the BYTE_ORDER macro.
12784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12785 /* end confdefs.h. */
12786 #include <sys/types.h>
12787 #include <sys/param.h>
12790 main ()
12792 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12793 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12794 && LITTLE_ENDIAN)
12795 bogus endian macros
12796 #endif
12799 return 0;
12801 _ACEOF
12802 if ac_fn_c_try_compile "$LINENO"; then :
12803 # It does; now see whether it defined to BIG_ENDIAN or not.
12804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12805 /* end confdefs.h. */
12806 #include <sys/types.h>
12807 #include <sys/param.h>
12810 main ()
12812 #if BYTE_ORDER != BIG_ENDIAN
12813 not big endian
12814 #endif
12817 return 0;
12819 _ACEOF
12820 if ac_fn_c_try_compile "$LINENO"; then :
12821 ac_cv_c_bigendian=yes
12822 else
12823 ac_cv_c_bigendian=no
12825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12829 if test $ac_cv_c_bigendian = unknown; then
12830 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12832 /* end confdefs.h. */
12833 #include <limits.h>
12836 main ()
12838 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12839 bogus endian macros
12840 #endif
12843 return 0;
12845 _ACEOF
12846 if ac_fn_c_try_compile "$LINENO"; then :
12847 # It does; now see whether it defined to _BIG_ENDIAN or not.
12848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12849 /* end confdefs.h. */
12850 #include <limits.h>
12853 main ()
12855 #ifndef _BIG_ENDIAN
12856 not big endian
12857 #endif
12860 return 0;
12862 _ACEOF
12863 if ac_fn_c_try_compile "$LINENO"; then :
12864 ac_cv_c_bigendian=yes
12865 else
12866 ac_cv_c_bigendian=no
12868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12870 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12872 if test $ac_cv_c_bigendian = unknown; then
12873 # Compile a test program.
12874 if test "$cross_compiling" = yes; then :
12875 # Try to guess by grepping values from an object file.
12876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12877 /* end confdefs.h. */
12878 short int ascii_mm[] =
12879 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12880 short int ascii_ii[] =
12881 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12882 int use_ascii (int i) {
12883 return ascii_mm[i] + ascii_ii[i];
12885 short int ebcdic_ii[] =
12886 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12887 short int ebcdic_mm[] =
12888 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12889 int use_ebcdic (int i) {
12890 return ebcdic_mm[i] + ebcdic_ii[i];
12892 extern int foo;
12895 main ()
12897 return use_ascii (foo) == use_ebcdic (foo);
12899 return 0;
12901 _ACEOF
12902 if ac_fn_c_try_compile "$LINENO"; then :
12903 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12904 ac_cv_c_bigendian=yes
12906 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12907 if test "$ac_cv_c_bigendian" = unknown; then
12908 ac_cv_c_bigendian=no
12909 else
12910 # finding both strings is unlikely to happen, but who knows?
12911 ac_cv_c_bigendian=unknown
12915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12916 else
12917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12918 /* end confdefs.h. */
12919 $ac_includes_default
12921 main ()
12924 /* Are we little or big endian? From Harbison&Steele. */
12925 union
12927 long int l;
12928 char c[sizeof (long int)];
12929 } u;
12930 u.l = 1;
12931 return u.c[sizeof (long int) - 1] == 1;
12934 return 0;
12936 _ACEOF
12937 if ac_fn_c_try_run "$LINENO"; then :
12938 ac_cv_c_bigendian=no
12939 else
12940 ac_cv_c_bigendian=yes
12942 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12943 conftest.$ac_objext conftest.beam conftest.$ac_ext
12948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12949 $as_echo "$ac_cv_c_bigendian" >&6; }
12950 case $ac_cv_c_bigendian in #(
12951 yes)
12952 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12953 ;; #(
12955 ;; #(
12956 universal)
12958 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12960 ;; #(
12962 as_fn_error $? "unknown endianness
12963 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12964 esac
12967 # ------------------------------ #
12968 # Checks for library functions. #
12969 # ------------------------------ #
12971 for ac_func in getuid getgid \
12972 pipe pread pread64 pwrite resize_term \
12973 getpgid setsid \
12974 sigaction sigsetmask socketpair \
12975 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12976 setrlimit getrlimit posix_madvise waitpid \
12977 use_default_colors
12978 do :
12979 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12980 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12981 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12982 cat >>confdefs.h <<_ACEOF
12983 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12984 _ACEOF
12987 done
12990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12991 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12992 if ${am_cv_langinfo_codeset+:} false; then :
12993 $as_echo_n "(cached) " >&6
12994 else
12995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12996 /* end confdefs.h. */
12997 #include <langinfo.h>
12999 main ()
13001 char* cs = nl_langinfo(CODESET);
13003 return 0;
13005 _ACEOF
13006 if ac_fn_c_try_link "$LINENO"; then :
13007 am_cv_langinfo_codeset=yes
13008 else
13009 am_cv_langinfo_codeset=no
13011 rm -f core conftest.err conftest.$ac_objext \
13012 conftest$ac_exeext conftest.$ac_ext
13015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13016 $as_echo "$am_cv_langinfo_codeset" >&6; }
13017 if test $am_cv_langinfo_codeset = yes; then
13019 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13023 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
13024 if test "x$ac_cv_type_size_t" = xyes; then :
13026 else
13028 cat >>confdefs.h <<_ACEOF
13029 #define size_t unsigned int
13030 _ACEOF
13037 for ac_header in $ac_header_list
13038 do :
13039 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13040 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
13042 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13043 cat >>confdefs.h <<_ACEOF
13044 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13045 _ACEOF
13049 done
13057 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
13058 if test "x$ac_cv_type_pid_t" = xyes; then :
13060 else
13062 cat >>confdefs.h <<_ACEOF
13063 #define pid_t int
13064 _ACEOF
13068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13069 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
13070 if ${ac_cv_path_SED+:} false; then :
13071 $as_echo_n "(cached) " >&6
13072 else
13073 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13074 for ac_i in 1 2 3 4 5 6 7; do
13075 ac_script="$ac_script$as_nl$ac_script"
13076 done
13077 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13078 { ac_script=; unset ac_script;}
13079 if test -z "$SED"; then
13080 ac_path_SED_found=false
13081 # Loop through the user's path and test for each of PROGNAME-LIST
13082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13083 for as_dir in $PATH
13085 IFS=$as_save_IFS
13086 test -z "$as_dir" && as_dir=.
13087 for ac_prog in sed gsed; do
13088 for ac_exec_ext in '' $ac_executable_extensions; do
13089 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13090 as_fn_executable_p "$ac_path_SED" || continue
13091 # Check for GNU ac_path_SED and select it if it is found.
13092 # Check for GNU $ac_path_SED
13093 case `"$ac_path_SED" --version 2>&1` in
13094 *GNU*)
13095 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13097 ac_count=0
13098 $as_echo_n 0123456789 >"conftest.in"
13099 while :
13101 cat "conftest.in" "conftest.in" >"conftest.tmp"
13102 mv "conftest.tmp" "conftest.in"
13103 cp "conftest.in" "conftest.nl"
13104 $as_echo '' >> "conftest.nl"
13105 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13106 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13107 as_fn_arith $ac_count + 1 && ac_count=$as_val
13108 if test $ac_count -gt ${ac_path_SED_max-0}; then
13109 # Best one so far, save it but keep looking for a better one
13110 ac_cv_path_SED="$ac_path_SED"
13111 ac_path_SED_max=$ac_count
13113 # 10*(2^10) chars as input seems more than enough
13114 test $ac_count -gt 10 && break
13115 done
13116 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13117 esac
13119 $ac_path_SED_found && break 3
13120 done
13121 done
13122 done
13123 IFS=$as_save_IFS
13124 if test -z "$ac_cv_path_SED"; then
13125 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13127 else
13128 ac_cv_path_SED=$SED
13132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13133 $as_echo "$ac_cv_path_SED" >&6; }
13134 SED="$ac_cv_path_SED"
13135 rm -f conftest.sed
13138 # Set the 'development' global.
13139 . $srcdir/../bfd/development.sh
13141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
13142 $as_echo_n "checking for ANSI C header files... " >&6; }
13143 if ${ac_cv_header_stdc+:} false; then :
13144 $as_echo_n "(cached) " >&6
13145 else
13146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13147 /* end confdefs.h. */
13148 #include <stdlib.h>
13149 #include <stdarg.h>
13150 #include <string.h>
13151 #include <float.h>
13154 main ()
13158 return 0;
13160 _ACEOF
13161 if ac_fn_c_try_compile "$LINENO"; then :
13162 ac_cv_header_stdc=yes
13163 else
13164 ac_cv_header_stdc=no
13166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13168 if test $ac_cv_header_stdc = yes; then
13169 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13171 /* end confdefs.h. */
13172 #include <string.h>
13174 _ACEOF
13175 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13176 $EGREP "memchr" >/dev/null 2>&1; then :
13178 else
13179 ac_cv_header_stdc=no
13181 rm -f conftest*
13185 if test $ac_cv_header_stdc = yes; then
13186 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13188 /* end confdefs.h. */
13189 #include <stdlib.h>
13191 _ACEOF
13192 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13193 $EGREP "free" >/dev/null 2>&1; then :
13195 else
13196 ac_cv_header_stdc=no
13198 rm -f conftest*
13202 if test $ac_cv_header_stdc = yes; then
13203 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13204 if test "$cross_compiling" = yes; then :
13206 else
13207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13208 /* end confdefs.h. */
13209 #include <ctype.h>
13210 #include <stdlib.h>
13211 #if ((' ' & 0x0FF) == 0x020)
13212 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13213 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13214 #else
13215 # define ISLOWER(c) \
13216 (('a' <= (c) && (c) <= 'i') \
13217 || ('j' <= (c) && (c) <= 'r') \
13218 || ('s' <= (c) && (c) <= 'z'))
13219 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13220 #endif
13222 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13224 main ()
13226 int i;
13227 for (i = 0; i < 256; i++)
13228 if (XOR (islower (i), ISLOWER (i))
13229 || toupper (i) != TOUPPER (i))
13230 return 2;
13231 return 0;
13233 _ACEOF
13234 if ac_fn_c_try_run "$LINENO"; then :
13236 else
13237 ac_cv_header_stdc=no
13239 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13240 conftest.$ac_objext conftest.beam conftest.$ac_ext
13245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
13246 $as_echo "$ac_cv_header_stdc" >&6; }
13247 if test $ac_cv_header_stdc = yes; then
13249 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
13253 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
13254 # for constant arguments. Useless!
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
13256 $as_echo_n "checking for working alloca.h... " >&6; }
13257 if ${ac_cv_working_alloca_h+:} false; then :
13258 $as_echo_n "(cached) " >&6
13259 else
13260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13261 /* end confdefs.h. */
13262 #include <alloca.h>
13264 main ()
13266 char *p = (char *) alloca (2 * sizeof (int));
13267 if (p) return 0;
13269 return 0;
13271 _ACEOF
13272 if ac_fn_c_try_link "$LINENO"; then :
13273 ac_cv_working_alloca_h=yes
13274 else
13275 ac_cv_working_alloca_h=no
13277 rm -f core conftest.err conftest.$ac_objext \
13278 conftest$ac_exeext conftest.$ac_ext
13280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
13281 $as_echo "$ac_cv_working_alloca_h" >&6; }
13282 if test $ac_cv_working_alloca_h = yes; then
13284 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
13289 $as_echo_n "checking for alloca... " >&6; }
13290 if ${ac_cv_func_alloca_works+:} false; then :
13291 $as_echo_n "(cached) " >&6
13292 else
13293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13294 /* end confdefs.h. */
13295 #ifdef __GNUC__
13296 # define alloca __builtin_alloca
13297 #else
13298 # ifdef _MSC_VER
13299 # include <malloc.h>
13300 # define alloca _alloca
13301 # else
13302 # ifdef HAVE_ALLOCA_H
13303 # include <alloca.h>
13304 # else
13305 # ifdef _AIX
13306 #pragma alloca
13307 # else
13308 # ifndef alloca /* predefined by HP cc +Olibcalls */
13309 void *alloca (size_t);
13310 # endif
13311 # endif
13312 # endif
13313 # endif
13314 #endif
13317 main ()
13319 char *p = (char *) alloca (1);
13320 if (p) return 0;
13322 return 0;
13324 _ACEOF
13325 if ac_fn_c_try_link "$LINENO"; then :
13326 ac_cv_func_alloca_works=yes
13327 else
13328 ac_cv_func_alloca_works=no
13330 rm -f core conftest.err conftest.$ac_objext \
13331 conftest$ac_exeext conftest.$ac_ext
13333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
13334 $as_echo "$ac_cv_func_alloca_works" >&6; }
13336 if test $ac_cv_func_alloca_works = yes; then
13338 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
13340 else
13341 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
13342 # that cause trouble. Some versions do not even contain alloca or
13343 # contain a buggy version. If you still want to use their alloca,
13344 # use ar to extract alloca.o from them instead of compiling alloca.c.
13346 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
13348 $as_echo "#define C_ALLOCA 1" >>confdefs.h
13351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
13352 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
13353 if ${ac_cv_os_cray+:} false; then :
13354 $as_echo_n "(cached) " >&6
13355 else
13356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13357 /* end confdefs.h. */
13358 #if defined CRAY && ! defined CRAY2
13359 webecray
13360 #else
13361 wenotbecray
13362 #endif
13364 _ACEOF
13365 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13366 $EGREP "webecray" >/dev/null 2>&1; then :
13367 ac_cv_os_cray=yes
13368 else
13369 ac_cv_os_cray=no
13371 rm -f conftest*
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
13375 $as_echo "$ac_cv_os_cray" >&6; }
13376 if test $ac_cv_os_cray = yes; then
13377 for ac_func in _getb67 GETB67 getb67; do
13378 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13379 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13380 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13382 cat >>confdefs.h <<_ACEOF
13383 #define CRAY_STACKSEG_END $ac_func
13384 _ACEOF
13386 break
13389 done
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
13393 $as_echo_n "checking stack direction for C alloca... " >&6; }
13394 if ${ac_cv_c_stack_direction+:} false; then :
13395 $as_echo_n "(cached) " >&6
13396 else
13397 if test "$cross_compiling" = yes; then :
13398 ac_cv_c_stack_direction=0
13399 else
13400 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13401 /* end confdefs.h. */
13402 $ac_includes_default
13404 find_stack_direction (int *addr, int depth)
13406 int dir, dummy = 0;
13407 if (! addr)
13408 addr = &dummy;
13409 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
13410 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
13411 return dir + dummy;
13415 main (int argc, char **argv)
13417 return find_stack_direction (0, argc + !argv + 20) < 0;
13419 _ACEOF
13420 if ac_fn_c_try_run "$LINENO"; then :
13421 ac_cv_c_stack_direction=1
13422 else
13423 ac_cv_c_stack_direction=-1
13425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13426 conftest.$ac_objext conftest.beam conftest.$ac_ext
13430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
13431 $as_echo "$ac_cv_c_stack_direction" >&6; }
13432 cat >>confdefs.h <<_ACEOF
13433 #define STACK_DIRECTION $ac_cv_c_stack_direction
13434 _ACEOF
13440 WIN32APILIBS=
13441 case ${host} in
13442 *mingw32*)
13444 $as_echo "#define USE_WIN32API 1" >>confdefs.h
13446 WIN32APILIBS="-lws2_32"
13448 esac
13451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
13452 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
13453 if ${am_cv_langinfo_codeset+:} false; then :
13454 $as_echo_n "(cached) " >&6
13455 else
13456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13457 /* end confdefs.h. */
13458 #include <langinfo.h>
13460 main ()
13462 char* cs = nl_langinfo(CODESET);
13464 return 0;
13466 _ACEOF
13467 if ac_fn_c_try_link "$LINENO"; then :
13468 am_cv_langinfo_codeset=yes
13469 else
13470 am_cv_langinfo_codeset=no
13472 rm -f core conftest.err conftest.$ac_objext \
13473 conftest$ac_exeext conftest.$ac_ext
13476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
13477 $as_echo "$am_cv_langinfo_codeset" >&6; }
13478 if test $am_cv_langinfo_codeset = yes; then
13480 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
13485 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
13486 do :
13487 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13488 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13489 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
13490 cat >>confdefs.h <<_ACEOF
13491 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13492 _ACEOF
13496 done
13500 for ac_func in getpagesize
13501 do :
13502 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
13503 if test "x$ac_cv_func_getpagesize" = xyes; then :
13504 cat >>confdefs.h <<_ACEOF
13505 #define HAVE_GETPAGESIZE 1
13506 _ACEOF
13509 done
13511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
13512 $as_echo_n "checking for working mmap... " >&6; }
13513 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
13514 $as_echo_n "(cached) " >&6
13515 else
13516 if test "$cross_compiling" = yes; then :
13517 ac_cv_func_mmap_fixed_mapped=no
13518 else
13519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13520 /* end confdefs.h. */
13521 $ac_includes_default
13522 /* malloc might have been renamed as rpl_malloc. */
13523 #undef malloc
13525 /* Thanks to Mike Haertel and Jim Avera for this test.
13526 Here is a matrix of mmap possibilities:
13527 mmap private not fixed
13528 mmap private fixed at somewhere currently unmapped
13529 mmap private fixed at somewhere already mapped
13530 mmap shared not fixed
13531 mmap shared fixed at somewhere currently unmapped
13532 mmap shared fixed at somewhere already mapped
13533 For private mappings, we should verify that changes cannot be read()
13534 back from the file, nor mmap's back from the file at a different
13535 address. (There have been systems where private was not correctly
13536 implemented like the infamous i386 svr4.0, and systems where the
13537 VM page cache was not coherent with the file system buffer cache
13538 like early versions of FreeBSD and possibly contemporary NetBSD.)
13539 For shared mappings, we should conversely verify that changes get
13540 propagated back to all the places they're supposed to be.
13542 Grep wants private fixed already mapped.
13543 The main things grep needs to know about mmap are:
13544 * does it exist and is it safe to write into the mmap'd area
13545 * how to use it (BSD variants) */
13547 #include <fcntl.h>
13548 #include <sys/mman.h>
13550 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
13551 char *malloc ();
13552 #endif
13554 /* This mess was copied from the GNU getpagesize.h. */
13555 #ifndef HAVE_GETPAGESIZE
13556 # ifdef _SC_PAGESIZE
13557 # define getpagesize() sysconf(_SC_PAGESIZE)
13558 # else /* no _SC_PAGESIZE */
13559 # ifdef HAVE_SYS_PARAM_H
13560 # include <sys/param.h>
13561 # ifdef EXEC_PAGESIZE
13562 # define getpagesize() EXEC_PAGESIZE
13563 # else /* no EXEC_PAGESIZE */
13564 # ifdef NBPG
13565 # define getpagesize() NBPG * CLSIZE
13566 # ifndef CLSIZE
13567 # define CLSIZE 1
13568 # endif /* no CLSIZE */
13569 # else /* no NBPG */
13570 # ifdef NBPC
13571 # define getpagesize() NBPC
13572 # else /* no NBPC */
13573 # ifdef PAGESIZE
13574 # define getpagesize() PAGESIZE
13575 # endif /* PAGESIZE */
13576 # endif /* no NBPC */
13577 # endif /* no NBPG */
13578 # endif /* no EXEC_PAGESIZE */
13579 # else /* no HAVE_SYS_PARAM_H */
13580 # define getpagesize() 8192 /* punt totally */
13581 # endif /* no HAVE_SYS_PARAM_H */
13582 # endif /* no _SC_PAGESIZE */
13584 #endif /* no HAVE_GETPAGESIZE */
13587 main ()
13589 char *data, *data2, *data3;
13590 const char *cdata2;
13591 int i, pagesize;
13592 int fd, fd2;
13594 pagesize = getpagesize ();
13596 /* First, make a file with some known garbage in it. */
13597 data = (char *) malloc (pagesize);
13598 if (!data)
13599 return 1;
13600 for (i = 0; i < pagesize; ++i)
13601 *(data + i) = rand ();
13602 umask (0);
13603 fd = creat ("conftest.mmap", 0600);
13604 if (fd < 0)
13605 return 2;
13606 if (write (fd, data, pagesize) != pagesize)
13607 return 3;
13608 close (fd);
13610 /* Next, check that the tail of a page is zero-filled. File must have
13611 non-zero length, otherwise we risk SIGBUS for entire page. */
13612 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
13613 if (fd2 < 0)
13614 return 4;
13615 cdata2 = "";
13616 if (write (fd2, cdata2, 1) != 1)
13617 return 5;
13618 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
13619 if (data2 == MAP_FAILED)
13620 return 6;
13621 for (i = 0; i < pagesize; ++i)
13622 if (*(data2 + i))
13623 return 7;
13624 close (fd2);
13625 if (munmap (data2, pagesize))
13626 return 8;
13628 /* Next, try to mmap the file at a fixed address which already has
13629 something else allocated at it. If we can, also make sure that
13630 we see the same garbage. */
13631 fd = open ("conftest.mmap", O_RDWR);
13632 if (fd < 0)
13633 return 9;
13634 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
13635 MAP_PRIVATE | MAP_FIXED, fd, 0L))
13636 return 10;
13637 for (i = 0; i < pagesize; ++i)
13638 if (*(data + i) != *(data2 + i))
13639 return 11;
13641 /* Finally, make sure that changes to the mapped area do not
13642 percolate back to the file as seen by read(). (This is a bug on
13643 some variants of i386 svr4.0.) */
13644 for (i = 0; i < pagesize; ++i)
13645 *(data2 + i) = *(data2 + i) + 1;
13646 data3 = (char *) malloc (pagesize);
13647 if (!data3)
13648 return 12;
13649 if (read (fd, data3, pagesize) != pagesize)
13650 return 13;
13651 for (i = 0; i < pagesize; ++i)
13652 if (*(data + i) != *(data3 + i))
13653 return 14;
13654 close (fd);
13655 return 0;
13657 _ACEOF
13658 if ac_fn_c_try_run "$LINENO"; then :
13659 ac_cv_func_mmap_fixed_mapped=yes
13660 else
13661 ac_cv_func_mmap_fixed_mapped=no
13663 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13664 conftest.$ac_objext conftest.beam conftest.$ac_ext
13668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
13669 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
13670 if test $ac_cv_func_mmap_fixed_mapped = yes; then
13672 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
13675 rm -f conftest.mmap conftest.txt
13677 for ac_header in vfork.h
13678 do :
13679 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
13680 if test "x$ac_cv_header_vfork_h" = xyes; then :
13681 cat >>confdefs.h <<_ACEOF
13682 #define HAVE_VFORK_H 1
13683 _ACEOF
13687 done
13689 for ac_func in fork vfork
13690 do :
13691 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13692 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13693 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13694 cat >>confdefs.h <<_ACEOF
13695 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13696 _ACEOF
13699 done
13701 if test "x$ac_cv_func_fork" = xyes; then
13702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
13703 $as_echo_n "checking for working fork... " >&6; }
13704 if ${ac_cv_func_fork_works+:} false; then :
13705 $as_echo_n "(cached) " >&6
13706 else
13707 if test "$cross_compiling" = yes; then :
13708 ac_cv_func_fork_works=cross
13709 else
13710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13711 /* end confdefs.h. */
13712 $ac_includes_default
13714 main ()
13717 /* By Ruediger Kuhlmann. */
13718 return fork () < 0;
13721 return 0;
13723 _ACEOF
13724 if ac_fn_c_try_run "$LINENO"; then :
13725 ac_cv_func_fork_works=yes
13726 else
13727 ac_cv_func_fork_works=no
13729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13730 conftest.$ac_objext conftest.beam conftest.$ac_ext
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
13735 $as_echo "$ac_cv_func_fork_works" >&6; }
13737 else
13738 ac_cv_func_fork_works=$ac_cv_func_fork
13740 if test "x$ac_cv_func_fork_works" = xcross; then
13741 case $host in
13742 *-*-amigaos* | *-*-msdosdjgpp*)
13743 # Override, as these systems have only a dummy fork() stub
13744 ac_cv_func_fork_works=no
13747 ac_cv_func_fork_works=yes
13749 esac
13750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
13751 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
13753 ac_cv_func_vfork_works=$ac_cv_func_vfork
13754 if test "x$ac_cv_func_vfork" = xyes; then
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
13756 $as_echo_n "checking for working vfork... " >&6; }
13757 if ${ac_cv_func_vfork_works+:} false; then :
13758 $as_echo_n "(cached) " >&6
13759 else
13760 if test "$cross_compiling" = yes; then :
13761 ac_cv_func_vfork_works=cross
13762 else
13763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13764 /* end confdefs.h. */
13765 /* Thanks to Paul Eggert for this test. */
13766 $ac_includes_default
13767 #include <sys/wait.h>
13768 #ifdef HAVE_VFORK_H
13769 # include <vfork.h>
13770 #endif
13771 /* On some sparc systems, changes by the child to local and incoming
13772 argument registers are propagated back to the parent. The compiler
13773 is told about this with #include <vfork.h>, but some compilers
13774 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
13775 static variable whose address is put into a register that is
13776 clobbered by the vfork. */
13777 static void
13778 #ifdef __cplusplus
13779 sparc_address_test (int arg)
13780 # else
13781 sparc_address_test (arg) int arg;
13782 #endif
13784 static pid_t child;
13785 if (!child) {
13786 child = vfork ();
13787 if (child < 0) {
13788 perror ("vfork");
13789 _exit(2);
13791 if (!child) {
13792 arg = getpid();
13793 write(-1, "", 0);
13794 _exit (arg);
13800 main ()
13802 pid_t parent = getpid ();
13803 pid_t child;
13805 sparc_address_test (0);
13807 child = vfork ();
13809 if (child == 0) {
13810 /* Here is another test for sparc vfork register problems. This
13811 test uses lots of local variables, at least as many local
13812 variables as main has allocated so far including compiler
13813 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
13814 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
13815 reuse the register of parent for one of the local variables,
13816 since it will think that parent can't possibly be used any more
13817 in this routine. Assigning to the local variable will thus
13818 munge parent in the parent process. */
13819 pid_t
13820 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
13821 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
13822 /* Convince the compiler that p..p7 are live; otherwise, it might
13823 use the same hardware register for all 8 local variables. */
13824 if (p != p1 || p != p2 || p != p3 || p != p4
13825 || p != p5 || p != p6 || p != p7)
13826 _exit(1);
13828 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
13829 from child file descriptors. If the child closes a descriptor
13830 before it execs or exits, this munges the parent's descriptor
13831 as well. Test for this by closing stdout in the child. */
13832 _exit(close(fileno(stdout)) != 0);
13833 } else {
13834 int status;
13835 struct stat st;
13837 while (wait(&status) != child)
13839 return (
13840 /* Was there some problem with vforking? */
13841 child < 0
13843 /* Did the child fail? (This shouldn't happen.) */
13844 || status
13846 /* Did the vfork/compiler bug occur? */
13847 || parent != getpid()
13849 /* Did the file descriptor bug occur? */
13850 || fstat(fileno(stdout), &st) != 0
13854 _ACEOF
13855 if ac_fn_c_try_run "$LINENO"; then :
13856 ac_cv_func_vfork_works=yes
13857 else
13858 ac_cv_func_vfork_works=no
13860 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13861 conftest.$ac_objext conftest.beam conftest.$ac_ext
13865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
13866 $as_echo "$ac_cv_func_vfork_works" >&6; }
13869 if test "x$ac_cv_func_fork_works" = xcross; then
13870 ac_cv_func_vfork_works=$ac_cv_func_vfork
13871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
13872 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
13875 if test "x$ac_cv_func_vfork_works" = xyes; then
13877 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
13879 else
13881 $as_echo "#define vfork fork" >>confdefs.h
13884 if test "x$ac_cv_func_fork_works" = xyes; then
13886 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
13890 for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
13891 ptrace64 sbrk setns sigaltstack sigprocmask \
13892 setpgid setpgrp getrusage getauxval sigtimedwait
13893 do :
13894 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13895 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13896 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13897 cat >>confdefs.h <<_ACEOF
13898 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13899 _ACEOF
13902 done
13905 # This is needed for RHEL 5 and uclibc-ng < 1.0.39.
13906 # These did not define ADDR_NO_RANDOMIZE in sys/personality.h,
13907 # only in linux/personality.h.
13908 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13910 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13911 ac_have_decl=1
13912 else
13913 ac_have_decl=0
13916 cat >>confdefs.h <<_ACEOF
13917 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13918 _ACEOF
13921 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13922 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13923 ac_have_decl=1
13924 else
13925 ac_have_decl=0
13928 cat >>confdefs.h <<_ACEOF
13929 #define HAVE_DECL_STRSTR $ac_have_decl
13930 _ACEOF
13933 # ----------------------- #
13934 # Checks for structures. #
13935 # ----------------------- #
13937 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13938 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13940 cat >>confdefs.h <<_ACEOF
13941 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13942 _ACEOF
13946 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13947 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13949 cat >>confdefs.h <<_ACEOF
13950 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13951 _ACEOF
13957 # On FreeBSD we need libutil for the kinfo_get* functions. On
13958 # GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
13959 # Figure out which one to use.
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13961 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13962 if ${ac_cv_search_kinfo_getfile+:} false; then :
13963 $as_echo_n "(cached) " >&6
13964 else
13965 ac_func_search_save_LIBS=$LIBS
13966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13967 /* end confdefs.h. */
13969 /* Override any GCC internal prototype to avoid an error.
13970 Use char because int might match the return type of a GCC
13971 builtin and then its argument prototype would still apply. */
13972 #ifdef __cplusplus
13973 extern "C"
13974 #endif
13975 char kinfo_getfile ();
13977 main ()
13979 return kinfo_getfile ();
13981 return 0;
13983 _ACEOF
13984 for ac_lib in '' util util-freebsd; do
13985 if test -z "$ac_lib"; then
13986 ac_res="none required"
13987 else
13988 ac_res=-l$ac_lib
13989 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13991 if ac_fn_c_try_link "$LINENO"; then :
13992 ac_cv_search_kinfo_getfile=$ac_res
13994 rm -f core conftest.err conftest.$ac_objext \
13995 conftest$ac_exeext
13996 if ${ac_cv_search_kinfo_getfile+:} false; then :
13997 break
13999 done
14000 if ${ac_cv_search_kinfo_getfile+:} false; then :
14002 else
14003 ac_cv_search_kinfo_getfile=no
14005 rm conftest.$ac_ext
14006 LIBS=$ac_func_search_save_LIBS
14008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
14009 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
14010 ac_res=$ac_cv_search_kinfo_getfile
14011 if test "$ac_res" != no; then :
14012 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14017 # Define HAVE_KINFO_GETFILE if kinfo_getfile is available.
14018 for ac_func in kinfo_getfile
14019 do :
14020 ac_fn_c_check_func "$LINENO" "kinfo_getfile" "ac_cv_func_kinfo_getfile"
14021 if test "x$ac_cv_func_kinfo_getfile" = xyes; then :
14022 cat >>confdefs.h <<_ACEOF
14023 #define HAVE_KINFO_GETFILE 1
14024 _ACEOF
14027 done
14030 # ----------------------- #
14031 # Check for threading. #
14032 # ----------------------- #
14034 # Check whether --enable-threading was given.
14035 if test "${enable_threading+set}" = set; then :
14036 enableval=$enable_threading; case "$enableval" in
14037 yes) want_threading=yes ;;
14038 no) want_threading=no ;;
14039 *) as_fn_error $? "bad value $enableval for threading" "$LINENO" 5 ;;
14040 esac
14041 else
14042 want_threading=yes
14046 # Check for std::thread. This does not work on some platforms, like
14047 # mingw and DJGPP.
14048 ac_ext=cpp
14049 ac_cpp='$CXXCPP $CPPFLAGS'
14050 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14051 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14052 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14058 ac_ext=c
14059 ac_cpp='$CPP $CPPFLAGS'
14060 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14061 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14062 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14064 ax_pthread_ok=no
14066 # We used to check for pthread.h first, but this fails if pthread.h
14067 # requires special compiler flags (e.g. on Tru64 or Sequent).
14068 # It gets checked for in the link test anyway.
14070 # First of all, check if the user has set any of the PTHREAD_LIBS,
14071 # etcetera environment variables, and if threads linking works using
14072 # them:
14073 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
14074 ax_pthread_save_CC="$CC"
14075 ax_pthread_save_CFLAGS="$CFLAGS"
14076 ax_pthread_save_LIBS="$LIBS"
14077 if test "x$PTHREAD_CC" != "x"; then :
14078 CC="$PTHREAD_CC"
14080 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14081 LIBS="$PTHREAD_LIBS $LIBS"
14082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
14083 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
14084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085 /* end confdefs.h. */
14087 /* Override any GCC internal prototype to avoid an error.
14088 Use char because int might match the return type of a GCC
14089 builtin and then its argument prototype would still apply. */
14090 #ifdef __cplusplus
14091 extern "C"
14092 #endif
14093 char pthread_join ();
14095 main ()
14097 return pthread_join ();
14099 return 0;
14101 _ACEOF
14102 if ac_fn_c_try_link "$LINENO"; then :
14103 ax_pthread_ok=yes
14105 rm -f core conftest.err conftest.$ac_objext \
14106 conftest$ac_exeext conftest.$ac_ext
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14108 $as_echo "$ax_pthread_ok" >&6; }
14109 if test "x$ax_pthread_ok" = "xno"; then
14110 PTHREAD_LIBS=""
14111 PTHREAD_CFLAGS=""
14113 CC="$ax_pthread_save_CC"
14114 CFLAGS="$ax_pthread_save_CFLAGS"
14115 LIBS="$ax_pthread_save_LIBS"
14118 # We must check for the threads library under a number of different
14119 # names; the ordering is very important because some systems
14120 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
14121 # libraries is broken (non-POSIX).
14123 # Create a list of thread flags to try. Items starting with a "-" are
14124 # C compiler flags, and other items are library names, except for "none"
14125 # which indicates that we try without any flags at all, and "pthread-config"
14126 # which is a program returning the flags for the Pth emulation library.
14128 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
14130 # The ordering *is* (sometimes) important. Some notes on the
14131 # individual items follow:
14133 # pthreads: AIX (must check this before -lpthread)
14134 # none: in case threads are in libc; should be tried before -Kthread and
14135 # other compiler flags to prevent continual compiler warnings
14136 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
14137 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
14138 # (Note: HP C rejects this with "bad form for `-t' option")
14139 # -pthreads: Solaris/gcc (Note: HP C also rejects)
14140 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
14141 # doesn't hurt to check since this sometimes defines pthreads and
14142 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
14143 # is present but should not be used directly; and before -mthreads,
14144 # because the compiler interprets this as "-mt" + "-hreads")
14145 # -mthreads: Mingw32/gcc, Lynx/gcc
14146 # pthread: Linux, etcetera
14147 # --thread-safe: KAI C++
14148 # pthread-config: use pthread-config program (for GNU Pth library)
14150 case $host_os in
14152 freebsd*)
14154 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
14155 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
14157 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
14160 hpux*)
14162 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
14163 # multi-threading and also sets -lpthread."
14165 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
14168 openedition*)
14170 # IBM z/OS requires a feature-test macro to be defined in order to
14171 # enable POSIX threads at all, so give the user a hint if this is
14172 # not set. (We don't define these ourselves, as they can affect
14173 # other portions of the system API in unpredictable ways.)
14175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14176 /* end confdefs.h. */
14178 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
14179 AX_PTHREAD_ZOS_MISSING
14180 # endif
14182 _ACEOF
14183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14184 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
14185 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
14186 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
14188 rm -f conftest*
14192 solaris*)
14194 # On Solaris (at least, for some versions), libc contains stubbed
14195 # (non-functional) versions of the pthreads routines, so link-based
14196 # tests will erroneously succeed. (N.B.: The stubs are missing
14197 # pthread_cleanup_push, or rather a function called by this macro,
14198 # so we could check for that, but who knows whether they'll stub
14199 # that too in a future libc.) So we'll check first for the
14200 # standard Solaris way of linking pthreads (-mt -lpthread).
14202 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
14204 esac
14206 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
14208 if test "x$GCC" = "xyes"; then :
14209 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
14212 # The presence of a feature test macro requesting re-entrant function
14213 # definitions is, on some systems, a strong hint that pthreads support is
14214 # correctly enabled
14216 case $host_os in
14217 darwin* | hpux* | linux* | osf* | solaris*)
14218 ax_pthread_check_macro="_REENTRANT"
14221 aix*)
14222 ax_pthread_check_macro="_THREAD_SAFE"
14226 ax_pthread_check_macro="--"
14228 esac
14229 if test "x$ax_pthread_check_macro" = "x--"; then :
14230 ax_pthread_check_cond=0
14231 else
14232 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
14235 # Are we compiling with Clang?
14237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
14238 $as_echo_n "checking whether $CC is Clang... " >&6; }
14239 if ${ax_cv_PTHREAD_CLANG+:} false; then :
14240 $as_echo_n "(cached) " >&6
14241 else
14242 ax_cv_PTHREAD_CLANG=no
14243 # Note that Autoconf sets GCC=yes for Clang as well as GCC
14244 if test "x$GCC" = "xyes"; then
14245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14246 /* end confdefs.h. */
14247 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
14248 # if defined(__clang__) && defined(__llvm__)
14249 AX_PTHREAD_CC_IS_CLANG
14250 # endif
14252 _ACEOF
14253 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14254 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
14255 ax_cv_PTHREAD_CLANG=yes
14257 rm -f conftest*
14262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
14263 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
14264 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
14266 ax_pthread_clang_warning=no
14268 # Clang needs special handling, because older versions handle the -pthread
14269 # option in a rather... idiosyncratic way
14271 if test "x$ax_pthread_clang" = "xyes"; then
14273 # Clang takes -pthread; it has never supported any other flag
14275 # (Note 1: This will need to be revisited if a system that Clang
14276 # supports has POSIX threads in a separate library. This tends not
14277 # to be the way of modern systems, but it's conceivable.)
14279 # (Note 2: On some systems, notably Darwin, -pthread is not needed
14280 # to get POSIX threads support; the API is always present and
14281 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
14282 # -pthread does define _REENTRANT, and while the Darwin headers
14283 # ignore this macro, third-party headers might not.)
14285 PTHREAD_CFLAGS="-pthread"
14286 PTHREAD_LIBS=
14288 ax_pthread_ok=yes
14290 # However, older versions of Clang make a point of warning the user
14291 # that, in an invocation where only linking and no compilation is
14292 # taking place, the -pthread option has no effect ("argument unused
14293 # during compilation"). They expect -pthread to be passed in only
14294 # when source code is being compiled.
14296 # Problem is, this is at odds with the way Automake and most other
14297 # C build frameworks function, which is that the same flags used in
14298 # compilation (CFLAGS) are also used in linking. Many systems
14299 # supported by AX_PTHREAD require exactly this for POSIX threads
14300 # support, and in fact it is often not straightforward to specify a
14301 # flag that is used only in the compilation phase and not in
14302 # linking. Such a scenario is extremely rare in practice.
14304 # Even though use of the -pthread flag in linking would only print
14305 # a warning, this can be a nuisance for well-run software projects
14306 # that build with -Werror. So if the active version of Clang has
14307 # this misfeature, we search for an option to squash it.
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
14310 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
14311 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
14312 $as_echo_n "(cached) " >&6
14313 else
14314 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
14315 # Create an alternate version of $ac_link that compiles and
14316 # links in two steps (.c -> .o, .o -> exe) instead of one
14317 # (.c -> exe), because the warning occurs only in the second
14318 # step
14319 ax_pthread_save_ac_link="$ac_link"
14320 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
14321 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
14322 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
14323 ax_pthread_save_CFLAGS="$CFLAGS"
14324 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
14325 if test "x$ax_pthread_try" = "xunknown"; then :
14326 break
14328 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
14329 ac_link="$ax_pthread_save_ac_link"
14330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14331 /* end confdefs.h. */
14332 int main(void){return 0;}
14333 _ACEOF
14334 if ac_fn_c_try_link "$LINENO"; then :
14335 ac_link="$ax_pthread_2step_ac_link"
14336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14337 /* end confdefs.h. */
14338 int main(void){return 0;}
14339 _ACEOF
14340 if ac_fn_c_try_link "$LINENO"; then :
14341 break
14343 rm -f core conftest.err conftest.$ac_objext \
14344 conftest$ac_exeext conftest.$ac_ext
14347 rm -f core conftest.err conftest.$ac_objext \
14348 conftest$ac_exeext conftest.$ac_ext
14349 done
14350 ac_link="$ax_pthread_save_ac_link"
14351 CFLAGS="$ax_pthread_save_CFLAGS"
14352 if test "x$ax_pthread_try" = "x"; then :
14353 ax_pthread_try=no
14355 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
14359 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
14361 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
14362 no | unknown) ;;
14363 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
14364 esac
14366 fi # $ax_pthread_clang = yes
14368 if test "x$ax_pthread_ok" = "xno"; then
14369 for ax_pthread_try_flag in $ax_pthread_flags; do
14371 case $ax_pthread_try_flag in
14372 none)
14373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
14374 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
14377 -mt,pthread)
14378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
14379 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
14380 PTHREAD_CFLAGS="-mt"
14381 PTHREAD_LIBS="-lpthread"
14385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
14386 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
14387 PTHREAD_CFLAGS="$ax_pthread_try_flag"
14390 pthread-config)
14391 # Extract the first word of "pthread-config", so it can be a program name with args.
14392 set dummy pthread-config; ac_word=$2
14393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14394 $as_echo_n "checking for $ac_word... " >&6; }
14395 if ${ac_cv_prog_ax_pthread_config+:} false; then :
14396 $as_echo_n "(cached) " >&6
14397 else
14398 if test -n "$ax_pthread_config"; then
14399 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
14400 else
14401 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14402 for as_dir in $PATH
14404 IFS=$as_save_IFS
14405 test -z "$as_dir" && as_dir=.
14406 for ac_exec_ext in '' $ac_executable_extensions; do
14407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14408 ac_cv_prog_ax_pthread_config="yes"
14409 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14410 break 2
14412 done
14413 done
14414 IFS=$as_save_IFS
14416 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
14419 ax_pthread_config=$ac_cv_prog_ax_pthread_config
14420 if test -n "$ax_pthread_config"; then
14421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
14422 $as_echo "$ax_pthread_config" >&6; }
14423 else
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14425 $as_echo "no" >&6; }
14429 if test "x$ax_pthread_config" = "xno"; then :
14430 continue
14432 PTHREAD_CFLAGS="`pthread-config --cflags`"
14433 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
14437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
14438 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
14439 PTHREAD_LIBS="-l$ax_pthread_try_flag"
14441 esac
14443 ax_pthread_save_CFLAGS="$CFLAGS"
14444 ax_pthread_save_LIBS="$LIBS"
14445 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14446 LIBS="$PTHREAD_LIBS $LIBS"
14448 # Check for various functions. We must include pthread.h,
14449 # since some functions may be macros. (On the Sequent, we
14450 # need a special flag -Kthread to make this header compile.)
14451 # We check for pthread_join because it is in -lpthread on IRIX
14452 # while pthread_create is in libc. We check for pthread_attr_init
14453 # due to DEC craziness with -lpthreads. We check for
14454 # pthread_cleanup_push because it is one of the few pthread
14455 # functions on Solaris that doesn't have a non-functional libc stub.
14456 # We try pthread_create on general principles.
14458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14459 /* end confdefs.h. */
14460 #include <pthread.h>
14461 # if $ax_pthread_check_cond
14462 # error "$ax_pthread_check_macro must be defined"
14463 # endif
14464 static void routine(void *a) { a = 0; }
14465 static void *start_routine(void *a) { return a; }
14467 main ()
14469 pthread_t th; pthread_attr_t attr;
14470 pthread_create(&th, 0, start_routine, 0);
14471 pthread_join(th, 0);
14472 pthread_attr_init(&attr);
14473 pthread_cleanup_push(routine, 0);
14474 pthread_cleanup_pop(0) /* ; */
14476 return 0;
14478 _ACEOF
14479 if ac_fn_c_try_link "$LINENO"; then :
14480 ax_pthread_ok=yes
14482 rm -f core conftest.err conftest.$ac_objext \
14483 conftest$ac_exeext conftest.$ac_ext
14485 CFLAGS="$ax_pthread_save_CFLAGS"
14486 LIBS="$ax_pthread_save_LIBS"
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
14489 $as_echo "$ax_pthread_ok" >&6; }
14490 if test "x$ax_pthread_ok" = "xyes"; then :
14491 break
14494 PTHREAD_LIBS=""
14495 PTHREAD_CFLAGS=""
14496 done
14499 # Various other checks:
14500 if test "x$ax_pthread_ok" = "xyes"; then
14501 ax_pthread_save_CFLAGS="$CFLAGS"
14502 ax_pthread_save_LIBS="$LIBS"
14503 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
14504 LIBS="$PTHREAD_LIBS $LIBS"
14506 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
14507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
14508 $as_echo_n "checking for joinable pthread attribute... " >&6; }
14509 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
14510 $as_echo_n "(cached) " >&6
14511 else
14512 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
14513 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
14514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14515 /* end confdefs.h. */
14516 #include <pthread.h>
14518 main ()
14520 int attr = $ax_pthread_attr; return attr /* ; */
14522 return 0;
14524 _ACEOF
14525 if ac_fn_c_try_link "$LINENO"; then :
14526 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
14528 rm -f core conftest.err conftest.$ac_objext \
14529 conftest$ac_exeext conftest.$ac_ext
14530 done
14533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
14534 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
14535 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
14536 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
14537 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
14539 cat >>confdefs.h <<_ACEOF
14540 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
14541 _ACEOF
14543 ax_pthread_joinable_attr_defined=yes
14547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
14548 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
14549 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
14550 $as_echo_n "(cached) " >&6
14551 else
14552 ax_cv_PTHREAD_SPECIAL_FLAGS=no
14553 case $host_os in
14554 solaris*)
14555 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
14557 esac
14560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
14561 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
14562 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
14563 test "x$ax_pthread_special_flags_added" != "xyes"; then :
14564 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
14565 ax_pthread_special_flags_added=yes
14568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
14569 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
14570 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
14571 $as_echo_n "(cached) " >&6
14572 else
14573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14574 /* end confdefs.h. */
14575 #include <pthread.h>
14577 main ()
14579 int i = PTHREAD_PRIO_INHERIT;
14581 return 0;
14583 _ACEOF
14584 if ac_fn_c_try_link "$LINENO"; then :
14585 ax_cv_PTHREAD_PRIO_INHERIT=yes
14586 else
14587 ax_cv_PTHREAD_PRIO_INHERIT=no
14589 rm -f core conftest.err conftest.$ac_objext \
14590 conftest$ac_exeext conftest.$ac_ext
14593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
14594 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
14595 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
14596 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
14598 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
14600 ax_pthread_prio_inherit_defined=yes
14604 CFLAGS="$ax_pthread_save_CFLAGS"
14605 LIBS="$ax_pthread_save_LIBS"
14607 # More AIX lossage: compile with *_r variant
14608 if test "x$GCC" != "xyes"; then
14609 case $host_os in
14610 aix*)
14611 case "x/$CC" in #(
14612 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
14613 #handle absolute path differently from PATH based program lookup
14614 case "x$CC" in #(
14615 x/*) :
14616 if as_fn_executable_p ${CC}_r; then :
14617 PTHREAD_CC="${CC}_r"
14618 fi ;; #(
14619 *) :
14620 for ac_prog in ${CC}_r
14622 # Extract the first word of "$ac_prog", so it can be a program name with args.
14623 set dummy $ac_prog; ac_word=$2
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14625 $as_echo_n "checking for $ac_word... " >&6; }
14626 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
14627 $as_echo_n "(cached) " >&6
14628 else
14629 if test -n "$PTHREAD_CC"; then
14630 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
14631 else
14632 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14633 for as_dir in $PATH
14635 IFS=$as_save_IFS
14636 test -z "$as_dir" && as_dir=.
14637 for ac_exec_ext in '' $ac_executable_extensions; do
14638 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14639 ac_cv_prog_PTHREAD_CC="$ac_prog"
14640 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14641 break 2
14643 done
14644 done
14645 IFS=$as_save_IFS
14649 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
14650 if test -n "$PTHREAD_CC"; then
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
14652 $as_echo "$PTHREAD_CC" >&6; }
14653 else
14654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14655 $as_echo "no" >&6; }
14659 test -n "$PTHREAD_CC" && break
14660 done
14661 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14663 esac ;; #(
14664 *) :
14666 esac
14668 esac
14672 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
14678 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
14679 if test "x$ax_pthread_ok" = "xyes"; then
14680 threads=yes
14682 else
14683 ax_pthread_ok=no
14684 threads=no
14686 ac_ext=cpp
14687 ac_cpp='$CXXCPP $CPPFLAGS'
14688 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14689 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14690 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14693 save_LIBS="$LIBS"
14694 LIBS="$PTHREAD_LIBS $LIBS"
14695 save_CXXFLAGS="$CXXFLAGS"
14696 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
14697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
14698 $as_echo_n "checking for std::thread... " >&6; }
14699 if ${gdb_cv_cxx_std_thread+:} false; then :
14700 $as_echo_n "(cached) " >&6
14701 else
14702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14703 /* end confdefs.h. */
14704 #include <thread>
14705 void callback() { }
14707 main ()
14709 std::thread t(callback);
14711 return 0;
14713 _ACEOF
14714 if ac_fn_cxx_try_compile "$LINENO"; then :
14715 gdb_cv_cxx_std_thread=yes
14716 else
14717 gdb_cv_cxx_std_thread=no
14719 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
14722 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
14724 if test "$threads" = "yes"; then
14725 # This check must be here, while LIBS includes any necessary
14726 # threading library.
14727 for ac_func in pthread_sigmask pthread_setname_np
14728 do :
14729 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14730 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
14731 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14732 cat >>confdefs.h <<_ACEOF
14733 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14734 _ACEOF
14737 done
14740 LIBS="$save_LIBS"
14741 CXXFLAGS="$save_CXXFLAGS"
14743 if test "$want_threading" = "yes"; then
14744 if test "$gdb_cv_cxx_std_thread" = "yes"; then
14746 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
14750 ac_ext=c
14751 ac_cpp='$CPP $CPPFLAGS'
14752 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14753 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14754 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
14758 $as_echo_n "checking for sigsetjmp... " >&6; }
14759 if ${gdb_cv_func_sigsetjmp+:} false; then :
14760 $as_echo_n "(cached) " >&6
14761 else
14762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14763 /* end confdefs.h. */
14764 #include <setjmp.h>
14766 main ()
14768 sigjmp_buf env;
14769 while (! sigsetjmp (env, 1))
14770 siglongjmp (env, 1);
14773 return 0;
14775 _ACEOF
14776 if ac_fn_c_try_compile "$LINENO"; then :
14777 gdb_cv_func_sigsetjmp=yes
14778 else
14779 gdb_cv_func_sigsetjmp=no
14782 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
14786 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
14787 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
14789 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
14794 # Check whether --with-intel_pt was given.
14795 if test "${with_intel_pt+set}" = set; then :
14796 withval=$with_intel_pt;
14797 else
14798 with_intel_pt=auto
14801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
14802 $as_echo_n "checking whether to use intel pt... " >&6; }
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
14804 $as_echo "$with_intel_pt" >&6; }
14806 if test "${with_intel_pt}" = no; then
14807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
14808 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
14809 HAVE_LIBIPT=no
14810 else
14811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14812 /* end confdefs.h. */
14814 #include <linux/perf_event.h>
14815 #ifndef PERF_ATTR_SIZE_VER5
14816 # error
14817 #endif
14819 _ACEOF
14820 if ac_fn_c_try_cpp "$LINENO"; then :
14821 perf_event=yes
14822 else
14823 perf_event=no
14825 rm -f conftest.err conftest.i conftest.$ac_ext
14826 if test "$perf_event" != yes; then
14827 if test "$with_intel_pt" = yes; then
14828 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
14829 else
14830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
14831 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
14843 use_additional=yes
14845 acl_save_prefix="$prefix"
14846 prefix="$acl_final_prefix"
14847 acl_save_exec_prefix="$exec_prefix"
14848 exec_prefix="$acl_final_exec_prefix"
14850 eval additional_includedir=\"$includedir\"
14851 eval additional_libdir=\"$libdir\"
14853 exec_prefix="$acl_save_exec_prefix"
14854 prefix="$acl_save_prefix"
14857 # Check whether --with-libipt-prefix was given.
14858 if test "${with_libipt_prefix+set}" = set; then :
14859 withval=$with_libipt_prefix;
14860 if test "X$withval" = "Xno"; then
14861 use_additional=no
14862 else
14863 if test "X$withval" = "X"; then
14865 acl_save_prefix="$prefix"
14866 prefix="$acl_final_prefix"
14867 acl_save_exec_prefix="$exec_prefix"
14868 exec_prefix="$acl_final_exec_prefix"
14870 eval additional_includedir=\"$includedir\"
14871 eval additional_libdir=\"$libdir\"
14873 exec_prefix="$acl_save_exec_prefix"
14874 prefix="$acl_save_prefix"
14876 else
14877 additional_includedir="$withval/include"
14878 additional_libdir="$withval/lib"
14885 # Check whether --with-libipt-type was given.
14886 if test "${with_libipt_type+set}" = set; then :
14887 withval=$with_libipt_type; with_libipt_type=$withval
14888 else
14889 with_libipt_type=auto
14892 lib_type=`eval echo \$with_libipt_type`
14894 LIBIPT=
14895 LTLIBIPT=
14896 INCIPT=
14897 rpathdirs=
14898 ltrpathdirs=
14899 names_already_handled=
14900 names_next_round='ipt '
14901 while test -n "$names_next_round"; do
14902 names_this_round="$names_next_round"
14903 names_next_round=
14904 for name in $names_this_round; do
14905 already_handled=
14906 for n in $names_already_handled; do
14907 if test "$n" = "$name"; then
14908 already_handled=yes
14909 break
14911 done
14912 if test -z "$already_handled"; then
14913 names_already_handled="$names_already_handled $name"
14914 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14915 eval value=\"\$HAVE_LIB$uppername\"
14916 if test -n "$value"; then
14917 if test "$value" = yes; then
14918 eval value=\"\$LIB$uppername\"
14919 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14920 eval value=\"\$LTLIB$uppername\"
14921 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14922 else
14925 else
14926 found_dir=
14927 found_la=
14928 found_so=
14929 found_a=
14930 if test $use_additional = yes; then
14931 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14932 found_dir="$additional_libdir"
14933 found_so="$additional_libdir/lib$name.$shlibext"
14934 if test -f "$additional_libdir/lib$name.la"; then
14935 found_la="$additional_libdir/lib$name.la"
14937 elif test x$lib_type != xshared; then
14938 if test -f "$additional_libdir/lib$name.$libext"; then
14939 found_dir="$additional_libdir"
14940 found_a="$additional_libdir/lib$name.$libext"
14941 if test -f "$additional_libdir/lib$name.la"; then
14942 found_la="$additional_libdir/lib$name.la"
14947 if test "X$found_dir" = "X"; then
14948 for x in $LDFLAGS $LTLIBIPT; do
14950 acl_save_prefix="$prefix"
14951 prefix="$acl_final_prefix"
14952 acl_save_exec_prefix="$exec_prefix"
14953 exec_prefix="$acl_final_exec_prefix"
14954 eval x=\"$x\"
14955 exec_prefix="$acl_save_exec_prefix"
14956 prefix="$acl_save_prefix"
14958 case "$x" in
14959 -L*)
14960 dir=`echo "X$x" | sed -e 's/^X-L//'`
14961 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
14962 found_dir="$dir"
14963 found_so="$dir/lib$name.$shlibext"
14964 if test -f "$dir/lib$name.la"; then
14965 found_la="$dir/lib$name.la"
14967 elif test x$lib_type != xshared; then
14968 if test -f "$dir/lib$name.$libext"; then
14969 found_dir="$dir"
14970 found_a="$dir/lib$name.$libext"
14971 if test -f "$dir/lib$name.la"; then
14972 found_la="$dir/lib$name.la"
14977 esac
14978 if test "X$found_dir" != "X"; then
14979 break
14981 done
14983 if test "X$found_dir" != "X"; then
14984 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14985 if test "X$found_so" != "X"; then
14986 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14987 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14988 else
14989 haveit=
14990 for x in $ltrpathdirs; do
14991 if test "X$x" = "X$found_dir"; then
14992 haveit=yes
14993 break
14995 done
14996 if test -z "$haveit"; then
14997 ltrpathdirs="$ltrpathdirs $found_dir"
14999 if test "$hardcode_direct" = yes; then
15000 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15001 else
15002 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
15003 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15004 haveit=
15005 for x in $rpathdirs; do
15006 if test "X$x" = "X$found_dir"; then
15007 haveit=yes
15008 break
15010 done
15011 if test -z "$haveit"; then
15012 rpathdirs="$rpathdirs $found_dir"
15014 else
15015 haveit=
15016 for x in $LDFLAGS $LIBIPT; do
15018 acl_save_prefix="$prefix"
15019 prefix="$acl_final_prefix"
15020 acl_save_exec_prefix="$exec_prefix"
15021 exec_prefix="$acl_final_exec_prefix"
15022 eval x=\"$x\"
15023 exec_prefix="$acl_save_exec_prefix"
15024 prefix="$acl_save_prefix"
15026 if test "X$x" = "X-L$found_dir"; then
15027 haveit=yes
15028 break
15030 done
15031 if test -z "$haveit"; then
15032 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
15034 if test "$hardcode_minus_L" != no; then
15035 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
15036 else
15037 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15042 else
15043 if test "X$found_a" != "X"; then
15044 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
15045 else
15046 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
15049 additional_includedir=
15050 case "$found_dir" in
15051 */lib | */lib/)
15052 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
15053 additional_includedir="$basedir/include"
15055 esac
15056 if test "X$additional_includedir" != "X"; then
15057 if test "X$additional_includedir" != "X/usr/include"; then
15058 haveit=
15059 if test "X$additional_includedir" = "X/usr/local/include"; then
15060 if test -n "$GCC"; then
15061 case $host_os in
15062 linux*) haveit=yes;;
15063 esac
15066 if test -z "$haveit"; then
15067 for x in $CPPFLAGS $INCIPT; do
15069 acl_save_prefix="$prefix"
15070 prefix="$acl_final_prefix"
15071 acl_save_exec_prefix="$exec_prefix"
15072 exec_prefix="$acl_final_exec_prefix"
15073 eval x=\"$x\"
15074 exec_prefix="$acl_save_exec_prefix"
15075 prefix="$acl_save_prefix"
15077 if test "X$x" = "X-I$additional_includedir"; then
15078 haveit=yes
15079 break
15081 done
15082 if test -z "$haveit"; then
15083 if test -d "$additional_includedir"; then
15084 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
15090 if test -n "$found_la"; then
15091 save_libdir="$libdir"
15092 case "$found_la" in
15093 */* | *\\*) . "$found_la" ;;
15094 *) . "./$found_la" ;;
15095 esac
15096 libdir="$save_libdir"
15097 for dep in $dependency_libs; do
15098 case "$dep" in
15099 -L*)
15100 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
15101 if test "X$additional_libdir" != "X/usr/lib"; then
15102 haveit=
15103 if test "X$additional_libdir" = "X/usr/local/lib"; then
15104 if test -n "$GCC"; then
15105 case $host_os in
15106 linux*) haveit=yes;;
15107 esac
15110 if test -z "$haveit"; then
15111 haveit=
15112 for x in $LDFLAGS $LIBIPT; do
15114 acl_save_prefix="$prefix"
15115 prefix="$acl_final_prefix"
15116 acl_save_exec_prefix="$exec_prefix"
15117 exec_prefix="$acl_final_exec_prefix"
15118 eval x=\"$x\"
15119 exec_prefix="$acl_save_exec_prefix"
15120 prefix="$acl_save_prefix"
15122 if test "X$x" = "X-L$additional_libdir"; then
15123 haveit=yes
15124 break
15126 done
15127 if test -z "$haveit"; then
15128 if test -d "$additional_libdir"; then
15129 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
15132 haveit=
15133 for x in $LDFLAGS $LTLIBIPT; do
15135 acl_save_prefix="$prefix"
15136 prefix="$acl_final_prefix"
15137 acl_save_exec_prefix="$exec_prefix"
15138 exec_prefix="$acl_final_exec_prefix"
15139 eval x=\"$x\"
15140 exec_prefix="$acl_save_exec_prefix"
15141 prefix="$acl_save_prefix"
15143 if test "X$x" = "X-L$additional_libdir"; then
15144 haveit=yes
15145 break
15147 done
15148 if test -z "$haveit"; then
15149 if test -d "$additional_libdir"; then
15150 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
15156 -R*)
15157 dir=`echo "X$dep" | sed -e 's/^X-R//'`
15158 if test "$enable_rpath" != no; then
15159 haveit=
15160 for x in $rpathdirs; do
15161 if test "X$x" = "X$dir"; then
15162 haveit=yes
15163 break
15165 done
15166 if test -z "$haveit"; then
15167 rpathdirs="$rpathdirs $dir"
15169 haveit=
15170 for x in $ltrpathdirs; do
15171 if test "X$x" = "X$dir"; then
15172 haveit=yes
15173 break
15175 done
15176 if test -z "$haveit"; then
15177 ltrpathdirs="$ltrpathdirs $dir"
15181 -l*)
15182 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
15184 *.la)
15185 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
15188 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
15189 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
15191 esac
15192 done
15194 else
15195 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
15196 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
15197 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
15198 else
15199 LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext"
15200 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext"
15205 done
15206 done
15207 if test "X$rpathdirs" != "X"; then
15208 if test -n "$hardcode_libdir_separator"; then
15209 alldirs=
15210 for found_dir in $rpathdirs; do
15211 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
15212 done
15213 acl_save_libdir="$libdir"
15214 libdir="$alldirs"
15215 eval flag=\"$hardcode_libdir_flag_spec\"
15216 libdir="$acl_save_libdir"
15217 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15218 else
15219 for found_dir in $rpathdirs; do
15220 acl_save_libdir="$libdir"
15221 libdir="$found_dir"
15222 eval flag=\"$hardcode_libdir_flag_spec\"
15223 libdir="$acl_save_libdir"
15224 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
15225 done
15228 if test "X$ltrpathdirs" != "X"; then
15229 for found_dir in $ltrpathdirs; do
15230 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
15231 done
15235 ac_save_CPPFLAGS="$CPPFLAGS"
15237 for element in $INCIPT; do
15238 haveit=
15239 for x in $CPPFLAGS; do
15241 acl_save_prefix="$prefix"
15242 prefix="$acl_final_prefix"
15243 acl_save_exec_prefix="$exec_prefix"
15244 exec_prefix="$acl_final_exec_prefix"
15245 eval x=\"$x\"
15246 exec_prefix="$acl_save_exec_prefix"
15247 prefix="$acl_save_prefix"
15249 if test "X$x" = "X$element"; then
15250 haveit=yes
15251 break
15253 done
15254 if test -z "$haveit"; then
15255 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
15257 done
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
15261 $as_echo_n "checking for libipt... " >&6; }
15262 if ${ac_cv_libipt+:} false; then :
15263 $as_echo_n "(cached) " >&6
15264 else
15266 ac_save_LIBS="$LIBS"
15267 LIBS="$LIBS $LIBIPT"
15268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15269 /* end confdefs.h. */
15270 #include "intel-pt.h"
15272 main ()
15274 pt_insn_alloc_decoder (0);
15276 return 0;
15278 _ACEOF
15279 if ac_fn_c_try_link "$LINENO"; then :
15280 ac_cv_libipt=yes
15281 else
15282 ac_cv_libipt=no
15284 rm -f core conftest.err conftest.$ac_objext \
15285 conftest$ac_exeext conftest.$ac_ext
15286 LIBS="$ac_save_LIBS"
15289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
15290 $as_echo "$ac_cv_libipt" >&6; }
15291 if test "$ac_cv_libipt" = yes; then
15292 HAVE_LIBIPT=yes
15294 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
15296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
15297 $as_echo_n "checking how to link with libipt... " >&6; }
15298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
15299 $as_echo "$LIBIPT" >&6; }
15300 else
15301 HAVE_LIBIPT=no
15302 CPPFLAGS="$ac_save_CPPFLAGS"
15303 LIBIPT=
15304 LTLIBIPT=
15312 if test "$HAVE_LIBIPT" != yes; then
15313 if test "$with_intel_pt" = yes; then
15314 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
15315 else
15316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
15317 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
15319 else
15320 save_LIBS=$LIBS
15321 LIBS="$LIBS $LIBIPT"
15322 for ac_func in pt_insn_event
15323 do :
15324 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
15325 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
15326 cat >>confdefs.h <<_ACEOF
15327 #define HAVE_PT_INSN_EVENT 1
15328 _ACEOF
15331 done
15333 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
15335 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
15337 cat >>confdefs.h <<_ACEOF
15338 #define HAVE_STRUCT_PT_INSN_ENABLED 1
15339 _ACEOF
15343 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
15345 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
15347 cat >>confdefs.h <<_ACEOF
15348 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
15349 _ACEOF
15354 LIBS=$save_LIBS
15358 # Check if the compiler and runtime support printing long longs.
15360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15361 $as_echo_n "checking for long long support in printf... " >&6; }
15362 if ${gdb_cv_printf_has_long_long+:} false; then :
15363 $as_echo_n "(cached) " >&6
15364 else
15365 if test "$cross_compiling" = yes; then :
15366 gdb_cv_printf_has_long_long=no
15367 else
15368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15369 /* end confdefs.h. */
15370 $ac_includes_default
15372 main ()
15374 char buf[32];
15375 long long l = 0;
15376 l = (l << 16) + 0x0123;
15377 l = (l << 16) + 0x4567;
15378 l = (l << 16) + 0x89ab;
15379 l = (l << 16) + 0xcdef;
15380 sprintf (buf, "0x%016llx", l);
15381 return (strcmp ("0x0123456789abcdef", buf));
15383 return 0;
15385 _ACEOF
15386 if ac_fn_c_try_run "$LINENO"; then :
15387 gdb_cv_printf_has_long_long=yes
15388 else
15389 gdb_cv_printf_has_long_long=no
15391 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15392 conftest.$ac_objext conftest.beam conftest.$ac_ext
15396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15397 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15398 if test "$gdb_cv_printf_has_long_long" = yes; then
15400 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15405 $as_echo "#define _STRUCTURED_PROC 1" >>confdefs.h
15407 for ac_header in sys/procfs.h
15408 do :
15409 ac_fn_c_check_header_mongrel "$LINENO" "sys/procfs.h" "ac_cv_header_sys_procfs_h" "$ac_includes_default"
15410 if test "x$ac_cv_header_sys_procfs_h" = xyes; then :
15411 cat >>confdefs.h <<_ACEOF
15412 #define HAVE_SYS_PROCFS_H 1
15413 _ACEOF
15417 done
15419 if test "$ac_cv_header_sys_procfs_h" = yes; then
15421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
15422 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
15423 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
15424 $as_echo_n "(cached) " >&6
15425 else
15426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15427 /* end confdefs.h. */
15429 #define _SYSCALL32
15430 #include <sys/procfs.h>
15432 main ()
15434 gregset_t avar
15436 return 0;
15438 _ACEOF
15439 if ac_fn_c_try_compile "$LINENO"; then :
15440 bfd_cv_have_sys_procfs_type_gregset_t=yes
15441 else
15442 bfd_cv_have_sys_procfs_type_gregset_t=no
15445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15448 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
15450 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
15453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
15454 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
15457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
15458 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
15459 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
15460 $as_echo_n "(cached) " >&6
15461 else
15462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15463 /* end confdefs.h. */
15465 #define _SYSCALL32
15466 #include <sys/procfs.h>
15468 main ()
15470 fpregset_t avar
15472 return 0;
15474 _ACEOF
15475 if ac_fn_c_try_compile "$LINENO"; then :
15476 bfd_cv_have_sys_procfs_type_fpregset_t=yes
15477 else
15478 bfd_cv_have_sys_procfs_type_fpregset_t=no
15481 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15484 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
15486 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
15490 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
15493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
15494 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
15495 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
15496 $as_echo_n "(cached) " >&6
15497 else
15498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15499 /* end confdefs.h. */
15501 #define _SYSCALL32
15502 #include <sys/procfs.h>
15504 main ()
15506 prgregset_t avar
15508 return 0;
15510 _ACEOF
15511 if ac_fn_c_try_compile "$LINENO"; then :
15512 bfd_cv_have_sys_procfs_type_prgregset_t=yes
15513 else
15514 bfd_cv_have_sys_procfs_type_prgregset_t=no
15517 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15520 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
15522 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
15526 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
15529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
15530 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
15531 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
15532 $as_echo_n "(cached) " >&6
15533 else
15534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15535 /* end confdefs.h. */
15537 #define _SYSCALL32
15538 #include <sys/procfs.h>
15540 main ()
15542 prfpregset_t avar
15544 return 0;
15546 _ACEOF
15547 if ac_fn_c_try_compile "$LINENO"; then :
15548 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
15549 else
15550 bfd_cv_have_sys_procfs_type_prfpregset_t=no
15553 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15556 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
15558 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
15561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
15562 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
15565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
15566 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
15567 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
15568 $as_echo_n "(cached) " >&6
15569 else
15570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15571 /* end confdefs.h. */
15573 #define _SYSCALL32
15574 #include <sys/procfs.h>
15576 main ()
15578 prgregset32_t avar
15580 return 0;
15582 _ACEOF
15583 if ac_fn_c_try_compile "$LINENO"; then :
15584 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
15585 else
15586 bfd_cv_have_sys_procfs_type_prgregset32_t=no
15589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15592 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
15594 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
15597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
15598 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
15601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
15602 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
15603 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
15604 $as_echo_n "(cached) " >&6
15605 else
15606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15607 /* end confdefs.h. */
15609 #define _SYSCALL32
15610 #include <sys/procfs.h>
15612 main ()
15614 lwpid_t avar
15616 return 0;
15618 _ACEOF
15619 if ac_fn_c_try_compile "$LINENO"; then :
15620 bfd_cv_have_sys_procfs_type_lwpid_t=yes
15621 else
15622 bfd_cv_have_sys_procfs_type_lwpid_t=no
15625 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15628 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
15630 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
15633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
15634 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
15637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
15638 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
15639 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
15640 $as_echo_n "(cached) " >&6
15641 else
15642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15643 /* end confdefs.h. */
15645 #define _SYSCALL32
15646 #include <sys/procfs.h>
15648 main ()
15650 psaddr_t avar
15652 return 0;
15654 _ACEOF
15655 if ac_fn_c_try_compile "$LINENO"; then :
15656 bfd_cv_have_sys_procfs_type_psaddr_t=yes
15657 else
15658 bfd_cv_have_sys_procfs_type_psaddr_t=no
15661 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15664 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
15666 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
15669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
15670 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
15673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
15674 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
15675 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
15676 $as_echo_n "(cached) " >&6
15677 else
15678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15679 /* end confdefs.h. */
15681 #define _SYSCALL32
15682 #include <sys/procfs.h>
15684 main ()
15686 elf_fpregset_t avar
15688 return 0;
15690 _ACEOF
15691 if ac_fn_c_try_compile "$LINENO"; then :
15692 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
15693 else
15694 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
15697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15700 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
15702 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
15705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
15706 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
15711 # Check the return and argument types of ptrace.
15714 for ac_header in sys/ptrace.h ptrace.h
15715 do :
15716 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15717 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15718 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15719 cat >>confdefs.h <<_ACEOF
15720 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15721 _ACEOF
15725 done
15728 gdb_ptrace_headers='
15729 #include <sys/types.h>
15730 #if HAVE_SYS_PTRACE_H
15731 # include <sys/ptrace.h>
15732 #endif
15733 #if HAVE_UNISTD_H
15734 # include <unistd.h>
15735 #endif
15738 # Check return type. Varargs (used on GNU/Linux) conflict with the
15739 # empty argument list, so check for that explicitly.
15740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
15741 $as_echo_n "checking return type of ptrace... " >&6; }
15742 if ${gdb_cv_func_ptrace_ret+:} false; then :
15743 $as_echo_n "(cached) " >&6
15744 else
15745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15746 /* end confdefs.h. */
15747  $gdb_ptrace_headers
15749 main ()
15751 extern long ptrace (enum __ptrace_request, ...);
15754 return 0;
15756 _ACEOF
15757 if ac_fn_c_try_compile "$LINENO"; then :
15758 gdb_cv_func_ptrace_ret='long'
15759 else
15760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15761 /* end confdefs.h. */
15762 $gdb_ptrace_headers
15764 main ()
15766 extern int ptrace ();
15769 return 0;
15771 _ACEOF
15772 if ac_fn_c_try_compile "$LINENO"; then :
15773 gdb_cv_func_ptrace_ret='int'
15774 else
15775 gdb_cv_func_ptrace_ret='long'
15778 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
15785 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
15788 cat >>confdefs.h <<_ACEOF
15789 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
15790 _ACEOF
15793 # Check argument types.
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
15795 $as_echo_n "checking types of arguments for ptrace... " >&6; }
15796 if ${gdb_cv_func_ptrace_args+:} false; then :
15797 $as_echo_n "(cached) " >&6
15798 else
15799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15800 /* end confdefs.h. */
15801 $gdb_ptrace_headers
15803 main ()
15805 extern long ptrace (enum __ptrace_request, ...);
15808 return 0;
15810 _ACEOF
15811 if ac_fn_c_try_compile "$LINENO"; then :
15812 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
15813 else
15814 for gdb_arg1 in 'int' 'long'; do
15815 for gdb_arg2 in 'pid_t' 'int' 'long'; do
15816 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
15817 for gdb_arg4 in 'int' 'long' 'void *'; do
15818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15819 /* end confdefs.h. */
15820 $gdb_ptrace_headers
15822 main ()
15824 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
15827 return 0;
15829 _ACEOF
15830 if ac_fn_c_try_compile "$LINENO"; then :
15831 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
15832 break 4;
15835 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15837 for gdb_arg5 in 'int *' 'int' 'long'; do
15838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15839 /* end confdefs.h. */
15840 $gdb_ptrace_headers
15842 main ()
15844 extern $gdb_cv_func_ptrace_ret ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
15847 return 0;
15849 _ACEOF
15850 if ac_fn_c_try_compile "$LINENO"; then :
15851 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
15852 break 5;
15855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15856 done
15857 done
15858 done
15859 done
15860 done
15861 # Provide a safe default value.
15862 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
15865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
15869 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
15871 ac_save_IFS=$IFS; IFS=','
15872 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
15873 IFS=$ac_save_IFS
15874 shift
15876 cat >>confdefs.h <<_ACEOF
15877 #define PTRACE_TYPE_ARG1 $1
15878 _ACEOF
15881 cat >>confdefs.h <<_ACEOF
15882 #define PTRACE_TYPE_ARG3 $3
15883 _ACEOF
15886 cat >>confdefs.h <<_ACEOF
15887 #define PTRACE_TYPE_ARG4 $4
15888 _ACEOF
15890 if test -n "$5"; then
15892 cat >>confdefs.h <<_ACEOF
15893 #define PTRACE_TYPE_ARG5 $5
15894 _ACEOF
15899 if test "$cross_compiling" = no; then
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15901 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15902 if ${ac_cv_func_setpgrp_void+:} false; then :
15903 $as_echo_n "(cached) " >&6
15904 else
15905 if test "$cross_compiling" = yes; then :
15906 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
15907 else
15908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15909 /* end confdefs.h. */
15910 $ac_includes_default
15912 main ()
15914 /* If this system has a BSD-style setpgrp which takes arguments,
15915 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
15916 exit successfully. */
15917 return setpgrp (1,1) != -1;
15919 return 0;
15921 _ACEOF
15922 if ac_fn_c_try_run "$LINENO"; then :
15923 ac_cv_func_setpgrp_void=no
15924 else
15925 ac_cv_func_setpgrp_void=yes
15927 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15928 conftest.$ac_objext conftest.beam conftest.$ac_ext
15932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15933 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15934 if test $ac_cv_func_setpgrp_void = yes; then
15936 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15940 else
15941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15942 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15943 if ${ac_cv_func_setpgrp_void+:} false; then :
15944 $as_echo_n "(cached) " >&6
15945 else
15946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15947 /* end confdefs.h. */
15948 #include <unistd.h>
15950 main ()
15952 if (setpgrp(1,1) == -1)
15953 exit (0);
15954 else
15955 exit (1);
15958 return 0;
15960 _ACEOF
15961 if ac_fn_c_try_compile "$LINENO"; then :
15962 ac_cv_func_setpgrp_void=no
15963 else
15964 ac_cv_func_setpgrp_void=yes
15967 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15971 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15972 if test "$ac_cv_func_setpgrp_void" = yes; then
15973 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15978 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15979 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15980 #include <sys/proc.h>
15983 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15985 cat >>confdefs.h <<_ACEOF
15986 #define HAVE_STRUCT_THREAD_TD_PCB 1
15987 _ACEOF
15993 # See if <sys/lwp.h> defines `struct lwp`.
15994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15995 $as_echo_n "checking for struct lwp... " >&6; }
15996 if ${gdb_cv_struct_lwp+:} false; then :
15997 $as_echo_n "(cached) " >&6
15998 else
15999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16000 /* end confdefs.h. */
16001 #include <sys/param.h>
16002 #define _KMEMUSER
16003 #include <sys/lwp.h>
16005 main ()
16007 struct lwp l;
16010 return 0;
16012 _ACEOF
16013 if ac_fn_c_try_compile "$LINENO"; then :
16014 gdb_cv_struct_lwp=yes
16015 else
16016 gdb_cv_struct_lwp=no
16019 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
16023 $as_echo "$gdb_cv_struct_lwp" >&6; }
16024 if test "$gdb_cv_struct_lwp" = yes; then
16026 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
16030 # See if <machine/reg.h> degines `struct reg'.
16031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
16032 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
16033 if ${gdb_cv_struct_reg+:} false; then :
16034 $as_echo_n "(cached) " >&6
16035 else
16036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16037 /* end confdefs.h. */
16038 #include <sys/types.h>
16039 #include <machine/reg.h>
16041 main ()
16043 struct reg r;
16046 return 0;
16048 _ACEOF
16049 if ac_fn_c_try_compile "$LINENO"; then :
16050 gdb_cv_struct_reg=yes
16051 else
16052 gdb_cv_struct_reg=no
16055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
16059 $as_echo "$gdb_cv_struct_reg" >&6; }
16060 if test "$gdb_cv_struct_reg" = yes; then
16062 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
16066 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
16067 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
16068 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
16069 #include <machine/reg.h>
16071 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
16073 cat >>confdefs.h <<_ACEOF
16074 #define HAVE_STRUCT_REG_R_FS 1
16075 _ACEOF
16079 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
16080 #include <machine/reg.h>
16082 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
16084 cat >>confdefs.h <<_ACEOF
16085 #define HAVE_STRUCT_REG_R_GS 1
16086 _ACEOF
16092 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
16093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
16094 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
16095 if ${gdb_cv_have_ptrace_getregs+:} false; then :
16096 $as_echo_n "(cached) " >&6
16097 else
16098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16099 /* end confdefs.h. */
16100 #include <sys/ptrace.h>
16102 main ()
16104 PTRACE_GETREGS;
16106 return 0;
16108 _ACEOF
16109 if ac_fn_c_try_compile "$LINENO"; then :
16110 gdb_cv_have_ptrace_getregs=yes
16111 else
16112 gdb_cv_have_ptrace_getregs=no
16115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
16120 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
16121 if test "$gdb_cv_have_ptrace_getregs" = yes; then
16123 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
16127 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
16128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
16129 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
16130 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
16131 $as_echo_n "(cached) " >&6
16132 else
16133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16134 /* end confdefs.h. */
16135 #include <sys/ptrace.h>
16137 main ()
16139 PTRACE_GETFPXREGS;
16141 return 0;
16143 _ACEOF
16144 if ac_fn_c_try_compile "$LINENO"; then :
16145 gdb_cv_have_ptrace_getfpxregs=yes
16146 else
16147 gdb_cv_have_ptrace_getfpxregs=no
16150 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
16155 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
16156 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
16158 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
16162 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
16163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
16164 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
16165 if ${gdb_cv_have_pt_getdbregs+:} false; then :
16166 $as_echo_n "(cached) " >&6
16167 else
16168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h. */
16170 #include <sys/types.h>
16171 #include <sys/ptrace.h>
16173 main ()
16175 PT_GETDBREGS;
16178 return 0;
16180 _ACEOF
16181 if ac_fn_c_try_compile "$LINENO"; then :
16182 gdb_cv_have_pt_getdbregs=yes
16183 else
16184 gdb_cv_have_pt_getdbregs=no
16187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
16192 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
16193 if test "$gdb_cv_have_pt_getdbregs" = yes; then
16195 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
16199 # See if <sys/ptrace.h> supports LWP names on FreeBSD
16200 # Older FreeBSD versions don't have the pl_tdname member of
16201 # `struct ptrace_lwpinfo'.
16202 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
16204 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
16206 cat >>confdefs.h <<_ACEOF
16207 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
16208 _ACEOF
16214 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
16215 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
16216 # FreeBSD 10.3.
16217 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>
16219 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
16221 cat >>confdefs.h <<_ACEOF
16222 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
16223 _ACEOF
16229 # Check if the compiler supports the `long long' type.
16231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
16232 $as_echo_n "checking for long long support in compiler... " >&6; }
16233 if ${gdb_cv_c_long_long+:} false; then :
16234 $as_echo_n "(cached) " >&6
16235 else
16236 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16237 /* end confdefs.h. */
16238 extern long long foo;
16240 main ()
16242 switch (foo & 2) { case 0: return 1; }
16244 return 0;
16246 _ACEOF
16247 if ac_fn_c_try_compile "$LINENO"; then :
16248 gdb_cv_c_long_long=yes
16249 else
16250 gdb_cv_c_long_long=no
16252 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
16255 $as_echo "$gdb_cv_c_long_long" >&6; }
16256 if test "$gdb_cv_c_long_long" != yes; then
16257 # libdecnumber requires long long.
16258 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
16261 # Check if the compiler and runtime support printing decfloats.
16263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
16264 $as_echo_n "checking for decfloat support in printf... " >&6; }
16265 if ${gdb_cv_printf_has_decfloat+:} false; then :
16266 $as_echo_n "(cached) " >&6
16267 else
16268 if test "$cross_compiling" = yes; then :
16269 gdb_cv_printf_has_decfloat=no
16270 else
16271 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16272 /* end confdefs.h. */
16273 $ac_includes_default
16275 main ()
16277 char buf[64];
16278 _Decimal32 d32 = 1.2345df;
16279 _Decimal64 d64 = 1.2345dd;
16280 _Decimal128 d128 = 1.2345dl;
16281 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
16282 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
16284 return 0;
16286 _ACEOF
16287 if ac_fn_c_try_run "$LINENO"; then :
16288 gdb_cv_printf_has_decfloat=yes
16289 else
16290 gdb_cv_printf_has_decfloat=no
16292 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16293 conftest.$ac_objext conftest.beam conftest.$ac_ext
16297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
16298 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
16299 if test "$gdb_cv_printf_has_decfloat" = yes; then
16301 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
16305 # Check if the compiler supports the `long double' type. We can't use
16306 # AC_C_LONG_DOUBLE because that one does additional checks on the
16307 # constants defined in <float.h> that fail on some systems,
16308 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
16310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
16311 $as_echo_n "checking for long double support in compiler... " >&6; }
16312 if ${gdb_cv_c_long_double+:} false; then :
16313 $as_echo_n "(cached) " >&6
16314 else
16315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16316 /* end confdefs.h. */
16317 long double foo;
16318 _ACEOF
16319 if ac_fn_c_try_compile "$LINENO"; then :
16320 gdb_cv_c_long_double=yes
16321 else
16322 gdb_cv_c_long_double=no
16324 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
16327 $as_echo "$gdb_cv_c_long_double" >&6; }
16328 if test "$gdb_cv_c_long_double" = yes; then
16330 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
16334 # Check if the compiler and runtime support printing long doubles.
16336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
16337 $as_echo_n "checking for long double support in printf... " >&6; }
16338 if ${gdb_cv_printf_has_long_double+:} false; then :
16339 $as_echo_n "(cached) " >&6
16340 else
16341 if test "$cross_compiling" = yes; then :
16342 gdb_cv_printf_has_long_double=no
16343 else
16344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16345 /* end confdefs.h. */
16346 $ac_includes_default
16348 main ()
16350 char buf[16];
16351 long double f = 3.141592653;
16352 sprintf (buf, "%Lg", f);
16353 return (strncmp ("3.14159", buf, 7));
16355 return 0;
16357 _ACEOF
16358 if ac_fn_c_try_run "$LINENO"; then :
16359 gdb_cv_printf_has_long_double=yes
16360 else
16361 gdb_cv_printf_has_long_double=no
16363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16364 conftest.$ac_objext conftest.beam conftest.$ac_ext
16368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
16369 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
16370 if test "$gdb_cv_printf_has_long_double" = yes; then
16372 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
16376 # Check if the compiler and runtime support scanning long doubles.
16378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
16379 $as_echo_n "checking for long double support in scanf... " >&6; }
16380 if ${gdb_cv_scanf_has_long_double+:} false; then :
16381 $as_echo_n "(cached) " >&6
16382 else
16383 if test "$cross_compiling" = yes; then :
16384 gdb_cv_scanf_has_long_double=no
16385 else
16386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16387 /* end confdefs.h. */
16388 #include <stdio.h>
16390 main ()
16392 char *buf = "3.141592653";
16393 long double f = 0;
16394 sscanf (buf, "%Lg", &f);
16395 return !(f > 3.14159 && f < 3.14160);
16397 return 0;
16399 _ACEOF
16400 if ac_fn_c_try_run "$LINENO"; then :
16401 gdb_cv_scanf_has_long_double=yes
16402 else
16403 gdb_cv_scanf_has_long_double=no
16405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16406 conftest.$ac_objext conftest.beam conftest.$ac_ext
16410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
16411 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
16412 if test "$gdb_cv_scanf_has_long_double" = yes; then
16414 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
16418 case ${host_os} in
16419 aix*)
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
16421 $as_echo_n "checking for -bbigtoc option... " >&6; }
16422 if ${gdb_cv_bigtoc+:} false; then :
16423 $as_echo_n "(cached) " >&6
16424 else
16425 SAVE_LDFLAGS=$LDFLAGS
16427 case $GCC in
16428 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
16429 *) gdb_cv_bigtoc=-bbigtoc ;;
16430 esac
16432 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
16433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16434 /* end confdefs.h. */
16437 main ()
16439 int i;
16441 return 0;
16443 _ACEOF
16444 if ac_fn_c_try_link "$LINENO"; then :
16446 else
16447 gdb_cv_bigtoc=
16450 rm -f core conftest.err conftest.$ac_objext \
16451 conftest$ac_exeext conftest.$ac_ext
16452 LDFLAGS="${SAVE_LDFLAGS}"
16455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
16456 $as_echo "$gdb_cv_bigtoc" >&6; }
16457 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
16459 esac
16461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
16462 $as_echo_n "checking for the dynamic export flag... " >&6; }
16463 dynamic_list=false
16464 if test "${gdb_native}" = yes; then
16465 # The dynamically loaded libthread_db needs access to symbols in the gdb
16466 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
16467 # may not be supported there.
16468 old_LDFLAGS="$LDFLAGS"
16469 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
16470 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
16471 LDFLAGS="$LDFLAGS $RDYNAMIC"
16472 if test "${have_libpython}" = no; then
16473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16474 /* end confdefs.h. */
16477 main ()
16481 return 0;
16483 _ACEOF
16484 if ac_fn_c_try_link "$LINENO"; then :
16485 dynamic_list=true
16487 rm -f core conftest.err conftest.$ac_objext \
16488 conftest$ac_exeext conftest.$ac_ext
16489 else
16490 # Workaround http://bugs.python.org/issue4434 where static
16491 # libpythonX.Y.a would get its symbols required for
16492 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
16493 # Problem does not happen for the recommended libpythonX.Y.so linkage.
16495 # Note the workaround for Python
16496 # http://bugs.python.org/issue10112 earlier has removed
16497 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
16498 # here too, as otherwise it'd make this -Wl,--dynamic-list test
16499 # always pass.
16500 old_CFLAGS="$CFLAGS"
16501 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
16502 old_LIBS="$LIBS"
16503 LIBS="$LIBS $PYTHON_LIBS"
16504 old_CPPFLAGS="$CPPFLAGS"
16505 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
16506 if test "$cross_compiling" = yes; then :
16507 true
16508 else
16509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16510 /* end confdefs.h. */
16511 #include "Python.h"
16513 main ()
16515 int err;
16516 Py_Initialize ();
16517 err = PyRun_SimpleString ("import ctypes\n");
16518 Py_Finalize ();
16519 return err == 0 ? 0 : 1;
16521 return 0;
16523 _ACEOF
16524 if ac_fn_c_try_run "$LINENO"; then :
16525 dynamic_list=true
16527 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16528 conftest.$ac_objext conftest.beam conftest.$ac_ext
16531 LIBS="$old_LIBS"
16532 CFLAGS="$old_CFLAGS"
16533 CPPFLAGS="$old_CPPFLAGS"
16535 LDFLAGS="$old_LDFLAGS"
16537 if $dynamic_list; then
16538 found="-Wl,--dynamic-list"
16539 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
16540 else
16541 found="-rdynamic"
16542 RDYNAMIC="-rdynamic"
16545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
16546 $as_echo "$found" >&6; }
16548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether execinfo.h backtrace is available" >&5
16549 $as_echo_n "checking whether execinfo.h backtrace is available... " >&6; }
16550 if ${gdb_cv_execinfo_backtrace+:} false; then :
16551 $as_echo_n "(cached) " >&6
16552 else
16553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16554 /* end confdefs.h. */
16556 #include <execinfo.h>
16559 main ()
16562 int f;
16563 void *b[2];
16564 f = backtrace (b, 2);
16565 backtrace_symbols_fd (b, f, 2);
16568 return 0;
16570 _ACEOF
16571 if ac_fn_c_try_link "$LINENO"; then :
16572 gdb_cv_execinfo_backtrace=yes
16573 else
16574 gdb_cv_execinfo_backtrace=no
16576 rm -f core conftest.err conftest.$ac_objext \
16577 conftest$ac_exeext conftest.$ac_ext
16579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_execinfo_backtrace" >&5
16580 $as_echo "$gdb_cv_execinfo_backtrace" >&6; }
16581 if test "$gdb_cv_execinfo_backtrace" = yes; then
16583 $as_echo "#define HAVE_EXECINFO_BACKTRACE 1" >>confdefs.h
16588 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
16589 case ${host_os} in
16590 aix*)
16591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
16592 $as_echo_n "checking for AiX thread debugging library... " >&6; }
16593 if ${gdb_cv_have_aix_thread_debug+:} false; then :
16594 $as_echo_n "(cached) " >&6
16595 else
16596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16597 /* end confdefs.h. */
16598 #include <sys/pthdebug.h>
16600 main ()
16602 #ifndef PTHDB_VERSION_3
16603 #error
16604 #endif
16607 return 0;
16609 _ACEOF
16610 if ac_fn_c_try_compile "$LINENO"; then :
16611 gdb_cv_have_aix_thread_debug=yes
16612 else
16613 gdb_cv_have_aix_thread_debug=no
16616 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
16621 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
16622 if test "$gdb_cv_have_aix_thread_debug" = yes; then
16623 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
16624 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
16625 LIBS="$LIBS -lpthdebug"
16627 # Older versions of AIX do not provide the declaration for
16628 # the getthrds function (it appears that it was introduced
16629 # with AIX 6.x).
16630 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
16632 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
16633 ac_have_decl=1
16634 else
16635 ac_have_decl=0
16638 cat >>confdefs.h <<_ACEOF
16639 #define HAVE_DECL_GETTHRDS $ac_have_decl
16640 _ACEOF
16644 esac
16648 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
16649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
16650 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
16651 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
16652 $as_echo_n "(cached) " >&6
16653 else
16654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16655 /* end confdefs.h. */
16656 #include <thread_db.h>
16658 main ()
16660 int i = TD_NOTALLOC;
16663 return 0;
16665 _ACEOF
16666 if ac_fn_c_try_compile "$LINENO"; then :
16667 gdb_cv_thread_db_h_has_td_notalloc=yes
16668 else
16669 gdb_cv_thread_db_h_has_td_notalloc=no
16672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
16676 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
16678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
16679 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
16680 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
16681 $as_echo_n "(cached) " >&6
16682 else
16683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16684 /* end confdefs.h. */
16685 #include <thread_db.h>
16687 main ()
16689 int i = TD_VERSION;
16692 return 0;
16694 _ACEOF
16695 if ac_fn_c_try_compile "$LINENO"; then :
16696 gdb_cv_thread_db_h_has_td_version=yes
16697 else
16698 gdb_cv_thread_db_h_has_td_version=no
16701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
16705 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
16707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
16708 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
16709 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
16710 $as_echo_n "(cached) " >&6
16711 else
16712 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16713 /* end confdefs.h. */
16714 #include <thread_db.h>
16716 main ()
16718 int i = TD_NOTLS;
16721 return 0;
16723 _ACEOF
16724 if ac_fn_c_try_compile "$LINENO"; then :
16725 gdb_cv_thread_db_h_has_td_notls=yes
16726 else
16727 gdb_cv_thread_db_h_has_td_notls=no
16730 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
16734 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
16736 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
16738 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
16741 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
16743 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
16746 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
16748 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
16752 case $host_os in
16753 go32* | *djgpp*)
16754 gdbinit=gdb.ini
16757 gdbinit=.gdbinit
16759 esac
16761 cat >>confdefs.h <<_ACEOF
16762 #define GDBINIT "$gdbinit"
16763 _ACEOF
16767 cat >>confdefs.h <<_ACEOF
16768 #define GDBEARLYINIT ".gdbearlyinit"
16769 _ACEOF
16773 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
16774 # except that the argument to --with-sysroot is optional.
16775 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
16776 if test "x$with_sysroot" = xyes; then
16777 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
16780 # Check whether --with-sysroot was given.
16781 if test "${with_sysroot+set}" = set; then :
16782 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
16783 else
16784 TARGET_SYSTEM_ROOT=
16788 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16789 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16790 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
16791 ac_define_dir=`eval echo $ac_define_dir`
16793 cat >>confdefs.h <<_ACEOF
16794 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
16795 _ACEOF
16800 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16801 if test "x$prefix" = xNONE; then
16802 test_prefix=/usr/local
16803 else
16804 test_prefix=$prefix
16806 else
16807 test_prefix=$exec_prefix
16809 value=0
16810 case ${ac_define_dir} in
16811 "${test_prefix}"|"${test_prefix}/"*|\
16812 '${exec_prefix}'|'${exec_prefix}/'*)
16813 value=1
16815 esac
16817 cat >>confdefs.h <<_ACEOF
16818 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
16819 _ACEOF
16825 # Check whether --with-system-gdbinit was given.
16826 if test "${with_system_gdbinit+set}" = set; then :
16827 withval=$with_system_gdbinit;
16828 SYSTEM_GDBINIT=$withval
16829 else
16830 SYSTEM_GDBINIT=
16834 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16835 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16836 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
16837 ac_define_dir=`eval echo $ac_define_dir`
16839 cat >>confdefs.h <<_ACEOF
16840 #define SYSTEM_GDBINIT "$ac_define_dir"
16841 _ACEOF
16846 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16847 if test "x$prefix" = xNONE; then
16848 test_prefix=/usr/local
16849 else
16850 test_prefix=$prefix
16852 else
16853 test_prefix=$exec_prefix
16855 value=0
16856 case ${ac_define_dir} in
16857 "${test_prefix}"|"${test_prefix}/"*|\
16858 '${exec_prefix}'|'${exec_prefix}/'*)
16859 value=1
16861 esac
16863 cat >>confdefs.h <<_ACEOF
16864 #define SYSTEM_GDBINIT_RELOCATABLE $value
16865 _ACEOF
16871 # Check whether --with-system-gdbinit-dir was given.
16872 if test "${with_system_gdbinit_dir+set}" = set; then :
16873 withval=$with_system_gdbinit_dir;
16874 SYSTEM_GDBINIT_DIR=$withval
16875 else
16876 SYSTEM_GDBINIT_DIR=
16880 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16881 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16882 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16883 ac_define_dir=`eval echo $ac_define_dir`
16885 cat >>confdefs.h <<_ACEOF
16886 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16887 _ACEOF
16892 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16893 if test "x$prefix" = xNONE; then
16894 test_prefix=/usr/local
16895 else
16896 test_prefix=$prefix
16898 else
16899 test_prefix=$exec_prefix
16901 value=0
16902 case ${ac_define_dir} in
16903 "${test_prefix}"|"${test_prefix}/"*|\
16904 '${exec_prefix}'|'${exec_prefix}/'*)
16905 value=1
16907 esac
16909 cat >>confdefs.h <<_ACEOF
16910 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16911 _ACEOF
16918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the compiler type" >&5
16919 $as_echo_n "checking the compiler type... " >&6; }
16920 if ${gdb_cv_compiler_type+:} false; then :
16921 $as_echo_n "(cached) " >&6
16922 else
16923 gdb_cv_compiler_type=unknown
16924 if test "$gdb_cv_compiler_type" = unknown; then
16925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16926 /* end confdefs.h. */
16929 main ()
16932 #if !defined __GNUC__ || defined __clang__
16933 #error not gcc
16934 #endif
16937 return 0;
16939 _ACEOF
16940 if ac_fn_c_try_compile "$LINENO"; then :
16941 gdb_cv_compiler_type=gcc
16943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16946 if test "$gdb_cv_compiler_type" = unknown; then
16947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16948 /* end confdefs.h. */
16951 main ()
16954 #ifndef __clang__
16955 #error not clang
16956 #endif
16959 return 0;
16961 _ACEOF
16962 if ac_fn_c_try_compile "$LINENO"; then :
16963 gdb_cv_compiler_type=clang
16965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_compiler_type" >&5
16970 $as_echo "$gdb_cv_compiler_type" >&6; }
16972 GDB_COMPILER_TYPE="$gdb_cv_compiler_type"
16975 # Check whether --enable-werror was given.
16976 if test "${enable_werror+set}" = set; then :
16977 enableval=$enable_werror; case "${enableval}" in
16978 yes | y) ERROR_ON_WARNING="yes" ;;
16979 no | n) ERROR_ON_WARNING="no" ;;
16980 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16981 esac
16985 # Enable -Werror by default when using gcc. Turn it off for releases.
16986 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16987 ERROR_ON_WARNING=yes
16990 WERROR_CFLAGS=""
16991 if test "${ERROR_ON_WARNING}" = yes ; then
16992 WERROR_CFLAGS="-Werror"
16995 # The options we'll try to enable.
16996 build_warnings="-Wall -Wpointer-arith \
16997 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16998 -Wno-switch -Wno-char-subscripts \
16999 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
17000 -Wno-sign-compare -Wno-error=maybe-uninitialized \
17001 -Wno-mismatched-tags \
17002 -Wno-error=deprecated-register \
17003 -Wsuggest-override \
17004 -Wimplicit-fallthrough=3 \
17005 -Wduplicated-cond \
17006 -Wshadow=local \
17007 -Wdeprecated-copy \
17008 -Wdeprecated-copy-dtor \
17009 -Wredundant-move \
17010 -Wmissing-declarations \
17011 -Wstrict-null-sentinel \
17014 # The -Wmissing-prototypes flag will be accepted by GCC, but results
17015 # in a warning being printed about the flag not being valid for C++,
17016 # this is something to do with using ccache, and argument ordering.
17017 if test "$GDB_COMPILER_TYPE" != gcc; then
17018 build_warnings="$build_warnings -Wmissing-prototypes"
17021 case "${host}" in
17022 *-*-mingw32*)
17023 # Enable -Wno-format by default when using gcc on mingw since many
17024 # GCC versions complain about %I64.
17025 build_warnings="$build_warnings -Wno-format" ;;
17026 *-*-solaris*)
17027 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
17028 # doesn't understand.
17029 build_warnings="$build_warnings -Wno-unknown-pragmas"
17030 # Solaris 11 <unistd.h> marks vfork deprecated.
17031 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
17033 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
17034 # but there's a special case for this below.
17035 build_warnings="$build_warnings -Wformat-nonliteral" ;;
17036 esac
17038 # Check whether --enable-build-warnings was given.
17039 if test "${enable_build_warnings+set}" = set; then :
17040 enableval=$enable_build_warnings; case "${enableval}" in
17041 yes) ;;
17042 no) build_warnings="-w";;
17043 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17044 build_warnings="${build_warnings} ${t}";;
17045 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17046 build_warnings="${t} ${build_warnings}";;
17047 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17048 esac
17049 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17050 echo "Setting compiler warning flags = $build_warnings" 6>&1
17053 # Check whether --enable-gdb-build-warnings was given.
17054 if test "${enable_gdb_build_warnings+set}" = set; then :
17055 enableval=$enable_gdb_build_warnings; case "${enableval}" in
17056 yes) ;;
17057 no) build_warnings="-w";;
17058 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17059 build_warnings="${build_warnings} ${t}";;
17060 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
17061 build_warnings="${t} ${build_warnings}";;
17062 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
17063 esac
17064 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
17065 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
17069 # The set of warnings supported by a C++ compiler is not the same as
17070 # of the C compiler.
17071 ac_ext=cpp
17072 ac_cpp='$CXXCPP $CPPFLAGS'
17073 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17074 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17075 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17078 WARN_CFLAGS=""
17079 if test "x${build_warnings}" != x -a "x$GCC" = xyes
17080 then
17081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
17082 $as_echo_n "checking compiler warning flags... " >&6; }
17083 # Separate out the -Werror flag as some files just cannot be
17084 # compiled with it enabled.
17085 for w in ${build_warnings}; do
17086 # GCC does not complain about -Wno-unknown-warning. Invert
17087 # and test -Wunknown-warning instead.
17088 case $w in
17089 -Wno-*)
17090 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
17091 -Wformat-nonliteral)
17092 # gcc requires -Wformat before -Wformat-nonliteral
17093 # will work, so stick them together.
17094 w="-Wformat $w"
17095 wtest="$w"
17098 wtest=$w ;;
17099 esac
17101 case $w in
17102 -Werr*) WERROR_CFLAGS=-Werror ;;
17104 # Check whether GCC accepts it.
17105 saved_CFLAGS="$CFLAGS"
17106 CFLAGS="$CFLAGS -Werror $wtest"
17107 saved_CXXFLAGS="$CXXFLAGS"
17108 CXXFLAGS="$CXXFLAGS -Werror $wtest"
17109 if test "x$w" = "x-Wunused-variable"; then
17110 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
17111 # fixed in GCC 4.9. This test is derived from the gdb
17112 # source code that triggered this bug in GCC.
17113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17114 /* end confdefs.h. */
17115 struct scoped_restore_base {};
17116 struct scoped_restore_tmpl : public scoped_restore_base {
17117 ~scoped_restore_tmpl() {}
17120 main ()
17122 const scoped_restore_base &b = scoped_restore_tmpl();
17125 return 0;
17127 _ACEOF
17128 if ac_fn_cxx_try_compile "$LINENO"; then :
17129 WARN_CFLAGS="${WARN_CFLAGS} $w"
17131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17132 else
17133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17134 /* end confdefs.h. */
17137 main ()
17141 return 0;
17143 _ACEOF
17144 if ac_fn_cxx_try_compile "$LINENO"; then :
17145 WARN_CFLAGS="${WARN_CFLAGS} $w"
17147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17149 CFLAGS="$saved_CFLAGS"
17150 CXXFLAGS="$saved_CXXFLAGS"
17151 esac
17152 done
17153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
17154 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
17159 ac_ext=c
17160 ac_cpp='$CPP $CPPFLAGS'
17161 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17162 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17163 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17167 # Check whether --enable-ubsan was given.
17168 if test "${enable_ubsan+set}" = set; then :
17169 enableval=$enable_ubsan;
17170 else
17171 enable_ubsan=no
17174 if test "x$enable_ubsan" = xauto; then
17175 if $development; then
17176 enable_ubsan=yes
17179 ac_ext=cpp
17180 ac_cpp='$CXXCPP $CPPFLAGS'
17181 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17182 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17183 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17185 if test "x$enable_ubsan" = xyes; then
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
17187 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
17188 saved_CXXFLAGS="$CXXFLAGS"
17189 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17191 /* end confdefs.h. */
17194 main ()
17198 return 0;
17200 _ACEOF
17201 if ac_fn_cxx_try_link "$LINENO"; then :
17202 enable_ubsan=yes
17203 else
17204 enable_ubsan=no
17207 rm -f core conftest.err conftest.$ac_objext \
17208 conftest$ac_exeext conftest.$ac_ext
17209 CXXFLAGS="$saved_CXXFLAGS"
17210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
17211 $as_echo "$enable_ubsan" >&6; }
17212 if test "x$enable_ubsan" = xyes; then
17213 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
17214 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
17217 ac_ext=c
17218 ac_cpp='$CPP $CPPFLAGS'
17219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17225 # In the Cygwin environment, we need some additional flags.
17226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
17227 $as_echo_n "checking for cygwin... " >&6; }
17228 if ${gdb_cv_os_cygwin+:} false; then :
17229 $as_echo_n "(cached) " >&6
17230 else
17231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17232 /* end confdefs.h. */
17234 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
17235 lose
17236 #endif
17237 _ACEOF
17238 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17239 $EGREP "^lose$" >/dev/null 2>&1; then :
17240 gdb_cv_os_cygwin=yes
17241 else
17242 gdb_cv_os_cygwin=no
17244 rm -f conftest*
17247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
17248 $as_echo "$gdb_cv_os_cygwin" >&6; }
17251 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
17252 case ${host} in
17253 *go32* ) SER_HARDWIRE=ser-go32.o ;;
17254 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
17255 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
17256 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
17257 esac
17260 # libreadline needs libuser32.a in a cygwin environment
17261 WIN32LIBS=
17262 if test x"$gdb_cv_os_cygwin" = xyes; then
17263 WIN32LIBS="-luser32"
17264 case "${target}" in
17265 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
17267 esac
17270 # The ser-tcp.c module requires sockets.
17271 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
17272 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
17274 # Add ELF support to GDB, but only if BFD includes ELF support.
17276 OLD_CFLAGS=$CFLAGS
17277 OLD_LDFLAGS=$LDFLAGS
17278 OLD_LIBS=$LIBS
17279 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17280 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17281 # always want our bfd.
17282 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17283 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17284 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17285 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17286 LIBS="-lbfd -liberty -lz $intl $LIBS"
17287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
17288 $as_echo_n "checking for ELF support in BFD... " >&6; }
17289 if ${gdb_cv_var_elf+:} false; then :
17290 $as_echo_n "(cached) " >&6
17291 else
17292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17293 /* end confdefs.h. */
17294 #include <stdlib.h>
17295 #include <string.h>
17296 #include "bfd.h"
17297 #include "elf-bfd.h"
17299 main ()
17301 return bfd_get_elf_phdr_upper_bound (NULL);
17304 return 0;
17306 _ACEOF
17307 if ac_fn_c_try_link "$LINENO"; then :
17308 gdb_cv_var_elf=yes
17309 else
17310 gdb_cv_var_elf=no
17313 rm -f core conftest.err conftest.$ac_objext \
17314 conftest$ac_exeext conftest.$ac_ext
17317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
17318 $as_echo "$gdb_cv_var_elf" >&6; }
17319 CFLAGS=$OLD_CFLAGS
17320 LDFLAGS=$OLD_LDFLAGS
17321 LIBS=$OLD_LIBS
17322 if test "$gdb_cv_var_elf" = yes; then
17323 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o \
17324 gcore-elf.o elf-none-tdep.o"
17326 $as_echo "#define HAVE_ELF 1" >>confdefs.h
17328 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
17329 if test "$plugins" = "yes"; then
17330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
17331 $as_echo_n "checking for library containing dlopen... " >&6; }
17332 if ${ac_cv_search_dlopen+:} false; then :
17333 $as_echo_n "(cached) " >&6
17334 else
17335 ac_func_search_save_LIBS=$LIBS
17336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17337 /* end confdefs.h. */
17339 /* Override any GCC internal prototype to avoid an error.
17340 Use char because int might match the return type of a GCC
17341 builtin and then its argument prototype would still apply. */
17342 #ifdef __cplusplus
17343 extern "C"
17344 #endif
17345 char dlopen ();
17347 main ()
17349 return dlopen ();
17351 return 0;
17353 _ACEOF
17354 for ac_lib in '' dl; do
17355 if test -z "$ac_lib"; then
17356 ac_res="none required"
17357 else
17358 ac_res=-l$ac_lib
17359 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17361 if ac_fn_c_try_link "$LINENO"; then :
17362 ac_cv_search_dlopen=$ac_res
17364 rm -f core conftest.err conftest.$ac_objext \
17365 conftest$ac_exeext
17366 if ${ac_cv_search_dlopen+:} false; then :
17367 break
17369 done
17370 if ${ac_cv_search_dlopen+:} false; then :
17372 else
17373 ac_cv_search_dlopen=no
17375 rm conftest.$ac_ext
17376 LIBS=$ac_func_search_save_LIBS
17378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
17379 $as_echo "$ac_cv_search_dlopen" >&6; }
17380 ac_res=$ac_cv_search_dlopen
17381 if test "$ac_res" != no; then :
17382 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17389 # Add macho support to GDB, but only if BFD includes it.
17391 OLD_CFLAGS=$CFLAGS
17392 OLD_LDFLAGS=$LDFLAGS
17393 OLD_LIBS=$LIBS
17394 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
17395 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
17396 # always want our bfd.
17397 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
17398 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
17399 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
17400 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
17401 LIBS="-lbfd -liberty -lz $intl $LIBS"
17402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
17403 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
17404 if ${gdb_cv_var_macho+:} false; then :
17405 $as_echo_n "(cached) " >&6
17406 else
17407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17408 /* end confdefs.h. */
17409 #include <stdlib.h>
17410 #include <string.h>
17411 #include "bfd.h"
17412 #include "mach-o.h"
17414 main ()
17416 return bfd_mach_o_lookup_command (NULL, 0, NULL);
17419 return 0;
17421 _ACEOF
17422 if ac_fn_c_try_link "$LINENO"; then :
17423 gdb_cv_var_macho=yes
17424 else
17425 gdb_cv_var_macho=no
17428 rm -f core conftest.err conftest.$ac_objext \
17429 conftest$ac_exeext conftest.$ac_ext
17432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
17433 $as_echo "$gdb_cv_var_macho" >&6; }
17434 CFLAGS=$OLD_CFLAGS
17435 LDFLAGS=$OLD_LDFLAGS
17436 LIBS=$OLD_LIBS
17437 if test "$gdb_cv_var_macho" = yes; then
17438 CONFIG_OBS="$CONFIG_OBS machoread.o"
17441 # Add any host-specific objects to GDB.
17442 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
17444 # If building on ELF, look for lzma support for embedded compressed debug info.
17445 if test "$gdb_cv_var_elf" = yes; then
17447 # Check whether --with-lzma was given.
17448 if test "${with_lzma+set}" = set; then :
17449 withval=$with_lzma;
17450 else
17451 with_lzma=auto
17454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
17455 $as_echo_n "checking whether to use lzma... " >&6; }
17456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
17457 $as_echo "$with_lzma" >&6; }
17459 if test "${with_lzma}" != no; then
17468 use_additional=yes
17470 acl_save_prefix="$prefix"
17471 prefix="$acl_final_prefix"
17472 acl_save_exec_prefix="$exec_prefix"
17473 exec_prefix="$acl_final_exec_prefix"
17475 eval additional_includedir=\"$includedir\"
17476 eval additional_libdir=\"$libdir\"
17478 exec_prefix="$acl_save_exec_prefix"
17479 prefix="$acl_save_prefix"
17482 # Check whether --with-liblzma-prefix was given.
17483 if test "${with_liblzma_prefix+set}" = set; then :
17484 withval=$with_liblzma_prefix;
17485 if test "X$withval" = "Xno"; then
17486 use_additional=no
17487 else
17488 if test "X$withval" = "X"; then
17490 acl_save_prefix="$prefix"
17491 prefix="$acl_final_prefix"
17492 acl_save_exec_prefix="$exec_prefix"
17493 exec_prefix="$acl_final_exec_prefix"
17495 eval additional_includedir=\"$includedir\"
17496 eval additional_libdir=\"$libdir\"
17498 exec_prefix="$acl_save_exec_prefix"
17499 prefix="$acl_save_prefix"
17501 else
17502 additional_includedir="$withval/include"
17503 additional_libdir="$withval/lib"
17510 # Check whether --with-liblzma-type was given.
17511 if test "${with_liblzma_type+set}" = set; then :
17512 withval=$with_liblzma_type; with_liblzma_type=$withval
17513 else
17514 with_liblzma_type=auto
17517 lib_type=`eval echo \$with_liblzma_type`
17519 LIBLZMA=
17520 LTLIBLZMA=
17521 INCLZMA=
17522 rpathdirs=
17523 ltrpathdirs=
17524 names_already_handled=
17525 names_next_round='lzma '
17526 while test -n "$names_next_round"; do
17527 names_this_round="$names_next_round"
17528 names_next_round=
17529 for name in $names_this_round; do
17530 already_handled=
17531 for n in $names_already_handled; do
17532 if test "$n" = "$name"; then
17533 already_handled=yes
17534 break
17536 done
17537 if test -z "$already_handled"; then
17538 names_already_handled="$names_already_handled $name"
17539 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17540 eval value=\"\$HAVE_LIB$uppername\"
17541 if test -n "$value"; then
17542 if test "$value" = yes; then
17543 eval value=\"\$LIB$uppername\"
17544 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
17545 eval value=\"\$LTLIB$uppername\"
17546 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
17547 else
17550 else
17551 found_dir=
17552 found_la=
17553 found_so=
17554 found_a=
17555 if test $use_additional = yes; then
17556 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17557 found_dir="$additional_libdir"
17558 found_so="$additional_libdir/lib$name.$shlibext"
17559 if test -f "$additional_libdir/lib$name.la"; then
17560 found_la="$additional_libdir/lib$name.la"
17562 elif test x$lib_type != xshared; then
17563 if test -f "$additional_libdir/lib$name.$libext"; then
17564 found_dir="$additional_libdir"
17565 found_a="$additional_libdir/lib$name.$libext"
17566 if test -f "$additional_libdir/lib$name.la"; then
17567 found_la="$additional_libdir/lib$name.la"
17572 if test "X$found_dir" = "X"; then
17573 for x in $LDFLAGS $LTLIBLZMA; do
17575 acl_save_prefix="$prefix"
17576 prefix="$acl_final_prefix"
17577 acl_save_exec_prefix="$exec_prefix"
17578 exec_prefix="$acl_final_exec_prefix"
17579 eval x=\"$x\"
17580 exec_prefix="$acl_save_exec_prefix"
17581 prefix="$acl_save_prefix"
17583 case "$x" in
17584 -L*)
17585 dir=`echo "X$x" | sed -e 's/^X-L//'`
17586 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
17587 found_dir="$dir"
17588 found_so="$dir/lib$name.$shlibext"
17589 if test -f "$dir/lib$name.la"; then
17590 found_la="$dir/lib$name.la"
17592 elif test x$lib_type != xshared; then
17593 if test -f "$dir/lib$name.$libext"; then
17594 found_dir="$dir"
17595 found_a="$dir/lib$name.$libext"
17596 if test -f "$dir/lib$name.la"; then
17597 found_la="$dir/lib$name.la"
17602 esac
17603 if test "X$found_dir" != "X"; then
17604 break
17606 done
17608 if test "X$found_dir" != "X"; then
17609 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
17610 if test "X$found_so" != "X"; then
17611 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
17612 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17613 else
17614 haveit=
17615 for x in $ltrpathdirs; do
17616 if test "X$x" = "X$found_dir"; then
17617 haveit=yes
17618 break
17620 done
17621 if test -z "$haveit"; then
17622 ltrpathdirs="$ltrpathdirs $found_dir"
17624 if test "$hardcode_direct" = yes; then
17625 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17626 else
17627 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
17628 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17629 haveit=
17630 for x in $rpathdirs; do
17631 if test "X$x" = "X$found_dir"; then
17632 haveit=yes
17633 break
17635 done
17636 if test -z "$haveit"; then
17637 rpathdirs="$rpathdirs $found_dir"
17639 else
17640 haveit=
17641 for x in $LDFLAGS $LIBLZMA; do
17643 acl_save_prefix="$prefix"
17644 prefix="$acl_final_prefix"
17645 acl_save_exec_prefix="$exec_prefix"
17646 exec_prefix="$acl_final_exec_prefix"
17647 eval x=\"$x\"
17648 exec_prefix="$acl_save_exec_prefix"
17649 prefix="$acl_save_prefix"
17651 if test "X$x" = "X-L$found_dir"; then
17652 haveit=yes
17653 break
17655 done
17656 if test -z "$haveit"; then
17657 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
17659 if test "$hardcode_minus_L" != no; then
17660 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
17661 else
17662 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17667 else
17668 if test "X$found_a" != "X"; then
17669 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
17670 else
17671 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
17674 additional_includedir=
17675 case "$found_dir" in
17676 */lib | */lib/)
17677 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
17678 additional_includedir="$basedir/include"
17680 esac
17681 if test "X$additional_includedir" != "X"; then
17682 if test "X$additional_includedir" != "X/usr/include"; then
17683 haveit=
17684 if test "X$additional_includedir" = "X/usr/local/include"; then
17685 if test -n "$GCC"; then
17686 case $host_os in
17687 linux*) haveit=yes;;
17688 esac
17691 if test -z "$haveit"; then
17692 for x in $CPPFLAGS $INCLZMA; do
17694 acl_save_prefix="$prefix"
17695 prefix="$acl_final_prefix"
17696 acl_save_exec_prefix="$exec_prefix"
17697 exec_prefix="$acl_final_exec_prefix"
17698 eval x=\"$x\"
17699 exec_prefix="$acl_save_exec_prefix"
17700 prefix="$acl_save_prefix"
17702 if test "X$x" = "X-I$additional_includedir"; then
17703 haveit=yes
17704 break
17706 done
17707 if test -z "$haveit"; then
17708 if test -d "$additional_includedir"; then
17709 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
17715 if test -n "$found_la"; then
17716 save_libdir="$libdir"
17717 case "$found_la" in
17718 */* | *\\*) . "$found_la" ;;
17719 *) . "./$found_la" ;;
17720 esac
17721 libdir="$save_libdir"
17722 for dep in $dependency_libs; do
17723 case "$dep" in
17724 -L*)
17725 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
17726 if test "X$additional_libdir" != "X/usr/lib"; then
17727 haveit=
17728 if test "X$additional_libdir" = "X/usr/local/lib"; then
17729 if test -n "$GCC"; then
17730 case $host_os in
17731 linux*) haveit=yes;;
17732 esac
17735 if test -z "$haveit"; then
17736 haveit=
17737 for x in $LDFLAGS $LIBLZMA; do
17739 acl_save_prefix="$prefix"
17740 prefix="$acl_final_prefix"
17741 acl_save_exec_prefix="$exec_prefix"
17742 exec_prefix="$acl_final_exec_prefix"
17743 eval x=\"$x\"
17744 exec_prefix="$acl_save_exec_prefix"
17745 prefix="$acl_save_prefix"
17747 if test "X$x" = "X-L$additional_libdir"; then
17748 haveit=yes
17749 break
17751 done
17752 if test -z "$haveit"; then
17753 if test -d "$additional_libdir"; then
17754 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
17757 haveit=
17758 for x in $LDFLAGS $LTLIBLZMA; do
17760 acl_save_prefix="$prefix"
17761 prefix="$acl_final_prefix"
17762 acl_save_exec_prefix="$exec_prefix"
17763 exec_prefix="$acl_final_exec_prefix"
17764 eval x=\"$x\"
17765 exec_prefix="$acl_save_exec_prefix"
17766 prefix="$acl_save_prefix"
17768 if test "X$x" = "X-L$additional_libdir"; then
17769 haveit=yes
17770 break
17772 done
17773 if test -z "$haveit"; then
17774 if test -d "$additional_libdir"; then
17775 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
17781 -R*)
17782 dir=`echo "X$dep" | sed -e 's/^X-R//'`
17783 if test "$enable_rpath" != no; then
17784 haveit=
17785 for x in $rpathdirs; do
17786 if test "X$x" = "X$dir"; then
17787 haveit=yes
17788 break
17790 done
17791 if test -z "$haveit"; then
17792 rpathdirs="$rpathdirs $dir"
17794 haveit=
17795 for x in $ltrpathdirs; do
17796 if test "X$x" = "X$dir"; then
17797 haveit=yes
17798 break
17800 done
17801 if test -z "$haveit"; then
17802 ltrpathdirs="$ltrpathdirs $dir"
17806 -l*)
17807 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
17809 *.la)
17810 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
17813 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
17814 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
17816 esac
17817 done
17819 else
17820 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
17821 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
17822 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
17823 else
17824 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext"
17825 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext"
17830 done
17831 done
17832 if test "X$rpathdirs" != "X"; then
17833 if test -n "$hardcode_libdir_separator"; then
17834 alldirs=
17835 for found_dir in $rpathdirs; do
17836 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
17837 done
17838 acl_save_libdir="$libdir"
17839 libdir="$alldirs"
17840 eval flag=\"$hardcode_libdir_flag_spec\"
17841 libdir="$acl_save_libdir"
17842 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17843 else
17844 for found_dir in $rpathdirs; do
17845 acl_save_libdir="$libdir"
17846 libdir="$found_dir"
17847 eval flag=\"$hardcode_libdir_flag_spec\"
17848 libdir="$acl_save_libdir"
17849 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
17850 done
17853 if test "X$ltrpathdirs" != "X"; then
17854 for found_dir in $ltrpathdirs; do
17855 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
17856 done
17860 ac_save_CPPFLAGS="$CPPFLAGS"
17862 for element in $INCLZMA; do
17863 haveit=
17864 for x in $CPPFLAGS; do
17866 acl_save_prefix="$prefix"
17867 prefix="$acl_final_prefix"
17868 acl_save_exec_prefix="$exec_prefix"
17869 exec_prefix="$acl_final_exec_prefix"
17870 eval x=\"$x\"
17871 exec_prefix="$acl_save_exec_prefix"
17872 prefix="$acl_save_prefix"
17874 if test "X$x" = "X$element"; then
17875 haveit=yes
17876 break
17878 done
17879 if test -z "$haveit"; then
17880 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
17882 done
17885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
17886 $as_echo_n "checking for liblzma... " >&6; }
17887 if ${ac_cv_liblzma+:} false; then :
17888 $as_echo_n "(cached) " >&6
17889 else
17891 ac_save_LIBS="$LIBS"
17892 LIBS="$LIBS $LIBLZMA"
17893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17894 /* end confdefs.h. */
17895 #include "lzma.h"
17897 main ()
17899 lzma_index_iter iter;
17900 lzma_index_iter_init (&iter, 0);
17901 lzma_mf_is_supported (LZMA_MF_HC3);
17903 return 0;
17905 _ACEOF
17906 if ac_fn_c_try_link "$LINENO"; then :
17907 ac_cv_liblzma=yes
17908 else
17909 ac_cv_liblzma=no
17911 rm -f core conftest.err conftest.$ac_objext \
17912 conftest$ac_exeext conftest.$ac_ext
17913 LIBS="$ac_save_LIBS"
17916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
17917 $as_echo "$ac_cv_liblzma" >&6; }
17918 if test "$ac_cv_liblzma" = yes; then
17919 HAVE_LIBLZMA=yes
17921 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
17923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
17924 $as_echo_n "checking how to link with liblzma... " >&6; }
17925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
17926 $as_echo "$LIBLZMA" >&6; }
17927 else
17928 HAVE_LIBLZMA=no
17929 CPPFLAGS="$ac_save_CPPFLAGS"
17930 LIBLZMA=
17931 LTLIBLZMA=
17939 if test "$HAVE_LIBLZMA" != yes; then
17940 if test "$with_lzma" = yes; then
17941 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17947 LIBGUI="../libgui/src/libgui.a"
17948 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17952 WIN32LDAPP=
17956 case "${host}" in
17957 *-*-cygwin* | *-*-mingw* )
17958 configdir="win"
17961 configdir="unix"
17963 esac
17965 GDBTKLIBS=
17966 if test "${enable_gdbtk}" = "yes"; then
17968 # Gdbtk must have an absolute path to srcdir in order to run
17969 # properly when not installed.
17970 here=`pwd`
17971 cd ${srcdir}
17972 GDBTK_SRC_DIR=`pwd`
17973 cd $here
17977 # Ok, lets find the tcl configuration
17978 # First, look for one uninstalled.
17979 # the alternative search directory is invoked by --with-tcl
17982 if test x"${no_tcl}" = x ; then
17983 # we reset no_tcl in case something fails here
17984 no_tcl=true
17986 # Check whether --with-tcl was given.
17987 if test "${with_tcl+set}" = set; then :
17988 withval=$with_tcl; with_tclconfig=${withval}
17991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17992 $as_echo_n "checking for Tcl configuration... " >&6; }
17993 if ${ac_cv_c_tclconfig+:} false; then :
17994 $as_echo_n "(cached) " >&6
17995 else
17998 # First check to see if --with-tcl was specified.
17999 case "${host}" in
18000 *-*-cygwin*) platDir="win" ;;
18001 *) platDir="unix" ;;
18002 esac
18003 if test x"${with_tclconfig}" != x ; then
18004 if test -f "${with_tclconfig}/tclConfig.sh" ; then
18005 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
18006 else
18007 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
18011 # then check for a private Tcl installation
18012 if test x"${ac_cv_c_tclconfig}" = x ; then
18013 for i in \
18014 ../tcl \
18015 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18016 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
18017 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
18018 ../../tcl \
18019 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18020 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
18021 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
18022 ../../../tcl \
18023 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18024 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
18025 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
18026 if test -f "$i/$platDir/tclConfig.sh" ; then
18027 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18028 break
18030 done
18033 # on Darwin, check in Framework installation locations
18034 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
18035 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18036 `ls -d /Library/Frameworks 2>/dev/null` \
18037 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18038 `ls -d /System/Library/Frameworks 2>/dev/null` \
18039 ; do
18040 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
18041 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
18042 break
18044 done
18047 # check in a few common install locations
18048 if test x"${ac_cv_c_tclconfig}" = x ; then
18049 for i in `ls -d ${libdir} 2>/dev/null` \
18050 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18051 `ls -d ${prefix}/lib 2>/dev/null` \
18052 `ls -d /usr/local/lib 2>/dev/null` \
18053 `ls -d /usr/contrib/lib 2>/dev/null` \
18054 `ls -d /usr/lib 2>/dev/null` \
18055 ; do
18056 if test -f "$i/tclConfig.sh" ; then
18057 ac_cv_c_tclconfig=`(cd $i; pwd)`
18058 break
18060 done
18063 # check in a few other private locations
18064 if test x"${ac_cv_c_tclconfig}" = x ; then
18065 for i in \
18066 ${srcdir}/../tcl \
18067 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
18068 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
18069 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
18070 if test -f "$i/$platDir/tclConfig.sh" ; then
18071 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
18072 break
18074 done
18080 if test x"${ac_cv_c_tclconfig}" = x ; then
18081 TCL_BIN_DIR="# no Tcl configs found"
18082 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
18083 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
18084 else
18085 no_tcl=
18086 TCL_BIN_DIR=${ac_cv_c_tclconfig}
18087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
18088 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18093 # If $no_tk is nonempty, then we can't do Tk, and there is no
18094 # point to doing Tcl.
18097 # Ok, lets find the tk configuration
18098 # First, look for one uninstalled.
18099 # the alternative search directory is invoked by --with-tk
18102 if test x"${no_tk}" = x ; then
18103 # we reset no_tk in case something fails here
18104 no_tk=true
18106 # Check whether --with-tk was given.
18107 if test "${with_tk+set}" = set; then :
18108 withval=$with_tk; with_tkconfig=${withval}
18111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
18112 $as_echo_n "checking for Tk configuration... " >&6; }
18113 if ${ac_cv_c_tkconfig+:} false; then :
18114 $as_echo_n "(cached) " >&6
18115 else
18118 # First check to see if --with-tkconfig was specified.
18119 if test x"${with_tkconfig}" != x ; then
18120 if test -f "${with_tkconfig}/tkConfig.sh" ; then
18121 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
18122 else
18123 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
18127 # then check for a private Tk library
18128 case "${host}" in
18129 *-*-cygwin*) platDir="win" ;;
18130 *) platDir="unix" ;;
18131 esac
18132 if test x"${ac_cv_c_tkconfig}" = x ; then
18133 for i in \
18134 ../tk \
18135 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18136 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
18137 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
18138 ../../tk \
18139 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18140 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
18141 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
18142 ../../../tk \
18143 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18144 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
18145 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
18146 if test -f "$i/$platDir/tkConfig.sh" ; then
18147 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18148 break
18150 done
18153 # on Darwin, check in Framework installation locations
18154 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
18155 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
18156 `ls -d /Library/Frameworks 2>/dev/null` \
18157 `ls -d /Network/Library/Frameworks 2>/dev/null` \
18158 `ls -d /System/Library/Frameworks 2>/dev/null` \
18159 ; do
18160 if test -f "$i/Tk.framework/tkConfig.sh" ; then
18161 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
18162 break
18164 done
18167 # check in a few common install locations
18168 if test x"${ac_cv_c_tkconfig}" = x ; then
18169 for i in `ls -d ${libdir} 2>/dev/null` \
18170 `ls -d ${exec_prefix}/lib 2>/dev/null` \
18171 `ls -d ${prefix}/lib 2>/dev/null` \
18172 `ls -d /usr/local/lib 2>/dev/null` \
18173 `ls -d /usr/contrib/lib 2>/dev/null` \
18174 `ls -d /usr/lib 2>/dev/null` \
18175 ; do
18176 if test -f "$i/tkConfig.sh" ; then
18177 ac_cv_c_tkconfig=`(cd $i; pwd)`
18178 break
18180 done
18182 # check in a few other private locations
18183 if test x"${ac_cv_c_tkconfig}" = x ; then
18184 for i in \
18185 ${srcdir}/../tk \
18186 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
18187 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
18188 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
18189 if test -f "$i/$platDir/tkConfig.sh" ; then
18190 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
18191 break
18193 done
18199 if test x"${ac_cv_c_tkconfig}" = x ; then
18200 TK_BIN_DIR="# no Tk configs found"
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
18202 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
18203 else
18204 no_tk=
18205 TK_BIN_DIR=${ac_cv_c_tkconfig}
18206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
18207 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18212 if test -z "${no_tcl}" -a -z "${no_tk}"; then
18214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
18215 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
18217 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
18218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18219 $as_echo "loading" >&6; }
18220 . ${TCL_BIN_DIR}/tclConfig.sh
18221 else
18222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
18223 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
18226 # eval is required to do the TCL_DBGX substitution
18227 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
18228 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
18230 # If the TCL_BIN_DIR is the build directory (not the install directory),
18231 # then set the common variable name to the value of the build variables.
18232 # For example, the variable TCL_LIB_SPEC will be set to the value
18233 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
18234 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
18235 # installed and uninstalled version of Tcl.
18236 if test -f "${TCL_BIN_DIR}/Makefile" ; then
18237 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
18238 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
18239 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
18240 elif test "`uname -s`" = "Darwin"; then
18241 # If Tcl was built as a framework, attempt to use the libraries
18242 # from the framework at the given location so that linking works
18243 # against Tcl.framework installed in an arbitrary location.
18244 case ${TCL_DEFS} in
18245 *TCL_FRAMEWORK*)
18246 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
18247 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
18248 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
18249 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
18250 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
18251 break
18253 done
18255 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
18256 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
18257 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
18260 esac
18263 # eval is required to do the TCL_DBGX substitution
18264 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
18265 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
18266 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
18267 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
18283 # Check for in-tree tcl
18284 here=`pwd`
18285 cd ${srcdir}/..
18286 topdir=`pwd`
18287 cd ${here}
18289 intree="no"
18290 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
18291 intree="yes"
18294 # Find Tcl private headers
18295 if test x"${intree}" = xno; then
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
18298 $as_echo_n "checking for Tcl private headers... " >&6; }
18299 private_dir=""
18300 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
18301 if test -f ${dir}/tclInt.h ; then
18302 private_dir=${dir}
18305 if test x"${private_dir}" = x; then
18306 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
18307 else
18308 TCL_PRIVATE_INCLUDE="-I${private_dir}"
18309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18310 $as_echo "${private_dir}" >&6; }
18313 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
18314 TCL_LIBRARY="${TCL_LIB_SPEC}"
18315 TCL_DEPS=""
18316 else
18317 # If building tcl in the same src tree, private headers
18318 # are not needed, but we need to be sure to use the right
18319 # headers library
18320 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
18321 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
18322 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
18329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
18330 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
18332 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
18334 $as_echo "loading" >&6; }
18335 . ${TK_BIN_DIR}/tkConfig.sh
18336 else
18337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
18338 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
18341 # eval is required to do the TK_DBGX substitution
18342 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
18343 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
18345 # If the TK_BIN_DIR is the build directory (not the install directory),
18346 # then set the common variable name to the value of the build variables.
18347 # For example, the variable TK_LIB_SPEC will be set to the value
18348 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
18349 # instead of TK_BUILD_LIB_SPEC since it will work with both an
18350 # installed and uninstalled version of Tcl.
18351 if test -f "${TK_BIN_DIR}/Makefile" ; then
18352 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
18353 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
18354 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
18355 elif test "`uname -s`" = "Darwin"; then
18356 # If Tk was built as a framework, attempt to use the libraries
18357 # from the framework at the given location so that linking works
18358 # against Tk.framework installed in an arbitrary location.
18359 case ${TK_DEFS} in
18360 *TK_FRAMEWORK*)
18361 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
18362 for i in "`cd ${TK_BIN_DIR}; pwd`" \
18363 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
18364 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
18365 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
18366 break
18368 done
18370 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
18371 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
18372 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
18375 esac
18378 # eval is required to do the TK_DBGX substitution
18379 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
18380 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
18381 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
18382 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
18397 # Check for in-tree Tk
18398 intree="no"
18399 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
18400 intree="yes"
18403 # Find Tk private headers
18404 if test x"${intree}" = xno; then
18406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
18407 $as_echo_n "checking for Tk private headers... " >&6; }
18408 private_dir=""
18409 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
18410 if test -f ${dir}/tkInt.h; then
18411 private_dir=${dir}
18414 if test x"${private_dir}" = x; then
18415 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
18416 else
18417 TK_PRIVATE_INCLUDE="-I${private_dir}"
18418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
18419 $as_echo "${private_dir}" >&6; }
18422 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
18423 TK_LIBRARY=${TK_LIB_SPEC}
18424 TK_DEPS=""
18425 else
18426 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
18427 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
18428 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
18435 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
18437 # Include some libraries that Tcl and Tk want.
18438 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
18439 # Yes, the ordering seems wrong here. But it isn't.
18440 # TK_LIBS is the list of libraries that need to be linked
18441 # after Tcl/Tk. Note that this isn't put into LIBS. If it
18442 # were in LIBS then any link tests after this point would
18443 # try to include things like `$(LIBGUI)', which wouldn't work.
18444 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
18446 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
18447 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
18448 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
18449 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
18450 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
18451 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
18452 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
18454 if test x"$gdb_cv_os_cygwin" = xyes; then
18455 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
18456 WIN32LDAPP="-Wl,--subsystem,console"
18457 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
18460 subdirs="$subdirs gdbtk"
18472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
18473 $as_echo_n "checking for X... " >&6; }
18476 # Check whether --with-x was given.
18477 if test "${with_x+set}" = set; then :
18478 withval=$with_x;
18481 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
18482 if test "x$with_x" = xno; then
18483 # The user explicitly disabled X.
18484 have_x=disabled
18485 else
18486 case $x_includes,$x_libraries in #(
18487 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
18488 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
18489 $as_echo_n "(cached) " >&6
18490 else
18491 # One or both of the vars are not set, and there is no cached value.
18492 ac_x_includes=no ac_x_libraries=no
18493 rm -f -r conftest.dir
18494 if mkdir conftest.dir; then
18495 cd conftest.dir
18496 cat >Imakefile <<'_ACEOF'
18497 incroot:
18498 @echo incroot='${INCROOT}'
18499 usrlibdir:
18500 @echo usrlibdir='${USRLIBDIR}'
18501 libdir:
18502 @echo libdir='${LIBDIR}'
18503 _ACEOF
18504 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
18505 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
18506 for ac_var in incroot usrlibdir libdir; do
18507 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
18508 done
18509 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
18510 for ac_extension in a so sl dylib la dll; do
18511 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
18512 test -f "$ac_im_libdir/libX11.$ac_extension"; then
18513 ac_im_usrlibdir=$ac_im_libdir; break
18515 done
18516 # Screen out bogus values from the imake configuration. They are
18517 # bogus both because they are the default anyway, and because
18518 # using them would break gcc on systems where it needs fixed includes.
18519 case $ac_im_incroot in
18520 /usr/include) ac_x_includes= ;;
18521 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
18522 esac
18523 case $ac_im_usrlibdir in
18524 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
18525 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
18526 esac
18528 cd ..
18529 rm -f -r conftest.dir
18532 # Standard set of common directories for X headers.
18533 # Check X11 before X11Rn because it is often a symlink to the current release.
18534 ac_x_header_dirs='
18535 /usr/X11/include
18536 /usr/X11R7/include
18537 /usr/X11R6/include
18538 /usr/X11R5/include
18539 /usr/X11R4/include
18541 /usr/include/X11
18542 /usr/include/X11R7
18543 /usr/include/X11R6
18544 /usr/include/X11R5
18545 /usr/include/X11R4
18547 /usr/local/X11/include
18548 /usr/local/X11R7/include
18549 /usr/local/X11R6/include
18550 /usr/local/X11R5/include
18551 /usr/local/X11R4/include
18553 /usr/local/include/X11
18554 /usr/local/include/X11R7
18555 /usr/local/include/X11R6
18556 /usr/local/include/X11R5
18557 /usr/local/include/X11R4
18559 /usr/X386/include
18560 /usr/x386/include
18561 /usr/XFree86/include/X11
18563 /usr/include
18564 /usr/local/include
18565 /usr/unsupported/include
18566 /usr/athena/include
18567 /usr/local/x11r5/include
18568 /usr/lpp/Xamples/include
18570 /usr/openwin/include
18571 /usr/openwin/share/include'
18573 if test "$ac_x_includes" = no; then
18574 # Guess where to find include files, by looking for Xlib.h.
18575 # First, try using that file with no special directory specified.
18576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18577 /* end confdefs.h. */
18578 #include <X11/Xlib.h>
18579 _ACEOF
18580 if ac_fn_c_try_cpp "$LINENO"; then :
18581 # We can compile using X headers with no special include directory.
18582 ac_x_includes=
18583 else
18584 for ac_dir in $ac_x_header_dirs; do
18585 if test -r "$ac_dir/X11/Xlib.h"; then
18586 ac_x_includes=$ac_dir
18587 break
18589 done
18591 rm -f conftest.err conftest.i conftest.$ac_ext
18592 fi # $ac_x_includes = no
18594 if test "$ac_x_libraries" = no; then
18595 # Check for the libraries.
18596 # See if we find them without any special options.
18597 # Don't add to $LIBS permanently.
18598 ac_save_LIBS=$LIBS
18599 LIBS="-lX11 $LIBS"
18600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18601 /* end confdefs.h. */
18602 #include <X11/Xlib.h>
18604 main ()
18606 XrmInitialize ()
18608 return 0;
18610 _ACEOF
18611 if ac_fn_c_try_link "$LINENO"; then :
18612 LIBS=$ac_save_LIBS
18613 # We can link X programs with no special library path.
18614 ac_x_libraries=
18615 else
18616 LIBS=$ac_save_LIBS
18617 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
18619 # Don't even attempt the hair of trying to link an X program!
18620 for ac_extension in a so sl dylib la dll; do
18621 if test -r "$ac_dir/libX11.$ac_extension"; then
18622 ac_x_libraries=$ac_dir
18623 break 2
18625 done
18626 done
18628 rm -f core conftest.err conftest.$ac_objext \
18629 conftest$ac_exeext conftest.$ac_ext
18630 fi # $ac_x_libraries = no
18632 case $ac_x_includes,$ac_x_libraries in #(
18633 no,* | *,no | *\'*)
18634 # Didn't find X, or a directory has "'" in its name.
18635 ac_cv_have_x="have_x=no";; #(
18637 # Record where we found X for the cache.
18638 ac_cv_have_x="have_x=yes\
18639 ac_x_includes='$ac_x_includes'\
18640 ac_x_libraries='$ac_x_libraries'"
18641 esac
18643 ;; #(
18644 *) have_x=yes;;
18645 esac
18646 eval "$ac_cv_have_x"
18647 fi # $with_x != no
18649 if test "$have_x" != yes; then
18650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
18651 $as_echo "$have_x" >&6; }
18652 no_x=yes
18653 else
18654 # If each of the values was on the command line, it overrides each guess.
18655 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
18656 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
18657 # Update the cache value to reflect the command line values.
18658 ac_cv_have_x="have_x=yes\
18659 ac_x_includes='$x_includes'\
18660 ac_x_libraries='$x_libraries'"
18661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
18662 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
18666 # Unlike the sim directory, whether a simulator is linked is controlled by
18667 # presence of a gdb_sim definition in the target configure.tgt entry.
18668 # This code just checks for a few cases where we'd like to ignore those
18669 # definitions, even when they're present in the '.mt' file. These cases
18670 # are when --disable-sim is specified, or if the simulator directory is
18671 # not part of the source tree.
18673 # Check whether --enable-sim was given.
18674 if test "${enable_sim+set}" = set; then :
18675 enableval=$enable_sim; echo "enable_sim = $enable_sim";
18676 echo "enableval = ${enableval}";
18677 case "${enableval}" in
18678 yes) ignore_sim=false ;;
18679 no) ignore_sim=true ;;
18680 *) ignore_sim=false ;;
18681 esac
18682 else
18683 ignore_sim=false
18687 if test ! -d "${srcdir}/../sim"; then
18688 ignore_sim=true
18691 SIM=
18692 SIM_OBS=
18693 if test "${ignore_sim}" = "false"; then
18694 if test x"${gdb_sim}" != x ; then
18695 SIM="${gdb_sim}"
18696 SIM_OBS="remote-sim.o"
18698 # Some tdep code should only be compiled in when the ppc sim is
18699 # built. PR sim/13418.
18700 case $target in
18701 powerpc*-*-*)
18703 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
18706 esac
18723 # List of host floatformats.
18725 cat >>confdefs.h <<_ACEOF
18726 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
18727 _ACEOF
18730 cat >>confdefs.h <<_ACEOF
18731 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
18732 _ACEOF
18735 cat >>confdefs.h <<_ACEOF
18736 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
18737 _ACEOF
18740 # target_subdir is used by the testsuite to find the target libraries.
18741 target_subdir=
18742 if test "${host}" != "${target}"; then
18743 target_subdir="${target_alias}/"
18747 # Import nat definitions.
18748 nat_makefile_frag=/dev/null
18749 if test "${gdb_native}" = "yes"; then
18750 . ${srcdir}/configure.nat
18751 nativefile=$NAT_FILE
18764 if test x"${gdb_osabi}" != x ; then
18766 cat >>confdefs.h <<_ACEOF
18767 #define GDB_OSABI_DEFAULT $gdb_osabi
18768 _ACEOF
18772 # Setup possible use of libbacktrace.
18773 # Check whether --enable-libbacktrace was given.
18774 if test "${enable_libbacktrace+set}" = set; then :
18775 enableval=$enable_libbacktrace;
18776 case $enableval in
18777 yes | no)
18780 as_fn_error $? "bad value $enableval for --enable-libbacktrace" "$LINENO" 5
18782 esac
18784 else
18785 enable_libbacktrace=yes
18789 if test "${enable_libbacktrace}" = "yes"; then
18790 LIBBACKTRACE_INC="-I$srcdir/../libbacktrace/ -I../libbacktrace/"
18791 LIBBACKTRACE_LIB=../libbacktrace/.libs/libbacktrace.a
18793 $as_echo "#define HAVE_LIBBACKTRACE 1" >>confdefs.h
18795 else
18796 LIBBACKTRACE_INC=
18797 LIBBACKTRACE_LIB=
18803 # Check for babeltrace and babeltrace-ctf
18805 # Check whether --with-babeltrace was given.
18806 if test "${with_babeltrace+set}" = set; then :
18807 withval=$with_babeltrace;
18808 else
18809 with_babeltrace=auto
18812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
18813 $as_echo_n "checking whether to use babeltrace... " >&6; }
18814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
18815 $as_echo "$with_babeltrace" >&6; }
18817 if test "x$with_babeltrace" = "xno"; then
18818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
18819 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
18820 else
18821 # Append -Werror to CFLAGS so that configure can catch the warning
18822 # "assignment from incompatible pointer type", which is related to
18823 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
18824 # in GDB, while babeltrace 1.0.3 is broken.
18825 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
18826 # safe to save and restore CFLAGS here.
18827 saved_CFLAGS=$CFLAGS
18828 CFLAGS="$CFLAGS -Werror"
18837 use_additional=yes
18839 acl_save_prefix="$prefix"
18840 prefix="$acl_final_prefix"
18841 acl_save_exec_prefix="$exec_prefix"
18842 exec_prefix="$acl_final_exec_prefix"
18844 eval additional_includedir=\"$includedir\"
18845 eval additional_libdir=\"$libdir\"
18847 exec_prefix="$acl_save_exec_prefix"
18848 prefix="$acl_save_prefix"
18851 # Check whether --with-libbabeltrace-prefix was given.
18852 if test "${with_libbabeltrace_prefix+set}" = set; then :
18853 withval=$with_libbabeltrace_prefix;
18854 if test "X$withval" = "Xno"; then
18855 use_additional=no
18856 else
18857 if test "X$withval" = "X"; then
18859 acl_save_prefix="$prefix"
18860 prefix="$acl_final_prefix"
18861 acl_save_exec_prefix="$exec_prefix"
18862 exec_prefix="$acl_final_exec_prefix"
18864 eval additional_includedir=\"$includedir\"
18865 eval additional_libdir=\"$libdir\"
18867 exec_prefix="$acl_save_exec_prefix"
18868 prefix="$acl_save_prefix"
18870 else
18871 additional_includedir="$withval/include"
18872 additional_libdir="$withval/lib"
18879 # Check whether --with-libbabeltrace-type was given.
18880 if test "${with_libbabeltrace_type+set}" = set; then :
18881 withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval
18882 else
18883 with_libbabeltrace_type=auto
18886 lib_type=`eval echo \$with_libbabeltrace_type`
18888 LIBBABELTRACE=
18889 LTLIBBABELTRACE=
18890 INCBABELTRACE=
18891 rpathdirs=
18892 ltrpathdirs=
18893 names_already_handled=
18894 names_next_round='babeltrace babeltrace-ctf'
18895 while test -n "$names_next_round"; do
18896 names_this_round="$names_next_round"
18897 names_next_round=
18898 for name in $names_this_round; do
18899 already_handled=
18900 for n in $names_already_handled; do
18901 if test "$n" = "$name"; then
18902 already_handled=yes
18903 break
18905 done
18906 if test -z "$already_handled"; then
18907 names_already_handled="$names_already_handled $name"
18908 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18909 eval value=\"\$HAVE_LIB$uppername\"
18910 if test -n "$value"; then
18911 if test "$value" = yes; then
18912 eval value=\"\$LIB$uppername\"
18913 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
18914 eval value=\"\$LTLIB$uppername\"
18915 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
18916 else
18919 else
18920 found_dir=
18921 found_la=
18922 found_so=
18923 found_a=
18924 if test $use_additional = yes; then
18925 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18926 found_dir="$additional_libdir"
18927 found_so="$additional_libdir/lib$name.$shlibext"
18928 if test -f "$additional_libdir/lib$name.la"; then
18929 found_la="$additional_libdir/lib$name.la"
18931 elif test x$lib_type != xshared; then
18932 if test -f "$additional_libdir/lib$name.$libext"; then
18933 found_dir="$additional_libdir"
18934 found_a="$additional_libdir/lib$name.$libext"
18935 if test -f "$additional_libdir/lib$name.la"; then
18936 found_la="$additional_libdir/lib$name.la"
18941 if test "X$found_dir" = "X"; then
18942 for x in $LDFLAGS $LTLIBBABELTRACE; do
18944 acl_save_prefix="$prefix"
18945 prefix="$acl_final_prefix"
18946 acl_save_exec_prefix="$exec_prefix"
18947 exec_prefix="$acl_final_exec_prefix"
18948 eval x=\"$x\"
18949 exec_prefix="$acl_save_exec_prefix"
18950 prefix="$acl_save_prefix"
18952 case "$x" in
18953 -L*)
18954 dir=`echo "X$x" | sed -e 's/^X-L//'`
18955 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
18956 found_dir="$dir"
18957 found_so="$dir/lib$name.$shlibext"
18958 if test -f "$dir/lib$name.la"; then
18959 found_la="$dir/lib$name.la"
18961 elif test x$lib_type != xshared; then
18962 if test -f "$dir/lib$name.$libext"; then
18963 found_dir="$dir"
18964 found_a="$dir/lib$name.$libext"
18965 if test -f "$dir/lib$name.la"; then
18966 found_la="$dir/lib$name.la"
18971 esac
18972 if test "X$found_dir" != "X"; then
18973 break
18975 done
18977 if test "X$found_dir" != "X"; then
18978 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18979 if test "X$found_so" != "X"; then
18980 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18981 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18982 else
18983 haveit=
18984 for x in $ltrpathdirs; do
18985 if test "X$x" = "X$found_dir"; then
18986 haveit=yes
18987 break
18989 done
18990 if test -z "$haveit"; then
18991 ltrpathdirs="$ltrpathdirs $found_dir"
18993 if test "$hardcode_direct" = yes; then
18994 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18995 else
18996 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18997 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18998 haveit=
18999 for x in $rpathdirs; do
19000 if test "X$x" = "X$found_dir"; then
19001 haveit=yes
19002 break
19004 done
19005 if test -z "$haveit"; then
19006 rpathdirs="$rpathdirs $found_dir"
19008 else
19009 haveit=
19010 for x in $LDFLAGS $LIBBABELTRACE; do
19012 acl_save_prefix="$prefix"
19013 prefix="$acl_final_prefix"
19014 acl_save_exec_prefix="$exec_prefix"
19015 exec_prefix="$acl_final_exec_prefix"
19016 eval x=\"$x\"
19017 exec_prefix="$acl_save_exec_prefix"
19018 prefix="$acl_save_prefix"
19020 if test "X$x" = "X-L$found_dir"; then
19021 haveit=yes
19022 break
19024 done
19025 if test -z "$haveit"; then
19026 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
19028 if test "$hardcode_minus_L" != no; then
19029 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
19030 else
19031 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19036 else
19037 if test "X$found_a" != "X"; then
19038 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
19039 else
19040 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
19043 additional_includedir=
19044 case "$found_dir" in
19045 */lib | */lib/)
19046 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19047 additional_includedir="$basedir/include"
19049 esac
19050 if test "X$additional_includedir" != "X"; then
19051 if test "X$additional_includedir" != "X/usr/include"; then
19052 haveit=
19053 if test "X$additional_includedir" = "X/usr/local/include"; then
19054 if test -n "$GCC"; then
19055 case $host_os in
19056 linux*) haveit=yes;;
19057 esac
19060 if test -z "$haveit"; then
19061 for x in $CPPFLAGS $INCBABELTRACE; do
19063 acl_save_prefix="$prefix"
19064 prefix="$acl_final_prefix"
19065 acl_save_exec_prefix="$exec_prefix"
19066 exec_prefix="$acl_final_exec_prefix"
19067 eval x=\"$x\"
19068 exec_prefix="$acl_save_exec_prefix"
19069 prefix="$acl_save_prefix"
19071 if test "X$x" = "X-I$additional_includedir"; then
19072 haveit=yes
19073 break
19075 done
19076 if test -z "$haveit"; then
19077 if test -d "$additional_includedir"; then
19078 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
19084 if test -n "$found_la"; then
19085 save_libdir="$libdir"
19086 case "$found_la" in
19087 */* | *\\*) . "$found_la" ;;
19088 *) . "./$found_la" ;;
19089 esac
19090 libdir="$save_libdir"
19091 for dep in $dependency_libs; do
19092 case "$dep" in
19093 -L*)
19094 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19095 if test "X$additional_libdir" != "X/usr/lib"; then
19096 haveit=
19097 if test "X$additional_libdir" = "X/usr/local/lib"; then
19098 if test -n "$GCC"; then
19099 case $host_os in
19100 linux*) haveit=yes;;
19101 esac
19104 if test -z "$haveit"; then
19105 haveit=
19106 for x in $LDFLAGS $LIBBABELTRACE; do
19108 acl_save_prefix="$prefix"
19109 prefix="$acl_final_prefix"
19110 acl_save_exec_prefix="$exec_prefix"
19111 exec_prefix="$acl_final_exec_prefix"
19112 eval x=\"$x\"
19113 exec_prefix="$acl_save_exec_prefix"
19114 prefix="$acl_save_prefix"
19116 if test "X$x" = "X-L$additional_libdir"; then
19117 haveit=yes
19118 break
19120 done
19121 if test -z "$haveit"; then
19122 if test -d "$additional_libdir"; then
19123 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
19126 haveit=
19127 for x in $LDFLAGS $LTLIBBABELTRACE; do
19129 acl_save_prefix="$prefix"
19130 prefix="$acl_final_prefix"
19131 acl_save_exec_prefix="$exec_prefix"
19132 exec_prefix="$acl_final_exec_prefix"
19133 eval x=\"$x\"
19134 exec_prefix="$acl_save_exec_prefix"
19135 prefix="$acl_save_prefix"
19137 if test "X$x" = "X-L$additional_libdir"; then
19138 haveit=yes
19139 break
19141 done
19142 if test -z "$haveit"; then
19143 if test -d "$additional_libdir"; then
19144 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
19150 -R*)
19151 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19152 if test "$enable_rpath" != no; then
19153 haveit=
19154 for x in $rpathdirs; do
19155 if test "X$x" = "X$dir"; then
19156 haveit=yes
19157 break
19159 done
19160 if test -z "$haveit"; then
19161 rpathdirs="$rpathdirs $dir"
19163 haveit=
19164 for x in $ltrpathdirs; do
19165 if test "X$x" = "X$dir"; then
19166 haveit=yes
19167 break
19169 done
19170 if test -z "$haveit"; then
19171 ltrpathdirs="$ltrpathdirs $dir"
19175 -l*)
19176 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19178 *.la)
19179 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19182 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
19183 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
19185 esac
19186 done
19188 else
19189 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19190 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
19191 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
19192 else
19193 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext"
19194 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext"
19199 done
19200 done
19201 if test "X$rpathdirs" != "X"; then
19202 if test -n "$hardcode_libdir_separator"; then
19203 alldirs=
19204 for found_dir in $rpathdirs; do
19205 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19206 done
19207 acl_save_libdir="$libdir"
19208 libdir="$alldirs"
19209 eval flag=\"$hardcode_libdir_flag_spec\"
19210 libdir="$acl_save_libdir"
19211 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19212 else
19213 for found_dir in $rpathdirs; do
19214 acl_save_libdir="$libdir"
19215 libdir="$found_dir"
19216 eval flag=\"$hardcode_libdir_flag_spec\"
19217 libdir="$acl_save_libdir"
19218 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
19219 done
19222 if test "X$ltrpathdirs" != "X"; then
19223 for found_dir in $ltrpathdirs; do
19224 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
19225 done
19229 ac_save_CPPFLAGS="$CPPFLAGS"
19231 for element in $INCBABELTRACE; do
19232 haveit=
19233 for x in $CPPFLAGS; do
19235 acl_save_prefix="$prefix"
19236 prefix="$acl_final_prefix"
19237 acl_save_exec_prefix="$exec_prefix"
19238 exec_prefix="$acl_final_exec_prefix"
19239 eval x=\"$x\"
19240 exec_prefix="$acl_save_exec_prefix"
19241 prefix="$acl_save_prefix"
19243 if test "X$x" = "X$element"; then
19244 haveit=yes
19245 break
19247 done
19248 if test -z "$haveit"; then
19249 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19251 done
19254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
19255 $as_echo_n "checking for libbabeltrace... " >&6; }
19256 if ${ac_cv_libbabeltrace+:} false; then :
19257 $as_echo_n "(cached) " >&6
19258 else
19260 ac_save_LIBS="$LIBS"
19261 LIBS="$LIBS $LIBBABELTRACE"
19262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19263 /* end confdefs.h. */
19264 #include <babeltrace/babeltrace.h>
19265 #include <babeltrace/ctf/events.h>
19266 #include <babeltrace/ctf/iterator.h>
19268 main ()
19270 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
19271 struct bt_ctf_event *event = NULL;
19272 const struct bt_definition *scope;
19274 pos->type = BT_SEEK_BEGIN;
19275 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
19276 scope = bt_ctf_get_top_level_scope (event,
19277 BT_STREAM_EVENT_HEADER);
19278 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
19281 return 0;
19283 _ACEOF
19284 if ac_fn_c_try_link "$LINENO"; then :
19285 ac_cv_libbabeltrace=yes
19286 else
19287 ac_cv_libbabeltrace=no
19289 rm -f core conftest.err conftest.$ac_objext \
19290 conftest$ac_exeext conftest.$ac_ext
19291 LIBS="$ac_save_LIBS"
19294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
19295 $as_echo "$ac_cv_libbabeltrace" >&6; }
19296 if test "$ac_cv_libbabeltrace" = yes; then
19297 HAVE_LIBBABELTRACE=yes
19299 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
19301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
19302 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
19303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
19304 $as_echo "$LIBBABELTRACE" >&6; }
19305 else
19306 HAVE_LIBBABELTRACE=no
19307 CPPFLAGS="$ac_save_CPPFLAGS"
19308 LIBBABELTRACE=
19309 LTLIBBABELTRACE=
19317 CFLAGS=$saved_CFLAGS
19319 if test "$HAVE_LIBBABELTRACE" != yes; then
19320 if test "$with_babeltrace" = yes; then
19321 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
19322 else
19323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
19324 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
19329 # Check for xxhash
19331 # Check whether --with-xxhash was given.
19332 if test "${with_xxhash+set}" = set; then :
19333 withval=$with_xxhash;
19334 else
19335 with_xxhash=auto
19339 # Check whether --enable-libctf was given.
19340 if test "${enable_libctf+set}" = set; then :
19341 enableval=$enable_libctf;
19342 case "$enableval" in
19343 yes|no) ;;
19344 *) as_fn_error $? "Argument to enable/disable libctf must be yes or no" "$LINENO" 5 ;;
19345 esac
19347 else
19348 enable_libctf=yes
19352 if test x${enable_static} = xno; then
19353 LIBCTF="-Wl,--rpath,../libctf/.libs ../libctf/.libs/libctf.so"
19354 CTF_DEPS="../libctf/.libs/libctf.so"
19355 else
19356 LIBCTF="../libctf/.libs/libctf.a"
19357 CTF_DEPS="$LIBCTF"
19359 if test "${enable_libctf}" = yes; then
19361 $as_echo "#define ENABLE_LIBCTF 1" >>confdefs.h
19363 else
19364 LIBCTF=
19365 CTF_DEPS=
19370 # If nativefile (NAT_FILE) is not set in configure.nat, we link to an
19371 # empty version.
19373 if test "x$with_xxhash" != "xno"; then
19382 use_additional=yes
19384 acl_save_prefix="$prefix"
19385 prefix="$acl_final_prefix"
19386 acl_save_exec_prefix="$exec_prefix"
19387 exec_prefix="$acl_final_exec_prefix"
19389 eval additional_includedir=\"$includedir\"
19390 eval additional_libdir=\"$libdir\"
19392 exec_prefix="$acl_save_exec_prefix"
19393 prefix="$acl_save_prefix"
19396 # Check whether --with-libxxhash-prefix was given.
19397 if test "${with_libxxhash_prefix+set}" = set; then :
19398 withval=$with_libxxhash_prefix;
19399 if test "X$withval" = "Xno"; then
19400 use_additional=no
19401 else
19402 if test "X$withval" = "X"; then
19404 acl_save_prefix="$prefix"
19405 prefix="$acl_final_prefix"
19406 acl_save_exec_prefix="$exec_prefix"
19407 exec_prefix="$acl_final_exec_prefix"
19409 eval additional_includedir=\"$includedir\"
19410 eval additional_libdir=\"$libdir\"
19412 exec_prefix="$acl_save_exec_prefix"
19413 prefix="$acl_save_prefix"
19415 else
19416 additional_includedir="$withval/include"
19417 additional_libdir="$withval/lib"
19424 # Check whether --with-libxxhash-type was given.
19425 if test "${with_libxxhash_type+set}" = set; then :
19426 withval=$with_libxxhash_type; with_libxxhash_type=$withval
19427 else
19428 with_libxxhash_type=auto
19431 lib_type=`eval echo \$with_libxxhash_type`
19433 LIBXXHASH=
19434 LTLIBXXHASH=
19435 INCXXHASH=
19436 rpathdirs=
19437 ltrpathdirs=
19438 names_already_handled=
19439 names_next_round='xxhash '
19440 while test -n "$names_next_round"; do
19441 names_this_round="$names_next_round"
19442 names_next_round=
19443 for name in $names_this_round; do
19444 already_handled=
19445 for n in $names_already_handled; do
19446 if test "$n" = "$name"; then
19447 already_handled=yes
19448 break
19450 done
19451 if test -z "$already_handled"; then
19452 names_already_handled="$names_already_handled $name"
19453 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19454 eval value=\"\$HAVE_LIB$uppername\"
19455 if test -n "$value"; then
19456 if test "$value" = yes; then
19457 eval value=\"\$LIB$uppername\"
19458 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
19459 eval value=\"\$LTLIB$uppername\"
19460 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
19461 else
19464 else
19465 found_dir=
19466 found_la=
19467 found_so=
19468 found_a=
19469 if test $use_additional = yes; then
19470 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19471 found_dir="$additional_libdir"
19472 found_so="$additional_libdir/lib$name.$shlibext"
19473 if test -f "$additional_libdir/lib$name.la"; then
19474 found_la="$additional_libdir/lib$name.la"
19476 elif test x$lib_type != xshared; then
19477 if test -f "$additional_libdir/lib$name.$libext"; then
19478 found_dir="$additional_libdir"
19479 found_a="$additional_libdir/lib$name.$libext"
19480 if test -f "$additional_libdir/lib$name.la"; then
19481 found_la="$additional_libdir/lib$name.la"
19486 if test "X$found_dir" = "X"; then
19487 for x in $LDFLAGS $LTLIBXXHASH; do
19489 acl_save_prefix="$prefix"
19490 prefix="$acl_final_prefix"
19491 acl_save_exec_prefix="$exec_prefix"
19492 exec_prefix="$acl_final_exec_prefix"
19493 eval x=\"$x\"
19494 exec_prefix="$acl_save_exec_prefix"
19495 prefix="$acl_save_prefix"
19497 case "$x" in
19498 -L*)
19499 dir=`echo "X$x" | sed -e 's/^X-L//'`
19500 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then
19501 found_dir="$dir"
19502 found_so="$dir/lib$name.$shlibext"
19503 if test -f "$dir/lib$name.la"; then
19504 found_la="$dir/lib$name.la"
19506 elif test x$lib_type != xshared; then
19507 if test -f "$dir/lib$name.$libext"; then
19508 found_dir="$dir"
19509 found_a="$dir/lib$name.$libext"
19510 if test -f "$dir/lib$name.la"; then
19511 found_la="$dir/lib$name.la"
19516 esac
19517 if test "X$found_dir" != "X"; then
19518 break
19520 done
19522 if test "X$found_dir" != "X"; then
19523 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
19524 if test "X$found_so" != "X"; then
19525 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19526 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19527 else
19528 haveit=
19529 for x in $ltrpathdirs; do
19530 if test "X$x" = "X$found_dir"; then
19531 haveit=yes
19532 break
19534 done
19535 if test -z "$haveit"; then
19536 ltrpathdirs="$ltrpathdirs $found_dir"
19538 if test "$hardcode_direct" = yes; then
19539 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19540 else
19541 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19542 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19543 haveit=
19544 for x in $rpathdirs; do
19545 if test "X$x" = "X$found_dir"; then
19546 haveit=yes
19547 break
19549 done
19550 if test -z "$haveit"; then
19551 rpathdirs="$rpathdirs $found_dir"
19553 else
19554 haveit=
19555 for x in $LDFLAGS $LIBXXHASH; do
19557 acl_save_prefix="$prefix"
19558 prefix="$acl_final_prefix"
19559 acl_save_exec_prefix="$exec_prefix"
19560 exec_prefix="$acl_final_exec_prefix"
19561 eval x=\"$x\"
19562 exec_prefix="$acl_save_exec_prefix"
19563 prefix="$acl_save_prefix"
19565 if test "X$x" = "X-L$found_dir"; then
19566 haveit=yes
19567 break
19569 done
19570 if test -z "$haveit"; then
19571 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
19573 if test "$hardcode_minus_L" != no; then
19574 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
19575 else
19576 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19581 else
19582 if test "X$found_a" != "X"; then
19583 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
19584 else
19585 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
19588 additional_includedir=
19589 case "$found_dir" in
19590 */lib | */lib/)
19591 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19592 additional_includedir="$basedir/include"
19594 esac
19595 if test "X$additional_includedir" != "X"; then
19596 if test "X$additional_includedir" != "X/usr/include"; then
19597 haveit=
19598 if test "X$additional_includedir" = "X/usr/local/include"; then
19599 if test -n "$GCC"; then
19600 case $host_os in
19601 linux*) haveit=yes;;
19602 esac
19605 if test -z "$haveit"; then
19606 for x in $CPPFLAGS $INCXXHASH; do
19608 acl_save_prefix="$prefix"
19609 prefix="$acl_final_prefix"
19610 acl_save_exec_prefix="$exec_prefix"
19611 exec_prefix="$acl_final_exec_prefix"
19612 eval x=\"$x\"
19613 exec_prefix="$acl_save_exec_prefix"
19614 prefix="$acl_save_prefix"
19616 if test "X$x" = "X-I$additional_includedir"; then
19617 haveit=yes
19618 break
19620 done
19621 if test -z "$haveit"; then
19622 if test -d "$additional_includedir"; then
19623 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
19629 if test -n "$found_la"; then
19630 save_libdir="$libdir"
19631 case "$found_la" in
19632 */* | *\\*) . "$found_la" ;;
19633 *) . "./$found_la" ;;
19634 esac
19635 libdir="$save_libdir"
19636 for dep in $dependency_libs; do
19637 case "$dep" in
19638 -L*)
19639 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19640 if test "X$additional_libdir" != "X/usr/lib"; then
19641 haveit=
19642 if test "X$additional_libdir" = "X/usr/local/lib"; then
19643 if test -n "$GCC"; then
19644 case $host_os in
19645 linux*) haveit=yes;;
19646 esac
19649 if test -z "$haveit"; then
19650 haveit=
19651 for x in $LDFLAGS $LIBXXHASH; do
19653 acl_save_prefix="$prefix"
19654 prefix="$acl_final_prefix"
19655 acl_save_exec_prefix="$exec_prefix"
19656 exec_prefix="$acl_final_exec_prefix"
19657 eval x=\"$x\"
19658 exec_prefix="$acl_save_exec_prefix"
19659 prefix="$acl_save_prefix"
19661 if test "X$x" = "X-L$additional_libdir"; then
19662 haveit=yes
19663 break
19665 done
19666 if test -z "$haveit"; then
19667 if test -d "$additional_libdir"; then
19668 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
19671 haveit=
19672 for x in $LDFLAGS $LTLIBXXHASH; do
19674 acl_save_prefix="$prefix"
19675 prefix="$acl_final_prefix"
19676 acl_save_exec_prefix="$exec_prefix"
19677 exec_prefix="$acl_final_exec_prefix"
19678 eval x=\"$x\"
19679 exec_prefix="$acl_save_exec_prefix"
19680 prefix="$acl_save_prefix"
19682 if test "X$x" = "X-L$additional_libdir"; then
19683 haveit=yes
19684 break
19686 done
19687 if test -z "$haveit"; then
19688 if test -d "$additional_libdir"; then
19689 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
19695 -R*)
19696 dir=`echo "X$dep" | sed -e 's/^X-R//'`
19697 if test "$enable_rpath" != no; then
19698 haveit=
19699 for x in $rpathdirs; do
19700 if test "X$x" = "X$dir"; then
19701 haveit=yes
19702 break
19704 done
19705 if test -z "$haveit"; then
19706 rpathdirs="$rpathdirs $dir"
19708 haveit=
19709 for x in $ltrpathdirs; do
19710 if test "X$x" = "X$dir"; then
19711 haveit=yes
19712 break
19714 done
19715 if test -z "$haveit"; then
19716 ltrpathdirs="$ltrpathdirs $dir"
19720 -l*)
19721 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
19723 *.la)
19724 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
19727 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
19728 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
19730 esac
19731 done
19733 else
19734 if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then
19735 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
19736 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
19737 else
19738 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext"
19739 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext"
19744 done
19745 done
19746 if test "X$rpathdirs" != "X"; then
19747 if test -n "$hardcode_libdir_separator"; then
19748 alldirs=
19749 for found_dir in $rpathdirs; do
19750 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
19751 done
19752 acl_save_libdir="$libdir"
19753 libdir="$alldirs"
19754 eval flag=\"$hardcode_libdir_flag_spec\"
19755 libdir="$acl_save_libdir"
19756 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19757 else
19758 for found_dir in $rpathdirs; do
19759 acl_save_libdir="$libdir"
19760 libdir="$found_dir"
19761 eval flag=\"$hardcode_libdir_flag_spec\"
19762 libdir="$acl_save_libdir"
19763 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
19764 done
19767 if test "X$ltrpathdirs" != "X"; then
19768 for found_dir in $ltrpathdirs; do
19769 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
19770 done
19774 ac_save_CPPFLAGS="$CPPFLAGS"
19776 for element in $INCXXHASH; do
19777 haveit=
19778 for x in $CPPFLAGS; do
19780 acl_save_prefix="$prefix"
19781 prefix="$acl_final_prefix"
19782 acl_save_exec_prefix="$exec_prefix"
19783 exec_prefix="$acl_final_exec_prefix"
19784 eval x=\"$x\"
19785 exec_prefix="$acl_save_exec_prefix"
19786 prefix="$acl_save_prefix"
19788 if test "X$x" = "X$element"; then
19789 haveit=yes
19790 break
19792 done
19793 if test -z "$haveit"; then
19794 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
19796 done
19799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
19800 $as_echo_n "checking for libxxhash... " >&6; }
19801 if ${ac_cv_libxxhash+:} false; then :
19802 $as_echo_n "(cached) " >&6
19803 else
19805 ac_save_LIBS="$LIBS"
19806 LIBS="$LIBS $LIBXXHASH"
19807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19808 /* end confdefs.h. */
19809 #include <xxhash.h>
19811 main ()
19813 XXH32("foo", 3, 0);
19816 return 0;
19818 _ACEOF
19819 if ac_fn_c_try_link "$LINENO"; then :
19820 ac_cv_libxxhash=yes
19821 else
19822 ac_cv_libxxhash=no
19824 rm -f core conftest.err conftest.$ac_objext \
19825 conftest$ac_exeext conftest.$ac_ext
19826 LIBS="$ac_save_LIBS"
19829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
19830 $as_echo "$ac_cv_libxxhash" >&6; }
19831 if test "$ac_cv_libxxhash" = yes; then
19832 HAVE_LIBXXHASH=yes
19834 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
19836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
19837 $as_echo_n "checking how to link with libxxhash... " >&6; }
19838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
19839 $as_echo "$LIBXXHASH" >&6; }
19840 else
19841 HAVE_LIBXXHASH=no
19842 CPPFLAGS="$ac_save_CPPFLAGS"
19843 LIBXXHASH=
19844 LTLIBXXHASH=
19852 if test "$HAVE_LIBXXHASH" != yes; then
19853 if test "$with_xxhash" = yes; then
19854 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
19857 if test "x$with_xxhash" = "xauto"; then
19858 with_xxhash="$HAVE_LIBXXHASH"
19862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
19863 $as_echo_n "checking whether to use xxhash... " >&6; }
19864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
19865 $as_echo "$with_xxhash" >&6; }
19867 NM_H=
19868 rm -f nm.h
19869 if test "${nativefile}" != ""; then
19870 case "${nativefile}" in
19871 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
19872 * ) GDB_NM_FILE="${nativefile}"
19873 esac
19874 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
19877 cat >>confdefs.h <<_ACEOF
19878 #define GDB_NM_FILE "${GDB_NM_FILE}"
19879 _ACEOF
19881 NM_H=nm.h
19886 for ac_prog in xsltproc
19888 # Extract the first word of "$ac_prog", so it can be a program name with args.
19889 set dummy $ac_prog; ac_word=$2
19890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19891 $as_echo_n "checking for $ac_word... " >&6; }
19892 if ${ac_cv_path_XSLTPROC+:} false; then :
19893 $as_echo_n "(cached) " >&6
19894 else
19895 case $XSLTPROC in
19896 [\\/]* | ?:[\\/]*)
19897 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
19900 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19901 for as_dir in $PATH
19903 IFS=$as_save_IFS
19904 test -z "$as_dir" && as_dir=.
19905 for ac_exec_ext in '' $ac_executable_extensions; do
19906 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19907 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
19908 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19909 break 2
19911 done
19912 done
19913 IFS=$as_save_IFS
19916 esac
19918 XSLTPROC=$ac_cv_path_XSLTPROC
19919 if test -n "$XSLTPROC"; then
19920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
19921 $as_echo "$XSLTPROC" >&6; }
19922 else
19923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19924 $as_echo "no" >&6; }
19928 test -n "$XSLTPROC" && break
19929 done
19930 test -n "$XSLTPROC" || XSLTPROC="missing"
19932 if test "x$USE_MAINTAINER_MODE" = xyes; then
19933 if test "${XSLTPROC}" = missing; then
19934 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
19942 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
19946 # Check whether we will enable the inclusion of unit tests when
19947 # compiling GDB.
19949 # The default value of this option changes depending whether we're on
19950 # development mode (in which case it's "true") or not (in which case
19951 # it's "false"). The $development variable is set by the GDB_AC_COMMON
19952 # macro, which must therefore be used before GDB_AC_SELFTEST.
19954 if test "x$development" != xtrue && test "x$development" != xfalse; then :
19955 as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
19958 # Check whether --enable-unit-tests was given.
19959 if test "${enable_unit_tests+set}" = set; then :
19960 enableval=$enable_unit_tests; case "${enableval}" in
19961 yes) enable_unittests=true ;;
19962 no) enable_unittests=false ;;
19963 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
19964 esac
19965 else
19966 enable_unittests=$development
19970 if $enable_unittests; then
19972 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
19975 CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)"
19976 CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)"
19982 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19983 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
19984 if test "x$GDB_TRANSFORM_NAME" = x; then
19985 GDB_TRANSFORM_NAME=gdb
19990 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
19991 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
19992 if test "x$GCORE_TRANSFORM_NAME" = x; then
19993 GCORE_TRANSFORM_NAME=gcore
19997 ac_config_files="$ac_config_files gcore"
19999 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
20002 cat >confcache <<\_ACEOF
20003 # This file is a shell script that caches the results of configure
20004 # tests run on this system so they can be shared between configure
20005 # scripts and configure runs, see configure's option --config-cache.
20006 # It is not useful on other systems. If it contains results you don't
20007 # want to keep, you may remove or edit it.
20009 # config.status only pays attention to the cache file if you give it
20010 # the --recheck option to rerun configure.
20012 # `ac_cv_env_foo' variables (set or unset) will be overridden when
20013 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20014 # following values.
20016 _ACEOF
20018 # The following way of writing the cache mishandles newlines in values,
20019 # but we know of no workaround that is simple, portable, and efficient.
20020 # So, we kill variables containing newlines.
20021 # Ultrix sh set writes to stderr and can't be redirected directly,
20022 # and sets the high bit in the cache file unless we assign to the vars.
20024 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20025 eval ac_val=\$$ac_var
20026 case $ac_val in #(
20027 *${as_nl}*)
20028 case $ac_var in #(
20029 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20030 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20031 esac
20032 case $ac_var in #(
20033 _ | IFS | as_nl) ;; #(
20034 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20035 *) { eval $ac_var=; unset $ac_var;} ;;
20036 esac ;;
20037 esac
20038 done
20040 (set) 2>&1 |
20041 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20042 *${as_nl}ac_space=\ *)
20043 # `set' does not quote correctly, so add quotes: double-quote
20044 # substitution turns \\\\ into \\, and sed turns \\ into \.
20045 sed -n \
20046 "s/'/'\\\\''/g;
20047 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20048 ;; #(
20050 # `set' quotes correctly as required by POSIX, so do not add quotes.
20051 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20053 esac |
20054 sort
20056 sed '
20057 /^ac_cv_env_/b end
20058 t clear
20059 :clear
20060 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20061 t end
20062 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20063 :end' >>confcache
20064 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20065 if test -w "$cache_file"; then
20066 if test "x$cache_file" != "x/dev/null"; then
20067 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20068 $as_echo "$as_me: updating cache $cache_file" >&6;}
20069 if test ! -f "$cache_file" || test -h "$cache_file"; then
20070 cat confcache >"$cache_file"
20071 else
20072 case $cache_file in #(
20073 */* | ?:*)
20074 mv -f confcache "$cache_file"$$ &&
20075 mv -f "$cache_file"$$ "$cache_file" ;; #(
20077 mv -f confcache "$cache_file" ;;
20078 esac
20081 else
20082 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20083 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20086 rm -f confcache
20088 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20089 # Let make expand exec_prefix.
20090 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20092 DEFS=-DHAVE_CONFIG_H
20094 ac_libobjs=
20095 ac_ltlibobjs=
20097 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20098 # 1. Remove the extension, and $U if already installed.
20099 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20100 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20101 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20102 # will be set to the directory where LIBOBJS objects are built.
20103 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20104 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20105 done
20106 LIBOBJS=$ac_libobjs
20108 LTLIBOBJS=$ac_ltlibobjs
20111 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
20112 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
20113 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20115 if test -z "${ENABLE_BFD_64_BIT_TRUE}" && test -z "${ENABLE_BFD_64_BIT_FALSE}"; then
20116 as_fn_error $? "conditional \"ENABLE_BFD_64_BIT\" was never defined.
20117 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20119 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
20120 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
20121 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20123 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
20124 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
20125 Usually this means the macro was only invoked conditionally." "$LINENO" 5
20129 : "${CONFIG_STATUS=./config.status}"
20130 ac_write_fail=0
20131 ac_clean_files_save=$ac_clean_files
20132 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20133 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20134 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20135 as_write_fail=0
20136 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20137 #! $SHELL
20138 # Generated by $as_me.
20139 # Run this file to recreate the current configuration.
20140 # Compiler output produced by configure, useful for debugging
20141 # configure, is in config.log if it exists.
20143 debug=false
20144 ac_cs_recheck=false
20145 ac_cs_silent=false
20147 SHELL=\${CONFIG_SHELL-$SHELL}
20148 export SHELL
20149 _ASEOF
20150 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20151 ## -------------------- ##
20152 ## M4sh Initialization. ##
20153 ## -------------------- ##
20155 # Be more Bourne compatible
20156 DUALCASE=1; export DUALCASE # for MKS sh
20157 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20158 emulate sh
20159 NULLCMD=:
20160 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20161 # is contrary to our usage. Disable this feature.
20162 alias -g '${1+"$@"}'='"$@"'
20163 setopt NO_GLOB_SUBST
20164 else
20165 case `(set -o) 2>/dev/null` in #(
20166 *posix*) :
20167 set -o posix ;; #(
20168 *) :
20170 esac
20174 as_nl='
20176 export as_nl
20177 # Printing a long string crashes Solaris 7 /usr/bin/printf.
20178 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20179 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20180 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20181 # Prefer a ksh shell builtin over an external printf program on Solaris,
20182 # but without wasting forks for bash or zsh.
20183 if test -z "$BASH_VERSION$ZSH_VERSION" \
20184 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20185 as_echo='print -r --'
20186 as_echo_n='print -rn --'
20187 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20188 as_echo='printf %s\n'
20189 as_echo_n='printf %s'
20190 else
20191 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20192 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20193 as_echo_n='/usr/ucb/echo -n'
20194 else
20195 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20196 as_echo_n_body='eval
20197 arg=$1;
20198 case $arg in #(
20199 *"$as_nl"*)
20200 expr "X$arg" : "X\\(.*\\)$as_nl";
20201 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20202 esac;
20203 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20205 export as_echo_n_body
20206 as_echo_n='sh -c $as_echo_n_body as_echo'
20208 export as_echo_body
20209 as_echo='sh -c $as_echo_body as_echo'
20212 # The user is always right.
20213 if test "${PATH_SEPARATOR+set}" != set; then
20214 PATH_SEPARATOR=:
20215 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20216 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20217 PATH_SEPARATOR=';'
20222 # IFS
20223 # We need space, tab and new line, in precisely that order. Quoting is
20224 # there to prevent editors from complaining about space-tab.
20225 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
20226 # splitting by setting IFS to empty value.)
20227 IFS=" "" $as_nl"
20229 # Find who we are. Look in the path if we contain no directory separator.
20230 as_myself=
20231 case $0 in #((
20232 *[\\/]* ) as_myself=$0 ;;
20233 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20234 for as_dir in $PATH
20236 IFS=$as_save_IFS
20237 test -z "$as_dir" && as_dir=.
20238 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20239 done
20240 IFS=$as_save_IFS
20243 esac
20244 # We did not find ourselves, most probably we were run as `sh COMMAND'
20245 # in which case we are not to be found in the path.
20246 if test "x$as_myself" = x; then
20247 as_myself=$0
20249 if test ! -f "$as_myself"; then
20250 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20251 exit 1
20254 # Unset variables that we do not need and which cause bugs (e.g. in
20255 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20256 # suppresses any "Segmentation fault" message there. '((' could
20257 # trigger a bug in pdksh 5.2.14.
20258 for as_var in BASH_ENV ENV MAIL MAILPATH
20259 do eval test x\${$as_var+set} = xset \
20260 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20261 done
20262 PS1='$ '
20263 PS2='> '
20264 PS4='+ '
20266 # NLS nuisances.
20267 LC_ALL=C
20268 export LC_ALL
20269 LANGUAGE=C
20270 export LANGUAGE
20272 # CDPATH.
20273 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20276 # as_fn_error STATUS ERROR [LINENO LOG_FD]
20277 # ----------------------------------------
20278 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20279 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20280 # script with STATUS, using 1 if that was 0.
20281 as_fn_error ()
20283 as_status=$1; test $as_status -eq 0 && as_status=1
20284 if test "$4"; then
20285 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20286 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20288 $as_echo "$as_me: error: $2" >&2
20289 as_fn_exit $as_status
20290 } # as_fn_error
20293 # as_fn_set_status STATUS
20294 # -----------------------
20295 # Set $? to STATUS, without forking.
20296 as_fn_set_status ()
20298 return $1
20299 } # as_fn_set_status
20301 # as_fn_exit STATUS
20302 # -----------------
20303 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20304 as_fn_exit ()
20306 set +e
20307 as_fn_set_status $1
20308 exit $1
20309 } # as_fn_exit
20311 # as_fn_unset VAR
20312 # ---------------
20313 # Portably unset VAR.
20314 as_fn_unset ()
20316 { eval $1=; unset $1;}
20318 as_unset=as_fn_unset
20319 # as_fn_append VAR VALUE
20320 # ----------------------
20321 # Append the text in VALUE to the end of the definition contained in VAR. Take
20322 # advantage of any shell optimizations that allow amortized linear growth over
20323 # repeated appends, instead of the typical quadratic growth present in naive
20324 # implementations.
20325 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20326 eval 'as_fn_append ()
20328 eval $1+=\$2
20330 else
20331 as_fn_append ()
20333 eval $1=\$$1\$2
20335 fi # as_fn_append
20337 # as_fn_arith ARG...
20338 # ------------------
20339 # Perform arithmetic evaluation on the ARGs, and store the result in the
20340 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20341 # must be portable across $(()) and expr.
20342 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20343 eval 'as_fn_arith ()
20345 as_val=$(( $* ))
20347 else
20348 as_fn_arith ()
20350 as_val=`expr "$@" || test $? -eq 1`
20352 fi # as_fn_arith
20355 if expr a : '\(a\)' >/dev/null 2>&1 &&
20356 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20357 as_expr=expr
20358 else
20359 as_expr=false
20362 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20363 as_basename=basename
20364 else
20365 as_basename=false
20368 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20369 as_dirname=dirname
20370 else
20371 as_dirname=false
20374 as_me=`$as_basename -- "$0" ||
20375 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20376 X"$0" : 'X\(//\)$' \| \
20377 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20378 $as_echo X/"$0" |
20379 sed '/^.*\/\([^/][^/]*\)\/*$/{
20380 s//\1/
20383 /^X\/\(\/\/\)$/{
20384 s//\1/
20387 /^X\/\(\/\).*/{
20388 s//\1/
20391 s/.*/./; q'`
20393 # Avoid depending upon Character Ranges.
20394 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20395 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20396 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20397 as_cr_digits='0123456789'
20398 as_cr_alnum=$as_cr_Letters$as_cr_digits
20400 ECHO_C= ECHO_N= ECHO_T=
20401 case `echo -n x` in #(((((
20402 -n*)
20403 case `echo 'xy\c'` in
20404 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20405 xy) ECHO_C='\c';;
20406 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20407 ECHO_T=' ';;
20408 esac;;
20410 ECHO_N='-n';;
20411 esac
20413 rm -f conf$$ conf$$.exe conf$$.file
20414 if test -d conf$$.dir; then
20415 rm -f conf$$.dir/conf$$.file
20416 else
20417 rm -f conf$$.dir
20418 mkdir conf$$.dir 2>/dev/null
20420 if (echo >conf$$.file) 2>/dev/null; then
20421 if ln -s conf$$.file conf$$ 2>/dev/null; then
20422 as_ln_s='ln -s'
20423 # ... but there are two gotchas:
20424 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20425 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20426 # In both cases, we have to default to `cp -pR'.
20427 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20428 as_ln_s='cp -pR'
20429 elif ln conf$$.file conf$$ 2>/dev/null; then
20430 as_ln_s=ln
20431 else
20432 as_ln_s='cp -pR'
20434 else
20435 as_ln_s='cp -pR'
20437 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20438 rmdir conf$$.dir 2>/dev/null
20441 # as_fn_mkdir_p
20442 # -------------
20443 # Create "$as_dir" as a directory, including parents if necessary.
20444 as_fn_mkdir_p ()
20447 case $as_dir in #(
20448 -*) as_dir=./$as_dir;;
20449 esac
20450 test -d "$as_dir" || eval $as_mkdir_p || {
20451 as_dirs=
20452 while :; do
20453 case $as_dir in #(
20454 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20455 *) as_qdir=$as_dir;;
20456 esac
20457 as_dirs="'$as_qdir' $as_dirs"
20458 as_dir=`$as_dirname -- "$as_dir" ||
20459 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20460 X"$as_dir" : 'X\(//\)[^/]' \| \
20461 X"$as_dir" : 'X\(//\)$' \| \
20462 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20463 $as_echo X"$as_dir" |
20464 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20465 s//\1/
20468 /^X\(\/\/\)[^/].*/{
20469 s//\1/
20472 /^X\(\/\/\)$/{
20473 s//\1/
20476 /^X\(\/\).*/{
20477 s//\1/
20480 s/.*/./; q'`
20481 test -d "$as_dir" && break
20482 done
20483 test -z "$as_dirs" || eval "mkdir $as_dirs"
20484 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20487 } # as_fn_mkdir_p
20488 if mkdir -p . 2>/dev/null; then
20489 as_mkdir_p='mkdir -p "$as_dir"'
20490 else
20491 test -d ./-p && rmdir ./-p
20492 as_mkdir_p=false
20496 # as_fn_executable_p FILE
20497 # -----------------------
20498 # Test if FILE is an executable regular file.
20499 as_fn_executable_p ()
20501 test -f "$1" && test -x "$1"
20502 } # as_fn_executable_p
20503 as_test_x='test -x'
20504 as_executable_p=as_fn_executable_p
20506 # Sed expression to map a string onto a valid CPP name.
20507 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20509 # Sed expression to map a string onto a valid variable name.
20510 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20513 exec 6>&1
20514 ## ----------------------------------- ##
20515 ## Main body of $CONFIG_STATUS script. ##
20516 ## ----------------------------------- ##
20517 _ASEOF
20518 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20520 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20521 # Save the log message, to keep $0 and so on meaningful, and to
20522 # report actual input values of CONFIG_FILES etc. instead of their
20523 # values after options handling.
20524 ac_log="
20525 This file was extended by $as_me, which was
20526 generated by GNU Autoconf 2.69. Invocation command line was
20528 CONFIG_FILES = $CONFIG_FILES
20529 CONFIG_HEADERS = $CONFIG_HEADERS
20530 CONFIG_LINKS = $CONFIG_LINKS
20531 CONFIG_COMMANDS = $CONFIG_COMMANDS
20532 $ $0 $@
20534 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20537 _ACEOF
20539 case $ac_config_files in *"
20540 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20541 esac
20543 case $ac_config_headers in *"
20544 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20545 esac
20548 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20549 # Files that config.status was made for.
20550 config_files="$ac_config_files"
20551 config_headers="$ac_config_headers"
20552 config_links="$ac_config_links"
20553 config_commands="$ac_config_commands"
20555 _ACEOF
20557 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20558 ac_cs_usage="\
20559 \`$as_me' instantiates files and other configuration actions
20560 from templates according to the current configuration. Unless the files
20561 and actions are specified as TAGs, all are instantiated by default.
20563 Usage: $0 [OPTION]... [TAG]...
20565 -h, --help print this help, then exit
20566 -V, --version print version number and configuration settings, then exit
20567 --config print configuration, then exit
20568 -q, --quiet, --silent
20569 do not print progress messages
20570 -d, --debug don't remove temporary files
20571 --recheck update $as_me by reconfiguring in the same conditions
20572 --file=FILE[:TEMPLATE]
20573 instantiate the configuration file FILE
20574 --header=FILE[:TEMPLATE]
20575 instantiate the configuration header FILE
20577 Configuration files:
20578 $config_files
20580 Configuration headers:
20581 $config_headers
20583 Configuration links:
20584 $config_links
20586 Configuration commands:
20587 $config_commands
20589 Report bugs to the package provider."
20591 _ACEOF
20592 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20593 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20594 ac_cs_version="\\
20595 config.status
20596 configured by $0, generated by GNU Autoconf 2.69,
20597 with options \\"\$ac_cs_config\\"
20599 Copyright (C) 2012 Free Software Foundation, Inc.
20600 This config.status script is free software; the Free Software Foundation
20601 gives unlimited permission to copy, distribute and modify it."
20603 ac_pwd='$ac_pwd'
20604 srcdir='$srcdir'
20605 INSTALL='$INSTALL'
20606 AWK='$AWK'
20607 test -n "\$AWK" || AWK=awk
20608 _ACEOF
20610 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20611 # The default lists apply if the user does not specify any file.
20612 ac_need_defaults=:
20613 while test $# != 0
20615 case $1 in
20616 --*=?*)
20617 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20618 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20619 ac_shift=:
20621 --*=)
20622 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20623 ac_optarg=
20624 ac_shift=:
20627 ac_option=$1
20628 ac_optarg=$2
20629 ac_shift=shift
20631 esac
20633 case $ac_option in
20634 # Handling of the options.
20635 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20636 ac_cs_recheck=: ;;
20637 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20638 $as_echo "$ac_cs_version"; exit ;;
20639 --config | --confi | --conf | --con | --co | --c )
20640 $as_echo "$ac_cs_config"; exit ;;
20641 --debug | --debu | --deb | --de | --d | -d )
20642 debug=: ;;
20643 --file | --fil | --fi | --f )
20644 $ac_shift
20645 case $ac_optarg in
20646 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20647 '') as_fn_error $? "missing file argument" ;;
20648 esac
20649 as_fn_append CONFIG_FILES " '$ac_optarg'"
20650 ac_need_defaults=false;;
20651 --header | --heade | --head | --hea )
20652 $ac_shift
20653 case $ac_optarg in
20654 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20655 esac
20656 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20657 ac_need_defaults=false;;
20658 --he | --h)
20659 # Conflict between --help and --header
20660 as_fn_error $? "ambiguous option: \`$1'
20661 Try \`$0 --help' for more information.";;
20662 --help | --hel | -h )
20663 $as_echo "$ac_cs_usage"; exit ;;
20664 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20665 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20666 ac_cs_silent=: ;;
20668 # This is an error.
20669 -*) as_fn_error $? "unrecognized option: \`$1'
20670 Try \`$0 --help' for more information." ;;
20672 *) as_fn_append ac_config_targets " $1"
20673 ac_need_defaults=false ;;
20675 esac
20676 shift
20677 done
20679 ac_configure_extra_args=
20681 if $ac_cs_silent; then
20682 exec 6>/dev/null
20683 ac_configure_extra_args="$ac_configure_extra_args --silent"
20686 _ACEOF
20687 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20688 if \$ac_cs_recheck; then
20689 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20690 shift
20691 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20692 CONFIG_SHELL='$SHELL'
20693 export CONFIG_SHELL
20694 exec "\$@"
20697 _ACEOF
20698 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20699 exec 5>>config.log
20701 echo
20702 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20703 ## Running $as_me. ##
20704 _ASBOX
20705 $as_echo "$ac_log"
20706 } >&5
20708 _ACEOF
20709 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20711 # INIT-COMMANDS
20713 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
20714 GDB_NM_FILE=$GDB_NM_FILE
20716 _ACEOF
20718 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20720 # Handling of arguments.
20721 for ac_config_target in $ac_config_targets
20723 case $ac_config_target in
20724 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
20725 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
20726 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
20727 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
20728 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
20729 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20730 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
20731 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
20732 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
20733 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
20735 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20736 esac
20737 done
20740 # If the user did not use the arguments to specify the items to instantiate,
20741 # then the envvar interface is used. Set only those that are not.
20742 # We use the long form for the default assignment because of an extremely
20743 # bizarre bug on SunOS 4.1.3.
20744 if $ac_need_defaults; then
20745 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20746 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20747 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
20748 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20751 # Have a temporary directory for convenience. Make it in the build tree
20752 # simply because there is no reason against having it here, and in addition,
20753 # creating and moving files from /tmp can sometimes cause problems.
20754 # Hook for its removal unless debugging.
20755 # Note that there is a small window in which the directory will not be cleaned:
20756 # after its creation but before its name has been assigned to `$tmp'.
20757 $debug ||
20759 tmp= ac_tmp=
20760 trap 'exit_status=$?
20761 : "${ac_tmp:=$tmp}"
20762 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20764 trap 'as_fn_exit 1' 1 2 13 15
20766 # Create a (secure) tmp directory for tmp files.
20769 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20770 test -d "$tmp"
20771 } ||
20773 tmp=./conf$$-$RANDOM
20774 (umask 077 && mkdir "$tmp")
20775 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20776 ac_tmp=$tmp
20778 # Set up the scripts for CONFIG_FILES section.
20779 # No need to generate them if there are no CONFIG_FILES.
20780 # This happens for instance with `./config.status config.h'.
20781 if test -n "$CONFIG_FILES"; then
20783 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
20784 ac_cs_awk_getline=:
20785 ac_cs_awk_pipe_init=
20786 ac_cs_awk_read_file='
20787 while ((getline aline < (F[key])) > 0)
20788 print(aline)
20789 close(F[key])'
20790 ac_cs_awk_pipe_fini=
20791 else
20792 ac_cs_awk_getline=false
20793 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
20794 ac_cs_awk_read_file='
20795 print "|#_!!_#|"
20796 print "cat " F[key] " &&"
20797 '$ac_cs_awk_pipe_init
20798 # The final `:' finishes the AND list.
20799 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
20801 ac_cr=`echo X | tr X '\015'`
20802 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20803 # But we know of no other shell where ac_cr would be empty at this
20804 # point, so we can use a bashism as a fallback.
20805 if test "x$ac_cr" = x; then
20806 eval ac_cr=\$\'\\r\'
20808 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20809 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20810 ac_cs_awk_cr='\\r'
20811 else
20812 ac_cs_awk_cr=$ac_cr
20815 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20816 _ACEOF
20818 # Create commands to substitute file output variables.
20820 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
20821 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
20822 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
20823 echo "_ACAWK" &&
20824 echo "_ACEOF"
20825 } >conf$$files.sh &&
20826 . ./conf$$files.sh ||
20827 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20828 rm -f conf$$files.sh
20831 echo "cat >conf$$subs.awk <<_ACEOF" &&
20832 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20833 echo "_ACEOF"
20834 } >conf$$subs.sh ||
20835 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20836 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20837 ac_delim='%!_!# '
20838 for ac_last_try in false false false false false :; do
20839 . ./conf$$subs.sh ||
20840 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20842 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20843 if test $ac_delim_n = $ac_delim_num; then
20844 break
20845 elif $ac_last_try; then
20846 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20847 else
20848 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20850 done
20851 rm -f conf$$subs.sh
20853 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20854 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20855 _ACEOF
20856 sed -n '
20858 s/^/S["/; s/!.*/"]=/
20861 s/^[^!]*!//
20862 :repl
20863 t repl
20864 s/'"$ac_delim"'$//
20865 t delim
20868 s/\(.\{148\}\)..*/\1/
20869 t more1
20870 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20873 b repl
20874 :more1
20875 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20878 s/.\{148\}//
20879 t nl
20880 :delim
20882 s/\(.\{148\}\)..*/\1/
20883 t more2
20884 s/["\\]/\\&/g; s/^/"/; s/$/"/
20887 :more2
20888 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20891 s/.\{148\}//
20892 t delim
20893 ' <conf$$subs.awk | sed '
20894 /^[^""]/{
20896 s/\n//
20898 ' >>$CONFIG_STATUS || ac_write_fail=1
20899 rm -f conf$$subs.awk
20900 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20901 _ACAWK
20902 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20903 for (key in S) S_is_set[key] = 1
20904 FS = "\a"
20905 \$ac_cs_awk_pipe_init
20908 line = $ 0
20909 nfields = split(line, field, "@")
20910 substed = 0
20911 len = length(field[1])
20912 for (i = 2; i < nfields; i++) {
20913 key = field[i]
20914 keylen = length(key)
20915 if (S_is_set[key]) {
20916 value = S[key]
20917 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20918 len += length(value) + length(field[++i])
20919 substed = 1
20920 } else
20921 len += 1 + keylen
20923 if (nfields == 3 && !substed) {
20924 key = field[2]
20925 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
20926 \$ac_cs_awk_read_file
20927 next
20930 print line
20932 \$ac_cs_awk_pipe_fini
20933 _ACAWK
20934 _ACEOF
20935 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20936 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20937 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20938 else
20940 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20941 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20942 _ACEOF
20944 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20945 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20946 # trailing colons and then remove the whole line if VPATH becomes empty
20947 # (actually we leave an empty line to preserve line numbers).
20948 if test "x$srcdir" = x.; then
20949 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20951 s///
20952 s/^/:/
20953 s/[ ]*$/:/
20954 s/:\$(srcdir):/:/g
20955 s/:\${srcdir}:/:/g
20956 s/:@srcdir@:/:/g
20957 s/^:*//
20958 s/:*$//
20960 s/\(=[ ]*\).*/\1/
20962 s/\n//
20963 s/^[^=]*=[ ]*$//
20967 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20968 fi # test -n "$CONFIG_FILES"
20970 # Set up the scripts for CONFIG_HEADERS section.
20971 # No need to generate them if there are no CONFIG_HEADERS.
20972 # This happens for instance with `./config.status Makefile'.
20973 if test -n "$CONFIG_HEADERS"; then
20974 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20975 BEGIN {
20976 _ACEOF
20978 # Transform confdefs.h into an awk script `defines.awk', embedded as
20979 # here-document in config.status, that substitutes the proper values into
20980 # config.h.in to produce config.h.
20982 # Create a delimiter string that does not exist in confdefs.h, to ease
20983 # handling of long lines.
20984 ac_delim='%!_!# '
20985 for ac_last_try in false false :; do
20986 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20987 if test -z "$ac_tt"; then
20988 break
20989 elif $ac_last_try; then
20990 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20991 else
20992 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20994 done
20996 # For the awk script, D is an array of macro values keyed by name,
20997 # likewise P contains macro parameters if any. Preserve backslash
20998 # newline sequences.
21000 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21001 sed -n '
21002 s/.\{148\}/&'"$ac_delim"'/g
21003 t rset
21004 :rset
21005 s/^[ ]*#[ ]*define[ ][ ]*/ /
21006 t def
21008 :def
21009 s/\\$//
21010 t bsnl
21011 s/["\\]/\\&/g
21012 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21013 D["\1"]=" \3"/p
21014 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21016 :bsnl
21017 s/["\\]/\\&/g
21018 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21019 D["\1"]=" \3\\\\\\n"\\/p
21020 t cont
21021 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21022 t cont
21024 :cont
21026 s/.\{148\}/&'"$ac_delim"'/g
21027 t clear
21028 :clear
21029 s/\\$//
21030 t bsnlc
21031 s/["\\]/\\&/g; s/^/"/; s/$/"/p
21033 :bsnlc
21034 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21035 b cont
21036 ' <confdefs.h | sed '
21037 s/'"$ac_delim"'/"\\\
21038 "/g' >>$CONFIG_STATUS || ac_write_fail=1
21040 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21041 for (key in D) D_is_set[key] = 1
21042 FS = "\a"
21044 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21045 line = \$ 0
21046 split(line, arg, " ")
21047 if (arg[1] == "#") {
21048 defundef = arg[2]
21049 mac1 = arg[3]
21050 } else {
21051 defundef = substr(arg[1], 2)
21052 mac1 = arg[2]
21054 split(mac1, mac2, "(") #)
21055 macro = mac2[1]
21056 prefix = substr(line, 1, index(line, defundef) - 1)
21057 if (D_is_set[macro]) {
21058 # Preserve the white space surrounding the "#".
21059 print prefix "define", macro P[macro] D[macro]
21060 next
21061 } else {
21062 # Replace #undef with comments. This is necessary, for example,
21063 # in the case of _POSIX_SOURCE, which is predefined and required
21064 # on some systems where configure will not decide to define it.
21065 if (defundef == "undef") {
21066 print "/*", prefix defundef, macro, "*/"
21067 next
21071 { print }
21072 _ACAWK
21073 _ACEOF
21074 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21075 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21076 fi # test -n "$CONFIG_HEADERS"
21079 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
21080 shift
21081 for ac_tag
21083 case $ac_tag in
21084 :[FHLC]) ac_mode=$ac_tag; continue;;
21085 esac
21086 case $ac_mode$ac_tag in
21087 :[FHL]*:*);;
21088 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21089 :[FH]-) ac_tag=-:-;;
21090 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21091 esac
21092 ac_save_IFS=$IFS
21093 IFS=:
21094 set x $ac_tag
21095 IFS=$ac_save_IFS
21096 shift
21097 ac_file=$1
21098 shift
21100 case $ac_mode in
21101 :L) ac_source=$1;;
21102 :[FH])
21103 ac_file_inputs=
21104 for ac_f
21106 case $ac_f in
21107 -) ac_f="$ac_tmp/stdin";;
21108 *) # Look for the file first in the build tree, then in the source tree
21109 # (if the path is not absolute). The absolute path cannot be DOS-style,
21110 # because $ac_f cannot contain `:'.
21111 test -f "$ac_f" ||
21112 case $ac_f in
21113 [\\/$]*) false;;
21114 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21115 esac ||
21116 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21117 esac
21118 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21119 as_fn_append ac_file_inputs " '$ac_f'"
21120 done
21122 # Let's still pretend it is `configure' which instantiates (i.e., don't
21123 # use $as_me), people would be surprised to read:
21124 # /* config.h. Generated by config.status. */
21125 configure_input='Generated from '`
21126 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21127 `' by configure.'
21128 if test x"$ac_file" != x-; then
21129 configure_input="$ac_file. $configure_input"
21130 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21131 $as_echo "$as_me: creating $ac_file" >&6;}
21133 # Neutralize special characters interpreted by sed in replacement strings.
21134 case $configure_input in #(
21135 *\&* | *\|* | *\\* )
21136 ac_sed_conf_input=`$as_echo "$configure_input" |
21137 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21138 *) ac_sed_conf_input=$configure_input;;
21139 esac
21141 case $ac_tag in
21142 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21143 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21144 esac
21146 esac
21148 ac_dir=`$as_dirname -- "$ac_file" ||
21149 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21150 X"$ac_file" : 'X\(//\)[^/]' \| \
21151 X"$ac_file" : 'X\(//\)$' \| \
21152 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21153 $as_echo X"$ac_file" |
21154 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21155 s//\1/
21158 /^X\(\/\/\)[^/].*/{
21159 s//\1/
21162 /^X\(\/\/\)$/{
21163 s//\1/
21166 /^X\(\/\).*/{
21167 s//\1/
21170 s/.*/./; q'`
21171 as_dir="$ac_dir"; as_fn_mkdir_p
21172 ac_builddir=.
21174 case "$ac_dir" in
21175 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21177 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21178 # A ".." for each directory in $ac_dir_suffix.
21179 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21180 case $ac_top_builddir_sub in
21181 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21182 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21183 esac ;;
21184 esac
21185 ac_abs_top_builddir=$ac_pwd
21186 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21187 # for backward compatibility:
21188 ac_top_builddir=$ac_top_build_prefix
21190 case $srcdir in
21191 .) # We are building in place.
21192 ac_srcdir=.
21193 ac_top_srcdir=$ac_top_builddir_sub
21194 ac_abs_top_srcdir=$ac_pwd ;;
21195 [\\/]* | ?:[\\/]* ) # Absolute name.
21196 ac_srcdir=$srcdir$ac_dir_suffix;
21197 ac_top_srcdir=$srcdir
21198 ac_abs_top_srcdir=$srcdir ;;
21199 *) # Relative name.
21200 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21201 ac_top_srcdir=$ac_top_build_prefix$srcdir
21202 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21203 esac
21204 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21207 case $ac_mode in
21210 # CONFIG_FILE
21213 case $INSTALL in
21214 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21215 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21216 esac
21217 _ACEOF
21219 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21220 # If the template does not know about datarootdir, expand it.
21221 # FIXME: This hack should be removed a few years after 2.60.
21222 ac_datarootdir_hack=; ac_datarootdir_seen=
21223 ac_sed_dataroot='
21224 /datarootdir/ {
21228 /@datadir@/p
21229 /@docdir@/p
21230 /@infodir@/p
21231 /@localedir@/p
21232 /@mandir@/p'
21233 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21234 *datarootdir*) ac_datarootdir_seen=yes;;
21235 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21237 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21238 _ACEOF
21239 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21240 ac_datarootdir_hack='
21241 s&@datadir@&$datadir&g
21242 s&@docdir@&$docdir&g
21243 s&@infodir@&$infodir&g
21244 s&@localedir@&$localedir&g
21245 s&@mandir@&$mandir&g
21246 s&\\\${datarootdir}&$datarootdir&g' ;;
21247 esac
21248 _ACEOF
21250 # Neutralize VPATH when `$srcdir' = `.'.
21251 # Shell code in configure.ac might set extrasub.
21252 # FIXME: do we really want to maintain this feature?
21253 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21254 ac_sed_extra="$ac_vpsub
21255 $extrasub
21256 _ACEOF
21257 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21259 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21260 s|@configure_input@|$ac_sed_conf_input|;t t
21261 s&@top_builddir@&$ac_top_builddir_sub&;t t
21262 s&@top_build_prefix@&$ac_top_build_prefix&;t t
21263 s&@srcdir@&$ac_srcdir&;t t
21264 s&@abs_srcdir@&$ac_abs_srcdir&;t t
21265 s&@top_srcdir@&$ac_top_srcdir&;t t
21266 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21267 s&@builddir@&$ac_builddir&;t t
21268 s&@abs_builddir@&$ac_abs_builddir&;t t
21269 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21270 s&@INSTALL@&$ac_INSTALL&;t t
21271 $ac_datarootdir_hack
21273 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
21274 if $ac_cs_awk_getline; then
21275 $AWK -f "$ac_tmp/subs.awk"
21276 else
21277 $AWK -f "$ac_tmp/subs.awk" | $SHELL
21278 fi \
21279 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21281 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21282 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21283 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21284 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21285 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21286 which seems to be undefined. Please make sure it is defined" >&5
21287 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21288 which seems to be undefined. Please make sure it is defined" >&2;}
21290 rm -f "$ac_tmp/stdin"
21291 case $ac_file in
21292 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21293 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21294 esac \
21295 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21299 # CONFIG_HEADER
21301 if test x"$ac_file" != x-; then
21303 $as_echo "/* $configure_input */" \
21304 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21305 } >"$ac_tmp/config.h" \
21306 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21307 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21308 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21309 $as_echo "$as_me: $ac_file is unchanged" >&6;}
21310 else
21311 rm -f "$ac_file"
21312 mv "$ac_tmp/config.h" "$ac_file" \
21313 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21315 else
21316 $as_echo "/* $configure_input */" \
21317 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21318 || as_fn_error $? "could not create -" "$LINENO" 5
21323 # CONFIG_LINK
21326 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
21328 else
21329 # Prefer the file from the source tree if names are identical.
21330 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
21331 ac_source=$srcdir/$ac_source
21334 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
21335 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
21337 if test ! -r "$ac_source"; then
21338 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
21340 rm -f "$ac_file"
21342 # Try a relative symlink, then a hard link, then a copy.
21343 case $ac_source in
21344 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
21345 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
21346 esac
21347 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
21348 ln "$ac_source" "$ac_file" 2>/dev/null ||
21349 cp -p "$ac_source" "$ac_file" ||
21350 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
21353 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
21354 $as_echo "$as_me: executing $ac_file commands" >&6;}
21356 esac
21359 case $ac_file$ac_mode in
21360 "config.h":H) echo > stamp-h ;;
21361 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
21362 "nm.h":L) echo > stamp-nmh ;;
21363 "gcore":F) chmod +x gcore ;;
21365 esac
21366 done # for ac_tag
21369 as_fn_exit 0
21370 _ACEOF
21371 ac_clean_files=$ac_clean_files_save
21373 test $ac_write_fail = 0 ||
21374 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21377 # configure is writing to config.log, and then calls config.status.
21378 # config.status does its own redirection, appending to config.log.
21379 # Unfortunately, on DOS this fails, as config.log is still kept open
21380 # by configure, so config.status won't be able to write to it; its
21381 # output is simply discarded. So we exec the FD to /dev/null,
21382 # effectively closing config.log, so it can be properly (re)opened and
21383 # appended to by config.status. When coming back to configure, we
21384 # need to make the FD available again.
21385 if test "$no_create" != yes; then
21386 ac_cs_success=:
21387 ac_config_status_args=
21388 test "$silent" = yes &&
21389 ac_config_status_args="$ac_config_status_args --quiet"
21390 exec 5>/dev/null
21391 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21392 exec 5>>config.log
21393 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21394 # would make configure fail if this is the last instruction.
21395 $ac_cs_success || as_fn_exit 1
21399 # CONFIG_SUBDIRS section.
21401 if test "$no_recursion" != yes; then
21403 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
21404 # so they do not pile up.
21405 ac_sub_configure_args=
21406 ac_prev=
21407 eval "set x $ac_configure_args"
21408 shift
21409 for ac_arg
21411 if test -n "$ac_prev"; then
21412 ac_prev=
21413 continue
21415 case $ac_arg in
21416 -cache-file | --cache-file | --cache-fil | --cache-fi \
21417 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
21418 ac_prev=cache_file ;;
21419 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
21420 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
21421 | --c=*)
21423 --config-cache | -C)
21425 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
21426 ac_prev=srcdir ;;
21427 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
21429 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
21430 ac_prev=prefix ;;
21431 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
21433 --disable-option-checking)
21436 case $ac_arg in
21437 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21438 esac
21439 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
21440 esac
21441 done
21443 # Always prepend --prefix to ensure using the same prefix
21444 # in subdir configurations.
21445 ac_arg="--prefix=$prefix"
21446 case $ac_arg in
21447 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
21448 esac
21449 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
21451 # Pass --silent
21452 if test "$silent" = yes; then
21453 ac_sub_configure_args="--silent $ac_sub_configure_args"
21456 # Always prepend --disable-option-checking to silence warnings, since
21457 # different subdirs can have different --enable and --with options.
21458 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
21460 ac_popdir=`pwd`
21461 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
21463 # Do not complain, so a configure script can configure whichever
21464 # parts of a large source tree are present.
21465 test -d "$srcdir/$ac_dir" || continue
21467 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
21468 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
21469 $as_echo "$ac_msg" >&6
21470 as_dir="$ac_dir"; as_fn_mkdir_p
21471 ac_builddir=.
21473 case "$ac_dir" in
21474 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21476 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21477 # A ".." for each directory in $ac_dir_suffix.
21478 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21479 case $ac_top_builddir_sub in
21480 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21481 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21482 esac ;;
21483 esac
21484 ac_abs_top_builddir=$ac_pwd
21485 ac_abs_builddir=$ac_pwd$ac_dir_suffix
21486 # for backward compatibility:
21487 ac_top_builddir=$ac_top_build_prefix
21489 case $srcdir in
21490 .) # We are building in place.
21491 ac_srcdir=.
21492 ac_top_srcdir=$ac_top_builddir_sub
21493 ac_abs_top_srcdir=$ac_pwd ;;
21494 [\\/]* | ?:[\\/]* ) # Absolute name.
21495 ac_srcdir=$srcdir$ac_dir_suffix;
21496 ac_top_srcdir=$srcdir
21497 ac_abs_top_srcdir=$srcdir ;;
21498 *) # Relative name.
21499 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21500 ac_top_srcdir=$ac_top_build_prefix$srcdir
21501 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21502 esac
21503 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21506 cd "$ac_dir"
21508 # Check for guested configure; otherwise get Cygnus style configure.
21509 if test -f "$ac_srcdir/configure.gnu"; then
21510 ac_sub_configure=$ac_srcdir/configure.gnu
21511 elif test -f "$ac_srcdir/configure"; then
21512 ac_sub_configure=$ac_srcdir/configure
21513 elif test -f "$ac_srcdir/configure.in"; then
21514 # This should be Cygnus configure.
21515 ac_sub_configure=$ac_aux_dir/configure
21516 else
21517 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
21518 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
21519 ac_sub_configure=
21522 # The recursion is here.
21523 if test -n "$ac_sub_configure"; then
21524 # Make the cache file name correct relative to the subdirectory.
21525 case $cache_file in
21526 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
21527 *) # Relative name.
21528 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
21529 esac
21531 { $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
21532 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
21533 # The eval makes quoting arguments work.
21534 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
21535 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
21536 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
21539 cd "$ac_popdir"
21540 done
21542 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21544 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}